You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs-developers/docs/resources/migration_notes.md
+110-1Lines changed: 110 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,115 @@ Aztec is in active development. Each version may introduce breaking changes that
9
9
10
10
## TBD
11
11
12
+
### [Aztec.nr] Domain-separated tags on log emission
13
+
14
+
All logs emitted through the Aztec.nr framework now include a domain-separated tag at `fields[0]`. Each log category uses its own domain separator via `compute_log_tag(raw_tag, dom_sep)`:
15
+
16
+
-**Events** (`DOM_SEP__EVENT_LOG_TAG`): the event type ID is the raw tag.
17
+
-**Message delivery** (`DOM_SEP__UNCONSTRAINED_MSG_LOG_TAG`): the discovery tag is the raw tag.
18
+
-**Partial note completion logs** (`DOM_SEP__NOTE_COMPLETION_LOG_TAG`): the partial note's `commitment` field is the raw tag.
19
+
20
+
The low-level emit methods now take `tag` as an explicit first parameter and have been renamed with an `_unsafe` suffix. Previously the tag was included as `log[0]` — it has now been extracted into its own parameter, and `log` no longer contains it:
Prefer the higher-level APIs (`emit` for events, `MessageDelivery` for messages) which handle tagging automatically.
32
+
33
+
### [Aztec.nr] Public events no longer include the event type selector at the end of the payload
34
+
35
+
`emit_event_in_public` previously appended the event type selector as the last field. It now prepends a domain-separated tag at `fields[0]` instead. The payload after the tag contains only the serialized event fields.
36
+
37
+
If you were reading public event directly from node logs (i.e. via `node.getPublicLogs` and not via `wallet.getPublicEvents`), update your parsing:
### [Aztec.nr] Capsule operations are now addressed by scope
49
+
50
+
All capsule operations (`store`, `load`, `delete`, `copy`) and `CapsuleArray` now require a `scope: AztecAddress` parameter. This scopes capsule storage by address, providing isolation between different accounts within the same PXE.
51
+
52
+
Contracts that use `CapsuleArray` directly also need to update.
53
+
54
+
**Migration:**
55
+
56
+
```diff
57
+
- let array: CapsuleArray<Field> = CapsuleArray::at(contract_address, slot);
58
+
+ let array: CapsuleArray<Field> = CapsuleArray::at(contract_address, slot, scope);
59
+
```
60
+
61
+
The low-level capsule functions are similarly affected:
If you need to stick the old, scope-less behavior, and you are really sure that that's what you need to use, you can use `scope = AztecAddress::zero()`.
78
+
79
+
### [Aztec.nr]`process_message` utility function removed
80
+
81
+
The auto-generated `process_message` utility function has been removed. If you need to deliver offchain messages (messages not broadcast via onchain logs), use the `offchain_receive` utility function instead. This function is automatically injected by the `#[aztec]` macro and accepts messages into a persistent inbox scoped by recipient. These messages are then picked up and processed during `sync_state`.
82
+
83
+
**Impact**: Contracts that explicitly called `process_message` must switch to delivering messages via `offchain_receive` and letting `sync_state` handle processing.
84
+
85
+
### [Aztec.nr]`CustomMessageHandler` type signature changed
86
+
87
+
The `CustomMessageHandler` function type now receives an additional `scope: AztecAddress` parameter:
The `returnReceipt` option in deploy wait options has been removed. `DeployMethod.send()` now always returns an object with `contract`, `receipt`, and `instance` at the top level, provided the user waits for the transaction to be included.
104
+
105
+
The `DeployTxReceipt` and `DeployWaitOptions` types have been removed.
### [aztec.js]`isContractInitialized` is now `initializationStatus` tri-state enum
13
122
14
123
`ContractMetadata.isContractInitialized` has been renamed to `ContractMetadata.initializationStatus` and changed from `boolean | undefined` to a `ContractInitializationStatus` enum with values `INITIALIZED`, `UNINITIALIZED`, and `UNKNOWN`.
@@ -97,7 +206,7 @@ Most contracts are not affected, as the macro-generated `sync_state` and `proces
0 commit comments