HomePhabricator

Add routine to upgrade the block tree db to index block size

Description

Add routine to upgrade the block tree db to index block size

Summary:
This allows us to track the block size in the block index starting next version.

Pruning node will need to reindex.

The index upgrade is done in one batch as we don't expect the size of the batch to be absurdly big.

Depends on D8315 and D8318

Test Plan:
Bump version to 0.22.8 by editing src/CMakeFiles.txt. Run the node on an already synced testnet folder. Check that it upgrades the bloc index on first launch, and do not do it again after that.

Run this on a prunned directory, and ensure it fails with an error message telling me to reindex.

Revert back to 0.22.7 and check that the node will not start due to an invalid version of the DB.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
deadalnixAuthored on Jun 1 2020, 12:57
deadalnixPushed on Nov 9 2020, 21:34
Reviewer
Restricted Project
Differential Revision
D8319: Add routine to upgrade the block tree db to index block size
Parents
rABC0f3ea8a2b345: [style] Code style fixups in GetWarnings()
Branches
Unknown
Tags
Unknown