ethereum-optimism / optimism

Optimism is Ethereum, scaled.
https://optimism.io
MIT License
5.65k stars 3.28k forks source link

op-challenger: Use witness subcommand instead of parsing cannon states #12141

Closed ajsutton closed 1 month ago

ajsutton commented 1 month ago

Description

Changes the cannon StateConverter implementation to call the cannon witness subcommand to parse the state and extract the required data. This allows multicannon to handle supporting different state formats and keeps those implementation details out of op-challenger.

Tests

Updated unit tests. e2e tests confirm the state information is still being extracted correctly.

Builds on https://github.com/ethereum-optimism/optimism/pull/12137

semgrep-app[bot] commented 1 month ago

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

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

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

#

Semgrep found 44 sol-style-input-arg-fmt findings:

Inputs to functions must be prepended with an underscore (_)

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

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 74.97%. Comparing base (c8afa15) to head (b69e775). Report is 1 commits behind head on develop.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #12141 +/- ## =========================================== - Coverage 75.19% 74.97% -0.22% =========================================== Files 49 49 Lines 3656 3656 =========================================== - Hits 2749 2741 -8 - Misses 734 743 +9 + Partials 173 172 -1 ``` | [Flag](https://app.codecov.io/gh/ethereum-optimism/optimism/pull/12141/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism) | Coverage Δ | | |---|---|---| | [cannon-go-tests](https://app.codecov.io/gh/ethereum-optimism/optimism/pull/12141/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism) | `74.97% <ø> (-0.22%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism#carryforward-flags-in-the-pull-request-comment) to find out more. [see 1 file with indirect coverage changes](https://app.codecov.io/gh/ethereum-optimism/optimism/pull/12141/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism)