-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Description
BIP94 which, amongst others, fixes the timewarp attack on testnet4, has been activated on regtest by #30681 (commit e85f386), in order to allow having a functional test for the new testnet4 behavior.
As I argued in #30681 (review) I believe that regtest's main task is to test mainnet behavior, and, as such, it shouldn't diverge from mainnet consensus rules unless there is a very good reason (e.g. for situations where a soft fork has been merged and is a candidate for activation on mainnet). I don't think testnet4 is a good enough reason - for example, writing test coverage for the actual unfixed timewarp issue will no longer be easily possible in a functional test, and if we end up fixing timwarp in a future softwork we might do it in a slightly different way than BIP94, which seems like it could easily get messy.
Possibilities to fix this (if desired) include:
- allowing to pass consensus parameters via command line (Reviving Tests: Chainparams: Make regtest almost fully customizable #17032 or do something similar), so BIP94 would only be active in the subtest where it's needed.
- rewriting the
mining_basic.py
subtesttest_timewarp
somehow - removing the test for
testnet4
, with the justification that testing mainnet should have priority over testing testnets.