HomePhabricator

Make standard flags based off consensus flags

Description

Make standard flags based off consensus flags

Summary:
We often see in upgrades that new consensus flags' activations
have to be duplicated both in the mempool-flags and block-flags.

Though we sometimes do the opposite (adding flags that are only
active in blocks but NOT in mempool, such as was done in the
overhaul of D2468), that is rare in comparison.

Since STANDARD_SCRIPT_VERIFY_FLAGS contains all flags set by
GetNextBlockScriptFlags (besides SCRIPT_ENABLE_REPLAY_PROTECTION),
this produces no change in the current output of
GetStandardScriptFlags under any conditions.

At the same time, I've also updated the documentation of
STANDARD_SCRIPT_VERIFY_FLAGS to clarify why we need it
and we can't just get away with using GetStandardScriptFlags.

Test Plan: ninja check-extended check-upgrade-activated-extended

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Maniphest Tasks: T704

Differential Revision: https://reviews.bitcoinabc.org/D5220

Details

Provenance
Mark Lundeberg <markblundeberg@users.noreply.github.com>Authored on Feb 8 2020, 05:33
markblundebergPushed on Feb 9 2020, 01:06
Reviewer
Restricted Project
Differential Revision
D5220: Make standard flags based off consensus flags
Parents
rABC26a48be39823: [python linting] apply aggressive mode in autopep8 (line wrapping)
Branches
Unknown
Tags
Unknown

Event Timeline

Mark Lundeberg <markblundeberg@users.noreply.github.com> committed rABCea1da0e8b2fa: Make standard flags based off consensus flags (authored by Mark Lundeberg <markblundeberg@users.noreply.github.com>).Feb 9 2020, 01:06