fb74d243d55eeadb72fcc4e91b8e4f554196005b
15 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c43dbf6f4d |
Feature/remove deprecated routes (#1642)
* Removed deprecated routes in validator-api * Removed deprecated routes in explorer-api |
||
|
|
136666d759 |
Feature/rewarding revamp (#1472)
* Query for node stake saturation * Queries for currently pending events * Rewarded set query * Moved ContractState to common types since it's being returned as a result of one of the queries on the mixnet contract and thus it needs to be accessible outside the contract itself * Cleaend up storage initialisation * started restoring unit tests * Removed attached 1ucoin for cross-contract execute msgs * wip * query for rewarding details of a mix node * Changes for mixnodes and gateways * Furher progress on v2 changelog(-ish) description * wip * first version of the description * mixnode bonding queries tests and fixes * ibid for storage * MixnodeEventType enum + created events for missing mixnode txs * tests for adding new mixnode * Additional mixnode-related tests + bug fixes * Display for Percent * Bunch of tests for try_reward_mixnode * More tests and fixes * ibid * tests for updating rewarding params + important bug fix * Started removing unused imports * rewarding queries tests + undelegation bugfix * A lot of todo()-ing and commenting out unimplemented code * implements https://github.com/nymtech/team-core/issues/113 * Delegation tests + fixes * Emiting events by top level interval txs + incorporating limit * question * Missing events emissions * removed some code duplication * wip * pending delegation tests * Vesting contract update * More tests (and fixes) for pending events txs * Restored gateway tx tests * Another cleanup iteration * removed redundant comment * Unit tests, fixes and simplifcations for interval-related txs * Unit tests for helper functions * Interval queries unit tests * Test for correct contract initialisation * Another round of cleanup * Work on mixnet_query_client trait * mixnet_signing_client trait * Removed redundant methods * Slowly restoring validator client functionality * Added deprecated query for mix details by identity * wip restoration of validator-api * Work on deprecating validator API routes * Further validator-api routes * Restored rest of status api routes * Resolved all todos in ValidatorApiStorage There's still bunch left in StorageManager though * Changed NodeId from u64 to u32 * Updating sql code * Network monitor internals * Changed behaviour of full_epoch_id and updated epoch operations * Fixed sql queries * [most likely] finished updating rest of the validator API * Post rebasing fixes * Feature/rewarding revamp explorer api changes (#1511) * Changed cache to allow for non-string keys * Helper method for best-effort conversion of pubkey to nodeid * Updated validator-api client routes * Updated routes to use mix-id indexing * Introduction of deprecated routes callable by identity key * Fixed mixnode compatibility by changing read node details fields (#1512) * Fixed bond to topology conversion for client compatibility (#1513) * Updated 'verify_gateway_owner' to use correct nymd_client method for obtaining gateway details (#1515) * Updated constructor for ValidatorCacheInner * Fixed wasm client topology construction * Run cargo fmt on the entire codebase * Feature/rewarding revamp wallet backend changes (#1529) * Updated mixnode-related ts types * Updated nym-wallet-types * Updated 'get_contract_settings' and commented out code of other tauri commands * 'update_contract_settings' * 'bond_gateway' * unbond_gateway' * Utility commands for the transition period * 'bond_mixnode' * 'unbond_mixnode' * Ability to update mixnode cost paramaters * Mixnode config update * Updated mixnode_bond_details It also returns a different underlying type now * Updated 'gateway_bond_details' * Obtaining pending operator rewards * Improved way of obtaining number of mixnode delegators * simplified error handling in 'fetch_mix_node_description' * mixnode and gateway ownership queries * updated get_number_of_mixnode_delegators to use mix_id since we have the conversion utils helper * mixnode delegation * undelegating * Obtaining pending delegator rewards * Command for obtaining current interval details * Queries to handle paging for pending events * Additional level of indirection to pending events to incorporate event id into response * Wallet compatible pending event types * Commands fo obtaining pending events * Re-implemented pending delegation events * Further work on delegation * Removed unused imports * Commands for withdrawing rewards * Admin-related simulations * mixnet-related simulation commands * Validator-api related routes * Bond-related vesting operations * Vesting simulations * Vesting handler for UpdateMixnodeCostParams * Vesting reward claiming * Vesting queries * claim_locked_and_unlocked_delegator_reward * The massive delegation query * cleanup * updated typescript requests * sorted the new type exports in ts-rs-cli * Regenerated typescript types * temporarily ignoring unreachable code in vesting migration * Updated missed test fixture * Fixed missing coconut-specific import * cargo fmt * Exporting reward-related types * utility to convert stringified decimal to cosmjs Decimal * deriving Eq alongside PartialEq * wip - typescript fixes * using default operating cost when bonding mixnode * Using default operating cost when updating mixnode cost params * most delegation fixes * Wrapping delegation with node identity * Added MultiIndex on owner and identity key to unbonded mixnodes * Support for queries for unbonded nodes by owner or by identity key * Cargo fmt + ts types update * feature locking unused imports * fix(nym-wallet): typing and error (#1548) * post-rebase fixes * Changed storage key for new delegations map in vesting contract * fix(wallet): typing issues (#1562) * fix(wallet): error UI feedback (#1565) * clean(wallet): remove useless files (with flamethrowers 🔥) (#1567) * Changed default_mixnode_cost_params to allow accepting f32 instead * Revert "Changed default_mixnode_cost_params to allow accepting f32 instead" This reverts commit |
||
|
|
8c8b7d71d0 |
validator-api: create node status cache with selection probabilies (#1547)
* validator-api: create node status cache with selection probabilies Create a node status cache to complement the contract cache. Initially we store the simulated active set selection probabilities. * validator-api: add validator cache watch channel * changelog: add note * validator-api: clippy fixes * validator-api: fix clippy * validator-api: additional fields to inclusion probabilities response * selection chance: revert back to 3 buckets * selection chance: revert buckets again * rustfmt * validator-api: remove the old get_mixnode_inclusion_probability * node-status-cache: return error when refreshing * inclusion-simulator: cap on wall clock time * node status cache: tidy |
||
|
|
bfcc49ab78 |
validator-api: parametrized node reward endpoint (#1400)
* validator-api: initial work on compute reward endpoint * validator-api: dedup and clean up * cargo.lock |
||
|
|
188a7ec91d |
validator-api: reenable swagger openapi (#1249)
* validator-api: reenable swagger openapi * rustfmt * validator-api: rename openapi tag to status |
||
|
|
139e89643c | Endpoints for average mixnode uptime (#1238) | ||
|
|
c77ccddcb3 |
Add swagger for validator-api (#1239)
* validator-api: add swagger openapi * Lock file |
||
|
|
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> |
||
|
|
29340ed00c |
Feature/additional mixnode endpoints (#1019)
* Moved mixnode status route to node status api module * Introduced validator-api endpoint for estimating mixnode's reward * Stake saturation endpoint |
||
|
|
8bcc931d9b |
Feature/removal of monitor good nodes (#833)
* Removed separated ipv4 and ipv6 testing * Testing network using chosen core nodes This should have probably been like 20 independent commits... sorry... * SQL migrations for updated schema * SQL updates * Using absolute uptime directly * New uptime calculations * Config entries, more DB work, some cleanup * Additional API query routes * More SQL and API work * Changed `_` to `-` in new routes * Removed good topology from config * Fixed gateways reader yield condition * Initial gateways pinger * Minor cleanup and logging level decreases * Missing trait derivations * Further logging adjustments * Unused commented out import * Claiming additional bandwidth in coconut feature when low * Fixed build with coconut feature * Minimum number of test routes * Making beta/nightly clippy happier |
||
|
|
cdb21f418b |
Made daily uptime calculation be independent of epoch rewarding (#860)
* Made daily uptime calculation be independent of epoch rewarding It was moved into a separate timer * Don't lookup active gateways during rewarding |
||
|
|
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 |
||
|
|
c81454e00b | Validator API storage fixes and adjustments | ||
|
|
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 |
||
|
|
b30f11ed7a | Rename network-monitor (#662) |