Epoch
Activity on Sui is partitioned in time, into epochs.
Epoch changes are opportunities for the network to reconfigure itself (perform protocol or system package upgrades, or change the committee) and distribute staking rewards. The network aims to keep epochs roughly the same duration as each other.
During a particular epoch the following data is fixed:
- protocol version,
- reference gas price,
- system package versions,
- validators in the committee.
type Epoch implements Node {
checkpoints(
first: Int
after: String
last: Int
before: String
filter: CheckpointFilter
): CheckpointConnection
coinDenyList: Object
endTimestamp: DateTime
epochId: UInt53!
fundInflow: BigInt
fundOutflow: BigInt
fundSize: BigInt
id: ID!
liveObjectSetDigest: String
netInflow: BigInt
protocolConfigs: ProtocolConfigs
referenceGasPrice: BigInt
startTimestamp: DateTime
systemPackages(
first: Int
after: String
last: Int
before: String
): MovePackageConnection
systemState: MoveValue
totalCheckpoints: UInt53
totalGasFees: BigInt
totalStakeRewards: BigInt
totalStakeSubsidies: BigInt
totalTransactions: UInt53
transactions(
first: Int
after: String
last: Int
before: String
filter: TransactionFilter
): TransactionConnection
validatorSet: ValidatorSet
}
Fields
Epoch.checkpoints ● CheckpointConnection object
The epoch's corresponding checkpoints.
Epoch.checkpoints.first ● Int scalar
Epoch.checkpoints.after ● String scalar
Epoch.checkpoints.last ● Int scalar
Epoch.checkpoints.before ● String scalar
Epoch.checkpoints.filter ● CheckpointFilter input
Epoch.coinDenyList ● Object object
State of the Coin DenyList object (0x403) at the start of this epoch.
The DenyList controls access to Regulated Coins. Writes to the DenyList are accumulated and only take effect on the next epoch boundary. Consequently, it's possible to determine the state of the DenyList for a transaction by reading it at the start of the epoch the transaction is in.
Epoch.endTimestamp ● DateTime scalar
The timestamp associated with the last checkpoint in the epoch (or null if the epoch has not finished yet).
Epoch.epochId ● UInt53! non-null scalar
The epoch's id as a sequence number that starts at 0 and is incremented by one at every epoch change.
Epoch.fundInflow ● BigInt scalar
The storage fees paid for transactions executed during the epoch (or null if the epoch has not finished yet).
Epoch.fundOutflow ● BigInt scalar
The storage fee rebates paid to users who deleted the data associated with past transactions (or null if the epoch has not finished yet).