pub struct EcRollupStatus {
pub applied: EventSequence,
pub frontier: EventSequence,
/* private fields */
}Expand description
A snapshot of the rollup’s position. Every outbox event with sequence ≤
applied is folded into EC balances (settled and effective) and
committed.
frontier is pinned at construction. refresh advances
applied against that same fence, so lag drains toward it
instead of chasing a frontier that new postings keep moving.
Fields§
§applied: EventSequenceThe rollup job’s committed checkpoint.
frontier: EventSequenceThe outbox frontier pinned when this snapshot was taken.
Implementations§
Source§impl EcRollupStatus
impl EcRollupStatus
Sourcepub async fn refresh(&mut self) -> Result<(), LedgerError>
pub async fn refresh(&mut self) -> Result<(), LedgerError>
Re-read the committed checkpoint, keeping the pinned frontier, so
repeated calls watch the lag drain toward the fence this snapshot
captured.
Sourcepub async fn await_completion(
&self,
timeout: Duration,
) -> Result<(), LedgerError>
pub async fn await_completion( &self, timeout: Duration, ) -> Result<(), LedgerError>
Await the rollup applying everything up to this snapshot’s pinned
frontier.
On Ok(()) every posting that had been assigned an outbox sequence
when the snapshot was taken — committed or still in flight — is folded
into EC balances (settled and effective) and visible to subsequent
reads.
This is what makes close_books(); ec_rollup_status().await? .await_completion(..) free of straggler holes: sequences are assigned
at entry insert, before velocity enforcement, so anything that saw
the period as open sits at or below the pinned frontier, and gapless
delivery means the wait covers each one. The checkpoint only trails
the applied state, so the fence never returns early.
The fence does not move: unlike re-reading status, the frontier stays
where the snapshot pinned it, so a rollup publishing BalanceUpdated
events as it drains cannot extend its own barrier.
timeout is mandatory: a wedged rollup surfaces as
LedgerError::EcCaughtUpTimeout, never a silent hang.
Sourcepub fn lag(&self) -> u64
pub fn lag(&self) -> u64
Outbox positions the rollup has yet to consume — the stream-lag SLO
metric. Counts the BalanceUpdated events the rollup publishes
itself and later crosses as skips, so a healthy stream can report a
small nonzero lag; alert on lag that is large or not shrinking.
pub fn is_caught_up(&self) -> bool
Trait Implementations§
Source§impl Clone for EcRollupStatus
impl Clone for EcRollupStatus
Source§fn clone(&self) -> EcRollupStatus
fn clone(&self) -> EcRollupStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for EcRollupStatus
impl !UnwindSafe for EcRollupStatus
impl Freeze for EcRollupStatus
impl Send for EcRollupStatus
impl Sync for EcRollupStatus
impl Unpin for EcRollupStatus
impl UnsafeUnpin for EcRollupStatus
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointerSource§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<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<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 more