Page MenuHomePhabricator

Test OP_RETURN anti replay feature
ClosedPublic

Authored by deadalnix on Jun 13 2017, 22:35.

Details

Summary

As per title. This extends the test for activation to ensure OP_RETURN antireplay also triggers properly.

Test Plan
../qa/pull-tester/rpc-tests.py abc-p2p-activation.py

Diff Detail

Repository
rABC Bitcoin ABC
Branch
opretantireplay
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 289
Build 289: arc lint + arc unit

Event Timeline

Add a comment to explain what's being done in the integration test.

Update names as per request.

Nevermind, updated the wrong diff.

Built and passed in 6s. But see also comments.

qa/rpc-tests/abc-p2p-activation.py
268

As this checks for an OP_RETURN script - maybe also explicitly test here with an OP_RETURN script that does *not* contain the commitment?

276

The sunset rule should be tested as well?

Also, the OP_RETURN antireplay on <1MB blocks after activation should be tested.

IMO, all of these should also be tested for an invalid OP_RETURN replay protection script.

qa/rpc-tests/abc-p2p-activation.py
268

There is a unittest for that. This is proper testing activation. I think it's better to keep these separated.

276

I don't think we want to pile up huundread of thousands of blocks and have the user wait for it. There is another unit test for it, so I think we are good. We really aim at testing things activate properly here.

qa/rpc-tests/abc-p2p-activation.py
268

But is it also testing OP_RETURN after this special case has been introduced? However, your call...

276

Ok fair enough.

qa/rpc-tests/abc-p2p-activation.py
268

We test that this specific check is only done after the HF is enabled, essentially. With another commitment value, the check is never done, so it's not really relevant to the activation test.

This revision is now accepted and ready to land.Jun 14 2017, 21:23
This revision was automatically updated to reflect the committed changes.