Skip to main content

ExExNotificationsStream

Trait ExExNotificationsStream 

Source
pub trait ExExNotificationsStream<N: NodePrimitives = EthPrimitives>: Stream<Item = Result<ExExNotification<N>>> + Unpin {
    // Required methods
    fn set_without_head(&mut self);
    fn set_with_head(&mut self, exex_head: ExExHead);
    fn without_head(self) -> Self
       where Self: Sized;
    fn with_head(self, exex_head: ExExHead) -> Self
       where Self: Sized;

    // Provided method
    fn set_backfill_thresholds(&mut self, _thresholds: ExecutionStageThresholds) { ... }
}
Expand description

A trait, that represents a stream of ExExNotifications. The stream will emit notifications for all blocks. If the stream is configured with a head via ExExNotifications::set_with_head or ExExNotifications::with_head, it will run backfill jobs to catch up to the node head.

Required Methods§

Source

fn set_without_head(&mut self)

Sets ExExNotificationsStream to a stream of ExExNotifications without a head.

It’s a no-op if the stream has already been configured without a head.

See the documentation of ExExNotificationsWithoutHead for more details.

Source

fn set_with_head(&mut self, exex_head: ExExHead)

Sets ExExNotificationsStream to a stream of ExExNotifications with the provided head.

It’s a no-op if the stream has already been configured with a head.

See the documentation of ExExNotificationsWithHead for more details.

Source

fn without_head(self) -> Self
where Self: Sized,

Returns a new ExExNotificationsStream without a head.

See the documentation of ExExNotificationsWithoutHead for more details.

Source

fn with_head(self, exex_head: ExExHead) -> Self
where Self: Sized,

Returns a new ExExNotificationsStream with the provided head.

See the documentation of ExExNotificationsWithHead for more details.

Provided Methods§

Source

fn set_backfill_thresholds(&mut self, _thresholds: ExecutionStageThresholds)

Sets custom thresholds for the backfill job.

These thresholds control how many blocks are included in each backfill notification. Only takes effect when the stream is configured with a head.

By default, the backfill job uses BackfillJobFactory defaults (up to 500,000 blocks per batch, bounded by 30s execution time).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<P, E> ExExNotificationsStream<<E as ConfigureEvm>::Primitives> for ExExNotifications<P, E>
where P: BlockReader + HeaderProvider + StateProviderFactory + Clone + Unpin + 'static, E: ConfigureEvm<Primitives: NodePrimitives<Block = P::Block>> + Clone + Unpin + 'static,