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

cannon: Presate patching #15031

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft

cannon: Presate patching #15031

wants to merge 1 commit into from

Conversation

Inphi
Copy link
Contributor

@Inphi Inphi commented Mar 25, 2025

Illustrates an idea for deterministically patching a prestate. This lets us generate a base op-program prestate, common to all chains, while supporting additional configuration to the base without requiring a Go rebuild of the op-program.

✗ go test -run TestInstrumentedState_ProgramPatch ./cannon/mipsevm/multithreaded/ -tags=cannon64 -v
=== RUN   TestInstrumentedState_ProgramPatch
=== PAUSE TestInstrumentedState_ProgramPatch
=== CONT  TestInstrumentedState_ProgramPatch
hello world!
vm data: main.VMData{Name:"cannon-load", Version:2}
--- PASS: TestInstrumentedState_ProgramPatch (0.22s)
PASS
ok      github.com/ethereum-optimism/optimism/cannon/mipsevm/multithreaded      0.237s

Copy link

codecov bot commented Mar 25, 2025

Codecov Report

Attention: Patch coverage is 91.04478% with 6 lines in your changes missing coverage. Please review.

Project coverage is 66.73%. Comparing base (b8b1bc1) to head (1ed85b0).

Files with missing lines Patch % Lines
cannon/mipsevm/program/patch.go 82.35% 4 Missing and 2 partials ⚠️

❗ There is a different number of reports uploaded between BASE (b8b1bc1) and HEAD (1ed85b0). Click for more details.

HEAD has 5 uploads less than BASE
Flag BASE (b8b1bc1) HEAD (1ed85b0)
2 1
contracts-bedrock-tests 2 0
cannon-go-tests-32 2 1
cannon-go-tests-64 2 1
Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #15031       +/-   ##
============================================
- Coverage    78.61%   66.73%   -11.88%     
============================================
  Files          178       61      -117     
  Lines        10894     4879     -6015     
============================================
- Hits          8564     3256     -5308     
+ Misses        2128     1443      -685     
+ Partials       202      180       -22     
Flag Coverage Δ
cannon-go-tests-32 62.19% <70.14%> (-1.90%) ⬇️
cannon-go-tests-64 57.53% <86.56%> (-1.24%) ⬇️
contracts-bedrock-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cannon/mipsevm/testutil/elf.go 100.00% <100.00%> (ø)
cannon/mipsevm/testutil/vmtests.go 92.43% <100.00%> (+1.43%) ⬆️
cannon/mipsevm/program/patch.go 85.14% <82.35%> (-1.42%) ⬇️

... and 125 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant