ethereum-optimism / optimism

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

cannon: Fix post-state hash in proof #11005

Closed Inphi closed 4 days ago

Inphi commented 5 days ago

Fix the post state hash contained in the proof artifact after a cannon run.

Testing

Reviewer note: The bug commit is reapplied with a patch fixing it right after for an easier review.

codecov[bot] commented 5 days ago

Codecov Report

Attention: Patch coverage is 27.27273% with 24 lines in your changes missing coverage. Please review.

Project coverage is 79.79%. Comparing base (124b1a9) to head (29f9235). Report is 2 commits behind head on develop.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #11005 +/- ## ============================================ + Coverage 61.32% 79.79% +18.46% ============================================ Files 20 12 -8 Lines 1753 1242 -511 Branches 71 0 -71 ============================================ - Hits 1075 991 -84 + Misses 646 218 -428 - Partials 32 33 +1 ``` | [Flag](https://app.codecov.io/gh/ethereum-optimism/optimism/pull/11005/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/11005/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism) | `79.79% <27.27%> (-1.25%)` | :arrow_down: | | [chain-mon-tests](https://app.codecov.io/gh/ethereum-optimism/optimism/pull/11005/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism) | `?` | | | [sdk-tests](https://app.codecov.io/gh/ethereum-optimism/optimism/pull/11005/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism) | `?` | | 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. | [Files](https://app.codecov.io/gh/ethereum-optimism/optimism/pull/11005?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism) | Coverage Δ | | |---|---|---| | [cannon/mipsevm/witness.go](https://app.codecov.io/gh/ethereum-optimism/optimism/pull/11005?src=pr&el=tree&filepath=cannon%2Fmipsevm%2Fwitness.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism#diff-Y2Fubm9uL21pcHNldm0vd2l0bmVzcy5nbw==) | `100.00% <ø> (ø)` | | | [cannon/mipsevm/state.go](https://app.codecov.io/gh/ethereum-optimism/optimism/pull/11005?src=pr&el=tree&filepath=cannon%2Fmipsevm%2Fstate.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism#diff-Y2Fubm9uL21pcHNldm0vc3RhdGUuZ28=) | `82.60% <41.66%> (-6.55%)` | :arrow_down: | | [cannon/mipsevm/instrumented.go](https://app.codecov.io/gh/ethereum-optimism/optimism/pull/11005?src=pr&el=tree&filepath=cannon%2Fmipsevm%2Finstrumented.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism#diff-Y2Fubm9uL21pcHNldm0vaW5zdHJ1bWVudGVkLmdv) | `54.41% <19.04%> (-11.63%)` | :arrow_down: | ... and [8 files with indirect coverage changes](https://app.codecov.io/gh/ethereum-optimism/optimism/pull/11005/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum-optimism)