c4bd5e04a53cf00a42b20e0841228a4ee8dba22e
92 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
22a4b03ce6 | Initial analysis | ||
|
|
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 |
||
|
|
ed489149dc |
Feature/network monitor gateway pings (#608)
* Ability to send Ping frame to gateway * Sending ping frame to gateways every 1min * Increased monitor run interval back to 15min * Whitespace |
||
|
|
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 |
||
|
|
7dc4d653c2 |
Feature/add rocket (#600)
* Added rocket at a git tag * Adding Rocket to the mixnode * Verloc route now in place * Adding an http api startup notification * Updated version number to 0.10.1-dev * Fixing clippy warnings * Compressing split a bit * Adjusted used version of js-sys Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com> |
||
|
|
a521bc0f54 |
Logging adjustment (#585)
* Reduced severity of common harmless warnings * Changed the same ip node warning * More explicit error on network address binding failure |
||
|
|
e8e966b67a |
Feature/multiple validator endpoints (#583)
* Rust half done * Removed the temporary 'test' * Using multiple validator endpoints in the javascript client * Dont attempt any switches with a single validator endpoint * Removed the unused temporary function * Updated validator-client version |
||
|
|
037723eb90 | Impl Error trait for ValidatorClientError (#587) | ||
|
|
d432bebce8 |
Minor cosmetic changes while reading around (#568)
* Simplify some Option / Result / ? operator patterns ... when they have a direct combinator equivalent. Tool-aided by [comby-rust](https://github.com/huitseeker/comby-rust) * Remove panic in socket state |
||
|
|
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 |
||
|
|
67c92b3e56 |
Feature/validator client rust (#532)
* Moved definition of mixnet contract common items to separate module * Removed schemars dependency from being wasm32 specific * Moved query responses to the shared module * Fixed tests due to differerent import paths * Updated dashmap in other crates to help with once_cell version selection * Reexporting coin and humanaddr * Deserializing response from validator * Deserializing smart result directly to specific type * Ability to query for mixnodes and gateways from rust * Fixed compilation warning due to updated dashmap |
||
|
|
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 |