-
Notifications
You must be signed in to change notification settings - Fork 3.9k
executionPrice is set via the gasPrice #536
Description
Describe the bug
The gasPrice in OE is currently harcoded to 1 gwei and estimateGas really does a calculateFeeInGwei. Within estimateGas, we pull the executionPrice using geth's built-in suggestPrice which will suggest a gasPrice based on historical gasPrices. This means that when we switch fees on, suggestPrice will always return 1 gwei and the L2 executionPrice would be stuck at a constant 1 gwei. See:
optimism/l2geth/internal/ethapi/api.go
Line 1022 in ba2e043
| executionPrice, err := b.SuggestPrice(ctx) |
Expected behavior
I would expect executionPrice to be set based on the congestion of the chain
Additional context
The executionPrice should be set based on congestion of the chain using some formula. While OE is still under capacity, I suggest we either hardcode executionPrice to 0 or set it based on an env var (so if we receive a huge spike in usage, we can easily increase executionPrice)