dash/src/script
Wladimir J. van der Laan 5757e0d9e3
Merge #10699: Make all script validation flags backward compatible
01013f5 Simplify tx validation tests (Pieter Wuille)
2dd6f80 Add a test that all flags are softforks (Pieter Wuille)
2851b77 Make all script verification flags softforks (Pieter Wuille)

Pull request description:

  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.

Tree-SHA512: d3b4538986ecf646aac9dba13a8d89318baf9e308e258547ca3b99e7c0509747f323edac6b1fea4e87e7d3c01b71193794b41679ae4f86f6e11ed6be3fd62c72
2020-04-05 11:06:13 -05:00
..
dashconsensus.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
dashconsensus.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
interpreter.cpp Merge #10699: Make all script validation flags backward compatible 2020-04-05 11:06:13 -05:00
interpreter.h Merge #10699: Make all script validation flags backward compatible 2020-04-05 11:06:13 -05:00
ismine.cpp Merge #10574: Remove includes in .cpp files for things the corresponding .h file already included 2020-04-01 12:43:18 -05:00
ismine.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
script_error.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
script_error.h Merge #8634: Add policy: null signature for failed CHECK(MULTI)SIG 2018-01-12 08:02:45 +01:00
script.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
script.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
sigcache.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
sigcache.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
sign.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
sign.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
standard.cpp Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00
standard.h Backport 11651 (#3358) 2020-03-20 01:46:56 +03:00