Skip to content

Commit

Permalink
migration notes fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Jan 22, 2025
1 parent f6e5fc7 commit 6dfa110
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions docs/docs/migration_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,31 @@ 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.

## TBD

### [Aztec.nr] Introduction of `Packable` trait
We have introduced a `Packable` trait that allows types to be serialized and deserialized with a focus on minimizing the size of the resulting Field array.
This is in contrast to the `Serialize` and `Deserialize` traits, which follows Noir's intrinsic serialization format.
This is a breaking change because we now require `Packable` trait implementation for any type that is to be stored in contract storage.

Example implementation of Packable trait for `U128` type from `noir::std`:

```
use crate::traits::{Packable, ToField};
let U128_PACKED_LEN: u32 = 1;
impl Packable<U128_PACKED_LEN> for U128 {
fn pack(self) -> [Field; U128_PACKED_LEN] {
[self.to_field()]
}
fn unpack(fields: [Field; U128_PACKED_LEN]) -> Self {
U128::from_integer(fields[0])
}
}
```

## 0.72.0
### Public logs replace unencrypted logs
Any log emitted from public is now known as a public log, rather than an unencrypted log. This means methods relating to these logs have been renamed e.g. in the pxe, archiver, txe:
Expand Down Expand Up @@ -41,29 +66,6 @@ This PR also renamed encrypted events to private events:
### [Aztec.nr] Removal of `getSiblingPath` oracle
Use `getMembershipWitness` oracle instead that returns both the sibling path and index.

### [Aztec.nr] Introduction of `Packable` trait
We have introduced a `Packable` trait that allows types to be serialized and deserialized with a focus on minimizing the size of the resulting Field array.
This is in contrast to the `Serialize` and `Deserialize` traits, which follows Noir's intrinsic serialization format.
This is a breaking change because we now require `Packable` trait implementation for any type that is to be stored in contract storage.

Example implementation of Packable trait for `U128` type from `noir::std`:

```
use crate::traits::{Packable, ToField};
let U128_PACKED_LEN: u32 = 1;
impl Packable<U128_PACKED_LEN> for U128 {
fn pack(self) -> [Field; U128_PACKED_LEN] {
[self.to_field()]
}
fn unpack(fields: [Field; U128_PACKED_LEN]) -> Self {
U128::from_integer(fields[0])
}
}
```

## 0.68.0
### [archiver, node, pxe] Remove contract artifacts in node and archiver and store function names instead
Contract artifacts were only in the archiver for debugging purposes. Instead function names are now (optionally) emitted
Expand Down

0 comments on commit 6dfa110

Please sign in to comment.