pub struct CreateSession {Show 19 fields
pub start_slot: u64,
pub end_slot: Option<u64>,
pub slot_count: Option<u64>,
pub signer_filter: BTreeSet<Address>,
pub send_summary: bool,
pub reroute_order_flow: bool,
pub detect_failed_l1_swaps: bool,
pub reroute_aggregators: RerouteAggregators,
pub reroute_circular_arbs: bool,
pub reroute_filter: Option<RerouteFilter>,
pub reroute_direct_fill: Option<Box<DirectFillParams>>,
pub reroute_requote: bool,
pub parallel: bool,
pub capacity_wait_timeout_secs: Option<u16>,
pub disconnect_timeout_secs: Option<u16>,
pub extra_compute_units: Option<u32>,
pub discoveries: Vec<DiscoveryFilter>,
pub actions: Vec<ScheduledAction>,
pub replay_account_state: bool,
}Expand description
Builder for CreateBacktestSession.
Set either end_slot or slot_count (not both). Use the helper methods to
add account filters.
Fields§
§start_slot: u64§end_slot: Option<u64>§slot_count: Option<u64>Slots to advance past start_slot (alternative to end_slot); the
session replays the inclusive range [start_slot, start_slot + slot_count].
slot_count = 0 replays just the start slot.
signer_filter: BTreeSet<Address>§send_summary: boolWhen true, include a session summary with transaction statistics in the Completed response.
reroute_order_flow: boolWhen true, replace historical swaps with transactions re-quoted through the metis router against the current simulation state.
detect_failed_l1_swaps: boolWhen true, also re-quote swaps whose L1 transaction failed in a way re-quoting can answer. Tracked as a separate population from the headline reroute funnel.
reroute_aggregators: RerouteAggregatorsWhich aggregators’ historical swaps to re-quote; Jupiter alone by default.
reroute_circular_arbs: boolWhen true, also re-quote arbitrage cycles (same input and output mint).
reroute_filter: Option<RerouteFilter>Restrict rerouting to swaps trading these mint pairs.
reroute_direct_fill: Option<Box<DirectFillParams>>Price a candidate venue against the hops the run detects.
reroute_requote: boolRe-quote through metis. Off runs reroute_direct_fill alone, with no sidecar.
parallel: boolWhen true, ask manager to create all available sessions in the target epoch.
capacity_wait_timeout_secs: Option<u16>§disconnect_timeout_secs: Option<u16>Seconds the server keeps the session alive with no client attached —
the window a reconnecting client has to reattach and resume. Must cover
your retry policy: the server’s own default is tens of seconds, and it
caps this at 900. Left unset, crate::ManagedBacktestSession
substitutes crate::managed::DEFAULT_DISCONNECT_TIMEOUT_SECS.
extra_compute_units: Option<u32>Extra compute units to add to each transaction’s SetComputeUnitLimit budget.
discoveries: Vec<DiscoveryFilter>Batch discovery filters registered at session creation. For each
filter, the server emits [BacktestResponse::DiscoveryBatch] ahead
of every matching batch so the caller can pause via
[BacktestSession::advance_to_discovery] before it executes.
actions: Vec<ScheduledAction>Transactions the server runs automatically during the session, with
results streamed over actionSubscribe.
replay_account_state: boolWhen true, replay the account states for this range instead of executing transactions (state-only acceleration).
Implementations§
Source§impl CreateSession
impl CreateSession
Sourcepub fn builder() -> CreateSessionBuilder
pub fn builder() -> CreateSessionBuilder
Create an instance of CreateSession using the builder syntax
Source§impl CreateSession
impl CreateSession
Sourcepub fn add_signer_filter(self, address: Address) -> Self
pub fn add_signer_filter(self, address: Address) -> Self
Add an account to the signer filter.
Sourcepub fn add_override(self, slot: u64, overrides: AccountModifications) -> Self
pub fn add_override(self, slot: u64, overrides: AccountModifications) -> Self
Schedule counterfactual account overrides, visible only to the reroute
layer from slot onward — per account, until a later override names the
same account. Requires reroute_order_flow.
Sourcepub fn into_params(self) -> Result<CreateSessionParams, BacktestClientError>
pub fn into_params(self) -> Result<CreateSessionParams, BacktestClientError>
Convert the builder into API parameters, validating slot options.
Sourcepub fn into_request(
self,
) -> Result<CreateBacktestSessionRequest, BacktestClientError>
pub fn into_request( self, ) -> Result<CreateBacktestSessionRequest, BacktestClientError>
Convert the builder into versioned create request payload.
Trait Implementations§
Source§impl Clone for CreateSession
impl Clone for CreateSession
Source§fn clone(&self) -> CreateSession
fn clone(&self) -> CreateSession
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CreateSession
impl RefUnwindSafe for CreateSession
impl Send for CreateSession
impl Sync for CreateSession
impl Unpin for CreateSession
impl UnsafeUnpin for CreateSession
impl UnwindSafe for CreateSession
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request