Skip to main content

ValidatorSetV1

ValidatorSetV1

class ValidatorSetV1

A typed view of the 0x3::validator_set::ValidatorSetV1 embedded in [IotaSystemStateV1].

Unlike [ValidatorSetV2] there are no committee members: in this layout every active validator is part of the committee.

debugDescription

var debugDescription: String { get }

A textual representation of this instance, suitable for debugging.

Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the String(reflecting:) initializer. This initializer works with any type, and uses the custom debugDescription property for types that conform to CustomDebugStringConvertible:

struct Point: CustomDebugStringConvertible {
let x: Int, y: Int

var debugDescription: String {
return "(\(x), \(y))"
}
}

let p = Point(x: 21, y: 30)
let s = String(reflecting: p)
print(s)
// Prints "(21, 30)"

The conversion of p to a string in the assignment to s uses the Point type's debugDescription property.

activeValidators()

func activeValidators() -> [ValidatorV1]

The current list of active validators.

atRiskValidators()

func atRiskValidators() -> [Address : UInt64]

Number of epochs each at-risk validator has had stake below the low-stake threshold.

extraFieldsId()

func extraFieldsId() -> ObjectId

Object ID of the Bag holding fields added to this struct after its current on-chain layout was set.

inactiveValidatorsId()

func inactiveValidatorsId() -> ObjectId

Object ID of the Table holding the inactive validators, keyed by staking pool ID.

pendingActiveValidatorsId()

func pendingActiveValidatorsId() -> ObjectId

Object ID of the TableVec holding the pending validator candidates, keyed by their index.

pendingActiveValidatorsSize()

func pendingActiveValidatorsSize() -> UInt64

Number of pending validator candidates. The candidates themselves are stored in dynamic fields and are not part of this struct's contents.

pendingRemovals()

func pendingRemovals() -> [UInt64]

Indices into active_validators with pending removal requests.

stakingPoolMappingsId()

func stakingPoolMappingsId() -> ObjectId

Object ID of the Table mapping each staking pool ID to its validator address.

totalStake()

func totalStake() -> UInt64

Total stake from all active validators at the beginning of the epoch, in nanos.

validatorCandidatesId()

func validatorCandidatesId() -> ObjectId

Object ID of the Table holding the validator candidates, keyed by their address.