Skip to content

Commit

Permalink
disable setting of block ctx BaseFee to 0 when basefee tracking is di…
Browse files Browse the repository at this point in the history
…sabled
  • Loading branch information
ganeshvanahalli committed Apr 11, 2024
1 parent 932be47 commit d717fc5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/vm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ func NewEVM(blockCtx BlockContext, txCtx TxContext, statedb StateDB, chainConfig
// gas prices were specified, lower the basefee to 0 to avoid breaking EVM
// invariants (basefee < feecap)
if config.NoBaseFee {
if txCtx.GasPrice.BitLen() == 0 {
// Currently we don't set block context's BaseFee to zero, since nitro uses this field
if txCtx.GasPrice.BitLen() == 0 && !chainConfig.IsArbitrum() {
blockCtx.BaseFee = new(big.Int)
}
if txCtx.BlobFeeCap != nil && txCtx.BlobFeeCap.BitLen() == 0 {
Expand Down

0 comments on commit d717fc5

Please sign in to comment.