1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2024-11-29 19:38:25 +00:00

ch08.asciidoc I specified where UTXO pool is stored in Bitcoin Core to avoid confusion

When came across this paragraph I assumed, thinking "some [other than Bitcoin Core] implementations of the bitcoin client" that Bitcoin Core does not store its UTXO pool anywhere. I did [some research] (https://bitcoin.stackexchange.com/questions/102267/where-in-bitcoin-are-mempool-and-utxo-pools-written) and it turns out that it does. Providing 
such a detail to the readers would help avoid unnecessary confusion.
This commit is contained in:
jerzybrzoska 2021-02-05 16:18:13 +01:00 committed by GitHub
parent e3695afbf6
commit b56735ae9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -333,6 +333,6 @@ When a transaction is added to the transaction pool, the orphan pool is checked
Both the transaction pool and orphan pool (where implemented) are stored in local memory and are not saved on persistent storage; rather, they are dynamically populated from incoming network messages. When a node starts, both pools are empty and are gradually populated with new transactions received on the network.
Some implementations of the bitcoin client also maintain an UTXO database or pool, which is the set of all unspent outputs on the blockchain. Although the name "UTXO pool" sounds similar to the transaction pool, it represents a different set of data. Unlike the transaction and orphan pools, the UTXO pool is not initialized empty but instead contains millions of entries of unspent transaction outputs, everything that is unspent from all the way back to the genesis block. The UTXO pool may be housed in local memory or as an indexed database table on persistent storage.
Some implementations of the bitcoin client also maintain an UTXO database or pool, which is the set of all unspent outputs on the blockchain. Bitcoin Core's user will find it in chainstate/ of the client's data directory. Although the name "UTXO pool" sounds similar to the transaction pool, it represents a different set of data. Unlike the transaction and orphan pools, the UTXO pool is not initialized empty but instead contains millions of entries of unspent transaction outputs, everything that is unspent from all the way back to the genesis block. The UTXO pool may be housed in local memory or as an indexed database table on persistent storage.
Whereas the transaction and orphan pools represent a single node's local perspective and might vary significantly from node to node depending upon when the node was started or restarted, the UTXO pool represents the emergent consensus of the network and therefore will vary little between nodes. Furthermore, the transaction and orphan pools only contain unconfirmed transactions, while the UTXO pool only contains confirmed outputs.