<p>The chainstate is generated as a side effect of validating the blockchain.</p>

CC BY-SA 3.0
2017-04-09T23:52:46.703Z
So if I understand you correctly, there is no need to scan through the whole GBs worth of blockchain to generate chainstate for the first time setting up my machine, instead it will be populated along with the growth of blockchain?
Consy
CC BY-SA 3.0
2017-04-10T04:53:55.093Z
When you initially synchronize with the network, you download all of the historical blocks, and validate those. As a side effect, the chainstate is generated. After validating you can throw away the blocks (pruning mode).
Pieter Wuille
CC BY-SA 3.0
2017-04-09T16:47:00.590Z
2017-04-09T16:47:00.590Z
Pieter Wuille
<p>When you download the blockchain, do you download the chainstate too or it has to be generated by your own machine (it says that theoretically can be rebuilt from the block data but it is time consuming)? If it is downloaded how do we verify the integrity of the chainstate database?</p>

<database><verification>
Chainstate database verification
Consy
# Chainstate database verification

(Asked by: username_0 on 2017-04-09)

When you download the blockchain, do you download the chainstate too or it has to be generated by your own machine (it says that theoretically can be rebuilt from the block data but it is time consuming)? If it is downloaded how do we verify the integrity of the chainstate database?

**Tags:** database, verification


---

## 1 answers

### Answer by username_1 on 2017-04-09. Score: 0 | Accepted answer

The chainstate is generated as a side effect of validating the blockchain.

> **Comments:**
> **username_0**: So if I understand you correctly, there is no need to scan through the whole GBs worth of blockchain to generate chainstate for the first time setting up my machine, instead it will be populated along with the growth of blockchain?  
> **username_1**: When you initially synchronize with the network, you download all of the historical blocks, and validate those. As a side effect, the chainstate is generated. After validating you can throw away the blocks (pruning mode).  

---

