Skip to main content

GetEpoch

gRPC
RPC Methodsui.rpc.v2.LedgerService/GetEpoch

Retrieves the information of the specified epoch. Returns the current epoch if no epoch is specified.

Proto files required

Running the examples below requires the official Sui proto files. Download the proto files, then set the example's -import-path relative to the proto root (the -proto path in the examples is relative to the proto root).

github.com/MystenLabs/sui-apis/tree/main/proto

Request Message
epochinteger
The requested epoch. If no epoch is provided, the current epoch will be returned.
read_maskobject
Mask specifying which fields to read. If no mask is specified, defaults to epoch.
pathsarray
The set of field mask paths (e.g. "object_id", "version", "digest").
Response Message
The requested epoch.
epochinteger
Epoch number.
Validator committee for the epoch.
epochinteger
The epoch where this committee governs.
The committee members.
public_keystring
The 96-byte Bls12381 public key for this validator.
weightinteger
Voting weight this validator possesses.
Snapshot of the system state.
versioninteger
Version of the data structure.
epochinteger
Current epoch.
protocol_versioninteger
Current protocol version.
The validator set.
total_stakeinteger
Total stake across the set.
Currently active validators.
namestring
Human-readable name.
addressstring
Sui address of the validator.
descriptionstring
Description of the validator.
image_urlstring
Image URL.
project_urlstring
Project URL.
protocol_public_keystring
Protocol public key.
proof_of_possessionstring
Proof of possession.
network_public_keystring
Network public key.
worker_public_keystring
Worker public key.
network_addressstring
Network address.
p2p_addressstring
P2P address.
primary_addressstring
Primary address.
worker_addressstring
Worker address.
next_epoch_protocol_public_keystring
Next-epoch protocol public key.
next_epoch_proof_of_possessionstring
Next-epoch proof of possession.
next_epoch_network_public_keystring
Next-epoch network public key.
next_epoch_worker_public_keystring
Next-epoch worker public key.
next_epoch_network_addressstring
Next-epoch network address.
next_epoch_p2p_addressstring
Next-epoch P2P address.
next_epoch_primary_addressstring
Next-epoch primary address.
next_epoch_worker_addressstring
Next-epoch worker address.
Additional metadata fields.
idstring
UID of the Table or Bag.
sizeinteger
Number of key-value pairs.
voting_powerinteger
Voting power of the validator.
operation_cap_idstring
Operation capability ObjectId.
gas_priceinteger
Gas price set by the validator.
The validator's staking pool.
idstring
UID of the staking pool.
activation_epochinteger
Epoch at which the pool was activated.
deactivation_epochinteger
Epoch at which the pool was deactivated.
sui_balanceinteger
Total SUI in the pool.
rewards_poolinteger
Rewards pool balance.
pool_token_balanceinteger
Pool token balance.
Exchange rate table.
idstring
UID of the Table or Bag.
sizeinteger
Number of key-value pairs.
pending_stakeinteger
Pending stake to be added.
pending_total_sui_withdrawinteger
Pending total SUI to withdraw.
pending_pool_token_withdrawinteger
Pending pool tokens to withdraw.
Additional extensible fields.
idstring
UID of the Table or Bag.
sizeinteger
Number of key-value pairs.
commission_rateinteger
Commission rate in basis points.
next_epoch_stakeinteger
Stake for the next epoch.
next_epoch_gas_priceinteger
Gas price for the next epoch.
next_epoch_commission_rateinteger
Commission rate for the next epoch.
Additional extensible fields.
idstring
UID of the Table or Bag.
sizeinteger
Number of key-value pairs.
Validators pending activation.
idstring
UID of the Table or Bag.
sizeinteger
Number of key-value pairs.
pending_removalsarray
Indices of validators pending removal.
Mapping of staking pools.
idstring
UID of the Table or Bag.
sizeinteger
Number of key-value pairs.
Inactive validators.
idstring
UID of the Table or Bag.
sizeinteger
Number of key-value pairs.
Validator candidates.
idstring
UID of the Table or Bag.
sizeinteger
Number of key-value pairs.
At-risk validators.
keystring
Address of the at-risk validator.
valueinteger
Number of epochs at risk.
Additional extensible fields.
idstring
UID of the Table or Bag.
sizeinteger
Number of key-value pairs.
The storage fund.
total_object_storage_rebatesinteger
Total object storage rebates.
non_refundable_balanceinteger
Non-refundable balance.
System parameters.
epoch_duration_msinteger
Epoch duration in milliseconds.
stake_subsidy_start_epochinteger
Epoch at which stake subsidy starts.
min_validator_countinteger
Minimum number of validators.
max_validator_countinteger
Maximum number of validators.
min_validator_joining_stakeinteger
Deprecated. Minimum stake required to join.
validator_low_stake_thresholdinteger
Deprecated. Low stake threshold.
validator_very_low_stake_thresholdinteger
Deprecated. Very low stake threshold.
validator_low_stake_grace_periodinteger
Grace period for low-stake validators.
Additional extensible fields.
idstring
UID of the Table or Bag.
sizeinteger
Number of key-value pairs.
reference_gas_priceinteger
Reference gas price.
Validator report records.
reportedstring
Address of the reported validator.
reportersarray
Addresses of the reporting validators.
Stake subsidy information.
balanceinteger
Reserved SUI balance for subsidies.
distribution_counterinteger
Number of distributions made.
current_distribution_amountinteger
Current distribution amount.
stake_subsidy_period_lengthinteger
Length of a subsidy period.
stake_subsidy_decrease_rateinteger
Decrease rate in basis points.
Additional extensible fields.
idstring
UID of the Table or Bag.
sizeinteger
Number of key-value pairs.
safe_modeboolean
Whether the system is in safe mode.
safe_mode_storage_rewardsinteger
Storage rewards accrued in safe mode.
safe_mode_computation_rewardsinteger
Computation rewards accrued in safe mode.
safe_mode_storage_rebatesinteger
Storage rebates accrued in safe mode.
safe_mode_non_refundable_storage_feeinteger
Non-refundable storage fee accrued in safe mode.
epoch_start_timestamp_msinteger
Epoch start timestamp in milliseconds.
Additional extensible fields.
idstring
UID of the Table or Bag.
sizeinteger
Number of key-value pairs.
first_checkpointinteger
First checkpoint of the epoch.
last_checkpointinteger
Last checkpoint of the epoch.
startstring
Start timestamp of the epoch.
endstring
End timestamp of the epoch.
reference_gas_priceinteger
Reference gas price, denominated in MIST.
Protocol configuration for the epoch.
protocol_versioninteger
Protocol version.
Feature flag toggles.
keystring
Flag name.
valueboolean
Whether the flag is enabled.
Configuration attributes.
keystring
Attribute key.
valuestring
Attribute value.
grpcurl
grpcurl \
-import-path . \
-proto sui/rpc/v2/ledger_service.proto \
-H 'X-API-KEY: nodit-demo' \
-d '{
"epoch": 100
}' \
sui-mainnet.nodit.io:443 \
sui.rpc.v2.LedgerService/GetEpoch