4fcb98e839ddeec00a0301c70854f918a1d1dffb
52 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
f6a79ce7c3 |
Renaming validator-api to nym-api (#1863)
* Renaming validator-api to nym-api * nym-api: simplified crate name * Added nym-api rename to changelog * Changed some output messages * Renamed validator-api-requests to nym-api requests * Removing more references to validator-api-requests * Additional lockfile name changes after full build * Removing mistakenly added merge files * ibid * ibid * Getting rid of ref to validator_api deep inside validator-client * Fixing file storage paths * Renaming struct function names referring to validator_api * Simplifying struct init * Fixed up all other instances of nym_api. * Renaming validatorApi to nymApi in TypeScript client for consistency v * Found a few more Rust instances * Changed examples in TypeScript SDK * Found one more instance of the use of validator instead of nym apis * Aliasing config key name for deserialization to preserve compatibility with old configs |
||
|
|
2db1bc8efa |
Feature/dkg publish vk (#1747)
* Save to disk coconut keypair * Check verification keys of the other signers * Post verification key to chain * Add multisig propose/vote for vks * Execute the proposal * Parse announce address argument * Gateway uses chain data * Network requester uses chain data * Native&socks5 clients use chain data * Credential client signature uses chain data * Remove redundant api endpoints * Undo debugging logging * Fix some tests * Fix clippy * Fix wasm client and contract test * More contract clippy * Update CHANGELOG * Use a bigger expiry period then the testing one |
||
|
|
fea6f44a57 |
Feature/dkg (#1678)
* Port code without epoch and blacklisting Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com> * Add dkg contract to validator client Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com> * Introduce publisher Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com> * Fix mock testing client * Apply fmt to contract * Get data from attributes * Minor fixes * Fix wasm client * Add pem files for dkg keys * Save/load dkg keys in/from pem files * Get dealer old or fresh dealer index Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com> |
||
|
|
1f0d5f8ad0 |
Feature/vesting contract version query (#1726)
* Introduced vesting contract query for build information * Fixed import paths * Changelog |
||
|
|
a43d183b4f |
Feature/wasm client updates (#1673)
* Compiles but runtime time fails * wip * Beginning of clean-up - creation of config to keep things together * Removed unused module * Removed hardcoded constants * Easier way of sending binary messages * WIP cleanup before machine switch * Upgrade wasm-bindgen to 0.2.83 * Fixed compilation warnings for wasm client * all clients compiling without warnings * disabling topology refresh in wasm * Added a config option to disable loop cover traffic stream * config changes * Make webassembly work in a web worker - `wasm-timer` modified to work in web worker - add worker target to webpack - add client to call from HTML - update README to build WASM for bundling (this does not build ES modules) * Restored topology refreshing * correctly polling items in the wasm delay_queue * Allow client to read up to 8 messages at once from gateway connection (#1669) * Allow client to read up to 8 messages at once from gateway connection * Importing tokio::select in wasm32 target * Updated changelog * missing imports * Introduced disable_main_poisson_packet_distribution to force real_traffic_stream to disable poisson sending (#1664) * Introduced disable_main_poisson_packet_distribution to force real_traffic_stream to disable poisson sending * Updated changelog * Adjusting default settings * Introduced a client-configurable option to force it to use extended packet size * local adjustments * Removed warning associated with receiving extended packets * Minimal v2-required changes * Updated changelog * explicitly allowing clippy drop_non_drop Co-authored-by: Mark Sinclair <mmsinclair@gmail.com> |
||
|
|
ad547e516a |
Feature/fee grant (#1419)
* Temporarily point cosmrs to PR branch * Expose grant allowance in client * Move functions in coconut verifier * Do execute from gateway * Explicit fee payment by granter * Include revoke grant after finishing with the op * Gateway checks the proposal content before proceeding * Clippy fixes * CHANGELOG update |
||
|
|
0df801ab4e |
Feature/expose validator cosmos address (#1404)
* Move coconut validator api req out of coconut interface and expose a new cosmos-address endpoint * Finish cosmos address endpoint * Guard under coconut feature gateway & validator-api code * Update CHANGELOG |
||
|
|
62baada93d |
Feature/wallet delegation UI squashed (#1326)
* Delegation UI: Update QA vars fmt re-map coin type for qa add correct bech32 address as the network-explorer-api was complaining clean up fmt Delegation components Show delegation story on paper Remove actions header from delegations list Add copy to clipboard for delegation list node ids Move tooltip Modals Extract modal styles Fix exports Rewards summary and redeem modal Factor out simple modal Delegations actions modals: delegate, delegate more, undelegate Coin mark and move logo stories Rust types React components handle currency Form field to enter and display an Identity Key Fix up build order Update README Flat buttons End adornment Currency form field Add more props Export components Add currency and mixnode fields Group stories into folders and add flow Change exports from shared packages to stop webpack bundling issues Fix logo import Add mock for tauri api in storybook that shows a console error for operations that are not mocked Delegations views and routes for wallet Delegations list show pending delegations and undelegations wip - delegations page status Add typescript type checking to storybook webpack config and more mocks for tauri Add more interstitial states and confirmation modals Copy change Move config to inside source tree Fix up `Console` typings Add wrapper around Tauri `invoke` that logs operations in development mode wip wip wip ts-rs: remove old files ts-rs: update paths to `ts-packages/types` ts-rs: remove old files ts-rs: export new types to `ts-packages/types` Add `MajorCurrencyAmount` to convert to and from TS types for various backend currency types New crate `nym-types` to provide types for frontend apps (wallet, explorer, etc) wip update type imports and fix some lint errors update packages update type imports update type imports update type imports update type imports start pulling out use of minorMajor and majorMinor update type imports update import Add missing types generated by ts-rs fix types Adding denom to account type updates Handle micro currency denoms Fix type conversion mistake Add clean target eslint: formatting Update React currency components to use `MajorCurrencyAmount` Add separators and extra props to currency components replace currency mapper with denom returning from service Adjust type while generation is broken start integrating new CurrencyFormField component update balance and vesting on client change (not only client address) Fix up conversion from cosmwasm coin to major currency for minor denoms Fix up typings and validations to remove more `Coin` usage fix conflict fix delegations form start fixing validation type update remove console log tidy up remove more unused types remove more unused types Fix `Coin` denom to be `minor` Fix up to minor_cosmos_coin Fix up send Remove `Coin` type Fix up exported types start delegation UI more UI work close actions modal on action select update label fix old delegateion form minor updates undo change to currency in stringD Fix up types Add feature flag for generating typescript Generate types behind feature flag Use custom cli tool to export `ts-rs` types `ts-rs-cli` moves files into place and fix up `Makefile` Update generations target Add missing types for generation Generate typescript types reorder imports use make generate-typescript for new types + type import updates update types Add delegate with everything Add get block to nymd client More conversions Get a big list of delegations with lots of stuff Add `avg_uptime_percent` component api updates ui updates and fixes Add delegation history and pending events Fix up addition Fix up pending delegation event types Filter pending delegation events add history and pending events set total delegations rebase fix breaking type change on delegate page Fix mixnode mapping Add back refresh and set periodic refresh upgrade to react router 6 Add logging Export new types for gas and transactions increase container size! add sendtx type update onOK to return MAjorCurrencyAmount align table items display dash if amount not availble work on delegate and undelegate Make serializable More types Fix up errors align item icon type updates Add operation to get all pending delegation/undelegation events Fix up logging Add more logging Fix undelegate error get pending delegation events remove unused import * Fix rebase errors * Integrate fees changes: - make operations available as requests (typed with any for now, needs changing) - move `FeeDetails` to `common/types` - mock `getGasFee()` * get wallet balance after transactions * fix duplicate key * use token pool selector * update wording * Created nymd internal coin * spell delegations correctly! * Additional From implementations plus a constructor * try_add * Changed client API to use the new coin type * CoinConverter trait * Made wallet compilable with the recent changes * Simplified the API by removing the generics in favour of explicit Coin type * Fixed validator api * integrate modal divider with modal component * handle undelegation of locked tokens * only return events table if there are events * Fixed up tests and clippy * Refactored missed coin-generic API methods * changelog * refresh on network or client details change * Bunch of temporary workaround to have wallet working-ish * Add claim and compound wallet endpoints, proc_macro to generate execute and simulate * CHANGELOG * Sort CHANGELOG lines * PR comments * allow sorting of pending events * fix lint errors * handle page overflow * handle reedem and vesting redeem requests * set up compound rewards * refresh locked tokens on page load * remove old delegations pages + remove settings modal + update network explorer url * update validation for hostname (prevent leading spaces) * add compound success case * display est fee until new simulations are used * fix up coin validation * tommy fixes * Show app version at bottom of nav * Show admin page when account matches account id from `.env` file `ADMIN_ADDRESS` map. Value is fetch from GH Actions secrets at build time. * Update change log Co-authored-by: tommy <tommyvez@protonmail.com> Co-authored-by: Mark Sinclair <mmsinclair@gmail.com> Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com> Co-authored-by: durch <durch@users.noreply.github.com> |
||
|
|
c13d3ab15d |
Updated cosmwasm dependencies to 1.0.0 (#1318)
* Updated cosmwasm dependencies to 1.0.0 * changelog |
||
|
|
d8fed178aa |
Upgrade to tokio 1.19.1, tokio-util 0.7.3, tokio-stream 0.1.9, tokio-test 0.4.2 (#1305)
* Upgrade to tokio 1.19.1, tokio-util 0.7.3, tokio-stream 0.1.9, tokio-test 0.4.2 * Tokio-util 0.7.3 handle_done_delaying, handle_expired_ack_timer * Upgrade to tokio 1.19.1, tokio-util 0.7.3, tokio-stream 0.1.9, tokio-test 0.4.2 |
||
|
|
27a4a44717 |
Claim and compound reward wallet endpoints (#1302)
* Add claim and compound wallet endpoints, proc_macro to generate execute and simulate * CHANGELOG * Sort CHANGELOG lines * PR comments |
||
|
|
5f7b3db9a4 |
Feature/spend coconut (#1261)
* Add coconut verifier structure for coconut protocol in gateway * Add endpoint for validator-api cred verification * Remove unused signature field * Register new endpoint * Improve validator-api config handling * Aggregate verif result from all apis * Simplify aggregate functions * Verify cred on apis correctly * Introduced coconut bandwidth contract to validator client * Fix rebase double import * Fix clippy on non-coconut * Add multisig contract address to validator client * Refactor Credential struct * Do bincode magic in the coconut interface * Implement serialization for credential and remove bindcode * Fix clippy and don't remove dkg * Client release funds proposal * Add wrapper for blinded serial number Also compare theta with a blinded serial number (in base 58 form) for future double spend protection. * Only post blinded serial number to blockchain * Validator api propose credential spending * Fix wallet * Gateway calls proposal creation * Query for proposal in verify coconut * Remove db from git * Verify against proposal description * Validator apis vote based on verification of cred * Fix wallet fmt * Execute the release of funds * Fix translation between token and bytes * Update CHANGELOG |
||
|
|
177f1deefe |
Feature/gas simulation improvements (#1291)
* Updated cosmrs * Simpler fmt::Display for Operation * Adjusted GasPrice parsing test due to changes in Denom FromStr impl * Removed direct dependency on cosmrs in the wallet * Removed TryFrom<GasPrice> for Coin as it didn't make much sense * disgusting workaround for providing serde for fee * NymdError improvements * Ability to simulate "send" * Removed needless conversions * Changedi nterface to "normal" send to account for new fee * Removed outdated imports in tests * Removal of 'Operation' enum * Implemented simulate endpoints for all other txs |
||
|
|
046dd4cbba |
Bugfix/unique sphinx key (#1207)
* Cosmwasm beta6 => beta8 upgrade * Introducing additional unique index constraint on sphinx key * Unit test for checking for duplicate sphinx key * Fixed other unit tests due to changed constraint |
||
|
|
be4bc2bdcc |
Merge branch 'release/1.0.0-rc.1' into develop
Conflicts: validator-api/Cargo.toml |
||
|
|
d6c9d1d08d | Using fork of cosmrs with different address length validation | ||
|
|
c177f14073 | Using fork of cosmrs with different address length validation | ||
|
|
1cf101d50f | connection-tester: refine log statements | ||
|
|
df827b6b09 | validator-client: rework connection tester | ||
|
|
c2938e0672 |
Fix delegation paging (#1174)
* Fix delegation paging and tests * Circuit breaker, upgrade storage and cosmwasm * beta6 * Cleanup delegation events |
||
|
|
5dc57d2a3e | Fix type generation, upgrade ts-rs | ||
|
|
2caf79fba0 |
Feature/vesting get current period (#1111)
* Add GetCurrentPeriod Msg * Add a few more query endpoints * Enrich original vesting response |
||
|
|
fe33df723b |
Tag contract errors, and print out lines for easier QA (#1084)
* Tag contract errors, and print out lines for easier QA * Allow updating mixnet address by admin * Add reply endpoint, and unbond callback * Extract vesting messages * Wrap up |
||
|
|
c6e41ca3f3 |
Update to rust edition 2021 everywhere (#1086)
* chore: update to rust edition 2021 everywhere * validator-api: simplify into_iter call in rust 2021 |
||
|
|
fe6c685ab1 |
Feature/hourly set updates (#1012)
* Rename function/variables mixnodes->set * Stub utility interface * Rewarded set contract interface * Move epoch to common, epoch to contract * Move epoch to the chain * Rewarded set validator-api * [ci skip] Generate TS types * Epoch queries * Moved new code to a new module * Restored cosmwasm dependencies to their beta.3 versions for better compatibility with the rest of the codebase * Rewarded set write reorganisation * Stub for validator api module responsible for rewarded set updates * Reorganised validator api cache * Pending contract changes * Relevant updates to the validator client * Updating rewarded set based on contract state * Advancing/Setting current epoch in the contract * Using blocktime as 'now' at startup * Adjusted validator-api side rewarding code * Contract cleanup + query for epoch rewarded set heights * [ci skip] Generate TS types * Simplified rewarder processing loop and initial sync * [ci skip] Generate TS types * Fixed EXISTING query-related unit tests * Fixed existing unit tests for rewarding-related transactions * Cargo fmt * Removed some dead code * Using cosmwasm 1.0.0-beta3 for compatibility [with cw-storage-plus and rest of codebase] * Missing TryInto import * Additional storage and query related unit tests + a bug fix * Transaction-related unit tests + bug fixes * Required migration code * Update common/cosmwasm-smart-contracts/mixnet-contract/src/msg.rs Co-authored-by: Drazen Urch <drazen@urch.eu> * Update common/cosmwasm-smart-contracts/mixnet-contract/src/msg.rs Co-authored-by: Drazen Urch <drazen@urch.eu> * Constant renaming * Changed determining previous epoch return type to Option<Epoch> if they would precede the genesis * Exposed the new endpoint to the wallet * Epoch-related unit tests fixes * Recommended #[must_use] on next_epoch method * Renamed all epoch occurences to interval As they refer to the 'rewarding interval' Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com> Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com> |
||
|
|
6b3700aefe |
Feature/expanded events (#1015)
* Expanded emitted events for delegation-related transactions * Expanded emitted events for gateway-related transactions * Expanded emitted events for mixnode-related transactions * Expanded emitted events for settings update transaction * Expanded emitted events for rewarding-related transactions * Fixed attribute look up in tests * Making linter happier * Reorganised cosmwasm contract-related modules * Introduced similar event handling to the vesting contract |
||
|
|
e2e06df4e6 |
Feature/validator api client endpoints (#1024)
* Moved mixnode status route to node status api module * Introduced validator-api endpoint for estimating mixnode's reward * Stake saturation endpoint * kebab-cased coconut routes * Created separate crate for validator API models * Additional routes in validator API client * Introduced support for new queries in the wallet * Typescript type derivation * Fixed up date in license notice |
||
|
|
050d370396 | Updated cosmrs to 0.4.1 (#1023) | ||
|
|
614b99a36e |
Differentiate staking and ownership (#961)
* Differentiate staking and ownership * Ownership transfer, tests * Consistent random keys * Improve account tests * Update Cargo.lock * Make everybody happy Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com> |
||
|
|
f42f76901a |
Add VestingExecute and VestingQuery client traits (#944)
* Add VestingExecute and VestingQuery client traits * cover ed25519 verification * cargo fmt * `Unix` newline-style * Remove newline force Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com> |
||
|
|
aec0239d87 |
Removed reliance on cosmrs fork (#943)
* Removed reliance on cosmrs fork * Removed the accidental optional flag on cosmrs import in the wallet |
||
|
|
a04d4503b5 |
Feature/pre cosmrs updates (#935)
* Updated nymd client * Fixed contract upload and initialisation * Increased default contract upload fee * [ci skip] Generate TS types Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com> |
||
|
|
eb93b428cf |
Release/1.0.0 pre1 (#931)
* Upgraded code to be cosmwasm 1.0-beta.2 compatible (#923) * Upgraded code to be cosmwasm 1.0-beta.2 compatible * [ci skip] Generate TS types Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com> * Feature/cosmwasm plus storage (#924) * Upgraded code to be cosmwasm 1.0-beta.2 compatible * Added cw-storage-plus dependency * Experimentally replaced storage for config and layers with cw plus Item * The same for main mixnode storage * Usingn IndexedMap for mixnodes * Split delegations from mixnodes into separate module * MixnodeIndex on Addr directly * Moved namespace values to constants * Outdated comment * [ci skip] Generate TS types * Removed redundant identity index on mixnodes * IndexMap for gateways storage * Moved total delegation into a Map * Compiling contract code after delegation storage upgrades Tests dont compile yet and neither, I would assume, the client code * Delegation type cleanup * Client fixes * Migrated delegation tests + fixed them * Moved Rewarding Status to rewards * Reward pool * Rewarding status migrated * Made clippy happier * Added explorer API to default workspace members * Updated delegation types in explorer-api * Fixed tauri wallet Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com> * Vesting contract (#900) * Initial interface spec * .gitignore * Finalize implementation * Correct assumptions, use wasm_execute * Cleanup * Track delegation balance * Add delegation flow img * Proper messaging from the vesting side * Add proxy_address to RawDelegationData * Wrap up (un)delegation * Add proxy: Addr to MixNodeBond * Stub in bonding/unbonding * Migrate vesting to cosmwasm 1.0 * Rebase on top of 1.0.0-pre1 * Reimplement delegations tracking with a Map * Migrate to cw-storage-plus * Restructure code, add tests * Streamline contract code, as per review * Address review comments * Pre-merge rebase * Few more nits * Few more nits * Fix test * cargo fmt * Fix beta CI Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com> Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com> Co-authored-by: jstuczyn <jstuczyn@users.noreply.github.com> Co-authored-by: Drazen Urch <durch@users.noreply.guthub.com> |
||
|
|
c7007de1ea | Only use ts-rs in tests | ||
|
|
bd4c18c723 | Set MSRV on all binaries to 1.56 (#872) | ||
|
|
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> |
||
|
|
9a65e44166 |
Add Tauri wallet
-- Squashed commit of the following: commit |
||
|
|
219c45a352 |
Updated cosmos-sdk (#761)
* Updated cosmos-sdk * Re-exposing more things |
||
|
|
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. |
||
|
|
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) | ||
|
|
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 |
||
|
|
f08f19cd86 |
Rework validator client requests (#667)
* Rework validator-client to avoid &mut * Comment * More logging, sleep * Fix wasm build * My clippy missed this |
||
|
|
31f567f1ef |
Use thiserror for validator-client (#658)
* Use thiserror for validator-client * cargo fmt * Move comment * CI |
||
|
|
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 |
||
|
|
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 |