Skip to content

rsnano-node/rsnano-node

 
 

Logo

Unit Tests codecov Discord

What is RsNano?

RsNano is a full Nano node written in Rust.

What is Nano?

Nano is a digital payment protocol designed to be accessible and lightweight, with a focus on removing inefficiencies present in other cryptocurrencies. With ultrafast transactions and zero fees on a secure, green and decentralized network, this makes Nano ideal for everyday transactions.

Links & Resources

Installation

Option 1: Run the official docker image

docker run -p 7075:7075 -v ~/Nano:/root/Nano simpago/rsnano:V2.0 --network=live node run

Option 2: Build your own docker image

docker build -f tools/scripts/docker/node/Dockerfile -t rsnano-node https://github.com/simpago/rsnano-node.git#releases/v2

docker run -p 7075:7075 -v ~/Nano:/root/Nano rsnano-node:latest --network=live node run

Option 3: Build from source

Currently you can only build RsNano on Linux and on Mac.

To just build and run the rsnano_node:

git clone https://github.com/simpago/rsnano-node.git
git switch releases/v2
cd rsnano-node/main
cargo build --release
cargo run --release -- --network=live node run

To install and run the rsnano_node executable:

git clone https://github.com/simpago/rsnano-node.git
git switch releases/v2
cd rsnano-node
cargo install --path main
rsnano_node --network=live node run

Running it with a GUI

You can even run an RsNano node with a GUI that looks like this: RsNano Insight App

Run these commands:

cd rsnano-node/tools/insight
cargo run --release

Contact us

We want to hear about any trouble, success, delight, or pain you experience when using RsNano. Let us know by filing an issue, or joining us on Discord.

The codebase

Have a look at the AI generated documentation of the codebase.

The Rust code is structured according to A-frame architecture and is built with nullable infrastructure. This design and testing approach is extensively documented on James Shore's website

Watch James Shore's presentation of nullables on YouTube: Testing Without Mocks - James Shore | Craft Conference 2024

The following diagram shows how the crates are organized. The crates will be split up more when the codebase grows.

crate diagram

  • main: The node executable.
  • daemon: Starts the node and optionally the RPC server.
  • node:The node implementation.
  • rpc_server: Implemenation of the RPC server.
  • websocket_server: Implemenation of the websocket server.
  • wallet: Wallet implementation. It manages multiple wallets which can each have multiple accounts.
  • ledger: Ledger implementation. It is responsible for the consinstency of the data stores.
  • store_lmdb: LMDB implementation of the data stores.
  • messages: Message types that nodes use for communication.
  • network: Manage outbound/inbound TCP channels to/from other nodes.
  • work: Proof of work generation via CPU or GPU
  • types: Contains the basic types like BlockHash, Account, KeyPair,...
  • utils: Contains utilities like stats
  • nullables: Nullable wrappers for infrastructure libraries.

About

RsNano is a Rust port of nano-node

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 99.9%
  • Other 0.1%