Skip to content

Commit

Permalink
l2geth: default gascap
Browse files Browse the repository at this point in the history
Follows upstream by setting a default gascap for rpc
  • Loading branch information
tynes committed Jan 20, 2023
1 parent 138a6f0 commit ea81709
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/good-paws-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/l2geth': patch
---

Use default cas gap of 25 million
1 change: 1 addition & 0 deletions l2geth/cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ var (
}
RPCGlobalGasCap = cli.Uint64Flag{
Name: "rpc.gascap",
Value: eth.DefaultConfig.RPCGasCap.Uint64(),
Usage: "Sets a cap on gas that can be used in eth_call/estimateGas",
}
RPCGlobalEVMTimeoutFlag = &cli.DurationFlag{
Expand Down
1 change: 1 addition & 0 deletions l2geth/eth/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ var DefaultConfig = Config{
Recommit: 3 * time.Second,
},
TxPool: core.DefaultTxPoolConfig,
RPCGasCap: new(big.Int).SetUint64(25_000_000),
RPCEVMTimeout: 5 * time.Second,
GPO: gasprice.Config{
Blocks: 20,
Expand Down

0 comments on commit ea81709

Please sign in to comment.