We intend to introduce EIP-4844 support with Ecotone upgrade, which will require the ability to switch L1 data cost functions when Ecotone is activated. This PR adds ability to check if Ecotone is active, and also refactors the L1CostFunc code to allow L1DataCost functions based on transaction properties other than "RollupDataGas". These abstractions also allow removal of some of the duplicated l1 data cost logic within receipts.go.
Tests
Added a unit test to codify behavior of existing cost function & receipt processing.
Description
We intend to introduce EIP-4844 support with Ecotone upgrade, which will require the ability to switch L1 data cost functions when Ecotone is activated. This PR adds ability to check if Ecotone is active, and also refactors the L1CostFunc code to allow L1DataCost functions based on transaction properties other than "RollupDataGas". These abstractions also allow removal of some of the duplicated l1 data cost logic within receipts.go.
Tests
Added a unit test to codify behavior of existing cost function & receipt processing.