docs.rs failed to build ethexe-observer-2.0.0-pre.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
ethexe-observer
Watches the Ethereum chain head and back-fills missing blocks into the local
database, surfacing each arrival and each completed sync as an [ObserverEvent].
It is read-only with respect to Ethereum: chain writes (batch commitments, etc.)
belong to ethexe-ethereum. ethexe-service polls [ObserverService] as the
canonical chain-head source and dispatches its events to consensus and compute.
Public API
- [
ObserverService] — Stream of chain-head and sync events; implementsfutures::Stream<Item = Result<ObserverEvent>>andFusedStream - [
ObserverService::new] — Async constructor that connects the provider and starts the header subscription - [
ObserverService::provider] — Borrows the underlyingalloyRootProvider - [
ObserverService::block_loader] — Returns a fresh [EthereumBlockLoader] bound to the configured router address - [
ObserverService::router_query] — Returns a freshRouterQueryfor read-only contract queries - [
ObserverConfig] — Constructor input: Ethereum RPC URL and optional max sync depth - [
ObserverEvent] — Stream item:Blockon a new head,BlockSyncedafter back-fill - [
SyncError] — Error classifier:RpcError(recoverable, skipped) vsFatal(propagated) - [
utils::BlockLoader] — Trait abstracting block-data loading from Ethereum - [
utils::BlockId] — Block selector forBlockLoader::load_simple:Hash(H256),Latest,Finalized - [
utils::EthereumBlockLoader] — alloy-backed [utils::BlockLoader] impl
Invariants
- The stream never terminates:
FusedStream::is_terminatedalways returnsfalse. - Back-fill stops at the database watermark, connecting each new head to the existing synced chain.
max_sync_depthdefaults tou32::MAXwhenNoneis passed in [ObserverConfig].
Usage
use ;
use StreamExt as _;
let mut observer = new
.await?;
while let Some = observer.next.await