Enum grin_chain::Error
source · pub enum Error {
Show 45 variants
Unfit(String),
Orphan,
DifficultyTooLow,
WrongTotalDifficulty,
LowEdgebits,
InvalidScaling,
InvalidPow,
OldBlock,
InvalidBlockProof {
source: Error,
},
InvalidBlockTime,
InvalidBlockHeight,
InvalidRoot,
InvalidMMRSize,
Keychain {
source: Error,
},
Secp {
source: Error,
},
AlreadySpent(Commitment),
DuplicateCommitment(Commitment),
ImmatureCoinbase,
MerkleProof,
OutputNotFound,
RangeproofNotFound,
TxKernelNotFound,
OutputSpent,
InvalidBlockVersion(HeaderVersion),
InvalidTxHashSet(String),
StoreErr(Error, String),
FileReadErr(String),
SerErr {
source: Error,
},
TxHashSetErr(String),
TxLockHeight,
NRDRelativeHeight,
GenesisBlockRequired,
Transaction {
source: Error,
},
Block(Error),
InvalidHeaderHeight(u64),
Other(String),
Committed {
source: Error,
},
Stopped,
Bitmap,
SyncError(String),
SegmentError {
source: SegmentError,
},
AbortingPIBDError,
SegmenterHeaderMismatch,
InvalidSegmentHeight,
InvalidSegment(String),
}
Expand description
Chain error definitions
Variants§
Unfit(String)
The block doesn’t fit anywhere in our chain
Orphan
Special case of orphan blocks
DifficultyTooLow
Difficulty is too low either compared to ours or the block PoW hash
WrongTotalDifficulty
Addition of difficulties on all previous block is wrong
LowEdgebits
Block header edge_bits is lower than our min
InvalidScaling
Scaling factor between primary and secondary PoW is invalid
InvalidPow
The proof of work is invalid
OldBlock
Peer abusively sending us an old block we already have
InvalidBlockProof
The block doesn’t sum correctly or a tx signature is invalid
InvalidBlockTime
Block time is too old
InvalidBlockHeight
Block height is invalid (not previous + 1)
InvalidRoot
One of the root hashes in the block is invalid
InvalidMMRSize
One of the MMR sizes in the block header is invalid
Keychain
Error from underlying keychain impl
Secp
Error from underlying secp lib
AlreadySpent(Commitment)
One of the inputs in the block has already been spent
DuplicateCommitment(Commitment)
An output with that commitment already exists (should be unique)
ImmatureCoinbase
Attempt to spend a coinbase output before it sufficiently matures.
MerkleProof
Error validating a Merkle proof (coinbase output)
OutputNotFound
Output not found
RangeproofNotFound
Rangeproof not found
TxKernelNotFound
Tx kernel not found
OutputSpent
output spent
InvalidBlockVersion(HeaderVersion)
Invalid block version, either a mistake or outdated software
InvalidTxHashSet(String)
We’ve been provided a bad txhashset
StoreErr(Error, String)
Internal issue when trying to save or load data from store
FileReadErr(String)
Internal issue when trying to save or load data from append only files
SerErr
Error serializing or deserializing a type
TxHashSetErr(String)
Error with the txhashset
TxLockHeight
Tx not valid based on lock_height.
NRDRelativeHeight
Tx is not valid due to NRD relative_height restriction.
GenesisBlockRequired
No chain exists and genesis block is required
Transaction
Error from underlying tx handling
Block(Error)
Error from underlying block handling
InvalidHeaderHeight(u64)
Attempt to retrieve a header at a height greater than the max allowed by u64 limits
Other(String)
Anything else
Committed
Error from summing and verifying kernel sums via committed trait.
Stopped
We cannot process data once the Grin server has been stopped.
Bitmap
Internal Roaring Bitmap error
SyncError(String)
Error during chain sync
SegmentError
PIBD segment related error
Fields
source: SegmentError
Conversion
AbortingPIBDError
We’ve decided to halt the PIBD process due to lack of supporting peers or otherwise failing to progress for a certain amount of time
SegmenterHeaderMismatch
The segmenter is associated to a different block header
InvalidSegmentHeight
Segment height not within allowed range
InvalidSegment(String)
Other issue with segment
Implementations§
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<SegmentError> for Error
impl From<SegmentError> for Error
source§fn from(source: SegmentError) -> Self
fn from(source: SegmentError) -> Self
source§impl PartialEq for Error
impl PartialEq for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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<'a, T> DefaultFeatures<'a> for T
impl<'a, T> DefaultFeatures<'a> for T
source§fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a>>
fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a>>
Box
behind a trait object of this trait.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.source§impl<'a, T> NonSyncFeatures<'a> for Twhere
T: 'a + Clone,
impl<'a, T> NonSyncFeatures<'a> for Twhere
T: 'a + Clone,
source§fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a>>
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a>>
Box
behind a trait object of this trait.