Make all script validation flags backward compatible #10699

pull sipa wants to merge 3 commits into bitcoin:master from sipa:20170628_softflags changing 5 files +33 −31
  1. sipa commented at 11:37 PM on June 28, 2017: member

    This change makes SCRIPT_VERIFY_UPGRADABLE_NOPS not apply to OP_CHECKLOCKTIMEVERIFY and OP_CHECKSEQUENCEVERIFY. This is a no-op as UPGRADABLE_NOPS is only set for mempool transactions, and those always have SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY and SCRIPT_VERIFY_CHECKSEQUENCEVERIFY set as well. The advantage is that setting more flags now always results in a reduction in acceptable scripts (=softfork).

    This results in a nice and testable property for validation, for which a new test is added.

    This also means that the introduction of a new definition for a NOP or witness version will likely need the following procedure (example OP_NOP8 here)

    • Remove OP_NOP8 from being affected by SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS.
    • Add a SCRIPT_VERIFY_DISCOURAGE_NOP8, which only applies to OP_NOP8.
    • Add a SCRIPT_VERIFY_NOP8 which implements the new consensus logic.
    • Before activation, add SCRIPT_VERIFY_DISCOURAGE_NOP8 to the mempool flags.
    • After activation, add SCRIPT_VERIFY_NOP8 to both the mempool and consensus flags.
  2. sipa cross-referenced this on Jun 28, 2017 from issue Cache full script execution results in addition to signatures by TheBlueMatt
  3. fanquake added the label Validation on Jun 29, 2017
  4. TheBlueMatt commented at 11:12 PM on June 30, 2017: contributor

    Can you rebase this on top of the now-merged #10192 to remove the extra checks in its test? Concept ACK.

  5. Make all script verification flags softforks 2851b77312
  6. Add a test that all flags are softforks 2dd6f80680
  7. Simplify tx validation tests 01013f5d2f
  8. sipa force-pushed on Jun 30, 2017
  9. sipa commented at 11:19 PM on June 30, 2017: member

    Done.

  10. TheBlueMatt commented at 7:25 PM on July 3, 2017: contributor

    utACK 01013f5d2fbe3fa86565c927bf7bb8ec0f525073 I did check some of the test changes failed appropriately, but wouldnt really call it a tested ACK per se.

  11. sipa cross-referenced this on Aug 17, 2017 from issue Offering my Bitcoin fuzzers by guidovranken
  12. jl2012 approved
  13. jl2012 commented at 7:31 AM on October 5, 2017: contributor

    utACK 01013f5

  14. laanwj commented at 2:01 PM on December 1, 2017: member

    utACK 2851b77312b55c8868acd4cd2c118e5a034606b7, reviewed both test and interpreter changes, they seem clear and contained and could discover no issues with the changed logic.

  15. laanwj merged this on Dec 12, 2017
  16. laanwj closed this on Dec 12, 2017

  17. laanwj referenced this in commit c0902624b0 on Dec 12, 2017
  18. azuchi referenced this in commit 991558848c on Jan 12, 2018
  19. jl2012 referenced this in commit bb0d367e4d on Dec 28, 2018
  20. jl2012 cross-referenced this on Dec 28, 2018 from issue [test] Apply maximal flags to tx_valid tests and minimal flags to tx_invalid tests by jl2012
  21. jl2012 referenced this in commit 1f24163586 on Dec 30, 2018
  22. jl2012 referenced this in commit 089d5c8119 on Jan 16, 2019
  23. braydonf referenced this in commit a111d0663c on Feb 2, 2019
  24. braydonf referenced this in commit 37fc9a78e4 on Feb 2, 2019
  25. braydonf cross-referenced this on Feb 2, 2019 from issue Update transaction and script tests by braydonf
  26. tuxcanfly referenced this in commit 1985175c2d on Apr 19, 2019
  27. PastaPastaPasta referenced this in commit 7543d14839 on Apr 4, 2020
  28. PastaPastaPasta referenced this in commit 5757e0d9e3 on Apr 5, 2020
  29. glozow referenced this in commit 97f5613bff on Aug 10, 2020
  30. glozow referenced this in commit 7e6f333067 on Aug 10, 2020
  31. glozow referenced this in commit 59999a1eab on Aug 10, 2020
  32. glozow referenced this in commit d9b0cdd5b5 on Aug 10, 2020
  33. glozow referenced this in commit e37ed4ed75 on Aug 10, 2020
  34. glozow referenced this in commit f719f7489e on Aug 10, 2020
  35. glozow referenced this in commit 8f801ab72c on Aug 11, 2020
  36. glozow cross-referenced this on Aug 11, 2020 from issue test: apply strict verification flags for transaction tests and assert backwards compatibility by glozow
  37. glozow referenced this in commit 110239f2ff on Aug 20, 2020
  38. glozow referenced this in commit 398151b81f on Dec 7, 2020
  39. glozow referenced this in commit 197c03cca8 on Jan 26, 2021
  40. glozow referenced this in commit 5786a818e1 on Feb 2, 2021
  41. laanwj referenced this in commit c263c3d7d2 on Feb 23, 2021
  42. sidhujag referenced this in commit 7deae1779c on Feb 23, 2021
  43. ckti referenced this in commit 0de343d5c6 on Mar 28, 2021
  44. glozow cross-referenced this on Sep 4, 2021 from issue Improve Transaction Tests Flags by JeremyRubin
  45. bitcoin locked this on Sep 8, 2021

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: 2026-05-19 06:54 UTC