Skip to content

renlabs-dev/torus-substrate

Repository files navigation

Torus Network Node

Torus is a self-assembling and evolving peer-to-peer blockchain organism, with a stake-driven network built in Rust with the Substrate framework. Torus powers an innovative ecosystem of agents and incentives, incorporating diverse technologies into its collective body.

Quick start

TODO

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:

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

Then install protoc:

# on Ubuntu
sudo apt install protobuf-compiler

Building and running the node

cargo build -p torus-node --release

To run a node connected to the Torus testnet:

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

Docker

mkdir -p torus-node
cd torus-node
wget https://raw.githubusercontent.com/renlabs-dev/torus-substrate/refs/heads/main/docker-compose.yml -O docker-compose.yml
docker compose up -d

The node RPC port defaults to 9944, so to connect to it locally you can just use localhost: ws://localhost:9944

If deployed on a remote machine (not recomended without setting up a reverse proxy like Traefik and having SSL enabled), replace localhost with the VM public ipv4 address, like the below examble ws://123.123.123.123:9944

Development

Check your code with:

cargo clippy

Run all tests with:

cargo test

Running a local dev node:

cargo xtask run local --alice