generatedeposits

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

README

generate_deposits Task

Description

The generate_deposits task focuses on creating deposit transactions and sending them to the network. This task is crucial for testing how the network handles new deposits.

Configuration Parameters

  • limitPerSlot:
    The maximum number of deposit transactions to be generated for each slot.

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

  • limitPending:
    The limit based on the number of pending deposit transactions.

  • mnemonic:
    A mnemonic phrase used to generate validator keys. These keys are essential for creating valid deposit transactions.

  • startIndex:
    The starting index within the mnemonic for generating validator keys. This defines the beginning point for the key generation process.

  • indexCount:
    The total number of validator keys to generate from the mnemonic. This number determines how many unique deposit transactions will be created.

  • publicKey
    The publickey of the validator to generate a deposit for. This is for topup deposits only.

  • walletPrivkey:
    The private key of the wallet from which the deposit will be made. This key is crucial for initiating the deposit transaction.

  • depositContract:
    The address of the deposit contract on the blockchain. This is the destination where the deposit transactions will be sent.

  • depositAmount: The amount in ETH to be deposited for each transaction. This setting specifies the stake amount per validator being registered.

  • depositTxFeeCap:
    The maximum fee cap for each deposit transaction. This limits the transaction fees for deposit operations.

  • depositTxTipCap:
    The maximum tip cap for each deposit transaction. This controls the tip or priority fee for each transaction.

  • withdrawalCredentials:
    Specifies the withdrawal credentials for the deposited ETH. If left empty, it defaults to a standard 0x00... credentials based on the validator mnemonic.

  • topUpDeposit:
    Specifies if the deposit should be a topup deposit (without withdrawal credentials or signature)

  • clientPattern:
    A regex pattern to select specific client endpoints for sending deposit transactions. If left blank, any available endpoint will be used.

  • excludeClientPattern:
    A regex pattern to exclude certain clients from being used for deposit transactions. This parameter adds an extra layer of control over client selection.

  • awaitReceipt:
    If set to true, the task waits for a receipt for each deposit transaction, ensuring they are confirmed on the execution layer.

  • failOnReject:
    Determines whether the task should fail if any deposit transaction is rejected by the network.

  • awaitInclusion:
    If set to true, the task waits for all deposits to be included in beacon blocks before completing. This is different from awaitReceipt which only waits for execution layer transaction inclusion. The task monitors beacon blocks and checks for the presence of the submitted deposit pubkeys.

  • depositTransactionsResultVar:
    The variable where the hashes of the generated deposit transactions will be stored.

  • depositReceiptsResultVar:
    The variable for storing the receipts of the deposit transactions, applicable if awaitReceipt is true.

  • validatorPubkeysResultVar:
    The variable where the public keys of the validators associated with the generated deposits will be stored.

Outputs

  • validatorPubkeys:
    Array of validator public keys for the deposits.

  • depositTransactions:
    Array of deposit transaction hashes.

  • depositReceipts:
    Array of deposit transaction receipts.

  • includedDeposits:
    Number of deposits confirmed on the beacon chain (only populated when awaitInclusion is enabled).

Defaults

Default settings for the generate_deposits task:

- name: generate_deposits
  config:
    limitPerSlot: 0
    limitTotal: 0
    limitPending: 0
    mnemonic: ""
    startIndex: 0
    indexCount: 0
    publicKey: ""
    walletPrivkey: ""
    depositContract: ""
    depositAmount: 32
    depositTxFeeCap: 100000000000
    depositTxTipCap: 1000000000
    withdrawalCredentials: ""
    topUpDeposit: false
    clientPattern: ""
    excludeClientPattern: ""
    awaitReceipt: false
    failOnReject: false
    awaitInclusion: false
    depositTransactionsResultVar: ""
    depositReceiptsResultVar: ""
    validatorPubkeysResultVar: ""

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskName       = "generate_deposits"
	TaskDescriptor = &types.TaskDescriptor{
		Name:        TaskName,
		Description: "Generates deposits and sends them to the network",
		Category:    "validator",
		Config:      DefaultConfig(),
		Outputs: []types.TaskOutputDefinition{
			{
				Name:        "validatorPubkeys",
				Type:        "array",
				Description: "Array of validator public keys for the deposits.",
			},
			{
				Name:        "depositTransactions",
				Type:        "array",
				Description: "Array of deposit transaction hashes.",
			},
			{
				Name:        "depositReceipts",
				Type:        "array",
				Description: "Array of deposit transaction receipts.",
			},
			{
				Name:        "includedDeposits",
				Type:        "number",
				Description: "Number of deposits included on beacon 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 deposit operations to generate per slot."`
	LimitTotal            int    `yaml:"limitTotal" json:"limitTotal" require:"A.2" desc:"Total limit on the number of deposit operations to generate."`
	LimitPending          int    `yaml:"limitPending" json:"limitPending" desc:"Maximum number of pending deposits to allow before waiting."`
	Mnemonic              string `yaml:"mnemonic" json:"mnemonic" require:"B.1" 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."`
	PublicKey             string `` /* 135-byte string literal not displayed */
	WalletPrivkey         string `yaml:"walletPrivkey" json:"walletPrivkey" require:"C" desc:"Private key of the wallet used to fund deposit transactions."`
	DepositContract       string `yaml:"depositContract" json:"depositContract" require:"D" desc:"Address of the deposit contract on the execution layer."`
	DepositAmount         uint64 `yaml:"depositAmount" json:"depositAmount" desc:"Amount of ETH to deposit per validator."`
	DepositTxFeeCap       int64  `yaml:"depositTxFeeCap" json:"depositTxFeeCap" desc:"Maximum fee cap (in wei) for deposit transactions."`
	DepositTxTipCap       int64  `yaml:"depositTxTipCap" json:"depositTxTipCap" desc:"Maximum priority tip (in wei) for deposit transactions."`
	WithdrawalCredentials string `yaml:"withdrawalCredentials" json:"withdrawalCredentials" desc:"Custom withdrawal credentials to use for deposits."`
	TopUpDeposit          bool   `yaml:"topUpDeposit" json:"topUpDeposit" desc:"If true, add to existing validator balance instead of creating new validators."`
	ClientPattern         string `` /* 127-byte string literal not displayed */
	ExcludeClientPattern  string `yaml:"excludeClientPattern" json:"excludeClientPattern" desc:"Regex pattern to exclude certain client endpoints."`
	AwaitReceipt          bool   `yaml:"awaitReceipt" json:"awaitReceipt" desc:"Wait for transaction receipts on the execution layer before completing."`
	FailOnReject          bool   `yaml:"failOnReject" json:"failOnReject" desc:"Fail the task if any deposit transaction is rejected."`
	AwaitInclusion        bool   `yaml:"awaitInclusion" json:"awaitInclusion" desc:"Wait for deposits to be included in beacon blocks before completing."`

	DepositTransactionsResultVar string `` /* 134-byte string literal not displayed */
	DepositReceiptsResultVar     string `` /* 126-byte string literal not displayed */
	ValidatorPubkeysResultVar    string `` /* 128-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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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