feat(txe): allow authorizing cross-contract utility calls in nr tests#23064
Merged
nchamo merged 3 commits intoMay 8, 2026
Conversation
vezenovm
approved these changes
May 8, 2026
Comment on lines
+43
to
+44
|
|
||
| mod test; |
Contributor
There was a problem hiding this comment.
nit: prefer this at the top of the file
AztecBot
pushed a commit
that referenced
this pull request
May 8, 2026
Collaborator
|
✅ Successfully backported to backport-to-v4-next-staging #23080. |
nventuro
reviewed
May 8, 2026
| } | ||
| } | ||
|
|
||
| /// Authorizes cross-contract utility calls to the given target contracts during this call. |
Contributor
There was a problem hiding this comment.
loooooooooooooooooooooooooooooooong
| @@ -155,10 +156,27 @@ impl<let N: u32> CallPrivateOptions<N> { | |||
| /// Example usage includes accounts withdrawing from an escrow, which may require accessing the escrow's own notes | |||
| /// and secrets. | |||
| pub fn with_additional_scopes<let N_2: u32>( | |||
Contributor
There was a problem hiding this comment.
There should be docs (error page? idk) that tell you how to fix the issue when you run into it, incl. the fact that if in a test you can do this. They should also explain why this is not allowed by default.
This was referenced May 8, 2026
Thunkar
added a commit
that referenced
this pull request
May 9, 2026
## Summary CI3 on PR #23080 failed in the `noir-projects build` `prep` step because the new `nested_utility_contract/src/test.nr` (added by the backport of #23064 — feat(txe) authorize cross-contract utility calls) wasn't formatted by v4-next's pinned nargo. Three statements were committed multi-line that v4-next's `nargo fmt --check` wants on a single line. CI log: http://ci.aztec-labs.com/0ef270f34a64bc9b ## Fix Apply `nargo fmt` exactly per the CI diff: - `same_contract_utility_call_from_private_succeeds`: collapse the `let result: Field = env.call_private(...)` to one line. - `cross_contract_utility_call_from_utility_denied_by_default`: collapse the `env.execute_utility( ..., )` to one line. - `cross_contract_utility_call_from_private_denied_by_default`: collapse the `env.call_private( account, ..., )` to one line. The two `*_with_authorization` tests already use multi-line because their bodies are too wide for one line — left unchanged. ## Test plan - CI3 on PR #23080 should clear the `prep` step (`noir-projects build`) once this lands on `backport-to-v4-next-staging`. ClaudeBox log: https://claudebox.work/s/ea70ef48e7a85dfe?run=3
AztecBot
added a commit
that referenced
this pull request
May 9, 2026
BEGIN_COMMIT_OVERRIDE fix(aztec-up): Aztec installer does not shadow user installed binaries on PATH (#22902) fix: include sqlite binary in its npm package (#23039) chore: backport #23041 (add sendMessagesAs to wallet api schemas) to v4-next (#23081) chore: backport DeployMethod refactor (#22985) to v4-next (#23029) refactor(pxe): deduplicate tx hash lookups in MessageContextService (#23075) refactor(pxe): batch tagged private log queries across all secrets (#23048) refactor(pxe): batch log RPC calls in LogService.fetchLogsByTag (#23088) feat(aztec-nr): Initial handshake registry contract with non interactive handshake function (#22854) fix: add Tag.random() helper required by backported #23088 tests (#23094) chore: backport: fix(aztec-up): installer does not shadow user binaries on PATH (#22902) (#23060) chore: backport handshake registry contract (#22854) to v4-next (#23063) feat: deploy method refactor 2 (#23033) refactor(pxe): skip redundant getBlock RPC when querying at anchor block (#23100) port(v4-next): feat(docs): autogenerate node JSON-RPC API reference (#22543) (#23046) chore: backport feat: deploy method refactor 2 (#23033) to v4-next (#23103) port(v4-next): feat(ci): Snapshots for aztec-nr contract compilation failures and nargo expand (#23061) (#23104) feat(txe): allow authorizing cross-contract utility calls in nr tests (#23064) END_COMMIT_OVERRIDE
github-merge-queue Bot
pushed a commit
that referenced
this pull request
May 10, 2026
BEGIN_COMMIT_OVERRIDE fix: include sqlite binary in its npm package (#23039) fix: add sendMessagesAs to wallet api schemas (#23041) refactor(pxe): deduplicate tx hash lookups in MessageContextService (#23075) refactor(pxe): batch tagged private log queries across all secrets (#23048) refactor(pxe): batch log RPC calls in LogService.fetchLogsByTag (#23088) feat(pxe,nr): flesh out account stubs and don't exclude syncing for overrides (#23054) feat: deploy method refactor 2 (#23033) feat: fastForwardContractUpdate cheatcode for simulating contract updates (#22905) refactor(stdlib): consolidate find-function-by-selector helpers (#23008) feat(ci): Snapshots for aztec-nr contract compilation failures and nargo expand (#23061) chore: kv store test fully on vitest (#23096) refactor(pxe): skip redundant getBlock RPC when querying at anchor block (#23100) chore(playground): bump main chunk size limit 1750 → 1800 KB (#23107) feat(txe): allow authorizing cross-contract utility calls in nr tests (#23064) chore: bench public fns with emit repro (#23105) END_COMMIT_OVERRIDE
This was referenced May 12, 2026
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.
Why we are doing this
Noir tests using the TXE had no way to authorize cross-contract utility calls. #23007 added PXE execution hooks so JavaScript callers could authorize these calls, but the same mechanism wasn't wired up for the Noir test environment.
Our fix
Adds
with_authorized_utility_call_targetstoCallPrivateOptions,ViewPrivateOptions, and a newExecuteUtilityOptionsonTestEnvironment. Test authors can now pass a list of contracts allowed to receive cross-contract utility calls, mirroring what the PXE hooks provide for JavaScript tests.Fixes F-638