Skip to main content

Early development · Feedback welcome

Qart Labs · merkle proof

Check for yourself that a payment is in a block

Anyone with a browser and an 80-byte block header can prove a transaction was mined, without trusting anybody. Eight short steps, each with one idea, one diagram and one thing to try. Every hash on this page is recomputed in your browser as you read.

Steps 1 to 7 follow one real mainnet payment, a snapshot taken on 2026-09-23. Step 8 reads live data for any transaction you name.

  1. 01 A transaction is bytes; its id is their hash
  2. 02 A block commits to all its transactions with one hash
  3. 03 A proof is the path, not the tree
  4. 04 The root is in the block header
  5. 05 The header is expensive to fake
  6. 06 The header is in the longest chain
  7. 07 Tamper and watch it fail
  8. 08 Now check your own

01

A transaction is bytes; its id is their hash

A transaction is nothing but a run of bytes: this one is of them. Its id, the txid, is not stored anywhere. It is the SHA-256 of the SHA-256 of those bytes, shown back to front. So the id is the bytes: change one, and you have a different transaction.

raw tx

→ SHA-256 → SHA-256 →

32 bytes · internal order

→ reverse →

txid · display order

=?

the id the network knows

Try

Click any byte to flip its lowest bit. Watch how much of the id changes, then put it back.

02

A block commits to all its transactions with one hash

Write the ids in a row. Hash each pair into one hash, then pair those, until one hash is left: the merkle root. When a row has an odd count, its last id is paired with a copy of itself. The root changes if any id changes, moves, or is dropped.

Trees of one to eight transactions · a dashed node is a copy

Transactions in this tree

The ids in this tree are stand-ins, not real transactions; the arithmetic is the real thing.

Try

Click a leaf: its path to the root lights up, and the siblings it needs are outlined. Set the count to 7 or 5 to see an odd row copy its last node.

The real block for our payment, 570,000, holds transactions in a tree levels deep. Our transaction is leaf .

03

A proof is the path, not the tree

To climb from one leaf to the root you only need one sibling per level. Which side the sibling goes on is the leaf's position, read one bit at a time: index . That is the whole proof: .

Hashes in a proof, by block size

transactions hashes
2 1
8 3
63 6
1,000 10
3,000 12
1,000,000 20
4,194,304 22

Doubling the block adds one hash.

Try

Click any shortened hash to see all 64 characters. Follow a level's result into the next level's row: the output of one pair is the input of the next.

04

The root is in the block header

A block header is 80 bytes, six fields. One of them is the merkle root of every transaction in the block. If the root we climbed to equals the one in the header, the header vouches for our transaction.

root we computed

=?

root in the header

Try

Switch the table between wire order, the bytes as they travel, and display order, the way explorers print them. Same bytes, read in opposite directions.

05

The header is expensive to fake

Hash the 80 bytes and you get the block hash. A header only counts if that hash, read as a number, is below the target encoded in its bits field. Finding one takes a staggering number of attempts, and that work is what you are trusting: not a company, a cost.

block hash ·

target from bits

Expected attempts to find a hash this small: about .

Try

Change the nonce by one and the whole hash changes. It will almost never land below the target again: that is what the miner's attempts bought.

06

The header is in the longest chain

Each header names the hash of the one before it, so the headers form a chain, and the chain with the most work is the one the network follows. A light client keeps only headers. At 80 bytes each, the whole history fits on a phone, and grows with time, never with how busy the network is.

Try

Type a block height to see what a light client stores to know every block up to it.

Height and confirmations come from the relay; proving them means holding the chain of headers yourself.

07

Tamper and watch it fail

Four comparisons make the proof. Change one byte anywhere in the evidence and exactly one of them turns red first; the rest fall after it. Nothing has to be believed, only compared.

Try

Flip a byte in the header and notice the root still matches: the header is a different block now, one no miner ever found. Change the tx and the header is fine; it is the first link that breaks.

08

Now check your own

Paste a txid. When you press Check, this server asks the chain relay for the raw transaction, its merkle path and its block header, and hands them to your browser. Your browser does every step above again, on those bytes.

Live data: BSV mainnet, read from WhatsOnChain through this server, only when you ask. Nothing is fetched on page view, and one check runs at a time.

The shorter walk through the same evidence, with the hashes laid out as a table, is /design/tx/proof . Qart's own proofs are kept the same way: see Qart.SPV.