Skip to main content

SnapSyncError

Enum SnapSyncError 

Source
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: SnapAttemptId

Attempt the rejected write claims.

§state_version: u64

State version the rejected write was proved against.

§

RootMismatch

A range was proved against a root other than the one the attempt downloads.

Fields

§expected: B256

Root the attempt currently downloads.

§got: B256

Root 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.

Fields

§block: u64

Block the header is missing for.

§

OutOfOrderBlock

A list was applied for a block other than the one continuing the applied sequence.

Fields

§expected: u64

Block the applied state continues at.

§got: u64

Block the list was applied for.

§

BlockPastPivot

A list was applied for a block past the pivot.

Fields

§pivot: u64

Block the attempt is anchored to.

§block: u64

Block the list was applied for.

§

PivotNotAdvanced

The pivot was moved to a block not past the current one.

Fields

§pivot: u64

Block the attempt is anchored to.

§target: u64

Block the pivot was moved to.

§

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.

Fields

§applied: u64

Last block whose list is applied.

§pivot: u64

Block the attempt is anchored to.

§

NonCanonicalBlock

A list was applied for a block the canonical chain no longer holds.

Fields

§block: u64

Number of the block.

§hash: B256

Hash of the block the list belongs to.

§

ForkedBlock

A list was applied for a block building on another chain than the applied state.

Fields

§expected: B256

Hash of the last applied block.

§got: B256

Hash 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

§key: &'static str

Metadata key the record is stored under.

§version: Option<u64>

Version found on disk, absent when the record carries no numeric version.

§

OutOfOrderRange

A range was downloaded from somewhere other than the next key to cover.

Fields

§expected: Option<B256>

Key the coverage continues at, or none once it is complete.

§got: B256

Key the range was requested from.

§

NoProgress

A verified range proved nothing past the key it was requested from.

Fields

§origin: B256

Key the range was requested from.

§

OutOfOrderStorage

Storage was downloaded from somewhere other than where its contract’s progress continues.

Fields

§account: B256

Hashed address of the contract.

§from: B256

Slot the storage was requested from.

§

MissingStorage

An account with storage was committed without it.

Fields

§account: B256

Hashed address of the account.

§

StorageRootMismatch

The storage supplied for an account does not hash to the root the account commits to.

Fields

§account: B256

Hashed address of the account.

§expected: B256

Storage root the account commits to.

§got: B256

Root of the supplied storage.

§

UnexpectedStorage

Storage was supplied for an account that is not in the range or has none.

Fields

§account: B256

Hashed address the storage was supplied for.

§

MissingCode

An account’s code is neither supplied nor stored.

Fields

§hash: B256

Hash of the missing code.

§

CodeMismatch

Code was supplied under a hash it does not hash to.

Fields

§expected: B256

Hash the code was supplied under.

§got: B256

Hash of the supplied code.

§

PendingRepairs

Scheduled accounts remain to be fetched again at the pivot.

Fields

§accounts: usize

Number of accounts still scheduled.

§

IncompleteAccounts

Account ranges remain to be downloaded.

Fields

§next: B256

Key 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.

Fields

§ancestor: u64

Last block both branches share.

§target: u64

Block the pivot was moved to.

Implementations§

Source§

impl SnapSyncError

Source

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.

Source

pub const fn is_reorg(&self) -> bool

Whether a block the attempt builds on left the canonical chain, so its downloaded state belongs to another fork.

Trait Implementations§

Source§

impl Debug for SnapSyncError

Source§

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

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

impl Display for SnapSyncError

Source§

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

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

impl Error for SnapSyncError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access #99301)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<DatabaseError> for SnapSyncError

Source§

fn from(error: DatabaseError) -> Self

Converts to this type from the input type.
Source§

impl From<InvalidAccountRange> for SnapSyncError

Source§

fn from(source: InvalidAccountRange) -> Self

Converts to this type from the input type.
Source§

impl From<InvalidBlockAccessListRequest> for SnapSyncError

Source§

fn from(source: InvalidBlockAccessListRequest) -> Self

Converts to this type from the input type.
Source§

impl From<InvalidStorageRangeRequest> for SnapSyncError

Source§

fn from(source: InvalidStorageRangeRequest) -> Self

Converts to this type from the input type.
Source§

impl From<ProviderError> for SnapSyncError

Source§

fn from(source: ProviderError) -> Self

Converts to this type from the input type.
Source§

impl From<RequestError> for SnapSyncError

Source§

fn from(source: RequestError) -> Self

Converts to this type from the input type.

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
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<TxEnv, T> FromRecoveredTx<&T> for TxEnv
where TxEnv: FromRecoveredTx<T>,

§

fn from_recovered_tx(tx: &&T, sender: Address) -> TxEnv

Builds a [TxEnv] from a transaction and a sender address.
§

impl<TxEnv, T> FromTxWithEncoded<&T> for TxEnv
where TxEnv: FromTxWithEncoded<T>,

§

fn from_encoded_tx(tx: &&T, sender: Address, encoded: Bytes) -> TxEnv

Builds a [TxEnv] from a transaction, its sender, and encoded transaction bytes.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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 more
§

impl<T> MaybeDebug for T
where T: Debug,

§

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

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows 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) -> R
where R: 'a,

Mutably borrows 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
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows 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
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows 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
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .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
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .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
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
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
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

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 bytes
  • Request: 1 byte
  • AccountRangeRequest: 64 bytes
  • StorageRequest: 87 bytes
  • BlockAccessListRequest: 87 bytes
  • UnsupportedStorage: 0 bytes
  • NoAttempt: 0 bytes
  • StaleWrite: 23 bytes
  • RootMismatch: 64 bytes
  • NoCatchUpProgress: 0 bytes
  • MissingHeader: 15 bytes
  • OutOfOrderBlock: 23 bytes
  • BlockPastPivot: 23 bytes
  • PivotNotAdvanced: 23 bytes
  • CatchUpBehindPivot: 23 bytes
  • NonCanonicalBlock: 47 bytes
  • ForkedBlock: 64 bytes
  • NoCoverage: 0 bytes
  • UnsupportedRecord: 39 bytes
  • OutOfOrderRange: 65 bytes
  • NoProgress: 32 bytes
  • OutOfOrderStorage: 64 bytes
  • MissingStorage: 32 bytes
  • StorageRootMismatch: 96 bytes
  • UnexpectedStorage: 32 bytes
  • MissingCode: 32 bytes
  • CodeMismatch: 64 bytes
  • PendingRepairs: 15 bytes
  • IncompleteAccounts: 32 bytes
  • GenesisPivot: 0 bytes
  • Cancelled: 0 bytes
  • PivotBelowAncestor: 23 bytes