Skip to main content

Module reactive

Module reactive 

Source
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§

AccountFieldMask
Account fields requested by a resync.
AlloySubscriber
Alloy-backed event subscriber.
AppliedReport
Applied state report.
BlockInterest
Interest in block inputs.
BlockRef
Minimal block identity carried through reports.
BlockReport
Block processing report.
CacheMetricsSnapshot
Point-in-time copy of the reactive runtime’s observability counters.
CoverageGapReport
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).
DecodedReport
Decoding report.
EventDecoderHandler
Adapter that wraps a legacy EventDecoder as a log-only reactive handler.
HandlerError
Error returned by a handler.
HandlerId
Identifier for a reactive handler.
HandlerOutcome
Handler output for a single input.
HealthReport
Report of a CacheHealth transition, emitted into the ingest cycle that caused it and delivered to hooks through the normal dispatch path.
HookSignal
Domain-neutral hook signal emitted by a handler.
InputReport
Input acceptance report.
InvalidationRequest
Rich invalidation request lowered to StateUpdate::Purge.
LogInterest
Interest in logs.
MissedRangeReport
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).
PendingTxInterest
Interest in pending transaction inputs.
ReactiveBatchReport
Batch report returned by ReactiveRuntime::ingest_batch and ReactiveRuntime::ingest_batch_with_resync.
ReactiveConfig
Configuration for ReactiveRuntime.
ReactiveContext
Context supplied with each ReactiveInput.
ReactiveEngine
Binds a ReactiveRuntime to an EventSubscriber for the common subscribe-ingest lifecycle.
ReactiveErrorReport
Report of a non-fatal error surfaced during an ingest cycle, with the associated input (when known) and a human-readable message.
ReactiveInputBatch
Batch of reactive input records.
ReactiveInputRecord
One input and its execution context.
ReactiveLogRoute
Exact log route selected by ReactiveRegistry::route_log.
ReactiveRegistry
Registry and router for provider-neutral reactive handlers.
ReactiveRuntime
Reactive runtime.
ReorgReport
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.
ReportTag
Lightweight report label.
ResyncFailure
One resync target that could not be fetched or applied.
ResyncId
Resync id.
ResyncReport
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.
ResyncRequest
Request for authoritative state repair.
SpeculativeId
Speculative request id.
SpeculativeRequest
Speculative signal emitted by handlers.
SubscriberBackfill
Historical log backfill requested when adding subscriber interests.
SubscriberConfig
Subscriber configuration.
SubscriberReconnectConfig
WebSocket/pubsub reconnect policy.

Enums§

AddressMatcher
Address matching helper for pending transaction interests.
BlockInterestMode
Block subscription mode.
CacheHealth
Queryable coarse health of the reactive cache.
ChainStatus
Lifecycle status for an input.
EffectTarget
Absolute write target used for conflict reports.
HookBackpressure
Hook backpressure policy.
InputRef
Stable identity used for input deduplication and reports.
InputSource
Source of an input batch.
InvalidationReason
Invalidation reason.
ReactiveEffect
Effect emitted by a ReactiveHandler.
ReactiveEngineError
Error returned by ReactiveEngine helpers that combine subscriber polling and runtime ingestion.
ReactiveEngineRegisterError
Error returned when ReactiveEngine cannot register a handler on both the runtime and subscriber sides.
ReactiveError
Runtime error.
ReactiveInput
Input accepted by the reactive runtime.
ReactiveInterest
Reactive subscription interest.
ReactiveReport
Runtime report.
RegisterError
Handler registration error.
ReorgReason
Reason reorg recovery ran.
ResyncBlock
Block target for a resync.
ResyncFailureKind
Stable classification for a failed resync target.
ResyncPriority
Resync priority.
ResyncReason
Reason for a resync request.
ResyncTarget
State target for a resync.
RootGateCadence
How often the reactive root gate probes tracked accounts (TrackingPolicy::WholeAccount / TrackingPolicy::Scalars; the Scalars account-fields comparison rides the same firing).
RouteKey
Extracted route key.
RouteKeySpec
Route-key extraction strategy for logs.
SelectorMatcher
Calldata selector matching helper.
StateEffectQuality
Reliability of state effects emitted by a handler.
SubscriberError
Subscriber error.
SubscriberMode
Subscriber mode requested for the Alloy subscriber.
TrackingPolicy
How a tracked account is kept live by the per-block root gate (Phase-8 step 4).

Traits§

EventSubscriber
Provider-agnostic subscriber interface.
InterestOwnerSubscriber
Extension trait for subscribers that can add and remove handler-owned interests incrementally.
LogMatcher
Local log predicate.
PendingTxMatcher
Local predicate over a full pending transaction.
ReactiveHandler
Pure synchronous handler for reactive inputs.
ReactiveHook
Hook invoked after reports are built and cache mutation phases have ended.
RouteKeyExtractor
Extracts custom route keys from logs.

Type Aliases§

SubscriberNextBatch
Boxed future returned by EventSubscriber::next_batch.