aboutsummaryrefslogtreecommitdiff
path: root/src/script/script_error.cpp
diff options
context:
space:
mode:
authorJohnson Lau <jl2012@xbt.hk>2020-09-11 14:34:02 -0700
committerPieter Wuille <pieter@wuille.net>2020-10-12 17:18:24 -0700
commit72422ce396b8eba7b1a72c171c2f07dae691d1b5 (patch)
treed2aa2a75ed54579ed6ddac8f858cf3ca67605b48 /src/script/script_error.cpp
parent330de894a9a48515d9a473448b6c67adc3d188be (diff)
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.
Diffstat (limited to 'src/script/script_error.cpp')
-rw-r--r--src/script/script_error.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/script/script_error.cpp b/src/script/script_error.cpp
index 77add5194c..fadc04262c 100644
--- a/src/script/script_error.cpp
+++ b/src/script/script_error.cpp
@@ -75,6 +75,10 @@ std::string ScriptErrorString(const ScriptError serror)
return "Witness version reserved for soft-fork upgrades";
case SCRIPT_ERR_DISCOURAGE_UPGRADABLE_TAPROOT_VERSION:
return "Taproot version reserved for soft-fork upgrades";
+ case SCRIPT_ERR_DISCOURAGE_OP_SUCCESS:
+ return "OP_SUCCESSx reserved for soft-fork upgrades";
+ case SCRIPT_ERR_DISCOURAGE_UPGRADABLE_PUBKEYTYPE:
+ return "Public key version reserved for soft-fork upgrades";
case SCRIPT_ERR_PUBKEYTYPE:
return "Public key is neither compressed or uncompressed";
case SCRIPT_ERR_CLEANSTACK:
@@ -101,6 +105,12 @@ std::string ScriptErrorString(const ScriptError serror)
return "Invalid Schnorr signature";
case SCRIPT_ERR_TAPROOT_WRONG_CONTROL_SIZE:
return "Invalid Taproot control block size";
+ case SCRIPT_ERR_TAPSCRIPT_VALIDATION_WEIGHT:
+ return "Too much signature validation relative to witness weight";
+ case SCRIPT_ERR_TAPSCRIPT_CHECKMULTISIG:
+ return "OP_CHECKMULTISIG(VERIFY) is not available in tapscript";
+ case SCRIPT_ERR_TAPSCRIPT_MINIMALIF:
+ return "OP_IF/NOTIF argument must be minimal in tapscript";
case SCRIPT_ERR_OP_CODESEPARATOR:
return "Using OP_CODESEPARATOR in non-witness script";
case SCRIPT_ERR_SIG_FINDANDDELETE: