Skip to content

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
claudebox/backport-22968-v4-next
May 7, 2026
Merged

chore: backport feat: allow setting additional scopes in nr tests (#22968) to v4-next#23057
nchamo merged 3 commits intobackport-to-v4-next-stagingfrom
claudebox/backport-22968-v4-next

Conversation

@AztecBot
Copy link
Copy Markdown
Collaborator

@AztecBot AztecBot commented May 7, 2026

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 #22889feat(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 (with CallPrivateOptions / ViewPrivateOptions) to TestEnvironment, letting tests grant access to additional account scopes when calling private functions. It also reshapes the TXE oracle ABI for private_call_new_flow / public_call_new_flow to take an Option<AztecAddress> for from, removes call_public_incognito's ignored from parameter, deprecates view_public_incognito, and introduces AztecAddress.NULL_MSG_SENDER on 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 match next exactly aside from NULL_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 and aztec-up bundled-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 — drop NULL_MSG_SENDER_CONTRACT_ADDRESS (replaced by AztecAddress.NULL_MSG_SENDER). Keep L1_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 existing eslint-disable @typescript-eslint/no-unsafe-declaration-merging comment and the new NULL_MSG_SENDER_CONTRACT_ADDRESS import.

Verification

  • nargo check passes for both Noir contracts the PR touches (scope_test_contract, public_checks_contract).
  • No conflict markers remain.

Original PR: #22968

@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels May 7, 2026
@nchamo nchamo self-assigned this May 7, 2026
nventuro and others added 2 commits May 7, 2026 20:17
…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.
@AztecBot AztecBot force-pushed the claudebox/backport-22968-v4-next branch from 9e14df0 to 929f1dc Compare May 7, 2026 20:19
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 nchamo marked this pull request as ready for review May 7, 2026 20:49
@nchamo nchamo requested a review from nventuro as a code owner May 7, 2026 20:49
@nchamo nchamo enabled auto-merge May 7, 2026 20:50
@nchamo nchamo merged commit add1e8c into backport-to-v4-next-staging May 7, 2026
12 of 17 checks passed
@nchamo nchamo deleted the claudebox/backport-22968-v4-next branch May 7, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants