I'm new to the idea of bitcoin and I'm taking an introduction course about it. Given the following picture from the original bitcoin paper, is it correct to say that continuous transactions are on different blocks most of the time?

If this is true, after a miner receive a broadcast of some transaction, how did he find those predecessor transactions for these to be processed transactions, so he can form his own block containing these transactions? Does he have to browse through all the transactions in the world to find these "predecessors"?

Bitcoin Txn Steps

1 Answer 1


Each bitcoin node keeps an index of 'unspent transaction outputs' (the "UTXO set"), which is updated with each new block received. At the genesis of the network, the UTXO set was empty. With each block after the genesis block, the UTXO set was slowly populated, as each new block would contain some number of transactions (that create/destroy UTXOs).

Each bitcoin transaction specifies some number of inputs (other than the coinbase transaction in each block, which is a special transaction that has no inputs), and these inputs must be valid, existing UTXOs in the UTXO set. These UTXOs are 'consumed' entirely as inputs, and thus deleted from the UTXO set that the node keeps track of.

Each bitcoin transaction also specifies some number of newly created outputs, which are added to the UTXO set.

So when checking to see if a transaction is valid, the node will check to ensure that all inputs to the transaction are valid, currently existing UTXOs. Under the hood, each input is specified by the transaction ID, and the outputs index, and it is this data that the node uses to lookup the UTXO, as one step towards determining the validity of said transaction.

  • For "the coinbase transaction" do you meant the txn for the miner that firstly solves PoW and earns the reward?
    – Rainning
    May 11, 2021 at 5:25
  • 1
    @Rainning yes the coinbase transaction is the first transaction in each block; the output(s) it creates will pay the block reward to the address(es) that the miner specifies. See for example: bitcoin.stackexchange.com/questions/4571/what-is-the-coinbase
    – chytrik
    May 11, 2021 at 5:31
  • Regarding "the UTXO set", can I say that each miner keeps a local UTXO set, which represents an update to the global UTXO set, and then periodically push these local UTXO changes to the global one?
    – Rainning
    May 11, 2021 at 5:34
  • 1
    @Rainning there is no 'global UTXO set', bitcoin has no such admin or hierarchy. Each node creates and keeps their own copy, and each miner (or mining pool) will run a node so that they can have their own copy as well. By following the rules of the network, all nodes will independently come to consensus on what the current network state is.
    – chytrik
    May 11, 2021 at 5:47
  • So eventually all copies represent the only truth of the network? I think I got it, many thanks!
    – Rainning
    May 11, 2021 at 6:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.