Expand description
Protocol-neutral reactive runtime for cache state effects.
The reactive runtime generalizes the log-only events
pipeline into a handler pipeline that can ingest logs, block notifications,
and pending transaction signals. Handlers remain pure synchronous functions:
they read through StateView, return structured
ReactiveEffect values, and let the runtime validate and commit cache
mutations through StateUpdate.
This module intentionally contains no protocol, AMM, strategy, signing, or
transaction-submission concepts. Downstream crates can layer those domains on
top by implementing ReactiveHandler and ReactiveHook.
Structs§
- Account
Field Mask - Account fields requested by a resync.
- Alloy
Subscriber - Alloy-backed event subscriber.
- Applied
Report - Applied state report.
- Block
Interest - Interest in block inputs.
- Block
Ref - Minimal block identity carried through reports.
- Block
Report - Block processing report.
- Cache
Metrics Snapshot - Point-in-time copy of the reactive runtime’s observability counters.
- Coverage
GapReport - Report that a tracked account’s storage root moved on a canonical block that no decoder covered — a coverage gap surfaced by the per-block root gate (Phase-8 step 4).
- Decoded
Report - Decoding report.
- Event
Decoder Handler - Adapter that wraps a legacy
EventDecoderas a log-only reactive handler. - Handler
Error - Error returned by a handler.
- Handler
Id - Identifier for a reactive handler.
- Handler
Outcome - Handler output for a single input.
- Health
Report - Report of a
CacheHealthtransition, emitted into the ingest cycle that caused it and delivered to hooks through the normal dispatch path. - Hook
Signal - Domain-neutral hook signal emitted by a handler.
- Input
Report - Input acceptance report.
- Invalidation
Request - Rich invalidation request lowered to
StateUpdate::Purge. - LogInterest
- Interest in logs.
- Missed
Range Report - Report of a forward gap in the canonical block sequence: an arriving block whose number is more than one past the last-seen head, so the blocks in between were never observed (for example during a subscription disconnect).
- Pending
TxInterest - Interest in pending transaction inputs.
- Reactive
Batch Report - Batch report returned by
ReactiveRuntime::ingest_batchandReactiveRuntime::ingest_batch_with_resync. - Reactive
Config - Configuration for
ReactiveRuntime. - Reactive
Context - Context supplied with each
ReactiveInput. - Reactive
Engine - Binds a
ReactiveRuntimeto anEventSubscriberfor the common subscribe-ingest lifecycle. - Reactive
Error Report - Report of a non-fatal error surfaced during an ingest cycle, with the associated input (when known) and a human-readable message.
- Reactive
Input Batch - Batch of reactive input records.
- Reactive
Input Record - One input and its execution context.
- Reactive
LogRoute - Exact log route selected by
ReactiveRegistry::route_log. - Reactive
Registry - Registry and router for provider-neutral reactive handlers.
- Reactive
Runtime - Reactive runtime.
- Reorg
Report - Report of a detected reorg and the recovery it performed: the dropped block(s) and inputs, the exact rollback updates applied for reversible dropped effects, the conservative purge updates for irreversible ones, the canceled hash-pinned resyncs, and why recovery ran.
- Report
Tag - Lightweight report label.
- Resync
Failure - One resync target that could not be fetched or applied.
- Resync
Id - Resync id.
- Resync
Report - Report of the storage resync requests executed during an ingest cycle: the requests considered, the authoritative updates built from successful fetches (and their applied diff), and any targets that could not be resynced.
- Resync
Request - Request for authoritative state repair.
- Speculative
Id - Speculative request id.
- Speculative
Request - Speculative signal emitted by handlers.
- Subscriber
Backfill - Historical log backfill requested when adding subscriber interests.
- Subscriber
Config - Subscriber configuration.
- Subscriber
Reconnect Config - WebSocket/pubsub reconnect policy.
Enums§
- Address
Matcher - Address matching helper for pending transaction interests.
- Block
Interest Mode - Block subscription mode.
- Cache
Health - Queryable coarse health of the reactive cache.
- Chain
Status - Lifecycle status for an input.
- Effect
Target - Absolute write target used for conflict reports.
- Hook
Backpressure - Hook backpressure policy.
- Input
Ref - Stable identity used for input deduplication and reports.
- Input
Source - Source of an input batch.
- Invalidation
Reason - Invalidation reason.
- Reactive
Effect - Effect emitted by a
ReactiveHandler. - Reactive
Engine Error - Error returned by
ReactiveEnginehelpers that combine subscriber polling and runtime ingestion. - Reactive
Engine Register Error - Error returned when
ReactiveEnginecannot register a handler on both the runtime and subscriber sides. - Reactive
Error - Runtime error.
- Reactive
Input - Input accepted by the reactive runtime.
- Reactive
Interest - Reactive subscription interest.
- Reactive
Report - Runtime report.
- Register
Error - Handler registration error.
- Reorg
Reason - Reason reorg recovery ran.
- Resync
Block - Block target for a resync.
- Resync
Failure Kind - Stable classification for a failed resync target.
- Resync
Priority - Resync priority.
- Resync
Reason - Reason for a resync request.
- Resync
Target - State target for a resync.
- Root
Gate Cadence - How often the reactive root gate probes tracked accounts
(
TrackingPolicy::WholeAccount/TrackingPolicy::Scalars; theScalarsaccount-fields comparison rides the same firing). - Route
Key - Extracted route key.
- Route
KeySpec - Route-key extraction strategy for logs.
- Selector
Matcher - Calldata selector matching helper.
- State
Effect Quality - Reliability of state effects emitted by a handler.
- Subscriber
Error - Subscriber error.
- Subscriber
Mode - Subscriber mode requested for the Alloy subscriber.
- Tracking
Policy - How a tracked account is kept live by the per-block root gate (Phase-8 step 4).
Traits§
- Event
Subscriber - Provider-agnostic subscriber interface.
- Interest
Owner Subscriber - Extension trait for subscribers that can add and remove handler-owned interests incrementally.
- LogMatcher
- Local log predicate.
- Pending
TxMatcher - Local predicate over a full pending transaction.
- Reactive
Handler - Pure synchronous handler for reactive inputs.
- Reactive
Hook - Hook invoked after reports are built and cache mutation phases have ended.
- Route
KeyExtractor - Extracts custom route keys from logs.
Type Aliases§
- Subscriber
Next Batch - Boxed future returned by
EventSubscriber::next_batch.