Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(op): Ecotone hardfork #1009

Merged
merged 5 commits into from
Jan 29, 2024
Merged

Conversation

clabby
Copy link
Contributor

@clabby clabby commented Jan 24, 2024

Overview

Adds definitions and support for the upcoming Ecotone hardfork on Optimism.

Details

The Ecotone hardfork is activated alongside Cancun, with few execution layer modifications of our own. The rollup will now be using 4844 DA, which involves some changes to the L1 fee calculation.

  1. Ecotone L1 fee specifications: https://github.com/ethereum-optimism/specs/blob/main/specs/exec-engine.md#ecotone-l1-cost-fee-changes-eip-4844-da
  2. Ecotone L1 fee reference implementation: https://github.com/ethereum-optimism/op-geth/blob/a4e85ec465e2de3f962d757d8f9b561b5461f861/core/types/rollup_cost.go

@clabby clabby force-pushed the cl/op/ecotone-hardfork branch 2 times, most recently from d1a2083 to b49f313 Compare January 27, 2024 18:54
@clabby clabby marked this pull request as ready for review January 27, 2024 18:55
@clabby clabby force-pushed the cl/op/ecotone-hardfork branch 2 times, most recently from d4ac712 to 8e6c901 Compare January 28, 2024 19:54
Copy link
Member

@rakita rakita left a comment

Choose a reason for hiding this comment

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

@clabby is context.evm.env.cfg.optimism only there to switch between mainnet and optimism transaction so both of them can be used? If this is the case, i want to remove it as handler_register in EvmBuilder allows having both optimism and mainnet together.

@rakita rakita merged commit 1df0ea8 into bluealloy:main Jan 29, 2024
25 checks passed
@clabby
Copy link
Contributor Author

clabby commented Jan 29, 2024

@rakita Yep! The idea was to have runtime configuration for the optimism features, if revm is compiled with the optimism feature flag enabled. This was for tools like foundry to be able to swap between optimism and default ethereum execution at runtime, for example in fork tests.

This can be abstracted into the handler instead as well, but the ability to switch between the optimism and default execution at runtime is still desired.

@github-actions github-actions bot mentioned this pull request Jan 29, 2024
@clabby clabby deleted the cl/op/ecotone-hardfork branch January 29, 2024 20:31
@rakita
Copy link
Member

rakita commented Jan 29, 2024

@rakita Yep! The idea was to have runtime configuration for the optimism features, if revm is compiled with the optimism feature flag enabled. This was for tools like foundry to be able to swap between optimism and default ethereum execution at runtime, for example in fork tests.

This can be abstracted into the handler instead as well, but the ability to switch between the optimism and default execution at runtime is still desired.

Yeah, this can be abstracted with handler register! Good to know, will remove the flag.

Optimism feature is still needed for additional field (l1block) and for additional SpecIds. But will see to make those generic in future.

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.

2 participants