mirror of
https://github.com/FlipsideCrypto/dcrd.git
synced 2026-02-06 19:06:51 +00:00
This removes the ScriptVerifyStrictEncoding flag from the txscript package, changes the default semantics to always enforce its behavior and updates all callers in the repository accordingly. This change is being made to simplify the script engine code since the flag has always been active and required by consensus in Decred, so there is no need to require a flag to conditionally toggle it. It should be noted that the tests removed from script_valid.json specifically dealt with ensuring signatures not compliant with DER encoding did not cause execution to halt early on invalid signatures when neither of the ScriptVerifyStrictEncoding or ScriptVerifyDERSignatures flags were set. Therefore, they are no longer necessary. For nearly the same reason, the tx test related to the empty pubkey tx_valid.json was moved to tx_invalid.json. In particular, an empty pubkey without ScriptVerifyStrictEncoding simply failed the signature check and continued execution, while the same condition with the flag halts execution. Thus, without the flag the final NOT in the script would allow the script to succeed, while it does not under the strict encoding rules. Finally, the STRICTENC indicator to enable the flag in the test data has been retained for now in order to keep the logic changes separate. |
||
|---|---|---|
| .. | ||
| LICENSE | ||
| many_inputs_tx.hex | ||
| script_invalid.json | ||
| script_valid.json | ||
| sighash.json | ||
| tx_invalid.json | ||
| tx_valid.json | ||