-
Notifications
You must be signed in to change notification settings - Fork 38.6k
test: Activate all regtest softforks at height 1, unless overridden #22818
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
Conversation
|
Concept ACK. (this will work fine for the tests which "know" about everything anyway, even if new things get added) |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. 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. |
|
Concept ACK |
1 similar comment
|
Concept ACK |
cb12298 to
facb4bc
Compare
Done |
facb4bc to
fae8d47
Compare
|
Strong Concept ACK |
theStack
left a comment
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.
LGTM overall, left two small improvement suggestions.
fa89e40 to
fa32518
Compare
theStack
left a comment
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 fa32518ae3a670f2a964812806d4b07cc488c8a2 🍴
fa32518 to
fa5b518
Compare
theStack
left a comment
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.
re-ACK fa5b518f165dd220dce2f46ad590b8ce8bdd26d8
Checked via git range-diff fa32518a...fa5b518f that changes since my last ACK are only rebase-related.
fa5b518 to
fae5b05
Compare
|
Force pushed (trivial, without rebase) |
The block version does not have any effect on the segwit consensus rules or block relay logic. Same for feature_dersig.
This will be needed in a later commit.
fae5b05 to
fa4db86
Compare
| 'bip65': {'type': 'buried', 'active': True, 'height': CLTV_HEIGHT}, | ||
| 'csv': {'type': 'buried', 'active': False, 'height': 432}, | ||
| 'segwit': {'type': 'buried', 'active': True, 'height': 0}, | ||
| 'bip34': {'type': 'buried', 'active': True, 'height': 1}, |
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.
Wouldn't having slightly different activation heights here (even it its 1,2,3,4,5) make for a better 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.
Can do on the next force push or another pull request (whichever happens earlier)
|
Code review ACK fa4db86 |
theStack
left a comment
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.
re-ACK fa4db86
… rpc_blockchain fa4ca8d test: Add -testactivationheight tests to rpc_blockchain (MarcoFalke) Pull request description: Suggested: bitcoin/bitcoin#22818 (comment) ACKs for top commit: laanwj: Code review ACK fa4ca8d theStack: Concept and code-review ACK fa4ca8d Tree-SHA512: 41304db1a15c0c705a9cc2808c9f1d7831a321a8a7948a28ec5d3ee1ed3da6a0ce67cd50c99a33aaed86830c59608eb6ffadbeaba67d95245c490f9b6c277912
…ckchain fa4ca8d test: Add -testactivationheight tests to rpc_blockchain (MarcoFalke) Pull request description: Suggested: bitcoin#22818 (comment) ACKs for top commit: laanwj: Code review ACK fa4ca8d theStack: Concept and code-review ACK fa4ca8d Tree-SHA512: 41304db1a15c0c705a9cc2808c9f1d7831a321a8a7948a28ec5d3ee1ed3da6a0ce67cd50c99a33aaed86830c59608eb6ffadbeaba67d95245c490f9b6c277912
mzumsande
left a comment
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.
The change of consensus.SegwitHeight from 0 to 1 has the effect that if I create a regtest enviroment with a current master (or 23.0), and then try to load the chain with an older version (e.g. 22.0), I get an InitError
Witness data for blocks after height 0 requires validation. Please restart with -reindex
because BLOCK_OPT_WITNESS is no longer set for the Genesis block and NeedsRedownload() in validation returns true.
That might be a bit annoying for some tests - @MarcoFalke @theStack what do you think?
|
No objection setting it back to |
This was changed in bitcoin#22818 from 0 to 1. Since it changes BLOCK_OPT_WIT of the genesis block, older versions of bitcoin core would not read regtest directories created with newer versions without a reindex.
|
see #24527 |
5ce3057 test: set segwit height back to 0 on regtest (Martin Zumsande) Pull request description: The change of `consensus.SegwitHeight` from 0 to 1 for regtest in bitcoin#22818 had the effect that if I create a regtest enviroment with current master (or 23.x), and then try to load this chain with an older version (22.x), I get an InitError `Witness data for blocks after height 0 requires validation. Please restart with -reindex` and have to reindex because `BLOCK_OPT_WITNESS` is no longer set for the Genesis block and `NeedsRedownload()` in validation returns `true` with an older version. That might be a bit annoying for tests that use a shared regtest dir with different versions. If people think this is enough of an issue to be worth fixing, I think it should also make it into 23.x ACKs for top commit: theStack: Concept and code-review ACK 5ce3057 Tree-SHA512: b0e89ff7fc953bc0ae929d2da44cde7149321d987fb4763934f6c9635d00d807129a50b459cc5e69e86bb1819e4b063b969486e8016a1cb8db8f905fa315653d
This was changed in bitcoin#22818 from 0 to 1. Since it changes BLOCK_OPT_WIT of the genesis block, older versions of bitcoin core would not read regtest directories created with newer versions without a reindex. Github-Pull: bitcoin#24527 Rebased-From: 5ce3057
5ce3057 test: set segwit height back to 0 on regtest (Martin Zumsande) Pull request description: The change of `consensus.SegwitHeight` from 0 to 1 for regtest in bitcoin#22818 had the effect that if I create a regtest enviroment with current master (or 23.x), and then try to load this chain with an older version (22.x), I get an InitError `Witness data for blocks after height 0 requires validation. Please restart with -reindex` and have to reindex because `BLOCK_OPT_WITNESS` is no longer set for the Genesis block and `NeedsRedownload()` in validation returns `true` with an older version. That might be a bit annoying for tests that use a shared regtest dir with different versions. If people think this is enough of an issue to be worth fixing, I think it should also make it into 23.x ACKs for top commit: theStack: Concept and code-review ACK 5ce3057 Tree-SHA512: b0e89ff7fc953bc0ae929d2da44cde7149321d987fb4763934f6c9635d00d807129a50b459cc5e69e86bb1819e4b063b969486e8016a1cb8db8f905fa315653d
All softforks that are active at the tip of mainnet, should also be active from genesis in regtest. Otherwise their rules might not be enforced in user testing, thus making their testing less useful.
To still allow tests to check pre-softfork rules, a runtime argument can change the activation height.