feat(standard-contracts): prototype C++-driven address derivation in bb#23350
Draft
dbanks12 wants to merge 1 commit into
Draft
feat(standard-contracts): prototype C++-driven address derivation in bb#23350dbanks12 wants to merge 1 commit into
dbanks12 wants to merge 1 commit into
Conversation
This was referenced May 17, 2026
Contributor
Author
b0499ec to
e7d380e
Compare
872a671 to
780ddd9
Compare
Adds a new `bb derive_standard_contract_addresses` subcommand that reads freshly-built Noir artifacts and stamps the standard-contract addresses into `standard_addresses.nr` (in both the aztec-nr/aztec crate and the aztec_sublib twin) before the rest of noir-contracts compiles against them. This breaks the build-order chicken-and-egg in the current TS-based generator: the TS generator depends on the yarn-project build, but the addresses need to be baked in before noir-contracts finishes. For auth_registry and public_checks the derived address is byte-identical to the TS-derived one (verified against the existing pinned values). Known prototype limitations: - `artifact_hash` and `private_functions_root` are READ from a sidecar manifest (`standard_contract_class_id_preimages.json`) instead of being derived from the artifact in C++. Porting their TS derivation (sha256-reduced-to-Fr merkle over selectors + metadata hashes, plus deterministic-JSON-stringify of contract outputs) is the natural follow-up. - Bootstrap integration only handles auth_registry + public_checks; extending to multi_call_entrypoint is mechanical. - The TS generator (`generate:data`) is left in place as a drift check — it still produces the same `standard_addresses.nr`, so any divergence fails the build loudly.
e7d380e to
d4b0653
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Please read contributing guidelines and remove this line.
For audit-related pull requests, please use the audit PR template.