Skip to content

Running the chain

This guide explains how to set up and run a local Torus Substrate node, noting that its storage may differ slightly from the mainnet.

Building from source

Dependencies

The recommended way to install dependencies is using Nix.

If you don’t want to use Nix, you should have the following dependencies:

You can install Rust using Rustup:

Terminal window
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then install protoc:

Terminal window
# on Ubuntu
sudo apt install protobuf-compiler

Building and running the node

Terminal window
cargo build -p torus-node --release

To run a node connected to the Torus testnet:

Terminal window
cargo run --bin torus-node --release -- --chain data/testnet/spec.json

Docker

TODO

Development

Check your code with:

Terminal window
cargo clippy

Run all tests with:

Terminal window
cargo test

Running a local dev node:

Terminal window
cargo xtask run local --alice

Additional Information

  • The --alice and --bob flags are used to run predefined validator nodes.
  • You can customize your node’s configuration by modifying the appropriate files in the project.