Is it correct to say that continuous transactions are on different blocks most of the time? 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 &quot;predecessors&quot;?
Each bitcoin node keeps an index of 'unspent transaction outputs' (the &quot;UTXO set&quot;), 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.