checkconsensusvalidatorstatus

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 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.

Task Behavior
  • The task monitors validator status at each epoch.
  • By default, the task returns immediately when a matching validator is found.
  • Use continueOnPass: true to keep monitoring even after success (useful for tracking status changes).

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. Default: "".

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

  • 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. Default: null.

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

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

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

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

  • 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. Default: false.

  • continueOnPass:
    If set to true, the task continues monitoring validator status even after a matching validator is found. This is useful for tracking status changes over time. If false (default), the task exits immediately on success.

  • 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. Default: "".

  • validatorPubKeyResultVar:
    The name of the variable where the validator's public key will be stored. Default: "".

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
    continueOnPass: false
    validatorInfoResultVar: ""
    validatorPubKeyResultVar: ""

Outputs

  • validator:
    The validator information object containing status, index, balance, and other data.

  • pubkey:
    The validator's public key as a hex string.

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.",
		Category:    "consensus",
		Config:      DefaultConfig(),
		Outputs: []types.TaskOutputDefinition{
			{
				Name:        "validator",
				Type:        "object",
				Description: "The validator information object.",
			},
			{
				Name:        "pubkey",
				Type:        "string",
				Description: "The validator's public key.",
			},
		},
		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" desc:"Public key of the validator to check."`
	ValidatorNamePattern  string   `yaml:"validatorNamePattern" json:"validatorNamePattern" desc:"Regex pattern to match validator names."`
	ValidatorIndex        *uint64  `yaml:"validatorIndex" json:"validatorIndex" desc:"Index of the validator to check."`
	ValidatorStatus       []string `yaml:"validatorStatus" json:"validatorStatus" desc:"List of expected validator statuses."`
	MinValidatorBalance   uint64   `yaml:"minValidatorBalance" json:"minValidatorBalance" desc:"Minimum validator balance required (in gwei)."`
	MaxValidatorBalance   *uint64  `yaml:"maxValidatorBalance" json:"maxValidatorBalance" desc:"Maximum validator balance allowed (in gwei)."`
	WithdrawalCredsPrefix string   `yaml:"withdrawalCredsPrefix" json:"withdrawalCredsPrefix" desc:"Expected prefix of withdrawal credentials."`
	FailOnCheckMiss       bool     `yaml:"failOnCheckMiss" json:"failOnCheckMiss" desc:"If true, fail the task when validator status check condition is not met."`
	ContinueOnPass        bool     `` /* 137-byte string literal not displayed */

	ValidatorInfoResultVar   string `yaml:"validatorInfoResultVar" json:"validatorInfoResultVar" deprecated:"true" desc:"Deprecated: Use task outputs instead."`
	ValidatorPubKeyResultVar string `` /* 126-byte string literal not displayed */
}

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