pub struct Options {Show 43 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 staging_bundles_time_budget: Option<Duration>,
pub prioritize_bundles_from: Option<HashSet<ChainId>>,
pub ignore_bundles_from: Option<HashSet<ChainId>>,
pub chain_worker_ttl: Duration,
pub sender_chain_worker_ttl: Duration,
pub cross_chain_batch_size_limit: usize,
pub retry_delay: Duration,
pub max_retries: u32,
pub max_backoff: Duration,
pub notification_circuit_breaker_initial_probe_interval: Duration,
pub notification_circuit_breaker_max_probe_interval: 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 process_events_from_application_ids: Option<HashSet<GenericApplicationId>>,
pub never_reject_application_ids: Option<HashSet<GenericApplicationId>>,
pub timings: bool,
pub timing_interval: u64,
pub quorum_grace_period: f64,
pub blob_download_hedge_delay: Duration,
pub certificate_batch_download_hedge_delay: Duration,
pub certificate_download_batch_size: u64,
pub certificate_upload_batch_size: u64,
pub sender_certificate_download_batch_size: usize,
pub max_concurrent_batch_downloads: usize,
pub max_joined_tasks: usize,
pub max_event_stream_queries: 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,
}Expand description
Command-line options controlling the behavior of the chain client.
Fields§
§send_timeout: DurationTimeout for sending queries (milliseconds)
recv_timeout: DurationTimeout for receiving responses (milliseconds)
max_pending_message_bundles: usizeThe maximum number of incoming message bundles to include in a block proposal.
max_block_limit_errors: u32Maximum 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: usizeThe maximum number of new stream events to include in a block proposal.
staging_bundles_time_budget: Option<Duration>Time budget for staging message bundles in milliseconds. When set, limits bundle
execution by wall-clock time, in addition to the count limit from
max_pending_message_bundles.
prioritize_bundles_from: Option<HashSet<ChainId>>Comma-separated list of chain IDs whose incoming bundles should be processed first.
ignore_bundles_from: Option<HashSet<ChainId>>Comma-separated list of chain IDs whose incoming bundles should be ignored.
chain_worker_ttl: DurationThe duration in milliseconds after which an idle chain worker will free its memory.
sender_chain_worker_ttl: DurationThe duration, in milliseconds, after which an idle sender chain worker will free its memory.
cross_chain_batch_size_limit: usizeMaximum number of cross-chain requests coalesced into a single batch by the per-chain driver. Bounds the worst-case write-lock hold time.
retry_delay: DurationDelay increment for retrying to connect to a validator.
max_retries: u32Number of times to retry connecting to a validator.
max_backoff: DurationMaximum backoff delay for retrying to connect to a validator.
notification_circuit_breaker_initial_probe_interval: DurationInitial probe interval (ms) for the notification circuit breaker. When a validator’s notification stream exhausts retries, the circuit breaker waits this long before probing again. Doubles on each failed probe.
notification_circuit_breaker_max_probe_interval: DurationMaximum probe interval (ms) for the notification circuit breaker. The probe interval doubles on each failure but is capped at this value.
wait_for_outgoing_messages: boolWhether to wait until a quorum of validators has confirmed that all sent cross-chain messages have been delivered.
allow_fast_blocks: boolWhether 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: BlanketMessagePolicyThe policy for handling incoming messages.
restrict_chain_ids_to: Option<HashSet<ChainId>>A set of chains to restrict incoming messages and events from. By default, messages and events from all chains are accepted. To reject all of them, specify an empty string. The admin chain’s event stream is always followed regardless of this setting.
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.
process_events_from_application_ids: Option<HashSet<GenericApplicationId>>A set of application IDs. If specified, only event streams created by applications from this set are processed and followed. The admin chain’s event stream is always followed.
never_reject_application_ids: Option<HashSet<GenericApplicationId>>A set of application IDs whose messages must never be rejected. Bundles whose messages
are all from one of these applications bypass the other rejection rules (except
--restrict-chain-ids-to), and on execution failure they (and subsequent bundles from
the same sender) are removed from the block for later retry instead of being rejected,
with a warning logged. Bundles that contain any message from an application not on this
list can be rejected.
timings: boolEnable timing reports during operations
timing_interval: u64Interval in seconds between timing reports (defaults to 5)
quorum_grace_period: f64An additional delay, after reaching a quorum, to wait for additional validator signatures, as a fraction of time taken to reach quorum.
blob_download_hedge_delay: DurationThe delay when downloading a blob, after which we try a second validator, in milliseconds.
certificate_batch_download_hedge_delay: DurationThe delay when downloading a batch of certificates, after which we try a second validator, in milliseconds.
certificate_download_batch_size: u64Maximum number of certificates that we download at a time from one validator when synchronizing one of our chains.
certificate_upload_batch_size: u64Maximum number of certificates read from local storage and uploaded to a validator at a time when synchronizing a chain.
sender_certificate_download_batch_size: usizeMaximum number of sender certificates we try to download and receive in one go when syncing sender chains.
max_concurrent_batch_downloads: usizeMaximum number of certificate batches downloaded concurrently during chain sync.
max_joined_tasks: usizeMaximum number of tasks that can are joined concurrently in the client.
max_event_stream_queries: usizeMaximum number of event stream IDs to include in a single PreviousEventBlocks
request. Larger sets are split into multiple requests.
max_accepted_latency_ms: f64Maximum expected latency in milliseconds for score normalization.
cache_ttl_ms: u64Time-to-live for cached responses in milliseconds.
cache_max_size: usizeMaximum number of entries in the cache.
max_request_ttl_ms: u64Maximum latency for an in-flight request before we stop deduplicating it (in milliseconds).
alpha: f64Smoothing 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: u64Delay in milliseconds between starting requests to different peers. This helps to stagger requests and avoid overwhelming the network.
chain_listener_config: ChainListenerConfigConfiguration for the chain listener.
Trait Implementations§
Source§impl Args for Options
impl Args for Options
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Options
impl CommandFactory for Options
Source§impl<'de> Deserialize<'de> for Options
impl<'de> Deserialize<'de> for Options
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl FromArgMatches for Options
impl FromArgMatches for Options
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl FromWasmAbi for Optionswhere
Self: DeserializeOwned,
impl FromWasmAbi for Optionswhere
Self: DeserializeOwned,
Source§impl OptionFromWasmAbi for Optionswhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for Optionswhere
Self: DeserializeOwned,
Source§impl Parser for Options
impl Parser for Options
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Source§impl RefFromWasmAbi for Optionswhere
Self: DeserializeOwned,
impl RefFromWasmAbi for Optionswhere
Self: DeserializeOwned,
Source§type Abi = <JsType as RefFromWasmAbi>::Abi
type Abi = <JsType as RefFromWasmAbi>::Abi
Self are recovered from.Source§impl Tsify for Options
impl Tsify for Options
const DECL: &'static str = "/**\n * Command-line options controlling the behavior of the chain client.\n */\nexport 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 * Time budget for staging message bundles in milliseconds. When set, limits bundle\n * execution by wall-clock time, in addition to the count limit from\n * `max_pending_message_bundles`.\n */\n stagingBundlesTimeBudget?: { secs: number; nanos: number } | undefined;\n /**\n * Comma-separated list of chain IDs whose incoming bundles should be processed first.\n */\n prioritizeBundlesFrom?: ChainId[] | undefined;\n /**\n * Comma-separated list of chain IDs whose incoming bundles should be ignored.\n */\n ignoreBundlesFrom?: ChainId[] | undefined;\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 * Maximum number of cross-chain requests coalesced into a single batch by the\n * per-chain driver. Bounds the worst-case write-lock hold time.\n */\n crossChainBatchSizeLimit?: 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 * Initial probe interval (ms) for the notification circuit breaker. When a validator\\\'s\n * notification stream exhausts retries, the circuit breaker waits this long before\n * probing again. Doubles on each failed probe.\n */\n notificationCircuitBreakerInitialProbeInterval?: { secs: number; nanos: number };\n /**\n * Maximum probe interval (ms) for the notification circuit breaker. The probe interval\n * doubles on each failure but is capped at this value.\n */\n notificationCircuitBreakerMaxProbeInterval?: { 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 and events from. By default, messages and\n * events from all chains are accepted. To reject all of them, specify an empty string. The\n * admin chain\\\'s event stream is always followed regardless of this setting.\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 * A set of application IDs. If specified, only event streams created by applications from\n * this set are processed and followed. The admin chain\\\'s event stream is always followed.\n */\n processEventsFromApplicationIds?: GenericApplicationId[] | undefined;\n /**\n * A set of application IDs whose messages must never be rejected. Bundles whose messages\n * are all from one of these applications bypass the other rejection rules (except\n * `--restrict-chain-ids-to`), and on execution failure they (and subsequent bundles from\n * the same sender) are removed from the block for later retry instead of being rejected,\n * with a warning logged. Bundles that contain any message from an application not on this\n * list can be rejected.\n */\n neverRejectApplicationIds?: 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 blobDownloadHedgeDelay?: { 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 certificateBatchDownloadHedgeDelay?: { 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 certificates read from local storage and uploaded to a validator\n * at a time when synchronizing a chain.\n */\n certificateUploadBatchSize?: 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 certificate batches downloaded concurrently during chain sync.\n */\n maxConcurrentBatchDownloads?: number;\n /**\n * Maximum number of tasks that can are joined concurrently in the client.\n */\n maxJoinedTasks?: number;\n /**\n * Maximum number of event stream IDs to include in a single `PreviousEventBlocks`\n * request. Larger sets are split into multiple requests.\n */\n maxEventStreamQueries?: 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}"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn from_js<T>(js: T) -> Result<Self, Error>
Source§impl VectorFromWasmAbi for Optionswhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for Optionswhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
impl<_INNER> AutoTraits for _INNER
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FromBcsBytes for Twhere
T: DeserializeOwned,
impl<T> FromBcsBytes for Twhere
T: DeserializeOwned,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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::RequestSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSync for Twhere
T: Sync,
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Post for Twhere
T: Send + 'static,
Source§impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
Source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
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>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the bytes to memory at the provided location.