fix(remappings): pin ds-test to direct forge-std path so make deploy reproduces canonical addresses - #171
Merged
Conversation
The committed remappings.txt resolves ds-test through a nested copy (lib/p256-verifier/lib/forge-std/lib/ds-test/src/). Solidity records the full remappings list in contract metadata, and with bytecodeHash=ipfs that metadata hash is appended to the creation bytecode. Since CREATE2 hashes the full init code, the stray path shifts the deterministic deployment address and 'make deploy' fails at the EXPECTED_IMPLEMENTATION assert in DeployFactory.s.sol. Pin ds-test to lib/forge-std/lib/ds-test/src/ to match the canonical v1.1 deployment. Verified locally (forge clean + forge build, deploy profile) that both the implementation (0x00000110...) and factory (0xBA5ED1...) addresses reproduce exactly. Co-authored-by: OpenCode <opencode-noreply@coinbase.com>
Collaborator
✅ Heimdall Review Status
|
stevieraykatz
approved these changes
Jul 17, 2026
This was referenced Jul 17, 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.
Problem
make deployfails atassert(implementation == EXPECTED_IMPLEMENTATION)inscript/DeployFactory.s.sol, deploying the implementation to a non-canonical address (0xcB57…) instead of0x00000110dCdEdC9581cb5eCB8467282f2926534d. The failure surfaces only as a barepanic: assertion failed (0x01)deep in the deploy script, which is hard to diagnose.Root cause
The committed
remappings.txtresolvesds-testthrough a nested copy:Solidity records the full remappings list in contract metadata (not just the remappings a given contract imports), and with the default
bytecode_hash = "ipfs"that metadata hash is appended to the creation bytecode. Because CREATE2 hashes over the full init code, the strayds-testpath changes the deployed address, so the deterministic-deploy asserts fail. Bothds-testpaths exist on disk (lib/forge-std/lib/ds-testand the nestedlib/p256-verifier/lib/forge-std/lib/ds-test), so foundry's auto-resolution is ambiguous and the "wrong" one got committed.Fix
Pin
ds-testto the direct forge-std path, matching what the canonical v1.1 deployment used:Verified locally (
forge clean && forge build,deployprofile) that both addresses reproduce exactly:0x00000110dCdEdC9581cb5eCB8467282f2926534d✅0xBA5ED110eFDBa3D005bfC882d75358ACBbB85842✅Note:
forge cleanis required after pulling this change, since stale artifacts otherwise mask it.CI status — the red checks are pre-existing and should be left alone
This PR changes a single line in
remappings.txt(+1/−1) and touches no.sol, no submodule, and no.gitmodules. The failing checks are unrelated repo-health/CI issues that predate this PR:verify (...)(Certora, ×3) — the formal-verification jobs; expected/known.forge fmt --checkflagging trailing whitespace in an unrelated gas-profiling test file. Compilation itself succeeds. Not touched by this PR.forge installwithfatal: unable to read tree (5ea5d9f…)forsolady. That revision is not referenced anywhere in the repo (.gitmodulespinssoladyat the fetchablec4c96607, v0.0.175); it's a phantom from CI submodule caching / the nightlyforgebuild, not from repo content.Why we are intentionally not "fixing" CI by bumping
solady:soladyis compiled directly intoCoinbaseSmartWallet(Receiver,LibString,SignatureCheckerLib,UUPSUpgradeableare inherited and appear in the wallet's metadata sources). Bumping it would change the wallet's init code and metadata hash → change the deterministic CREATE2 address → break redeployment of the canonical0x00000110…/0xBA5ED1…addresses already live across 248 chains. This repo is effectively a frozen artifact for CBSW v1.0.0 / v1.1.0 whose purpose is reproducing those exact addresses, so the compiled dependency tree must stay byte-frozen. The correct scope for this PR is the one-line remappings fix only.