Skip to content

Commit be597f9

Browse files
authored
feat: merge-train/docs (#17909)
BEGIN_COMMIT_OVERRIDE fix(docs): update links in how_to_define_storage.md to include aztec version (#17904) chore(docs): Remove protocol specs from next (#17911) END_COMMIT_OVERRIDE
2 parents 93a47fc + 647cf0e commit be597f9

File tree

385 files changed

+14
-44596
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

385 files changed

+14
-44596
lines changed

docs/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ yarn-error.log*
2828

2929
/docs/developers/reference/aztecjs
3030
/docs/developers/reference/smart_contract_reference/aztec-nr
31-
/docs/docs/protocol-specs/public-vm/gen
3231
test-results
3332

3433
!CLAUDE.md

docs/CLAUDE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ For development:
5656

5757
- **Developer Guides** (`/developers/`) - Getting started, tutorials, references
5858
- **Aztec Concepts** (`/aztec/`) - Core protocol concepts and architecture
59-
- **Protocol Specs** (`/protocol-specs/`) - Detailed technical specifications
6059
- **Network Guides** (`/the_aztec_network/`) - Node operation and network participation
6160

6261
### Versioning System

docs/docs/developers/docs/guides/smart_contracts/how_to_define_storage.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ All private storage operates on note types rather than arbitrary data types. Lea
9898

9999
PrivateMutable is a private state variable that is unique in a way. When a PrivateMutable is initialized, a note is created to represent its value. Updating the value means to destroy the current note, and to create a new one with the updated value.
100100

101-
Like for public state, we define the struct to have context and a storage slot. You can view the implementation [here](https://github.com/AztecProtocol/aztec-packages/blob/master/noir-projects/smart-contracts/aztec/src/state_vars/private_mutable.nr).
101+
Like for public state, we define the struct to have context and a storage slot. You can view the implementation [here](https://github.com/AztecProtocol/aztec-packages/blob/#include_aztec_version/noir-projects/aztec-nr/aztec/src/state_vars/private_mutable.nr).
102102

103103
An example of `PrivateMutable` usage in contracts is keeping track of important values. The `PrivateMutable` is added to the `Storage` struct as follows:
104104

@@ -116,17 +116,18 @@ Unlike public states, which have a default initial value of `0` (or many zeros,
116116

117117
#### `is_initialized`
118118

119-
An unconstrained method to check whether the PrivateMutable has been initialized or not. It takes an optional owner and returns a boolean. You can view the implementation [here (GitHub link)](https://github.com/AztecProtocol/aztec-packages/blob/#include_aztec_version/noir-projects/smart-contracts/aztec/src/state_vars/private_mutable.nr).
119+
An unconstrained method to check whether the PrivateMutable has been initialized or not. It takes an optional owner and returns a boolean. You can view the implementation [here (GitHub link)](https://github.com/AztecProtocol/aztec-packages/blob/#include_aztec_version/noir-projects/aztec-nr/aztec/src/state_vars/private_mutable.nr).
120120

121121
```rust
122122
let is_initialized = my_value.is_initialized();
123123
```
124-
s
124+
125125
#### `replace`
126126

127127
To update the value of a `PrivateMutable`, we can use the `replace` method. The method takes a function (or closure) that transforms the current note into a new one.
128128

129129
When called, the method will:
130+
130131
- Nullify the old note
131132
- Apply the transform function to produce a new note
132133
- Insert the new note into the data tree
@@ -168,7 +169,7 @@ Functionally similar to [`get_note`](#get_note), but executed in unconstrained f
168169

169170
### PrivateImmutable
170171

171-
`PrivateImmutable` represents a unique private state variable that, as the name suggests, is immutable. Once initialized, its value cannot be altered. You can view the implementation [here (GitHub link)](https://github.com/AztecProtocol/aztec-packages/blob/#include_aztec_version/noir-projects/smart-contracts/aztec/src/state_vars/private_immutable.nr).
172+
`PrivateImmutable` represents a unique private state variable that, as the name suggests, is immutable. Once initialized, its value cannot be altered. You can view the implementation [here (GitHub link)](https://github.com/AztecProtocol/aztec-packages/blob/#include_aztec_version/noir-projects/aztec-nr/aztec/src/state_vars/private_immutable.nr).
172173

173174
#### `initialize`
174175

@@ -198,7 +199,7 @@ Once initialized, an PrivateImmutable's value remains unchangeable. This method
198199

199200
#### `is_initialized`
200201

201-
An unconstrained method to check if the PrivateImmutable has been initialized. Takes an optional owner and returns a boolean. You can find the implementation [here (GitHub link)](https://github.com/AztecProtocol/aztec-packages/blob/#include_aztec_version/noir-projects/smart-contracts/aztec/src/state_vars/private_immutable.nr).
202+
An unconstrained method to check if the PrivateImmutable has been initialized. Takes an optional owner and returns a boolean. You can find the implementation [here (GitHub link)](https://github.com/AztecProtocol/aztec-packages/blob/#include_aztec_version/noir-projects/aztec-nr/aztec/src/state_vars/private_immutable.nr).
202203

203204
#### `get_note`
204205

@@ -284,7 +285,7 @@ let mut options = NoteViewerOptions::new();
284285
let notes = set.view_notes(options.set_offset(offset));
285286
```
286287

287-
There's also a limit on the maximum number of notes that can be returned in one go. To find the current limit, refer to [this file (GitHub link)](https://github.com/AztecProtocol/aztec-packages/blob/#include_aztec_version/noir-projects/smart-contracts/aztec/src/note/constants.nr) and look for `MAX_NOTES_PER_PAGE`.
288+
There's also a limit on the maximum number of notes that can be returned in one go. To find the current limit, refer to [this file (GitHub link)](https://github.com/AztecProtocol/aztec-packages/blob/#include_aztec_version/noir-projects/aztec-nr/aztec/src/note/constants.nr) and look for `MAX_NOTES_PER_PAGE`.
288289

289290
The key distinction is that this method is unconstrained. It does not perform a check to verify if the notes actually exist, which is something the [`get_notes`](#get_notes) method does under the hood. Therefore, it should only be used in an unconstrained contract function.
290291

@@ -304,7 +305,7 @@ Both types are generic over any serializable type `T`, allowing you to store sim
304305
Store mutable public state using `PublicMutable<T>` for values that need to be updated throughout the contract's lifecycle.
305306

306307
:::info
307-
An example using a larger struct can be found in the [lending example](https://github.com/AztecProtocol/aztec-packages/tree/master/noir-projects/noir-contracts/contracts/app/lending_contract)'s use of an [`Asset`](https://github.com/AztecProtocol/aztec-packages/tree/#include_aztec_version/noir-projects/noir-contracts/contracts/app/lending_contract/src/asset.nr).
308+
An example using a larger struct can be found in the [lending example](https://github.com/AztecProtocol/aztec-packages/tree/#include_aztec_version/noir-projects/noir-contracts/contracts/app/lending_contract)'s use of an [`Asset`](https://github.com/AztecProtocol/aztec-packages/tree/#include_aztec_version/noir-projects/noir-contracts/contracts/app/lending_contract/src/asset.nr).
308309
:::
309310

310311
For example, to add `config_value` public state variable into our storage struct, we can define it as:
@@ -346,7 +347,7 @@ Just like the `PublicMutable` it is generic over the variable type `T`. The type
346347
my_public_immutable: PublicImmutable<MyStruct, Context>,
347348
```
348349

349-
You can find the details of `PublicImmutable` in the implementation [here (GitHub link)](https://github.com/AztecProtocol/aztec-packages/blob/#include_aztec_version/noir-projects/smart-contracts/aztec/src/state_vars/public_immutable.nr).
350+
You can find the details of `PublicImmutable` in the implementation [here (GitHub link)](https://github.com/AztecProtocol/aztec-packages/blob/#include_aztec_version/noir-projects/aztec-nr/aztec/src/state_vars/public_immutable.nr).
350351

351352
#### `new`
352353

@@ -405,7 +406,7 @@ Delayed Public Mutable state works around this by introducing **delays**:
405406

406407
- Instead, a value change is be scheduled ahead of time, and some minimum amount of time must pass between the scheduling and the new value taking effect.
407408
- This means that we can privately prove that a historical public value cannot possibly change before some point in the future (due to the minimum delay), and therefore that our transaction will be valid **as long as it gets included before this future time**.
408-
- In other words, we're saying "this value is public but can't change until ___".
409+
- In other words, we're saying "this value is public but can't change until \_\_\_".
409410

410411
This results in the following key properties of `DelayedPublicMutable` state:
411412

docs/docs/protocol-specs/addresses-and-keys/address.md

Lines changed: 0 additions & 95 deletions
This file was deleted.

docs/docs/protocol-specs/addresses-and-keys/diversified-and-stealth.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)