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.
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.
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.
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.
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.
SubscriberConfig
Subscriber configuration.
SubscriberReconnectConfig
WebSocket/pubsub reconnect policy.

Enums§

AddressMatcher
Address matching helper for pending transaction interests.
BlockInterestMode
Block subscription mode.
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.
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.
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.

Traits§

EventSubscriber
Provider-agnostic subscriber interface.
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.