The added arg -test=bip94
is only used in a functional test for BIP94. This is done because the default regtest consensus rules should follow mainnet, not testnet.
Fixes #31137.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For detailed information about the code coverage, see the test coverage report.
See the guideline for information on the review process.
Type | Reviewers |
---|---|
ACK | tdb3, rkrux, BrandonOdiwuor, laanwj, achow101 |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
The added regtest option -test=bip94 is only used in the functional
test for BIP94.
This is done because the default regtest consensus rules
should aim to follow to mainnet, not testnet.
22@@ -23,6 +23,7 @@ void SetupChainParamsBaseOptions(ArgsManager& argsman)
23 argsman.AddArg("-signet", "Use the signet chain. Equivalent to -chain=signet. Note that the network is defined by the -signetchallenge parameter", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS);
24 argsman.AddArg("-signetchallenge", "Blocks must satisfy the given script to be considered valid (only for signet networks; defaults to the global default signet test network challenge)", ArgsManager::ALLOW_ANY | ArgsManager::DISALLOW_NEGATION, OptionsCategory::CHAINPARAMS);
25 argsman.AddArg("-signetseednode", "Specify a seed node for the signet network, in the hostname[:port] format, e.g. sig.net:1234 (may be used multiple times to specify multiple seed nodes; defaults to the global default signet test network seed node(s))", ArgsManager::ALLOW_ANY | ArgsManager::DISALLOW_NEGATION, OptionsCategory::CHAINPARAMS);
26+ argsman.AddArg("-enforcebip94", "Enforce BIP94 consensus rules (designed for testnet4) on regtest. (regtest-only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS);
regtest
to make it doubly clear that it doesn’t do anything on other networks.
-test=<option>
hook would work.
-test=
. Changed it to that approach, as a a result a regtest
prefix is no longer necessary because -test=
will fail init on other networks anyway.
cr and light test ACK e60cecc8115d3b28be076792baa5e4ea26d353a6
Sanity checked by removing the argument and seeing that the test fails as expected.
0- self.restart_node(0, extra_args=['-test=bip94'])
1+ self.restart_node(0, extra_args=[])
0@@ -0,0 +1,4 @@
1+Test
2+------
3+
4+The BIP94 timewarp attack mitigation (designed for testnet4) is no longer active on the regtest network. (#31156)
doc/release-notes-prs
and putting it there?
I see there’s a release-notes
directory that contains notes for the releases.
Just following the process described in https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#release-notes - a change to that process should be discussed in a separate issue / PR - whatever works best for the maintainers I guess, personally I don’t care at all.
Thanks for sharing, I didn’t know there is a process already for this.
tACK e60cecc8115d3b28be076792baa5e4ea26d353a6
Successful make and functional tests. Agree with the approach to enable BIP94 on regtest through the test argument.
-test=<option>
hook, that’s a nice solution. Post-merge concept ACK.