pub struct Parameters {Show 25 fields
pub db_path: PathBuf,
pub leader_timeout: Duration,
pub min_block_delay: Duration,
pub soft_leader_timeout: Duration,
pub block_rate_window: Duration,
pub max_headers_per_commit_sync_fetch: usize,
pub max_transactions_per_commit_sync_fetch: usize,
pub max_headers_per_header_sync_fetch: usize,
pub max_transactions_per_transaction_sync_fetch: usize,
pub sync_last_known_own_block_timeout: Duration,
pub dag_state_cached_rounds: u32,
pub peer_round_ahead_margin: u32,
pub commit_sync_parallel_fetches: usize,
pub commit_sync_batch_size: u32,
pub commit_sync_batches_ahead: usize,
pub commit_recovery_batch_size: u32,
pub max_headers_per_bundle: usize,
pub max_shards_per_bundle: usize,
pub tonic: TonicParameters,
pub fast_commit_sync_batch_size: u32,
pub commit_sync_gap_threshold: u32,
pub enable_fast_commit_syncer: bool,
pub enable_starfish_speed_adaptive_acknowledgments: bool,
pub enable_peer_responsiveness_ranking: bool,
pub dag_visualizer_port: Option<u16>,
}Expand description
Operational configurations of a consensus authority.
All fields should tolerate inconsistencies among authorities, without affecting safety of the protocol. Otherwise, they need to be part of IOTA protocol config or epoch state on-chain.
NOTE: fields with default values are specified in the serde default functions. Most operators should not need to specify any field, except db_path.
Fields§
§db_path: PathBufPath to consensus DB for this epoch. Required when initializing consensus. This is calculated based on user configuration for base directory.
leader_timeout: DurationTime to wait for parent round leader before sealing a block, from when parent round has a quorum.
min_block_delay: DurationSustained spacing between own blocks: long-run production never exceeds
one block per min_block_delay. This avoids generating too many rounds
when latency is low. This is especially necessary for tests running
locally. If setting a non-default value, it should be set low enough
to avoid reducing round rate and increasing latency in realistic and
distributed configurations.
soft_leader_timeout: DurationSoft counterpart of leader_timeout: after this duration we are
willing to propose a block even without a strong-vote quorum, to avoid
liveness stalls when leader data is slow to propagate. Fires earlier
than leader_timeout and does not force block creation on its own.
block_rate_window: DurationWindow bounding own block production together with min_block_delay:
idle time accrues budget for bursts of up to block_rate_window / min_block_delay back-to-back blocks, letting a validator that fell
behind catch up on rounds instead of skipping them. Set at or below
min_block_delay to disable bursting (fixed spacing between blocks).
max_headers_per_commit_sync_fetch: usizeNumber of block headers to fetch per commit sync request.
max_transactions_per_commit_sync_fetch: usizeNumber of transactions to fetch per commit sync request.
max_headers_per_header_sync_fetch: usizeNumber of block headers to fetch per header sync (periodic or live) request.
max_transactions_per_transaction_sync_fetch: usizeNumber of transactions to fetch per transaction sync request.
sync_last_known_own_block_timeout: DurationTime to wait during node start up until the node has synced the last
proposed block via the network peers. When set to 0 the sync
mechanism is disabled. This property is meant to be used for amnesia
recovery.
dag_state_cached_rounds: u32The number of rounds of blocks to be kept in the Dag state cache per authority. The larger the number the more the blocks that will be kept in memory allowing minimising any potential disk access. Value should be at minimum 50 rounds to ensure node performance, but being too large can be expensive in memory usage.
peer_round_ahead_margin: u32Rounds a header from a far-future-bounded source may lead the locally
accepted frontier, in addition to dag_state_cached_rounds, before it
is dropped as too far ahead to connect.
commit_sync_parallel_fetches: usize§commit_sync_batch_size: u32§commit_sync_batches_ahead: usize§commit_recovery_batch_size: u32Maximum number of commits scanned and replayed per batch during recovery, bounding peak memory when a large unprocessed range is replayed at startup.
max_headers_per_bundle: usizeMaximum number of headers to be included in a bundle. Headers exceeding the max allowed limit will be truncated.
max_shards_per_bundle: usizeMaximum number of transaction shards to be included in a bundle. Shards exceeding the max allowed limit will be truncated.
tonic: TonicParametersTonic network settings.
fast_commit_sync_batch_size: u32§commit_sync_gap_threshold: u32§enable_fast_commit_syncer: boolEnable FastCommitSyncer for faster recovery from large commit gaps. Enabled by default; operators can disable it locally if bugs are discovered.
enable_starfish_speed_adaptive_acknowledgments: boolEnable adaptive acknowledgment filtering for StarfishSpeed.
Local heuristic that drops acks for authorities persistently blamed
by recent strong-vote masks. Effective only when the protocol-level
consensus_starfish_speed flag is also on. Enabled by default;
operators can disable it locally without a protocol change.
enable_peer_responsiveness_ranking: boolPrefer more responsive peers when the transactions synchronizer selects peers to fetch from. Ranking is a preference within the already-eligible candidate set, not a change of eligibility, so it cannot affect safety. Enabled by default; disabling it restores the previous selection: a uniform random order that excludes the most recently failed peers (up to less than f+1 by stake).
dag_visualizer_port: Option<u16>Port for the DAG visualizer gRPC server (localhost only).
When set, starts a debugging server for real-time DAG visualization.
Only has an effect when the dag-visualizer feature is compiled in.
Disabled by default (None).
Implementations§
Source§impl Parameters
impl Parameters
Sourcepub fn unhandled_commits_threshold(&self) -> u32
pub fn unhandled_commits_threshold(&self) -> u32
Threshold for the number of commits sent to the consumer but not yet handled, above which commit producers (commit syncers, commit observer recovery) pause to let the consumer catch up.
Sourcepub fn block_rate_burst(&self) -> u64
pub fn block_rate_burst(&self) -> u64
Burst capacity: maximum number of own blocks within block_rate_window
(40 in production, 5 in msim, 8 in tests with the default window).
Sourcepub fn far_future_round_ceiling(&self, frontier: u32) -> u32
pub fn far_future_round_ceiling(&self, frontier: u32) -> u32
Highest round a header from a far-future-bounded source may have,
relative to the accepted frontier, to still be close enough to
connect; headers above this are too far ahead and dropped.
Sourcepub fn max_headers_per_fetch(&self, commit_sync: bool) -> usize
pub fn max_headers_per_fetch(&self, commit_sync: bool) -> usize
Maximum number of block headers served per fetch request, depending on whether the request comes from commit sync or the header synchronizer.
Trait Implementations§
Source§impl Clone for Parameters
impl Clone for Parameters
Source§fn clone(&self) -> Parameters
fn clone(&self) -> Parameters
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Parameters
impl Debug for Parameters
Source§impl Default for Parameters
impl Default for Parameters
Source§impl<'de> Deserialize<'de> for Parameters
impl<'de> Deserialize<'de> for Parameters
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>,
Auto Trait Implementations§
impl Freeze for Parameters
impl RefUnwindSafe for Parameters
impl Send for Parameters
impl Sync for Parameters
impl Unpin for Parameters
impl UnsafeUnpin for Parameters
impl UnwindSafe for Parameters
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> InitializableFromZeroed for Twhere
T: Default,
impl<T> InitializableFromZeroed for Twhere
T: Default,
§unsafe fn initialize(place: *mut T)
unsafe fn initialize(place: *mut T)
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a Request§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.