Skip to content

Comments

cannon: Support Go 1.23#14692

Merged
mbaxter merged 38 commits intodevelopfrom
mbax/issue-13447/go-1.23
Apr 28, 2025
Merged

cannon: Support Go 1.23#14692
mbaxter merged 38 commits intodevelopfrom
mbax/issue-13447/go-1.23

Conversation

@mbaxter
Copy link
Contributor

@mbaxter mbaxter commented Mar 6, 2025

Description

Support Go 1.23 by implementing a noop eventfd2 syscall. Add a new StateVersion VersionMultiThreaded64_v4(7) that enables this new functionality.

Other changes:

  • Reorganize the testdata/example program files:
    • Create subdirectories in testdata: go-1-22 go-1-23
    • These subdirectories hold programs that target different go versions
    • Migrate existing test programs to Go 1.23
    • Currently the go-1-22 directory only holds the hello program which is used in the cannon-stf-verify make task
  • Effectively deprecate the 32-bit VMs: test coverage over 32-bit programs has been cut to avoid failing tests
  • Update make reproducible-prestate to build the "next" cannon version, exported to op-program/bin/prestate-mt64Next.bin.gz
    • Add a new Dockerfile.repro.next that mirrors Dockerfile.repro but builds with go 1.23 and only builds the latest version of Cannon
    • Reorganize the output a bit to make it more readable
  • Update op-stack-ops/Dockerfile to build deprecated 32-bit vms from a tagged cannon release

Potential TODOs:

  • I could add the go 1.22 test programs back in and rework the program tests to target the right version. This may not be worth the effort since we are:
    • Going to remove the 32-bit VMs as a follow-up
    • Most likely going to immediately remove support for the VMs that target go 1.22 as a follow-up

Tests

  • Rework Cannon differential tests to make sure we are running variations across all currently supported multi-threaded VMs
  • Rework fault proof e2e tests to run across all currently supported mulit-threaded VMs
    • Introduce AllocTypeMTCannonNext alloc type to target the next Cannon version

Metadata

Part of #13447

@codecov
Copy link

codecov bot commented Mar 6, 2025

Codecov Report

Attention: Patch coverage is 67.50000% with 13 lines in your changes missing coverage. Please review.

Project coverage is 46.67%. Comparing base (ed58277) to head (1fa6ef8).
Report is 7 commits behind head on develop.

Files with missing lines Patch % Lines
op-deployer/pkg/deployer/state/chain_intent.go 0.00% 11 Missing ⚠️
op-deployer/pkg/deployer/pipeline/dispute_games.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #14692      +/-   ##
===========================================
- Coverage    46.71%   46.67%   -0.05%     
===========================================
  Files         1284     1284              
  Lines       106297   106327      +30     
===========================================
- Hits         49656    49625      -31     
- Misses       53146    53206      +60     
- Partials      3495     3496       +1     
Flag Coverage Δ
cannon-go-tests-32 62.02% <85.18%> (-0.24%) ⬇️
cannon-go-tests-64 57.55% <88.88%> (+0.14%) ⬆️
contracts-bedrock-tests 94.30% <ø> (ø)

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

Files with missing lines Coverage Δ
cannon/mipsevm/arch/arch32.go 100.00% <ø> (ø)
cannon/mipsevm/arch/arch64.go 100.00% <ø> (ø)
cannon/mipsevm/multithreaded/mips.go 93.44% <100.00%> (+0.13%) ⬆️
cannon/mipsevm/tests/helpers.go 84.31% <100.00%> (+0.80%) ⬆️
cannon/mipsevm/testutil/arch.go 72.09% <100.00%> (+2.86%) ⬆️
cannon/mipsevm/testutil/elf.go 80.95% <100.00%> (-19.05%) ⬇️
cannon/mipsevm/testutil/vmtests.go 91.00% <100.00%> (ø)
cannon/mipsevm/versions/state.go 61.00% <100.00%> (+1.20%) ⬆️
cannon/mipsevm/versions/version.go 81.48% <100.00%> (+1.48%) ⬆️
...acts-bedrock/src/cannon/libraries/MIPSSyscalls.sol 82.40% <ø> (ø)
... and 2 more

... and 9 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.

@mbaxter mbaxter force-pushed the mbax/issue-13447/go-1.23 branch 2 times, most recently from 24334c5 to 2580f17 Compare March 7, 2025 21:03
@opgitgovernance opgitgovernance added the S-stale Status: Will be closed unless there is activity label Mar 25, 2025
@opgitgovernance
Copy link
Contributor

This pr has been automatically marked as stale and will be closed in 5 days if no updates

@protolambda protolambda added S-exempt-stale Status: Do not mark stale and removed S-stale Status: Will be closed unless there is activity labels Apr 4, 2025
@mbaxter mbaxter force-pushed the mbax/issue-13447/go-1.23 branch from 8c157c4 to 273a0da Compare April 11, 2025 15:19
@mbaxter mbaxter force-pushed the mbax/issue-13447/go-1.23 branch 2 times, most recently from df40740 to 2c6d87c Compare April 22, 2025 21:26
@mbaxter mbaxter force-pushed the mbax/issue-13447/go-1.23 branch from 2c6d87c to 3288691 Compare April 23, 2025 17:43
@mbaxter mbaxter requested a review from Inphi April 24, 2025 22:24
@mbaxter mbaxter marked this pull request as ready for review April 24, 2025 22:24
@mbaxter mbaxter requested review from a team as code owners April 24, 2025 22:24
@mbaxter mbaxter requested a review from protolambda April 24, 2025 22:24
Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

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

LGTM.

@ajsutton ajsutton mentioned this pull request Apr 27, 2025
@mbaxter mbaxter added this pull request to the merge queue Apr 28, 2025
Merged via the queue into develop with commit 2cb6ab9 Apr 28, 2025
54 of 57 checks passed
@mbaxter mbaxter deleted the mbax/issue-13447/go-1.23 branch April 28, 2025 14:54
iquidus pushed a commit to Layr-Labs/optimism that referenced this pull request Jul 24, 2025
* cannon: Update go version

* Noop eventfd2 syscall

* Run semver-lock

* Add new VM version

* Add testdata for new state version

* Update cannon-embeds task

* Update test program go versions
Update test program go versions, bump Dockerfile.repro to 1.23.8

* Tweak step limits in tests

* Update cannon-embeds to embed versions 6 and 7

* Fix syscallNum type

* Update tests to run across all relevant vm versions

* Update contracts to feature-toggle the eventFd2 syscall

* Run semver-lock

* Update noop syscalls in tests

* Disable program tests for the 32-bit VM

* Fix reflection error

* Skip 32-bit program tests

* Fix fuzz test param

* Update todo

* Rename examples testdata to go-1-23

* Update references to testdata/examples

* Fix testdata Makefile, add go-1-22 testdata

* Undo MIPS2 version bump

* Create separate dockerfile for go1.23 prestates

* Run e2e tests against new vm

* Fix semver comment

* Use tagged cannon binaries for legacy 32-bit VMs

* Bump MIPS64 version

* Rework test helpers to avoid calling t.Parallel multiple times

* Cut more calls to InitParallel

* Reorder preimage docker build steps

* Fix reproducible-prestate output for mt64Next

* Drop the single-threaded VM variant from fp e2e tests

* op-e2e: Use mt64Next prestate

* ci: Extend timeout for cannon tests

* op-e2e: Only run super cannon tests on the mt64Next variant.

* op-e2e: Set cannon test timeout to 90m.

---------

Co-authored-by: Adrian Sutton <adrian@oplabs.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-exempt-stale Status: Do not mark stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants