/rings

Rings is a structured peer-to-peer network implementation using WebRTC, Chord DHT, and full WebAssembly (WASM) support.

Primary LanguageRustGNU General Public License v3.0GPL-3.0

Rings Network

Rings Network

rings-node cargo docs GitHub

The Rings Network aimed at creating a fully decentralized network. It is built upon technologies such as WebRTC, WASM (WebAssembly), and Chord DHT (Distributed Hash Table), enabling direct connections between browsers.

Rings Network allows all traffic to bypass centralized infrastructures, achieving complete decentralization.

For more details you can check our Rings Whitepaper.

You can also visit Rings Network's homepage to get more project info.

And you can get more document here.

Features

Browser Native:

Utilizing WebRTC, a protocol designed for real-time communication, the Rings Network is fully compatible with browser environments. This capability is further enhanced by their full Rust implementation and web_sys based approach, enabling seamless, direct browser-to-browser communication.

Crypto Native:

A core aspect of the Rings Network is its support for various cryptographic algorithms, essential for DID (Decentralized Identifier) identification. This includes support for popular cryptographic standards like secp256k1, secp256r1, and ed25519, among others, providing robust security and identity verification mechanisms.

Struct P2P:

At the foundation of the Rings Network is the use of Chord DHT (Distributed Hash Table). This technology underpins the routing layer of the network, enabling efficient, scalable, and decentralized peer-to-peer connectivity. The use of Chord DHT ensures that the network can handle a large number of nodes while maintaining effective data retrieval and communication processes.

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-node.git
cd ./rings-node
cargo install --path .

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.wasm

Or build with wasm-pack

wasm-pack build --scope ringsnetwork -t web --no-default-features --features browser --features console_error_panic_hook

Usage

rings help

Resource

Resource Link Status
Rings Whitepaper Rings Whitepaper rings-ext-v2
Rings Documentation Rings Docs
Rings Browser Handshakes Example Rings Browser Handshakes Demo / PoC
Rings Browser Extension Rings Browser Extension Beta
Rings dWeb Demo Rings dWeb Demo rings-ext-v2
Rings zkProof Demo Rings zkProof Demo rings-snark-demo

Components:

  • core: The core implementation of rings network, including DHT and Swarm.

  • node: The implementation of Rings native, Rings browser, and Rings FFI provider.

  • rpc: The definition of Rings RPC protocol is here.

  • derive: Rings macros, including wasm_export macro.

  • transport: Rings Transport implementation, including native transport and web_sys based transport.

  • snark: Rings SNARK is based on fold scheme and zkSNARK

Architecture

The Rings Network architecture is streamlined into five distinct layers.

+-----------------------------------------------------------------------------------------+
|                                         RINGS                                           |
+-----------------------------------------------------------------------------------------+
|   Encrypted IM / Secret Sharing Storage / Distributed Content / Secret Data Exchange    |
+-----------------------------------------------------------------------------------------+
|                  SSSS                  |  Perdson Commitment/zkPod/ Secret Sharing      |
+-----------------------------------------------------------------------------------------+
|                     |       dDNS       |                 Sigma Protocol                 |
+      K-V Storage    +------------------+------------------------------------------------+
|                     |  Peer LOOKUP     |          MSRP        |  End-to-End Encryption  |
+----------------------------------------+------------------------------------------------+
|            Peer-to-Peer Network        |                                                |
|----------------------------------------+               DID / Resource ID                |
|                 Chord DHT              |                                                |
+----------------------------------------+------------------------------------------------+
|                Trickle SDP             |        ElGamal        | Persistence Storage    |
+----------------------------------------+-----------------------+------------------------+
|            STUN  | SDP  | ICE          |  Crosschain Binding   | Smart Contract Binding |
+----------------------------------------+------------------------------------------------+
|             SCTP | UDP | TCP           |             Finate Pubkey Group                |
+----------------------------------------+------------------------------------------------+
|   WASM Runtime    |                    |                                                |
+-------------------|  Operation System  |                   ECDSA                        |
|     Browser       |                    |                                                |
+-----------------------------------------------------------------------------------------+

Contributing

We welcome contributions to rings-node!

If you have a bug report or feature request, please open an issue on GitHub.

If you'd like to contribute code, please follow these steps:

    Fork the repository on GitHub.
    Create a new branch for your changes.
    Make your changes and commit them with descriptive commit messages.
    Push your changes to your fork.
    Create a pull request from your branch to the main repository.

We'll review your pull request as soon as we can, and we appreciate your contributions!

Ref:

  1. https://datatracker.ietf.org/doc/html/rfc5245

  2. https://datatracker.ietf.org/doc/html/draft-ietf-rtcweb-ip-handling-01

  3. https://datatracker.ietf.org/doc/html/rfc8831

  4. https://datatracker.ietf.org/doc/html/rfc8832