pub enum SnapSyncError {
Show 32 variants
Provider(ProviderError),
Request(RequestError),
AccountRangeRequest(InvalidAccountRange),
StorageRequest(InvalidStorageRangeRequest),
BlockAccessListRequest(InvalidBlockAccessListRequest),
UnsupportedStorage,
NoAttempt,
StaleWrite {
attempt: SnapAttemptId,
state_version: u64,
},
RootMismatch {
expected: B256,
got: B256,
},
NoCatchUpProgress,
MissingHeader {
block: u64,
},
OutOfOrderBlock {
expected: u64,
got: u64,
},
BlockPastPivot {
pivot: u64,
block: u64,
},
PivotNotAdvanced {
pivot: u64,
target: u64,
},
CatchUpBehindPivot {
applied: u64,
pivot: u64,
},
NonCanonicalBlock {
block: u64,
hash: B256,
},
ForkedBlock {
expected: B256,
got: B256,
},
NoCoverage,
UnsupportedRecord {
key: &'static str,
version: Option<u64>,
},
OutOfOrderRange {
expected: Option<B256>,
got: B256,
},
NoProgress {
origin: B256,
},
OutOfOrderStorage {
account: B256,
from: B256,
},
MissingStorage {
account: B256,
},
StorageRootMismatch {
account: B256,
expected: B256,
got: B256,
},
UnexpectedStorage {
account: B256,
},
MissingCode {
hash: B256,
},
CodeMismatch {
expected: B256,
got: B256,
},
PendingRepairs {
accounts: usize,
},
IncompleteAccounts {
next: B256,
},
GenesisPivot,
Cancelled,
PivotBelowAncestor {
ancestor: u64,
target: u64,
},
}Expand description
Error returned while assembling a snap state generation.
Variants§
Provider(ProviderError)
A header lookup failed.
Request(RequestError)
A request for state failed.
AccountRangeRequest(InvalidAccountRange)
An account range was requested with its origin past its limit.
StorageRequest(InvalidStorageRangeRequest)
A storage request did not match the accounts it was built from.
BlockAccessListRequest(InvalidBlockAccessListRequest)
A block access list request did not match the headers it was built from.
UnsupportedStorage
The storage layout keys state by address, which snap cannot fill in without preimages.
NoAttempt
No attempt owns the persisted state.
StaleWrite
A write was presented for an attempt or pivot that no longer owns the persisted state.
Fields
attempt: SnapAttemptIdAttempt the rejected write claims.
RootMismatch
A range was proved against a root other than the one the attempt downloads.
Fields
expected: B256Root the attempt currently downloads.
got: B256Root the range was proved against.
NoCatchUpProgress
No catch-up progress is recorded for the attempt.
MissingHeader
A block the catch-up needs has no header.
OutOfOrderBlock
A list was applied for a block other than the one continuing the applied sequence.
BlockPastPivot
A list was applied for a block past the pivot.
PivotNotAdvanced
The pivot was moved to a block not past the current one.
CatchUpBehindPivot
Catch-up has not carried the downloaded state to the pivot, which committing storage persisted ahead of its range or completing the attempt requires.
NonCanonicalBlock
A list was applied for a block the canonical chain no longer holds.
ForkedBlock
A list was applied for a block building on another chain than the applied state.
Fields
expected: B256Hash of the last applied block.
got: B256Hash the block the list belongs to builds on.
NoCoverage
No account coverage is recorded for the attempt.
UnsupportedRecord
A persisted progress record this build cannot read.
Fields
OutOfOrderRange
A range was downloaded from somewhere other than the next key to cover.
Fields
got: B256Key the range was requested from.
NoProgress
A verified range proved nothing past the key it was requested from.
Fields
origin: B256Key the range was requested from.
OutOfOrderStorage
Storage was downloaded from somewhere other than where its contract’s progress continues.
MissingStorage
An account with storage was committed without it.
Fields
account: B256Hashed address of the account.
StorageRootMismatch
The storage supplied for an account does not hash to the root the account commits to.
Fields
account: B256Hashed address of the account.
expected: B256Storage root the account commits to.
got: B256Root of the supplied storage.
UnexpectedStorage
Storage was supplied for an account that is not in the range or has none.
Fields
account: B256Hashed address the storage was supplied for.
MissingCode
An account’s code is neither supplied nor stored.
Fields
hash: B256Hash of the missing code.
CodeMismatch
Code was supplied under a hash it does not hash to.
PendingRepairs
Scheduled accounts remain to be fetched again at the pivot.
IncompleteAccounts
Account ranges remain to be downloaded.
Fields
next: B256Key the next range is requested from.
GenesisPivot
The pivot is the genesis block, whose trie the merkle stage never rebuilds.
Cancelled
Work stopped because its session was cancelled.
PivotBelowAncestor
A reorg was recovered to a pivot below the last block both branches share.
Implementations§
Source§impl SnapSyncError
impl SnapSyncError
Sourcepub const fn is_transient(&self) -> bool
pub const fn is_transient(&self) -> bool
Whether the node’s progress resolves this error, as new peers serve the state or missing headers are downloaded.
A closed channel means the network is gone, not that peers lack the state.
Trait Implementations§
Source§impl Debug for SnapSyncError
impl Debug for SnapSyncError
Source§impl Display for SnapSyncError
impl Display for SnapSyncError
Source§impl Error for SnapSyncError
impl Error for SnapSyncError
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
use the Display impl or to_string()
Source§impl From<DatabaseError> for SnapSyncError
impl From<DatabaseError> for SnapSyncError
Source§impl From<InvalidAccountRange> for SnapSyncError
impl From<InvalidAccountRange> for SnapSyncError
Source§impl From<InvalidBlockAccessListRequest> for SnapSyncError
impl From<InvalidBlockAccessListRequest> for SnapSyncError
Source§impl From<InvalidStorageRangeRequest> for SnapSyncError
impl From<InvalidStorageRangeRequest> for SnapSyncError
Source§impl From<ProviderError> for SnapSyncError
impl From<ProviderError> for SnapSyncError
Auto Trait Implementations§
impl !RefUnwindSafe for SnapSyncError
impl !UnwindSafe for SnapSyncError
impl Freeze for SnapSyncError
impl Send for SnapSyncError
impl Sync for SnapSyncError
impl Unpin for SnapSyncError
impl UnsafeUnpin for SnapSyncError
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
§impl<T> Conv for T
impl<T> Conv for T
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<TxEnv, T> FromRecoveredTx<&T> for TxEnvwhere
TxEnv: FromRecoveredTx<T>,
impl<TxEnv, T> FromRecoveredTx<&T> for TxEnvwhere
TxEnv: FromRecoveredTx<T>,
§fn from_recovered_tx(tx: &&T, sender: Address) -> TxEnv
fn from_recovered_tx(tx: &&T, sender: Address) -> TxEnv
TxEnv] from a transaction and a sender address.§impl<TxEnv, T> FromTxWithEncoded<&T> for TxEnvwhere
TxEnv: FromTxWithEncoded<T>,
impl<TxEnv, T> FromTxWithEncoded<&T> for TxEnvwhere
TxEnv: FromTxWithEncoded<T>,
§fn from_encoded_tx(tx: &&T, sender: Address, encoded: Bytes) -> TxEnv
fn from_encoded_tx(tx: &&T, sender: Address, encoded: Bytes) -> TxEnv
TxEnv] from a transaction, its sender, and encoded transaction bytes.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeDebug for Twhere
T: Debug,
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.§impl<T> TryConv for T
impl<T> TryConv for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 104 bytes
Size for each variant:
Provider: 63 bytesRequest: 1 byteAccountRangeRequest: 64 bytesStorageRequest: 87 bytesBlockAccessListRequest: 87 bytesUnsupportedStorage: 0 bytesNoAttempt: 0 bytesStaleWrite: 23 bytesRootMismatch: 64 bytesNoCatchUpProgress: 0 bytesMissingHeader: 15 bytesOutOfOrderBlock: 23 bytesBlockPastPivot: 23 bytesPivotNotAdvanced: 23 bytesCatchUpBehindPivot: 23 bytesNonCanonicalBlock: 47 bytesForkedBlock: 64 bytesNoCoverage: 0 bytesUnsupportedRecord: 39 bytesOutOfOrderRange: 65 bytesNoProgress: 32 bytesOutOfOrderStorage: 64 bytesMissingStorage: 32 bytesStorageRootMismatch: 96 bytesUnexpectedStorage: 32 bytesMissingCode: 32 bytesCodeMismatch: 64 bytesPendingRepairs: 15 bytesIncompleteAccounts: 32 bytesGenesisPivot: 0 bytesCancelled: 0 bytesPivotBelowAncestor: 23 bytes