<p><code>UTXO</code> stands for Unspent Transaction Outputs. Thus, a node only keeps track of transaction outputs that are unspent. As soon as a transaction (even an unconfirmed one) consumes a UTXO, it is removed from the UTXO db (if the tx is dropped, it is added back).</p>

<blockquote>
  <p>What I think is ,they should be removed from the memory pool. </p>
</blockquote>

<p>The mempool is a list of unconfirmed transactions consuming as-of-yet available UTXOs. UTXOs are not removed from the memory pool. There is a separate UTXO database</p>

<blockquote>
  <p>Also what I think is that the memory pool is nothing else but the state of the blockchain.</p>
</blockquote>

<p>The state of the blockchain is the UTXO database. The mempool is essentially a list of proposed changes to the UTXO set, which can be mined and confirmed, which then results in an update to the state of the blockchain.</p>

CC BY-SA 4.0
2018-07-18T00:09:59.583Z
Hmm, I never realized that a mempool entry would remove a utxo pre-confirmation. Is that ‘standard’ across all software? I suppose that is done to mitigate against double spends?
chytrik
CC BY-SA 4.0
2018-07-18T00:13:35.897Z
I'm not sure about others, but it happens in Bitcoin Core at least. You will get a `txn-mempool-conflict` if you try to broadcast a double spend. I'm not actually sure if it updates the UTXO set immediately, but it might have an additional check against mempool txs to achieve the same result
Raghav Sood
CC BY-SA 4.0
2018-07-17T23:45:31.770Z
2018-07-17T23:45:31.770Z
Raghav Sood
<p>What I have learned is that state is an abstract thing and is maintained by the node locally and the state of the current blockchain can be reached by starting all the way from the genesis block and updating the state to the current state. So the state keeps adding utxos. </p>

<p>Does the state keep track of only the UTXOs which are unspent or the state keeps track of both the spent and the unspent utxos. What I think is ,they should be removed from the memory pool. Also what I think is that the memory pool is nothing else but the state of the blockchain.</p>

<p>Please clarify my confusions. Thanks</p>

<bitcoin-core><utxo><utxo-set>
State of transaction and UTXO
Sheikh
# State of transaction and UTXO

(Asked by: username_0 on 2018-07-17)

What I have learned is that state is an abstract thing and is maintained by the node locally and the state of the current blockchain can be reached by starting all the way from the genesis block and updating the state to the current state. So the state keeps adding utxos.

Does the state keep track of only the UTXOs which are unspent or the state keeps track of both the spent and the unspent utxos. What I think is ,they should be removed from the memory pool. Also what I think is that the memory pool is nothing else but the state of the blockchain.

Please clarify my confusions. Thanks

**Tags:** bitcoin-core, utxo, utxo-set


---

## 1 answers

### Answer by username_1 on 2018-07-17. Score: 3 | Accepted answer

`UTXO` stands for Unspent Transaction Outputs. Thus, a node only keeps track of transaction outputs that are unspent. As soon as a transaction (even an unconfirmed one) consumes a UTXO, it is removed from the UTXO db (if the tx is dropped, it is added back).

> What I think is ,they should be removed from the memory pool.

The mempool is a list of unconfirmed transactions consuming as-of-yet available UTXOs. UTXOs are not removed from the memory pool. There is a separate UTXO database

> Also what I think is that the memory pool is nothing else but the state of the blockchain.

The state of the blockchain is the UTXO database. The mempool is essentially a list of proposed changes to the UTXO set, which can be mined and confirmed, which then results in an update to the state of the blockchain.

> **Comments:**
> **username_2**: Hmm, I never realized that a mempool entry would remove a utxo pre-confirmation. Is that ‘standard’ across all software? I suppose that is done to mitigate against double spends?  
> **username_1**: I'm not sure about others, but it happens in Bitcoin Core at least. You will get a `txn-mempool-conflict` if you try to broadcast a double spend. I'm not actually sure if it updates the UTXO set immediately, but it might have an additional check against mempool txs to achieve the same result  

---

