feat!: demote auth registry to non-protocol contract#23106
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
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.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Mirrors the auth_registry demotion (PR #23106): - Moves the noir contract from contracts/protocol/ to contracts/canonical/. - Removes MULTI_CALL_ENTRYPOINT_ADDRESS from constants.nr / aztec_constants.hpp / constants_gen.pil and drops the entry from protocol_contracts.json so the contract is no longer treated as a protocol contract. - Adds a multi-call-entrypoint stamp sub-package under @aztec/canonical-contracts with TS-only address.gen.ts + freshness test (no Noir consumers of the address exist, so no Noir lib stamp is generated). - Migrates consumers from ProtocolContractAddress.MultiCallEntrypoint / @aztec/protocol-contracts/multi-call-entrypoint to MULTI_CALL_ENTRYPOINT_ADDRESS and @aztec/canonical-contracts/multi-call-entrypoint: DefaultMultiCallEntrypoint, AztecNodeService.getProtocolContractAddresses, and the embedded wallet bundle/lazy providers. - Drops the multi-call-entrypoint subdir from @aztec/protocol-contracts and the corresponding aztec.js re-export.
214e5c4 to
e5390ee
Compare
e5390ee to
b15e8d5
Compare
b15e8d5 to
d10c85a
Compare
d10c85a to
e5e600b
Compare
…with protocol-contracts pattern
…ucture - Decompose renderTsData into generateNames/generateSalts/generateAddresses/generateClassIdPreimages helpers, matching protocol-contracts pattern 1:1. - Restore privateFunctions in ContractData and emit StandardContractPrivateFunctions in the data file; makeStandardContract now reads from it instead of hardcoding []. Required for contracts that have private functions (e.g. MultiCallEntrypoint upstack).
… crate - Replace stale CANONICAL_AUTH_REGISTRY_ADDRESS references in aztec-nr authwit/auth.nr and test helpers with the demoted AUTH_REGISTRY_ADDRESS exported from the standard_addresses crate. - Add standard_addresses dep to aztec-nr/aztec/Nargo.toml. - Restore auth_registry_contract authwit imports to the pre-split aztec::authwit::auth path (the split lives in an upstack PR).
…-nr module The standard_addresses crate was originally introduced to break a dependency cycle, but the authwit split makes the cycle structurally impossible. Inline the generated address constants as a regular module in aztec-nr's aztec crate (and a twin in aztec_sublib, which cannot depend on aztec) instead of carrying a redundant single-file crate.
`generate_data.ts` now always regenerates `standard_contract_data.ts` plus the two Noir `standard_addresses.nr` twins, compares each rewritten file against its pre-write snapshot, and exits non-zero with a clear message if any drifted. The new content is written either way, so re-running `./bootstrap.sh` once more recompiles dependent Noir contracts against the freshly-stamped addresses. The TS output is normalized through prettier before comparison so the check doesn't false-positive on the bootstrap `format` step's later reformatting. A new `standard_contract_data.test.ts` is a second line of defense: it iterates `standardContracts[]`, re-derives each contract's data via the shared `contract_data.ts` module, and asserts the result matches the committed values. Skips gracefully (with a `console.warn`) when artifacts aren't built yet. Adding a new standard contract is still a one-row change in `standardContracts[]` — both the build-time check and the test pick it up automatically.
…le + only write on change Move rendering, prettier formatting, and write-if-changed plumbing out of `scripts/generate_data.ts` into a new `drift.ts` so the backup jest test can reuse the same pipeline. The drift test now compares the committed `standard_contract_data.ts` AND every committed `standard_addresses.nr` twin against freshly re-rendered output — previously it only re-derived per-field constants and never checked the Noir-side files. The generator no longer touches mtimes when content is unchanged: it renders in memory, compares against the existing bytes, and only writes (then exits non-zero) when something actually drifted.
Adds standard-contracts to the parallel `yarn generate` list in yarn-project/bootstrap.sh so the drift-detecting generator actually runs during `./bootstrap.sh build yarn-project`. Previously the package was in the workspace list but had no bootstrap wiring, so drift was only caught by the per-package jest test at CI test time. Expands the on-drift error to spell out the exact recovery sequence (noir-contracts rebuild -> yarn-project rebuild) and notes the rewritten files must be committed alongside the source change that triggered the drift.

Demotes auth_registry from protocol contract. Introduces canonical_addresses Noir crate and @aztec/canonical-contracts TS package.
Stacked on #23216.