Skip to content

chore: fix deploy script for 5.x and stop shipping stale deployments.json - #21

Merged
IlyasRidhuan merged 1 commit into
stack/test-layer-fixesfrom
stack/deploy-tooling
Aug 12, 2026
Merged

chore: fix deploy script for 5.x and stop shipping stale deployments.json#21
IlyasRidhuan merged 1 commit into
stack/test-layer-fixesfrom
stack/deploy-tooling

Conversation

@alejoamiras

@alejoamiras alejoamiras commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

What

Deploy-tooling fixes from the modernization audit — the headline: the deploy script has been broken since 4.2.0 and deployments.json is stale.

  • Stop shipping deployments.json in the npm package: the recorded addresses were generated under the pre-5.0 address-derivation formula (aztec.js 4.1.0-rc.4 era, never regenerated through four derivation-breaking bumps) and cannot match current derivation. The file stays in-repo but is excluded from build-package.sh until regenerated on a live network.
  • Fix account self-deployment: still passed from: AztecAddress.ZERO, which 4.2.0 replaced with the NO_FROM sentinel — the script failed on any 5.x network. This (and the fossilized v4-devnet-2 endpoint) is why the deployments were never regenerated.
  • Hygiene: skipClassPublication when the contract class is already registered on-chain (engages on re-runs; within one fast run the prior registration may not be mined yet since we wait for PROPOSED); wait: { timeout } on sends; match TX_ERROR_EXISTING_NULLIFIER from @aztec/stdlib/tx instead of a hardcoded string; drop dead "already registered" catches (registerContract is an idempotent upsert).

Validation

Full end-to-end deploy against a local network: account + Dripper + WETH/DAI/USDC all deploy successfully — the first verified run of this script on 5.x.

Follow-up (not this PR)

Regenerate deployments.json by running yarn deploy --network testnet with a current endpoint, then re-enable shipping it; add regeneration to the version-bump checklist.

🤖 Generated with Claude Code

…json

The recorded deployments.json addresses were generated under the
pre-5.0 address-derivation formula (4.1.0-rc.4 era) and cannot match
current derivation — stop copying the file into the published npm
package until it is regenerated on a live network.

The deploy script itself turned out to be broken since 4.2.0: account
self-deployment still passed from: AztecAddress.ZERO, which the NO_FROM
sentinel replaced. Fixed, plus hygiene from the modernization audit:

- skipClassPublication when the contract class is already registered
  on-chain (engages on re-runs; within a single fast run the prior
  class registration may not be mined yet since we wait for PROPOSED)
- wait timeouts on sends so a stuck network cannot hang the script
- match TX_ERROR_EXISTING_NULLIFIER from @aztec/stdlib/tx instead of a
  hardcoded string
- drop dead 'already registered' catches (registerContract is an
  idempotent upsert)

Validated end-to-end against a local network: account + Dripper +
WETH/DAI/USDC all deploy successfully (first verified run of this
script on 5.x).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@IlyasRidhuan
IlyasRidhuan merged commit d7637ef into main Aug 12, 2026
4 of 7 checks passed
@alejoamiras
alejoamiras deleted the stack/deploy-tooling branch August 12, 2026 17:00
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.

2 participants