Skip to main content

InterpreterErrorCode

Enum InterpreterErrorCode 

Source
pub enum InterpreterErrorCode {
Show 62 variants Internal, Ok, InvalidFlags, InvalidIndex, UnsupportedAddress, NotMultisigScript, TooManyRequiredSigs, TooMuchNullData, InvalidParams, EarlyReturn, EmptyStack, EvalFalse, ScriptUnfinished, InvalidProgramCounter, ScriptTooBig, ElementTooBig, TooManyOperations, StackOverflow, InvalidPubKeyCount, InvalidSignatureCount, NumberTooBig, NumberTooSmall, DivideByZero, Verify, EqualVerify, NumEqualVerify, CheckSigVerify, CheckMultiSigVerify, DisabledOpcode, ReservedOpcode, MalformedPush, InvalidStackOperation, UnbalancedConditional, InvalidInputLength, MinimalData, MinimalIf, InvalidSigHashType, SigTooShort, SigTooLong, SigInvalidSeqID, SigInvalidDataLen, SigMissingSTypeID, SigMissingSLen, SigInvalidSLen, SigInvalidRIntID, SigZeroRLen, SigNegativeR, SigTooMuchRPadding, SigInvalidSIntID, SigZeroSLen, SigNegativeS, SigTooMuchSPadding, SigHighS, NotPushOnly, SigNullDummy, PubKeyType, CleanStack, NullFail, DiscourageUpgradableNOPs, NegativeLockTime, UnsatisfiedLockTime, IllegalForkID,
}
Expand description

Error codes for the script interpreter.

Variants§

§

Internal

An internal interpreter error occurred.

§

Ok

No error; used as a sentinel for early successful return.

§

InvalidFlags

The combination of script flags is invalid.

§

InvalidIndex

An index is out of range for the operation.

§

UnsupportedAddress

The address type is not supported.

§

NotMultisigScript

The script is not a valid multisig script.

§

TooManyRequiredSigs

The number of required signatures exceeds the allowed maximum.

§

TooMuchNullData

The OP_RETURN data payload exceeds the allowed size.

§

InvalidParams

Invalid parameters were supplied to the interpreter.

§

EarlyReturn

Script execution returned early (post-genesis OP_RETURN).

§

EmptyStack

The stack is empty when an operand was expected.

§

EvalFalse

The top stack value is false at the end of script execution.

§

ScriptUnfinished

Script execution ended before all opcodes were processed.

§

InvalidProgramCounter

The program counter points to an invalid script position.

§

ScriptTooBig

The script exceeds the maximum allowed size.

§

ElementTooBig

A data element exceeds the maximum allowed element size.

§

TooManyOperations

The number of non-push opcodes exceeds the allowed maximum.

§

StackOverflow

The combined data and alt stack size exceeds the allowed maximum.

§

InvalidPubKeyCount

The public key count in a multisig is out of range.

§

InvalidSignatureCount

The signature count in a multisig is out of range.

§

NumberTooBig

A numeric operand exceeds the maximum allowed byte length.

§

NumberTooSmall

A numeric operand is below the minimum allowed value.

§

DivideByZero

Division or modulo by zero was attempted.

§

Verify

OP_VERIFY failed because the top stack value is false.

§

EqualVerify

OP_EQUALVERIFY failed because the top two values are not equal.

§

NumEqualVerify

OP_NUMEQUALVERIFY failed because the top two numeric values differ.

§

CheckSigVerify

OP_CHECKSIGVERIFY failed because signature verification failed.

§

CheckMultiSigVerify

OP_CHECKMULTISIGVERIFY failed because multisig verification failed.

§

DisabledOpcode

A disabled opcode was encountered during execution.

§

ReservedOpcode

A reserved opcode was encountered during execution.

§

MalformedPush

A push opcode has a malformed or truncated data payload.

§

InvalidStackOperation

A stack operation references an invalid stack index.

§

UnbalancedConditional

An IF/ELSE/ENDIF block is not properly balanced.

§

InvalidInputLength

An input length is invalid for the operation.

§

MinimalData

A data push does not use the minimal encoding required by policy.

§

MinimalIf

An OP_IF/OP_NOTIF argument is not minimally encoded (must be empty or 0x01).

§

InvalidSigHashType

The sighash type byte in a signature is invalid.

§

SigTooShort

The DER-encoded signature is shorter than the minimum valid length.

§

SigTooLong

The DER-encoded signature is longer than the maximum valid length.

§

SigInvalidSeqID

The DER sequence identifier byte is missing or invalid.

§

SigInvalidDataLen

The DER data length field does not match the actual signature length.

§

SigMissingSTypeID

The DER S-type identifier byte (0x02) is missing.

§

SigMissingSLen

The DER S-length field is missing.

§

SigInvalidSLen

The DER S-length value is invalid.

§

SigInvalidRIntID

The DER R integer type identifier byte (0x02) is invalid.

§

SigZeroRLen

The DER R value has zero length.

§

SigNegativeR

The DER R value is negative (leading byte has high bit set without padding).

§

SigTooMuchRPadding

The DER R value has excessive zero-byte padding.

§

SigInvalidSIntID

The DER S integer type identifier byte (0x02) is invalid.

§

SigZeroSLen

The DER S value has zero length.

§

SigNegativeS

The DER S value is negative (leading byte has high bit set without padding).

§

SigTooMuchSPadding

The DER S value has excessive zero-byte padding.

§

SigHighS

The S value in the signature is not in the low-S canonical form.

§

NotPushOnly

The unlocking script contains non-push opcodes when push-only is required.

§

SigNullDummy

The dummy element for OP_CHECKMULTISIG is not empty (null dummy rule).

§

PubKeyType

A public key does not conform to the required encoding format.

§

CleanStack

The stack contains extra items after execution when clean stack is enforced.

§

NullFail

A failed signature check did not have an empty signature (NULLFAIL rule).

§

DiscourageUpgradableNOPs

An upgradable NOP opcode was encountered and the discourage flag is set.

§

NegativeLockTime

The lock time value is negative.

§

UnsatisfiedLockTime

The transaction lock time does not satisfy OP_CHECKLOCKTIMEVERIFY.

§

IllegalForkID

The SIGHASH_FORKID flag is missing or incorrectly set.

Trait Implementations§

Source§

impl Clone for InterpreterErrorCode

Source§

fn clone(&self) -> InterpreterErrorCode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InterpreterErrorCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for InterpreterErrorCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for InterpreterErrorCode

Source§

fn eq(&self, other: &InterpreterErrorCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for InterpreterErrorCode

Source§

impl Eq for InterpreterErrorCode

Source§

impl StructuralPartialEq for InterpreterErrorCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V