HomePhabricator

index: Add Coinstats index

Description

index: Add Coinstats index

Summary:
Main commit
https://github.com/bitcoin/bitcoin/pull/19521/commits/dd58a4de21469d6d848ae309edc47f558628221d

index: Add Coinstats index

The index holds the values previously calculated in coinstats.cpp for each block, representing the state of the UTXO set at each height.


https://github.com/bitcoin/bitcoin/pull/19521/commits/57a026c30fef3138bb8db46e6865acb9dc2674f8

test: Add unit test for Coinstats index


https://github.com/bitcoin/bitcoin/pull/22047/commits/8ea8c927ac05980d6a81252e40b7444e9abb74f9

index: Avoid unnecessary type casts in coinstatsindex


Replace two database writes with a single atomic batch write, to avoid a risk of database corruption. See the corresponding review.

https://github.com/bitcoin/bitcoin/pull/22047/commits/1e3842385b8c0d15086c7cd8736f8c67e6c0c285

index: Use batch writing in coinstatsindex WriteBlock


This is a backport of core#19521 [4 & 8/17] and core#22047 [1 & 3/3]

Depends on D11597

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, sdulfari

Reviewed By: #bitcoin_abc, sdulfari

Subscribers: sdulfari

Differential Revision: https://reviews.bitcoinabc.org/D11598

Details

Provenance
Fabian Jahr <fjahr@protonmail.com>Authored on Jan 24 2020, 17:56
PiRKCommitted on Jun 13 2022, 18:27
PiRKPushed on Jun 13 2022, 18:27
Reviewer
Restricted Project
Differential Revision
D11598: index: Add Coinstats index
Parents
rABC6ac00d2ec548: refactor: Simplify ApplyStats and ApplyHash
Branches
Unknown
Tags
Unknown

Event Timeline