Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add migration notes to recent address changes and npk_m comment fixes #9645

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions docs/docs/migration_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords: [sandbox, aztec, notes, migration, updating, upgrading]

Aztec is in full-speed development. Literally every version breaks compatibility with the previous ones. This page attempts to target errors and difficulties you might encounter when upgrading, and how to resolve them.

## 0.X.X
## 0.62.0
### [TXE] Single execution environment
Thanks to recent advancements in Brillig TXE performs every single call as if it was a nested call, spawning a new ACVM or AVM simulator without performance loss.
This ensures every single test runs in a consistent environment and allows for clearer test syntax:
Expand All @@ -18,7 +18,7 @@ This ensures every single test runs in a consistent environment and allows for c
```
This implies every contract has to be deployed before it can be tested (via `env.deploy` or `env.deploy_self`) and of course it has to be recompiled if its code was changed before TXE can use the modified bytecode.

### Unique of L1 to L2 messages
### Uniqueness of L1 to L2 messages

L1 to L2 messages have been updated to guarantee their uniqueness. This means that the hash of an L1 to L2 message cannot be precomputed, and must be obtained from the `MessageSent` event emitted by the `Inbox` contract, found in the L1 transaction receipt that inserted the message:

Expand Down Expand Up @@ -48,6 +48,25 @@ getL1ToL2MessageMembershipWitness(
): Promise<[bigint, SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>] | undefined>;
```

### Address is now a point

The address now serves as someone's public key to encrypt incoming notes. An address point has a corresponding address secret, which is used to decrypt the notes encrypted with the address point.

### Notes no longer store a hash of the nullifier public keys, and now store addresses

Because of removing key rotation, we can now store addresses as the owner of a note. Because of this and the above change, we can and have removed the process of registering a recipient, because now we do not need any keys of the recipient.

example_note.nr
```diff
-npk_m_hash: Field
+owner: AztecAddress
```

PXE Interface
```diff
-registerRecipient(completeAddress: CompleteAddress)
```

## 0.58.0
### [l1-contracts] Inbox's MessageSent event emits global tree index
Earlier `MessageSent` event in Inbox emitted a subtree index (index of the message in the subtree of the l2Block). But the nodes and Aztec.nr expects the index in the global L1_TO_L2_MESSAGES_TREE. So to make it easier to parse this, Inbox now emits this global index.
Expand Down
1 change: 0 additions & 1 deletion noir-projects/aztec-nr/address-note/src/address_note.nr
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use dep::aztec::{
#[derive(Serialize)]
pub struct AddressNote {
address: AztecAddress,
// The nullifying public key hash is used with the nsk_app to ensure that the note can be privately spent.
owner: AztecAddress,
randomness: Field,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use dep::aztec::{

#[note]
pub struct SubscriptionNote {
// The nullifying public key hash is used with the nsk_app to ensure that the note can be privately spent.
owner: AztecAddress,
expiry_block_number: Field,
remaining_txs: Field,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use dep::aztec::{
pub struct NFTNote {
// ID of the token
token_id: Field,
// The nullifying public key hash is used with the nsk_app to ensure that the note can be privately spent.
// The owner of the note
owner: AztecAddress,
// Randomness of the note to hide its contents
randomness: Field,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ trait OwnedNote {
pub struct TokenNote {
// The amount of tokens in the note
amount: U128,
// The nullifying public key hash is used with the nsk_app to ensure that the note can be privately spent.
// The owner of the note
owner: AztecAddress,
// Randomness of the note to hide its contents
randomness: Field,
Expand Down
Loading