Module sui_system::validator
- Struct ValidatorMetadata
- Struct Validator
- Struct StakingRequestEvent
- Struct UnstakingRequestEvent
- Struct ConvertingToFungibleStakedSuiEvent
- Struct RedeemingFungibleStakedSuiEvent
- Constants
- Function new_metadata
- Function new
- Function deactivate
- Function activate
- Function adjust_stake_and_gas_price
- Function request_add_stake
- Function convert_to_fungible_staked_sui
- Function redeem_fungible_staked_sui
- Function request_add_stake_at_genesis
- Function request_withdraw_stake
- Function request_set_gas_price
- Function set_candidate_gas_price
- Function request_set_commission_rate
- Function set_candidate_commission_rate
- Function deposit_stake_rewards
- Function process_pending_stakes_and_withdraws
- Function is_preactive
- Function metadata
- Function sui_address
- Function name
- Function description
- Function image_url
- Function project_url
- Function network_address
- Function p2p_address
- Function primary_address
- Function worker_address
- Function protocol_pubkey_bytes
- Function proof_of_possession
- Function network_pubkey_bytes
- Function worker_pubkey_bytes
- Function next_epoch_network_address
- Function next_epoch_p2p_address
- Function next_epoch_primary_address
- Function next_epoch_worker_address
- Function next_epoch_protocol_pubkey_bytes
- Function next_epoch_proof_of_possession
- Function next_epoch_network_pubkey_bytes
- Function next_epoch_worker_pubkey_bytes
- Function operation_cap_id
- Function next_epoch_gas_price
- Function total_stake_amount
- Function stake_amount
- Function total_stake
- Function voting_power
- Function set_voting_power
- Function pending_stake_amount
- Function pending_stake_withdraw_amount
- Function gas_price
- Function commission_rate
- Function pool_token_exchange_rate_at_epoch
- Function staking_pool_id
- Function is_duplicate
- Macro function both_some_and_equal
- Function new_unverified_validator_operation_cap_and_transfer
- Function update_name
- Function update_description
- Function update_image_url
- Function update_project_url
- Function update_next_epoch_network_address
- Function update_candidate_network_address
- Function update_next_epoch_p2p_address
- Function update_candidate_p2p_address
- Function update_next_epoch_primary_address
- Function update_candidate_primary_address
- Function update_next_epoch_worker_address
- Function update_candidate_worker_address
- Function update_next_epoch_protocol_pubkey
- Function update_candidate_protocol_pubkey
- Function update_next_epoch_network_pubkey
- Function update_candidate_network_pubkey
- Function update_next_epoch_worker_pubkey
- Function update_candidate_worker_pubkey
- Function effectuate_staged_metadata
- Macro function do_extract
- Function validate_metadata
- Function validate_metadata_bcs
- Function get_staking_pool_ref
- Function new_from_metadata
use std::address;
use std::ascii;
use std::bcs;
use std::option;
use std::string;
use std::type_name;
use std::u64;
use std::vector;
use sui::accumulator;
use sui::accumulator_metadata;
use sui::accumulator_settlement;
use sui::address;
use sui::bag;
use sui::balance;
use sui::bcs;
use sui::coin;
use sui::config;
use sui::deny_list;
use sui::dynamic_field;
use sui::dynamic_object_field;
use sui::event;
use sui::funds_accumulator;
use sui::hash;
use sui::hex;
use sui::object;
use sui::party;
use sui::protocol_config;
use sui::sui;
use sui::table;
use sui::transfer;
use sui::tx_context;
use sui::types;
use sui::url;
use sui::vec_map;
use sui::vec_set;
use sui_system::staking_pool;
use sui_system::validator_cap;
Struct ValidatorMetadata
public struct ValidatorMetadata has store
Click to open
Fields
-
sui_address: address - The Sui Address of the validator. This is the sender that created the Validator object, and also the address to send validator/coins to during withdraws.
-
protocol_pubkey_bytes: vector<u8> - The public key bytes corresponding to the private key that the validator holds to sign transactions. For now, this is the same as AuthorityName.
-
network_pubkey_bytes: vector<u8> - The public key bytes corresponding to the private key that the validator uses to establish TLS connections
-
worker_pubkey_bytes: vector<u8> - The public key bytes correstponding to the Narwhal Worker
-
proof_of_possession: vector<u8> - This is a proof that the validator has ownership of the private key
-
name: std::string::String - A unique human-readable name of this validator.
-
description: std::string::String -
image_url: sui::url::Url -
project_url: sui::url::Url -
net_address: std::string::String - The network address of the validator (could also contain extra info such as port, DNS and etc.).
-
p2p_address: std::string::String - The address of the validator used for p2p activities such as state sync (could also contain extra info such as port, DNS and etc.).
-
primary_address: std::string::String - The address of the narwhal primary
-
worker_address: std::string::String - The address of the narwhal worker
-
next_epoch_protocol_pubkey_bytes: std::option::Option<vector<u8>> - "next_epoch" metadata only takes effects in the next epoch. If none, current value will stay unchanged.
-
next_epoch_proof_of_possession: std::option::Option<vector<u8>> -
next_epoch_network_pubkey_bytes: std::option::Option<vector<u8>> -
next_epoch_worker_pubkey_bytes: std::option::Option<vector<u8>> -
next_epoch_net_address: std::option::Option<std::string::String> -
next_epoch_p2p_address: std::option::Option<std::string::String> -
next_epoch_primary_address: std::option::Option<std::string::String> -
next_epoch_worker_address: std::option::Option<std::string::String> -
extra_fields: sui::bag::Bag - Any extra fields that's not defined statically.
Struct Validator
public struct Validator has store
Click to open
Fields
-
metadata: sui_system::validator::ValidatorMetadata - Summary of the validator.
-
voting_power: u64 - The voting power of this validator, which might be different from its stake amount.
-
operation_cap_id: sui::object::ID -
The ID of this validator's current valid
UnverifiedValidatorOperationCap -
gas_price: u64 - Gas price quote, updated only at end of epoch.
-
staking_pool: sui_system::staking_pool::StakingPool - Staking pool for this validator.
-
commission_rate: u64 - Commission rate of the validator, in basis point.
-
next_epoch_stake: u64 - Total amount of stake that would be active in the next epoch.
-
next_epoch_gas_price: u64 - This validator's gas price quote for the next epoch.
-
next_epoch_commission_rate: u64 - The commission rate of the validator starting the next epoch, in basis point.
-
extra_fields: sui::bag::Bag - Any extra fields that's not defined statically.