validator-hacking
52 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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> |
||
|
|
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> |
||
|
|
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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
50f65aa698 |
Feature/per layer count (#628)
* Initial struct * WIP * Added test for migration * unused import |
||
|
|
ea62d01e65 |
Feature/updated network monitor (#604)
* Connecting to gateway with a timeout * Added address value to InvalidAddress error * Initial updated network monitor (does not submit results yet) * Created client for node status api * Changed default address to the local one * Removed old validator client * Renamed validator client rest to validator client * Print conversion warnings using Display rather than Debug formattingn * WIP for adding owner field in monitor * Preserving changes before branch switch * Keeping track of node owners during monitoring + using those for node status api * Removed temporary log statement * Dont notify node status api if good nodes are broken * Changed default monitor interval to 5min * Post merge issues * Allowing dead version field in seocksrequest * Updated monitor run interval to 15min * Reporting gateways and mixnodes separately with the new api * Unused imports * Decreased testing interval to temporarily bypass the silent timeout issue * Formattingn |
||
|
|
596bc76cc6 |
Chore/dependency updates (#549)
* Updated all non-breaking dependencies * Updated common/crypto dependencies * Updated all tokio [and associated] dependencies to most recent version * Bumped version of rand_distr * Fixed api changes in tests * Made clippy happier about the acronym * Fixed the type while trying to make clippy even happier * nightly cargo fmt |
||
|
|
9e0bb80163 |
Feature/topology conversion (#536)
* Removed reputation field from existing topology * ibid for registration time * Basic bond to topology conversion * Made existing tests compilable * Added owner and stake fields to mix and gateway topology entries * Moved node conversion to topology crate * Added mixnet contract field to clients configs * topology refresher trying to use new validator * Removed clients depepdency on the old validator client * Removed mixnode dependency on the old validator client * Removed gateway dependency on the old validator client * Removed location field fron mixnode and gateway configs * Removed incentives address from mixnodes and gateways * Cargo.lock changes * Ignoring clippy warnings originating from codegen from JsonSchema * no longer formating string with a literal |
||
|
|
4ca40fd3bc |
Feature/initial mixnet contract (#515)
* Starting on cosmwasm smart contracts * Mixnet contract now builds * Removing license and notice files, the monorepo already has these. * Removing generated README content * Simplified development instructions a bit. * Converted some network monitor files to use SPDX license headers * Renamed packaget to mixnet-contracts * Depending on the Nym topology crate * Renaming contract package in usage * Renamed "announce" to "register_node" in the defined messages * Fixed package name for mixnet contracts in defined release annotations * Added the mixnet contracts to the Cargo lock file * Renamed some fields in our contract topology * Using the stringy mixnode from the validator client. * Removing mix nodes count from state, we can infer that * Saving generated code in comment as it's a useful example for now * Renamed "count" to "get_topology" * Adding the beginnings of a validator client (in Typescript) * Starting to integrate example code. WIP. * Ignoring generated accounts * Making a few less mixnodes :) * Adding shebang to start script * Cranking up the Nym-related gas limits, as otherwise contract upload fails. * Simplest mixnode example is now working * Removing the external client code, it messed up wasm compilation. Will copy/paste for now. * Contract now wants to add a MixNode rather than an IP string * Adding mixnodes via contract now works (!) * Simplified mixnode registration example * Further mixnode-adding simplification. * Adding author name * Fixed description * Sent funds are now required to bond a mixnode * Ensuring that we send correct coin denomination * Unbonding now works (!). Quite primitivist. * Checking that unbonding works from the client. * Setting up a thief account to play with * Checking to see whether thief can unbond a node (it fails, happily) * Adding a more specific error for when an account attempts to unbond but owns no bonds * Figured out how to test contract balances * Set the console messages to explain things a little more nicely * Tests for insufficient funds result * Using more async in driver example * Added a bit more explanation of the actions taken by the driver example * Locking down wasm instantiate a bit more * Docs clarifications on how to run example * README clarification * Corrected the commit hash in the wasmd build command, it was still set for 0.14.0 * Moved models from types into state * Starting work on range queries * whitespace * Going back to slow but reliabel node uploads and disabling new contract upload * Cranking gas fees temporarily * Mixnode key retrieval working and tested * Range retrievals now working well * Removing unused clone * Compressing tests a bit * Testing node retrieval on large numbers of nodes. Not sure whether MockStorage has the same space limitations as production storage does. * Getting rid of spelling warning * Removing unused responses * Minor cleanup * Starting to map my way out of the tuples * Slightly more meaningful variable names * Returning a StdResult from nodes query * Fighting through the unwraps :) * Unfucking a bit more * Starting to use ranged nodes in contract * Testing node retrieval from range store * Ditching generated tests * Adding works, still need to test removing mixnodes * Attempting to remove a mixnode returns an error when no nodes exist * Un-registering when no accounts exist (edit) * un-registering someone else's mixnode fails * Ensuring proper ownership * Testing for only 1 mixnode getting deleted * Testing single-node retrieval * Removing mixnode working * Removed unused imports and unused variable warnings * Made handler functions private * Tested for error response on mixnode removal * Ensured proper post-state on mixnode removal * Using Vec<Coin> for currency equality comparisons * Removed todo, this amount is only for logging purposes anyway * Refactoring tests a bit * Adding a few storytelling comments * Putting helper methods into alphabetical order * Drying up mixnode adding in tests * Using the new add_mixnode helper * Checking full object equality in test * Removing the GetNodes handler * Taking a more "storytelling" approach to the contract tests * We need a few more methods to run our example driver * We now need to make a new address for each node we want to have, as each sending account can only have one node * HumanAddr not needed * Making call sequence a little more readable * Added the results of today's experiments with the REST API to the validator client readme * Corrected console.log message * Adding a note about how to run tests * More contract exercising fun * Updating mocha * Whitespace * Adding a note about running tests * Adding typed rest client * Starting to mess with typescript paging client * Removing the rest client, we'll use the cosmjs one for this * Noting a few more contract requirements * Starting client restructuring * Importing cosmjs stargate client * Starting to work on the chain cache * Cleanup * Removing type annotations which hilariously worked, confusing the compiler * Might as well do each cache individually * Renaming chaincache so that it handles only mixnodes * Renaming chaincache * Setting dynamic per-page value to ease testing * Using perPage in tests * Moving tests back into their own special home so they don't bloat our package * Ignoring generated docs * Adding TypeDoc documentation generator * Removing unused NetClient import * Added docs generation * Noting existence of docs generation * Starting to test paged responses * Working paging tests * Clarified test names a bit * Removed console.logs * Added a test for two full pages. * Formatting * Starting to query for mix nodes * Removed the topology in preparation for paging * Removing unused struct * Getting ready for series-based paging * We're now setting page size limits on list retrievals * Pagination starting to work, needs more testing * Moved test support stuff into its own home * Removing duplicate testy code * Testing all paging stuff in the contract * Removed useless method duplicate * Moving queries into their own file * Removing redundant tests * Testing default paging limit * Testing max paging limit * We don't need to c/p pagination stuff from the cw-plus contracts, removing * Testing pagination * Making next key calculation explict via a function * Removing temporary variable * Commenting final state * Incorporating the PagedResponse * On the road to a working TypeScript client * Adding some logging utilities * Paged retrieval working but needs improvement - it's very brittle * Getting the loop right * Removing unused logger * Setting up a request count * Documenting the ins and outs of the client network interface * Removing requestCount as we're not using it yet * Success! Making paginated requests for mixnodes! * Differentiating between MixNode and MixNodeBond * Checking that Fred can upload a mixnode * Fixing export * Adding the ability for client to get balances * Docs fix * Converting interfaces to types * Changing `mixNodes()` to `getMixNodes()` on client * We might as well return the nodes we've just retrieved when we refresh * Starting work on unbonding * Fixed a caching bug which was causing multiple result sets to be cached * Using the sender address as the key for removal * Importing some result stuff so we can find out what happened on execution * Minor messing around to prove that the sequence fully works * Displaying a nicer message on mixnode unbond * Renamed announce to bond in validator client * Fixed unstable clippy warnings * Removing commented fields * Comment spacing * Changed announce to bond in example code * Making the test accounts directory configurable * Rebuilt * Loading keys from the local ./accounts directory * Ignoring contract lockfile * Saving out a contract lockfile so things continue working after contract upload * Splitting the driver example into smaller self-contained examples * Deleting the example that Andrew hates so much * Making dependabot happy * Stricter equals * Removing unused import |
||
|
|
83753af944 |
Running CI also on windows and macOS (#512)
* Running CI also on windows and macOS * Rust 2021 formatting * clippy::upper_case_acronyms where appropriate * Allowing unknown clippy lints * Further clippy updates * Building wasm client during CI * wasm actions update * added working directory to cargo jobs * Temporarily disabled wasm test and clippy |
||
|
|
c67e0fee37 |
More human-readable errors on mixnode/gateway startup (#503)
* More human-readable errors on mixnode/gateway startup * Missing dots * Fixed comment moved to incorrect line during formatting |
||
|
|
9cd463b22c |
Feature/gateway monitoring (#499)
* ability to read from multiple gateway clients * A very initial updated network monitor * Summary producer printing report on each finished run * fixed gateway startup issue * initial cleanup pass * Sending to gateways at specified rate * Renaming * Fixed first run interval * Removed false positive error print * Ability to use 'good' topology that is different from the one being tested * Fixed clippy warnings |
||
|
|
2d3b4f4b91 |
Feature/GitHub actions and clippy cleanup (#493)
* Added github actions templates * removed travis .yml file * initial clippy cleanup pass * fixed the rest of clippy warnings * Made github badges more fancy and consistent with the ones in sphinx * Updated local rustc version and removed compilation warningns * ... and fresh clippy warnings * formatting * beta clippy specific warnings fixed * Fixed all nightly clippy warnings * Fixed trying to unwrap a () * Actually running all tests * Correctly passing the --all flag * Hopefullly third time's a charm in fixing argument passing |
||
|
|
08cb39d0af |
Feature/slowed down network monitor (#461)
* Variable gateway sending rate * Changed interval ticker to delay * Extra comment * Performing delay after test run * Minor adjustements * Decreased sending rate * minor optimization in case of single packet to send. |
||
|
|
69eefaf91f | Fixed bunch of clippy warnings (#427) | ||
|
|
a91b2dcafc | Updated validator topology (#420) | ||
|
|
7c04a10545 | Added option to set incentives address during mix and gateway init (#419) | ||
|
|
0f0a428142 |
Feature/validator api update (#402)
* Updated validator API routes * missing comment |