generateexits

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

README

generate_exits Task

Description

The generate_exits task is designed to create and send voluntary exit transactions to the network. This task is essential for testing how the network handles the process of validators voluntarily exiting from their responsibilities.

Configuration Parameters

  • limitPerSlot:
    The maximum number of exit transactions to generate per slot.

  • limitTotal:
    The total limit on the number of exit transactions that the task will generate.

  • mnemonic:
    A mnemonic phrase used for generating the validators' keys involved in the exit transactions.

  • startIndex:
    The starting index within the mnemonic from which to begin generating validator keys. This sets the initial point for key generation.

  • indexCount:
    The number of validator keys to generate from the mnemonic, determining how many unique exit transactions will be created.

  • builderExit:
    If set to true, generates builder exits instead of validator exits. Builder exits use the BUILDER_INDEX_FLAG (2^40) OR'd with the builder index in the ValidatorIndex field of the voluntary exit message. The task looks up the pubkey in the shared builder set cache instead of the validator set. Default: false.

  • sendToAllClients:
    If set to true, submits the voluntary exit to all ready consensus clients in parallel instead of just one. Useful when not all clients support a particular exit type (e.g. builder exits). The task succeeds if at least one client accepts the exit. Default: false.

  • exitEpoch:
    The exit epoch number set within the exit message. (defaults to head epoch)

  • clientPattern:
    A regex pattern for selecting specific client endpoints for sending the exit transactions. If left empty, any available endpoint will be used.

  • excludeClientPattern:
    A regex pattern to exclude certain client endpoints from being used for exit transactions. This parameter adds a layer of control by allowing the exclusion of specific clients, which can be useful for testing under various network scenarios.

  • awaitInclusion:
    If set to true, the task waits for all submitted voluntary exits to be included in beacon blocks before completing. The task monitors new blocks and checks for the presence of the submitted exit operations.

Outputs

  • exitedValidators:
    Array of validator indices that were submitted for exit.

  • includedExits:
    Number of exits confirmed on-chain (only populated when awaitInclusion is enabled).

Defaults

Default settings for the generate_exits task:

- name: generate_exits
  config:
    limitPerSlot: 0
    limitTotal: 0
    mnemonic: ""
    startIndex: 0
    indexCount: 0
    builderExit: false
    sendToAllClients: false
    exitEpoch: -1
    clientPattern: ""
    excludeClientPattern: ""
    awaitInclusion: false

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskName       = "generate_exits"
	TaskDescriptor = &types.TaskDescriptor{
		Name:        TaskName,
		Description: "Generates voluntary exits and sends them to the network",
		Category:    "validator",
		Config:      DefaultConfig(),
		Outputs: []types.TaskOutputDefinition{
			{
				Name:        "exitedValidators",
				Type:        "array",
				Description: "Array of validator indices that were submitted for exit.",
			},
			{
				Name:        "includedExits",
				Type:        "number",
				Description: "Number of exits included on-chain (when awaitInclusion is enabled).",
			},
		},
		NewTask: NewTask,
	}
)

Functions

func NewTask

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

Types

type Config

type Config struct {
	LimitPerSlot         int    `yaml:"limitPerSlot" json:"limitPerSlot" require:"A.1" desc:"Maximum number of exit operations to generate per slot."`
	LimitTotal           int    `yaml:"limitTotal" json:"limitTotal" require:"A.2" desc:"Total limit on the number of exit operations to generate."`
	Mnemonic             string `yaml:"mnemonic" json:"mnemonic" require:"B" desc:"Mnemonic phrase used to generate validator keys."`
	StartIndex           int    `yaml:"startIndex" json:"startIndex" desc:"Index within the mnemonic from which to start generating validator keys."`
	IndexCount           int    `yaml:"indexCount" json:"indexCount" require:"A.3" desc:"Number of validator keys to generate from the mnemonic."`
	BuilderExit          bool   `` /* 158-byte string literal not displayed */
	SendToAllClients     bool   `` /* 150-byte string literal not displayed */
	ExitEpoch            int64  `yaml:"exitEpoch" json:"exitEpoch" desc:"Exit epoch to set in the voluntary exit message (-1 for current epoch)."`
	ClientPattern        string `yaml:"clientPattern" json:"clientPattern" desc:"Regex pattern to select specific client endpoints for submitting operations."`
	ExcludeClientPattern string `yaml:"excludeClientPattern" json:"excludeClientPattern" desc:"Regex pattern to exclude certain client endpoints."`
	AwaitInclusion       bool   `` /* 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