pub trait StateRootStrategy<N, P, Evm>: Send + Syncwhere
N: NodePrimitives,
Evm: ConfigureEvm<Primitives = N>,{
// Required method
fn prepare(
&self,
ctx: StateRootJobContext<'_, N, P, Evm>,
) -> ProviderResult<PreparedStateRootJob<N>>;
// Provided method
fn prepare_payload_builder(
&self,
_ctx: PayloadStateRootJobContext<'_, N, P>,
) -> ProviderResult<Option<PayloadStateRootHandle>> { ... }
}Expand description
Strategy used by engine-tree validation to prepare per-block state-root work.
Required Methods§
Sourcefn prepare(
&self,
ctx: StateRootJobContext<'_, N, P, Evm>,
) -> ProviderResult<PreparedStateRootJob<N>>
fn prepare( &self, ctx: StateRootJobContext<'_, N, P, Evm>, ) -> ProviderResult<PreparedStateRootJob<N>>
Prepares a per-block state-root job before execution starts.
A custom strategy that maintains a reusable sparse trie is responsible for consuming the pending prune request from the context when it starts the corresponding job.
Provided Methods§
Sourcefn prepare_payload_builder(
&self,
_ctx: PayloadStateRootJobContext<'_, N, P>,
) -> ProviderResult<Option<PayloadStateRootHandle>>
fn prepare_payload_builder( &self, _ctx: PayloadStateRootJobContext<'_, N, P>, ) -> ProviderResult<Option<PayloadStateRootHandle>>
Prepares the optional payload-builder state-root handle used for FCU-triggered block building.
This is consulted on every FCU that carries payload attributes. Returning None means the
payload builder computes the state root itself; the stock builders fall back to a
synchronous MPT state root. The default implementation returns None.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".