Skip to content

4844 prep: Add Ecotone fork check & refactor l1 / data availability cost functions#203

Merged
sebastianst merged 2 commits intoethereum-optimism:optimismfrom
roberto-bayardo:4844
Jan 3, 2024
Merged

4844 prep: Add Ecotone fork check & refactor l1 / data availability cost functions#203
sebastianst merged 2 commits intoethereum-optimism:optimismfrom
roberto-bayardo:4844

Conversation

@roberto-bayardo
Copy link
Contributor

@roberto-bayardo roberto-bayardo commented Dec 15, 2023

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.

@roberto-bayardo roberto-bayardo force-pushed the 4844 branch 3 times, most recently from 96d5d88 to 9070c32 Compare December 15, 2023 06:34
Copy link
Contributor

@mdehoog mdehoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice refactor

@roberto-bayardo roberto-bayardo force-pushed the 4844 branch 3 times, most recently from d85567d to f69c847 Compare December 19, 2023 17:26
@roberto-bayardo roberto-bayardo changed the title 4844 prep: Add Eclipse fork check & refactor L1DataCost 4844 prep: Add Ecotone fork check & refactor L1DataCost Dec 19, 2023
@roberto-bayardo roberto-bayardo force-pushed the 4844 branch 4 times, most recently from ad6bc47 to 38dc97a Compare December 20, 2023 16:13
@roberto-bayardo roberto-bayardo force-pushed the 4844 branch 2 times, most recently from da19188 to 057d2d5 Compare December 21, 2023 18:05
@roberto-bayardo roberto-bayardo force-pushed the 4844 branch 2 times, most recently from e9ab7ac to 1f513f8 Compare December 22, 2023 23:33
@roberto-bayardo roberto-bayardo force-pushed the 4844 branch 2 times, most recently from 9a21cda to 2f2840d Compare December 22, 2023 23:37
@sebastianst sebastianst merged commit e417703 into ethereum-optimism:optimism Jan 3, 2024
roberto-bayardo pushed a commit to roberto-bayardo/op-geth that referenced this pull request Jan 3, 2024
…ost functions (ethereum-optimism#203)

* add Ecotone upgrade getters & refactor L1CostFunc to make it easier to swap in new ones

* core: nil instead of zero, always check empty rollup data-cost, check op-stack config, fix tx-pool l1-cost-func

---------

Co-authored-by: protolambda <proto@protolambda.com>

add Ecotone upgrade getters & refactor L1CostFunc to make it easier to swap in new ones
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants