Blockchain Simulator — Mining, Hash Chains & Consensus

Mine blocks with proof-of-work, watch hash chain integrity, tamper & re-mine, explore consensus attacks

Mempool — Pending Transactions (0)

Ready — press ⛏ Mine Block to begin.

Blockchain: Distributed Ledger Technology

🔗 Hash Chaining

Each block's header contains a cryptographic hash of the previous block. Any modification cascades forward, making tampering immediately detectable without a central authority.

⛏ Proof-of-Work

Miners must find a nonce such that SHA-256(data + nonce) starts with N leading zeros. Difficulty adjusts to maintain target block time as hash rate changes across the network.

🌳 Merkle Trees

Transactions are summarised by a binary hash tree whose root appears in the block header. This allows O(log n) proof that a transaction is included without downloading the full block.

⚡ Consensus

Nakamoto consensus: the valid chain is the one with the most cumulative proof-of-work. A 51% attacker can re-write history only by outpacing the honest network — economically prohibitive on large networks.

Blockchain Configuration Comparison

NetworkConsensusBlock TimeThroughputEnergy
Bitcoin (BTC)Proof-of-Work (SHA-256)~10 min~7 TPS~130 TWh/yr
Ethereum (ETH)Proof-of-Stake (Casper)~12 sec~15 TPS~0.01 TWh/yr
Solana (SOL)Proof-of-History + PoS~0.4 sec~65,000 TPSVery low
Binance Smart ChainProof-of-Staked Authority~3 sec~300 TPSLow
Litecoin (LTC)Proof-of-Work (Scrypt)~2.5 min~56 TPSModerate
Ripple (XRP)Federated Byzantine Agreement~4 sec~1,500 TPSMinimal
Cardano (ADA)Ouroboros PoS~20 sec~250 TPSVery low
Hyperledger FabricPluggable (PBFT/Raft)<1 sec~3,500 TPSMinimal

Frequently Asked Questions

How does proof-of-work block mining work?

Mining requires finding a nonce N such that SHA-256(prevHash + data + N) has ≥D leading zero bits. Since hash outputs are pseudorandom, this requires on average 2^D attempts. Bitcoin adjusts D every 2016 blocks (~2 weeks) to maintain a 10-minute block time regardless of total network hash rate.

Why is blockchain tamper-evident?

Each block hash depends on its content AND the previous block's hash. Changing any data in block k changes its hash, which is embedded in block k+1, changing k+1's hash, and so on. An attacker must re-mine every block from k to the chain tip faster than honest miners add new blocks — requiring >50% of total hash power.

What is a Merkle tree in a blockchain?

A binary hash tree where leaf nodes are transaction hashes and each parent is hash(left child + right child). The Merkle root compactly proves all transactions are included. Verifying a single transaction requires only O(log₂ n) hashes — a "Merkle proof" — rather than downloading the full block.

What is the difference between Proof-of-Work and Proof-of-Stake?

PoW requires expending computational energy to mine blocks; PoS selects validators proportional to staked coins. Ethereum switched to PoS in September 2022 ("The Merge"), reducing its energy consumption by ~99.95%. PoS requires >33% stake to disrupt; PoW requires >50% hash rate.

Learn More: Blockchain Technology Explained

Deep dive into distributed ledger technology, cryptographic hash functions, consensus mechanisms, smart contracts, and the environmental debate.

Read the Article →