Bitcoin Block Management Explorer

Interactive step-by-step demonstration of block construction in Bitcoin Core-style data formats: transaction serialization, Merkle tree, proof-of-work, block assembly, and partial Merkle verification.

Step 1: Create Random Transactions for a Block Candidate

Choose 4 or 8 random non-coinbase transactions (Core-like serialized bytes and txid). A coinbase transaction is also prepared for later block assembly.

Step 2: Build Merkle Tree for All Block Transactions

Build the Merkle tree from txids (coinbase + generated random transactions), showing each HASH256(left || right) computation level by level.

Step 3: Proof-of-Work Mining on the Block Header

Use compact nBits = 0x1f7fffff (easy target) and iterate nonce until block hash <= target. Expected average is well under 1000 hashes.

Step 4: Assemble Complete Block (Header + Coinbase + Transactions)

Assemble full block bytes: 80-byte header, transaction count varint, coinbase transaction, and all generated transactions.

Step 5: Verify a Transaction with Partial Merkle Tree

Construct and verify a Bitcoin Core-style partial Merkle tree (total transactions, hashes, flags) to prove membership of one transaction.