A learning project that builds a blockchain in Rust, one executable chapter at a time: hashes, blocks, mining, signatures, a mempool, networking, consensus and file proofs. Browser demonstrations compile the same Rust core to WebAssembly; Docker Compose runs a three-node network.
What it's good for
For anyone who has written a little code and wants to see what a blockchain does underneath: no cryptography background needed, and Rust newcomers get comments on ownership and async. Every exercise ships with a tested answer, so cargo test tells you whether you got it, not a forum.
Diagrams
Main paths only. The edge cases stayed in the code.
Edit block 1 and nothing after it can be trusted. Go on, try it.
Point at a box to see what it connects to.
A peer sends blocksa RESPONSE_BLOCKCHAIN message
One block or a chain?
Already have this block?stops messages looping forever
Fits after my latest block?
Ask for the whole chainQUERY_ALL: admit you're behind
Check it, then appendtrial run on a ledger copy
Check every block from genesishash, link, difficulty, work
More total work than mine?work wins, not length
Replay the ledger from scratchevery transaction must hold
One outbound reverse SSH tunnel per device gives you a browser terminal, files, remote desktop, a remote browser and the LAN behind it. No port forwarding, no VPN, no public IP.
One Docker dev box per user, with a web terminal, a noVNC desktop and optional GPU. The Django version, rewritten in Rust, partly to find out whether I could.
The original Django dev-box manager: isolated Docker environments for several users on one machine. The Rust version replaced it, but this one carried the load first.