Introduction
A blockchain needs ways to organize past payments, current balances,
and payments that are still waiting.
What you’ll learn
Check what a Merkle proof establishes and distinguish pending
transactions from accepted state.
Lesson
A block often has a header containing information
used to identify and verify it, including a reference to its predecessor
and commitments to data. Its body contains the records the network
includes in the block. Exact fields vary by protocol.
A Merkle tree combines hashes in layers. For a block
with four records A, B, C, and D, hash each record, then combine the
hashes for A and B and for C and D. Combine those results to get the
root. To verify B’s inclusion, you need B, A’s hash, the combined C–D
hash, their positions, and the root from a header you have reason to
trust. You can rebuild the path yourself. This verifies inclusion under
that root. It does not independently validate all other records or
settle whether the block is part of the accepted history.
History, state, and pending work. History describes
how things changed. State answers what is true at a given block, like
who currently holds an item or how many seats remain. Some networks
commit to state in a way that supports proofs about individual values. A
mempool is a node’s local collection of pending
transactions. Different nodes can have different collections. A pending
transaction may be included, replaced, or dropped. It has no guaranteed
place in line.
| UTXO |
Consume a 10-unit unspent output. Create a 6-unit recipient output
and a 3-unit change output. The remaining unit is the fee. |
| Accounts |
Reduce the sender’s account balance by 7 and increase the
recipient’s by 6 under the assumed fee rules. Account state can also
track a transaction sequence number. |
Practice quiz
Select one answer per question.
Answer key and explanations
- B. Inclusion under the stated root.
- A. Four units.
- C. Pending transactions reach nodes at different
times and can be handled under different relay policies.
Sign in with Discord to take this quiz and earn your badge.