Skip to content

ci: pin Foundry to v1.5.1 to avoid nightly drift - #172

Open
amiecorso wants to merge 1 commit into
coinbase:mainfrom
amiecorso:ci/pin-foundry-version
Open

ci: pin Foundry to v1.5.1 to avoid nightly drift#172
amiecorso wants to merge 1 commit into
coinbase:mainfrom
amiecorso:ci/pin-foundry-version

Conversation

@amiecorso

Copy link
Copy Markdown
Contributor

Why

CI installs Foundry via foundry-rs/foundry-toolchain@v1 with version: nightly, which advances daily. A floating toolchain quietly changes:

  • remappings auto-resolution and evm_version clamping (e.g. pragueshanghai on solc 0.8.23), both of which feed the contract metadata hash and therefore the deterministic CREATE2 deploy address
  • forge fmt rules, which drift between nightlies

This is the same class of non-determinism behind the recent non-canonical deploy-address fix (#171). For a repo whose purpose is redeploying the canonical CBSW v1.0.0 / v1.1.0 addresses on new chains, the toolchain should be frozen.

What

  • Pin all three foundry-toolchain installs to v1.5.1:
    • .github/workflows/test.yml (forge-test + forge-coverage jobs)
    • .github/workflows/certora.yml (verify job)
  • Document matching the version locally in the README via foundryup --install 1.5.1.

Verification

v1.5.1 reproduces the canonical addresses exactly (forge clean && forge build, deploy profile):

  • implementation → 0x00000110dCdEdC9581cb5eCB8467282f2926534d
  • factory → 0xBA5ED110eFDBa3D005bfC882d75358ACBbB85842

Notes

CI installed foundry 'nightly', which changes daily and quietly shifts
remappings auto-resolution, evm_version clamping, and fmt rules -- the same
class of drift that recently produced a non-canonical CREATE2 deploy address.

Pin all three foundry-toolchain installs (forge-test, forge-coverage, certora
verify) to v1.5.1, and document matching it locally via 'foundryup --install
1.5.1'. Verified v1.5.1 reproduces the canonical addresses exactly:
implementation 0x00000110dCdEdC9581cb5eCB8467282f2926534d and factory
0xBA5ED110eFDBa3D005bfC882d75358ACBbB85842.

Co-authored-by: OpenCode <opencode-noreply@coinbase.com>
@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants