chore: backport feat: allow setting additional scopes in nr tests (#22968) to v4-next#23057
Merged
nchamo merged 3 commits intobackport-to-v4-next-stagingfrom May 7, 2026
Merged
Conversation
…r tests' (with conflicts) Conflicted files (preserved as-is for review): - docs/docs-developers/docs/resources/migration_notes.md - noir-projects/aztec-nr/aztec/src/test/helpers/txe_oracles.nr - yarn-project/pxe/src/contract_function_simulator/oracle/private_execution.test.ts - yarn-project/stdlib/src/aztec-address/index.ts
After rebasing onto backport-to-v4-next-staging (which now includes the backport of #22889 'feat(txe): add tx private logs to tx side effects oracle'), only three files still need cross-PR-drift handling: - docs/docs-developers/docs/resources/migration_notes.md: keep just the two new TBD entries from #22968 (TXE `call_public_incognito` no longer takes `from`; `view_public_incognito` deprecated). The DeployMethod and aztec-up bundled-binary entries that the cherry-pick brought along belong to other PRs not yet backported (e.g. #22985). - yarn-project/pxe/src/contract_function_simulator/oracle/private_execution.test.ts: keep the v4-next-staging-specific tree-height imports (L1_TO_L2_MSG_TREE_HEIGHT, NOTE_HASH_TREE_HEIGHT, PUBLIC_DATA_TREE_HEIGHT) which are still in use here — #21577 removed them on next but hasn't been backported. Drop only NULL_MSG_SENDER_CONTRACT_ADDRESS (replaced by AztecAddress.NULL_MSG_SENDER). - yarn-project/stdlib/src/aztec-address/index.ts: keep both the existing eslint-disable comment and the new NULL_MSG_SENDER_CONTRACT_ADDRESS import. - noir-projects/aztec-nr/aztec/src/test/helpers/txe_oracles.nr: with #22889 backported, the imports now match next exactly — just drop NULL_MSG_SENDER_CONTRACT_ADDRESS.
9e14df0 to
929f1dc
Compare
The cherry-picked test files use a multi-line wrapping style that doesn't match v4-next-staging's noirfmt.toml (max_width=120 fits the calls on a single line). Run `nargo fmt`: - public_checks_contract/src/test.nr: collapse the four `env.view_public(public_checks.check_*(...))` calls onto one line. - scope_test_contract/src/main.nr: drop a stray blank line between test functions. - test_log_contract/src/test/tx_effects.nr and aztec-nr/aztec/src/test/helpers/txe_oracles.nr: collapse a few multi-line constructs onto one line. Both hunks come from the #22889 backport now on staging; fix here so my PR's CI passes against the merged base.
nchamo
approved these changes
May 7, 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.
Backport of #22968 ("feat: allow setting additional scopes in nr tests") to
backport-to-v4-next-staging.Rebased on top of latest staging (which now includes the backport of #22889 —
feat(txe): add tx private logs to tx side effects oracle). All conflicts handled in a single resolution commit.What
The PR adds
call_private_opts/view_private_opts(withCallPrivateOptions/ViewPrivateOptions) toTestEnvironment, letting tests grant access to additional account scopes when calling private functions. It also reshapes the TXE oracle ABI forprivate_call_new_flow/public_call_new_flowto take anOption<AztecAddress>forfrom, removescall_public_incognito's ignoredfromparameter, deprecatesview_public_incognito, and introducesAztecAddress.NULL_MSG_SENDERon the TS side.Conflicts handled (single commit)
After rebasing, four files still drifted vs
next:noir-projects/aztec-nr/aztec/src/test/helpers/txe_oracles.nr— with feat(txe): add tx private logs to tx side effects oracle #22889 now on staging, the imports here matchnextexactly aside fromNULL_MSG_SENDER_CONTRACT_ADDRESS. Just drop that one symbol (the PR removes its only use).docs/docs-developers/docs/resources/migration_notes.md— keep only the two new TBD entries from feat: allow setting additional scopes in nr tests #22968. The DeployMethod andaztec-upbundled-binary entries that the cherry-pick brought along belong to other PRs not yet backported (e.g. fix: better DeployMethod #22985); leave them out so those backports add them in their own PRs.yarn-project/pxe/src/contract_function_simulator/oracle/private_execution.test.ts— dropNULL_MSG_SENDER_CONTRACT_ADDRESS(replaced byAztecAddress.NULL_MSG_SENDER). KeepL1_TO_L2_MSG_TREE_HEIGHT,NOTE_HASH_TREE_HEIGHT,PUBLIC_DATA_TREE_HEIGHT— they're still in use on this branch since chore: remove old merkle trees #21577 hasn't been backported.yarn-project/stdlib/src/aztec-address/index.ts— keep both the existingeslint-disable @typescript-eslint/no-unsafe-declaration-mergingcomment and the newNULL_MSG_SENDER_CONTRACT_ADDRESSimport.Verification
nargo checkpasses for both Noir contracts the PR touches (scope_test_contract,public_checks_contract).Original PR: #22968