ClientConfig

Struct ClientConfig 

Source
pub struct ClientConfig {
Show 47 fields pub version: Version, pub chain_id: String, pub rpc_addr: Option<String>, pub expected_shutdown: MutableConfigValue<Option<BlockHeight>>, pub block_production_tracking_delay: Duration, pub min_block_production_delay: Duration, pub max_block_production_delay: Duration, pub max_block_wait_delay: Duration, pub skip_sync_wait: bool, pub sync_check_period: Duration, pub sync_step_period: Duration, pub sync_height_threshold: BlockHeightDelta, pub header_sync_initial_timeout: Duration, pub header_sync_progress_timeout: Duration, pub header_sync_stall_ban_timeout: Duration, pub header_sync_expected_height_per_second: u64, pub state_sync_timeout: Duration, pub min_num_peers: usize, pub log_summary_period: Duration, pub log_summary_style: LogSummaryStyle, pub produce_empty_blocks: bool, pub epoch_length: BlockHeightDelta, pub num_block_producer_seats: NumSeats, pub ttl_account_id_router: Duration, pub block_fetch_horizon: BlockHeightDelta, pub catchup_step_period: Duration, pub chunk_request_retry_period: Duration, pub doosmslug_step_period: Duration, pub block_header_fetch_horizon: BlockHeightDelta, pub gc: GCConfig, pub archive: bool, pub save_trie_changes: bool, pub view_client_threads: usize, pub view_client_throttle_period: Duration, pub trie_viewer_state_size_limit: Option<u64>, pub max_gas_burnt_view: Option<Gas>, pub enable_statistics_export: bool, pub client_background_migration_threads: usize, pub flat_storage_creation_enabled: bool, pub flat_storage_creation_period: Duration, pub state_sync_enabled: bool, pub state_sync: StateSyncConfig, pub transaction_pool_size_limit: Option<u64>, pub enable_multiline_logging: bool, pub resharding_config: MutableConfigValue<ReshardingConfig>, pub tx_routing_height_horizon: BlockHeightDelta, pub produce_chunk_add_transactions_time_limit: MutableConfigValue<Option<Duration>>,
}
Expand description

ClientConfig where some fields can be updated at runtime.

Fields§

§version: Version

Version of the binary.

§chain_id: String

Chain id for status.

§rpc_addr: Option<String>

Listening rpc port for status.

§expected_shutdown: MutableConfigValue<Option<BlockHeight>>

Graceful shutdown at expected block height.

§block_production_tracking_delay: Duration

Duration to check for producing / skipping block.

§min_block_production_delay: Duration

Minimum duration before producing block.

§max_block_production_delay: Duration

Maximum wait for approvals before producing block.

§max_block_wait_delay: Duration

Maximum duration before skipping given height.

§skip_sync_wait: bool

Skip waiting for sync (for testing or single node testnet).

§sync_check_period: Duration

How often to check that we are not out of sync.

§sync_step_period: Duration

While syncing, how long to check for each step.

§sync_height_threshold: BlockHeightDelta

Sync height threshold: below this difference in height don’t start syncing.

§header_sync_initial_timeout: Duration

How much time to wait after initial header sync

§header_sync_progress_timeout: Duration

How much time to wait after some progress is made in header sync

§header_sync_stall_ban_timeout: Duration

How much time to wait before banning a peer in header sync if sync is too slow

§header_sync_expected_height_per_second: u64

Expected increase of header head height per second during header sync

§state_sync_timeout: Duration

How long to wait for a response during state sync

§min_num_peers: usize

Minimum number of peers to start syncing.

§log_summary_period: Duration

Period between logging summary information.

§log_summary_style: LogSummaryStyle

Enable coloring of the logs

§produce_empty_blocks: bool

Produce empty blocks, use false for testing.

§epoch_length: BlockHeightDelta

Epoch length.

§num_block_producer_seats: NumSeats

Number of block producer seats

§ttl_account_id_router: Duration

Time to persist Accounts Id in the router without removing them.

§block_fetch_horizon: BlockHeightDelta

Horizon at which instead of fetching block, fetch full state.

§catchup_step_period: Duration

Time between check to perform catchup.

§chunk_request_retry_period: Duration

Time between checking to re-request chunks.

§doosmslug_step_period: Duration

Time between running doomslug timer.

§block_header_fetch_horizon: BlockHeightDelta

Behind this horizon header fetch kicks in.

§gc: GCConfig

Garbage collection configuration.

§archive: bool

Not clear old data, set true for archive nodes.

§save_trie_changes: bool

save_trie_changes should be set to true iff

  • archive if false - non-archivale nodes need trie changes to perform garbage collection
  • archive is true, cold_store is configured and migration to split_storage is finished - node working in split storage mode needs trie changes in order to do garbage collection on hot.
§view_client_threads: usize

Number of threads for ViewClientActor pool.

§view_client_throttle_period: Duration

Number of seconds between state requests for view client.

§trie_viewer_state_size_limit: Option<u64>

Upper bound of the byte size of contract state that is still viewable. None is no limit

§max_gas_burnt_view: Option<Gas>

Max burnt gas per view method. If present, overrides value stored in genesis file. The value only affects the RPCs without influencing the protocol thus changing it per-node doesn’t affect the blockchain.

§enable_statistics_export: bool

Re-export storage layer statistics as prometheus metrics.

§client_background_migration_threads: usize

Number of threads to execute background migration work in client.

§flat_storage_creation_enabled: bool

Enables background flat storage creation.

§flat_storage_creation_period: Duration

Duration to perform background flat storage creation step.

§state_sync_enabled: bool

Whether to use the State Sync mechanism. If disabled, the node will do Block Sync instead of State Sync.

§state_sync: StateSyncConfig

Options for syncing state.

§transaction_pool_size_limit: Option<u64>

Limit of the size of per-shard transaction pool measured in bytes. If not set, the size will be unbounded.

§enable_multiline_logging: bool§resharding_config: MutableConfigValue<ReshardingConfig>§tx_routing_height_horizon: BlockHeightDelta

If the node is not a chunk producer within that many blocks, then route to upcoming chunk producers.

§produce_chunk_add_transactions_time_limit: MutableConfigValue<Option<Duration>>

Limit the time of adding transactions to a chunk. A node produces a chunk by adding transactions from the transaction pool until some limit is reached. This time limit ensures that adding transactions won’t take longer than the specified duration, which helps to produce the chunk quickly.

Implementations§

Source§

impl ClientConfig

Source

pub fn test( skip_sync_wait: bool, min_block_prod_time: u64, max_block_prod_time: u64, num_block_producer_seats: NumSeats, archive: bool, save_trie_changes: bool, state_sync_enabled: bool, ) -> Self

Trait Implementations§

Source§

impl Clone for ClientConfig

Source§

fn clone(&self) -> ClientConfig

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 Serialize for ClientConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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<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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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<T> Same for T

Source§

type Output = T

Should always be Self
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<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