Developer Documentation

Complete guide to running local node clusters, CLI commands, daemon configuration, and the REST API catalog.

Multi-Node Local Cluster Setup

Follow these steps to spin up a live two-node P2P cluster and submit your first transaction in under 3 minutes.

1

Clone the Repository

Clone the open-source Go backend and Next.js frontend repository.

git clone https://github.com/TheekshanaBC/Blockchain-Simulator.git
2

Start Primary Node Daemon (Node 1)

Initializes the Genesis block and launches Node 1 on port 8080.

go run ./cmd/valenced -port=8080 -data-dir=./data/node1
3

Start Secondary Peer Node (Node 2)

Launches Node 2 on port 8081 and automatically connects to Node 1 via mesh discovery.

go run ./cmd/valenced -port=8081 -data-dir=./data/node2 -peers=localhost:8080
4

Mine a Block with valence-cli

Triggers the Proof-of-Work engine on Node 1 to mine pending transactions.

go run ./cmd/valence-cli -node=http://localhost:8080 generate
Full Go source code, tests, and reference manual available in the GitHub repository.