sui_graphql_rpc/types/system_parameters.rs
1// Copyright (c) Mysten Labs, Inc.
2// SPDX-License-Identifier: Apache-2.0
3use super::{big_int::BigInt, uint53::UInt53};
4use async_graphql::*;
5
6/// Details of the system that are decided during genesis.
7#[derive(Clone, Debug, PartialEq, Eq, SimpleObject)]
8pub(crate) struct SystemParameters {
9 /// Target duration of an epoch, in milliseconds.
10 pub duration_ms: Option<BigInt>,
11
12 /// The epoch at which stake subsidies start being paid out.
13 pub stake_subsidy_start_epoch: Option<UInt53>,
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 (see
25 /// `validatorLowStakeGracePeriod`), after which they are removed from the active validator set.
26 pub validator_low_stake_threshold: Option<BigInt>,
27
28 /// Validators with stake below this threshold will be removed from the active validator set
29 /// at the next epoch boundary, without a grace period.
30 pub validator_very_low_stake_threshold: Option<BigInt>,
31
32 /// The number of epochs that a validator has to recover from having less than
33 /// `validatorLowStakeThreshold` stake.
34 pub validator_low_stake_grace_period: Option<BigInt>,
35}