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
We used to have to do this because we only knew the context at runtime,
but since #6442 we
no longer need this. I'm also doing this for some other state vars, but
chose do to so in separate PRs as some of those changes are a bit
messier.
Copy file name to clipboardexpand all lines: docs/docs/migration_notes.md
+27-4
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,20 @@ Aztec is in full-speed development. Literally every version breaks compatibility
8
8
9
9
## TBD
10
10
11
+
### [aztec.nr] SharedImmutable renamings
12
+
13
+
`SharedImmutable::read_private` and `SharedImmutable::read_public` were renamed to simply `read`, since only one of these versions is ever available depending on the current context.
14
+
15
+
```diff
16
+
// In private
17
+
- let value = storage.my_var.read_private();
18
+
+ let value = storage.my_var.read();
19
+
20
+
// In public
21
+
- let value = storage.my_var.read_public();
22
+
+ let value = storage.my_var.read();
23
+
```
24
+
11
25
### [aztec.nr] SharedMutable renamings
12
26
13
27
`SharedMutable` getters (`get_current_value_in_public`, etc.) were renamed by dropping the `_in<public|private|unconstrained>` suffix, since only one of these versions is ever available depending on the current context.
@@ -27,10 +41,11 @@ Aztec is in full-speed development. Literally every version breaks compatibility
27
41
The `AztecAddress.random()` function now returns valid addresses, i.e. addresses that can receive encrypted messages and therefore have notes be sent to them. `AztecAddress.isValid()` was also added to check for validity of an address.
28
42
29
43
## 0.63.0
44
+
30
45
### [PXE] Note tagging and discovery
31
46
32
47
PXE's trial decryption of notes has been replaced in favor of a tagging and discovery approach. It is much more efficient and should scale a lot better as the network size increases, since
33
-
notes can now be discovered on-demand. For the time being, this means that accounts residing *on different PXE instances* should add senders to their contact list, so notes can be discovered
48
+
notes can now be discovered on-demand. For the time being, this means that accounts residing _on different PXE instances_ should add senders to their contact list, so notes can be discovered
34
49
(accounts created on the same PXE instance will be added as senders for each other by default)
### [Token contract] Partial notes related refactor
69
+
54
70
We've decided to replace the old "shield" flow with one leveraging partial notes.
55
71
This led to a removal of `shield` and `redeem_shield` functions and an introduction of `transfer_to_private`.
56
72
An advantage of the new approach is that only 1 tx is required and the API of partial notes is generally nicer.
57
73
For more information on partial notes refer to docs.
58
74
59
75
### [Token contract] Function naming changes
76
+
60
77
There have been a few naming changes done for improved consistency.
61
78
These are the renamings:
62
79
`transfer_public` --> `transfer_in_public`
@@ -65,7 +82,9 @@ These are the renamings:
65
82
`burn` --> `burn_private`
66
83
67
84
## 0.62.0
85
+
68
86
### [TXE] Single execution environment
87
+
69
88
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.
70
89
This ensures every single test runs in a consistent environment and allows for clearer test syntax:
71
90
@@ -74,6 +93,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.
78
98
79
99
### Uniqueness of L1 to L2 messages
@@ -115,18 +135,22 @@ The address now serves as someone's public key to encrypt incoming notes. An add
115
135
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.
### [l1-contracts] Inbox's MessageSent event emits global tree index
153
+
130
154
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.
131
155
132
156
## 0.57.0
@@ -135,8 +159,8 @@ Earlier `MessageSent` event in Inbox emitted a subtree index (index of the messa
135
159
136
160
PXE APIs have been refactored to better reflect the lifecycle of a Tx (`execute private -> simulate kernels -> simulate public (estimate gas) -> prove -> send`)
137
161
138
-
*`.simulateTx`: Now returns a `TxSimulationResult`, containing the output of private execution, kernel simulation and public simulation (optional).
139
-
*`.proveTx`: Now accepts the result of executing the private part of a transaction, so simulation doesn't have to happen again.
162
+
-`.simulateTx`: Now returns a `TxSimulationResult`, containing the output of private execution, kernel simulation and public simulation (optional).
163
+
-`.proveTx`: Now accepts the result of executing the private part of a transaction, so simulation doesn't have to happen again.
140
164
141
165
Thanks to this refactor, `ContractFunctionInteraction` has been updated to remove its internal cache and avoid bugs due to its mutable nature. As a result our type-safe interfaces now have to be used as follows:
142
166
@@ -153,7 +177,6 @@ It's still possible to use `.send()` as before, which will perform proving under
153
177
154
178
More changes are coming to these APIs to better support gas estimation mechanisms and advanced features.
155
179
156
-
157
180
### Changes to public calling convention
158
181
159
182
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.
Copy file name to clipboardexpand all lines: docs/docs/reference/developer_references/smart_contract_reference/storage/shared_state.md
+4-8
Original file line number
Diff line number
Diff line change
@@ -118,14 +118,10 @@ This function sets the immutable value. It must only be called once during contr
118
118
A `SharedImmutable`'s storage **must** only be set once via `initialize`. Attempting to override this by manually accessing the underlying storage slots breaks all properties of the data structure, rendering it useless.
119
119
:::
120
120
121
-
### `read_public`
121
+
### `read`
122
122
123
-
Returns the stored immutable value in a public execution context.
123
+
Returns the stored immutable value. This function is available in public, private and unconstrained contexts.
0 commit comments