Network Architecture

How the web frontend, cloud RPC node on Railway, and local node clusters communicate in real life.

How the Network Actually Works

A straightforward view of the 3 components: the Website, the Deployed Cloud Node, and Local Nodes.

1. Web ApplicationNext.js in Browser• Signs Tx in browser (Ed25519)• Queries /status, /chain• Submits POST /tx/submitHTTPS REST2. Cloud RPC NodeDeployed on Railway• Public valenced Node• Holds Faucet Key• Acts as Seed BootstrapOutbound PollGET /mempoolPOST /chain/sync3. Local ClusterYour Computer (:8080/:8081)• Mines blocks (PoW)• Pulls mempool (5s)• Pushes mined blocks

1How the Website Talks to the Cloud RPC Node

The frontend is a static Next.js web application running in your browser. It uses standard HTTP fetch() to connect to the deployed cloud RPC node on Railway (https://blockchain-simulator-production.up.railway.app).

Reading Blockchain DataThe website sends GET /status, GET /chain, and GET /mempool to display real-time network activity.
Sending TransactionsThe browser wallet signs the transfer locally using its private key (Ed25519) and submits the signed JSON via POST /tx/submit.

2How Local Nodes Talk to Each Other (Local Cluster)

When you run start-cluster.ps1 on your computer, it starts multiple node daemons (e.g. Node A on port 8080, Node B on port 8081, Node C on port 8082).

Because they are on the same machine, they connect directly via http://localhost:8080 and http://localhost:8081. When Node A receives or mines something, it sends a direct HTTP POST request (POST /tx/gossip or POST /block/gossip) to Node B.

3How Local Nodes Communicate with the Cloud Node (Why Firewalls Don't Block It)

Your home Wi-Fi router blocks unsolicited incoming connections from the internet. The cloud node on Railway cannot reach into your computer and call POST http://your-home-ip:8080.

Instead, our Go code handles this naturally by making outbound HTTP requests from the local node to the cloud node:

1. Pulling Transactions (Mempool Polling)Every 5 seconds (runMempoolSync in node_background.go), the local node sends GET /mempool to Railway to fetch any transactions submitted by web users.
2. Pulling Blocks (Chain Sync)Every 30 seconds (runSync in node_background.go), the local node sends GET /chain/height to Railway to check if a new block was discovered.
3. Pushing Mined Blocks (Push Sync)When your local CPU mines a block with PoW, it sends POST /chain/sync out to Railway. Railway verifies the block and updates the live chain.

Because all of these requests are outbound client requests from your machine, your home router and firewall allow them automatically without any port forwarding or router setup required.

Want to explore the Go package details?

Read the 12 core cryptographic, state, and consensus subsystems in the Architecture Guide.

Go to Architecture