Bitcoin

Atomicity – Does Bitcoin Core write blockchain and chain state data atomically?

In particular, when a new block arrives:

  1. Are blocks written to disk in an atomic manner so new blocks exist, or do they not exist? (The leader will never see the partially written state)

  2. Are summary databases (e.g. chainstate, block-index) written and flushed to disk atomically along with new blocks so that the blockchain file store gets out of sync with the levelDB file store?

  3. More generally, can we say that Bitcoin data storage exhibits ACID properties?

  4. Are there any plans to change your datastore behavior in this regard?

(I think the answer to 1-3 is no, no, and no. But I’d like to hear more details and your rationale for the status quo.)

Related Articles

Back to top button