Documentation ¶
Index ¶
- Constants
- func DistributeFunds(ctx context.Context, client ethclient.Client, keys []*key.Key, numKeys int, ...) ([]*key.Key, error)
- func ExecuteLoader(ctx context.Context, config config.Config) error
- func NewSingleAddressTxWorker(ctx context.Context, client ethclient.Client, address common.Address) *ethereumTxWorker
- func NewTxReceiptWorker(ctx context.Context, client ethclient.Client) *ethereumTxWorker
- type Loader
Constants ¶
const (
MetricsEndpoint = "/metrics" // Endpoint for the Prometheus Metrics Server
)
Variables ¶
This section is empty.
Functions ¶
func DistributeFunds ¶
func DistributeFunds(ctx context.Context, client ethclient.Client, keys []*key.Key, numKeys int, minFundsPerAddr *big.Int, m *metrics.Metrics) ([]*key.Key, error)
DistributeFunds ensures that each address in keys has at least [minFundsPerAddr] by sending funds from the key with the highest starting balance. This function returns a set of at least [numKeys] keys, each having a minimum balance [minFundsPerAddr].
func ExecuteLoader ¶
ExecuteLoader creates txSequences from config and has txAgents execute the specified simulation.
func NewSingleAddressTxWorker ¶ added in v0.5.2
func NewSingleAddressTxWorker(ctx context.Context, client ethclient.Client, address common.Address) *ethereumTxWorker
NewSingleAddressTxWorker creates and returns a new ethereumTxWorker that confirms transactions by checking the latest nonce of [address] and assuming any transaction with a lower nonce was already accepted.
Types ¶
type Loader ¶ added in v0.5.10
Loader executes a series of worker/tx sequence pairs. Each worker/txSequence pair issues [batchSize] transactions, confirms all of them as accepted, and then moves to the next batch until the txSequence is exhausted.
func (*Loader[T]) ConfirmReachedTip ¶ added in v0.5.10
ConfirmReachedTip finds the max height any client has reached and then ensures every client reaches at least that height.
This allows the network to continue to roll forward and creates a synchronization point to ensure that every client in the loader has reached at least the max height observed of any client at the time this function was called.