generateeoatransactions

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

README

generate_eoa_transactions Task

Description

The generate_eoa_transactions task creates and sends standard transactions from End-User Owned Accounts (EOAs) to the network, essential for testing regular transaction processing. The task is intended for mass transaction generation.

Configuration Parameters

  • limitPerBlock:
    The maximum number of transactions to generate per block.

  • limitTotal:
    The total limit on the number of transactions to be generated.

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

  • privateKey:
    The private key of the main wallet.

  • childWallets:
    The number of child wallets to be created and funded. (If 0, send blob transactions directly from privateKey wallet)

  • walletSeed:
    The seed phrase used for generating child wallets. (Will be used in combination with privateKey to generate unique child wallets that do not collide with other tasks)

  • refillPendingLimit:
    The maximum number of pending refill transactions allowed. This limit is used to control the refill process for child wallets, ensuring that the number of refill transactions does not exceed this threshold.

  • refillFeeCap:
    The maximum fee cap for refilling transactions.

  • refillTipCap:
    The maximum tip cap for refill transactions.

  • refillAmount:
    The amount to refill in each child wallet.

  • refillMinBalance:
    The minimum balance required before triggering a refill.

  • legacyTxType:
    Determines whether to use the legacy type for transactions.

  • feeCap:
    The maximum fee cap for transactions.

  • tipCap:
    The tip cap for transactions.

  • gasLimit:
    The gas limit for each transaction.

  • targetAddress:
    The target address for transactions.

  • randomTarget:
    If true, transactions are sent to random addresses.

  • contractDeployment:
    Determines whether the transactions are for contract deployment.

  • callData:
    Call data included in the transactions.

  • randomAmount:
    If true, the transaction amount is randomized.

  • amount:
    The amount of ETH (in wei) to be sent in each transaction.

  • clientPattern:
    A regex pattern for selecting specific client endpoints for sending the transactions. This allows targeting particular clients or groups for transaction dispatch.

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

Defaults

Default settings for the generate_eoa_transactions task:

- name: generate_eoa_transactions
  config:
    limitPerBlock: 0
    limitTotal: 0
    limitPending: 0
    privateKey: ""
    childWallets: 0
    walletSeed: ""
    refillPendingLimit: 200
    refillFeeCap: "500000000000"
    refillTipCap: "1000000000"
    refillAmount: "1000000000000000000"
    refillMinBalance: "500000000000000000"
    legacyTxType: false
    feeCap: "100000000000"
    tipCap: "1000000000"
    gasLimit: 50000
    targetAddress: ""
    randomTarget: false
    contractDeployment: false
    callData: ""
    randomAmount: false
    amount: "0"
    clientPattern: ""
    excludeClientPattern: ""

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskName       = "generate_eoa_transactions"
	TaskDescriptor = &types.TaskDescriptor{
		Name:        TaskName,
		Description: "Generates normal eoa transactions 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 {
	LimitPerBlock int    `yaml:"limitPerBlock" json:"limitPerBlock"`
	LimitTotal    int    `yaml:"limitTotal" json:"limitTotal"`
	LimitPending  int    `yaml:"limitPending" json:"limitPending"`
	PrivateKey    string `yaml:"privateKey" json:"privateKey"`
	ChildWallets  uint64 `yaml:"childWallets" json:"childWallets"`
	WalletSeed    string `yaml:"walletSeed" json:"walletSeed"`

	RefillPendingLimit uint64   `yaml:"refillPendingLimit" json:"refillPendingLimit"`
	RefillFeeCap       *big.Int `yaml:"refillFeeCap" json:"refillFeeCap"`
	RefillTipCap       *big.Int `yaml:"refillTipCap" json:"refillTipCap"`
	RefillAmount       *big.Int `yaml:"refillAmount" json:"refillAmount"`
	RefillMinBalance   *big.Int `yaml:"refillMinBalance" json:"refillMinBalance"`

	LegacyTxType       bool     `yaml:"legacyTxType" json:"legacyTxType"`
	FeeCap             *big.Int `yaml:"feeCap" json:"feeCap"`
	TipCap             *big.Int `yaml:"tipCap" json:"tipCap"`
	GasLimit           uint64   `yaml:"gasLimit" json:"gasLimit"`
	TargetAddress      string   `yaml:"targetAddress" json:"targetAddress"`
	RandomTarget       bool     `yaml:"randomTarget" json:"randomTarget"`
	ContractDeployment bool     `yaml:"contractDeployment" json:"contractDeployment"`
	CallData           string   `yaml:"callData" json:"callData"`
	RandomAmount       bool     `yaml:"randomAmount" json:"randomAmount"`
	Amount             *big.Int `yaml:"amount" json:"amount"`

	ClientPattern        string `yaml:"clientPattern" json:"clientPattern"`
	ExcludeClientPattern string `yaml:"excludeClientPattern" json:"excludeClientPattern"`
}

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) Description

func (t *Task) Description() string

func (*Task) Execute

func (t *Task) Execute(ctx context.Context) error

func (*Task) LoadConfig

func (t *Task) LoadConfig() error

func (*Task) Logger

func (t *Task) Logger() logrus.FieldLogger

func (*Task) Name

func (t *Task) Name() string

func (*Task) Timeout

func (t *Task) Timeout() time.Duration

func (*Task) Title

func (t *Task) Title() string

Jump to

Keyboard shortcuts

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