From 99c6ed29f76a0fef629b7de4822c1822d4ab35fd Mon Sep 17 00:00:00 2001 From: "liquan.eth" Date: Tue, 3 Nov 2026 17:48:01 +0900 Subject: [PATCH 1/2] chore: upgrade Rust nightly to fix closure miscompilation 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 --- AGENTS.md | 2 +- rust-toolchain.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 120c8acb..4b113062 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -31,7 +31,7 @@ cargo clippy -p coverage-replayer --all-targets --all-features -- --cfg coverage cargo sort --check --workspace --grouped --order package,workspace,lints,profile,bin,benches,dependencies,dev-dependencies,features ``` -The project uses nightly `2026-02-03` toolchain (edition 2024, rust-version 1.94). +The project uses nightly `2026-04-23` toolchain (edition 2024, rust-version 1.94). ## Workspace Structure diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 8f6ee06f..8633cbb6 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2026-02-03" +channel = "nightly-2026-04-23" components = ["rustfmt", "clippy", "rust-src", "miri", "rust-analyzer"] From 4ff2df28c61bbbae25f02b5c9d9686fae9ddc5d5 Mon Sep 17 00:00:00 2001 From: "liquan.eth" Date: Thu, 12 Nov 2026 00:34:50 +0900 Subject: [PATCH 2/2] deps: bump mega-evm to c671ef0 Picks up megaeth-labs/mega-evm#411, which bumps its Rust nightly to fix the same closure-call miscompilation. Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ebe45d10..ddf74cb8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3539,7 +3539,7 @@ dependencies = [ [[package]] name = "mega-evm" version = "1.7.1" -source = "git+https://github.com/megaeth-labs/mega-evm.git?rev=7574376477f9731e6a4c9ab27cdc930d30cbe36d#7574376477f9731e6a4c9ab27cdc930d30cbe36d" +source = "git+https://github.com/megaeth-labs/mega-evm.git?rev=c671ef05b4d1a2dc8737ee916d16792d787194e5#c671ef05b4d1a2dc8737ee916d16792d787194e5" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3567,7 +3567,7 @@ dependencies = [ [[package]] name = "mega-system-contracts" version = "1.7.1" -source = "git+https://github.com/megaeth-labs/mega-evm.git?rev=7574376477f9731e6a4c9ab27cdc930d30cbe36d#7574376477f9731e6a4c9ab27cdc930d30cbe36d" +source = "git+https://github.com/megaeth-labs/mega-evm.git?rev=c671ef05b4d1a2dc8737ee916d16792d787194e5#c671ef05b4d1a2dc8737ee916d16792d787194e5" dependencies = [ "alloy-primitives", "alloy-sol-types", diff --git a/Cargo.toml b/Cargo.toml index 4930cd5e..e5180edd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,7 @@ alloy-signer-local = "2.0.5" alloy-trie = { version = "0.9.4", default-features = false } # mega -mega-evm = { git = "https://github.com/megaeth-labs/mega-evm.git", rev = "7574376477f9731e6a4c9ab27cdc930d30cbe36d", default-features = false } +mega-evm = { git = "https://github.com/megaeth-labs/mega-evm.git", rev = "c671ef05b4d1a2dc8737ee916d16792d787194e5", default-features = false } salt = { git = "https://github.com/megaeth-labs/salt.git", rev = "220ea9de3aa6036c1bf3eb2acdc3d84845500dd2", default-features = false } # op