generatedeposits

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: GPL-3.0 Imports: 26 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.

  • 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.

  • 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 network.

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

  • 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.

Defaults

Default settings for the generate_deposits task:

- name: generate_deposits
  config:
    limitPerSlot: 0
    limitTotal: 0
    limitPending: 0
    mnemonic: ""
    startIndex: 0
    indexCount: 0
    walletPrivkey: ""
    depositContract: ""
    depositAmount: 32
    depositTxFeeCap: 100000000000
    depositTxTipCap: 1000000000
    withdrawalCredentials: ""
    clientPattern: ""
    excludeClientPattern: ""
    awaitReceipt: false
    failOnReject: 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",
		Config:      DefaultConfig(),
		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"`
	LimitTotal            int    `yaml:"limitTotal" json:"limitTotal"`
	LimitPending          int    `yaml:"limitPending" json:"limitPending"`
	Mnemonic              string `yaml:"mnemonic" json:"mnemonic"`
	StartIndex            int    `yaml:"startIndex" json:"startIndex"`
	IndexCount            int    `yaml:"indexCount" json:"indexCount"`
	WalletPrivkey         string `yaml:"walletPrivkey" json:"walletPrivkey"`
	DepositContract       string `yaml:"depositContract" json:"depositContract"`
	DepositAmount         uint64 `yaml:"depositAmount" json:"depositAmount"`
	DepositTxFeeCap       int64  `yaml:"depositTxFeeCap" json:"depositTxFeeCap"`
	DepositTxTipCap       int64  `yaml:"depositTxTipCap" json:"depositTxTipCap"`
	WithdrawalCredentials string `yaml:"withdrawalCredentials" json:"withdrawalCredentials"`
	ClientPattern         string `yaml:"clientPattern" json:"clientPattern"`
	ExcludeClientPattern  string `yaml:"excludeClientPattern" json:"excludeClientPattern"`
	AwaitReceipt          bool   `yaml:"awaitReceipt" json:"awaitReceipt"`
	FailOnReject          bool   `yaml:"failOnReject" json:"failOnReject"`

	DepositTransactionsResultVar string `yaml:"depositTransactionsResultVar" json:"depositTransactionsResultVar"`
	DepositReceiptsResultVar     string `yaml:"depositReceiptsResultVar" json:"depositReceiptsResultVar"`
	ValidatorPubkeysResultVar    string `yaml:"validatorPubkeysResultVar" json:"validatorPubkeysResultVar"`
}

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