Skip to content

Commit 6c9db81

Browse files
committed
fix: resolve cherry-pick conflicts for PR #21427
Resolved conflicts in: - migration_notes.md: kept only init_hash migration note - constants_tests.nr: added DOM_SEP__PRIVATE_INITIALIZATION_NULLIFIER import, tester size <51, 45> - private_execution.test.ts: merged imports from both sides
1 parent 86b1e89 commit 6c9db81

3 files changed

Lines changed: 7 additions & 53 deletions

File tree

docs/docs-developers/docs/resources/migration_notes.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Aztec is in active development. Each version may introduce breaking changes that
99

1010
## TBD
1111

12-
<<<<<<< HEAD
13-
=======
1412
### Private initialization nullifier now includes `init_hash`
1513

1614
The private initialization nullifier is no longer derived from just the contract address. It is now computed as a Poseidon2 hash of `[address, init_hash]` using a dedicated domain separator. This prevents observers from determining whether a fully private contract has been initialized by simply knowing its address.
@@ -27,29 +25,6 @@ If you use `assert_contract_was_initialized_by` or `assert_contract_was_not_init
2725
+ instance.initialization_hash,
2826
);
2927
```
30-
31-
### [Aztec.js] `TxReceipt` now includes `epochNumber`
32-
33-
`TxReceipt` now includes an `epochNumber` field that indicates which epoch the transaction was included in.
34-
35-
### [Aztec.js] `computeL2ToL1MembershipWitness` signature changed
36-
37-
The function signature has changed to resolve the epoch internally from a transaction hash, rather than requiring the caller to pass the epoch number.
38-
39-
**Migration:**
40-
41-
```diff
42-
- const witness = await computeL2ToL1MembershipWitness(aztecNode, epochNumber, messageHash);
43-
- // epoch was passed in by the caller
44-
+ const witness = await computeL2ToL1MembershipWitness(aztecNode, messageHash, txHash);
45-
+ // epoch is now available on the returned witness
46-
+ const epoch = witness.epochNumber;
47-
```
48-
49-
The return type `L2ToL1MembershipWitness` now includes `epochNumber`. An optional `messageIndexInTx` parameter can be passed as the fourth argument to disambiguate when a transaction emits multiple identical L2-to-L1 messages.
50-
51-
**Impact**: All call sites that compute L2-to-L1 membership witnesses must update to the new argument order and extract `epochNumber` from the result instead of passing it in.
52-
>>>>>>> 1c9652ad04 (feat!: include init_hash in private initialization nullifier to prevent privacy leak (#21427))
5328
### Two separate init nullifiers for private and public
5429

5530
Contract initialization now emits two separate nullifiers instead of one: a **private init nullifier** and a **public init nullifier**. Each nullifier gates its respective execution domain:

noir-projects/noir-protocol-circuits/crates/types/src/constants_tests.nr

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,15 @@ use crate::{
1313
DOM_SEP__MESSAGE_NULLIFIER, DOM_SEP__NHK_M, DOM_SEP__NOTE_HASH, DOM_SEP__NOTE_HASH_NONCE,
1414
DOM_SEP__NOTE_NULLIFIER, DOM_SEP__OVSK_M, DOM_SEP__PARTIAL_ADDRESS,
1515
DOM_SEP__PARTIAL_NOTE_VALIDITY_COMMITMENT, DOM_SEP__PRIVATE_FUNCTION_LEAF,
16-
<<<<<<< HEAD
17-
DOM_SEP__PRIVATE_LOG_FIRST_FIELD, DOM_SEP__PRIVATE_TX_HASH, DOM_SEP__PROTOCOL_CONTRACTS,
18-
DOM_SEP__PUBLIC_BYTECODE, DOM_SEP__PUBLIC_CALLDATA,
19-
DOM_SEP__PUBLIC_INITIALIZATION_NULLIFIER, DOM_SEP__PUBLIC_KEYS_HASH,
20-
DOM_SEP__PUBLIC_LEAF_SLOT, DOM_SEP__PUBLIC_STORAGE_MAP_SLOT, DOM_SEP__PUBLIC_TX_HASH,
21-
DOM_SEP__SECRET_HASH, DOM_SEP__SIGNATURE_PAYLOAD, DOM_SEP__SILOED_NOTE_HASH,
22-
DOM_SEP__SILOED_NULLIFIER, DOM_SEP__SYMMETRIC_KEY, DOM_SEP__SYMMETRIC_KEY_2, DOM_SEP__TSK_M,
23-
DOM_SEP__TX_NULLIFIER, DOM_SEP__TX_REQUEST, DOM_SEP__UNIQUE_NOTE_HASH,
24-
NULL_MSG_SENDER_CONTRACT_ADDRESS, SIDE_EFFECT_MASKING_ADDRESS, TX_START_PREFIX,
25-
=======
2616
DOM_SEP__PRIVATE_INITIALIZATION_NULLIFIER, DOM_SEP__PRIVATE_LOG_FIRST_FIELD,
2717
DOM_SEP__PRIVATE_TX_HASH, DOM_SEP__PROTOCOL_CONTRACTS, DOM_SEP__PUBLIC_BYTECODE,
2818
DOM_SEP__PUBLIC_CALLDATA, DOM_SEP__PUBLIC_INITIALIZATION_NULLIFIER,
2919
DOM_SEP__PUBLIC_KEYS_HASH, DOM_SEP__PUBLIC_LEAF_SLOT, DOM_SEP__PUBLIC_STORAGE_MAP_SLOT,
3020
DOM_SEP__PUBLIC_TX_HASH, DOM_SEP__SECRET_HASH, DOM_SEP__SIGNATURE_PAYLOAD,
31-
DOM_SEP__SILOED_NOTE_HASH, DOM_SEP__SILOED_NULLIFIER, DOM_SEP__SINGLE_USE_CLAIM_NULLIFIER,
32-
DOM_SEP__SYMMETRIC_KEY, DOM_SEP__SYMMETRIC_KEY_2, DOM_SEP__TSK_M, DOM_SEP__TX_NULLIFIER,
33-
DOM_SEP__TX_REQUEST, DOM_SEP__UNIQUE_NOTE_HASH, NULL_MSG_SENDER_CONTRACT_ADDRESS,
34-
SIDE_EFFECT_MASKING_ADDRESS, TX_START_PREFIX,
35-
>>>>>>> 1c9652ad04 (feat!: include init_hash in private initialization nullifier to prevent privacy leak (#21427))
21+
DOM_SEP__SILOED_NOTE_HASH, DOM_SEP__SILOED_NULLIFIER, DOM_SEP__SYMMETRIC_KEY,
22+
DOM_SEP__SYMMETRIC_KEY_2, DOM_SEP__TSK_M, DOM_SEP__TX_NULLIFIER, DOM_SEP__TX_REQUEST,
23+
DOM_SEP__UNIQUE_NOTE_HASH, NULL_MSG_SENDER_CONTRACT_ADDRESS, SIDE_EFFECT_MASKING_ADDRESS,
24+
TX_START_PREFIX,
3625
},
3726
hash::poseidon2_hash_bytes,
3827
traits::{FromField, ToField},
@@ -142,11 +131,7 @@ impl<let NUM_VALUES: u32, let NUM_U32_VALUES: u32> HashedValueTester<NUM_VALUES,
142131

143132
#[test]
144133
fn hashed_values_match_derived() {
145-
<<<<<<< HEAD
146-
let mut tester = HashedValueTester::<51, 44>::new();
147-
=======
148-
let mut tester = HashedValueTester::<53, 46>::new();
149-
>>>>>>> 1c9652ad04 (feat!: include init_hash in private initialization nullifier to prevent privacy leak (#21427))
134+
let mut tester = HashedValueTester::<51, 45>::new();
150135

151136
// -----------------
152137
// Domain separators

yarn-project/pxe/src/contract_function_simulator/oracle/private_execution.test.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ import { computeAppNullifierHidingKey, deriveKeys } from '@aztec/stdlib/keys';
4848
import type { SiloedTag } from '@aztec/stdlib/logs';
4949
import { L1Actor, L1ToL2Message, L2Actor } from '@aztec/stdlib/messaging';
5050
import { Note, NoteDao } from '@aztec/stdlib/note';
51-
<<<<<<< HEAD
52-
import { makeBlockHeader, makeL2Tips } from '@aztec/stdlib/testing';
53-
import { AppendOnlyTreeSnapshot } from '@aztec/stdlib/trees';
51+
import { makeBlockHeader, makeL2Tips, randomContractInstanceWithAddress } from '@aztec/stdlib/testing';
52+
import { AppendOnlyTreeSnapshot, MerkleTreeId } from '@aztec/stdlib/trees';
5453
import {
5554
BlockHeader,
5655
HashedValues,
@@ -60,12 +59,7 @@ import {
6059
TxExecutionRequest,
6160
TxHash,
6261
} from '@aztec/stdlib/tx';
63-
=======
64-
import { makeBlockHeader, makeL2Tips, randomContractInstanceWithAddress } from '@aztec/stdlib/testing';
65-
import { MerkleTreeId } from '@aztec/stdlib/trees';
66-
import { BlockHeader, HashedValues, TxContext, TxExecutionRequest, TxHash } from '@aztec/stdlib/tx';
6762
import { NativeWorldStateService } from '@aztec/world-state';
68-
>>>>>>> 1c9652ad04 (feat!: include init_hash in private initialization nullifier to prevent privacy leak (#21427))
6963

7064
import { jest } from '@jest/globals';
7165
import { Matcher, type MatcherCreator, type MockProxy, mock } from 'jest-mock-extended';

0 commit comments

Comments
 (0)