New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blockstorage: Drop legacy -txindex check #28195
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
fa6c48a
to
faedae4
Compare
faedae4
to
fa518b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
There are still two instances where blocks_path can be used (sometimes it's quite annoying that python also allows single quote strings):
test/functional/feature_pruning.py: self.prunedir = os.path.join(self.nodes[2].chain_path, 'blocks', '')
test/functional/wallet_backup.py: shutil.rmtree(os.path.join(self.nodes[2].chain_path, 'blocks'))
With my very limited sed skills, I'd just add another line
sed -i "s|].chain_path, 'blocks'|].blocks_path|g" $(git grep -l chain_path)
to the scripted-diff (probably also possible with only one).
-BEGIN VERIFY SCRIPT- sed -i 's|].chain_path, .blocks.|].blocks_path|g' $(git grep -l chain_path) -END VERIFY SCRIPT-
The block index (CBlockTreeDB) is required to write and read blocks, so move it to blockstorage. This allows to drop the txdb.h include from `node/blockstorage.h`. Can be reviewed with: --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
Can be reviewed with --word-diff-regex=.
fa518b7
to
faf6303
Compare
Thanks, fixed up the scripted-diff |
-BEGIN VERIFY SCRIPT- sed -i 's|CBlockTreeDB|BlockTreeDB|g' $( git grep -l CBlockTreeDB ) -END VERIFY SCRIPT-
The basic idea is that the legacy txindex was stored inside the block index db. Then a new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK fae4055
The upgrade path when coming from legacy txindex is straightforward and clear enough, no need to keep this extra check around for such an old version imo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we at some point sunset this test completely? Given that the txindex
construction is completely separate from BlockTreeDB
, I don't think there's really any compatibility testing happening anymore? It's good to have the test around for this pull, but I'm not sure when it'll be useful in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. Seems fine to remove it in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean it is still checking that the dangling BlockTreeDB
entries like t
T
, or txindex
do not cause any issues, but at some point we can drop this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, thx. I quite like adding "# TODO" comments to make it easier to find future cleanup items, but I don't really know how I'd phrase the "when" clause so no concrete suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe create an issue (after merge) to remove it after +1 release of this being merged?
rfm, or is anything left to be done here? |
897d6dd Remove feature_txindex_compatibility.py in V27 (Brandon Odiwuor) Pull request description: Fixes #28421, see [#28195 (comment)](fa86855#r1311494362) Remove feature_txindex_compatibility.py in V27, follow up to #28195 being merged which is included in v26 ACKs for top commit: maflcko: lgtm ACK 897d6dd theStack: ACK 897d6dd stickies-v: ACK 897d6dd Tree-SHA512: 53102d39f6fdbdcf1bb13b6feb2f446b0e9e8e3fe294c0e6fe37e7731713fb9fd5b048e19b6edf80579f5edbcf762b51d56d57bdcda67ec3527706891dc3572b
The only reason for the check was to print a warning about an increase in storage use. Now that 22.x is EOL and everyone should have migrated (or decided to not care about storage use), remove the check.
Also, a move-only commit is included. (Rebased from #22242)