checkconsensusvalidatorstatus

package
v0.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

README

check_consensus_validator_status Task

Description

The check_consensus_validator_status task is focused on verifying the status of validators on the consensus chain. It checks if the validators are in the expected state, as per the specified criteria.

Configuration Parameters

  • validatorPubKey:
    The public key of the validator to be checked. If specified, the task will focus on the validator with this public key.

  • validatorNamePattern:
    A pattern for identifying validators by name. Useful for filtering validators to be checked based on their names.

  • validatorIndex:
    The index of a specific validator. If set, the task focuses on the validator with this index. If null, no filter on validator index is applied.

  • validatorStatus:
    A list of allowed validator statuses. The task will check if the validator's status matches any of the statuses in this list.

  • minValidatorBalance:
    The minimum balance of the validator to match.

  • maxValidatorBalance:
    The maximum balance of the validator to match.

  • withdrawalCredsPrefix:
    The withdrawal credentials prefix the validator should have.

  • failOnCheckMiss:
    Determines the task's behavior if the validator's status does not match any of the statuses in validatorStatus. If false, the task will continue running and wait for the validator to match the expected status. If true, the task will fail immediately upon a status mismatch.

  • validatorInfoResultVar:
    The name of the variable where the resulting information about the validator will be stored. This includes status, index, balance and any other relevant data fetched during the check.

Defaults

These are the default settings for the check_consensus_validator_status task:

- name: check_consensus_validator_status
  config:
    validatorPubKey: ""
    validatorNamePattern: ""
    validatorIndex: null
    validatorStatus: []
    minValidatorBalance: 0
    maxValidatorBalance: null
    withdrawalCredsPrefix: ""
    failOnCheckMiss: false
    validatorInfoResultVar: ""

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskName       = "check_consensus_validator_status"
	TaskDescriptor = &types.TaskDescriptor{
		Name:        TaskName,
		Description: "Check validator status on consensus chain.",
		Config:      DefaultConfig(),
		NewTask:     NewTask,
	}
)

Functions

func NewTask

func NewTask(ctx *types.TaskContext, options *types.TaskOptions) (types.Task, error)

Types

type Config

type Config struct {
	ValidatorPubKey       string   `yaml:"validatorPubKey" json:"validatorPubKey"`
	ValidatorNamePattern  string   `yaml:"validatorNamePattern" json:"validatorNamePattern"`
	ValidatorIndex        *uint64  `yaml:"validatorIndex" json:"validatorIndex"`
	ValidatorStatus       []string `yaml:"validatorStatus" json:"validatorStatus"`
	MinValidatorBalance   uint64   `yaml:"minValidatorBalance" json:"minValidatorBalance"`
	MaxValidatorBalance   *uint64  `yaml:"maxValidatorBalance" json:"maxValidatorBalance"`
	WithdrawalCredsPrefix string   `yaml:"withdrawalCredsPrefix" json:"withdrawalCredsPrefix"`
	FailOnCheckMiss       bool     `yaml:"failOnCheckMiss" json:"failOnCheckMiss"`

	ValidatorInfoResultVar   string `yaml:"validatorInfoResultVar" json:"validatorInfoResultVar"`
	ValidatorPubKeyResultVar string `yaml:"validatorPubKeyResultVar" json:"validatorPubKeyResultVar"`
}

func DefaultConfig

func DefaultConfig() Config

func (*Config) Validate

func (c *Config) Validate() error

type Task

type Task struct {
	// contains filtered or unexported fields
}

func (*Task) Config

func (t *Task) Config() interface{}

func (*Task) Execute

func (t *Task) Execute(ctx context.Context) error

func (*Task) LoadConfig

func (t *Task) LoadConfig() error

func (*Task) Timeout

func (t *Task) Timeout() time.Duration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL