Transactions in a block are cryptographically combined pairwise into a binary Merkle Tree. Changing a transaction changes its hash input and normally the top root. This is a simplified text-hash tree.
The percentage counts locally prefix-valid peers, not agreement on a shared tip. Copy First Valid Chain selects the first qualifying peer in A, B, C order; no chain-work comparison occurs.
What does a valid hash prove in this five-block illustration, and what does it leave unchecked?
Each browser-local peer holds five example blocks. SHA-256 hashes the transaction strings into a simplified Merkle root, then hashes the block index, timestamp, reconstructed previous hash, root and nonce. Mining searches for a hash with the selected leading hexadecimal zero characters. No wallet, blockchain network or transaction is contacted.
This is a local illustration, not Bitcoin consensus software. It does not verify signatures, balances, spending rights, double spending, network messages or cumulative chain work. The valid-peer percentage counts each peer passing the local hash-prefix checks; different valid tips can still produce 100%. Example amounts are data strings, not transferable funds.
At difficulty 3, the target is three leading hexadecimal zero characters. Under an ideal uniformly distributed hash model, a trial has chance 1 / 16³ = 1 / 4096, so the expected trials are 4096; any particular search may finish sooner or later. Difficulty 2 expects 256 trials, and difficulty 4 expects 65,536. These are expectations, not measurements of mining speed or security.
A transaction leaf hashes the UTF-8 text from->to:value, such as Alice->Charlie:25. Two leaf hash strings are concatenated and hashed to form their parent; an odd final leaf is duplicated. With no transactions, the root is SHA-256 of EMPTY. A header hashes index|timestamp|previousHash|merkleRoot|nonce. Exported full hashes let you inspect this exact recipe.
Web Crypto digest provides the actual SHA-256 calculation. This application uses its own text serialization and a single SHA-256 operation at each step; it does not serialize Bitcoin transactions or block headers. A transaction name is not a public key, and a digest is not a digital signature. MDN: Web Crypto digest
Change a Block 2 transaction or use Tamper Block 2. Its root and header hash change, and later hashes are recalculated using those new results. The old nonces may fail the selected prefix. Mine searches a replacement nonce for the active block; Mine Entire Chain processes all five in order.
Previous hashes are reconstructed during evaluation rather than retained as independent block commitments. A block’s local validity checks its own proof of work; it does not require every earlier block to be valid. Consequently a later block may display valid by chance even after an earlier edit. The simulator illustrates changing hash dependencies, not all validation rules of a real ledger.
The two-peer rewrite action replaces one transaction in Nodes A and B with Attacker->Alice:50000 and remines each peer, including unchanged Node C. All chains stay five blocks long. Validity can be3/3 while Node C’s tip differs. Copy First Valid Chain takes the first locally valid peer in A, B, C order and copies it to every peer; it does not select a longest branch or compare accumulated work.
The Bitcoin paper discusses proof-of-work competition, transaction validation and competing histories. Its majority assumption concerns computational power, not simply two of three displayed node names. This example has no hashpower shares, propagation delays, confirmation-depth probability or economic attack model. Bitcoin: A Peer-to-Peer Electronic Cash System
The difficulty menu changes how many leading hex zeroes are required; it does not automatically remine existing nonces. The H/s display is the local search’s counted digest calls divided by elapsed browser time, not an ASIC or network benchmark. Mining consumes browser computation but does not earn rewards.
Reset restores the five example records for all peers and remines at the currently selected difficulty; it does not reset difficulty or the active peer tab. JSON exports only the active peer, the selected difficulty and this application’s computed roots, links and validity flags. It is not an export of all three peers or a Bitcoin-compatible chain.
Browser cryptographic digest behavior; does not validate this serialization or consensus model.
Original proof-of-work, signature and network concepts; does not validate this toy node count or prefix recipe.