6cb58d1f1ce2e63e242ad260ce73bfa3bda02c21
105 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c361de62a5 |
Introduces query for contract build information (#919)
* Introduces query for contract build information * Removed temporary test garbage * Removed unused imports in validator-client if built without nymd-client feature |
||
|
|
35748e07c4 |
Feature/mixnet contract refactor (#910)
* Starting a refactor to cut the huge files into chunks * Fixing some lints * ibid * Mixnode and gateway bonding tests moved * All transaction test moved into submodules * Finished splitting out transactions.rs from root into submodules. * Moved mixnet params state into submodule * Recombined modules for few top-level actions * Moving mixnode bonding queries into their own file * Removed some unused imports * Got tests running again. Max limit tests not right. * Fixed tests * Started moving delegation queries into own module * Finished moving delegation queries into their own module * Cleanup * Moving query limits into relevant modules * Putting query limits back at top-level * Using prefix to make storage usage a little more explicit * Separating storage into smaller chunks * More storage refactoring * Finished moving all storage into modules * Moved all storage prefixes into relevant modules and made them not-public * Renamed the mostly-empty queries module to query_support * ibid * Fixed query support rename problems * Started to move rewards-related helpers into their own module * Started moving delegations-related helpers into their own module * Moved more code from global helpers into delegations helpers * Moved all remaining test helper code from main helpers file into test helpers * Made use of test_helpers explicit via a module rename. Also got rid of non-explicit usages * Moved mixnode storage retrieval limits into mixnodes storage module * Moved bond retrieval max limit into storage moduel * Moved more storage limits into mixnodes storage file; fixed a gateways limit test. * Added a note on gateways limits constants I'll re-use the mixnodes values, but it doesn't have to be this way. We could easily make a specific constant for gateways instaed. * Renamed "state" to GlobalContractParams * Pulled bit of test helper code up a level * Small cleanup of zero spacing in constants * Made a local helper method private * Renaming GlobalContractParams to ContractSettings and StateParams to ContractSettingsParams * ibid * Renamed contract settings storage methods from "config" (which is a bit vage to "contract_settings" * Indulging a fullword as a personal protest vs the Go programming language * Renaming mixnet settings to mixnet contract settings * Making validate_mixnode_bond private and moving it downwards in the file * Moving gateway bond validation to the bottom of the tests file * Getting the wallet compiling again. * Updated TypeScript client with new types and contract method names * Updating rust validator client with new contract method names and types * Fixed type error in mixnet-contract shared msg. * Used new contract method names and types * Fixed warnings in non-test code * All tests compiling But not passing yet * Fixed test compilation warnings * Fixed tests * Test-locked Delegations struct Co-authored-by: dave <dave@nym-mbp.lan> Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com> |
||
|
|
085761a9fb |
Feature/batch delegator rewarding (#898)
* Unnrolled the loop into separate function * Ugly way of saving rewarding status * Initial way of rewarding next page of delegators * Attribute passing * Promoted transactions to directory * Moved rewarding-related functionalities into separate file * [ci skip] Generate TS types * Better errors on double rewarding attempt * Removed old rewarding call * Test fixes * Some cleanup * Paged mixnode rewarding test + serde fixes * Tests for delegator rewarding * ExecuteMsg for MixDelegatorRewarding * Made validator-api code compliable with bunch of todo!() macros * Removed Option wrapper from params in MixnodeToReward * Calculating uptime for entire epoch * Created shared MIXNODE_DELEGATORS_PAGE_LIMIT constant * Using new rewarding messages in validator API * cargo fmt * Updated wallet state types * Additional test for correct rewarding information * Query for rewarding status * Additional test regarding delegator rewarding * Client methods for obtaining rewarding status * Validator API checking for full rewarding * Removed unused field from validator api config template * Waiting for MINIMUM number of test routes * Waiting initialisation_backoff in the early return case * Fixes crash condition in validator API when calculating last day uptime * Fixed typo * Dealing with the case of rewarding mixnode with 0 uptime * Removed temporary unwrap * Guarding against 0-size rewarded/active sets Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com> |
||
|
|
ab7f24dc1f |
Merge pull request #837 from nymtech/feature/vouchers
Feature/vouchers |
||
|
|
41b77c3ad5 |
Merge pull request #894 from nymtech/feature-gate-ts-rs
Only use ts-rs in tests |
||
|
|
7e1cf2f105 |
Feature/rewarding interval updates (#880)
* Introduced rewarding_interval_nonce to contract state * Queries for ibid. * Mixnode demanded set size * Routes for obtaining demanded/active mixnode sets * Testing only demanded nodes * Typo * Initial state * Feature-locking unused imports * Generating pseudorandom (with deterministic seed) demanded mixnodes set * cargo fmt * Fixed tauri state * Renamed network monitor address to the rewarding validator * [ci skip] Generate TS types * Notice for the future * Transactions to begin/finish mixnode rewarding + double rewarding protection * Validator API using new contract calls * Removed dead code from an old experiment * [ci skip] Generate TS types * Removed unused import * Renamed 'demanded' set to 'rewarded' set * Some renaming action * [ci skip] Generate TS types * Fixed post-merge dependency issue in tests * Post merge test fix Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com> |
||
|
|
c7007de1ea | Only use ts-rs in tests | ||
|
|
10bf70b22b |
Feature/bandwidth token (#832)
* Remove check for bandwidth for incoming packets We should only accunt for packets that the client inputs to the mixnet * Introduce BandwidthController for both types of bandwidth creds * Add some non-coconut token bandwidth handling * Use thiserror for gateway-client lib * Add error handling * Unable to build for wasm for now * Fix wasm strange error * Disable non-coconut credentials for wasm client * Check for status and throw the error up * Send encrypted token cred from client * Gateway receive message and signature validation * Put the correct amount of tokens that were burned * [ci skip] Generate TS types * Eth endpoint and secret key as config parameters * Add eth_endpoint config argument for gateway * Update test as well * Separate panicable code from the safe one * Move some bandwidth controller panics up the call stack * Save contract corresponding to the eth endpoint * Fix template * Pass the web3 interface as well * Made event reads possible in gateway * Add checks for event data * Cosmos contract for double spending prevention * Add workflow for the new contract * Add validator rest URL to config * Rename eth_events to erc20_bridge * Pass cosmos mnemonic as well, and put the nymd client in ERC20Bridge * Call cosmos contract for final verification * Ask for config parameters in cli * Fix various stuff * Increase timeout to allow gateway to check the two chains * Put some logs for the new flow * Set consumed bandwidth invariantly of coconut feature * Fix clippy error * Add non-coconut checks * Use 2018 rust instead of 2021 * More verbose nymd error * Explicitly specify TOKENS_TO_BURN constant * Put eth burn function in a constant * Replace to_vec & append with iter & chain * Test for (de)serialization of TokenCredential * Minor rename * Separate credential creation from bandwidth claiming * Switch from panics to errors when claiming coconut bandwidth * Another append changed to chain * Update QA cosmos contract address * Simplify build/test/clippy separation on coconut feature * Fix bad features arg positioning * Use the start_after in cosmos contract query * Set a limit in line with a range on cosmos queries * Added unit tests for new cosmos contract * Fix bandwidth_remaining comparation * Get remaining bandwidth from gateway * Add contract build flag * Add a useful info log * Use a more robust eth depth for release builds * Include recipt logs in error message * Fix clippy for tests * Use Arc instead of clone * Rename as_bytes to to_bytes * Make signature verification in contract more verbose * Missed rename of paging constant * Fix gateway start with coconut enabled * Rename function to claim_token * Simplify nymd client setup * Check with block buffer on gateway as well * Update comment of double spending protection * Correct contract address * Backup the keypairs used for buying tokens, in case of error cases * Don't take any chances with the gateway timeout * [ci skip] Generate TS types * Updated cosmos contract to latest QA address * Add cli options for eth * Update network monitor timeout value as well Co-authored-by: neacsu <neacsu@users.noreply.github.com> |
||
|
|
d952f3233a |
Active sets => Rewarded + Active/Idle sets (#864)
* Introduced rewarding_interval_nonce to contract state * Queries for ibid. * Mixnode demanded set size * Routes for obtaining demanded/active mixnode sets * Testing only demanded nodes * Typo * Initial state * Feature-locking unused imports * Generating pseudorandom (with deterministic seed) demanded mixnodes set * cargo fmt * Fixed tauri state * [ci skip] Generate TS types * Renamed 'demanded' set to 'rewarded' set * Some renaming action * [ci skip] Generate TS types * Fixed post-merge dependency issue in tests Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com> |
||
|
|
eae4276381 |
Tokenomics rewards (#802)
* Initial analysis * Implement core rewards distribution * Tests and refactoring for better testability * Feature gate ts-rs in mixnet-contract * No more floats * Fix performance calculation * Add migration * Bandwidth fix, reduce inflation pool size * Update tokenomics * Refactor rewarding and replace num crate * Address review comments * Cleanup, better test values * Simplify formula * Cleanup, add rewarding formulas to README * Address review comments * Cleanup rebase * [ci skip] Generate TS types * fmt Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com> |
||
|
|
8bcc931d9b |
Feature/removal of monitor good nodes (#833)
* Removed separated ipv4 and ipv6 testing * Testing network using chosen core nodes This should have probably been like 20 independent commits... sorry... * SQL migrations for updated schema * SQL updates * Using absolute uptime directly * New uptime calculations * Config entries, more DB work, some cleanup * Additional API query routes * More SQL and API work * Changed `_` to `-` in new routes * Removed good topology from config * Fixed gateways reader yield condition * Initial gateways pinger * Minor cleanup and logging level decreases * Missing trait derivations * Further logging adjustments * Unused commented out import * Claiming additional bandwidth in coconut feature when low * Fixed build with coconut feature * Minimum number of test routes * Making beta/nightly clippy happier |
||
|
|
bd4c18c723 | Set MSRV on all binaries to 1.56 (#872) | ||
|
|
b19528d47e |
Removed gateway rewarding and delegation (#856)
* Removed gateway rewarding and delegation * Removed redundant error variants * [ci skip] Generate TS types * Test fixes Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com> |
||
|
|
7e1c3b4501 |
Chore/cosmrs update (#862)
* Re-enabled `get_tx` endpoint * Updated cosmrs to 0.3 and prost to 0.9 * [ci skip] Generate TS types Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com> |
||
|
|
4a9cc5b757 | Fixed most recent nightly clippy warnings (#865) | ||
|
|
a009e76568 | Feature locked client-side bandwidth metering (#820) | ||
|
|
0f7280c227 |
Fixed most recent nightly clippy warnings (#817)
* Fixed most recent nightly clippy warnings * Missing wasm32 changes |
||
|
|
7caac334f4 |
Feature/resending rewards on timeout (#810)
* Additional methods on nymd client * Checking for time out errors * Attempting retransmission on suspected time out * Don't report error if tx is a mempool duplicate |
||
|
|
4e0e081b3e |
Feature/coconut feature (#805)
* 'Coconut' feature in gateway * Enabled coconut feature in gateway-requests * Native client coconut feature * Ibid for socks5 client * Ibid for wasm client * Coconut feature flag for validator-api * Added coconut feature flag to our CI * build.yml typo * Continue on windows errors * Missing quote * Another typo in build.yml * Reclaiming disk space when building for windows on CI |
||
|
|
2a98f7482d |
Feature/migrate hidden delegations (#786)
* Remove migration code * Added function to iterate over delegation of variable type * Add unit tests * Refactored some naming and reused mix/gateway functionality * Borrow bucket instead of move * Linked with existing delegations function * Migration of left-over delegations * Remove unused imports * Put a gateway test as well, next to the mix one * Expose queries for all delegations * Change break point * Added client side calls to the new queries * Fix clippy * Added pagination and read check tests * Fix gateway test from the last commit * Test functions for (de)serialization of identity and owner (in)to storage keys * Add delegation function unit test * Feature guard import * Changed UnpackedDelegation from type to struct * Remove mutable parameter and put start_after in returned value * Made all delegations into iterator for OOM safety * Fix clippy * Add test for delegations iterator size in memory * Change map with if let for ease of read * Use DENOM instead of hardcoded value |
||
|
|
12637d93ff |
Feature/persistent gateway storage (#784)
* Sqlx struct stub * Initial schema * Initial error enum * Managed for persisted shared keys * Initial inbox manager * Comments * Using new database in clients handler * Extending gateway storage API * tokio::main + placeholder values * Removed old client store * Simplified logic of async packet processing * Renamed table + not null restriction * BandwidthManager * Removed sled dependency * Using centralised storage for bandwidth * Dead code removal * WIP connection_handler split and simplification Maybe it doesn't look like it right now, but once completed it will remove bunch of redundant checks for Nones etc * Further more explicit clients handler split * Minor cleanup * Temporary store for active client handles * Fixed error types * Error trait on iv and encrypted address * Authentication and registration moved to the handler * Removal of clients handler * Further logic simplification + returned explicit bandwidth values * Further cleanup and comments * Updated config with relevant changes * Basic bandwidth tracking in client * FreshHandle doc comments + fixed stagger issue * Removed side-effects from .map * More doc comments * Database migration on build * Increased default claimed bandwidth * Renaming * Fixed client determining available bandwidth * Removed dead sql table that might be used in the future * Windows workaround * Comment * Return error rather than cap credential |
||
|
|
668325a4ce |
Feature/active sets (#764)
* Added separate gateway active set size * Grabbing contract state * Defined PartialOrd on MixnodeBond and GatewayBond * Some initial stub for active set * Unit tests for mixnode and gateway bond partialord implementation * Obtaining active sets * Active nodes routes * Additional methods on validator client * Added state migration * Feature locking unused import * Fixed State test fixture * Included block height for partial_ord * Missing post-merge imports * api on the client for active nodes * Native/socks5/wasm clients using active nodes * Rewarding only active nodes * Updated validator client StateParams definition * Gateway active set size * Contract migration update * Cargo fmt * Updated TauriStateParams * [ci skip] Generate TS types Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com> |
||
|
|
e891c68158 | Created getters for AccountData (#787) | ||
|
|
9a65e44166 |
Add Tauri wallet
-- Squashed commit of the following: commit |
||
|
|
020cad897d |
Feature/rust rewarding (#750)
* Calculating gas fees * Ability to set custom fees * Added extra test * Removed commented code * Moved all msg types to common contract crate * Temporarily disabling get_tx method * Finishing up nymd client API * Comment fix * Remaining fee values * Some cleanup * Removed needless borrow * Fixed imports in contract tests * Moved error types around * New ValidatorClient * Experiment with new type of defaults * Removed dead module * Dealt with unwrap * Migrated mixnode to use new validator client * Migrated gateway to use new validator client * Mixnode and gateway adjustments * More exported defaults * Clients using new validator client * Fixed mixnode upgrade * Moved default values to a new crate * Changed behaviour of validator client features * Migrated basic functions of validator api * Updated config + fixed startup * Fixed wasm client build * Integration with the explorer api * Removed tokio dev dependency * Needless borrow * Fixex wasm client build * Fixed tauri client build * Needless borrows * New tables for rewarding * Updated cosmos-sdk version * Removed reward-specific node status routes * New rewarding-specific config entries * Additional network defaults * Initial periodic rewards from validator api * Replaced print with log * Filtering nodes with uptime > 0 * Additional failure logging statements * Fixed operation ordering * Adjusted next rewarding epoch determination * Modified rewarding behaviour to keep track of rewarding in progress * Improved error message on config load failure * Additional log statement * Adjusted rewarding gas limit calculation * Made naming slightly more consistent * Fixed incorrect parentheses placement * Fixed fee calculation * Cargo fmt * Removed failed merge artifacts * Introduced comment for any future reward modification * typos * Helper functions for the future * Making @mfahampshire 's life easier * Redesigned epoch + rewarding skipped epochs (if possible) * Removed old merge artifacts * Naming consistency * Constraining arguments * Removed unnecessary if branch * Ignore monitor check for current epoch * Additional checks for current epoch data * Monitor threshold check * cargo fmt * Fixed post-merge issues in transactions.rs |
||
|
|
8f6856d6fb |
Make fee helpers public (#777)
Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com> |
||
|
|
219c45a352 |
Updated cosmos-sdk (#761)
* Updated cosmos-sdk * Re-exposing more things |
||
|
|
122f5d9f2e |
Feature/cred after handshake (#745)
* Call perform_initial_authentication instead of register in clients * Refactor the register/authenticate functions a bit * Introduce Bandwidth request type * Add encryption layer to cred * Remove cred pass and check from handshake * Replaced unreachable! with error * Changed decrypt_tagged signature to not take mutable ownership of data * Put handle_bandwidth work inside a function * Add check before unwrap * Remove unnecessary async * Decouple bandwidth credential from authentication * Use new_error for ServerResponse:Error * Send a fresh IV each time the BandwidthCredential request is sent * Remove unwrap of bincode::serialize * Add comment regarding Bandwidth response * Remove _mut from naming * Leave Debug trait alone, as the initial error doesn't reproduce anymore * Pass iv as Vec<u8> instead of base58 string * Renamed AuthenticationIV to IV, as it is now used for more the just authentication * Did some IV refactorization |
||
|
|
982ee0266c |
Feature/get own delegations (#748)
* Introduce reverse delegation bucket * Add client command * Fix clippy error * Added tests in queries * Add tests in transactions * Migration code. Will be reverted after it's called on testnet * Replace unwrap with expect * Move some test code in the right file... ... to remove unnecessary auxiliary function. * Reduce the scope to migration auxiliary functions * Rename everything from [node]reverse to reverse[node] * Fix fmt |
||
|
|
d740e8b8a9 | Reinstate the POST method blind_sign (#744) | ||
|
|
a274edffba |
Feature/nymd client integration (#736)
* Calculating gas fees * Ability to set custom fees * Added extra test * Removed commented code * Moved all msg types to common contract crate * Temporarily disabling get_tx method * Finishing up nymd client API * Comment fix * Remaining fee values * Some cleanup * Removed needless borrow * Fixed imports in contract tests * Moved error types around * New ValidatorClient * Experiment with new type of defaults * Removed dead module * Dealt with unwrap * Migrated mixnode to use new validator client * Migrated gateway to use new validator client * Mixnode and gateway adjustments * More exported defaults * Clients using new validator client * Fixed mixnode upgrade * Moved default values to a new crate * Changed behaviour of validator client features * Migrated basic functions of validator api * Updated config + fixed startup * Fixed wasm client build * Integration with the explorer api * Removed tokio dev dependency * Needless borrow * Fixex wasm client build * Fixed tauri client build * Needless borrows * Fixed client upgrade print * Removed redundant comments * Made note on aggregated verification key into a doc comment * Removed mixnet contract references from verloc * Modified default validators structure * Reformatted validator-api Cargo.toml file * Removed commented code * Made the doc comment example a no-run * Fixed a upgrade print... again * Adjusted the doc example * Removed unused import |
||
|
|
28e55c6de6 |
Hang coconut issuance off the validator-api (#679)
* Hand coconut issuance off the validator-api
* git to cargo
* Move to own module
* Integrate tauri-client, extract common interface
* cargo fmt
* Ergonomics
* Facelift
* Wrap up tauri client
* Set up publish
* Fix fmt
* Install CI dependencies
* Inline deps
* Remove mac deps
* Add dist dir
* Fix beta clippy nag
* Commit some gateway work
* Thread coconut creds through gateway handshake
* Push in progress patch
* Move State from tauri client to coconut interface
* Move get_aggregated_signature from tauri client to coconut interface
* Move prove_credential from tauri client to coconut interface
* Update sphinx version
* Mount coconut routes and manage config file in rocket
* Split default validator endpoint into host and port
* Add init for simple credential initialization
* Fix common gateway client
* Add coconut cred to webassembly client
* Add coconut cred to socks5 client
* Add coconut cred to native client
* Remove direct coconut-rs dependency
* Use only coconut interface in validator api
* Leave validator-api out of workspace and update Cargo.lock
* Fix clippy warnings and update Cargo.lock after rebase
* Switch from attohttpc to reqwest for async gets
This is not only needed for using async requests, but also because attohttpc
causes OpenSSL issues when cross compiling the webassembly client.
* Replace attohttpc with reqwest for puts too
* Make tauri client commands async
* Fix borrow error
* Guard gateway server code from compiling for wasm (client)
* Fix clippy wasm client
* Fix tests
* Fix clippy in tauri client
* Remove commented code
* Update comment of init message
* Remove unnecessary hex dependency
* Replace config argument with key_pair
* Use `trim()` for whitespace removal
* Move verification key query higher up the function calls
* Put KeyPair instead of Config into rocket's managed items
* Re-enable tauri client verify button
* Move verification key up the function calls for prove_credential
* Use consts for verification_key and blind_sign routes of validator-api
* Replace `match` with `map_err`
* Fix typo
* Remove now unnecessary `Clone` derives
... as config is no longer managed by rocket
* Replace `match` with `map_err`
* Make `InternalSignRequest` really internal to validator-api
* Make `with_keypair` live up to its name
* Update Cargo.lock after rebase
* Replace String error with HandshakeError
* Add CoconutInterfaceError to coconut-interface
* Format the new error in tauri client
* Remove from default, as wasm client doesn't build
* Put public key as init argument...
... for the public attributes of the credential
* Use the hash_to_scalar function to make public key into attribute
Use the function from cli-demo-rs from https://github.com/nymtech/coconut
to make the identity public key into a public attribute.
* Replace vector with array for InitMessage
As we know beforehand the size of the keys, we can use fixed size array
instead of vectors. This eliminates the need for a prefixed length in
the serialized form of the InitMessage structure and enables a easy
deserialization of the remote identity before the actual bincode
deserialization that we do in the handshake process.
Before this, the `extract_remote_identity_from_register_init` function
attempted to deserialize into a public key the length-prefixed public key
received from the client, thus failing sporadically with a `Cannot decompress
Edwards point` error.
* Pass public and private attributes to state `init` instead of PublicKey
* Make tauri call with dummy attributes
* Make clients call with their keypairs
* Revert "Make clients call with their keypairs"
This reverts commit
|
||
|
|
abb4537551 |
Switch from wasm-timer to fluvio-wasm-timer... (#735)
... which addresses the problem from https://github.com/Amanieu/parking_lot/issues/269 by taking the unmerged workaround of https://github.com/tomaka/wasm-timer/pull/13 , as wasm-timer appears to be unmaintained. |
||
|
|
8694396942 |
Feature/completing nymd client api (#732)
* Calculating gas fees * Ability to set custom fees * Added extra test * Removed commented code * Moved all msg types to common contract crate * Temporarily disabling get_tx method * Finishing up nymd client API * Comment fix * Remaining fee values * Some cleanup * Removed needless borrow * Fixed imports in contract tests * Made contract address optional to allow for contract upload and initialisation |
||
|
|
fdd34863ba |
Feature/nymd client fee handling (#730)
* Calculating gas fees * Ability to set custom fees * Added extra test * Removed commented code * Removed needless borrow |
||
|
|
ebeac73f30 |
Rust nymd/cosmwasm client (#724)
* Using forked cosmwasm * Basic wallet functionalities * WIP * Generic abci_query method * More API stubs with some semi-working code * More API stub work * Moving from fork of cosmos-rust to the upstream * Implemented most sign-less cosmwasm client methods * Full contract upload with log parsing * Implemented most of remaining methods on signing client * Some initial cleanup on existing code * Feature-locking nymd client * Better type for base account * Pagination handling * Searching transaction by concrete hash * basic search_tx * More cleanup * Disabled default validator-client features on wasm client * Fixed account conversion * Fixed typo in cargo.toml * Moving back to main cosmos-sdk repo * Re-exported connect functions * comment * Wallet no longer storing signing keys * Went back to the trait approach * Example stub of future API * Removed needless borrow * Fixed starting page * Fixed typo * Using centralised config defaults |
||
|
|
d643df74b3 | Removed wasm feature bypassing cycling dependencies (#723) | ||
|
|
18f5d4084d |
Feature/default values (#700)
* Put endpoints and contract address in one place * Put common ports in one place * Split cache version from route * Share validator-api port value between server and client * Put BECH32 prefix in defaults * Put DENOM in defaults * Put network monitor address in defaults * Fix clippy * Fix another clippy + tests import of DENOM |
||
|
|
e5afd54ce0 |
Feature/node status api (#680)
* Basic storage stub * New models for new node status api * Route handling * Mounting new routes * Missing selective commit * Moved network monitor related files to separate package * Starting to see some sqlx action * Schema updates * Log statement upon finished migration * Removed old diesel related imports * Converted mixnode cache initialisation into a fairing * Moved cache related functionalities to separate package Also defined staging there * Created run method for validator cache + removed unwrap * Removed old node-status-api types and left bunch of todo placeholders in their place * Fixed managing validatorcache * Status reports are starting to get constructed * Submitting some dummy results to the database * Removing duplicate code for generating reports * Removed statuses older than 48h * Initial attempt at trying to obtain reports for all active nodes * Removed duplicates from the full report * Grabbing uptime history * Updating historical uptimes of active nodes * Updated sqlx-data.json * Removed all placeholder foomp owner values * Changed Layer serde behaviour for easier usage * Extended validator api config * Initial (seems working !) integration with network monitor * Added database path configuration to config * Using ValidatorCache in NetworkMonitor * Flag indicating whether validator cache has been initialised * Introduced a locla-only route for reward script to perform daily chores * Flag to save config to a file * Moved spawning of receiving future to run method rather than new * Removed arguments that dont make sense to be configured via CLI * Removed dead code from config file * More dead code removal * Added validator API to CI * Corrected manifest-path arguments * Constructing network monitor by passing config * Combined validator API CI with the main CI file * Using query_as for NodeStatus * Checking if historical uptimes were already calculated on particular day * Making id field NOT NULL * More query_as! action * Updated sqlx-data.json * Removed unused chrono feature * Renamed the migration file * Changed default validator endpoint to point to local validator * Removing unnecessary clone * More appropriate naming * Removed dead code * Lock file updates * Updated network monitor address in contract code * Don't stage node status api if network monitor is disabled * cargo fmt * Updated all license notices to SPDX |
||
|
|
973c30592f |
Use cached topology for clients (#674)
* Add validator-api common client * Call validator-api from different clients for gateway topology * Call validator-api from different clients for mixnode topology * Use consts for the validator-api queries * Rename the new query_validator function to query_validator_api * Add mut to mixnode validator client * Add refreshValidatorAPIGateways as a way to get the gateways... ... from validator-api * Add refreshValidatorAPIGateways as a way to get the mixnodes... ... from validator-api * Add yet another mut * Change the port to validator-api service when querying the topology * Add parsing check on the config phase... ... to make sure the validator URLs are in the correct format. * Fix another clippy error * Use all provided validators instead of just the first one * The mutable reference was not actually needed, so remove it * Use global variable for validator-api port * Use url crate for checking the format and changing the port * Use URL for parsing and move constants of validator-api to index.ts... ... until we find a way to link to the values from the validator-api crate. * Change global variables naming and have the API version into each API query * Revert the changes to the index on connect... ... as they were working correctly before. * Use all provided validators for mixnodes as well * Remove location and layer |
||
|
|
3aafe54887 | Remove mut where possible, parallel cache requests (#668) | ||
|
|
f08f19cd86 |
Rework validator client requests (#667)
* Rework validator-client to avoid &mut * Comment * More logging, sleep * Fix wasm build * My clippy missed this |
||
|
|
343c55f981 |
Validator API server (#665)
* Rocket main stub * Add anyhow * Stub cache reads and writes * Finalize stubs * Add generic Rocket.toml * Put back targets * Have cache own its validator client * allow dead code * Update rocket.toml for 0.5 |
||
|
|
2bdee705b7 |
Feature/total delegation field (#660)
* Changed bond Vec<Coin> into a Coin * Introduced total_delegation field to bond models * Restoring total old delegation * Updating total delegation on new delegations * Updating total delegation on removal * Keeping track of delegation increase during rewarding * Updating total delegation during rewarding + additional response attributes * Removed irrelevant tests * Fixed storage-related tests * Added additional test assertions for delegation increase * Added additional node rewarding test assertions * Tests for correct reward calculation + gateway rewarding early termination * Added delegation field to parsed node type * Updated typescript bond types * Moved `OLD_DELEGATIONS_CHUNK_SIZE` to file-wide namespace so that it could be used in tests * Tests for finding old node delegations * ibid. * Issue#657 * Additional test assertions regardingn total delegation * Missed test field after merge * ibid * Cleaning up storage related imports |
||
|
|
31f567f1ef |
Use thiserror for validator-client (#658)
* Use thiserror for validator-client * cargo fmt * Move comment * CI |
||
|
|
4e03759c0f |
Feature/cosmwasm 0.14.1 update (#653)
* Updated smart contract to work with future cosmwasm 0.14.0 update * Updated the rest of the codebase * Reordered imports * Missing imports * cargo fmt * More cargo fmt action * Introduced type alias for IdentityKey reference |
||
|
|
164c8ad05c |
Feature/reverse contract mapping (#640)
* WIP * One fewer todos * Migrated transactions,queries + query tests * Transaction-related tests restored * Import cleanup * Initial draft of the migration procedure * Future migration test * Fixed rust compilation errors * Unbonding no longer requires explicit identity * Delegation API changes * Fixed incorrect gateway delegation object |
||
|
|
29fd8b8805 |
Chore/clippy nightly fixes (#636)
* Removed needless borrow in upgrade args matches * Pathfinder needless borrows * cmp needless borrow * Network monitor needless borrows * Topology control needless borrows * Received buffer needless borrow * Key manager needless borrows * Network requester needless borrow * Gateway client needless borrow * Gateway requests needless borrow * Nymsphinx needless borrows * verloc needless borrows * Socks5 needless borrow * Clone on copy type |
||
|
|
82def1349f |
Feature/stats endpoint (#631)
* Idea for stats endpoint * Introduced /stats endpoint replacing sending data to metrics server * Removed metrics client * Removed old metrics file * cargo fmt |
||
|
|
50f65aa698 |
Feature/per layer count (#628)
* Initial struct * WIP * Added test for migration * unused import |