Page MenuHomePhabricator

Activate replay protection at the time the next HF is scheduled.
ClosedPublic

Authored by deadalnix on Mar 15 2018, 00:27.

Details

Summary

This code will remain in place until the next HF is implemented, which ensure that there will be replay protection between the chains in case a minority survives by default. Obviously, the minority can chose to also do a hard fork and remove that replay protection, but then it is up to the minority chain promoter to convince actor in the space.

Test Plan

Added an integration test which grills the replay protection activation and deactivation (in case of reorg)

Diff Detail

Repository
rABC Bitcoin ABC
Branch
replayprotectionactivation
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 2076
Build 2299: Bitcoin ABC Buildbot (legacy)
Build 2298: arc lint + arc unit

Event Timeline

jasonbcox added inline comments.
test/functional/abc-p2p-fullblocktest.py
52

Just for my understanding, this is to make the value so far in the future that it won't be hit by the test, right?

test/functional/abc-replay-protection.py
148–149

I noticed a fair number of modified methods like this in other tests. Not an action item for this diff, but we should consider consolidating some of the common features from these methods into blocktools.py in the future.

The change looks good to me. However, I didn't have time to do a detailed review of the entire test. From a high-level the test looks good. I encourage another reviewer to look over the test.

This revision is now accepted and ready to land.Mar 15 2018, 21:22
test/functional/abc-p2p-fullblocktest.py
52

We don't want the actual value to be reached, that'd screw up all the test assumptions.

test/functional/abc-replay-protection.py
148–149

Probably. That being said, code duplication is not as big of a deal in tests as it is in regular code. See https://evgenii.com/blog/code-duplication-in-unit-tests/ to understand why.

This revision was automatically updated to reflect the committed changes.