Run a TSN Node

Join the network in minutes. Choose your role and start contributing to the post-quantum blockchain.

Hardware Requirements

Minimum specifications per node role. SSD storage is strongly recommended for all roles.

Role CPU RAM Disk Network
Miner 4+ cores 8 GB+ 100 GB SSD 100 Mbps
Relay 2+ cores 4 GB+ 200 GB SSD 100 Mbps
Light Client 1 core 1 GB 1 GB 10 Mbps

Quick Start

Get a node running in under 5 minutes. Requires Rust toolchain (1.75+).

wallet setup
# Step 0: Create your wallet first
./tsn new-wallet --output wallet.json
# ⚠ Write down the 24-word seed phrase! It is the ONLY way to restore your wallet.
# To restore a wallet from seed phrase:
./tsn restore-wallet --seed "word1 word2 ... word24" --output wallet.json
terminal
# Clone the repository
git clone https://github.com/trusts-stack-network/trust-stack-network.git
cd trust-stack-network

# Build from source (Rust required)
cargo build --release

# Run as miner (default)
./target/release/tsn --role miner --port 9333

# Run as relay
./target/release/tsn --role relay --port 9333 --seeds "seed1.tsnchain.com:9333,seed2.tsnchain.com:9333"
# Run as light client
./target/release/tsn --role light --port 9333

Configuration

All node settings are passed as CLI flags. No config file needed.

--role {miner|relay|light} Node role. Determines behavior, resource usage, and reward eligibility.
--port 9333 P2P listening port for peer connections.
--rpc-port 3030 HTTP RPC API port for local queries and transaction submission.
--seeds "addr:port,..." Comma-separated list of seed nodes for initial peer discovery.
--data-dir /path/to/data Directory for blockchain data, keys, and state. Defaults to ~/.tsn/.
--log-level {info|debug|trace} Log verbosity level. Use debug for troubleshooting.
--max-peers 50 Maximum number of simultaneous peer connections.
--mining-threads 4 Number of CPU threads dedicated to mining (miner role only).

Mining

TSN uses MIK (Mining Identity Key) consensus. Each miner must register a unique identity key bound to their wallet to participate in block production.

Register your MIK

mik registration
# Generate a wallet (if you don't have one)
./tsn new-wallet --output wallet.json
# The terminal displays 24 words -- WRITE THEM DOWN!
# This seed phrase is the ONLY way to restore your wallet

# Register your Mining Identity Key
./target/release/tsn mik register --wallet wallet.json

# Start mining with your registered MIK
./target/release/tsn --role miner --wallet wallet.json --mining-threads 4

Block Rewards

50 TSN per block

Reward distribution is hard-coded in the protocol. No governance vote needed.

85% Miner
8% Relay Pool
7% Dev Fund

🔌 RPC API Endpoints

Available on localhost:3030 when the node is running. All responses are JSON.

GET /chain/info Block height, difficulty, hash rate, chain ID
GET /peers List of connected peers with latency and role
GET /sync/status Sync progress, current vs. target block height
POST /tx/submit Submit a signed transaction to the mempool
GET /blocks/:height Get block header and transactions by height