Skip to content

feat(standard-contracts): add v4-style pin-build mechanism for standard contracts#23262

Merged
dbanks12 merged 6 commits into
merge-train/fairiesfrom
dbanks12/standard-contracts-pin-artifacts
May 29, 2026
Merged

feat(standard-contracts): add v4-style pin-build mechanism for standard contracts#23262
dbanks12 merged 6 commits into
merge-train/fairiesfrom
dbanks12/standard-contracts-pin-artifacts

Conversation

@dbanks12

@dbanks12 dbanks12 commented May 13, 2026

Copy link
Copy Markdown
Contributor

Mirrors the protocol-contract pinning mechanism v4 uses (pinned-protocol-contracts.tar.gz), but for standard contracts.

  • noir-contracts/bootstrap.sh extracts pinned-standard-contracts.tar.gz into target/ at build time when present, and skips recompilation of contracts/standard/*.
  • noir-contracts/bootstrap.sh pin-standard-build force-builds the standard contracts and produces the tarball, intended to be run by a human at release-branch cut.
  • noir-contracts/standard_contracts.json lists the artifact names included in the tarball (mirror of protocol_contracts.json).

The tarball is intentionally not committed in this PR. Its absence makes the extraction block a no-op on next; the mechanism activates only when a release branch (e.g. v5) is cut and someone runs ./bootstrap.sh pin-standard-build and commits the resulting tarball.

@dbanks12 dbanks12 force-pushed the dbanks12/shift-protocol-addresses branch from d2f6d24 to c662d17 Compare May 14, 2026 13:42
@dbanks12 dbanks12 force-pushed the dbanks12/standard-contracts-pin-artifacts branch from 966fca5 to 3702cda Compare May 14, 2026 13:42
@dbanks12 dbanks12 force-pushed the dbanks12/shift-protocol-addresses branch from c662d17 to e4f8cb3 Compare May 14, 2026 14:18
@dbanks12 dbanks12 force-pushed the dbanks12/standard-contracts-pin-artifacts branch 2 times, most recently from c291b97 to 91cba07 Compare May 14, 2026 19:26
@dbanks12 dbanks12 force-pushed the dbanks12/shift-protocol-addresses branch 2 times, most recently from 2a01c1e to 7e4e2fa Compare May 14, 2026 19:37
@dbanks12 dbanks12 force-pushed the dbanks12/standard-contracts-pin-artifacts branch 2 times, most recently from 991fe58 to c312b64 Compare May 14, 2026 19:45
@dbanks12 dbanks12 force-pushed the dbanks12/shift-protocol-addresses branch 2 times, most recently from b584d56 to 6fee021 Compare May 14, 2026 20:04
@dbanks12 dbanks12 force-pushed the dbanks12/standard-contracts-pin-artifacts branch 2 times, most recently from 536846d to bded191 Compare May 14, 2026 20:48
@dbanks12 dbanks12 force-pushed the dbanks12/shift-protocol-addresses branch 2 times, most recently from 3ebe06c to d17d039 Compare May 14, 2026 22:17
@dbanks12 dbanks12 force-pushed the dbanks12/standard-contracts-pin-artifacts branch 2 times, most recently from 1e72115 to 948ba98 Compare May 15, 2026 17:33
@dbanks12 dbanks12 force-pushed the dbanks12/shift-protocol-addresses branch from d17d039 to 4fd03ac Compare May 15, 2026 17:33
@dbanks12 dbanks12 force-pushed the dbanks12/standard-contracts-pin-artifacts branch from 948ba98 to 30edb2f Compare May 15, 2026 19:27
@dbanks12 dbanks12 force-pushed the dbanks12/shift-protocol-addresses branch from 4fd03ac to 6bda65c Compare May 15, 2026 19:27
@dbanks12 dbanks12 force-pushed the dbanks12/standard-contracts-pin-artifacts branch from 30edb2f to 9f8bb05 Compare May 15, 2026 19:37
@dbanks12 dbanks12 force-pushed the dbanks12/shift-protocol-addresses branch from 6bda65c to 98cbab1 Compare May 15, 2026 19:37
@dbanks12 dbanks12 force-pushed the dbanks12/standard-contracts-pin-artifacts branch from 9f8bb05 to 7e52403 Compare May 17, 2026 00:24
@dbanks12 dbanks12 force-pushed the dbanks12/shift-protocol-addresses branch 2 times, most recently from 2b5e859 to 4a6f95e Compare May 17, 2026 10:16
@dbanks12 dbanks12 force-pushed the dbanks12/shift-protocol-addresses branch from ec369c8 to 86793e4 Compare May 26, 2026 19:52
@dbanks12 dbanks12 force-pushed the dbanks12/standard-contracts-pin-artifacts branch 2 times, most recently from 9e247a0 to 77567be Compare May 26, 2026 20:11
@dbanks12 dbanks12 force-pushed the dbanks12/shift-protocol-addresses branch 2 times, most recently from 6c73e70 to f4072aa Compare May 26, 2026 20:15
@dbanks12 dbanks12 force-pushed the dbanks12/standard-contracts-pin-artifacts branch 2 times, most recently from 22d9842 to b17d197 Compare May 26, 2026 20:36
@dbanks12 dbanks12 force-pushed the dbanks12/shift-protocol-addresses branch from f4072aa to 2b125a3 Compare May 26, 2026 20:36
@dbanks12 dbanks12 marked this pull request as ready for review May 26, 2026 20:43
@dbanks12 dbanks12 requested a review from ludamad May 26, 2026 20:43
@dbanks12 dbanks12 force-pushed the dbanks12/shift-protocol-addresses branch from 2b125a3 to 7dae34b Compare May 26, 2026 20:47
@dbanks12 dbanks12 force-pushed the dbanks12/standard-contracts-pin-artifacts branch from b17d197 to 5c65007 Compare May 26, 2026 20:47

@ludamad ludamad left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

not clear on context but change lgtm

@dbanks12 dbanks12 force-pushed the dbanks12/standard-contracts-pin-artifacts branch from 5c65007 to f753b35 Compare May 27, 2026 13:57
@dbanks12 dbanks12 force-pushed the dbanks12/shift-protocol-addresses branch 2 times, most recently from e2a8c32 to 4575e3e Compare May 27, 2026 15:36
@dbanks12 dbanks12 force-pushed the dbanks12/standard-contracts-pin-artifacts branch 2 times, most recently from 13d5fb1 to edb083a Compare May 27, 2026 15:40
@dbanks12 dbanks12 force-pushed the dbanks12/shift-protocol-addresses branch from 030e647 to 60cec89 Compare May 27, 2026 15:59
@dbanks12 dbanks12 force-pushed the dbanks12/standard-contracts-pin-artifacts branch from edb083a to 05bdadb Compare May 27, 2026 16:00
@dbanks12 dbanks12 force-pushed the dbanks12/shift-protocol-addresses branch from 60cec89 to d0fd90e Compare May 27, 2026 16:08
@dbanks12 dbanks12 force-pushed the dbanks12/standard-contracts-pin-artifacts branch 2 times, most recently from 5f3928b to ed52afb Compare May 27, 2026 16:19
dbanks12 added 6 commits May 29, 2026 21:02
…ne iterating file

Replaces three near-identical per-contract reproducibility.test.ts files with a single
src/reproducibility.test.ts that iterates standardContracts[] from contract_data.ts.
Pinned artifacts move from src/<slug>/pinned/ to a flat src/pinned/ directory.

Adding a new standard contract is now strictly one row in standardContracts[] plus one
pinned JSON; no test-file edits needed.
…arball substitution

Replaces the per-contract pinned JSON + sha256 reproducibility test with the same
mechanism v4 uses for protocol contracts: a single committed
pinned-standard-contracts.tar.gz whose presence at build time causes
noir-contracts/bootstrap.sh to extract the pinned artifacts into target/ and skip
recompilation of contracts under contracts/standard/.

The tarball is intentionally not committed in this PR. Its absence makes the
extraction block a no-op on next; the mechanism activates when a release branch
(e.g. v5) is cut and someone runs `./bootstrap.sh pin-standard-build` and commits
the resulting tarball.

Adds:
  - noir-projects/noir-contracts/standard_contracts.json (manifest mirroring
    protocol_contracts.json)
  - extraction block in build() gated on tarball presence
  - pin-standard-build function + case arm

Removes:
  - yarn-project/standard-contracts/src/reproducibility.test.ts
  - yarn-project/standard-contracts/src/pinned/*.json (three pinned artifacts)
  - the matching .prettierignore entry
Commit pinned-standard-contracts.tar.gz so the standard contracts (AuthRegistry,
MultiCallEntrypoint, PublicChecks) are pinned: the build extracts the canonical
artifacts instead of recompiling, freezing their deterministic addresses on next.
Verified the pinned artifacts reproduce the committed standard_contract_data.ts /
standard_addresses.nr values (no drift).
… preloading

The multicall-demotion migration note referenced `registerMultiCallEntrypoint`,
which the final PR replaced with the `preloadedContractsProvider` option on
PXECreationOptions. Correct the multi_call_entrypoint and auth_registry TBD notes
to describe the actual mechanism: createPXE preloads the MultiCallEntrypoint by
default, EmbeddedWallet preloads MultiCallEntrypoint + AuthRegistry, and other PXE
consumers can supply their own preloadedContractsProvider.
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