This simulation renders a blockchain as a literal 3D chain: each cube is a block, and the thin bar connecting one cube to the next represents a cryptographic link — the parent block's hash embedded inside the child block's own data. The scene mines continuously (or one block at a time, if you switch off auto-mine), and the camera glides to keep the newest block in frame while still letting you orbit and zoom freely.
index + previous hash + nonce; the moment that hash starts with enough zero hex digits (the difficulty target) the block locks in gold, its hash prints above it, and a new block starts mining on top of it.Toggle auto-mine off and click "Mine one block" to step through the search for a valid nonce yourself, or push the difficulty slider to 4 to feel how quickly proof-of-work work scales with each extra required zero.
Why does linking blocks by hash make the chain tamper-evident?
Each block stores the hash of the block before it as part of its own data. Changing anything in a past block — even one character — produces a completely different hash for that block (the avalanche effect), which no longer matches the copy stored in the next block. That mismatch cascades forward through every subsequent block, so a single edit invalidates the whole tail of the chain.
What exactly is a "nonce" and why search for one at random?
A nonce is an arbitrary number a miner is free to change. Because a good hash function scrambles its output unpredictably, there is no shortcut to finding a nonce whose hash meets the difficulty target — miners must simply try nonces one after another until one works, which is what makes proof-of-work provably expensive to fake.
Why does higher difficulty slow mining down so much?
Requiring one more leading zero hex digit divides the fraction of valid hashes by 16, so the expected number of attempts needed multiplies by 16 too. This exponential relationship is exactly how real networks like Bitcoin retarget difficulty to keep block times roughly constant as total network hash power rises or falls.
No — it's a small, fast, deterministic scrambling function (a toy hash) chosen so the simulation can mine hundreds of blocks per second in a browser tab. It has the same qualitative property that matters here — small input changes produce unpredictable output changes — but it is not collision-resistant or secure the way SHA-256 is, and should not be used for anything beyond this demonstration.
The camera's orbit target tracks the x-position of the newest mined block so the active mining site never drifts out of frame as the chain grows, while your manual drag-to-rotate and scroll-to-zoom input is preserved on top of that automatic pan — only the point being orbited around slides forward.
Tampering only edits one block's stored data; it doesn't re-mine anything. So every tampered block (and everything built on top of it) stays marked invalid until you reset the chain — mirroring the real-world fact that "fixing" a tampered blockchain block requires re-doing all the proof-of-work from that point forward, which is precisely what makes deep rewrites impractical.