Commit add1e8c
authored
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` (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 #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 #22968. The DeployMethod and
`aztec-up` bundled-binary entries that the cherry-pick brought along
belong to other PRs not yet backported (e.g. #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 #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
12 files changed
Lines changed: 218 additions & 83 deletions
File tree
- docs/docs-developers/docs/resources
- noir-projects
- aztec-nr/aztec/src/test/helpers
- noir-contracts/contracts
- protocol/public_checks_contract/src
- test
- scope_test_contract/src
- test_log_contract/src/test
- yarn-project
- pxe/src/contract_function_simulator/oracle
- stdlib/src
- aztec-address
- hash
- txe/src
- oracle
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
12 | 32 | | |
13 | 33 | | |
14 | 34 | | |
| |||
Lines changed: 112 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
128 | 202 | | |
129 | 203 | | |
130 | 204 | | |
| |||
544 | 618 | | |
545 | 619 | | |
546 | 620 | | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
547 | 633 | | |
548 | 634 | | |
| 635 | + | |
549 | 636 | | |
550 | 637 | | |
551 | 638 | | |
552 | 639 | | |
553 | 640 | | |
554 | 641 | | |
555 | | - | |
| 642 | + | |
556 | 643 | | |
557 | 644 | | |
558 | 645 | | |
559 | 646 | | |
560 | 647 | | |
| 648 | + | |
561 | 649 | | |
562 | 650 | | |
563 | 651 | | |
| |||
571 | 659 | | |
572 | 660 | | |
573 | 661 | | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
574 | 674 | | |
575 | 675 | | |
| 676 | + | |
576 | 677 | | |
577 | 678 | | |
578 | 679 | | |
579 | 680 | | |
580 | 681 | | |
581 | 682 | | |
582 | | - | |
| 683 | + | |
583 | 684 | | |
584 | 685 | | |
585 | 686 | | |
586 | 687 | | |
587 | 688 | | |
| 689 | + | |
588 | 690 | | |
589 | 691 | | |
590 | 692 | | |
| |||
705 | 807 | | |
706 | 808 | | |
707 | 809 | | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
| 810 | + | |
713 | 811 | | |
714 | 812 | | |
715 | 813 | | |
716 | 814 | | |
717 | | - | |
| 815 | + | |
718 | 816 | | |
719 | 817 | | |
720 | 818 | | |
| |||
727 | 825 | | |
728 | 826 | | |
729 | 827 | | |
730 | | - | |
| 828 | + | |
| 829 | + | |
731 | 830 | | |
732 | 831 | | |
733 | 832 | | |
734 | 833 | | |
735 | 834 | | |
736 | | - | |
| 835 | + | |
737 | 836 | | |
738 | 837 | | |
739 | 838 | | |
| |||
743 | 842 | | |
744 | 843 | | |
745 | 844 | | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
| 845 | + | |
750 | 846 | | |
751 | | - | |
| 847 | + | |
752 | 848 | | |
753 | 849 | | |
754 | 850 | | |
755 | 851 | | |
756 | 852 | | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
| 853 | + | |
766 | 854 | | |
767 | 855 | | |
768 | 856 | | |
| |||
Lines changed: 12 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
| 39 | + | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | | - | |
67 | | - | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
| 112 | + | |
114 | 113 | | |
115 | 114 | | |
116 | 115 | | |
| |||
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 123 | + | |
132 | 124 | | |
133 | 125 | | |
134 | 126 | | |
| |||
217 | 209 | | |
218 | 210 | | |
219 | 211 | | |
220 | | - | |
221 | | - | |
| 212 | + | |
| 213 | + | |
222 | 214 | | |
223 | 215 | | |
224 | 216 | | |
225 | 217 | | |
226 | 218 | | |
| 219 | + | |
227 | 220 | | |
228 | 221 | | |
229 | 222 | | |
230 | 223 | | |
231 | | - | |
| 224 | + | |
232 | 225 | | |
233 | 226 | | |
234 | 227 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
0 commit comments