policy: Allow non-standard scripts with -acceptnonstdtxn=1 (test nets only) #29843

pull ajtowns wants to merge 2 commits into bitcoin:master from ajtowns:202303-acceptnonstdscript changing 2 files +15 −13
  1. ajtowns commented at 9:08 am on April 10, 2024: contributor
    This PR changes -acceptnonstdtxn=1 so that it also skips the non-mandatory script checks, allowing txs that (eg) use OP_NOPx or OP_SUCCESS into the mempool. This remains only available on test nets.
  2. DrahtBot commented at 9:08 am on April 10, 2024: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept ACK 1440000bytes, benthecarman, glozow

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    No conflicts as of last run.

  3. DrahtBot added the label TX fees and policy on Apr 10, 2024
  4. ajtowns commented at 9:15 am on April 10, 2024: contributor

    Previous discussion in #28334.

    If you enable this feature as a non-mining node, you risk having txs pinned in your mempool that conflict or double-spend standard txs in the normal mempool, which may cause problems with applications or layer-2 protocols.

    If you enable this feature as a mining node, you have a small risk of ending up with invalid txs remaining in your mempool if a tx non-standard tx is accepted in your mempool and remains in there during a soft-fork activation that renders the tx invalid. At that point if that tx is included in blocks you generate, they will be invalid.

    For these reasons this feature continues to only be available on test nets, not mainnet.

    Having this be available in mainline bitcoin may make it easier to observe test transactions using proposed new soft-fork features (eg OP_CAT or SIGHASH_APO is enabled via the inquisition client which considers those txs standard, but the mainline client will consider them non-standard and has no option to accept them). discussion link

  5. ajtowns requested review from instagibbs on Apr 10, 2024
  6. 1440000bytes commented at 7:02 pm on April 12, 2024: none
    Concept ACK
  7. benthecarman commented at 7:36 pm on April 12, 2024: contributor
    Concept ACK this would be nice for testing soft forks on test networks
  8. luke-jr commented at 1:44 am on April 21, 2024: member
    Seems like this goes beyond the expected behaviour. Maybe make it =2 at least?
  9. glozow commented at 11:20 am on April 22, 2024: member
    concept ACK fwiw
  10. instagibbs commented at 1:53 pm on April 22, 2024: member

    Seems like this goes beyond the expected behaviour. Maybe make it =2 at least?

    Since these are test-network-only changes, are we required to preserve current behavior?

  11. twosatsmaxi commented at 3:54 pm on April 25, 2024: none
    Following.
  12. DrahtBot added the label CI failed on May 15, 2024
  13. DrahtBot commented at 0:51 am on May 15, 2024: contributor

    🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the documentation.

    Possibly this is due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    Leave a comment here, if you need help tracking down a confusing failure.

    Debug: https://github.com/bitcoin/bitcoin/runs/23651574970

  14. tests: in p2p_segwit, check non-mandatory errors with -acceptnonstdtxn=0 node
    Prepare for updating -acceptnonstdtxn to allow txns that violate
    STANDARD_SCRIPT_VERIFY_FLAGS but not MANDATORY_SCRIPT_VERIFY_FLAGS by
    checking the non-mandatory flags with node that enforces standardness.
    3118c2e365
  15. validation: Check only MANDATORY_SCRIPT_VERIFY_FLAGS when -acceptnonstdtxn is set affee04f7a
  16. ajtowns force-pushed on May 16, 2024
  17. ajtowns commented at 3:54 pm on May 16, 2024: contributor
    Bumped past #29086
  18. DrahtBot removed the label CI failed on May 16, 2024
  19. luke-jr commented at 1:43 am on June 8, 2024: member

    Since these are test-network-only changes, are we required to preserve current behavior?

    Whether you are required to or not, it is the correct thing to do. This option originated in Knots where it has always been available on mainnet, and expected to not enable upgradable opcodes/etc.

  20. achow101 requested review from glozow on Oct 15, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-03 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me