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

support Ecotone l1 block info #8786

Merged

Conversation

roberto-bayardo
Copy link
Collaborator

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

Description

Extend op-node to handle the change in L1 block info for the Ecotone upgrade.

Clarify spec around how the l1 data fee cost parameters are to be handled during upgrade.

ref: https://github.com/ethereum-optimism/protocol-quest/issues/56

Tests

Round trip fuzz tests extended to handle Ecotone version of marshal/unmarshal, unit tests to make sure l1 attribute handling edge cases around the first-ecotone-block are handled correctly.

@roberto-bayardo roberto-bayardo force-pushed the 4844/l1-block-info branch 3 times, most recently from d0ef9f7 to 5ce4ea1 Compare January 4, 2024 15:53
@roberto-bayardo roberto-bayardo force-pushed the 4844/l1-block-info branch 13 times, most recently from bd11f38 to d5dd1a3 Compare January 10, 2024 00:20
@roberto-bayardo roberto-bayardo marked this pull request as ready for review January 10, 2024 00:21
Copy link
Contributor

coderabbitai bot commented Jan 10, 2024

Walkthrough

Walkthrough

The changes involve a significant integration of rollup.Config across various components of a system, which impacts configuration setup, error handling, and block information processing. This update also introduces distinctions between Bedrock and Ecotone versions, adding new functions for handling Ecotone-specific logic. The modifications include renaming of functions, updating test cases, introducing new constants, and adjusting cost computation formulas. Contracts have been updated, and system documentation has been revised to reflect post-Ecotone upgrade changes.

Changes

File Path Summary of Changes
op-batcher/.../channel*.go, op-batcher/.../driver.go, op-batcher/.../channel*.go, op-node/rollup/derive/..., op-node/rollup/driver/..., op-node/rollup/types.go, op-program/client/l2/..., op-service/... Integrated rollup.Config, renamed functions for Bedrock and Ecotone distinction, updated tests and assertions, added new constants for Ecotone, enhanced error handling, updated L1Block.sol contract to version 1.2.0, modified cost computation for Ecotone, and updated system configuration documentation.
op-batcher/.../channel_builder_test.go, op-node/rollup/derive/..._test.go, op-node/rollup/driver/sequencer_test.go, op-program/client/l2/engine_test.go, op-service/testutils/l1info.go Updated test functions and assertions to accommodate new variable names and logic with introduction of rollupCfg, and corrected variable names for consistency in tests.
op-batcher/.../Makefile, op-node/rollup/derive/Makefile Updated fuzz testing targets to include new tests for Bedrock and Ecotone.
op-node/rollup/derive/span_channel_out.go, op-node/rollup/derive/pipeline.go, op-node/rollup/derive/system_config.go, op-node/rollup/derive/batches.go, op-node/rollup/derive/channel_out.go, op-node/rollup/derive/engine_consolidate.go, op-node/rollup/derive/engine_controller.go, op-node/rollup/derive/engine_queue.go Modified various functions to use rollup.Config and updated method signatures, introduced BlobBasefee handling, and added IsEcotoneActivationBlock function.
specs/deposits.md, specs/exec-engine.md, specs/system_config.md Documentation updated to reflect integration of rollup.Config and changes post-Ecotone upgrade.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@roberto-bayardo roberto-bayardo force-pushed the 4844/l1-block-info branch 2 times, most recently from 83f4ab1 to c12d836 Compare January 10, 2024 01:04
@roberto-bayardo
Copy link
Collaborator Author

re: baseFee vs basefee, seems in our quick poll there is strong preference for the former, so reverted much of the conversion.

@roberto-bayardo roberto-bayardo force-pushed the 4844/l1-block-info branch 5 times, most recently from dbaf31b to edce397 Compare January 10, 2024 23:43
@roberto-bayardo
Copy link
Collaborator Author

Did a first pass and changes look good. But since the diff is a bit noisy I'm going to do a 2nd review pass in a bit. Thank you for implementing this, it's one of the last pieces to get Ecotone implementation ready.

Thanks, diff may be a bit less noisy now from backtracking on the basefee style change.

Copy link
Contributor

@axelKingsley axelKingsley left a comment

Choose a reason for hiding this comment

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

Did a pass to check out attaching the rollup.Config to channelBuilder, looks like that works well assuming test behaviors are steady :D

While I was here I noticed some leftovers from reverting Basefee spelling changes, so I marked those.

op-bindings/predeploys/addresses_test.go Show resolved Hide resolved
op-e2e/system_test.go Show resolved Hide resolved
op-e2e/system_test.go Show resolved Hide resolved
op-node/rollup/derive/attributes.go Show resolved Hide resolved
op-node/rollup/derive/engine_consolidate.go Show resolved Hide resolved
op-node/rollup/driver/sequencer.go Show resolved Hide resolved
specs/deposits.md Outdated Show resolved Hide resolved
op-node/rollup/derive/l1_block_info.go Outdated Show resolved Hide resolved
op-node/rollup/derive/l1_block_info.go Show resolved Hide resolved
go.mod Show resolved Hide resolved
@protolambda protolambda enabled auto-merge January 11, 2024 01:49
Copy link

codecov bot commented Jan 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cfffa38) 34.70% compared to head (90cc38e) 34.66%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8786      +/-   ##
===========================================
- Coverage    34.70%   34.66%   -0.05%     
===========================================
  Files          165      165              
  Lines         7123     7123              
  Branches      1208     1208              
===========================================
- Hits          2472     2469       -3     
- Misses        4499     4504       +5     
+ Partials       152      150       -2     
Flag Coverage Δ
cannon-go-tests 63.48% <ø> (ø)
chain-mon-tests 27.14% <ø> (ø)
common-ts-tests 26.74% <ø> (ø)
contracts-bedrock-tests 20.26% <ø> (-0.15%) ⬇️
contracts-ts-tests 12.25% <ø> (ø)
core-utils-tests 44.03% <ø> (ø)
sdk-next-tests 42.08% <ø> (ø)
sdk-tests 42.08% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 3 files with indirect coverage changes

@protolambda
Copy link
Contributor

Resolved merge conflict with develop in deposits.md, with clarification PR from @tynes.

@protolambda protolambda added this pull request to the merge queue Jan 11, 2024
Merged via the queue into ethereum-optimism:develop with commit 034a993 Jan 11, 2024
64 checks passed
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.

5 participants