suideveloper
All questions
Consensus, validators and staking

What is an epoch on Sui, and how long does it last?

October 30, 2026

An epoch is a period during which Sui's validator committee, their stakes, the reference gas price and the protocol version all stay fixed. On mainnet and testnet an epoch lasts about 24 hours. On devnet it lasts about one hour. When an epoch ends, the network reconfigures. Rewards are distributed, staking changes take effect, validators join or leave, and the protocol may upgrade.

Check the current epoch

On mainnet the system state's epochDurationMs is 86400000 (24 hours). Epoch 1290 ran from 2026-10-24 00:05:43 UTC to 2026-10-25 00:05:43 UTC, and epoch 1291 started right after. You can check it yourself:

Terminal
curl -s -X POST https://graphql.mainnet.sui.io/graphql \
  -H 'content-type: application/json' \
  -d '{"query":"{ epoch { epochId startTimestamp referenceGasPrice } }"}'
TypeScript
import { SuiGrpcClient } from '@mysten/sui/grpc';

const client = new SuiGrpcClient({ network: 'mainnet', baseUrl: 'https://fullnode.mainnet.sui.io:443' });
const { systemState } = await client.getCurrentSystemState();
console.log(systemState.epoch, systemState.epochStartTimestampMs, systemState.parameters.epochDurationMs);

Next epoch start ≈ epochStartTimestampMs + epochDurationMs. It's approximate: the epoch closes when a consensus commit timestamp passes the target time, so the boundary drifts by a fraction of a second.

What stays fixed during an epoch

  • The validator set and each validator's stake (voting power)
  • The reference gas price
  • The protocol version and system package versions

What happens at the epoch boundary

Sui's docs describe reconfiguration as the only fully synchronous event in the network:

  1. Close the epoch. Once a consensus commit's timestamp passes the target time, validators stop accepting new user transactions for that epoch and finish the remaining work.
  2. Distribute gas. Computation fees go to the staking reward pool. Storage fees go to the storage fund.
  3. Change the validator set. Pending stake, unstake, validator-add and validator-remove requests are applied. This is the only point where the validator set and stake distribution change.
  4. Upgrade the protocol (maybe). If 2f+1 validators support a new protocol version, the network moves to it.

If the epoch-change transaction fails, the system enters safe mode. The chain keeps running, and the deferred rewards are processed at a later epoch change. The system state exposes this as safeMode.

Why developers care

  • Staking. A new stake starts earning from the next epoch, and rewards are counted per epoch. See staking rewards.
  • Gas price. The reference gas price can only change between epochs, so you can cache it for the rest of the current one.
  • Transaction expiration. A transaction can carry an expiration epoch. It's valid only if it executes before that epoch.
  • A small latency bump. Transactions submitted around reconfiguration see a few hundred milliseconds of extra delay.
  • Owned-object equivocation. If you send two conflicting transactions using the same owned object version, that object can stay locked until the epoch ends. Don't use one owned object in parallel transactions. See object version errors.
  • ctx.epoch() in Move. TxContext exposes the current epoch, which is good enough for coarse, day-sized timing. For real timestamps, use the Clock.
Move
module example::daily;

public fun current_epoch(ctx: &TxContext): u64 {
    ctx.epoch()
}

Sources

More on consensus, validators and staking