TeachMeBitcoin

The UTXO Set (Chainstate)

From TeachMeBitcoin, the free encyclopedia Reading time: 2 min

The UTXO Set (Chainstate)

While the blockchain is a record of every transaction that ever happened, a Bitcoin node does not look at the whole blockchain to verify a new payment. Instead, it maintains a highly optimized database called the UTXO Set, also known as the Chainstate.

1. What is in the UTXO Set?

The UTXO set is a snapshot of all currently spendable coins.

2. Storage on Disk: LevelDB

Bitcoin Core uses a high-performance key-value database called LevelDB to store the chainstate. It is usually located in the chainstate/ directory of your data folder.

3. The RAM Constraint

Because nodes must check the UTXO set for every single transaction they receive, they try to keep as much of it as possible in RAM.

4. Pruning and the UTXO Set

Even if you run a Pruned Node (deleting old block data to save space), you must keep the entire UTXO set. You cannot verify new transactions without knowing which coins are currently unspent.

Database Contains Size (Approx) Growth
Blocks Full History 600 GB Linear
Chainstate Current UTXOs 5-10 GB Variable

In the next section, we will explore the "Primary Key" of the UTXO set: Outpoints.

☕ Help support TeachMeBitcoin

TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation:

Ethereum: 0x578417C51783663D8A6A811B3544E1f779D39A85
Bitcoin: bc1q77k9e95rn669kpzyjr8ke9w95zhk7pa5s63qzz
Solana: 4ycT2ayqeMucixj3wS8Ay8Tq9NRDYRPKYbj3UGESyQ4J
Address copied to clipboard!