Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fRequireStandardConsensus global and -allownonstdtxnconsensus option #39

Merged

Conversation

EyeOfPython
Copy link
Collaborator

@EyeOfPython EyeOfPython commented Mar 7, 2021

  • Add fRequireStandardConsensus flag:
    • Enforces IsStandardTx on txs in a block (including the coinbase).
    • Adds STANDARD_SCRIPT_VERIFY_FLAGS to the script flags for txs in a block.
  • Adds -allownonstdtxnconsensus option (defaults to -acceptnonstdtxn) to disable the above behavior.
  • -allownonstdtxnconsensus=1 by default for tests in BasicTestingSetup.
  • Add -allownonstdtxnconsensus=1 in functional tests that depend on non-standard txs in blocks, but which didn't enable -acceptnonstdtxn.

@EyeOfPython EyeOfPython force-pushed the require_standard_consensus branch 7 times, most recently from ff37777 to 66af577 Compare March 7, 2021 18:45
@EyeOfPython EyeOfPython changed the title Add fEnforceStandardConsensus global and -allownonstdtxn option Add fRequireStandardConsensus global and -allownonstdtxnconsensus option Mar 7, 2021
@EyeOfPython EyeOfPython force-pushed the require_standard_consensus branch 2 times, most recently from 8d47e0f to b500626 Compare March 7, 2021 18:46
// Enforce standardness on all txs.
if (fRequireStandardConsensus) {
std::string reason;
if (!IsStandardTx(tx, fIsBareMultisigStd, CFeeRate(Amount::zero()),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having PTSD looking at this.

Copy link
Collaborator

@schancel schancel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@EyeOfPython EyeOfPython force-pushed the require_standard_consensus branch 2 times, most recently from caecc70 to 0354ad7 Compare March 7, 2021 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants