<p>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).</p>
<p>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.</p>
<p>Each bitcoin transaction also specifies some number of newly created outputs, which are added to the UTXO set.</p>
<p>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.</p>

CC BY-SA 4.0
2021-05-11T05:25:03.393Z
For "the coinbase transaction" do you meant the txn for the miner that firstly solves PoW and earns the reward?
Rainning
CC BY-SA 4.0
2021-05-11T05:31:17.650Z
@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: https://bitcoin.stackexchange.com/questions/4571/what-is-the-coinbase
chytrik
CC BY-SA 4.0
2021-05-11T05:34:26.380Z
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
CC BY-SA 4.0
2021-05-11T05:47:36.087Z
@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
CC BY-SA 4.0
2021-05-11T06:15:46.657Z
So eventually all copies represent the only truth of the network? I think I got it, many thanks!
Rainning
CC BY-SA 4.0
2021-05-11T05:16:13.200Z
2021-05-11T05:16:13.200Z
chytrik
<p>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?</p>
<p>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;?</p>
<p><a href="https://i.sstatic.net/KroyK.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/KroyK.png" alt="Bitcoin Txn" /></a>
<a href="https://i.sstatic.net/G3ZAH.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/G3ZAH.png" alt="Steps" /></a></p>

<bitcoin-core>
Is it correct to say that continuous transactions are on different blocks most of the time?
Rainning
# Is it correct to say that continuous transactions are on different blocks most of the time?

(Asked by: username_0 on 2021-05-11)

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](https://i.sstatic.net/KroyK.png)](https://i.sstatic.net/KroyK.png)
[![Steps](https://i.sstatic.net/G3ZAH.png)](https://i.sstatic.net/G3ZAH.png)

**Tags:** bitcoin-core


---

## 1 answers

### Answer by username_1 on 2021-05-11. Score: 1 | Accepted answer

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.

> **Comments:**
> **username_0**: For "the coinbase transaction" do you meant the txn for the miner that firstly solves PoW and earns the reward?  
> **username_1**: @username_0 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: https://bitcoin.stackexchange.com/questions/4571/what-is-the-coinbase  
> **username_0**: 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?  
> **username_1**: @username_0 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.  
> **username_0**: So eventually all copies represent the only truth of the network? I think I got it, many thanks!  

---

