pub enum Failure {
Show 51 variants
ContractChainNetMismatch(ChainNet),
ResolverChainNetMismatch(ChainNet),
SchemaMismatch {
expected: SchemaId,
actual: SchemaId,
},
TypeSystemMismatch(SemId, Option<Ty<SemId>>, Ty<SemId>),
SchemaGlobalSemIdUnknown(GlobalStateType, SemId),
SchemaOwnedSemIdUnknown(AssignmentType, SemId),
SchemaMetaSemIdUnknown(MetaType, SemId),
SchemaOpEmptyInputs(OpFullType),
SchemaOpMetaTypeUnknown(OpFullType, MetaType),
SchemaOpGlobalTypeUnknown(OpFullType, GlobalStateType),
SchemaOpAssignmentTypeUnknown(OpFullType, AssignmentType),
SchemaUnknownTransitionType(OpId, TransitionType),
SchemaUnknownMetaType(OpId, MetaType),
SchemaUnknownGlobalStateType(OpId, GlobalStateType),
SchemaUnknownAssignmentType(OpId, AssignmentType),
SchemaUnknownSealClosingStrategy(OpId, SealClosingStrategy),
SchemaGlobalStateOccurrences(OpId, GlobalStateType, OccurrencesMismatch),
SchemaGlobalStateLimit(OpId, GlobalStateType, u16, u24),
SchemaNoMetadata(OpId, MetaType),
SchemaInvalidMetadata(OpId, SemId),
SchemaInvalidGlobalValue(OpId, GlobalStateType, SemId),
SchemaInvalidOwnedValue(OpId, AssignmentType, SemId),
SchemaInputOccurrences(OpId, AssignmentType, OccurrencesMismatch),
SchemaAssignmentOccurrences(OpId, AssignmentType, OccurrencesMismatch),
CyclicGraph(OpId),
OperationAbsent(OpId),
AnchorAbsent(BundleId),
WitnessIdAbsent(BundleId),
ContractMismatch(OpId, ContractId),
DoubleSpend(Opout),
ExtraKnownTransition(BundleId),
TransitionIdMismatch(OpId, OpId),
UnorderedTransition(OpId),
WitnessMissingInput(BundleId, OpId, Txid),
MissingInputMapTransition(BundleId, OpId),
NoPrevState {
opid: OpId,
prev_id: OpId,
state_type: AssignmentType,
},
NoPrevOut(OpId, Opout),
ConfidentialSeal(Opout),
SealNoPubWitness(BundleId, Txid, WitnessResolverError),
SealsInvalid(BundleId, Txid, String),
SealsUnvalidated(OpId),
MpcInvalid(BundleId, Txid, InvalidProof),
NoDbcOutput(Txid),
InvalidProofType(Txid, CloseMethod),
StateTypeMismatch {
opid: OpId,
state_type: AssignmentType,
expected: StateType,
found: StateType,
},
FungibleTypeMismatch {
opid: OpId,
state_type: AssignmentType,
expected: FungibleType,
found: FungibleType,
},
ScriptFailure(OpId, Option<u8>, Option<String>),
ContractStateFilled(OpId),
MissingScript(OpId, LibId),
ScriptIDMismatch(OpId, LibId, LibId),
Custom(String),
}
Variants§
ContractChainNetMismatch(ChainNet)
the contract chain-network pair doesn’t match (validator runs in chain_net={0} configuration).
ResolverChainNetMismatch(ChainNet)
the resolver chain-network pair doesn’t match (validator runs in chain_net={0} configuration).
SchemaMismatch
schema {actual} provided for the consignment validation doesn’t match schema {expected} used by the contract. This means that the consignment is invalid.
Fields
TypeSystemMismatch(SemId, Option<Ty<SemId>>, Ty<SemId>)
type with sem_id {0} does not match the trusted one {1:?} (found {2})
SchemaGlobalSemIdUnknown(GlobalStateType, SemId)
schema global state #{0} uses semantic data type absent in type library ({1}).
SchemaOwnedSemIdUnknown(AssignmentType, SemId)
schema owned state #{0} uses semantic data type absent in type library ({1}).
SchemaMetaSemIdUnknown(MetaType, SemId)
schema metadata #{0} uses semantic data type absent in type library ({1}).
SchemaOpEmptyInputs(OpFullType)
schema for {0} has zero inputs.
SchemaOpMetaTypeUnknown(OpFullType, MetaType)
schema for {0} references undeclared metadata type {1}.
SchemaOpGlobalTypeUnknown(OpFullType, GlobalStateType)
schema for {0} references undeclared global state type {1}.
SchemaOpAssignmentTypeUnknown(OpFullType, AssignmentType)
schema for {0} references undeclared owned state type {1}.
SchemaUnknownTransitionType(OpId, TransitionType)
operation {0} uses invalid state transition type {1}.
SchemaUnknownMetaType(OpId, MetaType)
operation {0} uses invalid metadata type {1}.
SchemaUnknownGlobalStateType(OpId, GlobalStateType)
operation {0} uses invalid global state type {1}.
SchemaUnknownAssignmentType(OpId, AssignmentType)
operation {0} uses invalid assignment type {1}.
SchemaUnknownSealClosingStrategy(OpId, SealClosingStrategy)
operation {0} uses invalid seal closing strategy {1}.
SchemaGlobalStateOccurrences(OpId, GlobalStateType, OccurrencesMismatch)
invalid number of global state entries of type {1} in operation {0} - {2}
SchemaGlobalStateLimit(OpId, GlobalStateType, u16, u24)
number of global state entries of type {1} in operation {0} exceeds schema-defined maximum for that global state type ({2} vs {3}).
SchemaNoMetadata(OpId, MetaType)
required metadata type {1} is not present in the operation {0}.
SchemaInvalidMetadata(OpId, SemId)
invalid metadata in operation {0} not matching semantic type id {1}.
SchemaInvalidGlobalValue(OpId, GlobalStateType, SemId)
invalid global state value in operation {0}, state type #{1} which does not match semantic type id {2}.
SchemaInvalidOwnedValue(OpId, AssignmentType, SemId)
invalid owned state value in operation {0}, state type #{1} which does not match semantic type id {2}.
SchemaInputOccurrences(OpId, AssignmentType, OccurrencesMismatch)
invalid number of input entries of type {1} in operation {0} - {2}
SchemaAssignmentOccurrences(OpId, AssignmentType, OccurrencesMismatch)
invalid number of assignment entries of type {1} in operation {0} - {2}
CyclicGraph(OpId)
operation {0} is referenced within the history multiple times. RGB contracts allow only direct acyclic graphs.
OperationAbsent(OpId)
operation {0} is absent from the consignment.
AnchorAbsent(BundleId)
anchor for transitio bundle {0} is absent in the consignment.
WitnessIdAbsent(BundleId)
witness id for transition bundle {0} is absent in the consignment.
ContractMismatch(OpId, ContractId)
operation {0} is under a different contract {1}.
DoubleSpend(Opout)
opout {0} appears more than once as input
ExtraKnownTransition(BundleId)
transition bundle {0} known transitions references a state transition which is not in the bundle input map.
TransitionIdMismatch(OpId, OpId)
transition claims ID {0} which differs from the actual one {1}
UnorderedTransition(OpId)
found a transition {0} not in order.
WitnessMissingInput(BundleId, OpId, Txid)
transition bundle {0} references non-existing input in witness {2} for the state transition {1}.
MissingInputMapTransition(BundleId, OpId)
transition bundle {0} input map is missing an opout {1} in input on a known transition
NoPrevState
transition {opid} references state type {state_type} absent in the outputs of previous state transition {prev_id}.
NoPrevOut(OpId, Opout)
transition {0} references non-existing previous output {1}.
ConfidentialSeal(Opout)
seal defined in the history as a part of operation output {0} is confidential and can’t be validated.
SealNoPubWitness(BundleId, Txid, WitnessResolverError)
bundle {0} public witness {1} is not known to the resolver. Resolver reported error {2}
SealsInvalid(BundleId, Txid, String)
transition bundle {0} doesn’t close seal with the witness {1}. Details: {2}
SealsUnvalidated(OpId)
single-use seals for the operation {0} were not validated, which probably indicates unanchored state transition.
MpcInvalid(BundleId, Txid, InvalidProof)
transition bundle {0} is not properly anchored to the witness {1}. Details: {2}
NoDbcOutput(Txid)
witness transaction {0} has no taproot or OP_RETURN output.
InvalidProofType(Txid, CloseMethod)
first DBC-compatible output of witness transaction {0} doesn’t match the provided proof type ({1})
StateTypeMismatch
state in {opid}/{state_type} is of {found} type, while schema requires it to be {expected}.
FungibleTypeMismatch
state in {opid}/{state_type} is of {found} type, while schema requires it to be {expected}.
ScriptFailure(OpId, Option<u8>, Option<String>)
evaluation of AluVM script for operation {0} has failed with the code {1:?} and message {2:?}.
ContractStateFilled(OpId)
contract state can’t fit more data (at operation id {0}).
MissingScript(OpId, LibId)
operation {0} commits to a missing script {1}.
ScriptIDMismatch(OpId, LibId, LibId)
operation {0} commits to a script which ID {1} doesn’t match the actual one {2}.
Custom(String)
Custom error by external services on top of RGB Consensus.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Failure
impl<'de> Deserialize<'de> for Failure
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl FromIterator<Failure> for Status
impl FromIterator<Failure> for Status
impl Eq for Failure
impl StructuralPartialEq for Failure
Auto Trait Implementations§
impl Freeze for Failure
impl RefUnwindSafe for Failure
impl Send for Failure
impl Sync for Failure
impl Unpin for Failure
impl UnwindSafe for Failure
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.