Build a Blockchain in 2 Minutes

Build a Blockchain in 2 Minutes Lab 2

This interactive lab lets you see how a blockchain works: every block has data, a nonce, a hash, and a link to the previous hash. Edit any block and watch how the chain breaks until you “fix” it by mining again.

Difficulty (number of leading zeros in hash):
Valid block   •   Invalid – hash doesn’t match difficulty or the previous hash link
How to use this demo:
  • Step 1 – Look at the Genesis Block: Block 1 has a fixed “Prev Hash” of 64 zeros. This is the start of the chain.
  • Step 2 – Change the data in Block 1: Type anything in the Data box. The hash changes, and every later block becomes Invalid.
  • Step 3 – Mine a block: Click “Mine Block”. The demo keeps trying nonces until the hash starts with the required number of zeros.
  • Step 4 – Observe the link: Each block’s Prev Hash must match the Hash of the previous block, otherwise the block is invalid.
  • Step 5 – Try different difficulty levels: Increase difficulty from 2 → 3 → 4 and notice how mining takes longer. This simulates Proof-of-Work.
  • Step 6 – Add more blocks: Use Add Block to extend the chain and create more scenarios (payments, logs, configs, etc.).

What this shows: immutability, hash linkage, proof-of-work, and why tampering with history is obvious in a blockchain system.