Skip to content

Fix incremental deploy address collision - #146

Merged
AdamSpitz merged 1 commit into
devfrom
fix/deploy-reuse-address-collision
Sep 1, 2026
Merged

Fix incremental deploy address collision#146
AdamSpitz merged 1 commit into
devfrom
fix/deploy-reuse-address-collision

Conversation

@AdamSpitz

Copy link
Copy Markdown
Owner

Summary

  • Incremental deploy could reuse one on-chain address for two contracts after a local wipe: Hardhat CREATE is deterministic, so localhost.env still pointed AlignmentAttestations at AccountAssertions. Fingerprint reuse then treated that bytecode as AlignmentAttestations and attestAlignment reverted on tiny seed.
  • Skip reuse when this deploy run has already claimed the env address; deploy a fresh contract instead.

Test plan

  • Fast suite via pre-commit hook
  • After deleting gitignored deployments/localhost.env + manifest, ./scripts/stop-wipe-restart.sh --seed --use-hardhat-accounts completed; AlignmentAttestations is a distinct address from AccountAssertions

After a local wipe, sequential CREATE still lands at the old Hardhat
addresses. If localhost.env already mapped AlignmentAttestations to
AccountAssertions, fingerprint reuse treated the latter as the former
and attestAlignment reverted. Skip reuse when this run already claimed
the address.

@AdamSpitz AdamSpitz left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review receipt.

No blocking issues. Same-run claimedBy guard is the correct fix for post-wipe CREATE/env collisions. One cosmetic nit (collision log still uses reuse prefix) not filed as a thread.

Reviewed-with: grok
Reviewed-files: 1
Reviewed-commit: a05ba8d

@AdamSpitz
AdamSpitz merged commit 4a7cc50 into dev Sep 1, 2026
2 of 3 checks passed
@AdamSpitz
AdamSpitz deleted the fix/deploy-reuse-address-collision branch September 1, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant