From Chapter 4: “After the block is mined, nodes validate it, and the transaction is considered confirmed.”
How a transaction gets into a block
You sign a payment and send it out. Thousands of computers check it and hold it in a waiting room called the mempool. Miners race to put it in the next block. When one wins, every computer checks that block on its own and adds it to its own copy of the ledger. No one is in charge of any step.

- You
- Nodes
- Miners
- You sign a transaction.Your wallet signs it with your private key. (You)
- Your wallet sends it to a node.Your own node, or one your wallet connects to. (You)
- That node checks it.Is the signature real? Are the coins unspent? Does it follow every rule? (Nodes)If it failsRejected.It goes no further.
- It goes into that node’s mempool.The node passes it to the nodes it is connected to, and they pass it on. Within seconds it reaches most of the network. (Nodes)
- Every node checks it again, on its own.Each one adds it to its own mempool. Miners’ nodes do this too. (Nodes)
- Each miner builds a candidate block.It picks waiting transactions, usually the ones paying the highest fees for their size. It adds the coinbase transaction, which pays the miner. (Miners)
- Proof of work.Every miner guesses at once, over and over, until one finds a winning number. (Miners)
- One miner finds a winning guess first.Its candidate block becomes the new block, and the miner sends it out to the network. (Miners)
- Every node checks the whole block.Is the guess a winner? Is every transaction valid? Did the miner pay itself no more than the rules allow? (Nodes)If it failsRejected.The miner wasted its electricity.
- Each node adds the block to its own copy of the blockchain.It removes those transactions from its mempool. (Nodes)
- Every miner starts a new candidate block on top of the new one.Transactions left out wait in the mempool for a later block. (Miners)
Three things people get wrong
No one picks the winner. There is no judge. The first miner to find a winning guess sends its block out. Every node checks it on its own. There is no vote. If the block breaks a rule, every honest node throws it away, no matter who mined it.
There is no single mempool. Every node keeps its own. They are usually close, but never exactly the same, because transactions take a moment to spread and each node can set its own limits. When you look at the mempool on mempool.space, you are looking at that site’s own node.
Miners are nodes too. A miner needs a node to see waiting transactions and to know which block is newest. Most home miners join a pool. The pool runs the node and builds the candidate block, and its members do the guessing.
What the flow leaves out
Two blocks at once. Now and then, two miners find a winning guess at almost the same moment. For a short time, nodes disagree about which block came first. The next block settles it. Nodes follow the chain with the most work behind it. The other block is dropped, and any of its transactions that are not already in the winning chain go back to the mempool. This is one reason large payments wait for more confirmations.
A low fee can wait a long time. When the mempool is full, miners take higher fees first. A low-fee transaction can sit for hours or days. Most nodes drop a transaction that has waited about two weeks. Many wallets let you raise the fee to speed it up.
Open mempool.space. On the left are blocks still waiting in the mempool. On the right are the latest mined blocks. Watch for a few minutes. When a new block slides over to the right, you are watching steps 8 to 11 happen.
Words on this page
- Node
- A computer with a full copy of the ledger that checks everything for itself.
- Miner
- A computer competing to add the next block, paid in new bitcoin and fees when it wins.
- Mempool
- The queue of checked, unconfirmed transactions, waiting for a miner to put them in a block.
- Block
- A page of the ledger, a batch of transactions added about every 10 minutes.
- Proof of work
- A guessing race that costs real electricity, so you can’t rewrite the past without redoing it.
- Confirmation
- One more block stacked on top of the one your transaction is in.
- Private key
- The secret that lets you move your entry.
- Mining pool
- A company that combines many miners’ machines and shares the winnings by work done.
- Coinbase transaction (generation transaction)
- The first entry in every block, where new bitcoin is minted and the miner is paid, and the only door new bitcoin comes through; not the company of the same name.
Sources
- Satoshi Nakamoto, “Bitcoin: A Peer-to-Peer Electronic Cash System” (2008), section 5, “Network.” https://bitcoin.org/bitcoin.pdf
- Bitcoin Core, the
-mempoolexpirysetting: “Do not keep transactions in the mempool longer than <n> hours (default: 336).” 336 hours is 14 days. The default is set in src/kernel/mempool_options.h (DEFAULT_MEMPOOL_EXPIRY_HOURS). https://raw.githubusercontent.com/bitcoin/bitcoin/master/src/kernel/mempool_options.h - Bitcoin developer documentation, “P2P Network,” https://developer.bitcoin.org/devguide/p2p_network.html, and “Transactions,” https://developer.bitcoin.org/devguide/transactions.html.
- mempool.space, the live view used in the Try it card. https://mempool.space