Validator

A Validator in the Züs network plays a critical role in ensuring the correctness and integrity of transactions, storage operations, and smart contract executions.

Validators verify operations and help maintain consensus within the blockchain ecosystem. They participate in staking mechanisms and earn rewards based on their contributions.

Validator Structure

The Validator structure defines key attributes associated with a validator node in the network.

// Validator represents validator information.
type Validator struct {
	ID                       common.Key       `json:"validator_id"`
	BaseURL                  string           `json:"url"`
	PublicKey                string           `json:"-"`
	DelegateWallet           string           `json:"delegate_wallet"`
	MinStake                 common.Balance   `json:"min_stake"`
	MaxStake                 common.Balance   `json:"max_stake"`
	NumDelegates             int              `json:"num_delegates"`
	ServiceCharge            float64          `json:"service_charge"`
	StakeTotal               int64            `json:"stake_total"`
	TotalServiceCharge       int64            `json:"total_service_charge"`
	UncollectedServiceCharge int64            `json:"uncollected_service_charge"`
	LastHealthCheck          common.Timestamp `json:"last_health_check"`
	IsKilled                 bool             `json:"is_killed"`
	IsShutdown               bool             `json:"is_shutdown"`
}

Attributes

  • ID: Unique identifier for the validator.

  • BaseURL: The URL through which the validator communicates with the network.

  • PublicKey: The public key associated with the validator.

  • DelegateWallet: The wallet address associated with the validator for staking and rewards.

  • MinStake: Minimum stake required for participation in validation.

  • MaxStake: Maximum stake allowed for a validator.

  • NumDelegates: The number of delegates that can stake on this validator.

  • ServiceCharge: Percentage of rewards charged by the validator as a service fee.

  • StakeTotal: Total amount staked on the validator.

  • TotalServiceCharge: Total service charge collected over time.

  • UncollectedServiceCharge: Pending service charges yet to be collected.

  • LastHealthCheck: Timestamp of the last health check performed on the validator.

  • IsKilled: Indicates if the validator is terminated.

  • IsShutdown: Indicates if the validator is currently shut down.

Updating Validator Settings

Validators can update their settings using the UpdateValidator structure:

Converting UpdateValidator to Blockchain Validation Node

To apply updates to the blockchain, the UpdateValidator struct must be converted to a blockchain-compatible format:

Retrieving Validator Information

Get a Single Validator

To retrieve information about a specific validator, use the GetValidator function:

Get a List of Validators

To retrieve a list of validators in the network, use:

Managing Validators

Update Validator Settings

Shutdown a Validator

Validators are integral to the Züs network, ensuring transaction integrity, maintaining consensus, and securing the blockchain. Properly managing validators, staking, and rewards distribution is crucial for a healthy decentralized ecosystem.

Last updated