diff --git a/command/server/config/config.go b/command/server/config/config.go index 1bc7f8bbba..5f70afc062 100644 --- a/command/server/config/config.go +++ b/command/server/config/config.go @@ -136,8 +136,8 @@ func DefaultConfig() *Config { ShouldSeal: true, TxPool: &TxPool{ PriceLimit: 0, - MaxSlots: 500_000, - MaxAccountEnqueued: 100_000, + MaxSlots: 4096, + MaxAccountEnqueued: 128, }, LogLevel: "INFO", RestoreFile: "", diff --git a/loadtest/runner/eoa_runner.go b/loadtest/runner/eoa_runner.go index 37c1409be6..31ef52fd51 100644 --- a/loadtest/runner/eoa_runner.go +++ b/loadtest/runner/eoa_runner.go @@ -82,14 +82,8 @@ func (e *EOARunner) sendTransactionsForUser(account *account, chainID *big.Int, return nil, err } - gasPrice, err := e.client.GasPrice() - if err != nil { - return nil, err - } - - bigGasPrice := new(big.Int).SetUint64(gasPrice) - var ( + gasPrice *big.Int maxFeePerGas *big.Int maxPriorityFeePerGas *big.Int ) @@ -115,6 +109,13 @@ func (e *EOARunner) sendTransactionsForUser(account *account, chainID *big.Int, maxFeePerGas = new(big.Int).Add(baseFee, mpfpg) maxFeePerGas.Mul(maxFeePerGas, big.NewInt(2)) + } else { + gp, err := e.client.GasPrice() + if err != nil { + return nil, err + } + + gasPrice = new(big.Int).SetUint64(gp + (gp * 20 / 100)) } for i := 0; i < e.cfg.TxsPerUser; i++ { @@ -136,7 +137,7 @@ func (e *EOARunner) sendTransactionsForUser(account *account, chainID *big.Int, types.WithTo(&receiverAddr), types.WithValue(ethgo.Gwei(1)), types.WithGas(21000), - types.WithGasPrice(bigGasPrice), + types.WithGasPrice(gasPrice), types.WithFrom(account.key.Address()), )), account.key) } diff --git a/loadtest/runner/erc20_runner.go b/loadtest/runner/erc20_runner.go index 50ade5b221..37de508544 100644 --- a/loadtest/runner/erc20_runner.go +++ b/loadtest/runner/erc20_runner.go @@ -235,14 +235,8 @@ func (e *ERC20Runner) sendTransactionsForUser(account *account, chainID *big.Int return nil, err } - gasPrice, err := e.client.GasPrice() - if err != nil { - return nil, err - } - - bigGasPrice := new(big.Int).SetUint64(gasPrice) - var ( + gasPrice *big.Int maxFeePerGas *big.Int maxPriorityFeePerGas *big.Int ) @@ -268,6 +262,13 @@ func (e *ERC20Runner) sendTransactionsForUser(account *account, chainID *big.Int maxFeePerGas = new(big.Int).Add(baseFee, mpfpg) maxFeePerGas.Mul(maxFeePerGas, big.NewInt(2)) + } else { + gp, err := e.client.GasPrice() + if err != nil { + return nil, err + } + + gasPrice = new(big.Int).SetUint64(gp + (gp * 20 / 100)) } for i := 0; i < e.cfg.TxsPerUser; i++ { @@ -293,7 +294,7 @@ func (e *ERC20Runner) sendTransactionsForUser(account *account, chainID *big.Int _, err = txRelayer.SendTransaction(types.NewTx(types.NewLegacyTx( types.WithNonce(account.nonce), types.WithTo(&e.erc20Token), - types.WithGasPrice(bigGasPrice), + types.WithGasPrice(gasPrice), types.WithFrom(account.key.Address()), types.WithInput(input), )), account.key)