checkconsensusbuildersstatus

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

README

check_consensus_builder_status Task

Description

The check_consensus_builder_status task verifies the status of builders on the consensus chain. Builders are a GLOAS-specific concept stored in a separate section of the beacon state (not the validator set). The task uses a shared builder cache that loads the full beacon state to extract builder information.

Task Behavior
  • The task monitors builder status at each epoch.
  • By default, the task returns immediately when a matching builder is found that meets all criteria.
  • Use continueOnPass: true to keep monitoring even after success (useful for tracking status changes).
  • The builder cache is shared across tasks and also updates the validator set cache when loading the full beacon state.

Configuration Parameters

  • builderPubKey:
    The public key of the builder to check. If specified, the task will focus on the builder with this public key. Default: "".

  • builderIndex:
    The index of a specific builder in the builder list. If set, the task focuses on the builder at this index. If null, no filter on builder index is applied. Default: null.

  • minBuilderBalance:
    The minimum balance (in gwei) the builder must have. Default: 0.

  • maxBuilderBalance:
    The maximum balance (in gwei) the builder may have. Default: null.

  • expectActive:
    If true, expect the builder to be active (withdrawable_epoch == FAR_FUTURE_EPOCH). Default: false.

  • expectExiting:
    If true, expect the builder to be exiting or exited (withdrawable_epoch != FAR_FUTURE_EPOCH). Default: false.

  • failOnCheckMiss:
    If false, the task will continue running and wait for the builder 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 builder status even after a matching builder is found. Default: false.

Defaults

- name: check_consensus_builder_status
  config:
    builderPubKey: ""
    builderIndex: null
    minBuilderBalance: 0
    maxBuilderBalance: null
    expectActive: false
    expectExiting: false
    failOnCheckMiss: false
    continueOnPass: false

Outputs

  • builder:
    The builder information object containing pubkey, balance, deposit_epoch, withdrawable_epoch, and other data.

  • builderIndex:
    The builder's index in the builder list.

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskName       = "check_consensus_builder_status"
	TaskDescriptor = &types.TaskDescriptor{
		Name:        TaskName,
		Description: "Check builder status on consensus chain by loading the full beacon state.",
		Category:    "consensus",
		Config:      DefaultConfig(),
		Outputs: []types.TaskOutputDefinition{
			{
				Name:        "builder",
				Type:        "object",
				Description: "The builder information object.",
			},
			{
				Name:        "builderIndex",
				Type:        "number",
				Description: "The builder's index in the builder list.",
			},
			{
				Name:        "pubkey",
				Type:        "string",
				Description: "The builder'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 {
	BuilderPubKey     string  `yaml:"builderPubKey" json:"builderPubKey" desc:"Public key of the builder to check."`
	BuilderIndex      *uint64 `yaml:"builderIndex" json:"builderIndex" desc:"Index of the builder to check."`
	MinBuilderBalance uint64  `yaml:"minBuilderBalance" json:"minBuilderBalance" desc:"Minimum builder balance required (in gwei)."`
	MaxBuilderBalance *uint64 `yaml:"maxBuilderBalance" json:"maxBuilderBalance" desc:"Maximum builder balance allowed (in gwei)."`
	ExpectExiting     bool    `` /* 146-byte string literal not displayed */
	ExpectActive      bool    `` /* 127-byte string literal not displayed */
	FailOnCheckMiss   bool    `yaml:"failOnCheckMiss" json:"failOnCheckMiss" desc:"If true, fail the task when builder status check condition is not met."`
	ContinueOnPass    bool    `` /* 137-byte string literal not displayed */
	ClientPattern     string  `yaml:"clientPattern" json:"clientPattern" desc:"Regex pattern to select specific client endpoints for state queries."`
}

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