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

merge polymer changes #3

Merged
merged 5 commits into from
Apr 15, 2024

Conversation

dshiell
Copy link
Member

@dshiell dshiell commented Apr 15, 2024

No description provided.

Copy link

coderabbitai bot commented Apr 15, 2024

Walkthrough

This update primarily introduces a new GitHub Actions workflow for Docker image management, enhances testing infrastructure with new utilities and skipping mechanisms for unsupported Ethereum methods, and adds new functionalities across various components for better handling of Ethereum operations. It also improves code reusability and readability in test handling and introduces placeholders for future verifications in Ethereum-related operations.

Changes

File Path Change Summary
.github/workflows/docker-op-stack.yml New GitHub Actions workflow docker-peptide for Docker image management.
op-e2e/.../bridge_test.go, deposit_test.go, op_geth_test.go, system_adminrpc_test.go, system_fpp_test.go, system_test.go, system_tob_test.go Added t.Skip calls in test functions due to missing Ethereum methods and other issues.
op-e2e/.../external_polymer/.gitignore, Makefile, README.md, main.go, main_test.go Introduced new utilities for building and testing the polymer execution engine.
op-e2e/.../geth/wait.go, external.go, op_geth.go, setup.go Enhanced handling of Ethereum operations, improved code reusability and readability.
op-e2e/justfile New Justfile for building and testing polymer peptide server components.
op-node/rollup/derive/l1_block_info.go Added new function L1BlockInfoToBytes for marshalling blocks based on conditions.
op-service/eth/account_proof.go Introduced Verify_IGNORED method as a placeholder for future verification implementations.

This table groups files with similar changes together, providing a concise overview of the modifications across the project.


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 testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • 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 testing code 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 and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @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.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

@@ -228,6 +225,7 @@ func startConfigWithTestAccounts(t *testing.T, cfg *SystemConfig, accountsToGene
// TestMixedDepositValidity makes a number of deposit transactions, some which will succeed in transferring value,
// while others do not. It ensures that the expected nonces/balances match after several interactions.
func TestMixedDepositValidity(t *testing.T) {
t.Skip("fails with: the method eth_getTransactionCount does not exist/is not available")
Copy link

Choose a reason for hiding this comment

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

Tip

Codebase Verification

Review Summary

The review comment suggests that the use of t.Skip in the TestMixedDepositValidity function is justified due to the unavailability of the eth_getTransactionCount method in the Ethereum client used in the project. The comment also suggests verifying the availability of this method in the future.

Analysis of Shell Script Output

The output from the executed shell script indicates that the eth_getTransactionCount method is indeed referenced in multiple files within the project:

  • proxyd/rewriter_test.go and proxyd/rewriter.go: The method is mentioned as part of tests and rewriter configurations.
  • op-service/txmgr/txmgr.go: Comments in this file discuss fetching nonce using eth_getTransactionCount.
  • op-service/client/client.go: The method is used in functions that seem to be instrumented for metrics or logging.

Despite these references, the specific tests in op-e2e/system_tob_test.go and op-e2e/deposit_test.go have been skipped with a note stating that the method does not exist or is not available. This discrepancy suggests that while the method is generally recognized and utilized in the codebase, there might be specific contexts or configurations in which it is unavailable or not functioning as expected.

Conclusion

Given the evidence from the codebase, the method eth_getTransactionCount is indeed used in several parts of the project. However, the skips in the test files suggest a possible issue with the method's availability or functionality under certain test conditions or configurations. This could be due to environmental differences, configuration issues, or limitations in the testing setup.

Skip Justified Due to Potential Configuration or Environmental Issues Affecting eth_getTransactionCount

Analysis chain

Skip justified due to unavailable Ethereum method eth_getTransactionCount.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify the availability of the `eth_getTransactionCount` method in the Ethereum client used.
rg --type go 'eth_getTransactionCount'

Length of output: 955

Comment on lines +34 to +35
**Note that the e2e tests expect to find the shim and polymer within the `external_polymer` directory
and there's no internal hook to automatically build them.**
Copy link

Choose a reason for hiding this comment

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

Ensure files end with a newline.

+ \n

It's a common practice to end files with a newline character to conform to POSIX standards and ensure proper processing by Unix tools.


Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
**Note that the e2e tests expect to find the shim and polymer within the `external_polymer` directory
and there's no internal hook to automatically build them.**
**Note that the e2e tests expect to find the shim and polymer within the `external_polymer` directory
and there's no internal hook to automatically build them.**

Comment on lines +34 to +37
// TODO polymer does not support valid storage proofs yet, so do a light verification
func (res *AccountResult) Verify(stateRoot common.Hash) error {
return nil
}
Copy link

Choose a reason for hiding this comment

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

Placeholder method for account verification.

The Verify_IGNORED method currently returns nil without performing any verification. This could lead to security vulnerabilities if not addressed before production. Consider implementing the method fully or removing it if it's not needed.

@dshiell dshiell merged commit b4e4955 into polymerdao:polymer-develop Apr 15, 2024
2 checks passed
dshiell added a commit that referenced this pull request May 9, 2024
* update tests to conform with Polymer

* add roothash to L1BlockInfo and ignore storage proofs

* adding support for marshalling/unmarshalling blocks

* Github workflow build and publish docker images

---------

Co-authored-by: jlafiandra6 <[email protected]>
Co-authored-by: inkvi <[email protected]>
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.

3 participants