Details
- Reviewers
Fabien - Group Reviewers
Restricted Project - Commits
- rABC47564b0e7b40: Add routine to upgrade the block tree db to index block size
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.
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- blocktreedbupgrade
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 13928 Build 27864: Build Diff build-debug · build-diff · build-clang-tidy · build-without-wallet · lint-circular-dependencies · build-clang Build 27863: arc lint + arc unit
Event Timeline
More a question than requesting changes: comparing version against CLIENT_VERSION will force to upgrade the database at each version. This will read the disk content in the loop, but do nothing other than updating the version number in the end. Is there a use case for this or should version compare to TRACK_SIZE_VERSION instead ?
src/blockindex.h | ||
---|---|---|
69 | Typo: Siz => Size | |
src/txdb.cpp | ||
533 | Typo: prunned => pruned |
Yes. The upgrade while doing nothing is very quick, in fact, thee are several pices of code that go over the whole DB already, for instance, CBlockTreeDB::LoadBlockIndexGuts. This certainly can be tweaked further, but this is not a big deal, IMO.