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

op-e2e: 4844 DA support action-tests #9104

Merged
merged 4 commits into from
Jan 24, 2024
Merged

op-e2e: 4844 DA support action-tests #9104

merged 4 commits into from
Jan 24, 2024

Conversation

protolambda
Copy link
Contributor

Description

  • Support blob-tx inclusion in the L1 miner in the action-tests
  • Retain a reference to the last submitted batch tx in action-tests, so we can can avoid ContentFrom, which is not supported in the blob-tx-pool of geth.
  • Remove the empty blob-source, and replace with the blob-source that's attached to the L1 miner actor.

Tests

  • Test that we can use EIP-4844 DA at genesis
  • Test that we can switch from legacy calldata DA to EIP-4844 DA

@protolambda protolambda requested a review from a team as a code owner January 19, 2024 16:34
Copy link
Contributor

coderabbitai bot commented Jan 19, 2024

Walkthrough

Walkthrough

The recent updates largely focus on integrating and testing blob transactions and data availability within the Ethereum Optimism ecosystem. New structures and methods have been added to handle, store, and fetch blobs, which are instrumental in the rollup process. Changes reflect the addition of blob-related functionality across various components, including miners, batchers, and sequencers, as well as the inclusion of blob stores in test setups to ensure the system's correct behavior with the new data types.

Changes

File Path Change Summary
op-e2e/actions/eip4844_test.go Introduced tests for EIP-4844 data availability, including setup and verification functions.
op-e2e/actions/l1_miner.go, op-e2e/actions/l2_sequencer.go, op-e2e/actions/l2_batcher.go Added blobStore fields and updated constructors and methods to handle blob transactions.
op-e2e/actions/l2_batcher_test.go, op-e2e/actions/l2_sequencer_test.go, op-e2e/actions/l2_verifier_test.go, op-e2e/actions/reorg_test.go, op-e2e/actions/span_batch_test.go, op-e2e/actions/system_config_test.go Modified setup functions to include blobStore as an argument, impacting verifier, sequencer, and batcher setups.
op-e2e/e2eutils/blobs.go Created BlobsStore type for in-memory blob storage and implemented L1BlobsFetcher interface.
op-service/txmgr/txmgr.go, op-service/txmgr/txmgr_test.go Changed makeSidecar to MakeSidecar, affecting transaction crafting and blob hash handling.

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.

@protolambda protolambda removed the request for review from mslipper January 19, 2024 16:34
Copy link
Contributor

semgrep-app bot commented Jan 19, 2024

Semgrep found 2 sol-style-return-arg-fmt findings:

  • packages/contracts-bedrock/scripts/universal/SafeBuilder.sol: L189, L42

Named return arguments to functions must be appended with an underscore (_)

Ignore this finding from sol-style-return-arg-fmt.

Semgrep found 1 sol-style-malformed-require finding:

  • packages/contracts-bedrock/scripts/universal/SafeBuilder.sol: L173

Malformed require statement style.

Ignore this finding from sol-style-malformed-require.

Copy link
Contributor

semgrep-app bot commented Jan 19, 2024

Semgrep found 1 todos_require_linear finding:

  • op-program/client/l2/engineapi/l2_engine_api.go: L332

Please create a GitHub ticket for this TODO.

Ignore this finding from todos_require_linear.

Copy link
Contributor

@trianglesphere trianglesphere left a comment

Choose a reason for hiding this comment

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

Code looks broadly good. CI seems to be having a hard time, but I'm not easily able to track down what failed.

op-e2e/e2eutils/blobs.go Show resolved Hide resolved
op-e2e/e2eutils/blobs.go Show resolved Hide resolved
op-e2e/e2eutils/blobs.go Outdated Show resolved Hide resolved
@sebastianst
Copy link
Member

Code looks broadly good. CI seems to be having a hard time, but I'm not easily able to track down what failed.

CI fails with geth error "Nil finalized block cannot evict old blobs". This is thrown in the blobpool.

// finalize evicts all blobs belonging to a recently finalized block or older.
func (l *limbo) finalize(final *types.Header) {
	// Just in case there's no final block yet (network not yet merged, weird
	// restart, sethead, etc), fail gracefully.
	if final == nil {
		log.Error("Nil finalized block cannot evict old blobs")
		return
	}
// ...

@protolambda
Copy link
Contributor Author

Nil finalized block cannot evict old blobs

@sebastianst this happens when the L1 has not finalized any blocks yet, and tries to prune some blob data. I updated the two new test cases to add finality to the first block in L1, so geth won't hit that anymore.

@protolambda
Copy link
Contributor Author

Looks like lots of tests are failing with unrecognized DA type: "". I think I've to update the defaults in op-e2e

@protolambda protolambda added this pull request to the merge queue Jan 24, 2024
Merged via the queue into develop with commit 22ef8db Jan 24, 2024
65 checks passed
@protolambda protolambda deleted the 4844-action-tests branch January 24, 2024 00:41
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