HomePhabricator

retire support of pre-0.22.8 block index upgrade

Description

retire support of pre-0.22.8 block index upgrade

Summary:
Stop supporting database upgrades for databases last updated by Bitcoin ABC < 0.22.8. These will now require a full reindex.
This removes a txdb -> blockstorage dependency which would cause an additional circular dependency in D11350.

Keep writing the current version number to the database, as this could be useful again for future upgrades and debugging.

Test Plan:

  • Happy path 1: Start testnet IBD on this version of the node. Check that the node accepts to start from a non-existent DB.
  • Happy path 2: After letting the node in the previous test run for a few minutes to ensure there is a block index DB, stop it, then bump the version in src/CMakeLists.txt, recompile and restart the node, and check that IBD resumes successfully after the updating of the DB.
  • Stop the node, revert the previous version bumping, recompile and restart the node, check that it fails to start. This is because even though CBlockTreeDB::Upgrade returns true after finding a DB with a more recent version than the node, CBlockTreeDB::LoadBlockIndexGuts then fails to load a database with a version number different than the node.
  • Download a binary for an old node version prior to 0.22.8, us it to start a fresh IBD and let it run for a few minutes. Stop the node, compile and run the node for the current commit, and check that it fails to start because the DB version is too old. Restart with option -reindex, and check that this works.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
PiRKAuthored on Apr 13 2022, 16:11
PiRKPushed on Apr 27 2022, 10:18
Reviewer
Restricted Project
Differential Revision
D11355: retire support of pre-0.22.8 block index upgrade
Parents
rABCd4ff766e57a4: Move AbortNode to shutdown and fix an error message
Branches
Unknown
Tags
Unknown