abbf7041a4
* Initial draft for ClientsHandler * Created listener struct * typo * Stateful websocket connection handler * Exposing modules * Depdendencies updates * Moved listener to correct file + made start consume listener * Main starting new listener * Catching sigint * Copied client storage from provider into gateway * Exposed websocket listener type for nicer import path * Defined websocket message receiver concrete type * Client ledger struct without implementation * ClientsHandler using more concrete types * Mixnet sender + receiver and exposed listener type * Handling mix packets * Ability to forward mix packets * "starting" both listeners at main * Depedencies updates * Initial type definitions for client messages * Initial "gateway-requests" with AuthToken * ibid. * Restored most of ledger's functionalities * Ability to retrieve all messages regardless of rate limit * ClientsHandler request handling logic * Required 'new' dependencies * Main changes required for compilation * PacketProcessor getting private key pointer * "moved" types into gateway requests crate * Moved and renamed types * ibid. * Added required serde_json dependency * Skeleton for websocket request handling * helper methods on ServerResponse * WebSocket Handler pushing received mix messages directly to client * PacketForwarder returning JoinHandle alongside the channel * ClientsHandler following the same pattern * Made websocket listener start method consistent with mix listener * Syntax error + formatting * Websocket handler having access to mix forwarder * Minimal binary request parsing * Implicitly derived std::error::Error on GatewayRequestsError * Handling of all websocket requests * Types import cleanup * Updated placeholder fields * Everything put into main * Missing license notices * Cleaned up unused code * Copied and did initial minor changes to commands and config * It's actually gateway * Gateway sending its regular presence to directory server * Re-organisation of gateway code + Gateway struct * Updated provider argument description * Restored duplicate ip check without importing NymTopology trait * Moved hardcoded values into config * Cargo fmt * Compilation errors in other crates due to topology adjustments * Test fixes * Initial gateway-client * Seemingly working version with bunch of hardcoded and temporary values * cargo fmt * Removed provider poller * Updated config with gateway values instead of provider * Gateway address including ws * Removed hardcoded gateway address * Properly skipping loop cover messages * Updated log filter with tokio tungstenite related modules * Updated sphinx version used * Very minor cleanup * unused import
Nym Validator
The Nym Validator has several jobs:
- use Tendermint (v0.33.0) to maintain a total global ordering of incoming transactions
- rewards + stake slashing based quality of service measurements for mixnet nodes (aka "mixmining")
- generate Coconut credentials and ensure they're not double spent
- maintain a decentralized directory of all Nym nodes that have staked into the system
Some of these functions may be moved away to their own node types in the future, for example to increase scalability or performance. At the moment, we'd like to keep deployments simple, so they're all in the validator node.
Running the validator on your local machine
- Download and install Tendermint 0.32.7
tendermint initsets up Tendermint for usetendermint noderuns Tendermint. You'll get errors until you run the Nym validator, this is normal :).cp sample-configs/validator-config.toml.sample sample-configs/validator-config.tomlcargo run -- run --config ../sample-configs/validator-config.tomlbuilds the Nym Validator and runs it