kona_derive/traits/
reset.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Traits for resetting stages.

use alloc::boxed::Box;
use async_trait::async_trait;
use op_alloy_genesis::SystemConfig;
use op_alloy_protocol::BlockInfo;

/// Provides the [BlockInfo] and [SystemConfig] for the stack to reset the stages.
#[async_trait]
pub trait ResetProvider {
    /// Returns the current [BlockInfo] for the pipeline to reset.
    async fn block_info(&self) -> BlockInfo;

    /// Returns the current [SystemConfig] for the pipeline to reset.
    async fn system_config(&self) -> SystemConfig;
}