Expand description
§Rings Node (The node service of Rings Network)
Rings is a structured peer-to-peer network implementation using WebRTC, Chord algorithm, and full WebAssembly (WASM) support.
For protocol details, see the repository-owned Rings Whitepaper. For security assumptions, supported deployment models, and the Sybil-resistance boundary, see the repository threat model.
§Installation
You can install rings-node either from Cargo or from source.
§from cargo
To install rings-node from Cargo, run the following command:
cargo install rings-node§from source
To install rings-node from source, follow these steps:
git clone git@github.com:RingsNetwork/rings.git
cd ./rings
cargo install --path crates/node§Build for WebAssembly
To build Rings Network for WebAssembly, run the following commands:
cargo build --release --target wasm32-unknown-unknown --no-default-features --features browser
wasm-bindgen --out-dir pkg --target web ./target/wasm32-unknown-unknown/release/rings_node.wasmOr build with wasm-pack
wasm-pack build --scope ringsnetwork -t web --no-default-features --features browser --features console_error_panic_hook§Usage
rings <command> [options]§Commands
help: displays the usage information.init: creates a default configuration file named “config.toml” in the current directory. This file can be edited to customize the behavior of the rings-node daemon.run: runs the rings-node daemon. This command starts the daemon process, which will validate transactions, maintain the blockchain, and participate in consensus to earn rewards. By default, the daemon will use the “config.toml” file in the current directory for configuration. Use the “-c” or “–config” option to specify a custom configuration file.
§Options
-c, --config <FILE>: specifies a custom configuration file to use instead of the default “config.toml”. The configuration file is used to specify the network configuration, account settings, and other parameters that control the behavior of the rings-node daemon.-h, --help: displays the usage information.-V, --version: displays the version information for rings-node.
Modules§
- consts
- Shared protocol constants used by the node runtime.
- error
- A bunch of wrap errors.
- extension
- This module provide basic mechanism.
- logging
- Logging configuration contains both
nodeandbrowser. - measure
- Runtime adapter for the pure
rings-measurestate relation. - native
- Native-node configuration, CLI, and runtime adapters.
- onion
- Application-layer circuit directory and route selection.
- online
- Signed online-node descriptors stored in the DHT.
- prelude
- A prelude is provided which imports all the important data types and traits of ring-network.
- processor
- Processor of rings-node rpc server.
- provider
- General Provider, this module provide Provider implementation for FFI and WASM
- registration
- Node-layer DHT registration tasks.
- seed
- Seed and SeedLoader use for getting peers from endpoint.
- util
- Utilities for configuration and build.