From 72422ce396b8eba7b1a72c171c2f07dae691d1b5 Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Fri, 11 Sep 2020 14:34:02 -0700 Subject: Implement Tapscript script validation rules (BIP 342) This adds a new `SigVersion::TAPSCRIPT`, makes the necessary interpreter changes to make it implement BIP342, and uses them for leaf version 0xc0 in Taproot script path spends. --- src/script/script_error.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/script/script_error.h') diff --git a/src/script/script_error.h b/src/script/script_error.h index 59d3e565a..b07168161 100644 --- a/src/script/script_error.h +++ b/src/script/script_error.h @@ -57,6 +57,8 @@ typedef enum ScriptError_t SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS, SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM, SCRIPT_ERR_DISCOURAGE_UPGRADABLE_TAPROOT_VERSION, + SCRIPT_ERR_DISCOURAGE_OP_SUCCESS, + SCRIPT_ERR_DISCOURAGE_UPGRADABLE_PUBKEYTYPE, /* segregated witness */ SCRIPT_ERR_WITNESS_PROGRAM_WRONG_LENGTH, @@ -72,6 +74,9 @@ typedef enum ScriptError_t SCRIPT_ERR_SCHNORR_SIG_HASHTYPE, SCRIPT_ERR_SCHNORR_SIG, SCRIPT_ERR_TAPROOT_WRONG_CONTROL_SIZE, + SCRIPT_ERR_TAPSCRIPT_VALIDATION_WEIGHT, + SCRIPT_ERR_TAPSCRIPT_CHECKMULTISIG, + SCRIPT_ERR_TAPSCRIPT_MINIMALIF, /* Constant scriptCode */ SCRIPT_ERR_OP_CODESEPARATOR, -- cgit v1.2.3