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. fanquake added the label Validation on Jun 29, 2017
  3. TheBlueMatt commented at 11:12 pm on June 30, 2017: member
    Can you rebase this on top of the now-merged #10192 to remove the extra checks in its test? Concept ACK.
  4. Make all script verification flags softforks 2851b77312
  5. Add a test that all flags are softforks 2dd6f80680
  6. Simplify tx validation tests 01013f5d2f
  7. sipa force-pushed on Jun 30, 2017
  8. sipa commented at 11:19 pm on June 30, 2017: member
    Done.
  9. TheBlueMatt commented at 7:25 pm on July 3, 2017: member
    utACK 01013f5d2fbe3fa86565c927bf7bb8ec0f525073 I did check some of the test changes failed appropriately, but wouldnt really call it a tested ACK per se.
  10. jl2012 approved
  11. jl2012 commented at 7:31 am on October 5, 2017: contributor
    utACK 01013f5
  12. 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.
  13. laanwj merged this on Dec 12, 2017
  14. laanwj closed this on Dec 12, 2017

  15. laanwj referenced this in commit c0902624b0 on Dec 12, 2017
  16. azuchi referenced this in commit 991558848c on Jan 12, 2018
  17. jl2012 referenced this in commit bb0d367e4d on Dec 28, 2018
  18. jl2012 referenced this in commit 1f24163586 on Dec 30, 2018
  19. jl2012 referenced this in commit 089d5c8119 on Jan 16, 2019
  20. braydonf referenced this in commit a111d0663c on Feb 2, 2019
  21. braydonf referenced this in commit 37fc9a78e4 on Feb 2, 2019
  22. tuxcanfly referenced this in commit 1985175c2d on Apr 19, 2019
  23. PastaPastaPasta referenced this in commit 7543d14839 on Apr 4, 2020
  24. PastaPastaPasta referenced this in commit 5757e0d9e3 on Apr 5, 2020
  25. glozow referenced this in commit 97f5613bff on Aug 10, 2020
  26. glozow referenced this in commit 7e6f333067 on Aug 10, 2020
  27. glozow referenced this in commit 59999a1eab on Aug 10, 2020
  28. glozow referenced this in commit d9b0cdd5b5 on Aug 10, 2020
  29. glozow referenced this in commit e37ed4ed75 on Aug 10, 2020
  30. glozow referenced this in commit f719f7489e on Aug 10, 2020
  31. glozow referenced this in commit 8f801ab72c on Aug 11, 2020
  32. glozow referenced this in commit 110239f2ff on Aug 20, 2020
  33. glozow referenced this in commit 398151b81f on Dec 7, 2020
  34. glozow referenced this in commit 197c03cca8 on Jan 26, 2021
  35. glozow referenced this in commit 5786a818e1 on Feb 2, 2021
  36. laanwj referenced this in commit c263c3d7d2 on Feb 23, 2021
  37. sidhujag referenced this in commit 7deae1779c on Feb 23, 2021
  38. ckti referenced this in commit 0de343d5c6 on Mar 28, 2021
  39. DrahtBot 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: 2024-11-22 03:12 UTC

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