Expand description
Execution extensions (ExEx
).
An execution extension is a task that derives its state from Reth’s state.
Some examples of such state derives are rollups, bridges, and indexers.
An ExEx
is a Future
resolving to a Result<()>
that is run indefinitely alongside Reth.
ExEx
’s are initialized using an async closure that resolves to the ExEx
; this closure gets
passed an ExExContext
where it is possible to spawn additional tasks and modify Reth.
Most ExEx
’s will want to derive their state from the CanonStateNotification
channel given
in ExExContext
. A new notification is emitted whenever blocks are executed in live and
historical sync.
§Pruning
ExEx
’s SHOULD emit an ExExEvent::FinishedHeight
event to signify what blocks have been
processed. This event is used by Reth to determine what state can be pruned.
An ExEx
will only receive notifications for blocks greater than the block emitted in the
event. To clarify: if the ExEx
emits ExExEvent::FinishedHeight(0)
it will receive
notifications for any block_number > 0
.
Structs§
- Backfill job started for a specific range.
- Factory for creating new backfill jobs.
- Captures the context that an
ExEx
has access to. - The execution extension manager.
- A handle to communicate with the
ExExManager
. - Metrics for the
ExEx
manager.
Enums§
- Events emitted by an
ExEx
. - Notifications sent to an
ExEx
. - The finished height of all
ExEx
’s.