Pin the toolchain this fork builds with (smr-moonshot#3675) - #44
Merged
isaacdoidge merged 1 commit intoAug 21, 2026
Merged
Conversation
Nothing in the repository declared a compiler, so the one used was whatever the machine happened to provide, and the set of toolchains that actually build the fork is both narrow and undeclared: the workspace `rust-version` of 1.88.0 is not sufficient in practice, while the local rustup default of 1.87.0 is rejected outright. A contributor therefore meets errors that read as code defects rather than environment ones, and a future move of `stable` can break the fork with no change on our side and nothing to pin back to. Pin 1.97.1, the version `smr-moonshot` pins, so the fork compiles under the toolchain its consumer uses. The pin covers the components and the cross-compilation target the workflows ask for, since rustup installs those from the file. Two jobs deliberately need a different compiler: the test matrix, which sweeps the MSRV, stable and nightly, and the book, whose rustdoc invocation passes `-Zunstable-options`. Both now set `RUSTUP_TOOLCHAIN`, which rustup ranks above `rust-toolchain.toml`; without that the pin would silently collapse the matrix onto one compiler and break the book build. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
aregng
approved these changes
Aug 21, 2026
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.
Fixes Entropy-Foundation/smr-moonshot#3675.
Why
Nothing in this fork declared a compiler, so the one used was whatever the machine happened to provide — and the set of toolchains that actually build it is both narrow and undeclared:
revm@29.0.0 requires rustc 1.88.0);rust-version = "1.88.0"inherited from upstream therefore does not describe what this fork needs.A contributor meets errors that read as code defects rather than environment ones, and a future move of
stablecan break the fork with no change on our side and nothing to pin back to.What changed
rust-toolchain.tomlpins1.97.1, the versionsmr-moonshotand the aptos-core fork already pin, so this fork compiles under the toolchain its consumer uses. The file carries the components and the cross-compilation target the workflows ask for (clippy,rust-docs,rustfmt,riscv32imac-unknown-none-elf), because rustup installs those from the pin, and it states the divergence from upstream's MSRV explicitly so it reads as deliberate.Two jobs genuinely need a different compiler, and both now set
RUSTUP_TOOLCHAIN, which rustup ranks aboverust-toolchain.toml:ci.yml's test matrix, which sweeps1.88/stable/nightly— without the override the pin would silently collapse all three onto one compiler and the MSRV would stop being tested at all;book.yml's build job, whosecargo docinvocation passes-Zunstable-optionsand so requires nightly.That interaction is the one real hazard in adding a pin to an upstream-derived CI configuration, and it is worth knowing that
dtolnay/rust-toolchain@…cannot be used to dodge it: that action setsrustup default, whichrust-toolchain.tomloutranks.Verification
In a clean worktree at
origin/feature/evm_automationplus this change:rustup show active-toolchainreports1.97.1 (overridden by …/rust-toolchain.toml)on a machine whose default is 1.87.0 — i.e. the pin does what the issue asks, on a default that previously could not build the fork at all.cargo check -p revm -p revm-handler -p revm-precompile -p revm-context— clean. These are the crates the node consumes.Two pre-existing failures are inherited, not introduced, and are unrelated to the toolchain (they reproduce identically at the same compiler without this change):
cargo check --workspace --all-targetsfails inrevm-handler's test target —crates/handler/src/precompile_provider.rs:116,the trait bound [u8]: AsRef<[_; 0]> is not satisfied. This is dev-dependency feature unification pulling inwinnow'sAsRef<Bytes> for [u8]andAsRef<BStr> for [u8]impls, which makes ther.as_ref()there ambiguous. It is a genuine defect in the branch, independent of rustc version, and wants its own fix.cargo check --workspaceadditionally fails in a Solidity build step that needssolcandnode_modules, which is an environment prerequisite rather than a code problem.Separately worth knowing
While checking this I found that this fork's CI has never run.
ci.yml,book.yml,bench.ymlandethereum-tests.ymlall trigger only onmainandrelease/**, but every fork PR since at least #36 targetsfeature/evm_automation. TheTestsworkflow has zero runs in the repository's history; the only workflow that has ever executed here is Dependabot's, and every one of those runs failed. So none of the workflow edits in this PR change any behaviour today — they keep the pin correct for whenever the workflows are enabled. Enabling them is a larger job than it looks, because the fork's clippy baseline is red, and it is worth tracking on its own.