Skip to content

Commit 106dcb6

Browse files
committed
chore(toolchain): bump forge pin to 1.4.3 — 1.2.x generates alloy-0.x bindings
`bindings/build.rs` calls `forge bind` to generate `bindings/src/codegen/`. Forge 1.2.x generates alloy-0.x-flavoured Rust: error[E0405]: cannot find trait `Transport` in module `alloy_contract::private` error[E0107]: type alias takes at most 2 generic arguments but 3 were supplied (alloy_contract::RawCallBuilder<T, P, N>) error[E0050]: method `abi_decode_returns` has 2 parameters but the declaration in trait has 1 ... (15 errors in this family) Our workspace is on alloy 2.0.4, so the generated code is unbuildable. Forge 1.4+ generates alloy-2.x-flavoured bindings. The previous pin (1.2.3) mirrored mantle-v2/mise.toml, but mantle-v2 has no `bindings/` crate / no `forge bind` invocation so that pin works there. op-succinct needs its own pin. Mac developers didn't see this because foundryup-installed `~/.foundry/bin/forge` (typically 1.4.x-stable) precedes mise's shim in PATH, so build.rs was silently calling the system Foundry instead of mise's 1.2.3. Fresh Linux servers have only mise's forge on PATH and got the alloy-0.x output. Also updates MANTLE_CHANGES.md §3.7 + §5.4 to document the version requirement and the symptom-table fix.
1 parent f355cf5 commit 106dcb6

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

‎MANTLE_CHANGES.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ sourced from `mantle-xyz/op-succinct origin/main` HEAD `664a1bd4`. See that dire
193193
| File | Pin | Why |
194194
|---|---|---|
195195
| `rust-toolchain.toml` | `nightly-2026-02-15` (rustc 1.95-nightly) | Upstream v3.8.1 pinned `nightly-2025-09-15` (rustc 1.92-nightly). After Phase 2 swapped deps to mantle-v2, those crates' `rust-version = "1.94"` declaration started rejecting 1.92-nightly. Bumped to 1.95-nightly which keeps the `rustc-dev` component build scripts need. |
196-
| `mise.toml` | `forge = cast = anvil = "1.2.3"`, `svm-rs = "0.5.19"` | Upstream v3.8.1's `bindings/build.rs` calls `forge bind` to generate `bindings/src/codegen/` (gitignored). Without forge on PATH, build.rs prints a warning and skips generation, then `lib.rs:7 mod codegen;` fails to find the module. Pinning forge via mise mirrors mantle-v2/mise.toml so a fresh machine just needs `mise install` rather than a manual Foundry install. `rust` is intentionally NOT pinned here — `rust-toolchain.toml` already drives it and a mise rust pin would silently override (we hit exactly this with mantle-v2's mise.toml earlier). |
196+
| `mise.toml` | `forge = cast = anvil = "1.4.3"`, `svm-rs = "0.5.19"` | Upstream v3.8.1's `bindings/build.rs` calls `forge bind` to generate `bindings/src/codegen/` (gitignored). Without forge on PATH, build.rs prints a warning and skips generation, then `lib.rs:7 mod codegen;` fails to find the module. `forge bind` from 1.2.x generates alloy-0.x-flavoured Rust (3-arg `RawCallBuilder`, the old `Transport` trait) which won't compile against this workspace's alloy 2.0.4 deps — pin **1.4.x** instead (mantle-v2/mise.toml's 1.2.3 stays because mantle-v2 has no `bindings/` crate). `rust` is intentionally NOT pinned here — `rust-toolchain.toml` already drives it and a mise rust pin would silently override (we hit exactly this with mantle-v2's mise.toml earlier). |
197197

198198
## 4. Sync workflow
199199

@@ -306,6 +306,7 @@ Subsequent incrementals are seconds.
306306
| `Error: failed to resolve file: ".../contracts/lib/sp1-contracts/contracts/src/SP1MockVerifier.sol": No such file or directory` (or similar for `solady`, `openzeppelin-contracts`, etc.) | git submodules never initialised on this clone | `git submodule update --init --recursive --depth 1` |
307307
| `git submodule update --init` prompts for `Username for 'https://github.com'` | One of the submodule URLs points at a private repo and the machine has no GitHub credentials. Phase 5 removed `mantle-xyz/mantle-cdk` (the only private one) — if you see this on a fresh clone of `mantle/op-succinct-v3.8.1` post-Phase-5, you're on an older commit. `git pull` first. | `git pull` to land Phase 5 cleanup, or set up a GitHub PAT in `~/.netrc` / git credential helper if you intentionally re-added a private submodule |
308308
| `Error (6275): Source "@safe-contracts/contracts/common/Enum.sol" not found` from `forge bind` | v117 left dangling imports in `contracts/test/helpers/Utils.sol`. Phase 5 dropped the two unused imports; this only resurfaces if someone edits that file and re-adds them. | Drop `Safe` / `Enum` imports from `Utils.sol` (they're never used); see §3.2 row. |
309+
| `bindings/src/codegen/*.rs` won't compile — errors like `cannot find trait 'Transport' in module 'alloy_contract::private'`, `RawCallBuilder` takes 2 generics not 3, `abi_decode_returns` has 1 parameter not 2 | `forge bind` from forge 1.2.x generates alloy-0.x-flavoured Rust; workspace uses alloy 2.0.4. PATH has a forge older than 1.4. | `mise install forge@1.4.3` (mise.toml already pins 1.4.3 — typically caused by a system Foundry from `~/.foundry/bin` shadowing mise's pin: `which forge` to confirm); then `cargo clean -p op-succinct-bindings && cargo build --workspace` |
309310
| `mise: command not found` after running the installer | mise binary lives at `~/.local/bin/mise` but PATH doesn't include it yet | `eval "$(~/.local/bin/mise activate bash)"` for the current shell; the `echo … >> ~/.bashrc` line above seeds future shells |
310311
| `mise install` finishes instantly with "all tools are installed" but `forge --version` returns the wrong version | Shell didn't pick up mise's PATH shim, so an older `forge` from `~/.foundry/bin/` or system pkg manager is winning | re-source rc files; check `which forge` vs `mise which forge`; `mise exec -- forge --version` to bypass PATH and confirm mise's copy works |
311312
| `git submodule update` hangs or errors out on github.com | network / proxy / firewall on the server can't reach github.com | configure git http proxy or pull through an internal mirror |

‎mise.toml‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,16 @@
1414
# shadow that pin in confusing ways (we hit exactly this with mantle-v2's
1515
# mise.toml earlier).
1616

17+
# forge / cast / anvil are pinned to 1.4.3 (not mantle-v2/mise.toml's 1.2.3).
18+
# Reason: this repo's `bindings/build.rs` calls `forge bind`, and `forge bind`
19+
# from 1.2.x generates alloy-0.x-flavoured Rust (3-arg `RawCallBuilder`, the
20+
# old `Transport` trait, etc.) — which won't compile against this workspace's
21+
# alloy 2.0.4 deps. 1.4.0+ generates alloy-2.x-flavoured bindings. mantle-v2
22+
# can stay on 1.2.3 because mantle-v2 has no `bindings/` crate / no `forge bind`.
1723
[tools]
18-
forge = "1.2.3"
19-
cast = "1.2.3"
20-
anvil = "1.2.3"
24+
forge = "1.4.3"
25+
cast = "1.4.3"
26+
anvil = "1.4.3"
2127
svm-rs = "0.5.19"
2228

2329
[tool_alias]

0 commit comments

Comments
 (0)