Skip to content
This repository was archived by the owner on Jul 10, 2026. It is now read-only.

Commit 12e3714

Browse files
authored
chore: release dev to main (#356)
# 🤖 Linear Closes AZT-XXX ## Description
2 parents 12da8ee + 1cade05 commit 12e3714

25 files changed

Lines changed: 475 additions & 791 deletions

File tree

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@defi-wonderland/aztec-standards",
3-
"version": "4.3.0",
3+
"version": "5.0.0-rc.1",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/defi-wonderland/aztec-standards.git"
@@ -26,15 +26,15 @@
2626
"*.ts": "prettier --write -u"
2727
},
2828
"dependencies": {
29-
"@aztec/accounts": "4.3.0",
30-
"@aztec/aztec.js": "4.3.0",
31-
"@aztec/noir-contracts.js": "4.3.0",
32-
"@aztec/protocol-contracts": "4.3.0",
33-
"@aztec/pxe": "4.3.0",
34-
"@aztec/stdlib": "4.3.0",
35-
"@aztec/wallet-sdk": "4.3.0",
36-
"@aztec/wallets": "4.3.0",
37-
"@defi-wonderland/aztec-benchmark": "4.3.0",
29+
"@aztec/accounts": "5.0.0-rc.1",
30+
"@aztec/aztec.js": "5.0.0-rc.1",
31+
"@aztec/noir-contracts.js": "5.0.0-rc.1",
32+
"@aztec/protocol-contracts": "5.0.0-rc.1",
33+
"@aztec/pxe": "5.0.0-rc.1",
34+
"@aztec/stdlib": "5.0.0-rc.1",
35+
"@aztec/wallet-sdk": "5.0.0-rc.1",
36+
"@aztec/wallets": "5.0.0-rc.1",
37+
"@defi-wonderland/aztec-benchmark": "5.0.0-rc.1",
3838
"commander": "14.0.1",
3939
"dotenv": "16.4.7"
4040
},
@@ -50,7 +50,7 @@
5050
"vitest": "4.0.17"
5151
},
5252
"config": {
53-
"aztecVersion": "4.3.0"
53+
"aztecVersion": "5.0.0-rc.1"
5454
},
5555
"engines": {
5656
"node": ">=22"

scripts/deploy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ export async function deployContracts(options: CLIOptions, config: DeploymentCon
408408
const node = createAztecNodeClient(nodeUrl);
409409
const isLocalNetwork = config.network.name === 'local-network';
410410
const wallet = await EmbeddedWallet.create(nodeUrl, {
411-
pxeConfig: {
411+
pxe: {
412412
proverEnabled: !isLocalNetwork,
413413
dataDirectory: config.deployer.dataDirectory,
414414
dataStoreMapSizeKb: 1e6,

src/dripper/Nargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ compiler_version = ">=1.0.0"
55
type = "contract"
66

77
[dependencies]
8-
aztec = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v4.3.0", directory = "noir-projects/aztec-nr/aztec" }
8+
aztec = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v5.0.0-rc.1", directory = "noir-projects/aztec-nr/aztec" }
99
token = { path = "../token_contract" }

src/escrow_contract/Nargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ compiler_version = ">=1.0.0"
55
type = "contract"
66

77
[dependencies]
8-
aztec = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v4.3.0", directory = "noir-projects/aztec-nr/aztec" }
9-
serde = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v4.3.0", directory = "noir-projects/noir-protocol-circuits/crates/serde" }
8+
aztec = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v5.0.0-rc.1", directory = "noir-projects/aztec-nr/aztec" }
9+
serde = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v5.0.0-rc.1", directory = "noir-projects/noir-protocol-circuits/crates/serde" }
1010
token = { path = "../token_contract" }
1111
nft = { path = "../nft_contract" }
1212
sha512 = { git = "https://github.com/noir-lang/sha512", tag = "mv/use-bool-over-u1" }

src/escrow_contract/src/key_derivation.nr

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ use bignum::bignum::BigNum;
22
use bignum::U512;
33
use sha512::sha512;
44

5-
use aztec::protocol::constants::{DOM_SEP__IVSK_M, DOM_SEP__NHK_M, DOM_SEP__OVSK_M, DOM_SEP__TSK_M};
6-
use aztec::protocol::point::Point;
7-
use aztec::protocol::public_keys::{IvpkM, NpkM, OvpkM, PublicKeys, TpkM};
5+
use aztec::protocol::constants::{
6+
DEFAULT_FBPK_M_HASH, DEFAULT_MSPK_M_HASH, DOM_SEP__IVSK_M, DOM_SEP__NHK_M, DOM_SEP__OVSK_M,
7+
DOM_SEP__TSK_M,
8+
};
9+
use aztec::protocol::point::EmbeddedCurvePoint;
10+
use aztec::protocol::public_keys::{hash_public_key, IvpkM, PublicKeys};
811
use std::embedded_curve_ops::{EmbeddedCurveScalar, fixed_base_scalar_mul};
912

1013
pub use crate::types::master_secret_keys::MasterSecretKeys;
@@ -141,16 +144,18 @@ pub fn derive_keys(secret_key: Field) -> MasterSecretKeys {
141144
/// @param master_secret_keys The master secret keys
142145
/// @return PublicKeys containing the derived public keys.
143146
pub fn master_secret_keys_to_public_keys(master_secret_keys: MasterSecretKeys) -> PublicKeys {
144-
let npk_m: Point = fixed_base_scalar_mul(master_secret_keys.nhk_m).into();
145-
let ivpk_m: Point = fixed_base_scalar_mul(master_secret_keys.ivsk_m).into();
146-
let ovpk_m: Point = fixed_base_scalar_mul(master_secret_keys.ovsk_m).into();
147-
let tpk_m: Point = fixed_base_scalar_mul(master_secret_keys.tsk_m).into();
147+
let npk_m: EmbeddedCurvePoint = fixed_base_scalar_mul(master_secret_keys.nhk_m);
148+
let ivpk_m: EmbeddedCurvePoint = fixed_base_scalar_mul(master_secret_keys.ivsk_m);
149+
let ovpk_m: EmbeddedCurvePoint = fixed_base_scalar_mul(master_secret_keys.ovsk_m);
150+
let tpk_m: EmbeddedCurvePoint = fixed_base_scalar_mul(master_secret_keys.tsk_m);
148151

149152
PublicKeys {
150-
npk_m: NpkM { inner: npk_m },
153+
npk_m_hash: hash_public_key(npk_m),
151154
ivpk_m: IvpkM { inner: ivpk_m },
152-
ovpk_m: OvpkM { inner: ovpk_m },
153-
tpk_m: TpkM { inner: tpk_m },
155+
ovpk_m_hash: hash_public_key(ovpk_m),
156+
tpk_m_hash: hash_public_key(tpk_m),
157+
mspk_m_hash: DEFAULT_MSPK_M_HASH,
158+
fbpk_m_hash: DEFAULT_FBPK_M_HASH,
154159
}
155160
}
156161

src/escrow_contract/src/library/logic.nr

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
use aztec::{
33
context::PrivateContext,
44
event::event_emission::emit_event_in_private,
5-
messages::message_delivery::MessageDelivery,
5+
messages::delivery::MessageDelivery,
66
protocol::{
77
address::AztecAddress,
88
contract_class_id::ContractClassId,
@@ -41,6 +41,7 @@ pub fn _get_escrow(
4141
deployer: AztecAddress::from_field(0),
4242
contract_class_id: ContractClassId::from_field(escrow_class_id),
4343
initialization_hash: 0,
44+
immutables_hash: 0,
4445
public_keys: computed_public_keys,
4546
};
4647

@@ -64,7 +65,7 @@ pub fn _share_escrow(
6465

6566
emit_event_in_private(context, event_struct).deliver_to(
6667
account,
67-
MessageDelivery.ONCHAIN_CONSTRAINED,
68+
MessageDelivery::onchain_constrained(),
6869
);
6970
}
7071

src/escrow_contract/src/test/test_logic_contract/Nargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ compiler_version = ">=1.0.0"
55
type = "contract"
66

77
[dependencies]
8-
aztec = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v4.3.0", directory = "noir-projects/aztec-nr/aztec" }
8+
aztec = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v5.0.0-rc.1", directory = "noir-projects/aztec-nr/aztec" }
99
escrow_contract = { path = "../../../" }
1010
token = { path = "../../../../token_contract" }
1111
nft = { path = "../../../../nft_contract" }

src/escrow_contract/src/test/test_logic_contract/src/test/secret_key_to_public_keys.nr

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,27 @@ unconstrained fn secret_key_to_public_keys_success() {
1818
TestLogic::at(logic_contract_address).secret_key_to_public_keys(secret_key_1),
1919
);
2020

21-
assert_eq(vector_public_keys_1.npk_m.inner.x, public_keys_1.npk_m.inner.x);
22-
assert_eq(vector_public_keys_1.npk_m.inner.y, public_keys_1.npk_m.inner.y);
21+
assert_eq(vector_public_keys_1.npk_m_hash, public_keys_1.npk_m_hash);
2322
assert_eq(vector_public_keys_1.ivpk_m.inner.x, public_keys_1.ivpk_m.inner.x);
2423
assert_eq(vector_public_keys_1.ivpk_m.inner.y, public_keys_1.ivpk_m.inner.y);
25-
assert_eq(vector_public_keys_1.ovpk_m.inner.x, public_keys_1.ovpk_m.inner.x);
26-
assert_eq(vector_public_keys_1.ovpk_m.inner.y, public_keys_1.ovpk_m.inner.y);
27-
assert_eq(vector_public_keys_1.tpk_m.inner.x, public_keys_1.tpk_m.inner.x);
28-
assert_eq(vector_public_keys_1.tpk_m.inner.y, public_keys_1.tpk_m.inner.y);
24+
assert_eq(vector_public_keys_1.ovpk_m_hash, public_keys_1.ovpk_m_hash);
25+
assert_eq(vector_public_keys_1.tpk_m_hash, public_keys_1.tpk_m_hash);
26+
assert_eq(vector_public_keys_1.mspk_m_hash, public_keys_1.mspk_m_hash);
27+
assert_eq(vector_public_keys_1.fbpk_m_hash, public_keys_1.fbpk_m_hash);
2928
assert_eq(vector_public_keys_1, public_keys_1);
3029

3130
let public_keys_2 = env.call_private(
3231
caller,
3332
TestLogic::at(logic_contract_address).secret_key_to_public_keys(secret_key_2),
3433
);
3534

36-
assert_eq(vector_public_keys_2.npk_m.inner.x, public_keys_2.npk_m.inner.x);
37-
assert_eq(vector_public_keys_2.npk_m.inner.y, public_keys_2.npk_m.inner.y);
35+
assert_eq(vector_public_keys_2.npk_m_hash, public_keys_2.npk_m_hash);
3836
assert_eq(vector_public_keys_2.ivpk_m.inner.x, public_keys_2.ivpk_m.inner.x);
3937
assert_eq(vector_public_keys_2.ivpk_m.inner.y, public_keys_2.ivpk_m.inner.y);
40-
assert_eq(vector_public_keys_2.ovpk_m.inner.x, public_keys_2.ovpk_m.inner.x);
41-
assert_eq(vector_public_keys_2.ovpk_m.inner.y, public_keys_2.ovpk_m.inner.y);
42-
assert_eq(vector_public_keys_2.tpk_m.inner.x, public_keys_2.tpk_m.inner.x);
43-
assert_eq(vector_public_keys_2.tpk_m.inner.y, public_keys_2.tpk_m.inner.y);
38+
assert_eq(vector_public_keys_2.ovpk_m_hash, public_keys_2.ovpk_m_hash);
39+
assert_eq(vector_public_keys_2.tpk_m_hash, public_keys_2.tpk_m_hash);
40+
assert_eq(vector_public_keys_2.mspk_m_hash, public_keys_2.mspk_m_hash);
41+
assert_eq(vector_public_keys_2.fbpk_m_hash, public_keys_2.fbpk_m_hash);
4442
assert_eq(vector_public_keys_2, public_keys_2);
4543
}
4644

src/escrow_contract/src/test/test_logic_contract/src/test/utils.nr

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ use aztec::{
33
event::{event_interface::EventInterface, EventSelector},
44
protocol::{
55
address::AztecAddress,
6-
point::Point,
7-
public_keys::{IvpkM, NpkM, OvpkM, PublicKeys, TpkM},
6+
constants::{DEFAULT_FBPK_M_HASH, DEFAULT_MSPK_M_HASH},
7+
point::EmbeddedCurvePoint,
8+
public_keys::{IvpkM, PublicKeys},
89
traits::Serialize,
910
},
1011
test::helpers::test_environment::TestEnvironment,
@@ -56,10 +57,18 @@ pub unconstrained fn get_test_vector() -> (PublicKeys, Field, PublicKeys, Field)
5657
let tpk_y_1: Field = 0x1ef6fce001c800647bb2b7137517181306c713f671c0e65339dd11d57c863ee8;
5758

5859
let public_keys_1 = PublicKeys {
59-
npk_m: NpkM { inner: Point { x: npk_x_1, y: npk_y_1, is_infinite: false } },
60-
ivpk_m: IvpkM { inner: Point { x: ivpk_x_1, y: ivpk_y_1, is_infinite: false } },
61-
ovpk_m: OvpkM { inner: Point { x: ovpk_x_1, y: ovpk_y_1, is_infinite: false } },
62-
tpk_m: TpkM { inner: Point { x: tpk_x_1, y: tpk_y_1, is_infinite: false } },
60+
npk_m_hash: aztec::protocol::public_keys::hash_public_key(
61+
EmbeddedCurvePoint { x: npk_x_1, y: npk_y_1 },
62+
),
63+
ivpk_m: IvpkM { inner: EmbeddedCurvePoint { x: ivpk_x_1, y: ivpk_y_1 } },
64+
ovpk_m_hash: aztec::protocol::public_keys::hash_public_key(
65+
EmbeddedCurvePoint { x: ovpk_x_1, y: ovpk_y_1 },
66+
),
67+
tpk_m_hash: aztec::protocol::public_keys::hash_public_key(
68+
EmbeddedCurvePoint { x: tpk_x_1, y: tpk_y_1 },
69+
),
70+
mspk_m_hash: DEFAULT_MSPK_M_HASH,
71+
fbpk_m_hash: DEFAULT_FBPK_M_HASH,
6372
};
6473

6574
// Secret key 2: string "RANDOM_SECRET_KEY" left-padded to 32 bytes with spaces
@@ -76,10 +85,18 @@ pub unconstrained fn get_test_vector() -> (PublicKeys, Field, PublicKeys, Field)
7685
let tpk_y_2: Field = 0x0cc1c1631501a99ed1797f4d701df03c9663989fee1fb311266459b47f523e07;
7786

7887
let public_keys_2 = PublicKeys {
79-
npk_m: NpkM { inner: Point { x: npk_x_2, y: npk_y_2, is_infinite: false } },
80-
ivpk_m: IvpkM { inner: Point { x: ivpk_x_2, y: ivpk_y_2, is_infinite: false } },
81-
ovpk_m: OvpkM { inner: Point { x: ovpk_x_2, y: ovpk_y_2, is_infinite: false } },
82-
tpk_m: TpkM { inner: Point { x: tpk_x_2, y: tpk_y_2, is_infinite: false } },
88+
npk_m_hash: aztec::protocol::public_keys::hash_public_key(
89+
EmbeddedCurvePoint { x: npk_x_2, y: npk_y_2 },
90+
),
91+
ivpk_m: IvpkM { inner: EmbeddedCurvePoint { x: ivpk_x_2, y: ivpk_y_2 } },
92+
ovpk_m_hash: aztec::protocol::public_keys::hash_public_key(
93+
EmbeddedCurvePoint { x: ovpk_x_2, y: ovpk_y_2 },
94+
),
95+
tpk_m_hash: aztec::protocol::public_keys::hash_public_key(
96+
EmbeddedCurvePoint { x: tpk_x_2, y: tpk_y_2 },
97+
),
98+
mspk_m_hash: DEFAULT_MSPK_M_HASH,
99+
fbpk_m_hash: DEFAULT_FBPK_M_HASH,
83100
};
84101

85102
(public_keys_1, secret_key_1, public_keys_2, secret_key_2)

src/escrow_contract/src/test/test_logic_contract/src/test/withdraw.nr

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
use crate::test::utils as logic_utils;
22
use crate::TestLogic;
3+
use aztec::test::helpers::test_environment::CallPrivateOptions;
34
use escrow_contract::test::utils as escrow_utils;
45
use token::{test::utils as token_utils, Token};
56

6-
// TODO (reenable test): TXE scope enforcement means only the `from` address's notes are accessible during
7-
// private execution. The escrow's token notes are not in scope when called from the logic contract.
8-
// The TS tests handle this via `additionalScopes: [escrow.address]`, but TXE doesn't support it yet.
9-
// See: https://github.com/AztecProtocol/aztec-packages/blob/v4.2.0-aztecnr-rc.2/noir-projects/aztec-nr/aztec/src/test/helpers/test_environment.nr#L953-L954
10-
#[allow(dead_code)]
7+
#[test]
118
unconstrained fn withdraw_success() {
129
let (mut env, token, _owner, recipient, minter) = token_utils::setup_with_minter(false);
1310

@@ -23,7 +20,11 @@ unconstrained fn withdraw_success() {
2320
token_utils::check_private_balance(env, token, escrow, amount);
2421

2522
let caller = env.create_light_account();
26-
env.call_private(caller, TestLogic::at(logic).withdraw(escrow, recipient, token, amount));
23+
env.call_private_opts(
24+
caller,
25+
CallPrivateOptions::new().with_additional_scopes([escrow]),
26+
TestLogic::at(logic).withdraw(escrow, recipient, token, amount),
27+
);
2728

2829
// Check recipient got tokens
2930
token_utils::check_private_balance(env, token, recipient, amount);

0 commit comments

Comments
 (0)