checkconsensusproposerduty

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: 8 Imported by: 0

README

check_consensus_proposer_duty Task

Description

The check_consensus_proposer_duty task is designed to check for a specific proposer duty on the consensus chain. It verifies if a matching validator is scheduled to propose a block within a specified future time frame (slot distance).

Configuration Parameters

  • validatorNamePattern:
    A pattern to identify validators by name. This parameter is used to select validators for the duty check based on their names.

  • validatorIndex:
    The index of a specific validator to be checked. If this is set, the task focuses on the validator with this index. If it is null, the task does not filter by a specific validator index.

  • minSlotDistance:
    The minimum slot distance from the current slot at which to start checking for the validator's proposer duty. A value of 0 indicates the current slot.

  • maxSlotDistance:
    The maximum number of slots (individual time periods in the blockchain) within which the validator is expected to propose a block. The task succeeds if a matching validator is scheduled for block proposal within this slot distance.

  • failOnCheckMiss:
    This parameter specifies the task's behavior if a matching proposer duty is not found within the maxSlotDistance. If set to false, the task continues running until it either finds a matching proposer duty or reaches its timeout. If true, the task will fail immediately upon not finding a matching duty.

  • continueOnPass:
    When set to false (default), the task exits immediately upon finding a matching proposer duty. When set to true, the task continues running after success, allowing it to be used for continuous monitoring within concurrent task execution.

Defaults

These are the default settings for the check_consensus_proposer_duty task:

- name: check_consensus_proposer_duty
  config:
    validatorNamePattern: ""
    validatorIndex: null
    maxSlotDistance: 0
    failOnCheckMiss: false
    continueOnPass: false

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskName       = "check_consensus_proposer_duty"
	TaskDescriptor = &types.TaskDescriptor{
		Name:        TaskName,
		Description: "Check consensus chain proposer duties.",
		Category:    "consensus",
		Config:      DefaultConfig(),
		Outputs:     []types.TaskOutputDefinition{},
		NewTask:     NewTask,
	}
)

Functions

func NewTask

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

Types

type Config

type Config struct {
	ValidatorNamePattern string  `` /* 126-byte string literal not displayed */
	ValidatorIndex       *uint64 `yaml:"validatorIndex" json:"validatorIndex" desc:"Specific validator index to check for proposer duty."`
	MinSlotDistance      uint64  `yaml:"minSlotDistance" json:"minSlotDistance" desc:"Minimum slot distance from current slot for proposer duty."`
	MaxSlotDistance      uint64  `yaml:"maxSlotDistance" json:"maxSlotDistance" desc:"Maximum slot distance from current slot for proposer duty."`
	FailOnCheckMiss      bool    `yaml:"failOnCheckMiss" json:"failOnCheckMiss" desc:"If true, fail the task when no proposer duty is found in range."`
	ContinueOnPass       bool    `` /* 137-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