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.
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).
GET /status, GET /chain, and GET /mempool to display real-time network activity.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:
runMempoolSync in node_background.go), the local node sends GET /mempool to Railway to fetch any transactions submitted by web users.runSync in node_background.go), the local node sends GET /chain/height to Railway to check if a new block was discovered.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.