OffchainLabs / go-ethereum

GNU Lesser General Public License v3.0
52 stars 88 forks source link

Allow lowering of basefee to 0 if vm runs with NoBaseFee flag and 0 gas price #324

Closed ganeshvanahalli closed 1 month ago

ganeshvanahalli commented 1 month ago

Related to NIT-2412

Introduce BaseFeeCopy field in vm.BlockContext to persist BaseFee value when its lowered to 0 to preserve EVM invariant basefee < feecap in cases vm is run with NoBaseFee flag and 0 gas price.

This enables nitro to use persisted basefee value in TxProcessor hooks and ArbGasInfo precompile during eth_call, eth_estimateGas, etc

Pulled in by:-https://github.com/OffchainLabs/nitro/pull/2358