Payload emitted when the session has discovered an upcoming batch that
matches one or more registered DiscoveryFilters from session creation
(for example, a batch containing a transaction that invokes a program of
interest). The (slot, batch_index) pair can be fed directly to
BacktestRequest::ContinueTo to pause immediately before the batch
executes. After each Continue / ContinueTo, the session emits the
next DiscoveryBatchEvent ahead of the next matching batch, enabling a
reactive “pause on every discovery” driver loop.
Payload emitted when a session halts at a caller-specified point.
batch_index is None for block-boundary pauses and Some(n) when the
session stopped before batch n within slot (no transaction from
batch n has been applied). While paused, RPC reads against the session
observe partial state up through batch n - 1.
Per-transaction facts a DiscoveryFilter can inspect when deciding
whether to match. Callers build this once per transaction and feed it to
every registered filter; new variants add fields here rather than growing
the DiscoveryFilter::matches signature.
A filter registered at session creation describing which upcoming batches
the session should announce ahead of execution via
BacktestResponse::DiscoveryBatch (and its session-event twins). Each
filter describes an event of interest (e.g. a specific program executing);
the session “discovers” the batch in which that event will occur and
emits a DiscoveryBatch so the client can pause immediately before it.
Split a user-requested [start_slot, end_slot] range across the available
bundle ranges, returning a list of non-overlapping (start, end) pairs — one
per bundle that intersects the requested range.