Skip to content

feat(public_checks): demote to non-protocol contract#23199

Merged
dbanks12 merged 0 commit into
dbanks12/demote-multicall-entrypointfrom
dbanks12/demote-public-checks
May 12, 2026
Merged

feat(public_checks): demote to non-protocol contract#23199
dbanks12 merged 0 commit into
dbanks12/demote-multicall-entrypointfrom
dbanks12/demote-public-checks

Conversation

@dbanks12
Copy link
Copy Markdown
Contributor

Stacked on top of #23197 (which stacks on #23106). Mirrors the auth_registry and multi_call_entrypoint demotions but with a Noir-side stamp because public_checks::utils::privately_check_* is consumed by Noir app contracts (app_subscription, crowdfunding).

Summary

  • Moves public_checks_contract from contracts/protocol/ to contracts/canonical/ (preserves git rename history).
  • Restructures the canonical_addresses Noir crate so lib.nr is now a hand-written aggregator that re-exports per-contract stamps. auth_registry.nr (renamed from lib.nr) holds AUTH_REGISTRY_ADDRESS; public_checks.nr holds the new PUBLIC_CHECKS_ADDRESS. Downstream use canonical_addresses::FOO_ADDRESS imports keep their flat paths.
  • Updates public_checks::utils to import canonical_addresses::PUBLIC_CHECKS_ADDRESS; adds canonical_addresses as a direct Nargo dep of public_checks_contract (transitive dep through aztec wasn't enough for nargo's import resolver).
  • Removes PUBLIC_CHECKS_ADDRESS from constants.nr / aztec_constants.hpp / constants_gen.pil / constants.gen.ts / constants.in.ts whitelists and drops the entry from protocol_contracts.json. Address slot 6 in ProtocolContractsList becomes reserved (zero).
  • Adds a public-checks stamp sub-package to @aztec/canonical-contracts with both Noir lib renderer and TS twin, plus a freshness test.
  • Renderer wrap fix: the existing auth-registry and multi-call-entrypoint TS twin renderers also wrap their long export lines in this PR, because the pre-commit prettier hook re-wraps any committed .ts file (which previously caused the freshness assertion to flap between renderer-output and on-disk versions). This is a one-time fix that lets the freshness gate be stable for all three stamps; the on-disk Noir/TS twin files are correspondingly regenerated.
  • Adds noir-projects/scripts/public_checks_cycle_guard.sh (mirrors the auth_registry guard). It accepts the structural dep (unlike auth_registry's) because the contract crate must export utils.nr for consumer contracts, but it still fails if the bytecode embeds the stamped address.
  • Drops the public-checks/ subdir from @aztec/protocol-contracts, the PublicChecksContract re-export from aztec.js, and the entries in the bundle/lazy providers.

Derived address

PUBLIC_CHECKS_ADDRESS = 0x0ed9aa9b8262bd0afb923764799e058ad10cf0de3e01dcf955055b11fdb20d70

(class id 0x1853dc3b22d13d7fb93a089c366125098bf0f4a169255e12fc3765b3c08c3b6d matches the prior protocol-contract class id for PublicChecks; only the address moves from the magic 6 to the artifact-derived value.)

Test plan

  • Local: yarn workspace @aztec/canonical-contracts test — all 15 tests pass (auth_registry, multi_call_entrypoint, and public_checks freshness gates).
  • Local: nargo compile --package {public_checks_contract,app_subscription_contract,crowdfunding_contract} — all succeed.
  • Local: noir-projects/scripts/public_checks_cycle_guard.shpublic_checks cycle guard: ok.
  • CI: e2e suites covering crowdfunding/subscription public checks usage.

Copy link
Copy Markdown
Contributor Author

dbanks12 commented May 12, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@dbanks12 dbanks12 changed the base branch from dbanks12/demote-multicall-entrypoint to graphite-base/23199 May 12, 2026 16:06
@dbanks12 dbanks12 changed the base branch from graphite-base/23199 to dbanks12/demote-multicall-entrypoint May 12, 2026 16:09
@dbanks12 dbanks12 marked this pull request as draft May 12, 2026 16:09
@dbanks12 dbanks12 force-pushed the dbanks12/demote-multicall-entrypoint branch from 997ab10 to 2ce0150 Compare May 12, 2026 17:27
@dbanks12 dbanks12 force-pushed the dbanks12/demote-public-checks branch from 7103a75 to 36d801c Compare May 12, 2026 17:27
@dbanks12 dbanks12 closed this May 12, 2026
@dbanks12 dbanks12 force-pushed the dbanks12/demote-public-checks branch from 10c3fc0 to 707496c Compare May 12, 2026 18:19
@dbanks12 dbanks12 merged commit 707496c into dbanks12/demote-multicall-entrypoint May 12, 2026
@dbanks12 dbanks12 force-pushed the dbanks12/demote-multicall-entrypoint branch from 2ce0150 to 0476d27 Compare May 12, 2026 18:19
@dbanks12 dbanks12 deleted the dbanks12/demote-public-checks branch May 12, 2026 18:19
@dbanks12 dbanks12 restored the dbanks12/demote-public-checks branch May 12, 2026 18:20
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