ScriptError_t

Error codes returned by the Bitcoin Script interpreter.

Synopsis

Declared in <script/script_error.h>

enum ScriptError_t;

Members

NameDescription
SCRIPT_ERR_OK No error; the script evaluated successfully.
SCRIPT_ERR_UNKNOWN_ERROR An unspecified or unclassified evaluation error occurred.
SCRIPT_ERR_EVAL_FALSE The script completed but left a false value on the top of the stack.
SCRIPT_ERR_OP_RETURN Execution reached an OP_RETURN opcode, which marks the output as unspendable.
SCRIPT_ERR_SCRIPTNUM A script number operand was out of range or not minimally encoded.
SCRIPT_ERR_SCRIPT_SIZE The script exceeded the maximum allowed byte size.
SCRIPT_ERR_PUSH_SIZE A push operation exceeded the maximum allowed element size.
SCRIPT_ERR_OP_COUNT The script exceeded the maximum number of non-push opcodes.
SCRIPT_ERR_STACK_SIZE The combined stack and altstack exceeded the maximum allowed size.
SCRIPT_ERR_SIG_COUNT A CHECKMULTISIG operation specified an invalid number of signatures.
SCRIPT_ERR_PUBKEY_COUNT A CHECKMULTISIG operation specified an invalid number of public keys.
SCRIPT_ERR_VERIFY An OP_VERIFY operation failed because the top stack value was false.
SCRIPT_ERR_EQUALVERIFY An OP_EQUALVERIFY operation failed because the two values were not equal.
SCRIPT_ERR_CHECKMULTISIGVERIFY An OP_CHECKMULTISIGVERIFY operation failed signature verification.
SCRIPT_ERR_CHECKSIGVERIFY An OP_CHECKSIGVERIFY operation failed signature verification.
SCRIPT_ERR_NUMEQUALVERIFY An OP_NUMEQUALVERIFY operation failed because the two numbers were not equal.
SCRIPT_ERR_BAD_OPCODE The script contained an unknown or invalid opcode.
SCRIPT_ERR_DISABLED_OPCODE The script used an opcode that has been disabled.
SCRIPT_ERR_INVALID_STACK_OPERATION An operation was attempted on a stack with too few elements.
SCRIPT_ERR_INVALID_ALTSTACK_OPERATION An operation was attempted on an empty altstack.
SCRIPT_ERR_UNBALANCED_CONDITIONAL The script had mismatched OP_IF/OP_ELSE/OP_ENDIF conditionals.
SCRIPT_ERR_NEGATIVE_LOCKTIME A locktime value was negative.
SCRIPT_ERR_UNSATISFIED_LOCKTIME The transaction's locktime or sequence did not satisfy the required value.
SCRIPT_ERR_SIG_HASHTYPE A signature used an invalid or undefined sighash type.
SCRIPT_ERR_SIG_DER A signature was not a valid strict DER encoding.
SCRIPT_ERR_MINIMALDATA A data push did not use the minimal possible encoding.
SCRIPT_ERR_SIG_PUSHONLY A scriptSig contained non-push operations where only pushes are allowed.
SCRIPT_ERR_SIG_HIGH_S A signature had a high S value, violating the low-S requirement.
SCRIPT_ERR_SIG_NULLDUMMY The extra CHECKMULTISIG dummy argument was not an empty byte vector.
SCRIPT_ERR_PUBKEYTYPE A public key was not encoded in the required (compressed or uncompressed) form.
SCRIPT_ERR_CLEANSTACK The stack was not clean (held more than one element) after evaluation.
SCRIPT_ERR_MINIMALIF An OP_IF/OP_NOTIF argument was not a minimal true/false value.
SCRIPT_ERR_SIG_NULLFAIL A failed signature check did not provide an empty signature.
SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS The script used an upgradable NOP that policy discourages.
SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM The script used a witness program version reserved for future upgrades.
SCRIPT_ERR_DISCOURAGE_UPGRADABLE_TAPROOT_VERSION The script used a Taproot leaf version reserved for future upgrades.
SCRIPT_ERR_DISCOURAGE_OP_SUCCESS The Tapscript used an OP_SUCCESS opcode reserved for future upgrades.
SCRIPT_ERR_DISCOURAGE_UPGRADABLE_PUBKEYTYPE The script used a public key type reserved for future upgrades.
SCRIPT_ERR_WITNESS_PROGRAM_WRONG_LENGTH The witness program had a length invalid for its version.
SCRIPT_ERR_WITNESS_PROGRAM_WITNESS_EMPTY The witness for a witness program was empty.
SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH The witness did not match the committed witness program.
SCRIPT_ERR_WITNESS_MALLEATED A native witness program had a non-empty scriptSig.
SCRIPT_ERR_WITNESS_MALLEATED_P2SH A P2SH-wrapped witness program had extra scriptSig data.
SCRIPT_ERR_WITNESS_UNEXPECTED Witness data was provided for a non-witness input.
SCRIPT_ERR_WITNESS_PUBKEYTYPE A witness public key was not compressed as required.
SCRIPT_ERR_SCHNORR_SIG_SIZE A Schnorr signature had an invalid length.
SCRIPT_ERR_SCHNORR_SIG_HASHTYPE A Schnorr signature used an invalid sighash type.
SCRIPT_ERR_SCHNORR_SIG A Schnorr signature failed verification.
SCRIPT_ERR_TAPROOT_WRONG_CONTROL_SIZE A Taproot control block had an invalid size.
SCRIPT_ERR_TAPSCRIPT_VALIDATION_WEIGHT The Tapscript exceeded its signature validation weight budget.
SCRIPT_ERR_TAPSCRIPT_CHECKMULTISIG OP_CHECKMULTISIG(VERIFY) was used in Tapscript, where it is disallowed.
SCRIPT_ERR_TAPSCRIPT_MINIMALIF A Tapscript OP_IF/OP_NOTIF argument was not a minimal true/false value.
SCRIPT_ERR_TAPSCRIPT_EMPTY_PUBKEY A Tapscript signature check used an empty public key.
SCRIPT_ERR_OP_CODESEPARATOR OP_CODESEPARATOR was used where it is not permitted.
SCRIPT_ERR_SIG_FINDANDDELETE A signature was found in the scriptCode subject to FindAndDelete.
SCRIPT_ERR_ERROR_COUNT Sentinel value equal to the number of defined error codes.