e4a20f9cf53ce4033b4c1d3f446ddb4cef32a8de
Add complete simulation engine that compares old (24h cache-based) vs new (1h route-based) reward calculation methodologies with full integration into epoch operations. Core Simulation Engine: - Add SimulationCoordinator with configurable time windows and comparison settings - Implement dual calculation methods with proper Performance type conversions - Add comprehensive error handling with DatabaseError variant in RewardingError - Store simulation results in database with proper relationship constraints Old Method Implementation (24h Cache-Based): - Wrap existing reliability calculation using get_all_avg_mix_reliability_in_last_24hr() - Convert reliability percentages to Performance types using from_percentage_value() - Maintain exact same logic as production for accurate baseline comparison - Generate simulation data structures with proper metadata New Method Implementation (1h Route-Based): - Leverage calculate_corrected_node_reliabilities_for_interval() for route analysis - Support configurable time windows (default 1 hour vs 24 hours) - Provide detailed route statistics including success rates and failure analysis - Convert route reliability data to Performance types with naive_try_from_f64() Epoch Operations Integration: - Extend EpochAdvancer struct with optional SimulationConfig field - Update constructor and start method to accept simulation configuration - Add simulation trigger in perform_epoch_operations() before real rewarding - Ensure simulation failures don't break epoch advancement process CLI Integration: - Update run.rs to handle both --enable-rewarding and --simulate-rewarding modes - Create SimulationConfig from rewarding.debug configuration settings - Implement mutual exclusivity between real rewarding and simulation mode - Skip permission checks for simulation-only mode (no blockchain transactions) The simulation system runs in parallel with epoch operations, storing comparative data for analysis without affecting production reward distribution.
The Nym Privacy Platform
The platform is composed of multiple Rust crates. Top-level executable binary crates include:
nym-node- a tool for running a node within the Nym network. Nym Nodes containing functionality such asmixnode,entry-gatewayandexit-gatewayare fundamental components of Nym Mixnet architecture. Nym Nodes are ran by decentralised node operators. Read more aboutnym-nodein Operators Guide documentation. Network functionality ofnym-node(labeled with--modeflag) can be:mixnode- shuffles Sphinx packets together to provide privacy against network-level attackers.gateway- acts sort of like a mailbox for mixnet messages, which removes the need for direct delivery to potentially offline or firewalled devices. Gateways can be further categorized asentry-gatewayandexit-gateway. The latter has an extra embedded IP packet router and Network requester to route data to the internet.
nym-client- an executable which you can build into your own applications. Use it for interacting with Nym nodes.nym-socks5-client- a Socks5 proxy you can run on your machine and use with existing applications.nym-explorer- a (projected) block explorer and (existing) mixnet viewer.nym-wallet- a desktop wallet implemented using the Tauri) framework.nym-cli- a tool for interacting with the network from the CLI.
┌─►mix──┐ mix mix
│ │
Entry │ │ Exit
client ───► Gateway ──┘ mix │ mix ┌─►mix ───► Gateway ───► internet
│ │
│ │
mix └─►mix──┘ mix
Building
- Platform build instructions are available on Nym Operators Guide documentation.
- Wallet build instructions are available here.
Developing
References for developers:
Developer chat
You can chat to us in the #dev channel on Matrix or on the Nym Forum.
Tokenomics & Rewards
Nym network economic incentives, operator and validator rewards, and scalability of the network are determined according to the principles laid out in the section 6 of Nym Whitepaper. Initial reward pool is set to 250 million Nym, making the circulating supply 750 million Nym.
Licensing and copyright information
This is a monorepo and components that make up Nym as a system are licensed individually, so for accurate information, please check individual files.
As a general approach, licensing is as follows this pattern:
- applications and binaries are GPLv3
- libraries and components are Apache 2.0 or MIT
- documentation is Apache 2.0 or CC0-1.0
Nym Node Operators and Validators Terms and Conditions can be found here.
Getting Started
yarn install
yarn build
Description
Nym provides strong network-level privacy against sophisticated end-to-end attackers, and anonymous transactions using blinded, re-randomizable, decentralized credentials.
Readme
377 MiB
Languages
Rust
65.9%
JavaScript
22.1%
TypeScript
9.1%
Shell
0.9%
Python
0.6%
Other
1.2%