Skip to content

Commit

Permalink
update migration notes
Browse files Browse the repository at this point in the history
  • Loading branch information
fcarreiro committed Oct 3, 2024
1 parent c791ceb commit 0be1d99
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions docs/docs/migration_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ Aztec is in full-speed development. Literally every version breaks compatibility

## TBD

### Changes to public calling convention

Contracts that include public functions (that is, marked with `#[public]`), are required to have a function `public_dispatch(selector: Field)` which acts as an entry point. This will be soon the only public function registered/deployed in contracts. The calling convention is updated so that external calls are made to this function.

If you are writing your contracts using Aztec-nr, there is nothing you need to change. The `public_dispatch` function is automatically generated by the `#[aztec]` macro.

### [Aztec.js] Removed `L2Block.fromFields`

`L2Block.fromFields` was a syntactic sugar which is causing [issues](https://github.com/AztecProtocol/aztec-packages/issues/8340) so we've removed it.

```diff
Expand Down Expand Up @@ -43,7 +50,7 @@ All of `TestEnvironment`'s functions are now `unconstrained`, preventing acciden

### [Aztec.nr] removed `encode_and_encrypt_note` and renamed `encode_and_encrypt_note_with_keys` to `encode_and_encrypt_note`

````diff
`````diff
contract XYZ {
- use dep::aztec::encrypted_logs::encrypted_note_emission::encode_and_encrypt_note_with_keys;
+ use dep::aztec::encrypted_logs::encrypted_note_emission::encode_and_encrypt_note;
Expand Down Expand Up @@ -211,7 +218,7 @@ Public keys (ivpk, ovpk, npk, tpk) should no longer be fetched using the old `ge
+let owner_keys = get_current_public_keys(&mut context, owner);
+let owner_ivpk_m = owner_keys.ivpk_m;
+let owner_ovpk_m = owner_keys.ovpk_m;
````
`````

If using more than one key per account, this will result in very large circuit gate count reductions.

Expand Down

0 comments on commit 0be1d99

Please sign in to comment.