User-Agent contract between our clients and the manager. Rendered by
simulator-client / sim-cli, parsed by the manager on the control-WS
upgrade. Both sides reference these consts so the two cannot drift.
The major-mint universe shared by the reroute reports: tables of stables and priced majors,
plus the helpers that classify, price, and label mints against them.
What account state replay cannot serve, worded once. Client, manager and
session all reject through here, so a user meets the same explanation
wherever the request is stopped.
The source-agnostic reroute-report core: one row in (LegRecord), the pricing derived
from a stream of them (Samples / Prices), and the three reports built over both — the
venue-flow one (Report), the benchmark (RangeReport), and the per-template direct-fill
probe breakdown (probes::ProbeReport). Adapters map their own source onto LegRecord;
nothing here does I/O.
One route, hop by hop: what the router quotes, what a decoded transaction reports, and what
both are recorded and streamed as. Only the router names a pool; only a transaction’s route
events name the program that ran a hop.
The modifications a depth dataset was measured under, stored with each ELF inline as
modifications.json beside its parts. Its JSON is canonical — each account re-encoded with
space its data’s length — so its blake3 is the dataset’s digest.
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.
The two mints a swap trades, without a direction: a maker quotes a pair both ways, so
(a, b) and (b, a) are the same pair. Normalized on construction and on deserialization,
which is what makes the set lookup direction-agnostic.
Slot-keyed account overrides, carried forward per account. Clones share the same runtime
resolutions so the session, reroute engine, and geyser pump observe one schedule.
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.
The aggregators a session re-quotes. Jupiter alone by default: the router builds Jupiter
replacements, so other aggregators’ order flow is a cross-router counterfactual a run asks for
deliberately. Parsed from one comma-separated string so a flag or an env var carries the set.
Restricts which detected swaps are re-quoted. A transaction is rerouted when at least one
of its swaps trades a listed pair; the rest replay unchanged, counted as swaps_filtered.
Re-quoting historical swaps through the metis router: each admitted swap is re-quoted and the
routed transaction is simulated just before the original executes — never committed, so the
replay is unaffected. Each simulation reads the state of the batch its original belonged to;
reroutes never observe one another.
High-level funnel for a reroute-order-flow session: how many detected swaps made it from
re-quoting through simulation to a non-reverting execution, and — for a run carrying a
DirectFillTemplate list — how many hops each template priced. Per-swap
economics and latency land in the reroute tables, published to dataset_uri when set.
An inclusive [start, end] slot range. Construct via SlotRange::new,
which rejects an inverted range, or SlotRange::new_unchecked where the
ordering is already guaranteed by the caller.
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.
How an action’s transactions run. Only meaningful for an action that carries
transactions: one that carries none is a schedule entry for account_overrides.
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.
Server-side ceiling on CreateSessionParams::disconnect_timeout_secs:
900 seconds (15 minutes). A larger request is silently clamped to this, so
clients must keep their reconnect budget under it to survive a detach.
Why a replayed range has to begin where a recording does. Shared so the
splitter’s refusal and the service’s single-session refusal cannot drift
apart.
Split a user-requested [start_slot, end_slot] range across the available
bundle ranges, returning a list of contiguous, non-overlapping (start, end)
pairs — one per bundle that the server can serve as its own session.
split_range, choosing the gap-free split with the fewest sub-ranges
instead of the most. Anchors, validates and errors exactly like it: an
uncovered range names the first slot no bundle reaches.