Skip to content

Commit d717fc5

Browse files
disable setting of block ctx BaseFee to 0 when basefee tracking is disabled
1 parent 932be47 commit d717fc5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/vm/evm.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ func NewEVM(blockCtx BlockContext, txCtx TxContext, statedb StateDB, chainConfig
138138
// gas prices were specified, lower the basefee to 0 to avoid breaking EVM
139139
// invariants (basefee < feecap)
140140
if config.NoBaseFee {
141-
if txCtx.GasPrice.BitLen() == 0 {
141+
// Currently we don't set block context's BaseFee to zero, since nitro uses this field
142+
if txCtx.GasPrice.BitLen() == 0 && !chainConfig.IsArbitrum() {
142143
blockCtx.BaseFee = new(big.Int)
143144
}
144145
if txCtx.BlobFeeCap != nil && txCtx.BlobFeeCap.BitLen() == 0 {

0 commit comments

Comments
 (0)