Skip to main content

Options

Struct Options 

Source
pub struct Options {
Show 32 fields pub send_timeout: Duration, pub recv_timeout: Duration, pub max_pending_message_bundles: usize, pub max_block_limit_errors: u32, pub max_new_events_per_block: usize, pub chain_worker_ttl: Duration, pub sender_chain_worker_ttl: Duration, pub retry_delay: Duration, pub max_retries: u32, pub max_backoff: Duration, pub wait_for_outgoing_messages: bool, pub allow_fast_blocks: bool, pub long_lived_services: bool, pub blanket_message_policy: BlanketMessagePolicy, pub restrict_chain_ids_to: Option<HashSet<ChainId>>, pub reject_message_bundles_without_application_ids: Option<HashSet<GenericApplicationId>>, pub reject_message_bundles_with_other_application_ids: Option<HashSet<GenericApplicationId>>, pub timings: bool, pub timing_interval: u64, pub quorum_grace_period: f64, pub blob_download_timeout: Duration, pub certificate_batch_download_timeout: Duration, pub certificate_download_batch_size: u64, pub sender_certificate_download_batch_size: usize, pub max_joined_tasks: usize, pub max_accepted_latency_ms: f64, pub cache_ttl_ms: u64, pub cache_max_size: usize, pub max_request_ttl_ms: u64, pub alpha: f64, pub alternative_peers_retry_delay_ms: u64, pub chain_listener_config: ChainListenerConfig,
}

Fields§

§send_timeout: Duration

Timeout for sending queries (milliseconds)

§recv_timeout: Duration

Timeout for receiving responses (milliseconds)

§max_pending_message_bundles: usize

The maximum number of incoming message bundles to include in a block proposal.

§max_block_limit_errors: u32

Maximum number of message bundles to discard from a block proposal due to block limit errors before discarding all remaining bundles.

Discarded bundles can be retried in the next block.

§max_new_events_per_block: usize

The maximum number of new stream events to include in a block proposal.

§chain_worker_ttl: Duration

The duration in milliseconds after which an idle chain worker will free its memory.

§sender_chain_worker_ttl: Duration

The duration, in milliseconds, after which an idle sender chain worker will free its memory.

§retry_delay: Duration

Delay increment for retrying to connect to a validator.

§max_retries: u32

Number of times to retry connecting to a validator.

§max_backoff: Duration

Maximum backoff delay for retrying to connect to a validator.

§wait_for_outgoing_messages: bool

Whether to wait until a quorum of validators has confirmed that all sent cross-chain messages have been delivered.

§allow_fast_blocks: bool

Whether to allow creating blocks in the fast round. Fast blocks have lower latency but must be used carefully so that there are never any conflicting fast block proposals.

§long_lived_services: bool

(EXPERIMENTAL) Whether application services can persist in some cases between queries.

§blanket_message_policy: BlanketMessagePolicy

The policy for handling incoming messages.

§restrict_chain_ids_to: Option<HashSet<ChainId>>

A set of chains to restrict incoming messages from. By default, messages from all chains are accepted. To reject messages from all chains, specify an empty string.

§reject_message_bundles_without_application_ids: Option<HashSet<GenericApplicationId>>

A set of application IDs. If specified, only bundles with at least one message from one of these applications will be accepted.

§reject_message_bundles_with_other_application_ids: Option<HashSet<GenericApplicationId>>

A set of application IDs. If specified, only bundles where all messages are from one of these applications will be accepted.

§timings: bool

Enable timing reports during operations

§timing_interval: u64

Interval in seconds between timing reports (defaults to 5)

§quorum_grace_period: f64

An additional delay, after reaching a quorum, to wait for additional validator signatures, as a fraction of time taken to reach quorum.

§blob_download_timeout: Duration

The delay when downloading a blob, after which we try a second validator, in milliseconds.

§certificate_batch_download_timeout: Duration

The delay when downloading a batch of certificates, after which we try a second validator, in milliseconds.

§certificate_download_batch_size: u64

Maximum number of certificates that we download at a time from one validator when synchronizing one of our chains.

§sender_certificate_download_batch_size: usize

Maximum number of sender certificates we try to download and receive in one go when syncing sender chains.

§max_joined_tasks: usize

Maximum number of tasks that can are joined concurrently in the client.

§max_accepted_latency_ms: f64

Maximum expected latency in milliseconds for score normalization.

§cache_ttl_ms: u64

Time-to-live for cached responses in milliseconds.

§cache_max_size: usize

Maximum number of entries in the cache.

§max_request_ttl_ms: u64

Maximum latency for an in-flight request before we stop deduplicating it (in milliseconds).

§alpha: f64

