Skip to content

Commit d24175e

Browse files
authored
Merge branch 'backport-to-v4-next-staging' into claudebox/backport-22348-v4-next
2 parents e4bdb9b + 8630b41 commit d24175e

51 files changed

Lines changed: 1417 additions & 486 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy-staging-public.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,40 +26,39 @@ jobs:
2626
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
2727
fetch-depth: 0
2828

29-
- name: Read version from manifest
30-
id: manifest
31-
run: |
32-
VERSION=$(jq -r '."."' .release-please-manifest.json)
33-
echo "version=$VERSION"
34-
echo "version=$VERSION" >> $GITHUB_OUTPUT
35-
36-
- name: Poll for tag at HEAD
29+
- name: Poll for semver tag at HEAD
3730
id: poll-tag
3831
run: |
39-
# wait for tag to be pushed (either RC or stable release)
40-
VERSION="${{ steps.manifest.outputs.version }}"
4132
HEAD_SHA=$(git rev-parse HEAD)
4233
MAX_ATTEMPTS=60
43-
echo "Looking for tag matching v${VERSION} or v${VERSION}-rc.* at HEAD ($HEAD_SHA)"
34+
echo "Looking for any semver tag at HEAD ($HEAD_SHA)"
4435
4536
for i in $(seq 1 $MAX_ATTEMPTS); do
4637
git fetch --tags --force
4738
48-
TAG=$(git tag --points-at HEAD | grep -E "^v${VERSION}(-rc\.[0-9]+)?$" | sort -V | tail -n 1 || true)
39+
# Collect all valid semver tags pointing at HEAD
40+
SEMVER_TAGS=()
41+
for t in $(git tag --points-at HEAD); do
42+
if ci3/semver check "$t"; then
43+
SEMVER_TAGS+=("$t")
44+
fi
45+
done
4946
50-
if [ -n "$TAG" ]; then
47+
# If we found valid semver tags, pick the highest
48+
if [ ${#SEMVER_TAGS[@]} -gt 0 ]; then
49+
TAG=$(ci3/semver sort "${SEMVER_TAGS[@]}" | tail -n 1)
5150
echo "Found tag: $TAG"
5251
SEMVER="${TAG#v}"
5352
echo "tag=$TAG" >> $GITHUB_OUTPUT
5453
echo "semver=$SEMVER" >> $GITHUB_OUTPUT
5554
exit 0
5655
fi
5756
58-
echo "Attempt $i/$MAX_ATTEMPTS: No matching tag yet, waiting 10s..."
57+
echo "Attempt $i/$MAX_ATTEMPTS: No semver tag yet, waiting 10s..."
5958
sleep 10
6059
done
6160
62-
echo "Error: No tag found for v${VERSION} at HEAD after 10 minutes"
61+
echo "Error: No semver tag found at HEAD after 10 minutes"
6362
exit 1
6463
6564
wait-for-ci3:

docs/docs-developers/docs/foundational-topics/pxe/index.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,25 @@ The keystore securely stores cryptographic keys for registered accounts, includi
8787

8888
Oracles are pieces of data that are injected into a smart contract function from the client side. Learn more about [how oracles work](../../aztec-nr/framework-description/advanced/protocol_oracles.md).
8989

90+
## Oracle versioning
91+
92+
The set of oracles that the PXE exposes to private and utility functions is versioned, so that contracts can declare which oracles they expect to be available. Every contract compiled with `Aztec.nr` records the oracle version it was built against, and the PXE checks this version before executing any oracle call.
93+
94+
The version uses two components, `major.minor`, with the following compatibility rules:
95+
96+
- **`major`** must match exactly. A major bump is a breaking change — oracles were removed or their signatures changed — and a PXE on a different major cannot safely run the contract.
97+
- **`minor`** indicates additive changes (new oracles). The PXE uses a best-effort approach here: a contract compiled against a higher `minor` than the PXE supports is still allowed to run, and an error is only thrown if the contract actually invokes an oracle the PXE does not know about. In practice, a contract built with a newer Aztec.nr may not use any of the newly added oracles at all, in which case it runs fine on an older PXE.
98+
99+
The canonical version constants live in the PXE (`ORACLE_VERSION_MAJOR` / `ORACLE_VERSION_MINOR` in `yarn-project/pxe/src/oracle_version.ts`) and in Aztec.nr (`noir-projects/aztec-nr/aztec/src/oracle/version.nr`). The two are kept in lockstep as part of each release.
100+
101+
### Resolving a version mismatch
102+
103+
If you see an error like _"Oracle '…' not found. … The contract was compiled with Aztec.nr oracle version X.Y, but this private execution environment only supports up to A.B"_, the contract uses one or more oracles from a newer Aztec.nr than your PXE supports.
104+
105+
To fix it, upgrade the software that ships the PXE (sandbox, wallet, or whatever embeds `@aztec/pxe`) to a release whose Aztec.nr version is at least as new as the one the contract was compiled with.
106+
107+
If the PXE reports a version that _should_ include every oracle the contract needs but an oracle is still missing, that is a contract bug rather than a version problem and you should likely report it to the app developer.
108+
90109
## For developers
91110

92111
To learn how to develop on top of the PXE, refer to these guides:

docs/docs-participate/token/staking.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,18 @@ Slashing is managed through governance voting based on evidence collected both o
5656

5757
## Unstaking
5858

59-
When you want to withdraw your staked tokens, you must go through an unstaking process with a mandatory exit delay.
59+
When you want to withdraw your staked tokens, you must go through an unstaking process with mandatory delays.
6060

61-
#if(testnet)
62-
The exit delay for testnet is **2 days**.
63-
#else
64-
The exit delay for mainnet is **4 days**.
65-
#endif
61+
### Exit Delays
6662

67-
The exit delay exists to allow time for pending slashing conditions to be detected and to prevent validators from quickly exiting after misbehaving.
63+
| Delay Type | Alpha (Mainnet) | Testnet |
64+
|-----------|-----------------|---------|
65+
| **Staking Exit Delay** | 4 days | 2 days |
66+
| **Governance Withdrawal Delay** | ~38 days | ~1.6 days |
67+
68+
The **staking exit delay** is the minimum time after initiating withdrawal before you can claim your tokens. It allows time for pending slashing conditions to be detected.
69+
70+
If your tokens are deposited in the Governance Staking Escrow (GSE) for voting, the **governance withdrawal delay** also applies. This delay is calculated as `votingDelay/5 + votingDuration + executionDelay` to ensure voted-on proposals can be executed before voters exit. On mainnet this is approximately 38 days (0.6 + 7 + 30 days).
6871

6972
### How to Unstake
7073

docs/docs/networks.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ Not sure which network to use? Jump to our [Network Selection Guide](#network-se
4343
| **Fee Asset Handler** | N/A | [`0x5602c39a6e9c5ace589f64f754927bcda4f4bfc9`](https://sepolia.etherscan.io/address/0x5602c39a6e9c5ace589f64f754927bcda4f4bfc9) |
4444
| **Coin Issuer** | [`0x02fadf157d551aa6d761b2a2237d03af68e41ca6`](https://etherscan.io/address/0x02fadf157d551aa6d761b2a2237d03af68e41ca6) | [`0xe05d0a62045b4237556c1ec423e59eea9a24eaee`](https://sepolia.etherscan.io/address/0xe05d0a62045b4237556c1ec423e59eea9a24eaee) |
4545
| **Reward Distributor** | [`0x3d6a1b00c830c5f278fc5dfb3f6ff0b74db6dfe0`](https://etherscan.io/address/0x3d6a1b00c830c5f278fc5dfb3f6ff0b74db6dfe0) | [`0x030d2780e70f085c31d490268d3900d4cea16606`](https://sepolia.etherscan.io/address/0x030d2780e70f085c31d490268d3900d4cea16606) |
46-
| **Reward Booster** | [`0x7101a6703491a4d808aeabe9f62bc1dc6a20bdf4`](https://etherscan.io/address/0x7101a6703491a4d808aeabe9f62bc1dc6a20bdf4) | [`0x49711056D1EaDcDD3F2eF676DC8EA3F924fB916c`](https://sepolia.etherscan.io/address/0x49711056D1EaDcDD3F2eF676DC8EA3F924fB916c) |
46+
| **Reward Booster** | [`0x1cbb707bd7b4fd2bced6d96d84372fb428e93d80`](https://etherscan.io/address/0x1cbb707bd7b4fd2bced6d96d84372fb428e93d80) | [`0x49711056D1EaDcDD3F2eF676DC8EA3F924fB916c`](https://sepolia.etherscan.io/address/0x49711056D1EaDcDD3F2eF676DC8EA3F924fB916c) |
4747
| **Governance Proposer** | [`0x06ef1dcf87e419c48b94a331b252819fadbd63ef`](https://etherscan.io/address/0x06ef1dcf87e419c48b94a331b252819fadbd63ef) | [`0x01c7d4ca153748d2377968fef22894cb162e9480`](https://sepolia.etherscan.io/address/0x01c7d4ca153748d2377968fef22894cb162e9480) |
4848
| **Governance** | [`0x1102471eb3378fee427121c9efcea452e4b6b75e`](https://etherscan.io/address/0x1102471eb3378fee427121c9efcea452e4b6b75e) | [`0xcaf7447721447b22cd0076ac7c63877c3afd329f`](https://sepolia.etherscan.io/address/0xcaf7447721447b22cd0076ac7c63877c3afd329f) |
4949
| **Governance Staking Escrow** | [`0xa92ecfd0e70c9cd5e5cd76c50af0f7da93567a4f`](https://etherscan.io/address/0xa92ecfd0e70c9cd5e5cd76c50af0f7da93567a4f) | [`0xb6a38a51a6c1de9012f9d8ea9745ef957212eaac`](https://sepolia.etherscan.io/address/0xb6a38a51a6c1de9012f9d8ea9745ef957212eaac) |
5050
| **Staking Registry** | [`0x042dF8f42790d6943F41C25C2132400fd727f452`](https://etherscan.io/address/0x042dF8f42790d6943F41C25C2132400fd727f452) | [`0xC6EcC1832c8BF6a41c927BEb4E9ec610FBeDd1C2`](https://sepolia.etherscan.io/address/0xC6EcC1832c8BF6a41c927BEb4E9ec610FBeDd1C2) |
5151
| **Slash Factory** | N/A | [`0x9CF4a0094c8696d5110dd0f0cF3FA5deA174BB17`](https://sepolia.etherscan.io/address/0x9CF4a0094c8696d5110dd0f0cF3FA5deA174BB17) |
52-
| **Slasher** | [`0x91a3745c685c220595b997e53311ebf660144889`](https://etherscan.io/address/0x91a3745c685c220595b997e53311ebf660144889) | [`0xf6D0D42aCE06829bECB78C74F49879528fC632c1`](https://sepolia.etherscan.io/address/0xf6D0D42aCE06829bECB78C74F49879528fC632c1) |
53-
| **Tally Slashing Proposer** | [`0x7a318c3daa9f21f8fc8238c65755eb0394fbf189`](https://etherscan.io/address/0x7a318c3daa9f21f8fc8238c65755eb0394fbf189) | [`0x158eCC4B24675dc399031c7D144786e3da2060A8`](https://sepolia.etherscan.io/address/0x158eCC4B24675dc399031c7D144786e3da2060A8) |
54-
| **Honk Verifier** | N/A | [`0x800FbC88054ba6c228B7d822F1DCAf4d627E8F97`](https://sepolia.etherscan.io/address/0x800FbC88054ba6c228B7d822F1DCAf4d627E8F97) |
52+
| **Slasher** | [`0x64E6e9Bb9f1E33D319578B9f8a9C719Ca6D46eBb`](https://etherscan.io/address/0x64E6e9Bb9f1E33D319578B9f8a9C719Ca6D46eBb) | [`0xCF750B724558098E5db67B651f03a31AE2b252f4`](https://sepolia.etherscan.io/address/0xCF750B724558098E5db67B651f03a31AE2b252f4) |
53+
| **Tally Slashing Proposer** | [`0xa4a38fD0108C00983E75616b638Ff3321FD26958`](https://etherscan.io/address/0xa4a38fD0108C00983E75616b638Ff3321FD26958) | [`0x158eCC4B24675dc399031c7D144786e3da2060A8`](https://sepolia.etherscan.io/address/0x158eCC4B24675dc399031c7D144786e3da2060A8) |
54+
| **Honk Verifier** | [`0x70aedda427f26480d240bc0f4308cedec8d31348`](https://etherscan.io/address/0x70aedda427f26480d240bc0f4308cedec8d31348) | [`0x800FbC88054ba6c228B7d822F1DCAf4d627E8F97`](https://sepolia.etherscan.io/address/0x800FbC88054ba6c228B7d822F1DCAf4d627E8F97) |
5555
| **Register New Rollup Version Payload** | N/A | [`0x11f7Ab2324CA94af929A388477a7959E0108C3d6`](https://sepolia.etherscan.io/address/0x11f7Ab2324CA94af929A388477a7959E0108C3d6) |
56-
| **Slash Payload Cloneable** | N/A | [`0xe66d9eeBfF5490E6bfA263cF08028dE7d265321F`](https://sepolia.etherscan.io/address/0xe66d9eeBfF5490E6bfA263cF08028dE7d265321F) |
56+
| **Slash Payload Cloneable** | [`0xAA43220b7eb7c8Ffe75bc9C483f3C07b0a55B445`](https://etherscan.io/address/0xAA43220b7eb7c8Ffe75bc9C483f3C07b0a55B445) | [`0xe66d9eeBfF5490E6bfA263cF08028dE7d265321F`](https://sepolia.etherscan.io/address/0xe66d9eeBfF5490E6bfA263cF08028dE7d265321F) |
5757

5858
### L2 Contract Addresses
5959

docs/netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@
802802
[[redirects]]
803803
# PXE: incompatible oracle version between contract and PXE
804804
from = "/errors/8"
805-
to = "/developers/docs/foundational-topics/pxe"
805+
to = "/developers/docs/foundational-topics/pxe#oracle-versioning"
806806

807807
[[redirects]]
808808
# CLI: aztec dep version in Nargo.toml does not match the CLI version
Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
/// The ORACLE_VERSION constant is used to check that the oracle interface is in sync between PXE and Aztec.nr. We need
2-
/// to version the oracle interface to ensure that developers get a reasonable error message if they use incompatible
3-
/// versions of Aztec.nr and PXE. The TypeScript counterpart is in `oracle_version.ts`.
1+
/// The oracle version constants are used to check that the oracle interface is in sync between PXE and Aztec.nr.
2+
/// We version the oracle interface as `major.minor` where:
3+
/// - `major` = backward-breaking changes (must match exactly between PXE and Aztec.nr)
4+
/// - `minor` = oracle additions (non-breaking; PXE minor >= contract minor)
5+
///
6+
/// The TypeScript counterparts are in `oracle_version.ts`.
47
///
58
/// @dev Whenever a contract function or Noir test is run, the `aztec_utl_assertCompatibleOracleVersion` oracle is
6-
/// called and if the oracle version is incompatible an error is thrown.
7-
pub global ORACLE_VERSION: Field = 22;
9+
/// called. If the major version is incompatible, an error is thrown immediately. The minor version is recorded by
10+
/// the PXE and used to provide helpful error messages if a contract calls an oracle that doesn't exist. We don't throw
11+
/// immediately if AZTEC_NR_MINOR > PXE_MINOR because if a contract is updated to use a newer Aztec.nr dependency
12+
/// without actually using any of the new oracles then there is no reason to throw.
13+
pub global ORACLE_VERSION_MAJOR: Field = 22;
14+
pub global ORACLE_VERSION_MINOR: Field = 0;
815

916
/// Asserts that the version of the oracle is compatible with the version expected by the contract.
1017
pub fn assert_compatible_oracle_version() {
@@ -16,23 +23,23 @@ pub fn assert_compatible_oracle_version() {
1623
}
1724

1825
unconstrained fn assert_compatible_oracle_version_wrapper() {
19-
assert_compatible_oracle_version_oracle(ORACLE_VERSION);
26+
assert_compatible_oracle_version_oracle(ORACLE_VERSION_MAJOR, ORACLE_VERSION_MINOR);
2027
}
2128

22-
#[oracle(aztec_utl_assertCompatibleOracleVersion)]
23-
unconstrained fn assert_compatible_oracle_version_oracle(version: Field) {}
29+
#[oracle(aztec_utl_assertCompatibleOracleVersionV2)]
30+
unconstrained fn assert_compatible_oracle_version_oracle(major: Field, minor: Field) {}
2431

2532
mod test {
26-
use super::{assert_compatible_oracle_version_oracle, ORACLE_VERSION};
33+
use super::{assert_compatible_oracle_version_oracle, ORACLE_VERSION_MAJOR, ORACLE_VERSION_MINOR};
2734

2835
#[test]
2936
unconstrained fn compatible_oracle_version() {
30-
assert_compatible_oracle_version_oracle(ORACLE_VERSION);
37+
assert_compatible_oracle_version_oracle(ORACLE_VERSION_MAJOR, ORACLE_VERSION_MINOR);
3138
}
3239

3340
#[test(should_fail_with = "Incompatible aztec cli version:")]
34-
unconstrained fn incompatible_oracle_version() {
35-
let arbitrary_incorrect_version = 318183437;
36-
assert_compatible_oracle_version_oracle(arbitrary_incorrect_version);
41+
unconstrained fn incompatible_oracle_version_major() {
42+
let arbitrary_incorrect_major = 318183437;
43+
assert_compatible_oracle_version_oracle(arbitrary_incorrect_major, ORACLE_VERSION_MINOR);
3744
}
3845
}

noir-projects/aztec-nr/aztec/src/test/helpers/test_environment/test/misc.nr

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
use crate::{oracle::version::ORACLE_VERSION, test::helpers::test_environment::TestEnvironment};
1+
use crate::{
2+
oracle::version::{ORACLE_VERSION_MAJOR, ORACLE_VERSION_MINOR},
3+
test::helpers::test_environment::TestEnvironment,
4+
};
25
use std::test::OracleMock;
36

47
#[test]
@@ -39,10 +42,10 @@ unconstrained fn private_public_and_utility_context_share_default_chain_id() {
3942

4043
#[test]
4144
unconstrained fn oracle_version_is_checked_upon_env_creation() {
42-
let mock = OracleMock::mock("aztec_utl_assertCompatibleOracleVersion");
45+
let mock = OracleMock::mock("aztec_utl_assertCompatibleOracleVersionV2");
4346

4447
let _env = TestEnvironment::new();
4548

4649
assert_eq(mock.times_called(), 1);
47-
assert_eq(mock.get_last_params::<Field>(), ORACLE_VERSION);
50+
assert_eq(mock.get_last_params::<(Field, Field)>(), (ORACLE_VERSION_MAJOR, ORACLE_VERSION_MINOR));
4851
}
Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
/// The ORACLE_VERSION constant is used to check that the oracle interface is in sync between PXE and Aztec.nr. We need
2-
/// to version the oracle interface to ensure that developers get a reasonable error message if they use incompatible
3-
/// versions of Aztec.nr and PXE. The TypeScript counterpart is in `oracle_version.ts`.
1+
/// The oracle version constants are used to check that the oracle interface is in sync between PXE and Aztec.nr.
2+
/// We version the oracle interface as `major.minor` where:
3+
/// - `major` = backward-breaking changes (must match exactly between PXE and Aztec.nr)
4+
/// - `minor` = oracle additions (non-breaking; PXE minor >= contract minor)
5+
///
6+
/// The TypeScript counterparts are in `oracle_version.ts`.
47
///
58
/// @dev Whenever a contract function or Noir test is run, the `aztec_utl_assertCompatibleOracleVersion` oracle is
6-
/// called and if the oracle version is incompatible an error is thrown.
7-
pub global ORACLE_VERSION: Field = 21;
9+
/// called. If the major version is incompatible, an error is thrown immediately. The minor version is recorded by
10+
/// the PXE and used to provide helpful error messages if a contract calls an oracle that doesn't exist. We don't throw
11+
/// immediately if AZTEC_NR_MINOR > PXE_MINOR because if a contract is updated to use a newer Aztec.nr dependency
12+
/// without actually using any of the new oracles then there is no reason to throw.
13+
pub global ORACLE_VERSION_MAJOR: Field = 22;
14+
pub global ORACLE_VERSION_MINOR: Field = 0;
815

916
/// Asserts that the version of the oracle is compatible with the version expected by the contract.
1017
pub fn assert_compatible_oracle_version() {
@@ -16,23 +23,23 @@ pub fn assert_compatible_oracle_version() {
1623
}
1724

1825
unconstrained fn assert_compatible_oracle_version_wrapper() {
19-
assert_compatible_oracle_version_oracle(ORACLE_VERSION);
26+
assert_compatible_oracle_version_oracle(ORACLE_VERSION_MAJOR, ORACLE_VERSION_MINOR);
2027
}
2128

22-
#[oracle(aztec_utl_assertCompatibleOracleVersion)]
23-
unconstrained fn assert_compatible_oracle_version_oracle(version: Field) {}
29+
#[oracle(aztec_utl_assertCompatibleOracleVersionV2)]
30+
unconstrained fn assert_compatible_oracle_version_oracle(major: Field, minor: Field) {}
2431

2532
mod test {
26-
use super::{assert_compatible_oracle_version_oracle, ORACLE_VERSION};
33+
use super::{assert_compatible_oracle_version_oracle, ORACLE_VERSION_MAJOR, ORACLE_VERSION_MINOR};
2734

2835
#[test]
2936
unconstrained fn compatible_oracle_version() {
30-
assert_compatible_oracle_version_oracle(ORACLE_VERSION);
37+
assert_compatible_oracle_version_oracle(ORACLE_VERSION_MAJOR, ORACLE_VERSION_MINOR);
3138
}
3239

3340
#[test(should_fail_with = "Incompatible aztec cli version:")]
34-
unconstrained fn incompatible_oracle_version() {
35-
let arbitrary_incorrect_version = 318183437;
36-
assert_compatible_oracle_version_oracle(arbitrary_incorrect_version);
41+
unconstrained fn incompatible_oracle_version_major() {
42+
let arbitrary_incorrect_major = 318183437;
43+
assert_compatible_oracle_version_oracle(arbitrary_incorrect_major, ORACLE_VERSION_MINOR);
3744
}
3845
}

noir-projects/noir-contracts/contracts/test/note_getter_contract/src/main.nr

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use aztec::macros::aztec;
2+
mod packed_note;
23

34
/// Used to test note getter in e2e_note_getter.test.ts
45
#[aztec]
@@ -16,9 +17,12 @@ pub contract NoteGetter {
1617

1718
use field_note::FieldNote;
1819

20+
use crate::packed_note::PackedNote;
21+
1922
#[storage]
2023
struct Storage<Context> {
2124
set: Owned<PrivateSet<FieldNote, Context>, Context>,
25+
packed_set: Owned<PrivateSet<PackedNote, Context>, Context>,
2226
}
2327

2428
#[external("private")]
@@ -42,4 +46,42 @@ pub contract NoteGetter {
4246
));
4347
notes.map(|note| note.value)
4448
}
49+
50+
#[external("private")]
51+
fn insert_packed_note(high: u8, low: u8) {
52+
let owner = self.msg_sender();
53+
let note = PackedNote { high, low };
54+
55+
self.storage.packed_set.at(owner).insert(note).deliver(MessageDelivery.ONCHAIN_CONSTRAINED);
56+
}
57+
58+
#[external("utility")]
59+
unconstrained fn select_packed_notes_by_high(
60+
owner: AztecAddress,
61+
comparator: u8,
62+
value: Field,
63+
) -> BoundedVec<[u8; 2], 10> {
64+
let selector = PackedNote::high_selector();
65+
let notes = self.storage.packed_set.at(owner).view_notes(NoteViewerOptions::new().select(
66+
selector,
67+
comparator,
68+
value,
69+
));
70+
notes.map(|note: PackedNote| [note.high, note.low])
71+
}
72+
73+
#[external("utility")]
74+
unconstrained fn select_packed_notes_by_low(
75+
owner: AztecAddress,
76+
comparator: u8,
77+
value: Field,
78+
) -> BoundedVec<[u8; 2], 10> {
79+
let selector = PackedNote::low_selector();
80+
let notes = self.storage.packed_set.at(owner).view_notes(NoteViewerOptions::new().select(
81+
selector,
82+
comparator,
83+
value,
84+
));
85+
notes.map(|note: PackedNote| [note.high, note.low])
86+
}
4587
}

0 commit comments

Comments
 (0)