Repository navigation
Conversation
Move the pinned compiler from nightly-2026-02-03 to nightly-2026-04-23, the first nightly with the fix for a closure-call code-generation bug (rust-lang/rust#155241, fixed by rust-lang/rust#155343). With an affected compiler, a by-value argument larger than two words (a `Vec`, say) passed to a closure call can alias the caller's memory instead of a temporary copy, so the callee mutates it in place: silently wrong values on 1.77-1.90, a double free from 1.91 on, in optimized builds. nightly-2026-02-03 (1.95.0-nightly) is in that range, and every release binary, mega-evm included, is built with it. mega-evm moved to the same nightly in megaeth-labs/mega-evm#411 and mega-reth follows in megaeth-labs/mega-reth#2561; mega-evm notes that a downstream build on an affected compiler needs its own pin update. No source changes: the new nightly brings no rustfmt or clippy findings in either CI configuration. rust-version stays 1.94, since mega-reth builds the shared crates with its own pinned compiler, and they still compile on mega-reth develop's nightly-2025-12-20. coverage-replayer folds the compiler into its binary_id, so stores scanned with the old compiler do not carry over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Claude review status
🛠️ Review did not finish Attempted head This round did not publish: MODEL_ACTION_FAILED: The Claude review retry action failed.. Anything listed below is from the last round that did. Workflow run: https://github.com/megaeth-labs/stateless-validator/actions/runs/41609772022 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Move the pinned compiler from
nightly-2026-02-03tonightly-2026-04-23, the first nightly with the fix for a closure-call code-generation bug (rust-lang/rust#155241, fixed by rust-lang/rust#155343).mega-evm moved to the same nightly in megaeth-labs/mega-evm#411, and mega-reth follows in megaeth-labs/mega-reth#2561.
Why
With an affected compiler, a by-value argument larger than two words (a
Vec, say) passed to a closure call can be the caller's own memory instead of a temporary copy, so the callee mutates it in place.In optimized builds this shows as silently wrong values on 1.77–1.90 and as a double free from 1.91 on.
nightly-2026-02-03is 1.95.0-nightly, inside that range, and every release binary is built with it, mega-evm included.mega-evm#411 notes that a downstream build on an affected compiler needs its own pin update.
No impact has been observed: mega-evm replayed mainnet blocks under both compilers with byte-identical results, and mega-reth#2561 did the same through the
stateless-corevalidation path.A miscompile cannot be ruled out code path by code path, so the fix is the compiler.
Changes
rust-toolchain.toml:nightly-2026-02-03→nightly-2026-04-23(1.97.0-nightly, LLVM 22.1.2).AGENTS.md(and soCLAUDE.md, a symlink to it): the documented toolchain.No source changes: the new nightly brings no rustfmt or Clippy findings in either CI configuration.
Compatibility
rust-versionstays1.94.mega-reth builds
stateless-common,stateless-coreandstateless-r2with its own pinned compiler, and raising it would make mega-reth's1.94.0-nightlyrefuse them.nightly-2025-12-20(cargo +nightly-2025-12-20 check --ignore-rust-version, with default features,--all-featuresand--no-default-features), so this lands independently of mega-reth#2561.coverage-replayerfoldsrustc -vV(release, commit hash, LLVM version) into itsbinary_id, so stores scanned with the old compiler do not carry over; carry the candidate pool across withinspect --dump-poolbefore the next scan.Tests
On
nightly-2026-04-23:cargo test --workspace: 622 passed, 0 failed, 40 ignored (the endpoint-backeddebug-trace-serverintegration tests), the same as on the old compiler; the test profile is optimized, where the bug shows.This includes
validate_block_mainnet_fixturesover all 63 mainnet fixture blocks andreplays_mainnet_fixtures_with_header_sanity.cargo fmt --all --check,cargo sort --check, and both CI Clippy configurations: clean.🤖 Generated with Claude Code