Smoothing factor for Exponential Moving Averages (0 < alpha < 1). Higher values give more weight to recent observations. Typical values are between 0.01 and 0.5. A value of 0.1 means that 10% of the new observation is considered and 90% of the previous average is retained.

§alternative_peers_retry_delay_ms: u64

Delay in milliseconds between starting requests to different peers. This helps to stagger requests and avoid overwhelming the network.

§chain_listener_config: ChainListenerConfig

Trait Implementations§

Source§

impl Args for Options

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl Clone for Options

Source§

fn clone(&self) -> Options

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl CommandFactory for Options

Source§

fn command<'b>() -> Command

Build a Command that can instantiate Self. Read more
Source§

fn command_for_update<'b>() -> Command

Build a Command that can update self. Read more
Source§

impl Default for Options

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Options

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl FromArgMatches for Options

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl FromWasmAbi for Options
where Self: DeserializeOwned,

Source§

type Abi = <JsType as FromWasmAbi>::Abi

The Wasm ABI type that this converts from when coming back out from the ABI boundary.
Source§

unsafe fn from_abi(js: Self::Abi) -> Self

Recover a Self from Self::Abi. Read more
Source§

impl OptionFromWasmAbi for Options
where Self: DeserializeOwned,

Source§

fn is_none(js: &Self::Abi) -> bool

Tests whether the argument is a “none” instance. If so it will be deserialized as None, and otherwise it will be passed to FromWasmAbi.
Source§

impl Parser for Options

Source§

fn parse() -> Self

Parse from std::env::args_os(), exit on error.
Source§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
Source§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error.
Source§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
Source§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error. Read more
Source§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.
Source§

impl RefFromWasmAbi for Options
where Self: DeserializeOwned,

Source§

type Abi = <JsType as RefFromWasmAbi>::Abi

The Wasm ABI type references to Self are recovered from.
Source§

type Anchor = SelfOwner<Options>

The type that holds the reference to Self for the duration of the invocation of the function that has an &Self parameter. This is required to ensure that the lifetimes don’t persist beyond one function call, and so that they remain anonymous.
Source§

unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor

Recover a Self::Anchor from Self::Abi. Read more
Source§

impl Tsify for Options

Source§

const DECL: &'static str = "export interface Options extends ChainListenerConfig {\n /**\n * Timeout for sending queries (milliseconds)\n */\n sendTimeout?: { secs: number; nanos: number };\n /**\n * Timeout for receiving responses (milliseconds)\n */\n recvTimeout?: { secs: number; nanos: number };\n /**\n * The maximum number of incoming message bundles to include in a block proposal.\n */\n maxPendingMessageBundles?: number;\n /**\n * Maximum number of message bundles to discard from a block proposal due to block limit\n * errors before discarding all remaining bundles.\n *\n * Discarded bundles can be retried in the next block.\n */\n maxBlockLimitErrors?: number;\n /**\n * The maximum number of new stream events to include in a block proposal.\n */\n maxNewEventsPerBlock?: number;\n /**\n * The duration in milliseconds after which an idle chain worker will free its memory.\n */\n chainWorkerTtl?: { secs: number; nanos: number };\n /**\n * The duration, in milliseconds, after which an idle sender chain worker will\n * free its memory.\n */\n senderChainWorkerTtl?: { secs: number; nanos: number };\n /**\n * Delay increment for retrying to connect to a validator.\n */\n retryDelay?: { secs: number; nanos: number };\n /**\n * Number of times to retry connecting to a validator.\n */\n maxRetries?: number;\n /**\n * Maximum backoff delay for retrying to connect to a validator.\n */\n maxBackoff?: { secs: number; nanos: number };\n /**\n * Whether to wait until a quorum of validators has confirmed that all sent cross-chain\n * messages have been delivered.\n */\n waitForOutgoingMessages?: boolean;\n /**\n * Whether to allow creating blocks in the fast round. Fast blocks have lower latency but\n * must be used carefully so that there are never any conflicting fast block proposals.\n */\n allowFastBlocks?: boolean;\n /**\n * (EXPERIMENTAL) Whether application services can persist in some cases between queries.\n */\n longLivedServices?: boolean;\n /**\n * The policy for handling incoming messages.\n */\n blanketMessagePolicy?: BlanketMessagePolicy;\n /**\n * A set of chains to restrict incoming messages from. By default, messages\n * from all chains are accepted. To reject messages from all chains, specify\n * an empty string.\n */\n restrictChainIdsTo?: ChainId[] | undefined;\n /**\n * A set of application IDs. If specified, only bundles with at least one message from one of\n * these applications will be accepted.\n */\n rejectMessageBundlesWithoutApplicationIds?: GenericApplicationId[] | undefined;\n /**\n * A set of application IDs. If specified, only bundles where all messages are from one of\n * these applications will be accepted.\n */\n rejectMessageBundlesWithOtherApplicationIds?: GenericApplicationId[] | undefined;\n /**\n * Enable timing reports during operations\n */\n timings?: boolean;\n /**\n * Interval in seconds between timing reports (defaults to 5)\n */\n timingInterval?: number;\n /**\n * An additional delay, after reaching a quorum, to wait for additional validator signatures,\n * as a fraction of time taken to reach quorum.\n */\n quorumGracePeriod?: number;\n /**\n * The delay when downloading a blob, after which we try a second validator, in milliseconds.\n */\n blobDownloadTimeout?: { secs: number; nanos: number };\n /**\n * The delay when downloading a batch of certificates, after which we try a second validator,\n * in milliseconds.\n */\n certificateBatchDownloadTimeout?: { secs: number; nanos: number };\n /**\n * Maximum number of certificates that we download at a time from one validator when\n * synchronizing one of our chains.\n */\n certificateDownloadBatchSize?: number;\n /**\n * Maximum number of sender certificates we try to download and receive in one go\n * when syncing sender chains.\n */\n senderCertificateDownloadBatchSize?: number;\n /**\n * Maximum number of tasks that can are joined concurrently in the client.\n */\n maxJoinedTasks?: number;\n /**\n * Maximum expected latency in milliseconds for score normalization.\n */\n maxAcceptedLatencyMs?: number;\n /**\n * Time-to-live for cached responses in milliseconds.\n */\n cacheTtlMs?: number;\n /**\n * Maximum number of entries in the cache.\n */\n cacheMaxSize?: number;\n /**\n * Maximum latency for an in-flight request before we stop deduplicating it (in milliseconds).\n */\n maxRequestTtlMs?: number;\n /**\n * Smoothing factor for Exponential Moving Averages (0 < alpha < 1).\n * Higher values give more weight to recent observations.\n * Typical values are between 0.01 and 0.5.\n * A value of 0.1 means that 10% of the new observation is considered\n * and 90% of the previous average is retained.\n */\n alpha?: number;\n /**\n * Delay in milliseconds between starting requests to different peers.\n * This helps to stagger requests and avoid overwhelming the network.\n */\n alternativePeersRetryDelayMs?: number;\n}"

