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

Add check-fjord script to smoke test live chains #10578

Merged
merged 14 commits into from
May 22, 2024
Merged

Conversation

bitwiseguy
Copy link
Contributor

@bitwiseguy bitwiseguy commented May 17, 2024

Description

Add a "smoke test" script that can be run against live networks to confirm the Fjord hardfork is active and Fjord features are working correctly.

Tests

Added an e2e test that runs all of the check-fjord script tests against a mock, test env chain.

Metadata

Copy link
Contributor

semgrep-app bot commented May 17, 2024

Semgrep found 9 golang_fmt_errorf_no_params findings:

No fmt.Errorf invocations without fmt arguments allowed

Ignore this finding from golang_fmt_errorf_no_params.

Copy link
Contributor

semgrep-app bot commented May 17, 2024

Semgrep found 4 ban-common-hex2bytes findings:

Found banned use of common.Hex2Bytes. Use common.FromHex instead.

Ignore this finding from ban-common-hex2bytes.

@bitwiseguy bitwiseguy requested a review from sebastianst May 21, 2024 01:56
Copy link
Contributor

semgrep-app bot commented May 21, 2024

Semgrep found 2 golang_fmt_errorf_no_params findings:

No fmt.Errorf invocations without fmt arguments allowed

Ignore this finding from golang_fmt_errorf_no_params.

@bitwiseguy bitwiseguy marked this pull request as ready for review May 21, 2024 02:00
@bitwiseguy bitwiseguy requested a review from a team as a code owner May 21, 2024 02:00
Copy link
Contributor

coderabbitai bot commented May 21, 2024

Walkthrough

Walkthrough

The recent updates enhance the Fjord upgrade verification in Ethereum. Changes include new check functions and configurations in check-fjord, a CLI tool for running checks, and tests ensuring accurate execution against a Fjord-enabled test chain.

Changes

File(s) Change Summary
op-chain-ops/cmd/check-fjord/checks/checks.go Added functions/types for Fjord upgrade checks like gas usage, transaction validation, and precompile checks.
op-chain-ops/cmd/check-fjord/main.go Introduced CLI program with L2 RPC endpoint and test account key flags, and commands for running checks.
op-e2e/system_test.go, op-e2e/check_scripts_test.go Added tests to verify check-fjord script against Fjord-enabled test chain.

Recent Review Details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits Files that changed from the base of the PR and between 23e875d and c5770fe.
Files selected for processing (1)
  • op-e2e/check_scripts_test.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • op-e2e/check_scripts_test.go

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
Contributor

@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: 1

Outside diff range and nitpick comments (2)
op-chain-ops/cmd/check-fjord/checks/checks.go (2)

72-79: The CheckFjordConfig struct is well-defined and encapsulates all necessary fields for the checks. Consider adding documentation comments to explain the purpose of each field, especially for public or exported types.


364-391: The fjordL1Cost function calculates the L1 cost based on various parameters. The function is well-implemented, but adding inline comments explaining the calculation steps would enhance understanding and maintainability.

Copy link
Contributor

@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: 2

op-chain-ops/cmd/check-fjord/checks/checks.go Outdated Show resolved Hide resolved
Copy link
Member

@sebastianst sebastianst left a comment

Choose a reason for hiding this comment

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

This looks great!

I propose to move a few things around.

op-e2e/system_test.go Outdated Show resolved Hide resolved
op-chain-ops/cmd/check-fjord/checks/checks.go Outdated Show resolved Hide resolved
op-chain-ops/cmd/check-fjord/checks/checks.go Outdated Show resolved Hide resolved
@bitwiseguy bitwiseguy requested a review from sebastianst May 22, 2024 13:35
Copy link
Contributor

@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

op-chain-ops/cmd/check-fjord/main.go Show resolved Hide resolved
op-chain-ops/cmd/check-fjord/checks/checks.go Show resolved Hide resolved
op-chain-ops/cmd/check-fjord/checks/checks.go Show resolved Hide resolved
op-e2e/check_scripts_test.go Outdated Show resolved Hide resolved
op-e2e/check_scripts_test.go Show resolved Hide resolved
op-e2e/check_scripts_test.go Outdated Show resolved Hide resolved
op-e2e/check_scripts_test.go Show resolved Hide resolved
@bitwiseguy bitwiseguy requested a review from sebastianst May 22, 2024 16:29
@sebastianst sebastianst enabled auto-merge May 22, 2024 16:57
@sebastianst sebastianst added this pull request to the merge queue May 22, 2024
Merged via the queue into develop with commit f2e5a7a May 22, 2024
69 checks passed
@sebastianst sebastianst deleted the ss/check-fjord branch May 22, 2024 18:05
maurelian pushed a commit that referenced this pull request May 22, 2024
* Add check-fjord script to smoke test live chains

* Fix checkRIP7212 invalid signature test

* check-fjord: several fixes

* fix callopts

* check-fjord: fix bindings import

* check-fjord: fix errors & naming

* lint

* fix commands

* Remove unused configuration flags

* Add e2e test for check-fjord script

* Add test to verify unactivated fjord is properly detected

* Refactor check-fjord script and e2e test for cleaner separation

* Add tests to ensure all fjord checks error if fork is unactivated

* Update op-e2e/check_scripts_test.go

---------

Co-authored-by: Sebastian Stammler <seb@oplabs.co>
maurelian pushed a commit that referenced this pull request May 22, 2024
* Add check-fjord script to smoke test live chains

* Fix checkRIP7212 invalid signature test

* check-fjord: several fixes

* fix callopts

* check-fjord: fix bindings import

* check-fjord: fix errors & naming

* lint

* fix commands

* Remove unused configuration flags

* Add e2e test for check-fjord script

* Add test to verify unactivated fjord is properly detected

* Refactor check-fjord script and e2e test for cleaner separation

* Add tests to ensure all fjord checks error if fork is unactivated

* Update op-e2e/check_scripts_test.go

---------

Co-authored-by: Sebastian Stammler <seb@oplabs.co>
rdovgan pushed a commit to rdovgan/optimism that referenced this pull request Jun 24, 2024
…0578)

* Add check-fjord script to smoke test live chains

* Fix checkRIP7212 invalid signature test

* check-fjord: several fixes

* fix callopts

* check-fjord: fix bindings import

* check-fjord: fix errors & naming

* lint

* fix commands

* Remove unused configuration flags

* Add e2e test for check-fjord script

* Add test to verify unactivated fjord is properly detected

* Refactor check-fjord script and e2e test for cleaner separation

* Add tests to ensure all fjord checks error if fork is unactivated

* Update op-e2e/check_scripts_test.go

---------

Co-authored-by: Sebastian Stammler <seb@oplabs.co>
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