Struct SyncStatus

Source
pub struct SyncStatus {
    pub current_l1: BlockInfo,
    pub current_l1_finalized: BlockInfo,
    pub head_l1: BlockInfo,
    pub safe_l1: BlockInfo,
    pub finalized_l1: BlockInfo,
    pub unsafe_l2: L2BlockInfo,
    pub safe_l2: L2BlockInfo,
    pub finalized_l2: L2BlockInfo,
    pub pending_safe_l2: L2BlockInfo,
    pub cross_unsafe_l2: L2BlockInfo,
    pub local_safe_l2: L2BlockInfo,
}
Expand description

The SyncStatus of an Optimism Rollup Node.

The sync status is a snapshot of the current state of the node’s sync process. Values may not be derived yet and are zeroed out if they are not yet derived.

Fields§

§current_l1: BlockInfo

The current L1 block.

This is the L1 block that the derivation process is last idled at. This may not be fully derived into L2 data yet. The safe L2 blocks were produced/included fully from the L1 chain up to but excluding this L1 block. If the node is synced, this matches the head_l1, minus the verifier confirmation distance.

§current_l1_finalized: BlockInfo

The current L1 finalized block.

This is a legacy sync-status attribute. This is deprecated. A previous version of the L1 finalization-signal was updated only after the block was retrieved by number. This attribute just matches finalized_l1 now.

§head_l1: BlockInfo

The L1 head block ref.

The head is not guaranteed to build on the other L1 sync status fields, as the node may be in progress of resetting to adapt to a L1 reorg.

§safe_l1: BlockInfo

The L1 safe head block ref.

§finalized_l1: BlockInfo

The finalized L1 block ref.

§unsafe_l2: L2BlockInfo

The unsafe L2 block ref.

This is the absolute tip of the L2 chain, pointing to block data that has not been submitted to L1 yet. The sequencer is building this, and verifiers may also be ahead of the safe L2 block if they sync blocks via p2p or other offchain sources. This is considered to only be local-unsafe post-interop, see cross_unsafe_l2 for cross-L2 guarantees.

§safe_l2: L2BlockInfo

The safe L2 block ref.

This points to the L2 block that was derived from the L1 chain. This point may still reorg if the L1 chain reorgs. This is considered to be cross-safe post-interop, see local_safe_l2 to ignore cross-L2 guarantees.

§finalized_l2: L2BlockInfo

The finalized L2 block ref.

This points to the L2 block that was derived fully from finalized L1 information, thus irreversible.

§pending_safe_l2: L2BlockInfo

The pending safe L2 block ref.

This points to the L2 block processed from the batch, but not consolidated to the safe block yet.

§cross_unsafe_l2: L2BlockInfo

Cross unsafe L2 block ref.

This is an unsafe L2 block, that has been verified to match cross-L2 dependencies. Pre-interop every unsafe L2 block is also cross-unsafe.

§local_safe_l2: L2BlockInfo

Local safe L2 block ref.

This is an L2 block derived from L1, not yet verified to have valid cross-L2 dependencies.

Trait Implementations§

Source§

impl Clone for SyncStatus

Source§

fn clone(&self) -> SyncStatus

Returns a copy 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 SyncStatus

Source§

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

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

impl PartialEq for SyncStatus

Source§

fn eq(&self, other: &SyncStatus) -> 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 Eq for SyncStatus

Source§

impl StructuralPartialEq for SyncStatus

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, dst: *mut u8)

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

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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
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, 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<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