Source§

const SERIALIZATION_CONFIG: SerializationConfig

Source§

type JsType = JsType

Source§

fn from_js<T>(js: T) -> Result<Self, Error>
where T: Into<JsValue>, Self: DeserializeOwned,

Source§

impl VectorFromWasmAbi for Options
where Self: DeserializeOwned,

Source§

type Abi = <JsType as VectorFromWasmAbi>::Abi

Source§

unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>

Source§

impl WasmDescribe for Options

Source§

impl WasmDescribeVector for Options

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Choices> CoproductSubsetter<CNil, HNil> for Choices

Source§

type Remainder = Choices

Source§

fn subset( self, ) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>

Extract a subset of the possible types in a coproduct (or get the remaining possibilities) Read more
Source§

impl<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

Source§

fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<To, From> DynInto<To> for From
where From: Into<To>,

Source§

fn into_box(self: Box<From>) -> To

Converts a boxed object into the target type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromBcsBytes for T

Source§

fn from_bcs_bytes(bytes: &[u8]) -> Result<T, Error>

Deserializes itself from a vector of bytes using bcs.
Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Gets the layout of the type.
Source§

impl<T, U, I> LiftInto<U, I> for T
where U: LiftFrom<T, I>,

Source§

fn lift_into(self) -> U

Performs the indexed conversion.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The type for metadata in pointers and references to Self.
Source§

impl<M, I> RuntimeMemory<&mut I> for M
where M: RuntimeMemory<I>,

Source§

fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>

Reads length bytes from memory from the provided location.

Source§

fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>

Writes the bytes to memory at the provided location.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<Source> Sculptor<HNil, HNil> for Source

Source§

type Remainder = Source

Source§

fn sculpt(self) -> (HNil, <Source as Sculptor<HNil, HNil>>::Remainder)

Consumes the current HList and returns an HList with the requested shape. Read more
Source§

impl<AnyTail> Split<HNil> for AnyTail

Source§

type Remainder = AnyTail

The tail of remaining elements after splitting up the list.
Source§

fn split(self) -> (HNil, <AnyTail as Split<HNil>>::Remainder)

Splits the current heterogeneous list in two.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcastable for T
where T: Any + Send + Sync + 'static,

Source§

fn upcast_any_ref(&self) -> &(dyn Any + 'static)

upcast ref
Source§

fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)

upcast mut ref
Source§

fn upcast_any_box(self: Box<T>) -> Box<dyn Any>

upcast boxed dyn
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<_INNER> AutoTraits for _INNER
where _INNER: Send + Sync + 'static,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> Post for T
where T: Send + 'static,