iota_graphql_rpc/types/
system_parameters.rs

1// Copyright (c) Mysten Labs, Inc.
2// Modifications Copyright (c) 2024 IOTA Stiftung
3// SPDX-License-Identifier: Apache-2.0
4
5use async_graphql::*;
6
7use crate::types::big_int::BigInt;
8
9/// Details of the system that are decided during genesis.
10#[derive(Clone, Debug, PartialEq, Eq, SimpleObject)]
11pub(crate) struct SystemParameters {
12    /// Target duration of an epoch, in milliseconds.
13    pub duration_ms: Option<BigInt>,
14
15    /// The minimum number of active validators that the system supports.
16    pub min_validator_count: Option<u64>,
17
18    /// The maximum number of active validators that the system supports.
19    pub max_validator_count: Option<u64>,
20
21    /// Minimum stake needed to become a new validator.
22    pub min_validator_joining_stake: Option<BigInt>,
23
24    /// Validators with stake below this threshold will enter the grace period
25    /// (see `validatorLowStakeGracePeriod`), after which they are removed
26    /// from the active validator set.
27    pub validator_low_stake_threshold: Option<BigInt>,
28
29    /// Validators with stake below this threshold will be removed from the
30    /// active validator set at the next epoch boundary, without a grace
31    /// period.
32    pub validator_very_low_stake_threshold: Option<BigInt>,
33
34    /// The number of epochs that a validator has to recover from having less
35    /// than `validatorLowStakeThreshold` stake.
36    pub validator_low_stake_grace_period: Option<BigInt>,
37}