Remove Automatic Replay Protection
- Removes the
-replayprotectionactivationtime
config option. - Removes the
IsReplayProtectionEnabled
function which checks whether ARP is active. - Removes the
SCRIPT_ENABLE_REPLAY_PROTECTION
script flag which modifies the fork value (|= 0xff0000
,^= 0xdead
) when ARP is active.
This was super easy. However, deciding what to do with the tests was a bit more complex:
- Some unit tests for
SCRIPT_ENABLE_REPLAY_PROTECTION
have been removed. - Some unit tests for
SCRIPT_ENABLE_REPLAY_PROTECTION
have been modified into tests that different fork values produce different signature hashes. - Some unit tests for
SCRIPT_ENABLE_REPLAY_PROTECTION
have been modified into tests that the modified fork value (now modified manually instead of via script flag) has the exact expected result. - The post-fork parts of functional tests for Automatic Replay Protection have been
strippedadapted by @freetrader. - Functional tests for other parts of upgrades no longer disable Automatic Replay Protection with
-replayprotectionactivationtime
.
Test plan: ninja check check-functional
(for the paranoid, check-all
also passes)
Edited by BigBlockIfTrue