@aztec/protocol-contracts 0.81.0 → 0.82.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,252 +3,6 @@
3
3
  "noir_version": "1.0.0-beta.3+0000000000000000000000000000000000000000",
4
4
  "name": "Router",
5
5
  "functions": [
6
- {
7
- "name": "process_log",
8
- "is_unconstrained": true,
9
- "custom_attributes": [],
10
- "abi": {
11
- "error_types": {
12
- "16775516380094354375": {
13
- "error_kind": "fmtstring",
14
- "item_types": [],
15
- "length": 40
16
- },
17
- "17843811134343075018": {
18
- "error_kind": "string",
19
- "string": "Stack too deep"
20
- }
21
- },
22
- "parameters": [
23
- {
24
- "name": "_log_ciphertext",
25
- "type": {
26
- "fields": [
27
- {
28
- "name": "storage",
29
- "type": {
30
- "kind": "array",
31
- "length": 18,
32
- "type": {
33
- "kind": "field"
34
- }
35
- }
36
- },
37
- {
38
- "name": "len",
39
- "type": {
40
- "kind": "integer",
41
- "sign": "unsigned",
42
- "width": 32
43
- }
44
- }
45
- ],
46
- "kind": "struct",
47
- "path": "std::collections::bounded_vec::BoundedVec"
48
- },
49
- "visibility": "private"
50
- },
51
- {
52
- "name": "_tx_hash",
53
- "type": {
54
- "kind": "field"
55
- },
56
- "visibility": "private"
57
- },
58
- {
59
- "name": "_unique_note_hashes_in_tx",
60
- "type": {
61
- "fields": [
62
- {
63
- "name": "storage",
64
- "type": {
65
- "kind": "array",
66
- "length": 64,
67
- "type": {
68
- "kind": "field"
69
- }
70
- }
71
- },
72
- {
73
- "name": "len",
74
- "type": {
75
- "kind": "integer",
76
- "sign": "unsigned",
77
- "width": 32
78
- }
79
- }
80
- ],
81
- "kind": "struct",
82
- "path": "std::collections::bounded_vec::BoundedVec"
83
- },
84
- "visibility": "private"
85
- },
86
- {
87
- "name": "_first_nullifier_in_tx",
88
- "type": {
89
- "kind": "field"
90
- },
91
- "visibility": "private"
92
- },
93
- {
94
- "name": "_recipient",
95
- "type": {
96
- "fields": [
97
- {
98
- "name": "inner",
99
- "type": {
100
- "kind": "field"
101
- }
102
- }
103
- ],
104
- "kind": "struct",
105
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
106
- },
107
- "visibility": "private"
108
- }
109
- ],
110
- "return_type": null
111
- },
112
- "bytecode": "H4sIAAAAAAAA/+Wc6XLbNhDHKZu0TcmyZPmK3Svp3bRpKYnU0dNt0/u+lM+KYz8HHyPta7Rf2qer/jFXWsHojDteTPxPMMOhpYV2f1wuARBYuBadl8nsqFV/x9V5vTrj+060XKTucXXOrla6hrqyUIw1AsYVAsZVAsaYgDEhYFwjYFwnYNwgYEwJGOsEjA0Cxk0CxiYB4xYBY4uAsU3AuB2AMQRnh4Rzx5BTj+1D8e5G1z9G9wgY9wkYDwgYbxAwHhIwHhEwPkPA+CwB43MEjM8TML5AwHiTgPEWAeOLBIwvETC+TMD4CgHjqwSMrxEwvk7A+AYB420CxjcJGN8iYLxDwPg2AeM7BIwZAWOXgLFHwNgnYMwJGAsCxgEB45CAcUTAOCZgfJeA8T0CxvcJGD8gYPyQgPEjAsZjAsaPCRg/IWD8lIDxLgHjZwSMnxMwfkHA+CUB41cEjF8TMH5DwPgtAeN3BIzfEzD+QMD4IwHjTwSMPxMw/hKAMQTnryScv5FwTgJxRvcc6JXZgY1b2BiFjUfY2IONM9iYgo0f2FiBjQvYGIDEeyS2I3G8PTuQ+IykYiTsIgkWSaZI4kSSJJIQkeSHJDokqSEJDElWSGJCktDN2XFrdiCJBEkaSIJAkgEW8bFIjkVoLPJiERWLlFgExCIbFrGwSISrwiIHFhEwSY9JcEwyYxIXk6SYhMQkHybRMEmFSSBMsmASQyYJ8JKLl0i8pOElCC8ZGMRjkIxBKAZ5GERhkIJBADpZdGLoJNAIo5FDI4KHFA8AgmsS/XeRIPmnOqfVeUXJDTfRdVPHrqX+UTa+n3quz5C/n1Y6N4LoL4aiPw3Dn8lG27vlQr++FrG7Wp0n5cKXk3KZSeo8VHUeOnXkesLc7zw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QDKjBAZWiAQAMkGnBBA3I0oEAD0CYrtMkKbbJCm0xokwltMqFNJrTJhDaZ0CYT2mRCm0xQk7eYnjpYXTtzNJxu8c2p8Myv0fx0nzEMjWmXYFIL+hag9BpzyQuZrp3sFWXGRVlESAS9AQ==",
114
- "brillig_names": [
115
- "process_log"
116
- ]
117
- },
118
- {
119
- "name": "sync_notes",
120
- "is_unconstrained": true,
121
- "custom_attributes": [],
122
- "abi": {
123
- "error_types": {
124
- "13649294680379557736": {
125
- "error_kind": "string",
126
- "string": "extend_from_bounded_vec out of bounds"
127
- },
128
- "14657895983200220173": {
129
- "error_kind": "string",
130
- "string": "Attempted to read past the length of a CapsuleArray"
131
- },
132
- "16761564377371454734": {
133
- "error_kind": "string",
134
- "string": "Array index out of bounds"
135
- },
136
- "16775516380094354375": {
137
- "error_kind": "fmtstring",
138
- "item_types": [],
139
- "length": 40
140
- },
141
- "16954218183513903507": {
142
- "error_kind": "string",
143
- "string": "Attempted to read past end of BoundedVec"
144
- },
145
- "17843811134343075018": {
146
- "error_kind": "string",
147
- "string": "Stack too deep"
148
- },
149
- "2920182694213909827": {
150
- "error_kind": "string",
151
- "string": "attempt to subtract with overflow"
152
- },
153
- "3305101268118424981": {
154
- "error_kind": "string",
155
- "string": "Attempted to delete past the length of a CapsuleArray"
156
- },
157
- "3367683922240523006": {
158
- "error_kind": "fmtstring",
159
- "item_types": [
160
- {
161
- "kind": "field"
162
- }
163
- ],
164
- "length": 58
165
- },
166
- "5019202896831570965": {
167
- "error_kind": "string",
168
- "string": "attempt to add with overflow"
169
- },
170
- "5727012404371710682": {
171
- "error_kind": "string",
172
- "string": "push out of bounds"
173
- },
174
- "6753155520859132764": {
175
- "error_kind": "string",
176
- "string": "Failed to deliver note"
177
- },
178
- "8830323656616886390": {
179
- "error_kind": "string",
180
- "string": "Got a public log emitted by a different contract"
181
- }
182
- },
183
- "parameters": [],
184
- "return_type": null
185
- },
186
- "bytecode": "H4sIAAAAAAAA/+1dW2xc13W9Q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KypnXVG56IrKRVdULrqictEVlYuuqFx0ReWiKyoXXVG56IrKRVdUrrqictUVlauuqFx1ReWqKypXXVG56orKVVdUrrqictUVlRXtpb3C0RWVFe15vcLRFZUV7U29wtEVlRXtIb3C0RWVFe31vMJRFZVZ0Z7MKxxVUZkV7Z28wlEVldmpisqsaN/iFY6qqMyK9hde4aiKyqxoH+AHHF17+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3tY117+1jX3j7WtbePde3t45fv7WM3frLnOIfz8qhc8gSH3SOc+eDq6Da2PiAPi2MvycBt7MWmT2MvZnr3+k2Db7LTG7EzGLEzGrGTjNiZjNiZjdhZjNhZjdhpJB/yRvIhbyQf8kbyIW8kH3r9lug32WkkH/JG8iHfTT6Ux7EfxeaCod0kRFuGdpMRbRgaukmJtgztJifaMrSbpGjLUD1Z0YCHlOHRk2UMePRkAwMePav2gEfP4jrg0bMGXvFEPUvVgEfPijLg0RP4BzzK4nNUFp9ffYpA8IVvg6lwer5QU6zj2EzTUF/d0gfff22N3m9kAP4CNI60JKr3LMD7dCMmg5hlYgqIWSamgphlYhjELBLz6nMv2iHGg5hlYgKIWSYmgphlYgjELBODzHeFGGS+K8Qg810hBpnvCjHIfJeJSch8V4hB5rtCDDLfFWKQ+a4QQyBmmRhkvivEIPNdIQaZ7woxyHxXiEHmu0xMRua7Qgwy3xVikPmuEIPMd4UYAjHLxCDzXSEGme8KMch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s5IJxofReQaeWgavOyvZAK85K9kErznT2ASvOXvYBK85I9gAH5zuun8DvO66fwO87rp/A3zDK2xwDa+wwTW8wgbX8Aob3KvjfBj7honqNvinXcbgXcvgvWrwT3tdwYeWwceWwVPL4JNi8CcW68FnK4YWK4ZWK4ZqzgjONDRozh5ONVRzpnGqobqzkueZeNCdlWyAp5bBa85KNsFrzjQ2wWvOHjbBa84INsHrrvufg4+66/4N8Lrr/g3wLa+wseUV9ozrtN8HvuUV9oyLTnOY8tbiNl4I9lRoxJP83VJfl0ZnGgfn5B/G+ht4Vg2+jC8G55rm4M+4clISvJ/A5wXwvmXwoWXwsWXw1DL41DL43DL4ohp8Hvdp5FwXwOteYTfA615hn4NPulfYDfC6V9gN8LpX2A3wulfYDfC6V9gN8LpX2A3wulfYDfAtr7Cp5RU2tbzCruxPiOOPXoUeNsTS7ZlFJ2caJ+KU5s/kHc+UHc/UHc8sCuidn375cw/U3Z6Ky2/xbj7ldz0Vdj0Vdz1Fu55Ku57Ku54qu56qu57a9d3wu74bftd3w+/6bvhd342VF6SeRYu4/K4RuzGGcVh45vs9Py6/L/F8nuVXDzaeCTueiTueoR0cpB3P5B3P7NGn7niGv/+Z5V/fNp5Z/h6k8XvNHwvxt8+EHc/EHc/QjmfSjmfyjmfKjme2vgdLz+z4HtCO78FyU3zjmbDjmbjjmR3xgHbEA9oRD2hHPKAd8YB2fA/Sju9B2vE9SDu+B+k7vwd/XP72vz/8+vWHv/3042+XJz7+8T8///33r7/8fPvr7//37/Ff/vbr159++vqvv/7711/+/uM//vPrj3/96Ze/f/zbF3f7z19CvLRtLz/ChQuaeP17Kpe/53L5+zWHCSH8KYTrX/3133O9/HtxFyQXNP8P",
188
- "brillig_names": [
189
- "sync_notes"
190
- ]
191
- },
192
- {
193
- "name": "_check_timestamp",
194
- "is_unconstrained": true,
195
- "custom_attributes": [
196
- "public",
197
- "internal",
198
- "view"
199
- ],
200
- "abi": {
201
- "error_types": {
202
- "11405868724477732285": {
203
- "error_kind": "string",
204
- "string": "Function _check_timestamp can only be called internally"
205
- },
206
- "13418685691864489983": {
207
- "error_kind": "string",
208
- "string": "Function _check_timestamp can only be called statically"
209
- },
210
- "1433889167918961673": {
211
- "error_kind": "fmtstring",
212
- "item_types": [],
213
- "length": 17
214
- },
215
- "17843811134343075018": {
216
- "error_kind": "string",
217
- "string": "Stack too deep"
218
- },
219
- "8443716675528357851": {
220
- "error_kind": "string",
221
- "string": "Timestamp mismatch."
222
- }
223
- },
224
- "parameters": [
225
- {
226
- "name": "operation",
227
- "type": {
228
- "kind": "integer",
229
- "sign": "unsigned",
230
- "width": 8
231
- },
232
- "visibility": "private"
233
- },
234
- {
235
- "name": "value",
236
- "type": {
237
- "kind": "integer",
238
- "sign": "unsigned",
239
- "width": 64
240
- },
241
- "visibility": "private"
242
- }
243
- ],
244
- "return_type": null
245
- },
246
- "bytecode": "JwACBAEoAAABBIBLJwAABAMnAgMEAicCBAQAHxgABAADgEkdAIBJgEkCHQCASoBKBS4IgEkAAS4IgEoAAiUAAABZJQAAAIQoAgABBIBLJwICBAA7DQABAAIoAIBDAgAEKACARAIABigAgEUCAAEoAIBGAgACKACARwIABSgAgEgCAAMmJQAAA1IeAgAEAR4CAAUACjgEBQYkAgAGAAAApSUAAAN7HgIABAknAgUAAQo4BAUGJAIABgAAAMElAAADjR4CAAQGHAwEBQAcDAIEAAo4BQQCDDgFBAYLKAABgEUABCcCBQEBJAIABAAAAzsjAAAA9AsoAAGARgAHFgwCCCQCAAcAAAMpIwAAAQ0LKAABgEgACSQCAAkAAAMXIwAAASILKAABgEMACiQCAAoAAAMAIwAAATcLKAABgEcAChYMBgskAgAKAAAC6SMAAAFQCygAAYBEAAgkAgAIAAAC1yMAAAFlJwIBAkknAggCZCcCCgJhJwILAnInAgwCbycCDQJpJwIOAnYnAg8CZScCEAIgJwIRAmwnAhICbicCEwJ0JwIUAnAtCAEVJwIWBBIAEAEWAScDFQQBACgVAhYtDBYXLQ4BFwAoFwIXLQ4SFwAo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HSgxPSyvHghXoyX5SU/lpfMiie9UWon4SA0OF9ig5N4ZprmnzJNE4XPZqd4mgxTb2pnNjnH0agAJt/pJhkmjbtFoStQJndat09dv6Cjao7+DYD9ZABxZV6Kdx8ARiaxj1IGLA95L3qMuXbUfegNAttYMCcqwY75dHAWZXoUmPq+/Ldluu/StRAxGfguMhlAuQhWbwOALzriTwCMyliZpwFASNMVWAEINARINBkg+NJfQxgAeGasRXlKTgew7gFOfgDgAxhADQwQHBoArcDQCgytIKIVRLSChFaQwAqEHBoArYDRChitwKEVOHC7Fs9oALQCQSsQtAIlNICgAcDLFgkeDRDBAOiHvqAf+nkbCQ2ALrSELrSkaABwoSkJGgBcaMoeDQAuNEWvKhS9qlD0qkI9uNBUCA2ALjRBtwpFF5qiWwV6K0HRWwn5DQ0aAN0qIrrQIrpVRHShJXSrSNMLLUrZN432cVtzhEy5rR03ocVaJoF8NUyq8YSr8cRxNUxCLUw8VcNEa2Ei1XgywyprJiYzvBeZickMq565mFTjiVXjiVXz3InV1E6qpp+kWnqsUS2eGNXjSaqFCddSOyYzfP2R7vbDMxE2w8556PiHODhwFH/8BqlN+vGD/+o1X/1Z7tfLm83q/Wjm/fP2tndS8/D3cfXp0Objfne7unver9rjm8eTm+2KnU0WHCWT4bZUOSNzsPayXUVz1PypZdSM/A8=",
248
- "brillig_names": [
249
- "_check_timestamp"
250
- ]
251
- },
252
6
  {
253
7
  "name": "check_timestamp",
254
8
  "is_unconstrained": false,
@@ -256,28 +10,24 @@
256
10
  "private"
257
11
  ],
258
12
  "abi": {
259
- "error_types": {
260
- "17843811134343075018": {
261
- "error_kind": "string",
262
- "string": "Stack too deep"
263
- },
264
- "5019202896831570965": {
265
- "error_kind": "string",
266
- "string": "attempt to add with overflow"
267
- }
268
- },
269
13
  "parameters": [
270
14
  {
271
15
  "name": "inputs",
272
16
  "type": {
17
+ "kind": "struct",
18
+ "path": "aztec::context::inputs::private_context_inputs::PrivateContextInputs",
273
19
  "fields": [
274
20
  {
275
21
  "name": "call_context",
276
22
  "type": {
23
+ "kind": "struct",
24
+ "path": "aztec::protocol_types::abis::call_context::CallContext",
277
25
  "fields": [
278
26
  {
279
27
  "name": "msg_sender",
280
28
  "type": {
29
+ "kind": "struct",
30
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
281
31
  "fields": [
282
32
  {
283
33
  "name": "inner",
@@ -285,14 +35,14 @@
285
35
  "kind": "field"
286
36
  }
287
37
  }
288
- ],
289
- "kind": "struct",
290
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
38
+ ]
291
39
  }
292
40
  },
293
41
  {
294
42
  "name": "contract_address",
295
43
  "type": {
44
+ "kind": "struct",
45
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
296
46
  "fields": [
297
47
  {
298
48
  "name": "inner",
@@ -300,14 +50,14 @@
300
50
  "kind": "field"
301
51
  }
302
52
  }
303
- ],
304
- "kind": "struct",
305
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
53
+ ]
306
54
  }
307
55
  },
308
56
  {
309
57
  "name": "function_selector",
310
58
  "type": {
59
+ "kind": "struct",
60
+ "path": "aztec::protocol_types::abis::function_selector::FunctionSelector",
311
61
  "fields": [
312
62
  {
313
63
  "name": "inner",
@@ -317,9 +67,7 @@
317
67
  "width": 32
318
68
  }
319
69
  }
320
- ],
321
- "kind": "struct",
322
- "path": "aztec::protocol_types::abis::function_selector::FunctionSelector"
70
+ ]
323
71
  }
324
72
  },
325
73
  {
@@ -328,18 +76,20 @@
328
76
  "kind": "boolean"
329
77
  }
330
78
  }
331
- ],
332
- "kind": "struct",
333
- "path": "aztec::protocol_types::abis::call_context::CallContext"
79
+ ]
334
80
  }
335
81
  },
336
82
  {
337
83
  "name": "historical_header",
338
84
  "type": {
85
+ "kind": "struct",
86
+ "path": "aztec::protocol_types::block_header::BlockHeader",
339
87
  "fields": [
340
88
  {
341
89
  "name": "last_archive",
342
90
  "type": {
91
+ "kind": "struct",
92
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
343
93
  "fields": [
344
94
  {
345
95
  "name": "root",
@@ -355,14 +105,14 @@
355
105
  "width": 32
356
106
  }
357
107
  }
358
- ],
359
- "kind": "struct",
360
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
108
+ ]
361
109
  }
362
110
  },
363
111
  {
364
112
  "name": "content_commitment",
365
113
  "type": {
114
+ "kind": "struct",
115
+ "path": "aztec::protocol_types::content_commitment::ContentCommitment",
366
116
  "fields": [
367
117
  {
368
118
  "name": "num_txs",
@@ -388,18 +138,20 @@
388
138
  "kind": "field"
389
139
  }
390
140
  }
391
- ],
392
- "kind": "struct",
393
- "path": "aztec::protocol_types::content_commitment::ContentCommitment"
141
+ ]
394
142
  }
395
143
  },
396
144
  {
397
145
  "name": "state",
398
146
  "type": {
147
+ "kind": "struct",
148
+ "path": "aztec::protocol_types::state_reference::StateReference",
399
149
  "fields": [
400
150
  {
401
151
  "name": "l1_to_l2_message_tree",
402
152
  "type": {
153
+ "kind": "struct",
154
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
403
155
  "fields": [
404
156
  {
405
157
  "name": "root",
@@ -415,18 +167,20 @@
415
167
  "width": 32
416
168
  }
417
169
  }
418
- ],
419
- "kind": "struct",
420
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
170
+ ]
421
171
  }
422
172
  },
423
173
  {
424
174
  "name": "partial",
425
175
  "type": {
176
+ "kind": "struct",
177
+ "path": "aztec::protocol_types::partial_state_reference::PartialStateReference",
426
178
  "fields": [
427
179
  {
428
180
  "name": "note_hash_tree",
429
181
  "type": {
182
+ "kind": "struct",
183
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
430
184
  "fields": [
431
185
  {
432
186
  "name": "root",
@@ -442,14 +196,14 @@
442
196
  "width": 32
443
197
  }
444
198
  }
445
- ],
446
- "kind": "struct",
447
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
199
+ ]
448
200
  }
449
201
  },
450
202
  {
451
203
  "name": "nullifier_tree",
452
204
  "type": {
205
+ "kind": "struct",
206
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
453
207
  "fields": [
454
208
  {
455
209
  "name": "root",
@@ -465,14 +219,14 @@
465
219
  "width": 32
466
220
  }
467
221
  }
468
- ],
469
- "kind": "struct",
470
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
222
+ ]
471
223
  }
472
224
  },
473
225
  {
474
226
  "name": "public_data_tree",
475
227
  "type": {
228
+ "kind": "struct",
229
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
476
230
  "fields": [
477
231
  {
478
232
  "name": "root",
@@ -488,24 +242,20 @@
488
242
  "width": 32
489
243
  }
490
244
  }
491
- ],
492
- "kind": "struct",
493
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
245
+ ]
494
246
  }
495
247
  }
496
- ],
497
- "kind": "struct",
498
- "path": "aztec::protocol_types::partial_state_reference::PartialStateReference"
248
+ ]
499
249
  }
500
250
  }
501
- ],
502
- "kind": "struct",
503
- "path": "aztec::protocol_types::state_reference::StateReference"
251
+ ]
504
252
  }
505
253
  },
506
254
  {
507
255
  "name": "global_variables",
508
256
  "type": {
257
+ "kind": "struct",
258
+ "path": "aztec::protocol_types::abis::global_variables::GlobalVariables",
509
259
  "fields": [
510
260
  {
511
261
  "name": "chain_id",
@@ -542,6 +292,8 @@
542
292
  {
543
293
  "name": "coinbase",
544
294
  "type": {
295
+ "kind": "struct",
296
+ "path": "aztec::protocol_types::address::eth_address::EthAddress",
545
297
  "fields": [
546
298
  {
547
299
  "name": "inner",
@@ -549,14 +301,14 @@
549
301
  "kind": "field"
550
302
  }
551
303
  }
552
- ],
553
- "kind": "struct",
554
- "path": "aztec::protocol_types::address::eth_address::EthAddress"
304
+ ]
555
305
  }
556
306
  },
557
307
  {
558
308
  "name": "fee_recipient",
559
309
  "type": {
310
+ "kind": "struct",
311
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
560
312
  "fields": [
561
313
  {
562
314
  "name": "inner",
@@ -564,14 +316,14 @@
564
316
  "kind": "field"
565
317
  }
566
318
  }
567
- ],
568
- "kind": "struct",
569
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
319
+ ]
570
320
  }
571
321
  },
572
322
  {
573
323
  "name": "gas_fees",
574
324
  "type": {
325
+ "kind": "struct",
326
+ "path": "aztec::protocol_types::abis::gas_fees::GasFees",
575
327
  "fields": [
576
328
  {
577
329
  "name": "fee_per_da_gas",
@@ -585,14 +337,10 @@
585
337
  "kind": "field"
586
338
  }
587
339
  }
588
- ],
589
- "kind": "struct",
590
- "path": "aztec::protocol_types::abis::gas_fees::GasFees"
340
+ ]
591
341
  }
592
342
  }
593
- ],
594
- "kind": "struct",
595
- "path": "aztec::protocol_types::abis::global_variables::GlobalVariables"
343
+ ]
596
344
  }
597
345
  },
598
346
  {
@@ -607,14 +355,14 @@
607
355
  "kind": "field"
608
356
  }
609
357
  }
610
- ],
611
- "kind": "struct",
612
- "path": "aztec::protocol_types::block_header::BlockHeader"
358
+ ]
613
359
  }
614
360
  },
615
361
  {
616
362
  "name": "tx_context",
617
363
  "type": {
364
+ "kind": "struct",
365
+ "path": "aztec::protocol_types::transaction::tx_context::TxContext",
618
366
  "fields": [
619
367
  {
620
368
  "name": "chain_id",
@@ -631,10 +379,14 @@
631
379
  {
632
380
  "name": "gas_settings",
633
381
  "type": {
382
+ "kind": "struct",
383
+ "path": "aztec::protocol_types::abis::gas_settings::GasSettings",
634
384
  "fields": [
635
385
  {
636
386
  "name": "gas_limits",
637
387
  "type": {
388
+ "kind": "struct",
389
+ "path": "aztec::protocol_types::abis::gas::Gas",
638
390
  "fields": [
639
391
  {
640
392
  "name": "da_gas",
@@ -652,14 +404,14 @@
652
404
  "width": 32
653
405
  }
654
406
  }
655
- ],
656
- "kind": "struct",
657
- "path": "aztec::protocol_types::abis::gas::Gas"
407
+ ]
658
408
  }
659
409
  },
660
410
  {
661
411
  "name": "teardown_gas_limits",
662
412
  "type": {
413
+ "kind": "struct",
414
+ "path": "aztec::protocol_types::abis::gas::Gas",
663
415
  "fields": [
664
416
  {
665
417
  "name": "da_gas",
@@ -677,14 +429,14 @@
677
429
  "width": 32
678
430
  }
679
431
  }
680
- ],
681
- "kind": "struct",
682
- "path": "aztec::protocol_types::abis::gas::Gas"
432
+ ]
683
433
  }
684
434
  },
685
435
  {
686
436
  "name": "max_fees_per_gas",
687
437
  "type": {
438
+ "kind": "struct",
439
+ "path": "aztec::protocol_types::abis::gas_fees::GasFees",
688
440
  "fields": [
689
441
  {
690
442
  "name": "fee_per_da_gas",
@@ -698,14 +450,14 @@
698
450
  "kind": "field"
699
451
  }
700
452
  }
701
- ],
702
- "kind": "struct",
703
- "path": "aztec::protocol_types::abis::gas_fees::GasFees"
453
+ ]
704
454
  }
705
455
  },
706
456
  {
707
457
  "name": "max_priority_fees_per_gas",
708
458
  "type": {
459
+ "kind": "struct",
460
+ "path": "aztec::protocol_types::abis::gas_fees::GasFees",
709
461
  "fields": [
710
462
  {
711
463
  "name": "fee_per_da_gas",
@@ -719,19 +471,13 @@
719
471
  "kind": "field"
720
472
  }
721
473
  }
722
- ],
723
- "kind": "struct",
724
- "path": "aztec::protocol_types::abis::gas_fees::GasFees"
474
+ ]
725
475
  }
726
476
  }
727
- ],
728
- "kind": "struct",
729
- "path": "aztec::protocol_types::abis::gas_settings::GasSettings"
477
+ ]
730
478
  }
731
479
  }
732
- ],
733
- "kind": "struct",
734
- "path": "aztec::protocol_types::transaction::tx_context::TxContext"
480
+ ]
735
481
  }
736
482
  },
737
483
  {
@@ -742,9 +488,7 @@
742
488
  "width": 32
743
489
  }
744
490
  }
745
- ],
746
- "kind": "struct",
747
- "path": "aztec::context::inputs::private_context_inputs::PrivateContextInputs"
491
+ ]
748
492
  },
749
493
  "visibility": "private"
750
494
  },
@@ -769,14 +513,20 @@
769
513
  ],
770
514
  "return_type": {
771
515
  "abi_type": {
516
+ "kind": "struct",
517
+ "path": "aztec::protocol_types::abis::private_circuit_public_inputs::PrivateCircuitPublicInputs",
772
518
  "fields": [
773
519
  {
774
520
  "name": "call_context",
775
521
  "type": {
522
+ "kind": "struct",
523
+ "path": "aztec::protocol_types::abis::call_context::CallContext",
776
524
  "fields": [
777
525
  {
778
526
  "name": "msg_sender",
779
527
  "type": {
528
+ "kind": "struct",
529
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
780
530
  "fields": [
781
531
  {
782
532
  "name": "inner",
@@ -784,14 +534,14 @@
784
534
  "kind": "field"
785
535
  }
786
536
  }
787
- ],
788
- "kind": "struct",
789
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
537
+ ]
790
538
  }
791
539
  },
792
540
  {
793
541
  "name": "contract_address",
794
542
  "type": {
543
+ "kind": "struct",
544
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
795
545
  "fields": [
796
546
  {
797
547
  "name": "inner",
@@ -799,14 +549,14 @@
799
549
  "kind": "field"
800
550
  }
801
551
  }
802
- ],
803
- "kind": "struct",
804
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
552
+ ]
805
553
  }
806
554
  },
807
555
  {
808
556
  "name": "function_selector",
809
557
  "type": {
558
+ "kind": "struct",
559
+ "path": "aztec::protocol_types::abis::function_selector::FunctionSelector",
810
560
  "fields": [
811
561
  {
812
562
  "name": "inner",
@@ -816,9 +566,7 @@
816
566
  "width": 32
817
567
  }
818
568
  }
819
- ],
820
- "kind": "struct",
821
- "path": "aztec::protocol_types::abis::function_selector::FunctionSelector"
569
+ ]
822
570
  }
823
571
  },
824
572
  {
@@ -827,9 +575,7 @@
827
575
  "kind": "boolean"
828
576
  }
829
577
  }
830
- ],
831
- "kind": "struct",
832
- "path": "aztec::protocol_types::abis::call_context::CallContext"
578
+ ]
833
579
  }
834
580
  },
835
581
  {
@@ -861,10 +607,14 @@
861
607
  {
862
608
  "name": "max_block_number",
863
609
  "type": {
610
+ "kind": "struct",
611
+ "path": "aztec::protocol_types::abis::max_block_number::MaxBlockNumber",
864
612
  "fields": [
865
613
  {
866
614
  "name": "_opt",
867
615
  "type": {
616
+ "kind": "struct",
617
+ "path": "std::option::Option",
868
618
  "fields": [
869
619
  {
870
620
  "name": "_is_some",
@@ -880,14 +630,10 @@
880
630
  "width": 32
881
631
  }
882
632
  }
883
- ],
884
- "kind": "struct",
885
- "path": "std::option::Option"
633
+ ]
886
634
  }
887
635
  }
888
- ],
889
- "kind": "struct",
890
- "path": "aztec::protocol_types::abis::max_block_number::MaxBlockNumber"
636
+ ]
891
637
  }
892
638
  },
893
639
  {
@@ -896,6 +642,8 @@
896
642
  "kind": "array",
897
643
  "length": 16,
898
644
  "type": {
645
+ "kind": "struct",
646
+ "path": "aztec::protocol_types::abis::read_request::ReadRequest",
899
647
  "fields": [
900
648
  {
901
649
  "name": "value",
@@ -911,9 +659,7 @@
911
659
  "width": 32
912
660
  }
913
661
  }
914
- ],
915
- "kind": "struct",
916
- "path": "aztec::protocol_types::abis::read_request::ReadRequest"
662
+ ]
917
663
  }
918
664
  }
919
665
  },
@@ -923,6 +669,8 @@
923
669
  "kind": "array",
924
670
  "length": 16,
925
671
  "type": {
672
+ "kind": "struct",
673
+ "path": "aztec::protocol_types::abis::read_request::ReadRequest",
926
674
  "fields": [
927
675
  {
928
676
  "name": "value",
@@ -938,9 +686,7 @@
938
686
  "width": 32
939
687
  }
940
688
  }
941
- ],
942
- "kind": "struct",
943
- "path": "aztec::protocol_types::abis::read_request::ReadRequest"
689
+ ]
944
690
  }
945
691
  }
946
692
  },
@@ -950,14 +696,20 @@
950
696
  "kind": "array",
951
697
  "length": 16,
952
698
  "type": {
699
+ "kind": "struct",
700
+ "path": "aztec::protocol_types::abis::validation_requests::key_validation_request_and_generator::KeyValidationRequestAndGenerator",
953
701
  "fields": [
954
702
  {
955
703
  "name": "request",
956
704
  "type": {
705
+ "kind": "struct",
706
+ "path": "aztec::protocol_types::abis::validation_requests::key_validation_request::KeyValidationRequest",
957
707
  "fields": [
958
708
  {
959
709
  "name": "pk_m",
960
710
  "type": {
711
+ "kind": "struct",
712
+ "path": "std::embedded_curve_ops::EmbeddedCurvePoint",
961
713
  "fields": [
962
714
  {
963
715
  "name": "x",
@@ -977,9 +729,7 @@
977
729
  "kind": "boolean"
978
730
  }
979
731
  }
980
- ],
981
- "kind": "struct",
982
- "path": "std::embedded_curve_ops::EmbeddedCurvePoint"
732
+ ]
983
733
  }
984
734
  },
985
735
  {
@@ -988,9 +738,7 @@
988
738
  "kind": "field"
989
739
  }
990
740
  }
991
- ],
992
- "kind": "struct",
993
- "path": "aztec::protocol_types::abis::validation_requests::key_validation_request::KeyValidationRequest"
741
+ ]
994
742
  }
995
743
  },
996
744
  {
@@ -999,9 +747,7 @@
999
747
  "kind": "field"
1000
748
  }
1001
749
  }
1002
- ],
1003
- "kind": "struct",
1004
- "path": "aztec::protocol_types::abis::validation_requests::key_validation_request_and_generator::KeyValidationRequestAndGenerator"
750
+ ]
1005
751
  }
1006
752
  }
1007
753
  },
@@ -1011,6 +757,8 @@
1011
757
  "kind": "array",
1012
758
  "length": 16,
1013
759
  "type": {
760
+ "kind": "struct",
761
+ "path": "aztec::protocol_types::abis::note_hash::NoteHash",
1014
762
  "fields": [
1015
763
  {
1016
764
  "name": "value",
@@ -1026,9 +774,7 @@
1026
774
  "width": 32
1027
775
  }
1028
776
  }
1029
- ],
1030
- "kind": "struct",
1031
- "path": "aztec::protocol_types::abis::note_hash::NoteHash"
777
+ ]
1032
778
  }
1033
779
  }
1034
780
  },
@@ -1038,6 +784,8 @@
1038
784
  "kind": "array",
1039
785
  "length": 16,
1040
786
  "type": {
787
+ "kind": "struct",
788
+ "path": "aztec::protocol_types::abis::nullifier::Nullifier",
1041
789
  "fields": [
1042
790
  {
1043
791
  "name": "value",
@@ -1059,9 +807,7 @@
1059
807
  "kind": "field"
1060
808
  }
1061
809
  }
1062
- ],
1063
- "kind": "struct",
1064
- "path": "aztec::protocol_types::abis::nullifier::Nullifier"
810
+ ]
1065
811
  }
1066
812
  }
1067
813
  },
@@ -1071,14 +817,20 @@
1071
817
  "kind": "array",
1072
818
  "length": 5,
1073
819
  "type": {
820
+ "kind": "struct",
821
+ "path": "aztec::protocol_types::abis::private_call_request::PrivateCallRequest",
1074
822
  "fields": [
1075
823
  {
1076
824
  "name": "call_context",
1077
825
  "type": {
826
+ "kind": "struct",
827
+ "path": "aztec::protocol_types::abis::call_context::CallContext",
1078
828
  "fields": [
1079
829
  {
1080
830
  "name": "msg_sender",
1081
831
  "type": {
832
+ "kind": "struct",
833
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
1082
834
  "fields": [
1083
835
  {
1084
836
  "name": "inner",
@@ -1086,14 +838,14 @@
1086
838
  "kind": "field"
1087
839
  }
1088
840
  }
1089
- ],
1090
- "kind": "struct",
1091
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
841
+ ]
1092
842
  }
1093
843
  },
1094
844
  {
1095
845
  "name": "contract_address",
1096
846
  "type": {
847
+ "kind": "struct",
848
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
1097
849
  "fields": [
1098
850
  {
1099
851
  "name": "inner",
@@ -1101,14 +853,14 @@
1101
853
  "kind": "field"
1102
854
  }
1103
855
  }
1104
- ],
1105
- "kind": "struct",
1106
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
856
+ ]
1107
857
  }
1108
858
  },
1109
859
  {
1110
860
  "name": "function_selector",
1111
861
  "type": {
862
+ "kind": "struct",
863
+ "path": "aztec::protocol_types::abis::function_selector::FunctionSelector",
1112
864
  "fields": [
1113
865
  {
1114
866
  "name": "inner",
@@ -1118,9 +870,7 @@
1118
870
  "width": 32
1119
871
  }
1120
872
  }
1121
- ],
1122
- "kind": "struct",
1123
- "path": "aztec::protocol_types::abis::function_selector::FunctionSelector"
873
+ ]
1124
874
  }
1125
875
  },
1126
876
  {
@@ -1129,9 +879,7 @@
1129
879
  "kind": "boolean"
1130
880
  }
1131
881
  }
1132
- ],
1133
- "kind": "struct",
1134
- "path": "aztec::protocol_types::abis::call_context::CallContext"
882
+ ]
1135
883
  }
1136
884
  },
1137
885
  {
@@ -1162,9 +910,7 @@
1162
910
  "width": 32
1163
911
  }
1164
912
  }
1165
- ],
1166
- "kind": "struct",
1167
- "path": "aztec::protocol_types::abis::private_call_request::PrivateCallRequest"
913
+ ]
1168
914
  }
1169
915
  }
1170
916
  },
@@ -1174,14 +920,20 @@
1174
920
  "kind": "array",
1175
921
  "length": 16,
1176
922
  "type": {
923
+ "kind": "struct",
924
+ "path": "aztec::protocol_types::abis::side_effect::counted::Counted",
1177
925
  "fields": [
1178
926
  {
1179
927
  "name": "inner",
1180
928
  "type": {
929
+ "kind": "struct",
930
+ "path": "aztec::protocol_types::abis::public_call_request::PublicCallRequest",
1181
931
  "fields": [
1182
932
  {
1183
933
  "name": "msg_sender",
1184
934
  "type": {
935
+ "kind": "struct",
936
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
1185
937
  "fields": [
1186
938
  {
1187
939
  "name": "inner",
@@ -1189,14 +941,14 @@
1189
941
  "kind": "field"
1190
942
  }
1191
943
  }
1192
- ],
1193
- "kind": "struct",
1194
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
944
+ ]
1195
945
  }
1196
946
  },
1197
947
  {
1198
948
  "name": "contract_address",
1199
949
  "type": {
950
+ "kind": "struct",
951
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
1200
952
  "fields": [
1201
953
  {
1202
954
  "name": "inner",
@@ -1204,14 +956,14 @@
1204
956
  "kind": "field"
1205
957
  }
1206
958
  }
1207
- ],
1208
- "kind": "struct",
1209
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
959
+ ]
1210
960
  }
1211
961
  },
1212
962
  {
1213
963
  "name": "function_selector",
1214
964
  "type": {
965
+ "kind": "struct",
966
+ "path": "aztec::protocol_types::abis::function_selector::FunctionSelector",
1215
967
  "fields": [
1216
968
  {
1217
969
  "name": "inner",
@@ -1221,9 +973,7 @@
1221
973
  "width": 32
1222
974
  }
1223
975
  }
1224
- ],
1225
- "kind": "struct",
1226
- "path": "aztec::protocol_types::abis::function_selector::FunctionSelector"
976
+ ]
1227
977
  }
1228
978
  },
1229
979
  {
@@ -1238,9 +988,7 @@
1238
988
  "kind": "field"
1239
989
  }
1240
990
  }
1241
- ],
1242
- "kind": "struct",
1243
- "path": "aztec::protocol_types::abis::public_call_request::PublicCallRequest"
991
+ ]
1244
992
  }
1245
993
  },
1246
994
  {
@@ -1251,19 +999,21 @@
1251
999
  "width": 32
1252
1000
  }
1253
1001
  }
1254
- ],
1255
- "kind": "struct",
1256
- "path": "aztec::protocol_types::abis::side_effect::counted::Counted"
1002
+ ]
1257
1003
  }
1258
1004
  }
1259
1005
  },
1260
1006
  {
1261
1007
  "name": "public_teardown_call_request",
1262
1008
  "type": {
1009
+ "kind": "struct",
1010
+ "path": "aztec::protocol_types::abis::public_call_request::PublicCallRequest",
1263
1011
  "fields": [
1264
1012
  {
1265
1013
  "name": "msg_sender",
1266
1014
  "type": {
1015
+ "kind": "struct",
1016
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
1267
1017
  "fields": [
1268
1018
  {
1269
1019
  "name": "inner",
@@ -1271,14 +1021,14 @@
1271
1021
  "kind": "field"
1272
1022
  }
1273
1023
  }
1274
- ],
1275
- "kind": "struct",
1276
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
1024
+ ]
1277
1025
  }
1278
1026
  },
1279
1027
  {
1280
1028
  "name": "contract_address",
1281
1029
  "type": {
1030
+ "kind": "struct",
1031
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
1282
1032
  "fields": [
1283
1033
  {
1284
1034
  "name": "inner",
@@ -1286,14 +1036,14 @@
1286
1036
  "kind": "field"
1287
1037
  }
1288
1038
  }
1289
- ],
1290
- "kind": "struct",
1291
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
1039
+ ]
1292
1040
  }
1293
1041
  },
1294
1042
  {
1295
1043
  "name": "function_selector",
1296
1044
  "type": {
1045
+ "kind": "struct",
1046
+ "path": "aztec::protocol_types::abis::function_selector::FunctionSelector",
1297
1047
  "fields": [
1298
1048
  {
1299
1049
  "name": "inner",
@@ -1303,9 +1053,7 @@
1303
1053
  "width": 32
1304
1054
  }
1305
1055
  }
1306
- ],
1307
- "kind": "struct",
1308
- "path": "aztec::protocol_types::abis::function_selector::FunctionSelector"
1056
+ ]
1309
1057
  }
1310
1058
  },
1311
1059
  {
@@ -1320,9 +1068,7 @@
1320
1068
  "kind": "field"
1321
1069
  }
1322
1070
  }
1323
- ],
1324
- "kind": "struct",
1325
- "path": "aztec::protocol_types::abis::public_call_request::PublicCallRequest"
1071
+ ]
1326
1072
  }
1327
1073
  },
1328
1074
  {
@@ -1331,10 +1077,14 @@
1331
1077
  "kind": "array",
1332
1078
  "length": 2,
1333
1079
  "type": {
1080
+ "kind": "struct",
1081
+ "path": "aztec::protocol_types::messaging::l2_to_l1_message::L2ToL1Message",
1334
1082
  "fields": [
1335
1083
  {
1336
1084
  "name": "recipient",
1337
1085
  "type": {
1086
+ "kind": "struct",
1087
+ "path": "aztec::protocol_types::address::eth_address::EthAddress",
1338
1088
  "fields": [
1339
1089
  {
1340
1090
  "name": "inner",
@@ -1342,9 +1092,7 @@
1342
1092
  "kind": "field"
1343
1093
  }
1344
1094
  }
1345
- ],
1346
- "kind": "struct",
1347
- "path": "aztec::protocol_types::address::eth_address::EthAddress"
1095
+ ]
1348
1096
  }
1349
1097
  },
1350
1098
  {
@@ -1361,9 +1109,7 @@
1361
1109
  "width": 32
1362
1110
  }
1363
1111
  }
1364
- ],
1365
- "kind": "struct",
1366
- "path": "aztec::protocol_types::messaging::l2_to_l1_message::L2ToL1Message"
1112
+ ]
1367
1113
  }
1368
1114
  }
1369
1115
  },
@@ -1373,10 +1119,14 @@
1373
1119
  "kind": "array",
1374
1120
  "length": 16,
1375
1121
  "type": {
1122
+ "kind": "struct",
1123
+ "path": "aztec::protocol_types::abis::private_log::PrivateLogData",
1376
1124
  "fields": [
1377
1125
  {
1378
1126
  "name": "log",
1379
1127
  "type": {
1128
+ "kind": "struct",
1129
+ "path": "aztec::protocol_types::abis::log::Log",
1380
1130
  "fields": [
1381
1131
  {
1382
1132
  "name": "fields",
@@ -1388,9 +1138,7 @@
1388
1138
  }
1389
1139
  }
1390
1140
  }
1391
- ],
1392
- "kind": "struct",
1393
- "path": "aztec::protocol_types::abis::log::Log"
1141
+ ]
1394
1142
  }
1395
1143
  },
1396
1144
  {
@@ -1409,9 +1157,7 @@
1409
1157
  "width": 32
1410
1158
  }
1411
1159
  }
1412
- ],
1413
- "kind": "struct",
1414
- "path": "aztec::protocol_types::abis::private_log::PrivateLogData"
1160
+ ]
1415
1161
  }
1416
1162
  }
1417
1163
  },
@@ -1421,6 +1167,8 @@
1421
1167
  "kind": "array",
1422
1168
  "length": 1,
1423
1169
  "type": {
1170
+ "kind": "struct",
1171
+ "path": "aztec::protocol_types::abis::log_hash::LogHash",
1424
1172
  "fields": [
1425
1173
  {
1426
1174
  "name": "value",
@@ -1444,9 +1192,7 @@
1444
1192
  "width": 32
1445
1193
  }
1446
1194
  }
1447
- ],
1448
- "kind": "struct",
1449
- "path": "aztec::protocol_types::abis::log_hash::LogHash"
1195
+ ]
1450
1196
  }
1451
1197
  }
1452
1198
  },
@@ -1469,10 +1215,14 @@
1469
1215
  {
1470
1216
  "name": "historical_header",
1471
1217
  "type": {
1218
+ "kind": "struct",
1219
+ "path": "aztec::protocol_types::block_header::BlockHeader",
1472
1220
  "fields": [
1473
1221
  {
1474
1222
  "name": "last_archive",
1475
1223
  "type": {
1224
+ "kind": "struct",
1225
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
1476
1226
  "fields": [
1477
1227
  {
1478
1228
  "name": "root",
@@ -1488,14 +1238,14 @@
1488
1238
  "width": 32
1489
1239
  }
1490
1240
  }
1491
- ],
1492
- "kind": "struct",
1493
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
1241
+ ]
1494
1242
  }
1495
1243
  },
1496
1244
  {
1497
1245
  "name": "content_commitment",
1498
1246
  "type": {
1247
+ "kind": "struct",
1248
+ "path": "aztec::protocol_types::content_commitment::ContentCommitment",
1499
1249
  "fields": [
1500
1250
  {
1501
1251
  "name": "num_txs",
@@ -1521,18 +1271,20 @@
1521
1271
  "kind": "field"
1522
1272
  }
1523
1273
  }
1524
- ],
1525
- "kind": "struct",
1526
- "path": "aztec::protocol_types::content_commitment::ContentCommitment"
1274
+ ]
1527
1275
  }
1528
1276
  },
1529
1277
  {
1530
1278
  "name": "state",
1531
1279
  "type": {
1280
+ "kind": "struct",
1281
+ "path": "aztec::protocol_types::state_reference::StateReference",
1532
1282
  "fields": [
1533
1283
  {
1534
1284
  "name": "l1_to_l2_message_tree",
1535
1285
  "type": {
1286
+ "kind": "struct",
1287
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
1536
1288
  "fields": [
1537
1289
  {
1538
1290
  "name": "root",
@@ -1548,18 +1300,20 @@
1548
1300
  "width": 32
1549
1301
  }
1550
1302
  }
1551
- ],
1552
- "kind": "struct",
1553
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
1303
+ ]
1554
1304
  }
1555
1305
  },
1556
1306
  {
1557
1307
  "name": "partial",
1558
1308
  "type": {
1309
+ "kind": "struct",
1310
+ "path": "aztec::protocol_types::partial_state_reference::PartialStateReference",
1559
1311
  "fields": [
1560
1312
  {
1561
1313
  "name": "note_hash_tree",
1562
1314
  "type": {
1315
+ "kind": "struct",
1316
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
1563
1317
  "fields": [
1564
1318
  {
1565
1319
  "name": "root",
@@ -1575,14 +1329,14 @@
1575
1329
  "width": 32
1576
1330
  }
1577
1331
  }
1578
- ],
1579
- "kind": "struct",
1580
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
1332
+ ]
1581
1333
  }
1582
1334
  },
1583
1335
  {
1584
1336
  "name": "nullifier_tree",
1585
1337
  "type": {
1338
+ "kind": "struct",
1339
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
1586
1340
  "fields": [
1587
1341
  {
1588
1342
  "name": "root",
@@ -1598,14 +1352,14 @@
1598
1352
  "width": 32
1599
1353
  }
1600
1354
  }
1601
- ],
1602
- "kind": "struct",
1603
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
1355
+ ]
1604
1356
  }
1605
1357
  },
1606
1358
  {
1607
1359
  "name": "public_data_tree",
1608
1360
  "type": {
1361
+ "kind": "struct",
1362
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
1609
1363
  "fields": [
1610
1364
  {
1611
1365
  "name": "root",
@@ -1621,24 +1375,20 @@
1621
1375
  "width": 32
1622
1376
  }
1623
1377
  }
1624
- ],
1625
- "kind": "struct",
1626
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
1378
+ ]
1627
1379
  }
1628
1380
  }
1629
- ],
1630
- "kind": "struct",
1631
- "path": "aztec::protocol_types::partial_state_reference::PartialStateReference"
1381
+ ]
1632
1382
  }
1633
1383
  }
1634
- ],
1635
- "kind": "struct",
1636
- "path": "aztec::protocol_types::state_reference::StateReference"
1384
+ ]
1637
1385
  }
1638
1386
  },
1639
1387
  {
1640
1388
  "name": "global_variables",
1641
1389
  "type": {
1390
+ "kind": "struct",
1391
+ "path": "aztec::protocol_types::abis::global_variables::GlobalVariables",
1642
1392
  "fields": [
1643
1393
  {
1644
1394
  "name": "chain_id",
@@ -1675,6 +1425,8 @@
1675
1425
  {
1676
1426
  "name": "coinbase",
1677
1427
  "type": {
1428
+ "kind": "struct",
1429
+ "path": "aztec::protocol_types::address::eth_address::EthAddress",
1678
1430
  "fields": [
1679
1431
  {
1680
1432
  "name": "inner",
@@ -1682,14 +1434,14 @@
1682
1434
  "kind": "field"
1683
1435
  }
1684
1436
  }
1685
- ],
1686
- "kind": "struct",
1687
- "path": "aztec::protocol_types::address::eth_address::EthAddress"
1437
+ ]
1688
1438
  }
1689
1439
  },
1690
1440
  {
1691
1441
  "name": "fee_recipient",
1692
1442
  "type": {
1443
+ "kind": "struct",
1444
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
1693
1445
  "fields": [
1694
1446
  {
1695
1447
  "name": "inner",
@@ -1697,14 +1449,14 @@
1697
1449
  "kind": "field"
1698
1450
  }
1699
1451
  }
1700
- ],
1701
- "kind": "struct",
1702
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
1452
+ ]
1703
1453
  }
1704
1454
  },
1705
1455
  {
1706
1456
  "name": "gas_fees",
1707
1457
  "type": {
1458
+ "kind": "struct",
1459
+ "path": "aztec::protocol_types::abis::gas_fees::GasFees",
1708
1460
  "fields": [
1709
1461
  {
1710
1462
  "name": "fee_per_da_gas",
@@ -1718,14 +1470,10 @@
1718
1470
  "kind": "field"
1719
1471
  }
1720
1472
  }
1721
- ],
1722
- "kind": "struct",
1723
- "path": "aztec::protocol_types::abis::gas_fees::GasFees"
1473
+ ]
1724
1474
  }
1725
1475
  }
1726
- ],
1727
- "kind": "struct",
1728
- "path": "aztec::protocol_types::abis::global_variables::GlobalVariables"
1476
+ ]
1729
1477
  }
1730
1478
  },
1731
1479
  {
@@ -1740,14 +1488,14 @@
1740
1488
  "kind": "field"
1741
1489
  }
1742
1490
  }
1743
- ],
1744
- "kind": "struct",
1745
- "path": "aztec::protocol_types::block_header::BlockHeader"
1491
+ ]
1746
1492
  }
1747
1493
  },
1748
1494
  {
1749
1495
  "name": "tx_context",
1750
1496
  "type": {
1497
+ "kind": "struct",
1498
+ "path": "aztec::protocol_types::transaction::tx_context::TxContext",
1751
1499
  "fields": [
1752
1500
  {
1753
1501
  "name": "chain_id",
@@ -1764,10 +1512,14 @@
1764
1512
  {
1765
1513
  "name": "gas_settings",
1766
1514
  "type": {
1515
+ "kind": "struct",
1516
+ "path": "aztec::protocol_types::abis::gas_settings::GasSettings",
1767
1517
  "fields": [
1768
1518
  {
1769
1519
  "name": "gas_limits",
1770
1520
  "type": {
1521
+ "kind": "struct",
1522
+ "path": "aztec::protocol_types::abis::gas::Gas",
1771
1523
  "fields": [
1772
1524
  {
1773
1525
  "name": "da_gas",
@@ -1785,14 +1537,14 @@
1785
1537
  "width": 32
1786
1538
  }
1787
1539
  }
1788
- ],
1789
- "kind": "struct",
1790
- "path": "aztec::protocol_types::abis::gas::Gas"
1540
+ ]
1791
1541
  }
1792
1542
  },
1793
1543
  {
1794
1544
  "name": "teardown_gas_limits",
1795
1545
  "type": {
1546
+ "kind": "struct",
1547
+ "path": "aztec::protocol_types::abis::gas::Gas",
1796
1548
  "fields": [
1797
1549
  {
1798
1550
  "name": "da_gas",
@@ -1810,14 +1562,14 @@
1810
1562
  "width": 32
1811
1563
  }
1812
1564
  }
1813
- ],
1814
- "kind": "struct",
1815
- "path": "aztec::protocol_types::abis::gas::Gas"
1565
+ ]
1816
1566
  }
1817
1567
  },
1818
1568
  {
1819
1569
  "name": "max_fees_per_gas",
1820
1570
  "type": {
1571
+ "kind": "struct",
1572
+ "path": "aztec::protocol_types::abis::gas_fees::GasFees",
1821
1573
  "fields": [
1822
1574
  {
1823
1575
  "name": "fee_per_da_gas",
@@ -1831,14 +1583,14 @@
1831
1583
  "kind": "field"
1832
1584
  }
1833
1585
  }
1834
- ],
1835
- "kind": "struct",
1836
- "path": "aztec::protocol_types::abis::gas_fees::GasFees"
1586
+ ]
1837
1587
  }
1838
1588
  },
1839
1589
  {
1840
1590
  "name": "max_priority_fees_per_gas",
1841
1591
  "type": {
1592
+ "kind": "struct",
1593
+ "path": "aztec::protocol_types::abis::gas_fees::GasFees",
1842
1594
  "fields": [
1843
1595
  {
1844
1596
  "name": "fee_per_da_gas",
@@ -1852,65 +1604,251 @@
1852
1604
  "kind": "field"
1853
1605
  }
1854
1606
  }
1855
- ],
1856
- "kind": "struct",
1857
- "path": "aztec::protocol_types::abis::gas_fees::GasFees"
1607
+ ]
1858
1608
  }
1859
1609
  }
1860
- ],
1861
- "kind": "struct",
1862
- "path": "aztec::protocol_types::abis::gas_settings::GasSettings"
1610
+ ]
1863
1611
  }
1864
1612
  }
1865
- ],
1866
- "kind": "struct",
1867
- "path": "aztec::protocol_types::transaction::tx_context::TxContext"
1613
+ ]
1614
+ }
1615
+ }
1616
+ ]
1617
+ },
1618
+ "visibility": "databus"
1619
+ },
1620
+ "error_types": {
1621
+ "5019202896831570965": {
1622
+ "error_kind": "string",
1623
+ "string": "attempt to add with overflow"
1624
+ },
1625
+ "17843811134343075018": {
1626
+ "error_kind": "string",
1627
+ "string": "Stack too deep"
1628
+ }
1629
+ }
1630
+ },
1631
+ "bytecode": "H4sIAAAAAAAA/+XdBXRT99/H8dSA4lYYE2yCQ7RNcHd3h0qKDoZtzDt3d2fK3F2Zb8zdN7bBFHfn+XxHMm5D2DnPvzf7P+/z3HPep22S3rx+N9I0uZLm2TvVzfB4dqfv/T5NZcS+2kkNE06Lf3V+n5XkcpWSnFYlyWnVkpxWI8lpdVTnhNMaJLlcwySnNUpyWuMkpzVJclpTVSHhtGYxi3NKi32Nnx7w5gaD0Tx/1Bfw5Xv9kYJwyBsMFeSGfWFfKBwq8ocDgWg4GM6LFETyvBFfMBD1FYcigWLv3qlaxr55ecs0+QtT6az+nzsDiSeYrabKdFhtOex23Ba7HbdB/PvqscvEf6+Gfq6paqnaGftOj0/pCcvAW7bJ18TF5ZmT4Z7LeZ+1+TZ0LKN0z4Enl67fn5bketJcXvZN3ZuXN1XGZikwlprcvkM774R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Mj372+LnOZ+Y4yZ7Aq/t2fd9jsNoU5+Sffa//2B4UvoiP5Lif7Z8tTwHfoEU/6NWL/ZzZcf30VlzFkQXRAcvKJg5rbDnglmFe5/9Z85MfPJ33sGcU1bC5RJ/L9kTvfPnzISfs5LM90C/n3jage6MTj/hD0r92M//7T8o/wMgWDyPjBsCAA==",
1632
+ "debug_symbols": "7VXbasMwDP0XP/tBsi1f+itjlLRNSyAkJU0Ho/TfZ4c4bjp3I4wNBn0JkX2OdHIkOxe2Kzfnw7pq9u2JrV4urG63RV+1jY8uDGlYOx2LJoSnvuh6thLKOs7KZudfidSVs31Vl2yFaK78M1qAjmgh7IS2Nge21kSw0/A1GMmRGtH+XafcwqhcchSTElSU0A5z2aWWMblCmKFfOUP9tOaRNeZpzSNrbN4aIZM19I01ColGtMIgYkRrGiq4364gIFfBSBgpFsXEoJyjqFGJaJJGk+RQrmFSJzEps08xiMGfi7E0ibkdtawYdNpNDXbmpsPenMzwSFAYjZdg4N5L8b/ly7+VL0DKeHYFkHQzPT7YdFVdV4f17C8G4aFUTiph/DwiuJ8tRcspejnFLKfYhRQfYUDmx41cPI2G3A0RPNGHb0VXFZu6DF6G3XOzjdb6sH8/xp1o/rFrt+Xu3JWhDakDYVYkcoXhlgp3CAEnmrQNS4K4BF/VV/4A",
1633
+ "brillig_names": [
1634
+ "store_in_execution_cache_oracle_wrapper",
1635
+ "enqueue_public_function_call_internal"
1636
+ ],
1637
+ "verification_key": "AAAAAAAQAAAAAAAAAAAAFAAAAAAAAAAQAAAAAAADKLEBAAAAAAAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAAAAAAAAAAAAAD4Gvnu4g610mfFwa8lsywvQmCOU97LRLhK6dSKgpJoEXqeAGI/Tj7gz3J6hjtdi9MM2YvUly31cMYRo89eMmyC5UinB7Mdxy9ciJjSD2zWDBV69MPrWgaed9mMPwJC3IHN845XLkCgINApn5DJx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4FXhjXRNJpJ9ucKY6rdKRICIKRgLc+qTYcILEvW/a6RL17Ta/vMvVL4w5s+hzxHMVMgDENyb3W2/aDeIs4ODfq2vMegX/lalrKJQkxfczZw2WL5tuC04sAZaN5cMkgqp9HQoJ1xeOyTuteFj5bmTwtI0dWKphxkrVIgQ9ecSAIhnlW6GXUa3+bDYyTT+2wtoJiS18GKk8Pa5YgJ+q7saoanj0s7xh8Z1ucGk1m79H5/kH"
1638
+ },
1639
+ {
1640
+ "name": "process_log",
1641
+ "is_unconstrained": true,
1642
+ "custom_attributes": [],
1643
+ "abi": {
1644
+ "parameters": [
1645
+ {
1646
+ "name": "_log_ciphertext",
1647
+ "type": {
1648
+ "kind": "struct",
1649
+ "path": "std::collections::bounded_vec::BoundedVec",
1650
+ "fields": [
1651
+ {
1652
+ "name": "storage",
1653
+ "type": {
1654
+ "kind": "array",
1655
+ "length": 18,
1656
+ "type": {
1657
+ "kind": "field"
1658
+ }
1659
+ }
1660
+ },
1661
+ {
1662
+ "name": "len",
1663
+ "type": {
1664
+ "kind": "integer",
1665
+ "sign": "unsigned",
1666
+ "width": 32
1667
+ }
1668
+ }
1669
+ ]
1670
+ },
1671
+ "visibility": "private"
1672
+ },
1673
+ {
1674
+ "name": "_tx_hash",
1675
+ "type": {
1676
+ "kind": "field"
1677
+ },
1678
+ "visibility": "private"
1679
+ },
1680
+ {
1681
+ "name": "_unique_note_hashes_in_tx",
1682
+ "type": {
1683
+ "kind": "struct",
1684
+ "path": "std::collections::bounded_vec::BoundedVec",
1685
+ "fields": [
1686
+ {
1687
+ "name": "storage",
1688
+ "type": {
1689
+ "kind": "array",
1690
+ "length": 64,
1691
+ "type": {
1692
+ "kind": "field"
1693
+ }
1694
+ }
1695
+ },
1696
+ {
1697
+ "name": "len",
1698
+ "type": {
1699
+ "kind": "integer",
1700
+ "sign": "unsigned",
1701
+ "width": 32
1702
+ }
1868
1703
  }
1869
- }
1870
- ],
1871
- "kind": "struct",
1872
- "path": "aztec::protocol_types::abis::private_circuit_public_inputs::PrivateCircuitPublicInputs"
1704
+ ]
1705
+ },
1706
+ "visibility": "private"
1873
1707
  },
1874
- "visibility": "databus"
1708
+ {
1709
+ "name": "_first_nullifier_in_tx",
1710
+ "type": {
1711
+ "kind": "field"
1712
+ },
1713
+ "visibility": "private"
1714
+ },
1715
+ {
1716
+ "name": "_recipient",
1717
+ "type": {
1718
+ "kind": "struct",
1719
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
1720
+ "fields": [
1721
+ {
1722
+ "name": "inner",
1723
+ "type": {
1724
+ "kind": "field"
1725
+ }
1726
+ }
1727
+ ]
1728
+ },
1729
+ "visibility": "private"
1730
+ }
1731
+ ],
1732
+ "return_type": null,
1733
+ "error_types": {
1734
+ "16775516380094354375": {
1735
+ "error_kind": "fmtstring",
1736
+ "length": 40,
1737
+ "item_types": []
1738
+ },
1739
+ "17843811134343075018": {
1740
+ "error_kind": "string",
1741
+ "string": "Stack too deep"
1742
+ }
1875
1743
  }
1876
1744
  },
1877
- "bytecode": "H4sIAAAAAAAA/+XdBXRT99/H8dSA4lYYE2yCQ7RNcHd3h0qKDoZtzDt3d2fK3F2Zb8zdN7bBFHfn+XxHMm5D2DnPvzf7P+/z3HPep22S3rx+N9I0uZLm2TvVzfB4dqfv/T5NZcS+2kkNE06Lf3V+n5XkcpWSnFYlyWnVkpxWI8lpdVTnhNMaJLlcwySnNUpyWuMkpzVJclpTVSHhtGYxi3NKi32Nnx7w5gaD0Tx/1Bfw5Xv9kYJwyBsMFeSGfWFfKBwq8ocDgWg4GM6LFETyvBFfMBD1FYcigWLv3qlaxr55ecs0+QtT6az+nzsDiSeYrabKdFhtOex23Ba7HbdB/PvqscvEf6+Gfq6paqnaGftOj0/pCcvAW7bJ18TF5ZmT4Z7LeZ+1+TZ0LKN0z4Enl67fn5bketJcXvZN3ZuXN1XGZikwlprcvkM774RlvUPXSdEduo7jDh3/I+RJ8Z0tzZPaG7Ks8w6F84v9+VFvKpdBjYzULAO3n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WOoy7KNthwDNA11WfYdls/QdY2vp6H9CtEPhV0PzDLfPFhkp987D2aoPxNfS6zquW9tU64vcer/6fh5M4ife1N5J5M2SPvCN1dlabvm2Isi//us2G96eIS77pFd5R/Mno5OTsf383wwzIuifzKsOfqF1f1OzzvrPkfX970b++bVDH098q3xtJRfUWIl23JkiZIJo17j8c07WvJfxv/aftsjc8del72XnWg51vTz2IgWz3Bc2l/7cHTeljxirPQn0fIabuTYT5z6f1ef3bbuqs/I2XDaPetPz6bF9MGD/GTacfRrH8JP/wJJ9PoyCV0AAA==",
1746
+ "debug_symbols": "tZbRCoMgGIXfxWsv0qV/26uMMawsBLGwGozo3acjttiuz0105NfPCz84K2ttvfR3F7phYpfryvzQmNkNIaV146yOznvX34/LrMgfofR7wzSakPM0mzizizgJUpzZ0OZ/KVU6pHPeplScN/43T3IfJvpMlrTdeAIQGlChAWcwQBdogEADJBpwQgNKNEChAWiTNdpkjTZZo00mtMmENpnQJhPaZEKbTGiTCW0yoU0mqMlbSg8Tnam93RtOt4TmUHjm52h/us8Yh8a2S7S5BX0LUH6NpeRK5mtne0VVcFGpBEmgFw==",
1879
1747
  "brillig_names": [
1880
- "store_in_execution_cache_oracle_wrapper",
1881
- "enqueue_public_function_call_internal"
1882
- ],
1883
- "verification_key": "AAAAAAAQAAAAAAAAAAAAFAAAAAAAAAAQAAAAAAADKLEBAAAAAAAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAAAAAAAAAAAAAD4Gvnu4g610mfFwa8lsywvQmCOU97LRLhK6dSKgpJoEXqeAGI/Tj7gz3J6hjtdi9MM2YvUly31cMYRo89eMmyC5UinB7Mdxy9ciJjSD2zWDBV69MPrWgaed9mMPwJC3IHN845XLkCgINApn5DJxItcfcWwq2Vib4bqmfNebwbaIBR3JqDFsGevvRsYNLUv7hhnNMsfy7Atq7QbiP+uIDtxEnD4u44JbGQNAAwqWQ4ZnZ4o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lalrKJQkxfczZw2WL5tuC04sAZaN5cMkgqp9HQoJ1xeOyTuteFj5bmTwtI0dWKphxkrVIgQ9ecSAIhnlW6GXUa3+bDYyTT+2wtoJiS18GKk8Pa5YgJ+q7saoanj0s7xh8Z1ucGk1m79H5/kH"
1748
+ "process_log"
1749
+ ]
1884
1750
  },
1885
1751
  {
1886
- "name": "check_block_number",
1887
- "is_unconstrained": false,
1752
+ "name": "public_dispatch",
1753
+ "is_unconstrained": true,
1888
1754
  "custom_attributes": [
1889
- "private"
1755
+ "public"
1890
1756
  ],
1891
1757
  "abi": {
1758
+ "parameters": [
1759
+ {
1760
+ "name": "selector",
1761
+ "type": {
1762
+ "kind": "field"
1763
+ },
1764
+ "visibility": "private"
1765
+ }
1766
+ ],
1767
+ "return_type": null,
1892
1768
  "error_types": {
1893
- "17843811134343075018": {
1769
+ "1433889167918961673": {
1770
+ "error_kind": "fmtstring",
1771
+ "length": 17,
1772
+ "item_types": []
1773
+ },
1774
+ "2242946026394210301": {
1894
1775
  "error_kind": "string",
1895
- "string": "Stack too deep"
1776
+ "string": "Block number mismatch."
1777
+ },
1778
+ "2830029349304997821": {
1779
+ "error_kind": "fmtstring",
1780
+ "length": 27,
1781
+ "item_types": [
1782
+ {
1783
+ "kind": "field"
1784
+ }
1785
+ ]
1896
1786
  },
1897
1787
  "5019202896831570965": {
1898
1788
  "error_kind": "string",
1899
1789
  "string": "attempt to add with overflow"
1790
+ },
1791
+ "8209322232883590150": {
1792
+ "error_kind": "string",
1793
+ "string": "Function _check_block_number can only be called internally"
1794
+ },
1795
+ "8443716675528357851": {
1796
+ "error_kind": "string",
1797
+ "string": "Timestamp mismatch."
1798
+ },
1799
+ "10421965853029650238": {
1800
+ "error_kind": "string",
1801
+ "string": "Function _check_block_number can only be called statically"
1802
+ },
1803
+ "11405868724477732285": {
1804
+ "error_kind": "string",
1805
+ "string": "Function _check_timestamp can only be called internally"
1806
+ },
1807
+ "13418685691864489983": {
1808
+ "error_kind": "string",
1809
+ "string": "Function _check_timestamp can only be called statically"
1810
+ },
1811
+ "16761564377371454734": {
1812
+ "error_kind": "string",
1813
+ "string": "Array index out of bounds"
1814
+ },
1815
+ "17843811134343075018": {
1816
+ "error_kind": "string",
1817
+ "string": "Stack too deep"
1900
1818
  }
1901
- },
1819
+ }
1820
+ },
1821
+ "bytecode": "JwACBAEoAAABBIBVJwAABAMnAgIEAScCAwQAHxgAAwACgFQuCIBUAAElAAAARSUAAAC9KAIAAQSAVScCAgQAOw0AAQACKACAQwIABCgAgEQCAAYoAIBFAgABKACARgIAAigAgEcCAAUoAIBIAgADKACASQEAACgAgEoEAAAoAIBLAQABKACATAQAASgAgE0CACAoAIBOAgBlKACATwIAbCgAgFACAG4oAIBRAgBvKACAUgIAcigAgFMCAHQmJQAABaUpAgACAFivKuAKOAECAycCBAQAJwIGBAMAOAQGBS0IAQIAEAEFAScDAgQBACgCAgUtDgQFACgFAgUtDgQFJwIFBAMAOAIFBCcCBAQCJwIFAAEkAgADAAABICMAAAJ8LQgBAycCBgQDABABBgEnAwMEAQAoAwIGHzSATAAEAAYtDQMGACgGAgYtDgYDLQgBBgAAAQIBLQ4DBi0IAQMAAAECAS4KgEoAAycCCAQJLQgACS0MBgotDAMLABAACAAlAAAFzi0EAAAtDAoHASgAB4BMAAktDQkIHAwICQIcDAkHABwMBwgCJwIJBAotCAAKLQwGCy0MAwwAEAAJACUAAAXOLQQAAC0MCwcBKAAHgEwABi0NBgMcDAMHBRwMBwYAHgIAAwEeAgAHAAo4AwcJJAIACQAAAfwlAAAGRx4CAAMJCjgDBQckAgAHAAACEyUAAAZZHgIAAwYcDAMHACcCCQQKLQgACi0MBwstDAgMLQwGDQAQAAkAJQAABmstBAAALQwLAyQCAAMAAAJRJQAACNAtDQIDACgDAgMtDgMCACgCAgctDQcGJwIIBAIAOAcIAzsNAAMABiMAAAJ8KQIAAwB57RaBCjgBAwYkAgAGAAAClyMAAAPXLQgBAycCBgQDABABBgEnAwMEAQAoAwIGHzSATAAE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lIYGlZURTRjQVRkDIPDGiiRFNSIxoSIxoSIxoSIxoSIxoSIxohmhqiCYkRjQgRuSUKgCihIDcndB4PCQOO8TKGf9yEiQn/4uwe/Xuf3Tv1rtG9u4fW7r1HjqrNdR2Pw/Rq3c/jdCrd//BmW69h9puobb7+ZFevbfINXPhQly33iN9lSjU9tDdg3IO7T0yvpOfGFWeIMvkSybfBWXiETvL0v0c3v5z+3x/++Hh7vjzQJ+/P36c/VrQy79f785+OOjr89PHu0/fn+/2PyF0+vWgPTcP6rmW/cFlb39Wu8l2eLtfRlx1+N82sA7M/wE=",
1823
+ "brillig_names": [
1824
+ "public_dispatch"
1825
+ ]
1826
+ },
1827
+ {
1828
+ "name": "check_block_number",
1829
+ "is_unconstrained": false,
1830
+ "custom_attributes": [
1831
+ "private"
1832
+ ],
1833
+ "abi": {
1902
1834
  "parameters": [
1903
1835
  {
1904
1836
  "name": "inputs",
1905
1837
  "type": {
1838
+ "kind": "struct",
1839
+ "path": "aztec::context::inputs::private_context_inputs::PrivateContextInputs",
1906
1840
  "fields": [
1907
1841
  {
1908
1842
  "name": "call_context",
1909
1843
  "type": {
1844
+ "kind": "struct",
1845
+ "path": "aztec::protocol_types::abis::call_context::CallContext",
1910
1846
  "fields": [
1911
1847
  {
1912
1848
  "name": "msg_sender",
1913
1849
  "type": {
1850
+ "kind": "struct",
1851
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
1914
1852
  "fields": [
1915
1853
  {
1916
1854
  "name": "inner",
@@ -1918,14 +1856,14 @@
1918
1856
  "kind": "field"
1919
1857
  }
1920
1858
  }
1921
- ],
1922
- "kind": "struct",
1923
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
1859
+ ]
1924
1860
  }
1925
1861
  },
1926
1862
  {
1927
1863
  "name": "contract_address",
1928
1864
  "type": {
1865
+ "kind": "struct",
1866
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
1929
1867
  "fields": [
1930
1868
  {
1931
1869
  "name": "inner",
@@ -1933,14 +1871,14 @@
1933
1871
  "kind": "field"
1934
1872
  }
1935
1873
  }
1936
- ],
1937
- "kind": "struct",
1938
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
1874
+ ]
1939
1875
  }
1940
1876
  },
1941
1877
  {
1942
1878
  "name": "function_selector",
1943
1879
  "type": {
1880
+ "kind": "struct",
1881
+ "path": "aztec::protocol_types::abis::function_selector::FunctionSelector",
1944
1882
  "fields": [
1945
1883
  {
1946
1884
  "name": "inner",
@@ -1950,9 +1888,7 @@
1950
1888
  "width": 32
1951
1889
  }
1952
1890
  }
1953
- ],
1954
- "kind": "struct",
1955
- "path": "aztec::protocol_types::abis::function_selector::FunctionSelector"
1891
+ ]
1956
1892
  }
1957
1893
  },
1958
1894
  {
@@ -1961,18 +1897,20 @@
1961
1897
  "kind": "boolean"
1962
1898
  }
1963
1899
  }
1964
- ],
1965
- "kind": "struct",
1966
- "path": "aztec::protocol_types::abis::call_context::CallContext"
1900
+ ]
1967
1901
  }
1968
1902
  },
1969
1903
  {
1970
1904
  "name": "historical_header",
1971
1905
  "type": {
1906
+ "kind": "struct",
1907
+ "path": "aztec::protocol_types::block_header::BlockHeader",
1972
1908
  "fields": [
1973
1909
  {
1974
1910
  "name": "last_archive",
1975
1911
  "type": {
1912
+ "kind": "struct",
1913
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
1976
1914
  "fields": [
1977
1915
  {
1978
1916
  "name": "root",
@@ -1988,14 +1926,14 @@
1988
1926
  "width": 32
1989
1927
  }
1990
1928
  }
1991
- ],
1992
- "kind": "struct",
1993
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
1929
+ ]
1994
1930
  }
1995
1931
  },
1996
1932
  {
1997
1933
  "name": "content_commitment",
1998
1934
  "type": {
1935
+ "kind": "struct",
1936
+ "path": "aztec::protocol_types::content_commitment::ContentCommitment",
1999
1937
  "fields": [
2000
1938
  {
2001
1939
  "name": "num_txs",
@@ -2021,18 +1959,20 @@
2021
1959
  "kind": "field"
2022
1960
  }
2023
1961
  }
2024
- ],
2025
- "kind": "struct",
2026
- "path": "aztec::protocol_types::content_commitment::ContentCommitment"
1962
+ ]
2027
1963
  }
2028
1964
  },
2029
1965
  {
2030
1966
  "name": "state",
2031
1967
  "type": {
1968
+ "kind": "struct",
1969
+ "path": "aztec::protocol_types::state_reference::StateReference",
2032
1970
  "fields": [
2033
1971
  {
2034
1972
  "name": "l1_to_l2_message_tree",
2035
1973
  "type": {
1974
+ "kind": "struct",
1975
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
2036
1976
  "fields": [
2037
1977
  {
2038
1978
  "name": "root",
@@ -2048,18 +1988,20 @@
2048
1988
  "width": 32
2049
1989
  }
2050
1990
  }
2051
- ],
2052
- "kind": "struct",
2053
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
1991
+ ]
2054
1992
  }
2055
1993
  },
2056
1994
  {
2057
1995
  "name": "partial",
2058
1996
  "type": {
1997
+ "kind": "struct",
1998
+ "path": "aztec::protocol_types::partial_state_reference::PartialStateReference",
2059
1999
  "fields": [
2060
2000
  {
2061
2001
  "name": "note_hash_tree",
2062
2002
  "type": {
2003
+ "kind": "struct",
2004
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
2063
2005
  "fields": [
2064
2006
  {
2065
2007
  "name": "root",
@@ -2075,14 +2017,14 @@
2075
2017
  "width": 32
2076
2018
  }
2077
2019
  }
2078
- ],
2079
- "kind": "struct",
2080
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
2020
+ ]
2081
2021
  }
2082
2022
  },
2083
2023
  {
2084
2024
  "name": "nullifier_tree",
2085
2025
  "type": {
2026
+ "kind": "struct",
2027
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
2086
2028
  "fields": [
2087
2029
  {
2088
2030
  "name": "root",
@@ -2098,14 +2040,14 @@
2098
2040
  "width": 32
2099
2041
  }
2100
2042
  }
2101
- ],
2102
- "kind": "struct",
2103
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
2043
+ ]
2104
2044
  }
2105
2045
  },
2106
2046
  {
2107
2047
  "name": "public_data_tree",
2108
2048
  "type": {
2049
+ "kind": "struct",
2050
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
2109
2051
  "fields": [
2110
2052
  {
2111
2053
  "name": "root",
@@ -2121,24 +2063,20 @@
2121
2063
  "width": 32
2122
2064
  }
2123
2065
  }
2124
- ],
2125
- "kind": "struct",
2126
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
2066
+ ]
2127
2067
  }
2128
2068
  }
2129
- ],
2130
- "kind": "struct",
2131
- "path": "aztec::protocol_types::partial_state_reference::PartialStateReference"
2069
+ ]
2132
2070
  }
2133
2071
  }
2134
- ],
2135
- "kind": "struct",
2136
- "path": "aztec::protocol_types::state_reference::StateReference"
2072
+ ]
2137
2073
  }
2138
2074
  },
2139
2075
  {
2140
2076
  "name": "global_variables",
2141
2077
  "type": {
2078
+ "kind": "struct",
2079
+ "path": "aztec::protocol_types::abis::global_variables::GlobalVariables",
2142
2080
  "fields": [
2143
2081
  {
2144
2082
  "name": "chain_id",
@@ -2175,6 +2113,8 @@
2175
2113
  {
2176
2114
  "name": "coinbase",
2177
2115
  "type": {
2116
+ "kind": "struct",
2117
+ "path": "aztec::protocol_types::address::eth_address::EthAddress",
2178
2118
  "fields": [
2179
2119
  {
2180
2120
  "name": "inner",
@@ -2182,14 +2122,14 @@
2182
2122
  "kind": "field"
2183
2123
  }
2184
2124
  }
2185
- ],
2186
- "kind": "struct",
2187
- "path": "aztec::protocol_types::address::eth_address::EthAddress"
2125
+ ]
2188
2126
  }
2189
2127
  },
2190
2128
  {
2191
2129
  "name": "fee_recipient",
2192
2130
  "type": {
2131
+ "kind": "struct",
2132
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
2193
2133
  "fields": [
2194
2134
  {
2195
2135
  "name": "inner",
@@ -2197,14 +2137,14 @@
2197
2137
  "kind": "field"
2198
2138
  }
2199
2139
  }
2200
- ],
2201
- "kind": "struct",
2202
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
2140
+ ]
2203
2141
  }
2204
2142
  },
2205
2143
  {
2206
2144
  "name": "gas_fees",
2207
2145
  "type": {
2146
+ "kind": "struct",
2147
+ "path": "aztec::protocol_types::abis::gas_fees::GasFees",
2208
2148
  "fields": [
2209
2149
  {
2210
2150
  "name": "fee_per_da_gas",
@@ -2218,14 +2158,10 @@
2218
2158
  "kind": "field"
2219
2159
  }
2220
2160
  }
2221
- ],
2222
- "kind": "struct",
2223
- "path": "aztec::protocol_types::abis::gas_fees::GasFees"
2161
+ ]
2224
2162
  }
2225
2163
  }
2226
- ],
2227
- "kind": "struct",
2228
- "path": "aztec::protocol_types::abis::global_variables::GlobalVariables"
2164
+ ]
2229
2165
  }
2230
2166
  },
2231
2167
  {
@@ -2240,14 +2176,14 @@
2240
2176
  "kind": "field"
2241
2177
  }
2242
2178
  }
2243
- ],
2244
- "kind": "struct",
2245
- "path": "aztec::protocol_types::block_header::BlockHeader"
2179
+ ]
2246
2180
  }
2247
2181
  },
2248
2182
  {
2249
2183
  "name": "tx_context",
2250
2184
  "type": {
2185
+ "kind": "struct",
2186
+ "path": "aztec::protocol_types::transaction::tx_context::TxContext",
2251
2187
  "fields": [
2252
2188
  {
2253
2189
  "name": "chain_id",
@@ -2264,10 +2200,14 @@
2264
2200
  {
2265
2201
  "name": "gas_settings",
2266
2202
  "type": {
2203
+ "kind": "struct",
2204
+ "path": "aztec::protocol_types::abis::gas_settings::GasSettings",
2267
2205
  "fields": [
2268
2206
  {
2269
2207
  "name": "gas_limits",
2270
2208
  "type": {
2209
+ "kind": "struct",
2210
+ "path": "aztec::protocol_types::abis::gas::Gas",
2271
2211
  "fields": [
2272
2212
  {
2273
2213
  "name": "da_gas",
@@ -2285,14 +2225,14 @@
2285
2225
  "width": 32
2286
2226
  }
2287
2227
  }
2288
- ],
2289
- "kind": "struct",
2290
- "path": "aztec::protocol_types::abis::gas::Gas"
2228
+ ]
2291
2229
  }
2292
2230
  },
2293
2231
  {
2294
2232
  "name": "teardown_gas_limits",
2295
2233
  "type": {
2234
+ "kind": "struct",
2235
+ "path": "aztec::protocol_types::abis::gas::Gas",
2296
2236
  "fields": [
2297
2237
  {
2298
2238
  "name": "da_gas",
@@ -2310,14 +2250,14 @@
2310
2250
  "width": 32
2311
2251
  }
2312
2252
  }
2313
- ],
2314
- "kind": "struct",
2315
- "path": "aztec::protocol_types::abis::gas::Gas"
2253
+ ]
2316
2254
  }
2317
2255
  },
2318
2256
  {
2319
2257
  "name": "max_fees_per_gas",
2320
2258
  "type": {
2259
+ "kind": "struct",
2260
+ "path": "aztec::protocol_types::abis::gas_fees::GasFees",
2321
2261
  "fields": [
2322
2262
  {
2323
2263
  "name": "fee_per_da_gas",
@@ -2331,14 +2271,14 @@
2331
2271
  "kind": "field"
2332
2272
  }
2333
2273
  }
2334
- ],
2335
- "kind": "struct",
2336
- "path": "aztec::protocol_types::abis::gas_fees::GasFees"
2274
+ ]
2337
2275
  }
2338
2276
  },
2339
2277
  {
2340
2278
  "name": "max_priority_fees_per_gas",
2341
2279
  "type": {
2280
+ "kind": "struct",
2281
+ "path": "aztec::protocol_types::abis::gas_fees::GasFees",
2342
2282
  "fields": [
2343
2283
  {
2344
2284
  "name": "fee_per_da_gas",
@@ -2352,19 +2292,13 @@
2352
2292
  "kind": "field"
2353
2293
  }
2354
2294
  }
2355
- ],
2356
- "kind": "struct",
2357
- "path": "aztec::protocol_types::abis::gas_fees::GasFees"
2295
+ ]
2358
2296
  }
2359
2297
  }
2360
- ],
2361
- "kind": "struct",
2362
- "path": "aztec::protocol_types::abis::gas_settings::GasSettings"
2298
+ ]
2363
2299
  }
2364
2300
  }
2365
- ],
2366
- "kind": "struct",
2367
- "path": "aztec::protocol_types::transaction::tx_context::TxContext"
2301
+ ]
2368
2302
  }
2369
2303
  },
2370
2304
  {
@@ -2375,9 +2309,7 @@
2375
2309
  "width": 32
2376
2310
  }
2377
2311
  }
2378
- ],
2379
- "kind": "struct",
2380
- "path": "aztec::context::inputs::private_context_inputs::PrivateContextInputs"
2312
+ ]
2381
2313
  },
2382
2314
  "visibility": "private"
2383
2315
  },
@@ -2400,14 +2332,20 @@
2400
2332
  ],
2401
2333
  "return_type": {
2402
2334
  "abi_type": {
2335
+ "kind": "struct",
2336
+ "path": "aztec::protocol_types::abis::private_circuit_public_inputs::PrivateCircuitPublicInputs",
2403
2337
  "fields": [
2404
2338
  {
2405
2339
  "name": "call_context",
2406
2340
  "type": {
2341
+ "kind": "struct",
2342
+ "path": "aztec::protocol_types::abis::call_context::CallContext",
2407
2343
  "fields": [
2408
2344
  {
2409
2345
  "name": "msg_sender",
2410
2346
  "type": {
2347
+ "kind": "struct",
2348
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
2411
2349
  "fields": [
2412
2350
  {
2413
2351
  "name": "inner",
@@ -2415,14 +2353,14 @@
2415
2353
  "kind": "field"
2416
2354
  }
2417
2355
  }
2418
- ],
2419
- "kind": "struct",
2420
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
2356
+ ]
2421
2357
  }
2422
2358
  },
2423
2359
  {
2424
2360
  "name": "contract_address",
2425
2361
  "type": {
2362
+ "kind": "struct",
2363
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
2426
2364
  "fields": [
2427
2365
  {
2428
2366
  "name": "inner",
@@ -2430,14 +2368,14 @@
2430
2368
  "kind": "field"
2431
2369
  }
2432
2370
  }
2433
- ],
2434
- "kind": "struct",
2435
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
2371
+ ]
2436
2372
  }
2437
2373
  },
2438
2374
  {
2439
2375
  "name": "function_selector",
2440
2376
  "type": {
2377
+ "kind": "struct",
2378
+ "path": "aztec::protocol_types::abis::function_selector::FunctionSelector",
2441
2379
  "fields": [
2442
2380
  {
2443
2381
  "name": "inner",
@@ -2447,9 +2385,7 @@
2447
2385
  "width": 32
2448
2386
  }
2449
2387
  }
2450
- ],
2451
- "kind": "struct",
2452
- "path": "aztec::protocol_types::abis::function_selector::FunctionSelector"
2388
+ ]
2453
2389
  }
2454
2390
  },
2455
2391
  {
@@ -2458,9 +2394,7 @@
2458
2394
  "kind": "boolean"
2459
2395
  }
2460
2396
  }
2461
- ],
2462
- "kind": "struct",
2463
- "path": "aztec::protocol_types::abis::call_context::CallContext"
2397
+ ]
2464
2398
  }
2465
2399
  },
2466
2400
  {
@@ -2492,10 +2426,14 @@
2492
2426
  {
2493
2427
  "name": "max_block_number",
2494
2428
  "type": {
2429
+ "kind": "struct",
2430
+ "path": "aztec::protocol_types::abis::max_block_number::MaxBlockNumber",
2495
2431
  "fields": [
2496
2432
  {
2497
2433
  "name": "_opt",
2498
2434
  "type": {
2435
+ "kind": "struct",
2436
+ "path": "std::option::Option",
2499
2437
  "fields": [
2500
2438
  {
2501
2439
  "name": "_is_some",
@@ -2511,14 +2449,10 @@
2511
2449
  "width": 32
2512
2450
  }
2513
2451
  }
2514
- ],
2515
- "kind": "struct",
2516
- "path": "std::option::Option"
2452
+ ]
2517
2453
  }
2518
2454
  }
2519
- ],
2520
- "kind": "struct",
2521
- "path": "aztec::protocol_types::abis::max_block_number::MaxBlockNumber"
2455
+ ]
2522
2456
  }
2523
2457
  },
2524
2458
  {
@@ -2527,6 +2461,8 @@
2527
2461
  "kind": "array",
2528
2462
  "length": 16,
2529
2463
  "type": {
2464
+ "kind": "struct",
2465
+ "path": "aztec::protocol_types::abis::read_request::ReadRequest",
2530
2466
  "fields": [
2531
2467
  {
2532
2468
  "name": "value",
@@ -2542,9 +2478,7 @@
2542
2478
  "width": 32
2543
2479
  }
2544
2480
  }
2545
- ],
2546
- "kind": "struct",
2547
- "path": "aztec::protocol_types::abis::read_request::ReadRequest"
2481
+ ]
2548
2482
  }
2549
2483
  }
2550
2484
  },
@@ -2554,6 +2488,8 @@
2554
2488
  "kind": "array",
2555
2489
  "length": 16,
2556
2490
  "type": {
2491
+ "kind": "struct",
2492
+ "path": "aztec::protocol_types::abis::read_request::ReadRequest",
2557
2493
  "fields": [
2558
2494
  {
2559
2495
  "name": "value",
@@ -2569,9 +2505,7 @@
2569
2505
  "width": 32
2570
2506
  }
2571
2507
  }
2572
- ],
2573
- "kind": "struct",
2574
- "path": "aztec::protocol_types::abis::read_request::ReadRequest"
2508
+ ]
2575
2509
  }
2576
2510
  }
2577
2511
  },
@@ -2581,14 +2515,20 @@
2581
2515
  "kind": "array",
2582
2516
  "length": 16,
2583
2517
  "type": {
2518
+ "kind": "struct",
2519
+ "path": "aztec::protocol_types::abis::validation_requests::key_validation_request_and_generator::KeyValidationRequestAndGenerator",
2584
2520
  "fields": [
2585
2521
  {
2586
2522
  "name": "request",
2587
2523
  "type": {
2524
+ "kind": "struct",
2525
+ "path": "aztec::protocol_types::abis::validation_requests::key_validation_request::KeyValidationRequest",
2588
2526
  "fields": [
2589
2527
  {
2590
2528
  "name": "pk_m",
2591
2529
  "type": {
2530
+ "kind": "struct",
2531
+ "path": "std::embedded_curve_ops::EmbeddedCurvePoint",
2592
2532
  "fields": [
2593
2533
  {
2594
2534
  "name": "x",
@@ -2608,9 +2548,7 @@
2608
2548
  "kind": "boolean"
2609
2549
  }
2610
2550
  }
2611
- ],
2612
- "kind": "struct",
2613
- "path": "std::embedded_curve_ops::EmbeddedCurvePoint"
2551
+ ]
2614
2552
  }
2615
2553
  },
2616
2554
  {
@@ -2619,9 +2557,7 @@
2619
2557
  "kind": "field"
2620
2558
  }
2621
2559
  }
2622
- ],
2623
- "kind": "struct",
2624
- "path": "aztec::protocol_types::abis::validation_requests::key_validation_request::KeyValidationRequest"
2560
+ ]
2625
2561
  }
2626
2562
  },
2627
2563
  {
@@ -2630,9 +2566,7 @@
2630
2566
  "kind": "field"
2631
2567
  }
2632
2568
  }
2633
- ],
2634
- "kind": "struct",
2635
- "path": "aztec::protocol_types::abis::validation_requests::key_validation_request_and_generator::KeyValidationRequestAndGenerator"
2569
+ ]
2636
2570
  }
2637
2571
  }
2638
2572
  },
@@ -2642,6 +2576,8 @@
2642
2576
  "kind": "array",
2643
2577
  "length": 16,
2644
2578
  "type": {
2579
+ "kind": "struct",
2580
+ "path": "aztec::protocol_types::abis::note_hash::NoteHash",
2645
2581
  "fields": [
2646
2582
  {
2647
2583
  "name": "value",
@@ -2657,9 +2593,7 @@
2657
2593
  "width": 32
2658
2594
  }
2659
2595
  }
2660
- ],
2661
- "kind": "struct",
2662
- "path": "aztec::protocol_types::abis::note_hash::NoteHash"
2596
+ ]
2663
2597
  }
2664
2598
  }
2665
2599
  },
@@ -2669,6 +2603,8 @@
2669
2603
  "kind": "array",
2670
2604
  "length": 16,
2671
2605
  "type": {
2606
+ "kind": "struct",
2607
+ "path": "aztec::protocol_types::abis::nullifier::Nullifier",
2672
2608
  "fields": [
2673
2609
  {
2674
2610
  "name": "value",
@@ -2690,9 +2626,7 @@
2690
2626
  "kind": "field"
2691
2627
  }
2692
2628
  }
2693
- ],
2694
- "kind": "struct",
2695
- "path": "aztec::protocol_types::abis::nullifier::Nullifier"
2629
+ ]
2696
2630
  }
2697
2631
  }
2698
2632
  },
@@ -2702,14 +2636,20 @@
2702
2636
  "kind": "array",
2703
2637
  "length": 5,
2704
2638
  "type": {
2639
+ "kind": "struct",
2640
+ "path": "aztec::protocol_types::abis::private_call_request::PrivateCallRequest",
2705
2641
  "fields": [
2706
2642
  {
2707
2643
  "name": "call_context",
2708
2644
  "type": {
2645
+ "kind": "struct",
2646
+ "path": "aztec::protocol_types::abis::call_context::CallContext",
2709
2647
  "fields": [
2710
2648
  {
2711
2649
  "name": "msg_sender",
2712
2650
  "type": {
2651
+ "kind": "struct",
2652
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
2713
2653
  "fields": [
2714
2654
  {
2715
2655
  "name": "inner",
@@ -2717,14 +2657,14 @@
2717
2657
  "kind": "field"
2718
2658
  }
2719
2659
  }
2720
- ],
2721
- "kind": "struct",
2722
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
2660
+ ]
2723
2661
  }
2724
2662
  },
2725
2663
  {
2726
2664
  "name": "contract_address",
2727
2665
  "type": {
2666
+ "kind": "struct",
2667
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
2728
2668
  "fields": [
2729
2669
  {
2730
2670
  "name": "inner",
@@ -2732,14 +2672,14 @@
2732
2672
  "kind": "field"
2733
2673
  }
2734
2674
  }
2735
- ],
2736
- "kind": "struct",
2737
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
2675
+ ]
2738
2676
  }
2739
2677
  },
2740
2678
  {
2741
2679
  "name": "function_selector",
2742
2680
  "type": {
2681
+ "kind": "struct",
2682
+ "path": "aztec::protocol_types::abis::function_selector::FunctionSelector",
2743
2683
  "fields": [
2744
2684
  {
2745
2685
  "name": "inner",
@@ -2749,9 +2689,7 @@
2749
2689
  "width": 32
2750
2690
  }
2751
2691
  }
2752
- ],
2753
- "kind": "struct",
2754
- "path": "aztec::protocol_types::abis::function_selector::FunctionSelector"
2692
+ ]
2755
2693
  }
2756
2694
  },
2757
2695
  {
@@ -2760,9 +2698,7 @@
2760
2698
  "kind": "boolean"
2761
2699
  }
2762
2700
  }
2763
- ],
2764
- "kind": "struct",
2765
- "path": "aztec::protocol_types::abis::call_context::CallContext"
2701
+ ]
2766
2702
  }
2767
2703
  },
2768
2704
  {
@@ -2793,9 +2729,7 @@
2793
2729
  "width": 32
2794
2730
  }
2795
2731
  }
2796
- ],
2797
- "kind": "struct",
2798
- "path": "aztec::protocol_types::abis::private_call_request::PrivateCallRequest"
2732
+ ]
2799
2733
  }
2800
2734
  }
2801
2735
  },
@@ -2805,14 +2739,20 @@
2805
2739
  "kind": "array",
2806
2740
  "length": 16,
2807
2741
  "type": {
2742
+ "kind": "struct",
2743
+ "path": "aztec::protocol_types::abis::side_effect::counted::Counted",
2808
2744
  "fields": [
2809
2745
  {
2810
2746
  "name": "inner",
2811
2747
  "type": {
2748
+ "kind": "struct",
2749
+ "path": "aztec::protocol_types::abis::public_call_request::PublicCallRequest",
2812
2750
  "fields": [
2813
2751
  {
2814
2752
  "name": "msg_sender",
2815
2753
  "type": {
2754
+ "kind": "struct",
2755
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
2816
2756
  "fields": [
2817
2757
  {
2818
2758
  "name": "inner",
@@ -2820,14 +2760,14 @@
2820
2760
  "kind": "field"
2821
2761
  }
2822
2762
  }
2823
- ],
2824
- "kind": "struct",
2825
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
2763
+ ]
2826
2764
  }
2827
2765
  },
2828
2766
  {
2829
2767
  "name": "contract_address",
2830
2768
  "type": {
2769
+ "kind": "struct",
2770
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
2831
2771
  "fields": [
2832
2772
  {
2833
2773
  "name": "inner",
@@ -2835,14 +2775,14 @@
2835
2775
  "kind": "field"
2836
2776
  }
2837
2777
  }
2838
- ],
2839
- "kind": "struct",
2840
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
2778
+ ]
2841
2779
  }
2842
2780
  },
2843
2781
  {
2844
2782
  "name": "function_selector",
2845
2783
  "type": {
2784
+ "kind": "struct",
2785
+ "path": "aztec::protocol_types::abis::function_selector::FunctionSelector",
2846
2786
  "fields": [
2847
2787
  {
2848
2788
  "name": "inner",
@@ -2852,9 +2792,7 @@
2852
2792
  "width": 32
2853
2793
  }
2854
2794
  }
2855
- ],
2856
- "kind": "struct",
2857
- "path": "aztec::protocol_types::abis::function_selector::FunctionSelector"
2795
+ ]
2858
2796
  }
2859
2797
  },
2860
2798
  {
@@ -2869,9 +2807,7 @@
2869
2807
  "kind": "field"
2870
2808
  }
2871
2809
  }
2872
- ],
2873
- "kind": "struct",
2874
- "path": "aztec::protocol_types::abis::public_call_request::PublicCallRequest"
2810
+ ]
2875
2811
  }
2876
2812
  },
2877
2813
  {
@@ -2882,19 +2818,21 @@
2882
2818
  "width": 32
2883
2819
  }
2884
2820
  }
2885
- ],
2886
- "kind": "struct",
2887
- "path": "aztec::protocol_types::abis::side_effect::counted::Counted"
2821
+ ]
2888
2822
  }
2889
2823
  }
2890
2824
  },
2891
2825
  {
2892
2826
  "name": "public_teardown_call_request",
2893
2827
  "type": {
2828
+ "kind": "struct",
2829
+ "path": "aztec::protocol_types::abis::public_call_request::PublicCallRequest",
2894
2830
  "fields": [
2895
2831
  {
2896
2832
  "name": "msg_sender",
2897
2833
  "type": {
2834
+ "kind": "struct",
2835
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
2898
2836
  "fields": [
2899
2837
  {
2900
2838
  "name": "inner",
@@ -2902,14 +2840,14 @@
2902
2840
  "kind": "field"
2903
2841
  }
2904
2842
  }
2905
- ],
2906
- "kind": "struct",
2907
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
2843
+ ]
2908
2844
  }
2909
2845
  },
2910
2846
  {
2911
2847
  "name": "contract_address",
2912
2848
  "type": {
2849
+ "kind": "struct",
2850
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
2913
2851
  "fields": [
2914
2852
  {
2915
2853
  "name": "inner",
@@ -2917,14 +2855,14 @@
2917
2855
  "kind": "field"
2918
2856
  }
2919
2857
  }
2920
- ],
2921
- "kind": "struct",
2922
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
2858
+ ]
2923
2859
  }
2924
2860
  },
2925
2861
  {
2926
2862
  "name": "function_selector",
2927
2863
  "type": {
2864
+ "kind": "struct",
2865
+ "path": "aztec::protocol_types::abis::function_selector::FunctionSelector",
2928
2866
  "fields": [
2929
2867
  {
2930
2868
  "name": "inner",
@@ -2934,9 +2872,7 @@
2934
2872
  "width": 32
2935
2873
  }
2936
2874
  }
2937
- ],
2938
- "kind": "struct",
2939
- "path": "aztec::protocol_types::abis::function_selector::FunctionSelector"
2875
+ ]
2940
2876
  }
2941
2877
  },
2942
2878
  {
@@ -2951,9 +2887,7 @@
2951
2887
  "kind": "field"
2952
2888
  }
2953
2889
  }
2954
- ],
2955
- "kind": "struct",
2956
- "path": "aztec::protocol_types::abis::public_call_request::PublicCallRequest"
2890
+ ]
2957
2891
  }
2958
2892
  },
2959
2893
  {
@@ -2962,10 +2896,14 @@
2962
2896
  "kind": "array",
2963
2897
  "length": 2,
2964
2898
  "type": {
2899
+ "kind": "struct",
2900
+ "path": "aztec::protocol_types::messaging::l2_to_l1_message::L2ToL1Message",
2965
2901
  "fields": [
2966
2902
  {
2967
2903
  "name": "recipient",
2968
2904
  "type": {
2905
+ "kind": "struct",
2906
+ "path": "aztec::protocol_types::address::eth_address::EthAddress",
2969
2907
  "fields": [
2970
2908
  {
2971
2909
  "name": "inner",
@@ -2973,9 +2911,7 @@
2973
2911
  "kind": "field"
2974
2912
  }
2975
2913
  }
2976
- ],
2977
- "kind": "struct",
2978
- "path": "aztec::protocol_types::address::eth_address::EthAddress"
2914
+ ]
2979
2915
  }
2980
2916
  },
2981
2917
  {
@@ -2992,9 +2928,7 @@
2992
2928
  "width": 32
2993
2929
  }
2994
2930
  }
2995
- ],
2996
- "kind": "struct",
2997
- "path": "aztec::protocol_types::messaging::l2_to_l1_message::L2ToL1Message"
2931
+ ]
2998
2932
  }
2999
2933
  }
3000
2934
  },
@@ -3004,10 +2938,14 @@
3004
2938
  "kind": "array",
3005
2939
  "length": 16,
3006
2940
  "type": {
2941
+ "kind": "struct",
2942
+ "path": "aztec::protocol_types::abis::private_log::PrivateLogData",
3007
2943
  "fields": [
3008
2944
  {
3009
2945
  "name": "log",
3010
2946
  "type": {
2947
+ "kind": "struct",
2948
+ "path": "aztec::protocol_types::abis::log::Log",
3011
2949
  "fields": [
3012
2950
  {
3013
2951
  "name": "fields",
@@ -3019,9 +2957,7 @@
3019
2957
  }
3020
2958
  }
3021
2959
  }
3022
- ],
3023
- "kind": "struct",
3024
- "path": "aztec::protocol_types::abis::log::Log"
2960
+ ]
3025
2961
  }
3026
2962
  },
3027
2963
  {
@@ -3040,9 +2976,7 @@
3040
2976
  "width": 32
3041
2977
  }
3042
2978
  }
3043
- ],
3044
- "kind": "struct",
3045
- "path": "aztec::protocol_types::abis::private_log::PrivateLogData"
2979
+ ]
3046
2980
  }
3047
2981
  }
3048
2982
  },
@@ -3052,6 +2986,8 @@
3052
2986
  "kind": "array",
3053
2987
  "length": 1,
3054
2988
  "type": {
2989
+ "kind": "struct",
2990
+ "path": "aztec::protocol_types::abis::log_hash::LogHash",
3055
2991
  "fields": [
3056
2992
  {
3057
2993
  "name": "value",
@@ -3075,9 +3011,7 @@
3075
3011
  "width": 32
3076
3012
  }
3077
3013
  }
3078
- ],
3079
- "kind": "struct",
3080
- "path": "aztec::protocol_types::abis::log_hash::LogHash"
3014
+ ]
3081
3015
  }
3082
3016
  }
3083
3017
  },
@@ -3100,10 +3034,14 @@
3100
3034
  {
3101
3035
  "name": "historical_header",
3102
3036
  "type": {
3037
+ "kind": "struct",
3038
+ "path": "aztec::protocol_types::block_header::BlockHeader",
3103
3039
  "fields": [
3104
3040
  {
3105
3041
  "name": "last_archive",
3106
3042
  "type": {
3043
+ "kind": "struct",
3044
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
3107
3045
  "fields": [
3108
3046
  {
3109
3047
  "name": "root",
@@ -3119,14 +3057,14 @@
3119
3057
  "width": 32
3120
3058
  }
3121
3059
  }
3122
- ],
3123
- "kind": "struct",
3124
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
3060
+ ]
3125
3061
  }
3126
3062
  },
3127
3063
  {
3128
3064
  "name": "content_commitment",
3129
3065
  "type": {
3066
+ "kind": "struct",
3067
+ "path": "aztec::protocol_types::content_commitment::ContentCommitment",
3130
3068
  "fields": [
3131
3069
  {
3132
3070
  "name": "num_txs",
@@ -3152,18 +3090,20 @@
3152
3090
  "kind": "field"
3153
3091
  }
3154
3092
  }
3155
- ],
3156
- "kind": "struct",
3157
- "path": "aztec::protocol_types::content_commitment::ContentCommitment"
3093
+ ]
3158
3094
  }
3159
3095
  },
3160
3096
  {
3161
3097
  "name": "state",
3162
3098
  "type": {
3099
+ "kind": "struct",
3100
+ "path": "aztec::protocol_types::state_reference::StateReference",
3163
3101
  "fields": [
3164
3102
  {
3165
3103
  "name": "l1_to_l2_message_tree",
3166
3104
  "type": {
3105
+ "kind": "struct",
3106
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
3167
3107
  "fields": [
3168
3108
  {
3169
3109
  "name": "root",
@@ -3179,18 +3119,20 @@
3179
3119
  "width": 32
3180
3120
  }
3181
3121
  }
3182
- ],
3183
- "kind": "struct",
3184
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
3122
+ ]
3185
3123
  }
3186
3124
  },
3187
3125
  {
3188
3126
  "name": "partial",
3189
3127
  "type": {
3128
+ "kind": "struct",
3129
+ "path": "aztec::protocol_types::partial_state_reference::PartialStateReference",
3190
3130
  "fields": [
3191
3131
  {
3192
3132
  "name": "note_hash_tree",
3193
3133
  "type": {
3134
+ "kind": "struct",
3135
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
3194
3136
  "fields": [
3195
3137
  {
3196
3138
  "name": "root",
@@ -3206,14 +3148,14 @@
3206
3148
  "width": 32
3207
3149
  }
3208
3150
  }
3209
- ],
3210
- "kind": "struct",
3211
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
3151
+ ]
3212
3152
  }
3213
3153
  },
3214
3154
  {
3215
3155
  "name": "nullifier_tree",
3216
3156
  "type": {
3157
+ "kind": "struct",
3158
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
3217
3159
  "fields": [
3218
3160
  {
3219
3161
  "name": "root",
@@ -3229,14 +3171,14 @@
3229
3171
  "width": 32
3230
3172
  }
3231
3173
  }
3232
- ],
3233
- "kind": "struct",
3234
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
3174
+ ]
3235
3175
  }
3236
3176
  },
3237
3177
  {
3238
3178
  "name": "public_data_tree",
3239
3179
  "type": {
3180
+ "kind": "struct",
3181
+ "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
3240
3182
  "fields": [
3241
3183
  {
3242
3184
  "name": "root",
@@ -3252,24 +3194,20 @@
3252
3194
  "width": 32
3253
3195
  }
3254
3196
  }
3255
- ],
3256
- "kind": "struct",
3257
- "path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
3197
+ ]
3258
3198
  }
3259
3199
  }
3260
- ],
3261
- "kind": "struct",
3262
- "path": "aztec::protocol_types::partial_state_reference::PartialStateReference"
3200
+ ]
3263
3201
  }
3264
3202
  }
3265
- ],
3266
- "kind": "struct",
3267
- "path": "aztec::protocol_types::state_reference::StateReference"
3203
+ ]
3268
3204
  }
3269
3205
  },
3270
3206
  {
3271
3207
  "name": "global_variables",
3272
3208
  "type": {
3209
+ "kind": "struct",
3210
+ "path": "aztec::protocol_types::abis::global_variables::GlobalVariables",
3273
3211
  "fields": [
3274
3212
  {
3275
3213
  "name": "chain_id",
@@ -3306,6 +3244,8 @@
3306
3244
  {
3307
3245
  "name": "coinbase",
3308
3246
  "type": {
3247
+ "kind": "struct",
3248
+ "path": "aztec::protocol_types::address::eth_address::EthAddress",
3309
3249
  "fields": [
3310
3250
  {
3311
3251
  "name": "inner",
@@ -3313,14 +3253,14 @@
3313
3253
  "kind": "field"
3314
3254
  }
3315
3255
  }
3316
- ],
3317
- "kind": "struct",
3318
- "path": "aztec::protocol_types::address::eth_address::EthAddress"
3256
+ ]
3319
3257
  }
3320
3258
  },
3321
3259
  {
3322
3260
  "name": "fee_recipient",
3323
3261
  "type": {
3262
+ "kind": "struct",
3263
+ "path": "aztec::protocol_types::address::aztec_address::AztecAddress",
3324
3264
  "fields": [
3325
3265
  {
3326
3266
  "name": "inner",
@@ -3328,14 +3268,14 @@
3328
3268
  "kind": "field"
3329
3269
  }
3330
3270
  }
3331
- ],
3332
- "kind": "struct",
3333
- "path": "aztec::protocol_types::address::aztec_address::AztecAddress"
3271
+ ]
3334
3272
  }
3335
3273
  },
3336
3274
  {
3337
3275
  "name": "gas_fees",
3338
3276
  "type": {
3277
+ "kind": "struct",
3278
+ "path": "aztec::protocol_types::abis::gas_fees::GasFees",
3339
3279
  "fields": [
3340
3280
  {
3341
3281
  "name": "fee_per_da_gas",
@@ -3349,14 +3289,10 @@
3349
3289
  "kind": "field"
3350
3290
  }
3351
3291
  }
3352
- ],
3353
- "kind": "struct",
3354
- "path": "aztec::protocol_types::abis::gas_fees::GasFees"
3292
+ ]
3355
3293
  }
3356
3294
  }
3357
- ],
3358
- "kind": "struct",
3359
- "path": "aztec::protocol_types::abis::global_variables::GlobalVariables"
3295
+ ]
3360
3296
  }
3361
3297
  },
3362
3298
  {
@@ -3371,14 +3307,14 @@
3371
3307
  "kind": "field"
3372
3308
  }
3373
3309
  }
3374
- ],
3375
- "kind": "struct",
3376
- "path": "aztec::protocol_types::block_header::BlockHeader"
3310
+ ]
3377
3311
  }
3378
3312
  },
3379
3313
  {
3380
3314
  "name": "tx_context",
3381
3315
  "type": {
3316
+ "kind": "struct",
3317
+ "path": "aztec::protocol_types::transaction::tx_context::TxContext",
3382
3318
  "fields": [
3383
3319
  {
3384
3320
  "name": "chain_id",
@@ -3395,10 +3331,14 @@
3395
3331
  {
3396
3332
  "name": "gas_settings",
3397
3333
  "type": {
3334
+ "kind": "struct",
3335
+ "path": "aztec::protocol_types::abis::gas_settings::GasSettings",
3398
3336
  "fields": [
3399
3337
  {
3400
3338
  "name": "gas_limits",
3401
3339
  "type": {
3340
+ "kind": "struct",
3341
+ "path": "aztec::protocol_types::abis::gas::Gas",
3402
3342
  "fields": [
3403
3343
  {
3404
3344
  "name": "da_gas",
@@ -3416,14 +3356,14 @@
3416
3356
  "width": 32
3417
3357
  }
3418
3358
  }
3419
- ],
3420
- "kind": "struct",
3421
- "path": "aztec::protocol_types::abis::gas::Gas"
3359
+ ]
3422
3360
  }
3423
3361
  },
3424
3362
  {
3425
3363
  "name": "teardown_gas_limits",
3426
3364
  "type": {
3365
+ "kind": "struct",
3366
+ "path": "aztec::protocol_types::abis::gas::Gas",
3427
3367
  "fields": [
3428
3368
  {
3429
3369
  "name": "da_gas",
@@ -3441,14 +3381,14 @@
3441
3381
  "width": 32
3442
3382
  }
3443
3383
  }
3444
- ],
3445
- "kind": "struct",
3446
- "path": "aztec::protocol_types::abis::gas::Gas"
3384
+ ]
3447
3385
  }
3448
3386
  },
3449
3387
  {
3450
3388
  "name": "max_fees_per_gas",
3451
3389
  "type": {
3390
+ "kind": "struct",
3391
+ "path": "aztec::protocol_types::abis::gas_fees::GasFees",
3452
3392
  "fields": [
3453
3393
  {
3454
3394
  "name": "fee_per_da_gas",
@@ -3462,14 +3402,14 @@
3462
3402
  "kind": "field"
3463
3403
  }
3464
3404
  }
3465
- ],
3466
- "kind": "struct",
3467
- "path": "aztec::protocol_types::abis::gas_fees::GasFees"
3405
+ ]
3468
3406
  }
3469
3407
  },
3470
3408
  {
3471
3409
  "name": "max_priority_fees_per_gas",
3472
3410
  "type": {
3411
+ "kind": "struct",
3412
+ "path": "aztec::protocol_types::abis::gas_fees::GasFees",
3473
3413
  "fields": [
3474
3414
  {
3475
3415
  "name": "fee_per_da_gas",
@@ -3483,30 +3423,32 @@
3483
3423
  "kind": "field"
3484
3424
  }
3485
3425
  }
3486
- ],
3487
- "kind": "struct",
3488
- "path": "aztec::protocol_types::abis::gas_fees::GasFees"
3426
+ ]
3489
3427
  }
3490
3428
  }
3491
- ],
3492
- "kind": "struct",
3493
- "path": "aztec::protocol_types::abis::gas_settings::GasSettings"
3429
+ ]
3494
3430
  }
3495
3431
  }
3496
- ],
3497
- "kind": "struct",
3498
- "path": "aztec::protocol_types::transaction::tx_context::TxContext"
3432
+ ]
3499
3433
  }
3500
3434
  }
3501
- ],
3502
- "kind": "struct",
3503
- "path": "aztec::protocol_types::abis::private_circuit_public_inputs::PrivateCircuitPublicInputs"
3435
+ ]
3504
3436
  },
3505
3437
  "visibility": "databus"
3438
+ },
3439
+ "error_types": {
3440
+ "5019202896831570965": {
3441
+ "error_kind": "string",
3442
+ "string": "attempt to add with overflow"
3443
+ },
3444
+ "17843811134343075018": {
3445
+ "error_kind": "string",
3446
+ "string": "Stack too deep"
3447
+ }
3506
3448
  }
3507
3449
  },
3508
3450
  "bytecode": "H4sIAAAAAAAA/+XdBXRT99/H8dSA4lYYE2yCQ9IkbYK7uztUUnQwbGPeubs7U+buynxj7r6xDTbcXZ/PdyTjNoSd8/x7s//zPs89533apunN63ebpGly87spnv1L7TSPZ0/q/s9TVFr0o51UP+602Efn5xkJzlchwWmVEpxWJcFp1RKcVkt1jDutXoLz1U9wWoMEpzVMcFqjBKc1VuU8JZeU6MeO0Y9+b04gEMnNjvj8vjxvdjg/FPQGgvk5IV/IFwwFC7NDfn8kFAjlhvPDud6wL+CP+IqCYX+Rd/9SJe3AurylWrILkums+p87/fEnmK26SndYbTvsdWz32OdNHJ9XjZ4n9nPV9HV1VUPVTDtwemxJjdsG3tItvkYubs+sNPdczuusrbe+Yxuleg69uHT52SkJLifF5W3f2L11eZNlbJIEY4nF7Su080pY2it0rSRdoWs5rtCxPzieJF/ZUjzJ/UWWdt254UihT7+ZZG6DamnJ2QZuO7PS/m//rmLOFMc67UFXiSX+hl3aG6Ob8Kae5Gxgt8fs4o3W1wwy5lQXx9wcMuY0F8fc4l8as7d0i6+li9uPcsfeysNweiFOH8SZDXH6Ic4AxBmEOHMgzlyIMwRxhiHO1hBnG4izLcTZDuJsD3F2gDg7QpydIM7OEGcXiLMrxNkN4uwOcfaAOHtCnL0gzt4QZx+Isy/E2Q/i7A9xDoA4B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GM6o/1ap9hoMBcccGQCxAltXS660ioGJ5BX6PdCAL+keSSNfknzSBqTlwZVkoZ/kIaA+YwmcDCiNZ8y2D/P4HIZQNlU+IWoodP3YA2EEa3BJEJsM3ClEx1M3EkGOih/g47lkc7ldcvSAafdGNyZiy7r7FVWkiCKr6SRN3oiPHsB+N8FoFQqzjBKVu6KkTcWfd009WZ+9ZrJ8KHsk8YQC2SWtzeMeLqLnu5iprvYiS7egoDMd4xdnEnDSVHfR+/ozY+yr8tFUwUtw+m+XUZpvTl8buNJFH/bd8tqte+r0IbUAeVzKygIwr8kDC/LgnnkdtpCLpT0WX3mLw==",
3451
+ "debug_symbols": "7VXbasMwDP0XP+fBkiVf+itjlLRNSyAkJU0Ho/TfZ5c6Tjt3I7ANBn0Jln0kHR1Z8UlsqtVxt6zbbXcQi5eTaLp1OdRd662TALrsHfZlG8zDUPaDWCBZV4iq3fglM50Lsa2bSiwAzLn4jEapIxrRjmhrc2BrTQQ7Lb8GAzumK9qvdYqNhnLBAUcmQJzQDnLRlVYxOIG8Qb8WAvgpzSNp9FOaR9KYvDSokjT8jTQEzFc0QSBxRWu+ZLC/nsHlMoCyqfCJqJzTFDQQRrQGkwhxrmVKJzqYuBMGOih/go7lkc70umXpgNNuDO7MpMteoMwFUpIgiq+kkXd6Ivz3AvCvC0CpVJxhlKzcDSNvrPq6aerd8uY1k+FD2SeNIRbILO9vGPF8Fz3fxcx3sTNdvAUBme8YuziTht3EUXpHb76VfV2umipoGU6P7TpK683hfR9Povj7vltXm2NfhTakDiifW0FBEP4lYXhZFswjt8sWcqGkz+ozfwA=",
3510
3452
  "brillig_names": [
3511
3453
  "store_in_execution_cache_oracle_wrapper",
3512
3454
  "enqueue_public_function_call_internal"
@@ -3514,37 +3456,88 @@
3514
3456
  "verification_key": "AAAAAAAQAAAAAAAAAAAAFAAAAAAAAAAQAAAAAAADKLEBAAAAAAAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAAL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ZsoFO3nzSfa7QDDPBKGC8SwRi041tS6Hkdjp07NsRyh80aWgMJw5VFRU0RZL1kYj6dlEts56JKCazJhDuCCUeAF/OkXwNXcoBlHfFL2B1MythIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACLPV2gZnZYfQM+No4iMb4FXhjXRNJpJ9ucKY6rdKRICIKRgLc+qTYcILEvW/a6RL17Ta/vMvVL4w5s+hzxHMVMgDENyb3W2/aDeIs4ODfq2vMegX/lalrKJQkxfczZw2WL5tuC04sAZaN5cMkgqp9HQoJ1xeOyTuteFj5bmTwtI0dWKphxkrVIgQ9ecSAIhnlW6GXUa3+bDYyTT+2wtoJiS18GKk8Pa5YgJ+q7saoanj0s7xh8Z1ucGk1m79H5/kH"
3515
3457
  },
3516
3458
  {
3517
- "name": "_check_block_number",
3459
+ "name": "sync_notes",
3518
3460
  "is_unconstrained": true,
3519
- "custom_attributes": [
3520
- "public",
3521
- "internal",
3522
- "view"
3523
- ],
3461
+ "custom_attributes": [],
3524
3462
  "abi": {
3463
+ "parameters": [],
3464
+ "return_type": null,
3525
3465
  "error_types": {
3526
- "10421965853029650238": {
3466
+ "2920182694213909827": {
3527
3467
  "error_kind": "string",
3528
- "string": "Function _check_block_number can only be called statically"
3468
+ "string": "attempt to subtract with overflow"
3529
3469
  },
3530
- "1433889167918961673": {
3470
+ "3305101268118424981": {
3471
+ "error_kind": "string",
3472
+ "string": "Attempted to delete past the length of a CapsuleArray"
3473
+ },
3474
+ "3367683922240523006": {
3531
3475
  "error_kind": "fmtstring",
3532
- "item_types": [],
3533
- "length": 17
3476
+ "length": 58,
3477
+ "item_types": [
3478
+ {
3479
+ "kind": "field"
3480
+ }
3481
+ ]
3534
3482
  },
3535
- "17843811134343075018": {
3483
+ "5019202896831570965": {
3536
3484
  "error_kind": "string",
3537
- "string": "Stack too deep"
3485
+ "string": "attempt to add with overflow"
3538
3486
  },
3539
- "2242946026394210301": {
3487
+ "5727012404371710682": {
3540
3488
  "error_kind": "string",
3541
- "string": "Block number mismatch."
3489
+ "string": "push out of bounds"
3542
3490
  },
3543
- "8209322232883590150": {
3491
+ "6753155520859132764": {
3544
3492
  "error_kind": "string",
3545
- "string": "Function _check_block_number can only be called internally"
3493
+ "string": "Failed to deliver note"
3494
+ },
3495
+ "8830323656616886390": {
3496
+ "error_kind": "string",
3497
+ "string": "Got a public log emitted by a different contract"
3498
+ },
3499
+ "13649294680379557736": {
3500
+ "error_kind": "string",
3501
+ "string": "extend_from_bounded_vec out of bounds"
3502
+ },
3503
+ "14657895983200220173": {
3504
+ "error_kind": "string",
3505
+ "string": "Attempted to read past the length of a CapsuleArray"
3506
+ },
3507
+ "16761564377371454734": {
3508
+ "error_kind": "string",
3509
+ "string": "Array index out of bounds"
3510
+ },
3511
+ "16775516380094354375": {
3512
+ "error_kind": "fmtstring",
3513
+ "length": 40,
3514
+ "item_types": []
3515
+ },
3516
+ "16954218183513903507": {
3517
+ "error_kind": "string",
3518
+ "string": "Attempted to read past end of BoundedVec"
3519
+ },
3520
+ "17843811134343075018": {
3521
+ "error_kind": "string",
3522
+ "string": "Stack too deep"
3546
3523
  }
3547
- },
3524
+ }
3525
+ },
3526
+ "bytecode": "H4sIAAAAAAAA/+1dXYhcyXWunu6eme6Z1rT+tV7J6/WPdjde2/03f5Jszb9GWv2sd9eGQCD0dLcUO+uVWWkNBkMmJBDyYkhiHPKSvDgEB4c4TmJsMAkO+SEQ/BQ2GILJQ1jIQyA4G5I8xLGudE/3N1+fW3175tRMa3cKhum+deo7p06dc+pU3bq3M65XMvH/nNtDEZBnCo/+x//cGNRnH/wtxd8reyvVAvG1xF+oNBYLSv8M5a8XYsxMGPyK4AfSf2Uixrm63cPHvgjfyQd/U/D5mOvZR6j+y/iF7P9xT5/Fdla3XbfY8G20BXttO0i/aoK/Hga/IfgbYfDrgn8lDH5F8DfD4FcjX4n85MuTj/CmH/wdibHvdO6vvH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//7x/Tf/nzb99//vn73//0j99+/ctPf/3Xbz/96edf/3L9b9/M7X/+23lnf3Ce3MUaP/y7SZd/t+ny78NW5ovcY364/E+4/h92OGHz5YQzF1su9vw/",
3528
+ "brillig_names": [
3529
+ "sync_notes"
3530
+ ]
3531
+ },
3532
+ {
3533
+ "name": "_check_timestamp",
3534
+ "is_unconstrained": true,
3535
+ "custom_attributes": [
3536
+ "public",
3537
+ "internal",
3538
+ "view"
3539
+ ],
3540
+ "abi": {
3548
3541
  "parameters": [
3549
3542
  {
3550
3543
  "name": "operation",
@@ -3558,30 +3551,23 @@
3558
3551
  {
3559
3552
  "name": "value",
3560
3553
  "type": {
3561
- "kind": "field"
3554
+ "kind": "integer",
3555
+ "sign": "unsigned",
3556
+ "width": 64
3562
3557
  },
3563
3558
  "visibility": "private"
3564
3559
  }
3565
3560
  ],
3566
- "return_type": null
3567
- },
3568
- "bytecode": "JwACBAEoAAABBIBLJwAABAMnAgMEAicCBAQAHxgABAADgEkdAIBJgEkCLgiASQABLgiASgACJQAAAFIlAAAAfSgCAAEEgEsnAgIEADsNAAEAAigAgEMCAAQoAIBEAgAGKACARQIAASgAgEYCAAIoAIBHAgAFKACASAIAAyYlAAADQR4CAAQBHgIABQAKOAQFBiQCAAYAAACeJQAAA2oeAgAECScCBQABCjgEBQYkAgAGAAAAuiUAAAN8HgIABAUKOAQCBQw4BAIGCygAAYBFAAInAgQBASQCAAIAAAMqIwAAAOMLKAABgEYABxYMBQgkAgAHAAADGCMAAAD8CygAAYBIAAkkAgAJAAADBiMAAAERCygAAYBDAAokAgAKAAAC7yMAAAEmCygAAYBHAAoWDAYLJAIACgAAAtgjAAABPwsoAAGARAAIJAIACAAAAsYjAAABVCcCAQJ2JwIIAm8nAgoCaScCCwJlJwIMAiAnAg0CbCcCDgJuJwIPAnQnAhACcCcCEQJkJwISAmEnAhMCSScCFAJyLQgBFScCFgQSABABFgEnAxUEAQAoFQIWLQwWFy0OExcAKBcCFy0ODhcAKBcCFy0OAR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YLE1V9NoEqhmO543AZ7GNHR/Q8nRA7I7tdKCRiGwC+GwB9njAY/AHAwOwKinl2pWexFz3EnDrqIYm6C5ahYIguB3uA88EATnIzSZ/jvi6tLN7drzt23kbBY929l7sBCHLBFKQHcKLpXgMgLj8rCa4HQP7+CgQ7o/QBTlj/GgAOufEx9wEi2koU3P0SiXQrqws9AIjGACcWyhEByBiArCsg6wrYugK2rkCsKxDrCtS6ArWuIFpXEI0rQOesAcwrMG7XCGgNYF2Bt67AW1cQgjWAGAOgtwZgYwACawDrVmG96KfTFGsAa6OJtdFEjQHU2mhq3SqitdGicasg610FWe8qyHpXQda7CgJjo5EP1gDGRqPgrQGsjYZgDWBtNOujBCJro5F1q2Bro7F1qxBro4l1q9D7jZbeRGQAOTzWHCCT31/I7hAa5YcJl8IkFqNJLEUTdlgMk1gKEwjFMNFSmPhiNBlhlzUSkxHei4zFhEphQsVoQsVowqWsO8zFeEeK6SdSTI/VYjTRYjSJvhgmpXhH/Ag/f7D7+v6dCBnh5Jw7/mkyHQPo1W+Q2qSrF/7HdRr9nSynk+dZs70z+fY1f9m7Qrn699Ec3ab8WC5emtevZdPeq9xdqWy9CQI1KCQy0C5zQLEGxnbYCgasNYhLqAn5Pw==",
3570
- "brillig_names": [
3571
- "_check_block_number"
3572
- ]
3573
- },
3574
- {
3575
- "name": "public_dispatch",
3576
- "is_unconstrained": true,
3577
- "custom_attributes": [
3578
- "public"
3579
- ],
3580
- "abi": {
3561
+ "return_type": null,
3581
3562
  "error_types": {
3582
- "10421965853029650238": {
3563
+ "1433889167918961673": {
3564
+ "error_kind": "fmtstring",
3565
+ "length": 17,
3566
+ "item_types": []
3567
+ },
3568
+ "8443716675528357851": {
3583
3569
  "error_kind": "string",
3584
- "string": "Function _check_block_number can only be called statically"
3570
+ "string": "Timestamp mismatch."
3585
3571
  },
3586
3572
  "11405868724477732285": {
3587
3573
  "error_kind": "string",
@@ -3591,60 +3577,74 @@
3591
3577
  "error_kind": "string",
3592
3578
  "string": "Function _check_timestamp can only be called statically"
3593
3579
  },
3594
- "1433889167918961673": {
3595
- "error_kind": "fmtstring",
3596
- "item_types": [],
3597
- "length": 17
3598
- },
3599
- "16761564377371454734": {
3600
- "error_kind": "string",
3601
- "string": "Array index out of bounds"
3602
- },
3603
3580
  "17843811134343075018": {
3604
3581
  "error_kind": "string",
3605
3582
  "string": "Stack too deep"
3583
+ }
3584
+ }
3585
+ },
3586
+ "bytecode": "JwACBAEoAAABBIBLJwAABAMnAgMEAicCBAQAHxgABAADgEkdAIBJgEkCHQCASoBKBS4IgEkAAS4IgEoAAiUAAABZJQAAAIQoAgABBIBLJwICBAA7DQABAAIoAIBDAgAEKACARAIABigAgEUCAAEoAIBGAgACKACARwIABSgAgEgCAAMmJQAAA1IeAgAEAR4CAAUACjgEBQYkAgAGAAAApSUAAAN7HgIABAknAgUAAQo4BAUGJAIABgAAAMElAAADjR4CAAQGHAwEBQAcDAIEAAo4BQQCDDgFBAYLKAABgEUABCcCBQEBJAIABAAAAzsjAAAA9AsoAAGARgAHFgwCCCQCAAcAAAMpIwAAAQ0LKAABgEgACSQCAAkAAAMXIwAAASILKAABgEMACiQCAAoAAAMAIwAAATcLKAABgEcAChYMBgskAgAKAAAC6SMAAAFQCygAAYBEAAgkAgAIAAAC1yMAAAFlJwIBAkknAggCZCcCCgJhJwILAnInAgwCbycCDQJpJwIOAnYnAg8CZScCEAIgJwIRAmwnAhICbicCEwJ0JwIUAnAtCAEVJwIWBBIAEAEWAScDFQQBACgVAhYtDBYXLQ4BFwAoFwIXLQ4SFwAoFwIXLQ4OFwAoFwIXLQ4KFwAoFwIXLQ4RFwAoFwIXLQ4NFwAoFwIXLQ4IFwAoFwIXLQ4QFwAoFwIXLQ4MFwAoFwIXLQ4UFwAoFwIXLQ4PFwAoFwIXLQ4LFwAoFwIXLQ4KFwAoFwIXLQ4TFwAoFwIXLQ4NFwAoFwIXLQ4MFwAoFwIXLQ4SFycCAQEAJwIIBAAKOAEFCiQCAAoAAALOJw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iin5OUA1i3g5AcAPoAB1MAAwaEB0AoMrcDQCiJaQUQrSGgFCaxAyKEB0AoYrYDRChxagQO3a/GMBkArELQCQStQQgMIGgC8bZHg0QARDIBe9AW96OdjJDQAutASutCSogHAhaYkaABwoSl7NAC40BS9q1D0rkLRuwr14EJTITQAutAE3SoUXWiKbhXoowRFHyXkNzRoAHSriOhCi+hWEdGFltCtIl1eaFHKuWm0j8eaI2TKY+14CC37dzaBfDVMqokJVxMTx9UwCbUw8VQNE62FiVQTkwl2WRMxmeC9yERMJtj1TMWkmphYNTGxatadWE3tpGr6SaqlxxrVEhOjemKSamHCtdSOyQRff6R7/PBOhE1wch46/iEOLhzFX79Bap1+vfBfv+XR3/l2Ob9dLQ5XMx9e1ne9m5q7f0+LT5c2n7abu8X9y3bRXt883txsd+xsMuMomQy3pcoZmYO1w3YXncXlTy2jZuT/",
3588
+ "brillig_names": [
3589
+ "_check_timestamp"
3590
+ ]
3591
+ },
3592
+ {
3593
+ "name": "_check_block_number",
3594
+ "is_unconstrained": true,
3595
+ "custom_attributes": [
3596
+ "public",
3597
+ "internal",
3598
+ "view"
3599
+ ],
3600
+ "abi": {
3601
+ "parameters": [
3602
+ {
3603
+ "name": "operation",
3604
+ "type": {
3605
+ "kind": "integer",
3606
+ "sign": "unsigned",
3607
+ "width": 8
3608
+ },
3609
+ "visibility": "private"
3606
3610
  },
3607
- "2242946026394210301": {
3608
- "error_kind": "string",
3609
- "string": "Block number mismatch."
3610
- },
3611
- "2830029349304997821": {
3611
+ {
3612
+ "name": "value",
3613
+ "type": {
3614
+ "kind": "field"
3615
+ },
3616
+ "visibility": "private"
3617
+ }
3618
+ ],
3619
+ "return_type": null,
3620
+ "error_types": {
3621
+ "1433889167918961673": {
3612
3622
  "error_kind": "fmtstring",
3613
- "item_types": [
3614
- {
3615
- "kind": "field"
3616
- }
3617
- ],
3618
- "length": 27
3623
+ "length": 17,
3624
+ "item_types": []
3619
3625
  },
3620
- "5019202896831570965": {
3626
+ "2242946026394210301": {
3621
3627
  "error_kind": "string",
3622
- "string": "attempt to add with overflow"
3628
+ "string": "Block number mismatch."
3623
3629
  },
3624
3630
  "8209322232883590150": {
3625
3631
  "error_kind": "string",
3626
3632
  "string": "Function _check_block_number can only be called internally"
3627
3633
  },
3628
- "8443716675528357851": {
3634
+ "10421965853029650238": {
3629
3635
  "error_kind": "string",
3630
- "string": "Timestamp mismatch."
3631
- }
3632
- },
3633
- "parameters": [
3634
- {
3635
- "name": "selector",
3636
- "type": {
3637
- "kind": "field"
3638
- },
3639
- "visibility": "private"
3636
+ "string": "Function _check_block_number can only be called statically"
3637
+ },
3638
+ "17843811134343075018": {
3639
+ "error_kind": "string",
3640
+ "string": "Stack too deep"
3640
3641
  }
3641
- ],
3642
- "return_type": null
3642
+ }
3643
3643
  },
3644
- "bytecode": "JwACBAEoAAABBIBVJwAABAMnAgIEAScCAwQAHxgAAwACgFQuCIBUAAElAAAARSUAAAC9KAIAAQSAVScCAgQAOw0AAQACKACAQwIABCgAgEQCAAYoAIBFAgABKACARgIAAigAgEcCAAUoAIBIAgADKACASQEAACgAgEoEAAAoAIBLAQABKACATAQAASgAgE0CACAoAIBOAgBlKACATwIAbCgAgFACAG4oAIBRAgBvKACAUgIAcigAgFMCAHQmJQAABaUpAgACAFivKuAKOAECAycCBAQAJwIGBAMAOAQGBS0IAQIAEAEFAScDAgQBACgCAgUtDgQFACgFAgUtDgQFJwIFBAMAOAIFBCcCBAQCJwIFAAEkAgADAAABICMAAAJ8LQgBAycCBgQDABABBgEnAwMEAQAoAwIGHzSATAAEAAYtDQMGACgGAgYtDgYDLQgBBgAAAQIBLQ4DBi0IAQMAAAECAS4KgEoAAycCCAQJLQgACS0MBgotDAMLABAACAAlAAAFzi0EAAAtDAoHASgAB4BMAAktDQkIHAwICQIcDAkHABwMBwgCJwIJBAotCAAKLQwGCy0MAwwAEAAJACUAAAXOLQQAAC0MCwcBKAAHgEwABi0NBgMcDAMHBRwMBwYAHgIAAwEeAgAHAAo4Aw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rt9+dJ0fhSv9dNQPgVz2QxB/RjlxMWzNBVw8rVz0mN9l9BwPlePwG0Y4iIT1Oj+5Ek/hSj8e9ePQvSgm6bzaNBwYs+Oce+w0nElU9T4nqmI4lDuOh8E+dnRET9MJsStktzMFpR8AvhkAfU4YDH4PYCS7gmLOLnTSsx5jTh31kETdGY8leYCY32zwAKeNAZzkZpK+x74urSze3a47Yqd7P89+dPdebgYgyAFTkAHAkaZ7CYC4/K4kuAEA+dsjEOwKZQhwpPQvAeCQGx/zECCirUTB3S6RSDezujAAgGgMcGSinBCAjAHIOgKyjoCtI2DrCMQ6ArGOQK0jUOsIonUE0TgCdM4awDwC43aNgNYA1hF46wi8dQQhWAOIMQB6awA2BiCwBrBuFdaTftpNsQawLjSxLjRRYwC1LjS1bhXRutCicasg61UFWa8qyHpVQdarCgLjQiMfrAGMC42CtwawLjQEawDrQrPeSiCyLjSybhVsXWhs3SrEutDEulXo7YWWTiIygOxva46QyecXstuERvlhwqUwicVoEkvRhB0WwySWwgRCMUy0FCa+GE0mWGVNxGSCc5GpmFApTKgYTagYTbiUeYe5mNqRYvqJFNNjtRhNtBhNoi+GSSm1I36Cvz/YPX54J0Im2Dnnjn9KpkMAvfgEqXW6eOK//0qjv7P1fPa4aLZ3Jl8+lk+9K5Sbf2/NwW3Kt/XqqXn+WDftvcrdlcq2NkGgBoVEBtppDijWwNgOW8GAtQZxCTUh/wc=",
3646
3646
  "brillig_names": [
3647
- "public_dispatch"
3647
+ "_check_block_number"
3648
3648
  ]
3649
3649
  }
3650
3650
  ],
@@ -3669,17 +3669,19 @@
3669
3669
  {
3670
3670
  "name": "value",
3671
3671
  "type": {
3672
- "kind": "field"
3672
+ "kind": "integer",
3673
+ "sign": "unsigned",
3674
+ "width": 64
3673
3675
  }
3674
3676
  }
3675
3677
  ],
3676
3678
  "kind": "struct",
3677
- "path": "Router::check_block_number_parameters"
3679
+ "path": "Router::check_timestamp_parameters"
3678
3680
  }
3679
3681
  }
3680
3682
  ],
3681
3683
  "kind": "struct",
3682
- "path": "Router::check_block_number_abi"
3684
+ "path": "Router::check_timestamp_abi"
3683
3685
  },
3684
3686
  {
3685
3687
  "fields": [
@@ -3698,19 +3700,17 @@
3698
3700
  {
3699
3701
  "name": "value",
3700
3702
  "type": {
3701
- "kind": "integer",
3702
- "sign": "unsigned",
3703
- "width": 64
3703
+ "kind": "field"
3704
3704
  }
3705
3705
  }
3706
3706
  ],
3707
3707
  "kind": "struct",
3708
- "path": "Router::_check_timestamp_parameters"
3708
+ "path": "Router::check_block_number_parameters"
3709
3709
  }
3710
3710
  }
3711
3711
  ],
3712
3712
  "kind": "struct",
3713
- "path": "Router::_check_timestamp_abi"
3713
+ "path": "Router::check_block_number_abi"
3714
3714
  },
3715
3715
  {
3716
3716
  "fields": [
@@ -3729,19 +3729,17 @@
3729
3729
  {
3730
3730
  "name": "value",
3731
3731
  "type": {
3732
- "kind": "integer",
3733
- "sign": "unsigned",
3734
- "width": 64
3732
+ "kind": "field"
3735
3733
  }
3736
3734
  }
3737
3735
  ],
3738
3736
  "kind": "struct",
3739
- "path": "Router::check_timestamp_parameters"
3737
+ "path": "Router::_check_block_number_parameters"
3740
3738
  }
3741
3739
  }
3742
3740
  ],
3743
3741
  "kind": "struct",
3744
- "path": "Router::check_timestamp_abi"
3742
+ "path": "Router::_check_block_number_abi"
3745
3743
  },
3746
3744
  {
3747
3745
  "fields": [
@@ -3760,79 +3758,81 @@
3760
3758
  {
3761
3759
  "name": "value",
3762
3760
  "type": {
3763
- "kind": "field"
3761
+ "kind": "integer",
3762
+ "sign": "unsigned",
3763
+ "width": 64
3764
3764
  }
3765
3765
  }
3766
3766
  ],
3767
3767
  "kind": "struct",
3768
- "path": "Router::_check_block_number_parameters"
3768
+ "path": "Router::_check_timestamp_parameters"
3769
3769
  }
3770
3770
  }
3771
3771
  ],
3772
3772
  "kind": "struct",
3773
- "path": "Router::_check_block_number_abi"
3773
+ "path": "Router::_check_timestamp_abi"
3774
3774
  }
3775
3775
  ]
3776
3776
  }
3777
3777
  },
3778
3778
  "file_map": {
3779
- "108": {
3780
- "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/macros/dispatch/mod.nr",
3779
+ "109": {
3780
+ "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/macros/aztec.nr",
3781
+ "source": "use crate::{\n discovery::private_notes::MAX_NOTE_PACKED_LEN,\n macros::{\n dispatch::generate_public_dispatch,\n functions::{\n stub_registry,\n utils::{create_message_discovery_call, find_and_transform_top_level_unconstrained_fns},\n },\n notes::{generate_note_export, NOTES},\n storage::STORAGE_LAYOUT_NAME,\n utils::{get_trait_impl_method, module_has_storage},\n },\n};\n\n/// Marks a contract as an Aztec contract, generating the interfaces for its functions and notes, as well as injecting\n/// the `process_log` and `sync_notes` functions PXE requires in order to discover notes.\n/// Note: This is a module annotation, so the returned quote gets injected inside the module (contract) itself.\npub comptime fn aztec(m: Module) -> Quoted {\n let interface = generate_contract_interface(m);\n\n find_and_transform_top_level_unconstrained_fns(m);\n\n let contract_library_method_compute_note_hash_and_nullifier =\n generate_contract_library_method_compute_note_hash_and_nullifier();\n let process_log = generate_process_log();\n let note_exports = generate_note_exports();\n let public_dispatch = generate_public_dispatch(m);\n let sync_notes = generate_sync_notes();\n\n quote {\n $note_exports\n $interface\n $contract_library_method_compute_note_hash_and_nullifier\n $process_log\n $public_dispatch\n $sync_notes\n }\n}\n\ncomptime fn generate_contract_interface(m: Module) -> Quoted {\n let module_name = m.name();\n let contract_stubs = stub_registry::get(m);\n let fn_stubs_quote = if contract_stubs.is_some() {\n contract_stubs.unwrap().join(quote {})\n } else {\n quote {}\n };\n\n let has_storage_layout = module_has_storage(m) & STORAGE_LAYOUT_NAME.get(m).is_some();\n let storage_layout_getter = if has_storage_layout {\n let storage_layout_name = STORAGE_LAYOUT_NAME.get(m).unwrap();\n quote {\n pub fn storage_layout() -> StorageLayoutFields {\n $storage_layout_name.fields\n }\n }\n } else {\n quote {}\n };\n\n let library_storage_layout_getter = if has_storage_layout {\n quote {\n #[contract_library_method]\n $storage_layout_getter\n }\n } else {\n quote {}\n };\n\n quote {\n pub struct $module_name {\n pub target_contract: dep::aztec::protocol_types::address::AztecAddress\n }\n\n impl $module_name {\n $fn_stubs_quote\n\n pub fn at(\n addr: aztec::protocol_types::address::AztecAddress\n ) -> Self {\n Self { target_contract: addr }\n }\n\n pub fn interface() -> Self {\n Self { target_contract: aztec::protocol_types::address::AztecAddress::zero() }\n }\n\n $storage_layout_getter\n }\n\n #[contract_library_method]\n pub fn at(\n addr: aztec::protocol_types::address::AztecAddress\n ) -> $module_name {\n $module_name { target_contract: addr }\n }\n\n #[contract_library_method]\n pub fn interface() -> $module_name {\n $module_name { target_contract: aztec::protocol_types::address::AztecAddress::zero() }\n }\n\n $library_storage_layout_getter\n\n }\n}\n\n/// Generates a contract library method called `_compute_note_hash_and_nullifier` which is used for note\n/// discovery (to create the `aztec::discovery::ComputeNoteHashAndNullifier` function) and to implement the\n/// `compute_note_hash_and_nullifier` unconstrained contract function.\ncomptime fn generate_contract_library_method_compute_note_hash_and_nullifier() -> Quoted {\n let notes = NOTES.entries();\n\n if notes.len() > 0 {\n let max_note_packed_len = notes.fold(\n 0,\n |acc, (_, (_, len, _, _)): (Type, (TypeDefinition, u32, Field, [(Quoted, u32, bool)]))| {\n if len > acc {\n len\n } else {\n acc\n }\n },\n );\n\n if max_note_packed_len > MAX_NOTE_PACKED_LEN {\n panic(\n f\"One of the notes has packed len {max_note_packed_len} but the maximum is {MAX_NOTE_PACKED_LEN}\",\n );\n }\n\n // Contracts that do define notes produce an if-else chain where `note_type_id` is matched against the\n // `get_note_type_id()` function of each note type that we know of, in order to identify the note type. Once we\n // know it we call we correct `unpack` method from the `Packable` trait to obtain the underlying note type, and\n // compute the note hash (non-siloed) and inner nullifier (also non-siloed).\n\n let mut if_note_type_id_match_statements_list = &[];\n for i in 0..notes.len() {\n let (typ, (_, packed_note_length, _, _)) = notes[i];\n\n let get_note_type_id = get_trait_impl_method(\n typ,\n quote { crate::note::note_interface::NoteType },\n quote { get_id },\n );\n let unpack = get_trait_impl_method(\n typ,\n quote { crate::protocol_types::traits::Packable<_> },\n quote { unpack },\n );\n\n let compute_note_hash = get_trait_impl_method(\n typ,\n quote { crate::note::note_interface::NoteHash },\n quote { compute_note_hash },\n );\n\n let compute_nullifier_unconstrained = get_trait_impl_method(\n typ,\n quote { crate::note::note_interface::NoteHash },\n quote { compute_nullifier_unconstrained },\n );\n\n let if_or_else_if = if i == 0 {\n quote { if }\n } else {\n quote { else if }\n };\n\n if_note_type_id_match_statements_list = if_note_type_id_match_statements_list.push_back(\n quote {\n $if_or_else_if note_type_id == $get_note_type_id() {\n // As an extra safety check we make sure that the packed_note BoundedVec has the expected\n // length, since we're about to interpret it's raw storage as a fixed-size array by calling the\n // unpack function on it.\n let expected_len = $packed_note_length;\n let actual_len = packed_note.len();\n assert(\n actual_len == expected_len,\n f\"Expected packed note of length {expected_len} but got {actual_len} for note type id {note_type_id}\"\n );\n\n let note = $unpack(aztec::utils::array::subarray(packed_note.storage(), 0));\n\n let note_hash = $compute_note_hash(note, storage_slot);\n \n // The message discovery process finds settled notes, that is, notes that were created in prior\n // transactions and are therefore already part of the note hash tree. We therefore compute the\n // nullification note hash by treating the note as a settled note with the provided nonce.\n let note_hash_for_nullify = aztec::note::utils::compute_note_hash_for_nullify(\n aztec::note::retrieved_note::RetrievedNote{ \n note, \n contract_address, \n metadata: aztec::note::note_metadata::SettledNoteMetadata::new(nonce).into() \n }, \n storage_slot,\n );\n\n let inner_nullifier = $compute_nullifier_unconstrained(note, note_hash_for_nullify);\n\n Option::some(\n aztec::discovery::NoteHashAndNullifier {\n note_hash, inner_nullifier\n }\n )\n }\n },\n );\n }\n\n let if_note_type_id_match_statements = if_note_type_id_match_statements_list.join(quote {});\n\n quote {\n /// Unpacks an array into a note corresponding to `note_type_id` and then computes its note hash\n /// (non-siloed) and inner nullifier (non-siloed) assuming the note has been inserted into the note hash\n /// tree with `nonce`.\n ///\n /// The signature of this function notably matches the `aztec::discovery::ComputeNoteHashAndNullifier` type,\n /// and so it can be used to call functions from that module such as `discover_new_messages`, \n /// `do_process_log` and `attempt_note_discovery`.\n ///\n /// This function is automatically injected by the `#[aztec]` macro.\n #[contract_library_method]\n unconstrained fn _compute_note_hash_and_nullifier(\n packed_note: BoundedVec<Field, aztec::discovery::private_notes::MAX_NOTE_PACKED_LEN>,\n storage_slot: Field,\n note_type_id: Field,\n contract_address: aztec::protocol_types::address::AztecAddress,\n nonce: Field,\n ) -> Option<aztec::discovery::NoteHashAndNullifier> {\n $if_note_type_id_match_statements\n else {\n Option::none()\n }\n }\n }\n } else {\n // Contracts with no notes still implement this function to avoid having special-casing, the implementation\n // simply throws immediately.\n quote {\n /// This contract does not use private notes, so this function should never be called as it will\n /// unconditionally fail.\n ///\n /// This function is automatically injected by the `#[aztec]` macro.\n #[contract_library_method]\n unconstrained fn _compute_note_hash_and_nullifier(\n _packed_note: BoundedVec<Field, aztec::discovery::private_notes::MAX_NOTE_PACKED_LEN>,\n _storage_slot: Field,\n _note_type_id: Field,\n _contract_address: aztec::protocol_types::address::AztecAddress,\n _nonce: Field,\n ) -> Option<aztec::discovery::NoteHashAndNullifier> {\n panic(f\"This contract does not use private notes\")\n }\n }\n }\n}\n\ncomptime fn generate_process_log() -> Quoted {\n // This mandatory function processes a log emitted by the contract. This is currently used to process private logs\n // and perform message discovery, resulting in new private notes, partial notes and events.\n // The bulk of the work of this function is done by aztec::discovery::do_process_log, so all we need to do is call\n // that function.\n\n // We'll produce the entire body of the function in one go and then insert it into the function.\n let notes = NOTES.entries();\n\n if notes.len() > 0 {\n quote {\n unconstrained fn process_log(\n log_ciphertext: BoundedVec<Field, dep::aztec::protocol_types::constants::PRIVATE_LOG_SIZE_IN_FIELDS>,\n tx_hash: Field,\n unique_note_hashes_in_tx: BoundedVec<Field, dep::aztec::protocol_types::constants::MAX_NOTE_HASHES_PER_TX>,\n first_nullifier_in_tx: Field,\n recipient: aztec::protocol_types::address::AztecAddress,\n ) {\n // Because this unconstrained function is injected after the contract is processed by the macros, it'll\n // not be modified by the macros that alter unconstrained functions. As such, we need to manually inject\n // the unconstrained execution context since it will not be available otherwise.\n let context = dep::aztec::context::unconstrained_context::UnconstrainedContext::new();\n\n // TODO(#10727): allow other contracts to process logs and deliver notes\n let contract_address = context.this_address();\n\n aztec::discovery::private_logs::do_process_log(\n contract_address,\n log_ciphertext,\n tx_hash,\n unique_note_hashes_in_tx,\n first_nullifier_in_tx,\n recipient,\n _compute_note_hash_and_nullifier,\n );\n }\n }\n } else {\n // Contracts with no notes still implement this function to avoid having special-casing, the implementation\n // simply throws immediately.\n quote {\n unconstrained fn process_log(\n _log_ciphertext: BoundedVec<Field, dep::aztec::protocol_types::constants::PRIVATE_LOG_SIZE_IN_FIELDS>,\n _tx_hash: Field,\n _unique_note_hashes_in_tx: BoundedVec<Field, dep::aztec::protocol_types::constants::MAX_NOTE_HASHES_PER_TX>,\n _first_nullifier_in_tx: Field,\n _recipient: aztec::protocol_types::address::AztecAddress,\n ) {\n panic(f\"This contract does not use private notes\")\n }\n }\n }\n}\n\ncomptime fn generate_note_exports() -> Quoted {\n let notes = NOTES.values();\n // Second value in each tuple is `note_packed_len` and that is ignored here because it's only used when\n // generating partial note helper functions.\n notes\n .map(|(s, _, note_type_id, fields): (TypeDefinition, u32, Field, [(Quoted, u32, bool)])| {\n generate_note_export(s, note_type_id, fields)\n })\n .join(quote {})\n}\n\ncomptime fn generate_sync_notes() -> Quoted {\n let message_discovery_call = create_message_discovery_call();\n quote {\n unconstrained fn sync_notes() {\n // Because this unconstrained function is injected after the contract is processed by the macros, it'll not\n // be modified by the macros that alter unconstrained functions. As such, we need to manually inject the\n // unconstrained execution context since it will not be available otherwise.\n let context = dep::aztec::context::unconstrained_context::UnconstrainedContext::new();\n\n $message_discovery_call\n }\n }\n}\n"
3782
+ },
3783
+ "110": {
3784
+ "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/macros/dispatch.nr",
3781
3785
  "source": "use super::utils::compute_fn_selector;\nuse std::panic;\n\n/// Returns an `fn public_dispatch(...)` function for the given module that's assumed to be an Aztec contract.\npub comptime fn generate_public_dispatch(m: Module) -> Quoted {\n let functions = m.functions();\n let functions =\n functions.filter(|function: FunctionDefinition| function.has_named_attribute(\"public\"));\n\n let unit = get_type::<()>();\n\n let ifs = functions.map(|function: FunctionDefinition| {\n let name = function.name();\n let parameters = function.parameters();\n let return_type = function.return_type();\n\n let selector: Field = compute_fn_selector(function);\n\n let mut parameters_size = 0;\n for param in parameters {\n parameters_size += size_in_fields(param.1);\n }\n\n let initial_read = if parameters.len() == 0 {\n quote {}\n } else {\n // The initial calldata_copy offset is 1 to skip the Field selector\n // The expected calldata is the serialization of\n // - FunctionSelector: the selector of the function intended to dispatch\n // - Parameters: the parameters of the function intended to dispatch\n // That is, exactly what is expected for a call to the target function,\n // but with a selector added at the beginning.\n quote {\n let input_calldata: [Field; $parameters_size] = dep::aztec::context::public_context::calldata_copy(1, $parameters_size);\n let mut reader = dep::aztec::protocol_types::utils::reader::Reader::new(input_calldata);\n }\n };\n\n let parameter_index = &mut 0;\n let reads = parameters.map(|param: (Quoted, Type)| {\n let parameter_index_value = *parameter_index;\n let param_name = f\"arg{parameter_index_value}\".quoted_contents();\n let param_type = param.1;\n let read = quote {\n let $param_name: $param_type = reader.read_struct(dep::aztec::protocol_types::traits::Deserialize::deserialize);\n };\n *parameter_index += 1;\n quote { $read }\n });\n let read = reads.join(quote { });\n\n let mut args = &[];\n for parameter_index in 0..parameters.len() {\n let param_name = f\"arg{parameter_index}\".quoted_contents();\n args = args.push_back(quote { $param_name });\n }\n\n let args = args.join(quote { , });\n let call = quote { $name($args) };\n\n let return_code = if return_type == unit {\n quote {\n $call;\n // Force early return.\n dep::aztec::context::public_context::avm_return([]);\n }\n } else {\n quote {\n let return_value = dep::aztec::protocol_types::traits::Serialize::serialize($call);\n dep::aztec::context::public_context::avm_return(return_value.as_slice());\n }\n };\n\n let if_ = quote {\n if selector == $selector {\n $initial_read\n $read\n $return_code\n }\n };\n if_\n });\n\n if ifs.len() == 0 {\n // No dispatch function if there are no public functions\n quote {}\n } else {\n let ifs = ifs.push_back(quote { panic(f\"Unknown selector {selector}\") });\n let dispatch = ifs.join(quote { });\n\n let body = quote {\n // We mark this as public because our whole system depends on public\n // functions having this attribute. However, the public MACRO will\n // handle the public_dispatch function specially and do nothing.\n #[public]\n pub unconstrained fn public_dispatch(selector: Field) {\n $dispatch\n }\n };\n\n body\n }\n}\n\ncomptime fn size_in_fields(typ: Type) -> u32 {\n let size = array_size_in_fields(typ);\n let size = size.or_else(|| bool_size_in_fields(typ));\n let size = size.or_else(|| constant_size_in_fields(typ));\n let size = size.or_else(|| field_size_in_fields(typ));\n let size = size.or_else(|| int_size_in_fields(typ));\n let size = size.or_else(|| str_size_in_fields(typ));\n let size = size.or_else(|| struct_size_in_fields(typ));\n let size = size.or_else(|| tuple_size_in_fields(typ));\n if size.is_some() {\n size.unwrap()\n } else {\n panic(f\"Can't determine size in fields of {typ}\")\n }\n}\n\ncomptime fn array_size_in_fields(typ: Type) -> Option<u32> {\n typ.as_array().and_then(|typ: (Type, Type)| {\n let (typ, element_size) = typ;\n element_size.as_constant().map(|x: u32| x * size_in_fields(typ))\n })\n}\n\ncomptime fn bool_size_in_fields(typ: Type) -> Option<u32> {\n if typ.is_bool() {\n Option::some(1)\n } else {\n Option::none()\n }\n}\n\ncomptime fn field_size_in_fields(typ: Type) -> Option<u32> {\n if typ.is_field() {\n Option::some(1)\n } else {\n Option::none()\n }\n}\n\ncomptime fn int_size_in_fields(typ: Type) -> Option<u32> {\n if typ.as_integer().is_some() {\n Option::some(1)\n } else {\n Option::none()\n }\n}\n\ncomptime fn constant_size_in_fields(typ: Type) -> Option<u32> {\n typ.as_constant()\n}\n\ncomptime fn str_size_in_fields(typ: Type) -> Option<u32> {\n typ.as_str().map(|typ| size_in_fields(typ))\n}\n\ncomptime fn struct_size_in_fields(typ: Type) -> Option<u32> {\n typ.as_data_type().map(|typ: (TypeDefinition, [Type])| {\n let struct_type = typ.0;\n let generics = typ.1;\n let mut size = 0;\n for field in struct_type.fields(generics) {\n size += size_in_fields(field.1);\n }\n size\n })\n}\n\ncomptime fn tuple_size_in_fields(typ: Type) -> Option<u32> {\n typ.as_tuple().map(|types: [Type]| {\n let mut size = 0;\n for typ in types {\n size += size_in_fields(typ);\n }\n size\n })\n}\n\ncomptime fn get_type<T>() -> Type {\n let t: T = std::mem::zeroed();\n std::meta::type_of(t)\n}\n"
3782
3786
  },
3783
- "115": {
3787
+ "117": {
3784
3788
  "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/macros/functions/utils.nr",
3785
- "source": "use crate::macros::{\n functions::{abi_export::create_fn_abi_export, call_interface_stubs::stub_fn, stub_registry},\n notes::NOTES,\n utils::{\n add_to_hasher, fn_has_noinitcheck, get_fn_visibility, is_fn_initializer, is_fn_internal,\n is_fn_private, is_fn_public, is_fn_view, modify_fn_body, module_has_initializer,\n module_has_storage,\n },\n};\nuse protocol_types::meta::generate_serialize_to_fields;\nuse std::meta::type_of;\n\npub(crate) comptime fn transform_private(f: FunctionDefinition) -> Quoted {\n let fn_abi = create_fn_abi_export(f);\n let fn_stub = stub_fn(f);\n stub_registry::register(f.module(), fn_stub);\n\n // If a function is further modified as unconstrained, we throw an error\n if f.is_unconstrained() {\n let name = f.name();\n panic(\n f\"Function {name} is annotated with #[private] but marked as unconstrained, remove unconstrained keyword\",\n );\n }\n\n let module_has_initializer = module_has_initializer(f.module());\n let module_has_storage = module_has_storage(f.module());\n\n // Private functions undergo a lot of transformations from their Aztec.nr form into a circuit that can be fed to the\n // Private Kernel Circuit.\n // First we change the function signature so that it also receives `PrivateContextInputs`, which contain information\n // about the execution context (e.g. the caller).\n let original_params = f.parameters();\n f.set_parameters(&[(\n quote { inputs },\n quote { crate::context::inputs::private_context_inputs::PrivateContextInputs }.as_type(),\n )]\n .append(original_params));\n\n let mut body = f.body().as_block().unwrap();\n\n // The original params are hashed and passed to the `context` object, so that the kernel can verify we've received\n // the correct values.\n // TODO: Optimize args_hasher for small number of arguments\n let args_hasher_name = quote { args_hasher };\n let args_hasher = original_params.fold(\n quote {\n let mut $args_hasher_name = dep::aztec::hash::ArgsHasher::new();\n },\n |args_hasher, param: (Quoted, Type)| {\n let (name, typ) = param;\n let appended_arg = add_to_hasher(args_hasher_name, name, typ);\n quote {\n $args_hasher\n $appended_arg\n }\n },\n );\n\n let context_creation = quote {\n let mut context = dep::aztec::context::private_context::PrivateContext::new(inputs, dep::aztec::protocol_types::traits::Hash::hash($args_hasher_name));\n };\n\n // Modifications introduced by the different marker attributes.\n let internal_check = if is_fn_internal(f) {\n create_internal_check(f)\n } else {\n quote {}\n };\n\n let view_check = if is_fn_view(f) {\n create_view_check(f)\n } else {\n quote {}\n };\n\n let (assert_initializer, mark_as_initialized) = if is_fn_initializer(f) {\n (create_assert_correct_initializer_args(f), create_mark_as_initialized(f))\n } else {\n (quote {}, quote {})\n };\n\n let storage_init = if module_has_storage {\n quote {\n // Some functions don't access storage, but it'd be quite difficult to only inject this variable if it is\n // referenced. We instead ignore 'unused variable' warnings for it.\n #[allow(unused_variables)]\n let storage = Storage::init(&mut context);\n }\n } else {\n quote {}\n };\n\n // Initialization checks are not included in contracts that don't have initializers.\n let init_check = if module_has_initializer & !is_fn_initializer(f) & !fn_has_noinitcheck(f) {\n create_init_check(f)\n } else {\n quote {}\n };\n\n // All private functions perform note discovery, since they may need to access notes. This is slightly inefficient\n // and could be improved by only doing it once we actually attempt to read any.\n let note_discovery_call = if NOTES.len() > 0 {\n create_note_discovery_call()\n } else {\n quote {}\n };\n\n // Finally, we need to change the return type to be `PrivateCircuitPublicInputs`, which is what the Private Kernel\n // circuit expects.\n let return_value_var_name = quote { macro__returned__values };\n\n let return_value_type = f.return_type();\n let return_value = if body.len() == 0 {\n quote {}\n } else if return_value_type != type_of(()) {\n // The original return value is passed to a second args hasher which the context receives.\n let (body_without_return, last_body_expr) = body.pop_back();\n let return_value = last_body_expr.quoted();\n let return_value_assignment =\n quote { let $return_value_var_name: $return_value_type = $return_value; };\n let return_hasher_name = quote { return_hasher };\n let return_value_into_hasher =\n add_to_hasher(return_hasher_name, return_value_var_name, return_value_type);\n\n body = body_without_return;\n\n quote {\n let mut $return_hasher_name = dep::aztec::hash::ArgsHasher::new();\n $return_value_assignment\n $return_value_into_hasher\n context.set_return_hash($return_hasher_name);\n }\n } else {\n let (body_without_return, last_body_expr) = body.pop_back();\n if !last_body_expr.has_semicolon()\n & last_body_expr.as_for().is_none()\n & last_body_expr.as_assert().is_none()\n & last_body_expr.as_for_range().is_none()\n & last_body_expr.as_assert_eq().is_none()\n & last_body_expr.as_let().is_none() {\n let unused_return_value_name = f\"_{return_value_var_name}\".quoted_contents();\n body = body_without_return.push_back(\n quote { let $unused_return_value_name = $last_body_expr; }.as_expr().unwrap(),\n );\n }\n quote {}\n };\n\n let context_finish = quote { context.finish() };\n\n let to_prepend = quote {\n $args_hasher\n $context_creation\n $assert_initializer\n $init_check\n $internal_check\n $view_check\n $storage_init\n $note_discovery_call\n };\n\n let to_append = quote {\n $return_value\n $mark_as_initialized\n $context_finish\n };\n let modified_body = modify_fn_body(body, to_prepend, to_append);\n f.set_body(modified_body);\n f.set_return_type(\n quote { dep::protocol_types::abis::private_circuit_public_inputs::PrivateCircuitPublicInputs }\n .as_type(),\n );\n f.set_return_data();\n\n fn_abi\n}\n\npub(crate) comptime fn transform_public(f: FunctionDefinition) -> Quoted {\n let fn_abi = create_fn_abi_export(f);\n let fn_stub = stub_fn(f);\n stub_registry::register(f.module(), fn_stub);\n\n // If a function is further modified as unconstrained, we throw an error\n if f.is_unconstrained() {\n let name = f.name();\n panic(\n f\"Function {name} is annotated with #[public] but marked as unconstrained, remove unconstrained keyword\",\n );\n }\n\n let module_has_initializer = module_has_initializer(f.module());\n let module_has_storage = module_has_storage(f.module());\n\n // Public functions undergo a lot of transformations from their Aztec.nr form.\n let original_params = f.parameters();\n let args_len = original_params\n .map(|(name, typ): (Quoted, Type)| {\n generate_serialize_to_fields(name, typ, &[], false).0.len()\n })\n .fold(0, |acc: u32, val: u32| acc + val);\n\n // Unlike in the private case, in public the `context` does not need to receive the hash of the original params.\n let context_creation = quote {\n let mut context = dep::aztec::context::public_context::PublicContext::new(|| {\n // We start from 1 because we skip the selector for the dispatch function.\n let serialized_args : [Field; $args_len] = dep::aztec::context::public_context::calldata_copy(1, $args_len);\n dep::aztec::hash::hash_args_array(serialized_args)\n });\n };\n\n // Modifications introduced by the different marker attributes.\n let internal_check = if is_fn_internal(f) {\n create_internal_check(f)\n } else {\n quote {}\n };\n\n let view_check = if is_fn_view(f) {\n create_view_check(f)\n } else {\n quote {}\n };\n\n let (assert_initializer, mark_as_initialized) = if is_fn_initializer(f) {\n (create_assert_correct_initializer_args(f), create_mark_as_initialized(f))\n } else {\n (quote {}, quote {})\n };\n\n let storage_init = if module_has_storage {\n // Some functions don't access storage, but it'd be quite difficult to only inject this variable if it is\n // referenced. We instead ignore 'unused variable' warnings for it.\n quote {\n #[allow(unused_variables)]\n let storage = Storage::init(&mut context);\n }\n } else {\n quote {}\n };\n\n // Initialization checks are not included in contracts that don't have initializers.\n let init_check = if module_has_initializer & !fn_has_noinitcheck(f) & !is_fn_initializer(f) {\n create_init_check(f)\n } else {\n quote {}\n };\n\n let to_prepend = quote {\n $context_creation\n $assert_initializer\n $init_check\n $internal_check\n $view_check\n $storage_init\n };\n\n let to_append = quote {\n $mark_as_initialized\n };\n\n let body = f.body().as_block().unwrap();\n let modified_body = modify_fn_body(body, to_prepend, to_append);\n f.set_body(modified_body);\n\n // All public functions are automatically made unconstrained, even if they were not marked as such. This is because\n // instead of compiling into a circuit, they will compile to bytecode that will be later transpiled into AVM\n // bytecode.\n f.set_unconstrained(true);\n f.set_return_public(true);\n\n fn_abi\n}\n\npub(crate) comptime fn find_and_transform_top_level_unconstrained_fns(m: Module) {\n // Top-level unconstrained fns are contract entrypoints, but they're not explicitly designated in any way. They're\n // the fallback case for a function that matches no other rules.\n // TODO(#12743): improve this\n\n // We first find non-standard contract entrypoints, i.e. functions in the `contract` mod that are not private or\n // public, but which *are* contract entrypoints (i.e. they're not opting out via the #[test] or\n // #[contract_library_method] attributes). Ideally entrypoints would be explicitly designated instead.\n let non_private_public_entrypoint_functions = m.functions().filter(|f: FunctionDefinition| {\n !is_fn_private(f)\n & !is_fn_public(f)\n & !f.has_named_attribute(\"contract_library_method\")\n & !f.has_named_attribute(\"test\")\n });\n\n // TODO: uncomment the code below and emit a warning once support for them is added to Noir (tracked in\n // https://github.com/noir-lang/noir/issues/7714). We can't simply print a message since that'd otherwise break the\n // output of utils such as `nargo test --list-tests`.\n // // We don't expect to see any custom constrained entrypoints (i.e. private functions created outside of aztec-nr's\n // // #[private] macro, possibly resulting in a non-standard interface).\n // for f in non_private_public_entrypoint_functions.filter(|f: FunctionDefinition| {\n // !f.is_unconstrained()\n // }) {\n // let name = f.name();\n // warn(\n // f\"found private contract function '{name}' which does not have the #[private] attribute - make sure you know what you're doing!\",\n // );\n // }\n\n // An unconstrained contract entrypoints is what we call a top-level unconstrained function, to which we apply the\n // appropriate transformation. Ideally these would be explicitly designated as such instead.\n for f in non_private_public_entrypoint_functions.filter(|f: FunctionDefinition| {\n f.is_unconstrained()\n }) {\n transform_top_level_unconstrained(f);\n }\n}\n\npub(crate) comptime fn transform_top_level_unconstrained(f: FunctionDefinition) {\n let context_creation = quote { let mut context = dep::aztec::context::unconstrained_context::UnconstrainedContext::new(); };\n let module_has_storage = module_has_storage(f.module());\n\n let storage_init = if module_has_storage {\n quote {\n // Some functions don't access storage, but it'd be quite difficult to only inject this variable if it is\n // referenced. We instead ignore 'unused variable' warnings for it.\n #[allow(unused_variables)]\n let storage = Storage::init(context);\n }\n } else {\n quote {}\n };\n\n // All unconstrained functions perform note discovery, since they may need to access notes. This is slightly\n // inefficient and could be improved by only doing it once we actually attempt to read any.\n let note_discovery_call = if NOTES.len() > 0 {\n create_note_discovery_call()\n } else {\n quote {}\n };\n\n let to_prepend = quote {\n $context_creation\n $storage_init\n $note_discovery_call\n };\n let body = f.body().as_block().unwrap();\n let modified_body = modify_fn_body(body, to_prepend, quote {});\n f.set_return_public(true);\n f.set_body(modified_body);\n}\n\ncomptime fn create_internal_check(f: FunctionDefinition) -> Quoted {\n let name = f.name();\n let assertion_message = f\"Function {name} can only be called internally\";\n quote { assert(context.msg_sender() == context.this_address(), $assertion_message); }\n}\n\ncomptime fn create_view_check(f: FunctionDefinition) -> Quoted {\n let name = f.name();\n let assertion_message = f\"Function {name} can only be called statically\";\n if is_fn_private(f) {\n // Here `context` is of type context::PrivateContext\n quote { assert(context.inputs.call_context.is_static_call == true, $assertion_message); }\n } else {\n // Here `context` is of type context::PublicContext\n quote { assert(context.is_static_call(), $assertion_message); }\n }\n}\n\ncomptime fn create_assert_correct_initializer_args(f: FunctionDefinition) -> Quoted {\n let fn_visibility = get_fn_visibility(f);\n f\"dep::aztec::macros::functions::initialization_utils::assert_initialization_matches_address_preimage_{fn_visibility}(context);\"\n .quoted_contents()\n}\n\ncomptime fn create_mark_as_initialized(f: FunctionDefinition) -> Quoted {\n let fn_visibility = get_fn_visibility(f);\n f\"dep::aztec::macros::functions::initialization_utils::mark_as_initialized_{fn_visibility}(&mut context);\"\n .quoted_contents()\n}\n\ncomptime fn create_init_check(f: FunctionDefinition) -> Quoted {\n let fn_visibility = get_fn_visibility(f);\n f\"dep::aztec::macros::functions::initialization_utils::assert_is_initialized_{fn_visibility}(&mut context);\"\n .quoted_contents()\n}\n\n/// Injects a call to `aztec::discovery::discover_new_notes`, causing for new notes to be added to PXE and made\n/// available for the current execution.\npub(crate) comptime fn create_note_discovery_call() -> Quoted {\n quote {\n /// Safety: note discovery returns nothing and is performed solely for its side-effects. It is therefore always\n /// safe to call.\n unsafe {\n dep::aztec::discovery::discover_new_notes(\n context.this_address(),\n _compute_note_hash_and_nullifier,\n );\n };\n }\n}\n"
3786
- },
3787
- "116": {
3788
- "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/macros/mod.nr",
3789
- "source": "pub mod dispatch;\npub mod functions;\npub mod utils;\npub mod notes;\npub mod storage;\npub mod events;\n\nuse functions::{\n stub_registry,\n utils::{create_note_discovery_call, find_and_transform_top_level_unconstrained_fns},\n};\nuse notes::{generate_note_export, NOTES};\nuse storage::STORAGE_LAYOUT_NAME;\n\nuse dispatch::generate_public_dispatch;\nuse utils::{get_trait_impl_method, module_has_storage};\n\nuse crate::discovery::MAX_NOTE_PACKED_LEN;\n\n/// Marks a contract as an Aztec contract, generating the interfaces for its functions and notes, as well as injecting\n/// the `process_log` and `sync_notes` functions PXE requires in order to discover notes.\n/// Note: This is a module annotation, so the returned quote gets injected inside the module (contract) itself.\npub comptime fn aztec(m: Module) -> Quoted {\n let interface = generate_contract_interface(m);\n\n find_and_transform_top_level_unconstrained_fns(m);\n\n let contract_library_method_compute_note_hash_and_nullifier =\n generate_contract_library_method_compute_note_hash_and_nullifier();\n let process_log = generate_process_log();\n let note_exports = generate_note_exports();\n let public_dispatch = generate_public_dispatch(m);\n let sync_notes = generate_sync_notes();\n\n quote {\n $note_exports\n $interface\n $contract_library_method_compute_note_hash_and_nullifier\n $process_log\n $public_dispatch\n $sync_notes\n }\n}\n\ncomptime fn generate_contract_interface(m: Module) -> Quoted {\n let module_name = m.name();\n let contract_stubs = stub_registry::get(m);\n let fn_stubs_quote = if contract_stubs.is_some() {\n contract_stubs.unwrap().join(quote {})\n } else {\n quote {}\n };\n\n let has_storage_layout = module_has_storage(m) & STORAGE_LAYOUT_NAME.get(m).is_some();\n let storage_layout_getter = if has_storage_layout {\n let storage_layout_name = STORAGE_LAYOUT_NAME.get(m).unwrap();\n quote {\n pub fn storage_layout() -> StorageLayoutFields {\n $storage_layout_name.fields\n }\n }\n } else {\n quote {}\n };\n\n let library_storage_layout_getter = if has_storage_layout {\n quote {\n #[contract_library_method]\n $storage_layout_getter\n }\n } else {\n quote {}\n };\n\n quote {\n pub struct $module_name {\n pub target_contract: dep::aztec::protocol_types::address::AztecAddress\n }\n\n impl $module_name {\n $fn_stubs_quote\n\n pub fn at(\n addr: aztec::protocol_types::address::AztecAddress\n ) -> Self {\n Self { target_contract: addr }\n }\n\n pub fn interface() -> Self {\n Self { target_contract: aztec::protocol_types::address::AztecAddress::zero() }\n }\n\n $storage_layout_getter\n }\n\n #[contract_library_method]\n pub fn at(\n addr: aztec::protocol_types::address::AztecAddress\n ) -> $module_name {\n $module_name { target_contract: addr }\n }\n\n #[contract_library_method]\n pub fn interface() -> $module_name {\n $module_name { target_contract: aztec::protocol_types::address::AztecAddress::zero() }\n }\n\n $library_storage_layout_getter\n\n }\n}\n\n/// Generates a contract library method called `_compute_note_hash_and_nullifier` which is used for note\n/// discovery (to create the `aztec::discovery::ComputeNoteHashAndNullifier` function) and to implement the\n/// `compute_note_hash_and_nullifier` unconstrained contract function.\ncomptime fn generate_contract_library_method_compute_note_hash_and_nullifier() -> Quoted {\n let notes = NOTES.entries();\n\n if notes.len() > 0 {\n let max_note_packed_len = notes.fold(\n 0,\n |acc, (_, (_, len, _, _)): (Type, (TypeDefinition, u32, Field, [(Quoted, u32, bool)]))| {\n if len > acc {\n len\n } else {\n acc\n }\n },\n );\n\n if max_note_packed_len > MAX_NOTE_PACKED_LEN {\n panic(\n f\"One of the notes has packed len {max_note_packed_len} but the maximum is {MAX_NOTE_PACKED_LEN}\",\n );\n }\n\n // Contracts that do define notes produce an if-else chain where `note_type_id` is matched against the\n // `get_note_type_id()` function of each note type that we know of, in order to identify the note type. Once we\n // know it we call we correct `unpack` method from the `Packable` trait to obtain the underlying note type, and\n // compute the note hash (non-siloed) and inner nullifier (also non-siloed).\n\n let mut if_note_type_id_match_statements_list = &[];\n for i in 0..notes.len() {\n let (typ, (_, packed_note_length, _, _)) = notes[i];\n\n let get_note_type_id = get_trait_impl_method(\n typ,\n quote { crate::note::note_interface::NoteType },\n quote { get_id },\n );\n let unpack = get_trait_impl_method(\n typ,\n quote { crate::protocol_types::traits::Packable<_> },\n quote { unpack },\n );\n\n let compute_note_hash = get_trait_impl_method(\n typ,\n quote { crate::note::note_interface::NoteHash },\n quote { compute_note_hash },\n );\n\n let compute_nullifier_unconstrained = get_trait_impl_method(\n typ,\n quote { crate::note::note_interface::NoteHash },\n quote { compute_nullifier_unconstrained },\n );\n\n let if_or_else_if = if i == 0 {\n quote { if }\n } else {\n quote { else if }\n };\n\n if_note_type_id_match_statements_list = if_note_type_id_match_statements_list.push_back(\n quote {\n $if_or_else_if note_type_id == $get_note_type_id() {\n // As an extra safety check we make sure that the packed_note BoundedVec has the expected\n // length, since we're about to interpret it's raw storage as a fixed-size array by calling the\n // unpack function on it.\n let expected_len = $packed_note_length;\n let actual_len = packed_note.len();\n assert(\n actual_len == expected_len,\n f\"Expected packed note of length {expected_len} but got {actual_len} for note type id {note_type_id}\"\n );\n\n let note = $unpack(aztec::utils::array::subarray(packed_note.storage(), 0));\n\n let note_hash = $compute_note_hash(note, storage_slot);\n \n // The note discovery process finds settled notes, that is, notes that were created in prior\n // transactions and are therefore already part of the note hash tree. We therefore compute the\n // nullification note hash by treating the note as a settled note with the provided nonce.\n let note_hash_for_nullify = aztec::note::utils::compute_note_hash_for_nullify(\n aztec::note::retrieved_note::RetrievedNote{ \n note, \n contract_address, \n metadata: aztec::note::note_metadata::SettledNoteMetadata::new(nonce).into() \n }, \n storage_slot,\n );\n\n let inner_nullifier = $compute_nullifier_unconstrained(note, note_hash_for_nullify);\n\n Option::some(\n aztec::discovery::NoteHashAndNullifier {\n note_hash, inner_nullifier\n }\n )\n }\n },\n );\n }\n\n let if_note_type_id_match_statements = if_note_type_id_match_statements_list.join(quote {});\n\n quote {\n /// Unpacks an array into a note corresponding to `note_type_id` and then computes its note hash\n /// (non-siloed) and inner nullifier (non-siloed) assuming the note has been inserted into the note hash\n /// tree with `nonce`.\n ///\n /// The signature of this function notably matches the `aztec::discovery::ComputeNoteHashAndNullifier` type,\n /// and so it can be used to call functions from that module such as `discover_new_notes`, `do_process_log`\n /// and `attempt_note_discovery`.\n ///\n /// This function is automatically injected by the `#[aztec]` macro.\n #[contract_library_method]\n unconstrained fn _compute_note_hash_and_nullifier(\n packed_note: BoundedVec<Field, aztec::discovery::MAX_NOTE_PACKED_LEN>,\n storage_slot: Field,\n note_type_id: Field,\n contract_address: aztec::protocol_types::address::AztecAddress,\n nonce: Field,\n ) -> Option<aztec::discovery::NoteHashAndNullifier> {\n $if_note_type_id_match_statements\n else {\n Option::none()\n }\n }\n }\n } else {\n // Contracts with no notes still implement this function to avoid having special-casing, the implementation\n // simply throws immediately.\n quote {\n /// This contract does not use private notes, so this function should never be called as it will\n /// unconditionally fail.\n ///\n /// This function is automatically injected by the `#[aztec]` macro.\n #[contract_library_method]\n unconstrained fn _compute_note_hash_and_nullifier(\n _packed_note: BoundedVec<Field, aztec::discovery::MAX_NOTE_PACKED_LEN>,\n _storage_slot: Field,\n _note_type_id: Field,\n _contract_address: aztec::protocol_types::address::AztecAddress,\n _nonce: Field,\n ) -> Option<aztec::discovery::NoteHashAndNullifier> {\n panic(f\"This contract does not use private notes\")\n }\n }\n }\n}\n\ncomptime fn generate_process_log() -> Quoted {\n // This mandatory function processes a log emitted by the contract. This is currently used to process private logs\n // and perform note discovery of either private notes or partial notes.\n // The bulk of the work of this function is done by aztec::discovery::do_process_log, so all we need to do is call\n // that function.\n\n // We'll produce the entire body of the function in one go and then insert it into the function.\n let notes = NOTES.entries();\n\n if notes.len() > 0 {\n quote {\n unconstrained fn process_log(\n log_ciphertext: BoundedVec<Field, dep::aztec::protocol_types::constants::PRIVATE_LOG_SIZE_IN_FIELDS>,\n tx_hash: Field,\n unique_note_hashes_in_tx: BoundedVec<Field, dep::aztec::protocol_types::constants::MAX_NOTE_HASHES_PER_TX>,\n first_nullifier_in_tx: Field,\n recipient: aztec::protocol_types::address::AztecAddress,\n ) {\n // Because this unconstrained function is injected after the contract is processed by the macros, it'll not\n // be modified by the macros that alter unconstrained functions. As such, we need to manually inject the\n // unconstrained execution context since it will not be available otherwise.\n let context = dep::aztec::context::unconstrained_context::UnconstrainedContext::new();\n\n // TODO(#10727): allow other contracts to process logs and deliver notes\n let contract_address = context.this_address();\n\n aztec::discovery::private_logs::do_process_log(\n contract_address,\n log_ciphertext,\n tx_hash,\n unique_note_hashes_in_tx,\n first_nullifier_in_tx,\n recipient,\n _compute_note_hash_and_nullifier,\n );\n }\n }\n } else {\n // Contracts with no notes still implement this function to avoid having special-casing, the implementation\n // simply throws immediately.\n quote {\n unconstrained fn process_log(\n _log_ciphertext: BoundedVec<Field, dep::aztec::protocol_types::constants::PRIVATE_LOG_SIZE_IN_FIELDS>,\n _tx_hash: Field,\n _unique_note_hashes_in_tx: BoundedVec<Field, dep::aztec::protocol_types::constants::MAX_NOTE_HASHES_PER_TX>,\n _first_nullifier_in_tx: Field,\n _recipient: aztec::protocol_types::address::AztecAddress,\n ) {\n panic(f\"This contract does not use private notes\")\n }\n }\n }\n}\n\ncomptime fn generate_note_exports() -> Quoted {\n let notes = NOTES.values();\n // Second value in each tuple is `note_packed_len` and that is ignored here because it's only used when\n // generating partial note helper functions.\n notes\n .map(|(s, _, note_type_id, fields): (TypeDefinition, u32, Field, [(Quoted, u32, bool)])| {\n generate_note_export(s, note_type_id, fields)\n })\n .join(quote {})\n}\n\ncomptime fn generate_sync_notes() -> Quoted {\n let note_discovery_call = create_note_discovery_call();\n quote {\n unconstrained fn sync_notes() {\n // Because this unconstrained function is injected after the contract is processed by the macros, it'll not\n // be modified by the macros that alter unconstrained functions. As such, we need to manually inject the\n // unconstrained execution context since it will not be available otherwise.\n let context = dep::aztec::context::unconstrained_context::UnconstrainedContext::new();\n\n $note_discovery_call\n }\n }\n}\n"
3789
+ "source": "use crate::macros::{\n functions::{abi_export::create_fn_abi_export, call_interface_stubs::stub_fn, stub_registry},\n notes::NOTES,\n utils::{\n add_to_hasher, fn_has_noinitcheck, get_fn_visibility, is_fn_initializer, is_fn_internal,\n is_fn_private, is_fn_public, is_fn_view, modify_fn_body, module_has_initializer,\n module_has_storage,\n },\n};\nuse protocol_types::meta::generate_serialize_to_fields;\nuse std::meta::type_of;\n\npub(crate) comptime fn transform_private(f: FunctionDefinition) -> Quoted {\n let fn_abi = create_fn_abi_export(f);\n let fn_stub = stub_fn(f);\n stub_registry::register(f.module(), fn_stub);\n\n // If a function is further modified as unconstrained, we throw an error\n if f.is_unconstrained() {\n let name = f.name();\n panic(\n f\"Function {name} is annotated with #[private] but marked as unconstrained, remove unconstrained keyword\",\n );\n }\n\n let module_has_initializer = module_has_initializer(f.module());\n let module_has_storage = module_has_storage(f.module());\n\n // Private functions undergo a lot of transformations from their Aztec.nr form into a circuit that can be fed to the\n // Private Kernel Circuit.\n // First we change the function signature so that it also receives `PrivateContextInputs`, which contain information\n // about the execution context (e.g. the caller).\n let original_params = f.parameters();\n f.set_parameters(&[(\n quote { inputs },\n quote { crate::context::inputs::private_context_inputs::PrivateContextInputs }.as_type(),\n )]\n .append(original_params));\n\n let mut body = f.body().as_block().unwrap();\n\n // The original params are hashed and passed to the `context` object, so that the kernel can verify we've received\n // the correct values.\n // TODO: Optimize args_hasher for small number of arguments\n let args_hasher_name = quote { args_hasher };\n let args_hasher = original_params.fold(\n quote {\n let mut $args_hasher_name = dep::aztec::hash::ArgsHasher::new();\n },\n |args_hasher, param: (Quoted, Type)| {\n let (name, typ) = param;\n let appended_arg = add_to_hasher(args_hasher_name, name, typ);\n quote {\n $args_hasher\n $appended_arg\n }\n },\n );\n\n let context_creation = quote {\n let mut context = dep::aztec::context::private_context::PrivateContext::new(inputs, dep::aztec::protocol_types::traits::Hash::hash($args_hasher_name));\n };\n\n // Modifications introduced by the different marker attributes.\n let internal_check = if is_fn_internal(f) {\n create_internal_check(f)\n } else {\n quote {}\n };\n\n let view_check = if is_fn_view(f) {\n create_view_check(f)\n } else {\n quote {}\n };\n\n let (assert_initializer, mark_as_initialized) = if is_fn_initializer(f) {\n (create_assert_correct_initializer_args(f), create_mark_as_initialized(f))\n } else {\n (quote {}, quote {})\n };\n\n let storage_init = if module_has_storage {\n quote {\n // Some functions don't access storage, but it'd be quite difficult to only inject this variable if it is\n // referenced. We instead ignore 'unused variable' warnings for it.\n #[allow(unused_variables)]\n let storage = Storage::init(&mut context);\n }\n } else {\n quote {}\n };\n\n // Initialization checks are not included in contracts that don't have initializers.\n let init_check = if module_has_initializer & !is_fn_initializer(f) & !fn_has_noinitcheck(f) {\n create_init_check(f)\n } else {\n quote {}\n };\n\n // All private functions perform message discovery, since they may need to access notes. This is slightly\n // inefficient and could be improved by only doing it once we actually attempt to read any.\n let message_discovery_call = if NOTES.len() > 0 {\n create_message_discovery_call()\n } else {\n quote {}\n };\n\n // Finally, we need to change the return type to be `PrivateCircuitPublicInputs`, which is what the Private Kernel\n // circuit expects.\n let return_value_var_name = quote { macro__returned__values };\n\n let return_value_type = f.return_type();\n let return_value = if body.len() == 0 {\n quote {}\n } else if return_value_type != type_of(()) {\n // The original return value is passed to a second args hasher which the context receives.\n let (body_without_return, last_body_expr) = body.pop_back();\n let return_value = last_body_expr.quoted();\n let return_value_assignment =\n quote { let $return_value_var_name: $return_value_type = $return_value; };\n let return_hasher_name = quote { return_hasher };\n let return_value_into_hasher =\n add_to_hasher(return_hasher_name, return_value_var_name, return_value_type);\n\n body = body_without_return;\n\n quote {\n let mut $return_hasher_name = dep::aztec::hash::ArgsHasher::new();\n $return_value_assignment\n $return_value_into_hasher\n context.set_return_hash($return_hasher_name);\n }\n } else {\n let (body_without_return, last_body_expr) = body.pop_back();\n if !last_body_expr.has_semicolon()\n & last_body_expr.as_for().is_none()\n & last_body_expr.as_assert().is_none()\n & last_body_expr.as_for_range().is_none()\n & last_body_expr.as_assert_eq().is_none()\n & last_body_expr.as_let().is_none() {\n let unused_return_value_name = f\"_{return_value_var_name}\".quoted_contents();\n body = body_without_return.push_back(\n quote { let $unused_return_value_name = $last_body_expr; }.as_expr().unwrap(),\n );\n }\n quote {}\n };\n\n let context_finish = quote { context.finish() };\n\n let to_prepend = quote {\n $args_hasher\n $context_creation\n $assert_initializer\n $init_check\n $internal_check\n $view_check\n $storage_init\n $message_discovery_call\n };\n\n let to_append = quote {\n $return_value\n $mark_as_initialized\n $context_finish\n };\n let modified_body = modify_fn_body(body, to_prepend, to_append);\n f.set_body(modified_body);\n f.set_return_type(\n quote { dep::protocol_types::abis::private_circuit_public_inputs::PrivateCircuitPublicInputs }\n .as_type(),\n );\n f.set_return_data();\n\n fn_abi\n}\n\npub(crate) comptime fn transform_public(f: FunctionDefinition) -> Quoted {\n let fn_abi = create_fn_abi_export(f);\n let fn_stub = stub_fn(f);\n stub_registry::register(f.module(), fn_stub);\n\n // If a function is further modified as unconstrained, we throw an error\n if f.is_unconstrained() {\n let name = f.name();\n panic(\n f\"Function {name} is annotated with #[public] but marked as unconstrained, remove unconstrained keyword\",\n );\n }\n\n let module_has_initializer = module_has_initializer(f.module());\n let module_has_storage = module_has_storage(f.module());\n\n // Public functions undergo a lot of transformations from their Aztec.nr form.\n let original_params = f.parameters();\n let args_len = original_params\n .map(|(name, typ): (Quoted, Type)| {\n generate_serialize_to_fields(name, typ, &[], false).0.len()\n })\n .fold(0, |acc: u32, val: u32| acc + val);\n\n // Unlike in the private case, in public the `context` does not need to receive the hash of the original params.\n let context_creation = quote {\n let mut context = dep::aztec::context::public_context::PublicContext::new(|| {\n // We start from 1 because we skip the selector for the dispatch function.\n let serialized_args : [Field; $args_len] = dep::aztec::context::public_context::calldata_copy(1, $args_len);\n dep::aztec::hash::hash_args_array(serialized_args)\n });\n };\n\n // Modifications introduced by the different marker attributes.\n let internal_check = if is_fn_internal(f) {\n create_internal_check(f)\n } else {\n quote {}\n };\n\n let view_check = if is_fn_view(f) {\n create_view_check(f)\n } else {\n quote {}\n };\n\n let (assert_initializer, mark_as_initialized) = if is_fn_initializer(f) {\n (create_assert_correct_initializer_args(f), create_mark_as_initialized(f))\n } else {\n (quote {}, quote {})\n };\n\n let storage_init = if module_has_storage {\n // Some functions don't access storage, but it'd be quite difficult to only inject this variable if it is\n // referenced. We instead ignore 'unused variable' warnings for it.\n quote {\n #[allow(unused_variables)]\n let storage = Storage::init(&mut context);\n }\n } else {\n quote {}\n };\n\n // Initialization checks are not included in contracts that don't have initializers.\n let init_check = if module_has_initializer & !fn_has_noinitcheck(f) & !is_fn_initializer(f) {\n create_init_check(f)\n } else {\n quote {}\n };\n\n let to_prepend = quote {\n $context_creation\n $assert_initializer\n $init_check\n $internal_check\n $view_check\n $storage_init\n };\n\n let to_append = quote {\n $mark_as_initialized\n };\n\n let body = f.body().as_block().unwrap();\n let modified_body = modify_fn_body(body, to_prepend, to_append);\n f.set_body(modified_body);\n\n // All public functions are automatically made unconstrained, even if they were not marked as such. This is because\n // instead of compiling into a circuit, they will compile to bytecode that will be later transpiled into AVM\n // bytecode.\n f.set_unconstrained(true);\n f.set_return_public(true);\n\n fn_abi\n}\n\npub(crate) comptime fn find_and_transform_top_level_unconstrained_fns(m: Module) {\n // Top-level unconstrained fns are contract entrypoints, but they're not explicitly designated in any way. They're\n // the fallback case for a function that matches no other rules.\n // TODO(#12743): improve this\n\n // We first find non-standard contract entrypoints, i.e. functions in the `contract` mod that are not private or\n // public, but which *are* contract entrypoints (i.e. they're not opting out via the #[test] or\n // #[contract_library_method] attributes). Ideally entrypoints would be explicitly designated instead.\n let non_private_public_entrypoint_functions = m.functions().filter(|f: FunctionDefinition| {\n !is_fn_private(f)\n & !is_fn_public(f)\n & !f.has_named_attribute(\"contract_library_method\")\n & !f.has_named_attribute(\"test\")\n });\n\n // TODO: uncomment the code below and emit a warning once support for them is added to Noir (tracked in\n // https://github.com/noir-lang/noir/issues/7714). We can't simply print a message since that'd otherwise break the\n // output of utils such as `nargo test --list-tests`.\n // // We don't expect to see any custom constrained entrypoints (i.e. private functions created outside of aztec-nr's\n // // #[private] macro, possibly resulting in a non-standard interface).\n // for f in non_private_public_entrypoint_functions.filter(|f: FunctionDefinition| {\n // !f.is_unconstrained()\n // }) {\n // let name = f.name();\n // warn(\n // f\"found private contract function '{name}' which does not have the #[private] attribute - make sure you know what you're doing!\",\n // );\n // }\n\n // An unconstrained contract entrypoints is what we call a top-level unconstrained function, to which we apply the\n // appropriate transformation. Ideally these would be explicitly designated as such instead.\n for f in non_private_public_entrypoint_functions.filter(|f: FunctionDefinition| {\n f.is_unconstrained()\n }) {\n transform_top_level_unconstrained(f);\n }\n}\n\npub(crate) comptime fn transform_top_level_unconstrained(f: FunctionDefinition) {\n let context_creation = quote { let mut context = dep::aztec::context::unconstrained_context::UnconstrainedContext::new(); };\n let module_has_storage = module_has_storage(f.module());\n\n let storage_init = if module_has_storage {\n quote {\n // Some functions don't access storage, but it'd be quite difficult to only inject this variable if it is\n // referenced. We instead ignore 'unused variable' warnings for it.\n #[allow(unused_variables)]\n let storage = Storage::init(context);\n }\n } else {\n quote {}\n };\n\n // All unconstrained functions perform message discovery, since they may need to access private notes that would be\n // found during this process. This is slightly inefficient and could be improved by only doing it once we actually\n // attempt to read any.\n let message_discovery_call = if NOTES.len() > 0 {\n create_message_discovery_call()\n } else {\n quote {}\n };\n\n let to_prepend = quote {\n $context_creation\n $storage_init\n $message_discovery_call\n };\n let body = f.body().as_block().unwrap();\n let modified_body = modify_fn_body(body, to_prepend, quote {});\n f.set_return_public(true);\n f.set_body(modified_body);\n}\n\ncomptime fn create_internal_check(f: FunctionDefinition) -> Quoted {\n let name = f.name();\n let assertion_message = f\"Function {name} can only be called internally\";\n quote { assert(context.msg_sender() == context.this_address(), $assertion_message); }\n}\n\ncomptime fn create_view_check(f: FunctionDefinition) -> Quoted {\n let name = f.name();\n let assertion_message = f\"Function {name} can only be called statically\";\n if is_fn_private(f) {\n // Here `context` is of type context::PrivateContext\n quote { assert(context.inputs.call_context.is_static_call == true, $assertion_message); }\n } else {\n // Here `context` is of type context::PublicContext\n quote { assert(context.is_static_call(), $assertion_message); }\n }\n}\n\ncomptime fn create_assert_correct_initializer_args(f: FunctionDefinition) -> Quoted {\n let fn_visibility = get_fn_visibility(f);\n f\"dep::aztec::macros::functions::initialization_utils::assert_initialization_matches_address_preimage_{fn_visibility}(context);\"\n .quoted_contents()\n}\n\ncomptime fn create_mark_as_initialized(f: FunctionDefinition) -> Quoted {\n let fn_visibility = get_fn_visibility(f);\n f\"dep::aztec::macros::functions::initialization_utils::mark_as_initialized_{fn_visibility}(&mut context);\"\n .quoted_contents()\n}\n\ncomptime fn create_init_check(f: FunctionDefinition) -> Quoted {\n let fn_visibility = get_fn_visibility(f);\n f\"dep::aztec::macros::functions::initialization_utils::assert_is_initialized_{fn_visibility}(&mut context);\"\n .quoted_contents()\n}\n\n/// Injects a call to `aztec::discovery::discover_new_messages`, causing for new notes to be added to PXE and made\n/// available for the current execution.\npub(crate) comptime fn create_message_discovery_call() -> Quoted {\n quote {\n /// Safety: message discovery returns nothing and is performed solely for its side-effects. It is therefore\n /// always safe to call.\n unsafe {\n dep::aztec::discovery::discover_new_messages(\n context.this_address(),\n _compute_note_hash_and_nullifier,\n );\n };\n }\n}\n"
3790
3790
  },
3791
- "137": {
3791
+ "139": {
3792
3792
  "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/oracle/capsules.nr",
3793
3793
  "source": "use protocol_types::{address::AztecAddress, traits::{Deserialize, Serialize}};\n\n/// Stores arbitrary information in a per-contract non-volatile database, which can later be retrieved with `load`. If\n/// data was already stored at this slot, it is overwritten.\npub unconstrained fn store<T, let N: u32>(contract_address: AztecAddress, slot: Field, value: T)\nwhere\n T: Serialize<N>,\n{\n let serialized = value.serialize();\n store_oracle(contract_address, slot, serialized);\n}\n\n/// Returns data previously stored via `storeCapsule` in the per-contract non-volatile database. Returns Option::none() if\n/// nothing was stored at the given slot.\npub unconstrained fn load<T, let N: u32>(contract_address: AztecAddress, slot: Field) -> Option<T>\nwhere\n T: Deserialize<N>,\n{\n let serialized_option = load_oracle::<N>(contract_address, slot, N);\n serialized_option.map(|arr| Deserialize::deserialize(arr))\n}\n\n/// Deletes data in the per-contract non-volatile database. Does nothing if no data was present.\npub unconstrained fn delete(contract_address: AztecAddress, slot: Field) {\n delete_oracle(contract_address, slot);\n}\n\n/// Copies a number of contiguous entries in the per-contract non-volatile database. This allows for efficient data\n/// structures by avoiding repeated calls to `loadCapsule` and `storeCapsule`.\n/// Supports overlapping source and destination regions (which will result in the overlapped source values being\n/// overwritten). All copied slots must exist in the database (i.e. have been stored and not deleted)\npub unconstrained fn copy(\n contract_address: AztecAddress,\n src_slot: Field,\n dst_slot: Field,\n num_entries: u32,\n) {\n copy_oracle(contract_address, src_slot, dst_slot, num_entries);\n}\n\n#[oracle(storeCapsule)]\nunconstrained fn store_oracle<let N: u32>(\n contract_address: AztecAddress,\n slot: Field,\n values: [Field; N],\n) {}\n\n/// We need to pass in `array_len` (the value of N) as a parameter to tell the oracle how many fields the response must\n/// have.\n///\n/// Note that the oracle returns an Option<[Field; N]> because we cannot return an Option<T> directly. That would\n/// require for the oracle resolver to know the shape of T (e.g. if T were a struct of 3 u32 values then the expected\n/// response shape would be 3 single items, whereas it were a struct containing `u32, [Field;10], u32` then the expected\n/// shape would be single, array, single.). Instead, we return the serialization and deserialize in Noir.\n#[oracle(loadCapsule)]\nunconstrained fn load_oracle<let N: u32>(\n contract_address: AztecAddress,\n slot: Field,\n array_len: u32,\n) -> Option<[Field; N]> {}\n\n#[oracle(deleteCapsule)]\nunconstrained fn delete_oracle(contract_address: AztecAddress, slot: Field) {}\n\n#[oracle(copyCapsule)]\nunconstrained fn copy_oracle(\n contract_address: AztecAddress,\n src_slot: Field,\n dst_slot: Field,\n num_entries: u32,\n) {}\n\nmod test {\n // These tests are sort of redundant since we already test the oracle implementation directly in TypeScript, but\n // they are cheap regardless and help ensure both that the TXE implementation works accordingly and that the Noir\n // oracles are hooked up correctly.\n\n use crate::{\n oracle::capsules::{copy, delete, load, store},\n test::{helpers::test_environment::TestEnvironment, mocks::mock_struct::MockStruct},\n };\n use protocol_types::{address::AztecAddress, traits::{FromField, ToField}};\n\n unconstrained fn setup() -> AztecAddress {\n let env = TestEnvironment::new();\n env.contract_address()\n }\n\n global SLOT: Field = 1;\n\n #[test]\n unconstrained fn stores_and_loads() {\n let contract_address = setup();\n\n let value = MockStruct::new(5, 6);\n store(contract_address, SLOT, value);\n\n assert_eq(load(contract_address, SLOT).unwrap(), value);\n }\n\n #[test]\n unconstrained fn store_overwrites() {\n let contract_address = setup();\n\n let value = MockStruct::new(5, 6);\n store(contract_address, SLOT, value);\n\n let new_value = MockStruct::new(7, 8);\n store(contract_address, SLOT, new_value);\n\n assert_eq(load(contract_address, SLOT).unwrap(), new_value);\n }\n\n #[test]\n unconstrained fn loads_empty_slot() {\n let contract_address = setup();\n\n let loaded_value: Option<MockStruct> = load(contract_address, SLOT);\n assert_eq(loaded_value, Option::none());\n }\n\n #[test]\n unconstrained fn deletes_stored_value() {\n let contract_address = setup();\n\n let value = MockStruct::new(5, 6);\n store(contract_address, SLOT, value);\n delete(contract_address, SLOT);\n\n let loaded_value: Option<MockStruct> = load(contract_address, SLOT);\n assert_eq(loaded_value, Option::none());\n }\n\n #[test]\n unconstrained fn deletes_empty_slot() {\n let contract_address = setup();\n\n delete(contract_address, SLOT);\n let loaded_value: Option<MockStruct> = load(contract_address, SLOT);\n assert_eq(loaded_value, Option::none());\n }\n\n #[test]\n unconstrained fn copies_non_overlapping_values() {\n let contract_address = setup();\n\n let src = 5;\n\n let values = [MockStruct::new(5, 6), MockStruct::new(7, 8), MockStruct::new(9, 10)];\n store(contract_address, src, values[0]);\n store(contract_address, src + 1, values[1]);\n store(contract_address, src + 2, values[2]);\n\n let dst = 10;\n copy(contract_address, src, dst, 3);\n\n assert_eq(load(contract_address, dst).unwrap(), values[0]);\n assert_eq(load(contract_address, dst + 1).unwrap(), values[1]);\n assert_eq(load(contract_address, dst + 2).unwrap(), values[2]);\n }\n\n #[test]\n unconstrained fn copies_overlapping_values_with_src_ahead() {\n let contract_address = setup();\n\n let src = 1;\n\n let values = [MockStruct::new(5, 6), MockStruct::new(7, 8), MockStruct::new(9, 10)];\n store(contract_address, src, values[0]);\n store(contract_address, src + 1, values[1]);\n store(contract_address, src + 2, values[2]);\n\n let dst = 2;\n copy(contract_address, src, dst, 3);\n\n assert_eq(load(contract_address, dst).unwrap(), values[0]);\n assert_eq(load(contract_address, dst + 1).unwrap(), values[1]);\n assert_eq(load(contract_address, dst + 2).unwrap(), values[2]);\n\n // src[1] and src[2] should have been overwritten since they are also dst[0] and dst[1]\n assert_eq(load(contract_address, src).unwrap(), values[0]); // src[0] (unchanged)\n assert_eq(load(contract_address, src + 1).unwrap(), values[0]); // dst[0]\n assert_eq(load(contract_address, src + 2).unwrap(), values[1]); // dst[1]\n }\n\n #[test]\n unconstrained fn copies_overlapping_values_with_dst_ahead() {\n let contract_address = setup();\n\n let src = 2;\n\n let values = [MockStruct::new(5, 6), MockStruct::new(7, 8), MockStruct::new(9, 10)];\n store(contract_address, src, values[0]);\n store(contract_address, src + 1, values[1]);\n store(contract_address, src + 2, values[2]);\n\n let dst = 1;\n copy(contract_address, src, dst, 3);\n\n assert_eq(load(contract_address, dst).unwrap(), values[0]);\n assert_eq(load(contract_address, dst + 1).unwrap(), values[1]);\n assert_eq(load(contract_address, dst + 2).unwrap(), values[2]);\n\n // src[0] and src[1] should have been overwritten since they are also dst[1] and dst[2]\n assert_eq(load(contract_address, src).unwrap(), values[1]); // dst[1]\n assert_eq(load(contract_address, src + 1).unwrap(), values[2]); // dst[2]\n assert_eq(load(contract_address, src + 2).unwrap(), values[2]); // src[2] (unchanged)\n }\n\n #[test(should_fail_with = \"copy empty slot\")]\n unconstrained fn cannot_copy_empty_values() {\n let contract_address = setup();\n\n copy(contract_address, SLOT, SLOT, 1);\n }\n\n #[test(should_fail_with = \"not allowed to access\")]\n unconstrained fn cannot_store_other_contract() {\n let contract_address = setup();\n let other_contract_address = AztecAddress::from_field(contract_address.to_field() + 1);\n\n let value = MockStruct::new(5, 6);\n store(other_contract_address, SLOT, value);\n }\n\n #[test(should_fail_with = \"not allowed to access\")]\n unconstrained fn cannot_load_other_contract() {\n let contract_address = setup();\n let other_contract_address = AztecAddress::from_field(contract_address.to_field() + 1);\n\n let _: Option<MockStruct> = load(other_contract_address, SLOT);\n }\n\n #[test(should_fail_with = \"not allowed to access\")]\n unconstrained fn cannot_delete_other_contract() {\n let contract_address = setup();\n let other_contract_address = AztecAddress::from_field(contract_address.to_field() + 1);\n\n delete(other_contract_address, SLOT);\n }\n\n #[test(should_fail_with = \"not allowed to access\")]\n unconstrained fn cannot_copy_other_contract() {\n let contract_address = setup();\n let other_contract_address = AztecAddress::from_field(contract_address.to_field() + 1);\n\n copy(other_contract_address, SLOT, SLOT, 0);\n }\n}\n"
3794
3794
  },
3795
- "138": {
3795
+ "140": {
3796
3796
  "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/oracle/enqueue_public_function_call.nr",
3797
3797
  "source": "use dep::protocol_types::{abis::function_selector::FunctionSelector, address::AztecAddress};\n\n#[oracle(enqueuePublicFunctionCall)]\nunconstrained fn enqueue_public_function_call_oracle(\n _contract_address: AztecAddress,\n _function_selector: FunctionSelector,\n _args_hash: Field,\n _side_effect_counter: u32,\n _is_static_call: bool,\n) -> Field {}\n\npub unconstrained fn enqueue_public_function_call_internal(\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n side_effect_counter: u32,\n is_static_call: bool,\n) -> Field {\n enqueue_public_function_call_oracle(\n contract_address,\n function_selector,\n args_hash,\n side_effect_counter,\n is_static_call,\n )\n}\n\n#[oracle(setPublicTeardownFunctionCall)]\nunconstrained fn set_public_teardown_function_call_oracle(\n _contract_address: AztecAddress,\n _function_selector: FunctionSelector,\n _args_hash: Field,\n _side_effect_counter: u32,\n _is_static_call: bool,\n) -> Field {}\n\npub unconstrained fn set_public_teardown_function_call_internal(\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n side_effect_counter: u32,\n is_static_call: bool,\n) -> Field {\n set_public_teardown_function_call_oracle(\n contract_address,\n function_selector,\n args_hash,\n side_effect_counter,\n is_static_call,\n )\n}\n\npub fn notify_set_min_revertible_side_effect_counter(counter: u32) {\n // Safety: This oracle call returns nothing: we only call it for its side effects. It is therefore always safe\n // to call.\n unsafe { notify_set_min_revertible_side_effect_counter_oracle_wrapper(counter) };\n}\n\npub unconstrained fn notify_set_min_revertible_side_effect_counter_oracle_wrapper(counter: u32) {\n notify_set_min_revertible_side_effect_counter_oracle(counter);\n}\n\n#[oracle(notifySetMinRevertibleSideEffectCounter)]\nunconstrained fn notify_set_min_revertible_side_effect_counter_oracle(_counter: u32) {}\n"
3798
3798
  },
3799
- "139": {
3799
+ "141": {
3800
3800
  "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/oracle/execution.nr",
3801
3801
  "source": "use dep::protocol_types::address::AztecAddress;\n\n#[oracle(getContractAddress)]\nunconstrained fn get_contract_address_oracle() -> AztecAddress {}\n\n#[oracle(getBlockNumber)]\nunconstrained fn get_block_number_oracle() -> u32 {}\n\n#[oracle(getChainId)]\nunconstrained fn get_chain_id_oracle() -> Field {}\n\n#[oracle(getVersion)]\nunconstrained fn get_version_oracle() -> Field {}\n\npub unconstrained fn get_contract_address() -> AztecAddress {\n get_contract_address_oracle()\n}\n\npub unconstrained fn get_block_number() -> u32 {\n get_block_number_oracle()\n}\n\npub unconstrained fn get_chain_id() -> Field {\n get_chain_id_oracle()\n}\n\npub unconstrained fn get_version() -> Field {\n get_version_oracle()\n}\n"
3802
3802
  },
3803
- "140": {
3803
+ "142": {
3804
3804
  "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/oracle/execution_cache.nr",
3805
3805
  "source": "/// Stores values represented as slice in execution cache to be later obtained by its hash.\npub fn store(values: [Field]) {\n // Safety: This oracle call returns nothing: we only call it for its side effects. It is therefore always safe\n // to call. When loading the values, however, the caller must check that the values are indeed the preimage.\n unsafe { store_in_execution_cache_oracle_wrapper(values) };\n}\n\npub unconstrained fn store_in_execution_cache_oracle_wrapper(values: [Field]) {\n let _ = store_in_execution_cache_oracle(values);\n}\n\npub unconstrained fn load<let N: u32>(hash: Field) -> [Field; N] {\n load_from_execution_cache_oracle(hash)\n}\n\n#[oracle(storeInExecutionCache)]\nunconstrained fn store_in_execution_cache_oracle(_values: [Field]) -> Field {}\n\n#[oracle(loadFromExecutionCache)]\nunconstrained fn load_from_execution_cache_oracle<let N: u32>(_hash: Field) -> [Field; N] {}\n"
3806
3806
  },
3807
- "150": {
3808
- "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/oracle/note_discovery.nr",
3809
- "source": "use crate::discovery::MAX_NOTE_PACKED_LEN;\nuse dep::protocol_types::{\n address::AztecAddress,\n constants::{MAX_NOTE_HASHES_PER_TX, PUBLIC_LOG_DATA_SIZE_IN_FIELDS},\n};\n\n/// Finds new notes that may have been sent to all registered accounts in PXE in the current contract and makes them\n/// available for later querying via the `get_notes` oracle.\npub unconstrained fn sync_notes() {\n sync_notes_oracle();\n}\n\n#[oracle(syncNotes)]\nunconstrained fn sync_notes_oracle() {}\n\n/// Informs PXE of a note's existence so that it can later be retrieved by the `getNotes` oracle. The note will be\n/// scoped to `contract_address`, meaning other contracts will not be able to access it unless authorized.\n///\n/// The packed note is what `getNotes` will later return. PXE indexes notes by `storage_slot`, so this value\n/// is typically used to filter notes that correspond to different state variables. `note_hash` and `nullifier` are\n/// the inner hashes, i.e. the raw hashes returned by `NoteHash::compute_note_hash` and\n/// `NoteHash::compute_nullifier`. PXE will verify that the siloed unique note hash was inserted into the tree\n/// at `tx_hash`, and will store the nullifier to later check for nullification.\n///\n/// `recipient` is the account to which the note was sent to. Other accounts will not be able to access this note (e.g.\n/// other accounts will not be able to see one another's token balance notes, even in the same PXE) unless authorized.\n///\n/// Returns true if the note was successfully delivered and added to PXE's database.\npub unconstrained fn deliver_note(\n contract_address: AztecAddress,\n storage_slot: Field,\n nonce: Field,\n packed_note: BoundedVec<Field, MAX_NOTE_PACKED_LEN>,\n note_hash: Field,\n nullifier: Field,\n tx_hash: Field,\n recipient: AztecAddress,\n) -> bool {\n deliver_note_oracle(\n contract_address,\n storage_slot,\n nonce,\n packed_note,\n note_hash,\n nullifier,\n tx_hash,\n recipient,\n )\n}\n\n/// The contents of a public log, plus contextual information about the transaction in which the log was emitted. This\n/// is the data required in order to discover notes that are being delivered in a log.\n// TODO(#11639): this could also be used to fetch private logs, but the `BoundedVec` maximum length is that of a public\n// log.\npub struct LogWithTxData {\n pub log_content: BoundedVec<Field, PUBLIC_LOG_DATA_SIZE_IN_FIELDS>,\n pub tx_hash: Field,\n /// The array of new note hashes created by `tx_hash`\n pub unique_note_hashes_in_tx: BoundedVec<Field, MAX_NOTE_HASHES_PER_TX>,\n /// The first nullifier created by `tx_hash`\n pub first_nullifier_in_tx: Field,\n}\n\n/// Fetches a log from the node that has the corresponding `tag`. The log can be either a public or a private log, and\n/// the tag is the first field in the log's content. Returns `Option::none` if no such log exists. Throws if more than\n/// one log with that tag exists.\n/// Public logs have an extra field included at the beginning with the address of the contract that emitted them.\n// TODO(#11627): handle multiple logs with the same tag.\n// TODO(#10273): improve contract siloing of logs, don't introduce an extra field.\npub unconstrained fn get_log_by_tag(tag: Field) -> Option<LogWithTxData> {\n get_log_by_tag_oracle(tag)\n}\n\n#[oracle(deliverNote)]\nunconstrained fn deliver_note_oracle(\n contract_address: AztecAddress,\n storage_slot: Field,\n nonce: Field,\n packed_note: BoundedVec<Field, MAX_NOTE_PACKED_LEN>,\n note_hash: Field,\n nullifier: Field,\n tx_hash: Field,\n recipient: AztecAddress,\n) -> bool {}\n\n#[oracle(getLogByTag)]\nunconstrained fn get_log_by_tag_oracle(tag: Field) -> Option<LogWithTxData> {}\n"
3807
+ "151": {
3808
+ "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/oracle/message_discovery.nr",
3809
+ "source": "use crate::discovery::private_notes::MAX_NOTE_PACKED_LEN;\nuse dep::protocol_types::{\n address::AztecAddress,\n constants::{MAX_NOTE_HASHES_PER_TX, PUBLIC_LOG_DATA_SIZE_IN_FIELDS},\n};\n\n/// Finds new notes that may have been sent to all registered accounts in PXE in the current contract and makes them\n/// available for later querying via the `get_notes` oracle.\npub unconstrained fn sync_notes() {\n sync_notes_oracle();\n}\n\n#[oracle(syncNotes)]\nunconstrained fn sync_notes_oracle() {}\n\n/// Informs PXE of a note's existence so that it can later be retrieved by the `getNotes` oracle. The note will be\n/// scoped to `contract_address`, meaning other contracts will not be able to access it unless authorized.\n///\n/// The packed note is what `getNotes` will later return. PXE indexes notes by `storage_slot`, so this value\n/// is typically used to filter notes that correspond to different state variables. `note_hash` and `nullifier` are\n/// the inner hashes, i.e. the raw hashes returned by `NoteHash::compute_note_hash` and\n/// `NoteHash::compute_nullifier`. PXE will verify that the siloed unique note hash was inserted into the tree\n/// at `tx_hash`, and will store the nullifier to later check for nullification.\n///\n/// `recipient` is the account to which the note was sent to. Other accounts will not be able to access this note (e.g.\n/// other accounts will not be able to see one another's token balance notes, even in the same PXE) unless authorized.\n///\n/// Returns true if the note was successfully delivered and added to PXE's database.\npub unconstrained fn deliver_note(\n contract_address: AztecAddress,\n storage_slot: Field,\n nonce: Field,\n packed_note: BoundedVec<Field, MAX_NOTE_PACKED_LEN>,\n note_hash: Field,\n nullifier: Field,\n tx_hash: Field,\n recipient: AztecAddress,\n) -> bool {\n deliver_note_oracle(\n contract_address,\n storage_slot,\n nonce,\n packed_note,\n note_hash,\n nullifier,\n tx_hash,\n recipient,\n )\n}\n\n/// The contents of a public log, plus contextual information about the transaction in which the log was emitted. This\n/// is the data required in order to discover notes that are being delivered in a log.\n// TODO(#11639): this could also be used to fetch private logs, but the `BoundedVec` maximum length is that of a public\n// log.\npub struct LogWithTxData {\n pub log_content: BoundedVec<Field, PUBLIC_LOG_DATA_SIZE_IN_FIELDS>,\n pub tx_hash: Field,\n /// The array of new note hashes created by `tx_hash`\n pub unique_note_hashes_in_tx: BoundedVec<Field, MAX_NOTE_HASHES_PER_TX>,\n /// The first nullifier created by `tx_hash`\n pub first_nullifier_in_tx: Field,\n}\n\n/// Fetches a log from the node that has the corresponding `tag`. The log can be either a public or a private log, and\n/// the tag is the first field in the log's content. Returns `Option::none` if no such log exists. Throws if more than\n/// one log with that tag exists.\n/// Public logs have an extra field included at the beginning with the address of the contract that emitted them.\n// TODO(#11627): handle multiple logs with the same tag.\n// TODO(#10273): improve contract siloing of logs, don't introduce an extra field.\npub unconstrained fn get_log_by_tag(tag: Field) -> Option<LogWithTxData> {\n get_log_by_tag_oracle(tag)\n}\n\n#[oracle(deliverNote)]\nunconstrained fn deliver_note_oracle(\n contract_address: AztecAddress,\n storage_slot: Field,\n nonce: Field,\n packed_note: BoundedVec<Field, MAX_NOTE_PACKED_LEN>,\n note_hash: Field,\n nullifier: Field,\n tx_hash: Field,\n recipient: AztecAddress,\n) -> bool {}\n\n#[oracle(getLogByTag)]\nunconstrained fn get_log_by_tag_oracle(tag: Field) -> Option<LogWithTxData> {}\n"
3810
3810
  },
3811
3811
  "17": {
3812
3812
  "path": "std/field/bn254.nr",
3813
3813
  "source": "use crate::field::field_less_than;\nuse crate::runtime::is_unconstrained;\n\n// The low and high decomposition of the field modulus\nglobal PLO: Field = 53438638232309528389504892708671455233;\nglobal PHI: Field = 64323764613183177041862057485226039389;\n\npub(crate) global TWO_POW_128: Field = 0x100000000000000000000000000000000;\nglobal TWO_POW_64: Field = 0x10000000000000000;\n\n// Decomposes a single field into two 16 byte fields.\nfn compute_decomposition(mut x: Field) -> (Field, Field) {\n // Here's we're taking advantage of truncating 64 bit limbs from the input field\n // and then subtracting them from the input such the field division is equivalent to integer division.\n let low_lower_64 = (x as u64) as Field;\n x = (x - low_lower_64) / TWO_POW_64;\n let low_upper_64 = (x as u64) as Field;\n\n let high = (x - low_upper_64) / TWO_POW_64;\n let low = low_upper_64 * TWO_POW_64 + low_lower_64;\n\n (low, high)\n}\n\npub(crate) unconstrained fn decompose_hint(x: Field) -> (Field, Field) {\n compute_decomposition(x)\n}\n\nunconstrained fn lte_hint(x: Field, y: Field) -> bool {\n if x == y {\n true\n } else {\n field_less_than(x, y)\n }\n}\n\n// Assert that (alo > blo && ahi >= bhi) || (alo <= blo && ahi > bhi)\nfn assert_gt_limbs(a: (Field, Field), b: (Field, Field)) {\n let (alo, ahi) = a;\n let (blo, bhi) = b;\n // Safety: borrow is enforced to be boolean due to its type.\n // if borrow is 0, it asserts that (alo > blo && ahi >= bhi)\n // if borrow is 1, it asserts that (alo <= blo && ahi > bhi)\n unsafe {\n let borrow = lte_hint(alo, blo);\n\n let rlo = alo - blo - 1 + (borrow as Field) * TWO_POW_128;\n let rhi = ahi - bhi - (borrow as Field);\n\n rlo.assert_max_bit_size::<128>();\n rhi.assert_max_bit_size::<128>();\n }\n}\n\n/// Decompose a single field into two 16 byte fields.\npub fn decompose(x: Field) -> (Field, Field) {\n if is_unconstrained() {\n compute_decomposition(x)\n } else {\n // Safety: decomposition is properly checked below\n unsafe {\n // Take hints of the decomposition\n let (xlo, xhi) = decompose_hint(x);\n\n // Range check the limbs\n xlo.assert_max_bit_size::<128>();\n xhi.assert_max_bit_size::<128>();\n\n // Check that the decomposition is correct\n assert_eq(x, xlo + TWO_POW_128 * xhi);\n\n // Assert that the decomposition of P is greater than the decomposition of x\n assert_gt_limbs((PLO, PHI), (xlo, xhi));\n (xlo, xhi)\n }\n }\n}\n\npub fn assert_gt(a: Field, b: Field) {\n if is_unconstrained() {\n assert(\n // Safety: already unconstrained\n unsafe { field_less_than(b, a) },\n );\n } else {\n // Decompose a and b\n let a_limbs = decompose(a);\n let b_limbs = decompose(b);\n\n // Assert that a_limbs is greater than b_limbs\n assert_gt_limbs(a_limbs, b_limbs)\n }\n}\n\npub fn assert_lt(a: Field, b: Field) {\n assert_gt(b, a);\n}\n\npub fn gt(a: Field, b: Field) -> bool {\n if is_unconstrained() {\n // Safety: unsafe in unconstrained\n unsafe {\n field_less_than(b, a)\n }\n } else if a == b {\n false\n } else {\n // Safety: Take a hint of the comparison and verify it\n unsafe {\n if field_less_than(a, b) {\n assert_gt(b, a);\n false\n } else {\n assert_gt(a, b);\n true\n }\n }\n }\n}\n\npub fn lt(a: Field, b: Field) -> bool {\n gt(b, a)\n}\n\nmod tests {\n // TODO: Allow imports from \"super\"\n use crate::field::bn254::{assert_gt, decompose, gt, lte_hint, PHI, PLO, TWO_POW_128};\n\n #[test]\n fn check_decompose() {\n assert_eq(decompose(TWO_POW_128), (0, 1));\n assert_eq(decompose(TWO_POW_128 + 0x1234567890), (0x1234567890, 1));\n assert_eq(decompose(0x1234567890), (0x1234567890, 0));\n }\n\n #[test]\n unconstrained fn check_decompose_unconstrained() {\n assert_eq(decompose(TWO_POW_128), (0, 1));\n assert_eq(decompose(TWO_POW_128 + 0x1234567890), (0x1234567890, 1));\n assert_eq(decompose(0x1234567890), (0x1234567890, 0));\n }\n\n #[test]\n unconstrained fn check_lte_hint() {\n assert(lte_hint(0, 1));\n assert(lte_hint(0, 0x100));\n assert(lte_hint(0x100, TWO_POW_128 - 1));\n assert(!lte_hint(0 - 1, 0));\n\n assert(lte_hint(0, 0));\n assert(lte_hint(0x100, 0x100));\n assert(lte_hint(0 - 1, 0 - 1));\n }\n\n #[test]\n fn check_assert_gt() {\n assert_gt(1, 0);\n assert_gt(0x100, 0);\n assert_gt((0 - 1), (0 - 2));\n assert_gt(TWO_POW_128, 0);\n assert_gt(0 - 1, 0);\n }\n\n #[test]\n unconstrained fn check_assert_gt_unconstrained() {\n assert_gt(1, 0);\n assert_gt(0x100, 0);\n assert_gt((0 - 1), (0 - 2));\n assert_gt(TWO_POW_128, 0);\n assert_gt(0 - 1, 0);\n }\n\n #[test]\n fn check_gt() {\n assert(gt(1, 0));\n assert(gt(0x100, 0));\n assert(gt((0 - 1), (0 - 2)));\n assert(gt(TWO_POW_128, 0));\n assert(!gt(0, 0));\n assert(!gt(0, 0x100));\n assert(gt(0 - 1, 0 - 2));\n assert(!gt(0 - 2, 0 - 1));\n }\n\n #[test]\n unconstrained fn check_gt_unconstrained() {\n assert(gt(1, 0));\n assert(gt(0x100, 0));\n assert(gt((0 - 1), (0 - 2)));\n assert(gt(TWO_POW_128, 0));\n assert(!gt(0, 0));\n assert(!gt(0, 0x100));\n assert(gt(0 - 1, 0 - 2));\n assert(!gt(0 - 2, 0 - 1));\n }\n\n #[test]\n fn check_plo_phi() {\n assert_eq(PLO + PHI * TWO_POW_128, 0);\n let p_bytes = crate::field::modulus_le_bytes();\n let mut p_low: Field = 0;\n let mut p_high: Field = 0;\n\n let mut offset = 1;\n for i in 0..16 {\n p_low += (p_bytes[i] as Field) * offset;\n p_high += (p_bytes[i + 16] as Field) * offset;\n offset *= 256;\n }\n assert_eq(p_low, PLO);\n assert_eq(p_high, PHI);\n }\n}\n"
3814
3814
  },
3815
- "178": {
3816
- "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/utils/array/append.nr",
3817
- "source": "/// Appends two `BoundedVec`s together, returning one that contains all of the elements of the first one followed by all\n/// of the elements of the second one. The resulting `BoundedVec` can have any arbitrary maximum length, but it must be\n/// large enough to fit all of the elements of both the first and second vectors.\npub fn append<T, let A_LEN: u32, let B_LEN: u32, let DST_LEN: u32>(\n a: BoundedVec<T, A_LEN>,\n b: BoundedVec<T, B_LEN>,\n) -> BoundedVec<T, DST_LEN> {\n let mut dst = BoundedVec::new();\n\n dst.extend_from_bounded_vec(a);\n dst.extend_from_bounded_vec(b);\n\n dst\n}\n\nmod test {\n use super::append;\n\n #[test]\n unconstrained fn append_empty_vecs() {\n let a: BoundedVec<_, 3> = BoundedVec::new();\n let b: BoundedVec<_, 14> = BoundedVec::new();\n\n let result: BoundedVec<Field, 5> = append(a, b);\n\n assert_eq(result.len(), 0);\n assert_eq(result.storage(), std::mem::zeroed());\n }\n\n #[test]\n unconstrained fn append_non_empty_vecs() {\n let a: BoundedVec<_, 3> = BoundedVec::from_array([1, 2, 3]);\n let b: BoundedVec<_, 14> = BoundedVec::from_array([4, 5, 6]);\n\n let result: BoundedVec<Field, 8> = append(a, b);\n\n assert_eq(result.len(), 6);\n assert_eq(result.storage(), [1, 2, 3, 4, 5, 6, std::mem::zeroed(), std::mem::zeroed()]);\n }\n\n #[test(should_fail_with = \"out of bounds\")]\n unconstrained fn append_non_empty_vecs_insufficient_max_len() {\n let a: BoundedVec<_, 3> = BoundedVec::from_array([1, 2, 3]);\n let b: BoundedVec<_, 14> = BoundedVec::from_array([4, 5, 6]);\n\n let _: BoundedVec<Field, 5> = append(a, b);\n }\n}\n"
3818
- },
3819
3815
  "18": {
3820
3816
  "path": "std/field/mod.nr",
3821
3817
  "source": "pub mod bn254;\nuse crate::{runtime::is_unconstrained, static_assert};\nuse bn254::lt as bn254_lt;\n\nimpl Field {\n /// Asserts that `self` can be represented in `bit_size` bits.\n ///\n /// # Failures\n /// Causes a constraint failure for `Field` values exceeding `2^{bit_size}`.\n // docs:start:assert_max_bit_size\n pub fn assert_max_bit_size<let BIT_SIZE: u32>(self) {\n // docs:end:assert_max_bit_size\n static_assert(\n BIT_SIZE < modulus_num_bits() as u32,\n \"BIT_SIZE must be less than modulus_num_bits\",\n );\n self.__assert_max_bit_size(BIT_SIZE);\n }\n\n #[builtin(apply_range_constraint)]\n fn __assert_max_bit_size(self, bit_size: u32) {}\n\n /// Decomposes `self` into its little endian bit decomposition as a `[u1; N]` array.\n /// This slice will be zero padded should not all bits be necessary to represent `self`.\n ///\n /// # Failures\n /// Causes a constraint failure for `Field` values exceeding `2^N` as the resulting slice will not\n /// be able to represent the original `Field`.\n ///\n /// # Safety\n /// Values of `N` equal to or greater than the number of bits necessary to represent the `Field` modulus\n /// (e.g. 254 for the BN254 field) allow for multiple bit decompositions. This is due to how the `Field` will\n /// wrap around due to overflow when verifying the decomposition.\n #[builtin(to_le_bits)]\n fn _to_le_bits<let N: u32>(self: Self) -> [u1; N] {}\n\n /// Decomposes `self` into its big endian bit decomposition as a `[u1; N]` array.\n /// This array will be zero padded should not all bits be necessary to represent `self`.\n ///\n /// # Failures\n /// Causes a constraint failure for `Field` values exceeding `2^N` as the resulting slice will not\n /// be able to represent the original `Field`.\n ///\n /// # Safety\n /// Values of `N` equal to or greater than the number of bits necessary to represent the `Field` modulus\n /// (e.g. 254 for the BN254 field) allow for multiple bit decompositions. This is due to how the `Field` will\n /// wrap around due to overflow when verifying the decomposition.\n #[builtin(to_be_bits)]\n fn _to_be_bits<let N: u32>(self: Self) -> [u1; N] {}\n\n /// Decomposes `self` into its little endian bit decomposition as a `[u1; N]` array.\n /// This slice will be zero padded should not all bits be necessary to represent `self`.\n ///\n /// # Failures\n /// Causes a constraint failure for `Field` values exceeding `2^N` as the resulting slice will not\n /// be able to represent the original `Field`.\n ///\n /// # Safety\n /// The bit decomposition returned is canonical and is guaranteed to not overflow the modulus.\n // docs:start:to_le_bits\n pub fn to_le_bits<let N: u32>(self: Self) -> [u1; N] {\n // docs:end:to_le_bits\n let bits = self._to_le_bits();\n\n if !is_unconstrained() {\n // Ensure that the byte decomposition does not overflow the modulus\n let p = modulus_le_bits();\n assert(bits.len() <= p.len());\n let mut ok = bits.len() != p.len();\n for i in 0..N {\n if !ok {\n if (bits[N - 1 - i] != p[N - 1 - i]) {\n assert(p[N - 1 - i] == 1);\n ok = true;\n }\n }\n }\n assert(ok);\n }\n bits\n }\n\n /// Decomposes `self` into its big endian bit decomposition as a `[u1; N]` array.\n /// This array will be zero padded should not all bits be necessary to represent `self`.\n ///\n /// # Failures\n /// Causes a constraint failure for `Field` values exceeding `2^N` as the resulting slice will not\n /// be able to represent the original `Field`.\n ///\n /// # Safety\n /// The bit decomposition returned is canonical and is guaranteed to not overflow the modulus.\n // docs:start:to_be_bits\n pub fn to_be_bits<let N: u32>(self: Self) -> [u1; N] {\n // docs:end:to_be_bits\n let bits = self._to_be_bits();\n\n if !is_unconstrained() {\n // Ensure that the decomposition does not overflow the modulus\n let p = modulus_be_bits();\n assert(bits.len() <= p.len());\n let mut ok = bits.len() != p.len();\n for i in 0..N {\n if !ok {\n if (bits[i] != p[i]) {\n assert(p[i] == 1);\n ok = true;\n }\n }\n }\n assert(ok);\n }\n bits\n }\n\n /// Decomposes `self` into its little endian byte decomposition as a `[u8;N]` array\n /// This array will be zero padded should not all bytes be necessary to represent `self`.\n ///\n /// # Failures\n /// The length N of the array must be big enough to contain all the bytes of the 'self',\n /// and no more than the number of bytes required to represent the field modulus\n ///\n /// # Safety\n /// The result is ensured to be the canonical decomposition of the field element\n // docs:start:to_le_bytes\n pub fn to_le_bytes<let N: u32>(self: Self) -> [u8; N] {\n // docs:end:to_le_bytes\n static_assert(\n N <= modulus_le_bytes().len(),\n \"N must be less than or equal to modulus_le_bytes().len()\",\n );\n // Compute the byte decomposition\n let bytes = self.to_le_radix(256);\n\n if !is_unconstrained() {\n // Ensure that the byte decomposition does not overflow the modulus\n let p = modulus_le_bytes();\n assert(bytes.len() <= p.len());\n let mut ok = bytes.len() != p.len();\n for i in 0..N {\n if !ok {\n if (bytes[N - 1 - i] != p[N - 1 - i]) {\n assert(bytes[N - 1 - i] < p[N - 1 - i]);\n ok = true;\n }\n }\n }\n assert(ok);\n }\n bytes\n }\n\n /// Decomposes `self` into its big endian byte decomposition as a `[u8;N]` array of length required to represent the field modulus\n /// This array will be zero padded should not all bytes be necessary to represent `self`.\n ///\n /// # Failures\n /// The length N of the array must be big enough to contain all the bytes of the 'self',\n /// and no more than the number of bytes required to represent the field modulus\n ///\n /// # Safety\n /// The result is ensured to be the canonical decomposition of the field element\n // docs:start:to_be_bytes\n pub fn to_be_bytes<let N: u32>(self: Self) -> [u8; N] {\n // docs:end:to_be_bytes\n static_assert(\n N <= modulus_le_bytes().len(),\n \"N must be less than or equal to modulus_le_bytes().len()\",\n );\n // Compute the byte decomposition\n let bytes = self.to_be_radix(256);\n\n if !is_unconstrained() {\n // Ensure that the byte decomposition does not overflow the modulus\n let p = modulus_be_bytes();\n assert(bytes.len() <= p.len());\n let mut ok = bytes.len() != p.len();\n for i in 0..N {\n if !ok {\n if (bytes[i] != p[i]) {\n assert(bytes[i] < p[i]);\n ok = true;\n }\n }\n }\n assert(ok);\n }\n bytes\n }\n\n // docs:start:to_le_radix\n pub fn to_le_radix<let N: u32>(self: Self, radix: u32) -> [u8; N] {\n // Brillig does not need an immediate radix\n if !crate::runtime::is_unconstrained() {\n static_assert(1 < radix, \"radix must be greater than 1\");\n static_assert(radix <= 256, \"radix must be less than or equal to 256\");\n static_assert(radix & (radix - 1) == 0, \"radix must be a power of 2\");\n }\n self.__to_le_radix(radix)\n }\n // docs:end:to_le_radix\n\n // docs:start:to_be_radix\n pub fn to_be_radix<let N: u32>(self: Self, radix: u32) -> [u8; N] {\n // Brillig does not need an immediate radix\n if !crate::runtime::is_unconstrained() {\n crate::assert_constant(radix);\n }\n self.__to_be_radix(radix)\n }\n // docs:end:to_be_radix\n\n // `_radix` must be less than 256\n #[builtin(to_le_radix)]\n fn __to_le_radix<let N: u32>(self, radix: u32) -> [u8; N] {}\n\n // `_radix` must be less than 256\n #[builtin(to_be_radix)]\n fn __to_be_radix<let N: u32>(self, radix: u32) -> [u8; N] {}\n\n // Returns self to the power of the given exponent value.\n // Caution: we assume the exponent fits into 32 bits\n // using a bigger bit size impacts negatively the performance and should be done only if the exponent does not fit in 32 bits\n pub fn pow_32(self, exponent: Field) -> Field {\n let mut r: Field = 1;\n let b: [u1; 32] = exponent.to_le_bits();\n\n for i in 1..33 {\n r *= r;\n r = (b[32 - i] as Field) * (r * self) + (1 - b[32 - i] as Field) * r;\n }\n r\n }\n\n // Parity of (prime) Field element, i.e. sgn0(x mod p) = 0 if x `elem` {0, ..., p-1} is even, otherwise sgn0(x mod p) = 1.\n pub fn sgn0(self) -> u1 {\n self as u1\n }\n\n pub fn lt(self, another: Field) -> bool {\n if crate::compat::is_bn254() {\n bn254_lt(self, another)\n } else {\n lt_fallback(self, another)\n }\n }\n\n /// Convert a little endian byte array to a field element.\n /// If the provided byte array overflows the field modulus then the Field will silently wrap around.\n pub fn from_le_bytes<let N: u32>(bytes: [u8; N]) -> Field {\n static_assert(\n N <= modulus_le_bytes().len(),\n \"N must be less than or equal to modulus_le_bytes().len()\",\n );\n let mut v = 1;\n let mut result = 0;\n\n for i in 0..N {\n result += (bytes[i] as Field) * v;\n v = v * 256;\n }\n result\n }\n\n /// Convert a big endian byte array to a field element.\n /// If the provided byte array overflows the field modulus then the Field will silently wrap around.\n pub fn from_be_bytes<let N: u32>(bytes: [u8; N]) -> Field {\n let mut v = 1;\n let mut result = 0;\n\n for i in 0..N {\n result += (bytes[N - 1 - i] as Field) * v;\n v = v * 256;\n }\n result\n }\n}\n\n#[builtin(modulus_num_bits)]\npub comptime fn modulus_num_bits() -> u64 {}\n\n#[builtin(modulus_be_bits)]\npub comptime fn modulus_be_bits() -> [u1] {}\n\n#[builtin(modulus_le_bits)]\npub comptime fn modulus_le_bits() -> [u1] {}\n\n#[builtin(modulus_be_bytes)]\npub comptime fn modulus_be_bytes() -> [u8] {}\n\n#[builtin(modulus_le_bytes)]\npub comptime fn modulus_le_bytes() -> [u8] {}\n\n/// An unconstrained only built in to efficiently compare fields.\n#[builtin(field_less_than)]\nunconstrained fn __field_less_than(x: Field, y: Field) -> bool {}\n\npub(crate) unconstrained fn field_less_than(x: Field, y: Field) -> bool {\n __field_less_than(x, y)\n}\n\n// Convert a 32 byte array to a field element by modding\npub fn bytes32_to_field(bytes32: [u8; 32]) -> Field {\n // Convert it to a field element\n let mut v = 1;\n let mut high = 0 as Field;\n let mut low = 0 as Field;\n\n for i in 0..16 {\n high = high + (bytes32[15 - i] as Field) * v;\n low = low + (bytes32[16 + 15 - i] as Field) * v;\n v = v * 256;\n }\n // Abuse that a % p + b % p = (a + b) % p and that low < p\n low + high * v\n}\n\nfn lt_fallback(x: Field, y: Field) -> bool {\n if is_unconstrained() {\n // Safety: unconstrained context\n unsafe {\n field_less_than(x, y)\n }\n } else {\n let x_bytes: [u8; 32] = x.to_le_bytes();\n let y_bytes: [u8; 32] = y.to_le_bytes();\n let mut x_is_lt = false;\n let mut done = false;\n for i in 0..32 {\n if (!done) {\n let x_byte = x_bytes[32 - 1 - i] as u8;\n let y_byte = y_bytes[32 - 1 - i] as u8;\n let bytes_match = x_byte == y_byte;\n if !bytes_match {\n x_is_lt = x_byte < y_byte;\n done = true;\n }\n }\n }\n x_is_lt\n }\n}\n\nmod tests {\n use crate::{panic::panic, runtime};\n use super::field_less_than;\n\n #[test]\n // docs:start:to_be_bits_example\n fn test_to_be_bits() {\n let field = 2;\n let bits: [u1; 8] = field.to_be_bits();\n assert_eq(bits, [0, 0, 0, 0, 0, 0, 1, 0]);\n }\n // docs:end:to_be_bits_example\n\n #[test]\n // docs:start:to_le_bits_example\n fn test_to_le_bits() {\n let field = 2;\n let bits: [u1; 8] = field.to_le_bits();\n assert_eq(bits, [0, 1, 0, 0, 0, 0, 0, 0]);\n }\n // docs:end:to_le_bits_example\n\n #[test]\n // docs:start:to_be_bytes_example\n fn test_to_be_bytes() {\n let field = 2;\n let bytes: [u8; 8] = field.to_be_bytes();\n assert_eq(bytes, [0, 0, 0, 0, 0, 0, 0, 2]);\n assert_eq(Field::from_be_bytes::<8>(bytes), field);\n }\n // docs:end:to_be_bytes_example\n\n #[test]\n // docs:start:to_le_bytes_example\n fn test_to_le_bytes() {\n let field = 2;\n let bytes: [u8; 8] = field.to_le_bytes();\n assert_eq(bytes, [2, 0, 0, 0, 0, 0, 0, 0]);\n assert_eq(Field::from_le_bytes::<8>(bytes), field);\n }\n // docs:end:to_le_bytes_example\n\n #[test]\n // docs:start:to_be_radix_example\n fn test_to_be_radix() {\n // 259, in base 256, big endian, is [1, 3].\n // i.e. 3 * 256^0 + 1 * 256^1\n let field = 259;\n\n // The radix (in this example, 256) must be a power of 2.\n // The length of the returned byte array can be specified to be\n // >= the amount of space needed.\n let bytes: [u8; 8] = field.to_be_radix(256);\n assert_eq(bytes, [0, 0, 0, 0, 0, 0, 1, 3]);\n assert_eq(Field::from_be_bytes::<8>(bytes), field);\n }\n // docs:end:to_be_radix_example\n\n #[test]\n // docs:start:to_le_radix_example\n fn test_to_le_radix() {\n // 259, in base 256, little endian, is [3, 1].\n // i.e. 3 * 256^0 + 1 * 256^1\n let field = 259;\n\n // The radix (in this example, 256) must be a power of 2.\n // The length of the returned byte array can be specified to be\n // >= the amount of space needed.\n let bytes: [u8; 8] = field.to_le_radix(256);\n assert_eq(bytes, [3, 1, 0, 0, 0, 0, 0, 0]);\n assert_eq(Field::from_le_bytes::<8>(bytes), field);\n }\n // docs:end:to_le_radix_example\n\n #[test(should_fail_with = \"radix must be greater than 1\")]\n fn test_to_le_radix_1() {\n // this test should only fail in constrained mode\n if !runtime::is_unconstrained() {\n let field = 2;\n let _: [u8; 8] = field.to_le_radix(1);\n } else {\n panic(f\"radix must be greater than 1\");\n }\n }\n\n // TODO: Update this test to account for the Brillig restriction that the radix must be greater than 2\n //#[test]\n //fn test_to_le_radix_brillig_1() {\n // // this test should only fail in constrained mode\n // if runtime::is_unconstrained() {\n // let field = 1;\n // let out: [u8; 8] = field.to_le_radix(1);\n // crate::println(out);\n // let expected = [0; 8];\n // assert(out == expected, \"unexpected result\");\n // }\n //}\n\n #[test(should_fail_with = \"radix must be a power of 2\")]\n fn test_to_le_radix_3() {\n // this test should only fail in constrained mode\n if !runtime::is_unconstrained() {\n let field = 2;\n let _: [u8; 8] = field.to_le_radix(3);\n } else {\n panic(f\"radix must be a power of 2\");\n }\n }\n\n #[test]\n fn test_to_le_radix_brillig_3() {\n // this test should only fail in constrained mode\n if runtime::is_unconstrained() {\n let field = 1;\n let out: [u8; 8] = field.to_le_radix(3);\n let mut expected = [0; 8];\n expected[0] = 1;\n assert(out == expected, \"unexpected result\");\n }\n }\n\n #[test(should_fail_with = \"radix must be less than or equal to 256\")]\n fn test_to_le_radix_512() {\n // this test should only fail in constrained mode\n if !runtime::is_unconstrained() {\n let field = 2;\n let _: [u8; 8] = field.to_le_radix(512);\n } else {\n panic(f\"radix must be less than or equal to 256\")\n }\n }\n\n // TODO: Update this test to account for the Brillig restriction that the radix must be less than 512\n //#[test]\n //fn test_to_le_radix_brillig_512() {\n // // this test should only fail in constrained mode\n // if runtime::is_unconstrained() {\n // let field = 1;\n // let out: [u8; 8] = field.to_le_radix(512);\n // let mut expected = [0; 8];\n // expected[0] = 1;\n // assert(out == expected, \"unexpected result\");\n // }\n //}\n\n #[test]\n unconstrained fn test_field_less_than() {\n assert(field_less_than(0, 1));\n assert(field_less_than(0, 0x100));\n assert(field_less_than(0x100, 0 - 1));\n assert(!field_less_than(0 - 1, 0));\n }\n}\n"
3822
3818
  },
3823
3819
  "180": {
3820
+ "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/utils/array/append.nr",
3821
+ "source": "/// Appends two `BoundedVec`s together, returning one that contains all of the elements of the first one followed by all\n/// of the elements of the second one. The resulting `BoundedVec` can have any arbitrary maximum length, but it must be\n/// large enough to fit all of the elements of both the first and second vectors.\npub fn append<T, let A_LEN: u32, let B_LEN: u32, let DST_LEN: u32>(\n a: BoundedVec<T, A_LEN>,\n b: BoundedVec<T, B_LEN>,\n) -> BoundedVec<T, DST_LEN> {\n let mut dst = BoundedVec::new();\n\n dst.extend_from_bounded_vec(a);\n dst.extend_from_bounded_vec(b);\n\n dst\n}\n\nmod test {\n use super::append;\n\n #[test]\n unconstrained fn append_empty_vecs() {\n let a: BoundedVec<_, 3> = BoundedVec::new();\n let b: BoundedVec<_, 14> = BoundedVec::new();\n\n let result: BoundedVec<Field, 5> = append(a, b);\n\n assert_eq(result.len(), 0);\n assert_eq(result.storage(), std::mem::zeroed());\n }\n\n #[test]\n unconstrained fn append_non_empty_vecs() {\n let a: BoundedVec<_, 3> = BoundedVec::from_array([1, 2, 3]);\n let b: BoundedVec<_, 14> = BoundedVec::from_array([4, 5, 6]);\n\n let result: BoundedVec<Field, 8> = append(a, b);\n\n assert_eq(result.len(), 6);\n assert_eq(result.storage(), [1, 2, 3, 4, 5, 6, std::mem::zeroed(), std::mem::zeroed()]);\n }\n\n #[test(should_fail_with = \"out of bounds\")]\n unconstrained fn append_non_empty_vecs_insufficient_max_len() {\n let a: BoundedVec<_, 3> = BoundedVec::from_array([1, 2, 3]);\n let b: BoundedVec<_, 14> = BoundedVec::from_array([4, 5, 6]);\n\n let _: BoundedVec<Field, 5> = append(a, b);\n }\n}\n"
3822
+ },
3823
+ "182": {
3824
3824
  "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/utils/array/mod.nr",
3825
3825
  "source": "pub mod append;\npub mod collapse;\npub mod subarray;\npub mod subbvec;\n\npub use append::append;\npub use collapse::collapse;\npub use subarray::subarray;\npub use subbvec::subbvec;\n\n// This will eventually be replaced by `BoundedVec::for_each`, once that's implemented.\npub unconstrained fn for_each_in_bounded_vec<T, let MaxLen: u32, Env>(\n vec: BoundedVec<T, MaxLen>,\n f: fn[Env](T, u32) -> (),\n) {\n for i in 0..vec.len() {\n f(vec.get_unchecked(i), i);\n }\n}\n"
3826
3826
  },
3827
- "181": {
3827
+ "183": {
3828
3828
  "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/utils/array/subarray.nr",
3829
3829
  "source": "/// Returns `DST_LEN` elements from a source array, starting at `offset`. `DST_LEN` must not be larger than the number\n/// of elements past `offset`.\n///\n/// Examples:\n/// ```\n/// let foo: [Field; 2] = subarray([1, 2, 3, 4, 5], 2);\n/// assert_eq(foo, [3, 4]);\n///\n/// let bar: [Field; 5] = subarray([1, 2, 3, 4, 5], 2); // fails - we can't return 5 elements since only 3 remain\n/// ```\npub fn subarray<T, let SRC_LEN: u32, let DST_LEN: u32>(\n src: [T; SRC_LEN],\n offset: u32,\n) -> [T; DST_LEN] {\n assert(offset + DST_LEN <= SRC_LEN, \"DST_LEN too large for offset\");\n\n let mut dst: [T; DST_LEN] = std::mem::zeroed();\n for i in 0..DST_LEN {\n dst[i] = src[i + offset];\n }\n\n dst\n}\n\nmod test {\n use super::subarray;\n\n #[test]\n unconstrained fn subarray_into_empty() {\n // In all of these cases we're setting DST_LEN to be 0, so we always get back an emtpy array.\n assert_eq(subarray::<Field, _, _>([], 0), []);\n assert_eq(subarray([1, 2, 3, 4, 5], 0), []);\n assert_eq(subarray([1, 2, 3, 4, 5], 2), []);\n }\n\n #[test]\n unconstrained fn subarray_complete() {\n assert_eq(subarray::<Field, _, _>([], 0), []);\n assert_eq(subarray([1, 2, 3, 4, 5], 0), [1, 2, 3, 4, 5]);\n }\n\n #[test]\n unconstrained fn subarray_different_end_sizes() {\n // We implicitly select how many values to read in the size of the return array\n assert_eq(subarray([1, 2, 3, 4, 5], 1), [2, 3, 4, 5]);\n assert_eq(subarray([1, 2, 3, 4, 5], 1), [2, 3, 4]);\n assert_eq(subarray([1, 2, 3, 4, 5], 1), [2, 3]);\n assert_eq(subarray([1, 2, 3, 4, 5], 1), [2]);\n }\n\n #[test(should_fail_with = \"DST_LEN too large for offset\")]\n unconstrained fn subarray_offset_too_large() {\n // With an offset of 1 we can only request up to 4 elements\n let _: [_; 5] = subarray([1, 2, 3, 4, 5], 1);\n }\n\n #[test(should_fail)]\n unconstrained fn subarray_bad_return_value() {\n assert_eq(subarray([1, 2, 3, 4, 5], 1), [3, 3, 4, 5]);\n }\n}\n"
3830
3830
  },
3831
- "182": {
3831
+ "184": {
3832
3832
  "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/utils/array/subbvec.nr",
3833
3833
  "source": "use crate::utils::array;\n\n/// Returns `DST_MAX_LEN` elements from a source BoundedVec, starting at `offset`. `offset` must not be larger than the\n/// original length, and `DST_LEN` must not be larger than the total number of elements past `offset` (including the\n/// zeroed elements past `len()`).\n///\n/// Only elements at the beginning of the vector can be removed: it is not possible to also remove elements at the end\n/// of the vector by passing a value for `DST_LEN` that is smaller than `len() - offset`.\n///\n/// Examples:\n/// ```\n/// let foo = BoundedVec::<_, 10>::from_array([1, 2, 3, 4, 5]);\n/// assert_eq(subbvec(foo, 2), BoundedVec::<_, 8>::from_array([3, 4, 5]));\n///\n/// let bar: BoundedVec<_, 1> = subbvec(foo, 2); // fails - we can't return just 1 element since 3 remain\n/// let baz: BoundedVec<_, 10> = subbvec(foo, 3); // fails - we can't return 10 elements since only 7 remain\n/// ```\npub fn subbvec<T, let SRC_MAX_LEN: u32, let DST_MAX_LEN: u32>(\n bvec: BoundedVec<T, SRC_MAX_LEN>,\n offset: u32,\n) -> BoundedVec<T, DST_MAX_LEN> {\n // from_parts_unchecked does not verify that the elements past len are zeroed, but that is not an issue in our case\n // because we're constructing the new storage array as a subarray of the original one (which should have zeroed\n // storage past len), guaranteeing correctness. This is because `subarray` does not allow extending arrays past\n // their original length.\n BoundedVec::from_parts_unchecked(array::subarray(bvec.storage(), offset), bvec.len() - offset)\n}\n\nmod test {\n use super::subbvec;\n\n #[test]\n unconstrained fn subbvec_empty() {\n let bvec = BoundedVec::<Field, 0>::from_array([]);\n assert_eq(subbvec(bvec, 0), bvec);\n }\n\n #[test]\n unconstrained fn subbvec_complete() {\n let bvec = BoundedVec::<_, 10>::from_array([1, 2, 3, 4, 5]);\n assert_eq(subbvec(bvec, 0), bvec);\n\n let smaller_capacity = BoundedVec::<_, 5>::from_array([1, 2, 3, 4, 5]);\n assert_eq(subbvec(bvec, 0), smaller_capacity);\n }\n\n #[test]\n unconstrained fn subbvec_partial() {\n let bvec = BoundedVec::<_, 10>::from_array([1, 2, 3, 4, 5]);\n\n assert_eq(subbvec(bvec, 2), BoundedVec::<_, 8>::from_array([3, 4, 5]));\n assert_eq(subbvec(bvec, 2), BoundedVec::<_, 3>::from_array([3, 4, 5]));\n }\n\n #[test]\n unconstrained fn subbvec_into_empty() {\n let bvec: BoundedVec<_, 10> = BoundedVec::from_array([1, 2, 3, 4, 5]);\n assert_eq(subbvec(bvec, 5), BoundedVec::<_, 5>::from_array([]));\n }\n\n #[test(should_fail)]\n unconstrained fn subbvec_offset_past_len() {\n let bvec = BoundedVec::<_, 10>::from_array([1, 2, 3, 4, 5]);\n let _: BoundedVec<_, 1> = subbvec(bvec, 6);\n }\n\n #[test(should_fail)]\n unconstrained fn subbvec_insufficient_dst_len() {\n let bvec = BoundedVec::<_, 10>::from_array([1, 2, 3, 4, 5]);\n\n // We're not providing enough space to hold all of the items inside the original BoundedVec. subbvec can cause\n // for the capacity to reduce, but not the length (other than by len - offset).\n let _: BoundedVec<_, 1> = subbvec(bvec, 2);\n }\n\n #[test(should_fail_with = \"DST_LEN too large for offset\")]\n unconstrained fn subbvec_dst_len_causes_enlarge() {\n let bvec = BoundedVec::<_, 10>::from_array([1, 2, 3, 4, 5]);\n\n // subbvec does not supprt capacity increases\n let _: BoundedVec<_, 11> = subbvec(bvec, 0);\n }\n\n #[test(should_fail_with = \"DST_LEN too large for offset\")]\n unconstrained fn subbvec_dst_len_too_large_for_offset() {\n let bvec = BoundedVec::<_, 10>::from_array([1, 2, 3, 4, 5]);\n\n // This effectively requests a capacity increase, since there'd be just one element plus the 5 empty slots,\n // which is less than 7.\n let _: BoundedVec<_, 7> = subbvec(bvec, 4);\n }\n}\n"
3834
3834
  },
3835
- "183": {
3835
+ "185": {
3836
3836
  "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/utils/comparison.nr",
3837
3837
  "source": "struct ComparatorEnum {\n pub EQ: u8,\n pub NEQ: u8,\n pub LT: u8,\n pub LTE: u8,\n pub GT: u8,\n pub GTE: u8,\n}\n\npub global Comparator: ComparatorEnum =\n ComparatorEnum { EQ: 1, NEQ: 2, LT: 3, LTE: 4, GT: 5, GTE: 6 };\n\npub fn compare(lhs: Field, operation: u8, rhs: Field) -> bool {\n // Values are computed ahead of time because circuits evaluate all branches\n let is_equal = lhs == rhs;\n let is_lt = lhs.lt(rhs);\n\n if (operation == Comparator.EQ) {\n is_equal\n } else if (operation == Comparator.NEQ) {\n !is_equal\n } else if (operation == Comparator.LT) {\n is_lt\n } else if (operation == Comparator.LTE) {\n is_lt | is_equal\n } else if (operation == Comparator.GT) {\n !is_lt & !is_equal\n } else if (operation == Comparator.GTE) {\n !is_lt\n } else {\n panic(f\"Invalid operation\")\n }\n}\n\nmod test {\n use super::Comparator;\n use super::compare;\n\n #[test]\n unconstrained fn test_compare() {\n let lhs = 10;\n let rhs = 10;\n assert(compare(lhs, Comparator.EQ, rhs), \"Expected lhs to be equal to rhs\");\n\n let lhs = 10;\n let rhs = 11;\n assert(compare(lhs, Comparator.NEQ, rhs), \"Expected lhs to be not equal to rhs\");\n\n let lhs = 10;\n let rhs = 11;\n assert(compare(lhs, Comparator.LT, rhs), \"Expected lhs to be less than rhs\");\n\n let lhs = 10;\n let rhs = 10;\n assert(compare(lhs, Comparator.LTE, rhs), \"Expected lhs to be less than or equal to rhs\");\n\n let lhs = 11;\n let rhs = 10;\n assert(compare(lhs, Comparator.GT, rhs), \"Expected lhs to be greater than rhs\");\n\n let lhs = 10;\n let rhs = 10;\n assert(\n compare(lhs, Comparator.GTE, rhs),\n \"Expected lhs to be greater than or equal to rhs\",\n );\n\n let lhs = 11;\n let rhs = 10;\n assert(\n compare(lhs, Comparator.GTE, rhs),\n \"Expected lhs to be greater than or equal to rhs\",\n );\n\n let lhs = 10;\n let rhs = 11;\n assert(!compare(lhs, Comparator.EQ, rhs), \"Expected lhs to be not equal to rhs\");\n\n let lhs = 10;\n let rhs = 10;\n assert(!compare(lhs, Comparator.NEQ, rhs), \"Expected lhs to not be not equal to rhs\");\n\n let lhs = 11;\n let rhs = 10;\n assert(!compare(lhs, Comparator.LT, rhs), \"Expected lhs to not be less than rhs\");\n\n let lhs = 11;\n let rhs = 10;\n assert(\n !compare(lhs, Comparator.LTE, rhs),\n \"Expected lhs to not be less than or equal to rhs\",\n );\n\n let lhs = 10;\n let rhs = 10;\n assert(!compare(lhs, Comparator.GT, rhs), \"Expected lhs to not be greater than rhs\");\n\n let lhs = 10;\n let rhs = 11;\n assert(\n !compare(lhs, Comparator.GTE, rhs),\n \"Expected lhs to not be greater than or equal to rhs\",\n );\n\n let lhs = 10;\n let rhs = 11;\n assert(\n !compare(lhs, Comparator.GTE, rhs),\n \"Expected lhs to not be greater than or equal to rhs\",\n );\n }\n}\n"
3838
3838
  },
@@ -3840,31 +3840,31 @@
3840
3840
  "path": "std/hash/poseidon2.nr",
3841
3841
  "source": "use crate::default::Default;\nuse crate::hash::Hasher;\n\ncomptime global RATE: u32 = 3;\n\npub struct Poseidon2 {\n cache: [Field; 3],\n state: [Field; 4],\n cache_size: u32,\n squeeze_mode: bool, // 0 => absorb, 1 => squeeze\n}\n\nimpl Poseidon2 {\n #[no_predicates]\n pub fn hash<let N: u32>(input: [Field; N], message_size: u32) -> Field {\n Poseidon2::hash_internal(input, message_size, message_size != N)\n }\n\n pub fn new(iv: Field) -> Poseidon2 {\n let mut result =\n Poseidon2 { cache: [0; 3], state: [0; 4], cache_size: 0, squeeze_mode: false };\n result.state[RATE] = iv;\n result\n }\n\n fn perform_duplex(&mut self) {\n // add the cache into sponge state\n for i in 0..RATE {\n // We effectively zero-pad the cache by only adding to the state\n // cache that is less than the specified `cache_size`\n if i < self.cache_size {\n self.state[i] += self.cache[i];\n }\n }\n self.state = crate::hash::poseidon2_permutation(self.state, 4);\n }\n\n fn absorb(&mut self, input: Field) {\n assert(!self.squeeze_mode);\n if self.cache_size == RATE {\n // If we're absorbing, and the cache is full, apply the sponge permutation to compress the cache\n self.perform_duplex();\n self.cache[0] = input;\n self.cache_size = 1;\n } else {\n // If we're absorbing, and the cache is not full, add the input into the cache\n self.cache[self.cache_size] = input;\n self.cache_size += 1;\n }\n }\n\n fn squeeze(&mut self) -> Field {\n assert(!self.squeeze_mode);\n // If we're in absorb mode, apply sponge permutation to compress the cache.\n self.perform_duplex();\n self.squeeze_mode = true;\n\n // Pop one item off the top of the permutation and return it.\n self.state[0]\n }\n\n fn hash_internal<let N: u32>(\n input: [Field; N],\n in_len: u32,\n is_variable_length: bool,\n ) -> Field {\n let two_pow_64 = 18446744073709551616;\n let iv: Field = (in_len as Field) * two_pow_64;\n let mut sponge = Poseidon2::new(iv);\n for i in 0..input.len() {\n if i < in_len {\n sponge.absorb(input[i]);\n }\n }\n\n // In the case where the hash preimage is variable-length, we append `1` to the end of the input, to distinguish\n // from fixed-length hashes. (the combination of this additional field element + the hash IV ensures\n // fixed-length and variable-length hashes do not collide)\n if is_variable_length {\n sponge.absorb(1);\n }\n sponge.squeeze()\n }\n}\n\npub struct Poseidon2Hasher {\n _state: [Field],\n}\n\nimpl Hasher for Poseidon2Hasher {\n fn finish(self) -> Field {\n let iv: Field = (self._state.len() as Field) * 18446744073709551616; // iv = (self._state.len() << 64)\n let mut sponge = Poseidon2::new(iv);\n for i in 0..self._state.len() {\n sponge.absorb(self._state[i]);\n }\n sponge.squeeze()\n }\n\n fn write(&mut self, input: Field) {\n self._state = self._state.push_back(input);\n }\n}\n\nimpl Default for Poseidon2Hasher {\n fn default() -> Self {\n Poseidon2Hasher { _state: &[] }\n }\n}\n"
3842
3842
  },
3843
- "271": {
3843
+ "273": {
3844
3844
  "path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/debug_log.nr",
3845
3845
  "source": "/// Utility function to console.log data in the acir simulator.\n/// Example:\n/// debug_log(\"blah blah this is a debug string\");\npub fn debug_log<let N: u32>(msg: str<N>) {\n debug_log_format(msg, []);\n}\n\n/// Utility function to console.log data in the acir simulator. This variant receives a format string in which the\n/// `${k}` tokens will be replaced with the k-eth value in the `args` array.\n/// Examples:\n/// debug_log_format(\"get_2(slot:{0}) =>\\n\\t0:{1}\\n\\t1:{2}\", [storage_slot, note0_hash, note1_hash]);\n/// debug_log_format(\"whole array: {}\", [e1, e2, e3, e4]);\npub fn debug_log_format<let M: u32, let N: u32>(msg: str<M>, args: [Field; N]) {\n // Safety: This oracle call returns nothing: we only call it for its side effects. It is therefore always safe\n // to call.\n unsafe { debug_log_oracle_wrapper(msg, args) };\n}\n\npub unconstrained fn debug_log_oracle_wrapper<let M: u32, let N: u32>(\n msg: str<M>,\n args: [Field; N],\n) {\n debug_log_oracle(msg, args.as_slice());\n}\n\n// WARNING: sometimes when using debug logs the ACVM errors with: `thrown: \"solver opcode resolution error: cannot solve opcode: expression has too many unknowns x155\"`\n#[oracle(debugLog)]\nunconstrained fn debug_log_oracle<let M: u32>(_msg: str<M>, args: [Field]) {}\n"
3846
3846
  },
3847
- "272": {
3847
+ "274": {
3848
3848
  "path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/hash.nr",
3849
3849
  "source": "use crate::{\n abis::{\n contract_class_function_leaf_preimage::ContractClassFunctionLeafPreimage,\n contract_class_log::ContractClassLog,\n function_selector::FunctionSelector,\n note_hash::ScopedNoteHash,\n nullifier::ScopedNullifier,\n private_log::{PrivateLog, PrivateLogData},\n side_effect::{OrderedValue, scoped::Scoped},\n },\n address::{AztecAddress, EthAddress},\n constants::{\n FUNCTION_TREE_HEIGHT, GENERATOR_INDEX__NOTE_HASH_NONCE, GENERATOR_INDEX__OUTER_NULLIFIER,\n GENERATOR_INDEX__SILOED_NOTE_HASH, GENERATOR_INDEX__UNIQUE_NOTE_HASH, TWO_POW_64,\n },\n merkle_tree::root::root_from_sibling_path,\n messaging::l2_to_l1_message::{L2ToL1Message, ScopedL2ToL1Message},\n poseidon2::Poseidon2Sponge,\n traits::{FromField, Hash, ToField},\n utils::{\n arrays::{array_concat, unsafe_padded_array_length},\n field::{field_from_bytes, field_from_bytes_32_trunc},\n },\n};\n\npub fn sha256_to_field<let N: u32>(bytes_to_hash: [u8; N]) -> Field {\n let sha256_hashed = sha256::digest(bytes_to_hash);\n let hash_in_a_field = field_from_bytes_32_trunc(sha256_hashed);\n\n hash_in_a_field\n}\n\npub fn private_functions_root_from_siblings(\n selector: FunctionSelector,\n vk_hash: Field,\n function_leaf_index: Field,\n function_leaf_sibling_path: [Field; FUNCTION_TREE_HEIGHT],\n) -> Field {\n let function_leaf_preimage = ContractClassFunctionLeafPreimage { selector, vk_hash };\n let function_leaf = function_leaf_preimage.hash();\n root_from_sibling_path(\n function_leaf,\n function_leaf_index,\n function_leaf_sibling_path,\n )\n}\n\npub fn compute_note_hash_nonce(first_nullifier_in_tx: Field, note_index_in_tx: u32) -> Field {\n // Hashing the first nullifier with note index in tx is guaranteed to be unique (because all nullifiers are also\n // unique).\n poseidon2_hash_with_separator(\n [first_nullifier_in_tx, note_index_in_tx as Field],\n GENERATOR_INDEX__NOTE_HASH_NONCE,\n )\n}\n\npub fn compute_unique_note_hash(nonce: Field, siloed_note_hash: Field) -> Field {\n let inputs = [nonce, siloed_note_hash];\n poseidon2_hash_with_separator(inputs, GENERATOR_INDEX__UNIQUE_NOTE_HASH)\n}\n\npub fn compute_siloed_note_hash(app: AztecAddress, note_hash: Field) -> Field {\n poseidon2_hash_with_separator(\n [app.to_field(), note_hash],\n GENERATOR_INDEX__SILOED_NOTE_HASH,\n )\n}\n\n/// Computes unique note hashes from siloed note hashes\npub fn compute_unique_siloed_note_hash(\n siloed_note_hash: Field,\n first_nullifier: Field,\n note_index_in_tx: u32,\n) -> Field {\n if siloed_note_hash == 0 {\n 0\n } else {\n let nonce = compute_note_hash_nonce(first_nullifier, note_index_in_tx);\n compute_unique_note_hash(nonce, siloed_note_hash)\n }\n}\n\n/// Siloing in the context of Aztec refers to the process of hashing a note hash with a contract address (this way\n/// the note hash is scoped to a specific contract). This is used to prevent intermingling of notes between contracts.\npub fn silo_note_hash(note_hash: ScopedNoteHash) -> Field {\n if note_hash.contract_address.is_zero() {\n 0\n } else {\n compute_siloed_note_hash(note_hash.contract_address, note_hash.value())\n }\n}\n\npub fn compute_siloed_nullifier(app: AztecAddress, nullifier: Field) -> Field {\n poseidon2_hash_with_separator(\n [app.to_field(), nullifier],\n GENERATOR_INDEX__OUTER_NULLIFIER,\n )\n}\n\npub fn silo_nullifier(nullifier: ScopedNullifier) -> Field {\n if nullifier.contract_address.is_zero() {\n nullifier.value() // Return value instead of 0 because the first nullifier's contract address is zero.\n } else {\n compute_siloed_nullifier(nullifier.contract_address, nullifier.value())\n }\n}\n\npub fn compute_siloed_private_log_field(contract_address: AztecAddress, field: Field) -> Field {\n poseidon2_hash([contract_address.to_field(), field])\n}\n\npub fn silo_private_log(private_log: Scoped<PrivateLogData>) -> PrivateLog {\n if private_log.contract_address.is_zero() {\n private_log.inner.log\n } else {\n let mut fields = private_log.inner.log.fields;\n fields[0] = compute_siloed_private_log_field(private_log.contract_address, fields[0]);\n PrivateLog { fields }\n }\n}\n\nfn compute_siloed_contract_class_log_field(\n contract_address: AztecAddress,\n first_field: Field,\n) -> Field {\n poseidon2_hash([contract_address.to_field(), first_field])\n}\n\npub fn silo_contract_class_log(contract_class_log: ContractClassLog) -> ContractClassLog {\n if contract_class_log.contract_address.is_zero() {\n contract_class_log\n } else {\n let mut log = contract_class_log;\n log.log.fields[0] = compute_siloed_contract_class_log_field(\n contract_class_log.contract_address,\n log.log.fields[0],\n );\n log\n }\n}\n\npub fn compute_contract_class_log_hash(contract_class_log: ContractClassLog) -> Field {\n let array = contract_class_log.log.fields;\n // Safety: The below length is constrained in the base rollup.\n let length = unsafe { unsafe_padded_array_length(array) };\n if length == 0 {\n 0\n } else {\n poseidon2_hash(array)\n }\n}\n\npub fn merkle_hash(left: Field, right: Field) -> Field {\n poseidon2_hash([left, right])\n}\n\npub fn compute_l2_to_l1_hash(\n contract_address: AztecAddress,\n recipient: EthAddress,\n content: Field,\n rollup_version_id: Field,\n chain_id: Field,\n) -> Field {\n let mut bytes: [u8; 160] = std::mem::zeroed();\n\n let inputs =\n [contract_address.to_field(), rollup_version_id, recipient.to_field(), chain_id, content];\n for i in 0..5 {\n // TODO are bytes be in fr.to_buffer() ?\n let item_bytes: [u8; 32] = inputs[i].to_be_bytes();\n for j in 0..32 {\n bytes[32 * i + j] = item_bytes[j];\n }\n }\n\n sha256_to_field(bytes)\n}\n\npub fn silo_l2_to_l1_message(\n msg: ScopedL2ToL1Message,\n rollup_version_id: Field,\n chain_id: Field,\n) -> Field {\n if msg.contract_address.is_zero() {\n 0\n } else {\n compute_l2_to_l1_hash(\n msg.contract_address,\n msg.message.recipient,\n msg.message.content,\n rollup_version_id,\n chain_id,\n )\n }\n}\n\n// Computes sha256 hash of 2 input hashes.\n//\n// NB: This method now takes in two 31 byte fields - it assumes that any input\n// is the result of a sha_to_field hash and => is truncated\n//\n// TODO(Jan and David): This is used for the encrypted_log hashes.\n// Can we check to see if we can just use hash_to_field or pedersen_compress here?\n//\npub fn accumulate_sha256(input: [Field; 2]) -> Field {\n // This is a note about the cpp code, since it takes an array of Fields\n // instead of a u128.\n // 4 Field elements when converted to bytes will usually\n // occupy 4 * 32 = 128 bytes.\n // However, this function is making the assumption that each Field\n // only occupies 128 bits.\n //\n // TODO(David): This does not seem to be getting guaranteed anywhere in the code?\n // Concatentate two fields into 32x2 = 64 bytes\n // accumulate_sha256 assumes that the inputs are pre-truncated 31 byte numbers\n let mut hash_input_flattened = [0; 64];\n for offset in 0..input.len() {\n let input_as_bytes: [u8; 32] = input[offset].to_be_bytes();\n for byte_index in 0..32 {\n hash_input_flattened[offset * 32 + byte_index] = input_as_bytes[byte_index];\n }\n }\n\n sha256_to_field(hash_input_flattened)\n}\n\npub fn verification_key_hash<let N: u32>(key: [Field; N]) -> Field {\n crate::hash::poseidon2_hash(key)\n}\n\n#[inline_always]\npub fn pedersen_hash<let N: u32>(inputs: [Field; N], hash_index: u32) -> Field {\n std::hash::pedersen_hash_with_separator(inputs, hash_index)\n}\n\npub fn poseidon2_hash<let N: u32>(inputs: [Field; N]) -> Field {\n std::hash::poseidon2::Poseidon2::hash(inputs, N)\n}\n\n#[no_predicates]\npub fn poseidon2_hash_with_separator<let N: u32, T>(inputs: [Field; N], separator: T) -> Field\nwhere\n T: ToField,\n{\n let inputs_with_separator = array_concat([separator.to_field()], inputs);\n poseidon2_hash(inputs_with_separator)\n}\n\n// Performs a fixed length hash with a subarray of the given input.\n// Useful for SpongeBlob in which we aborb M things and want to check it vs a hash of M elts of an N-len array.\n// Using stdlib poseidon, this will always absorb an extra 1 as a 'variable' hash, and not match spongeblob.squeeze()\n// or any ts implementation. Also checks that any remaining elts not hashed are empty.\n#[no_predicates]\npub fn poseidon2_hash_subarray<let N: u32>(input: [Field; N], in_len: u32) -> Field {\n let mut sponge = poseidon2_absorb_chunks(input, in_len, false);\n sponge.squeeze()\n}\n\n// NB the below is the same as std::hash::poseidon2::Poseidon2::hash(), but replacing a range check with a bit check,\n// and absorbing in chunks of 3 below.\n#[no_predicates]\npub fn poseidon2_cheaper_variable_hash<let N: u32>(input: [Field; N], in_len: u32) -> Field {\n let mut sponge = poseidon2_absorb_chunks(input, in_len, true);\n // In the case where the hash preimage is variable-length, we append `1` to the end of the input, to distinguish\n // from fixed-length hashes. (the combination of this additional field element + the hash IV ensures\n // fixed-length and variable-length hashes do not collide)\n if in_len != N {\n sponge.absorb(1);\n }\n sponge.squeeze()\n}\n\n// The below fn reduces gates of a conditional poseidon2 hash by approx 3x (thank you ~* Giant Brain Dev @IlyasRidhuan *~ for the idea)\n// Why? Because when we call stdlib poseidon, we call absorb for each item. When absorbing is conditional, it seems the compiler does not know\n// what cache_size will be when calling absorb, so it assigns the permutation gates for /each i/ rather than /every 3rd i/, which is actually required.\n// The below code forces the compiler to:\n// - absorb normally up to 2 times to set cache_size to 1\n// - absorb in chunks of 3 to ensure perm. only happens every 3rd absorb\n// - absorb normally up to 2 times to add any remaining values to the hash\n// In fixed len hashes, the compiler is able to tell that it will only need to perform the permutation every 3 absorbs.\n// NB: it also replaces unnecessary range checks (i < thing) with a bit check (&= i != thing), which alone reduces the gates of a var. hash by half.\n\n#[no_predicates]\nfn poseidon2_absorb_chunks<let N: u32>(\n input: [Field; N],\n in_len: u32,\n variable: bool,\n) -> Poseidon2Sponge {\n let iv: Field = (in_len as Field) * TWO_POW_64;\n let mut sponge = Poseidon2Sponge::new(iv);\n // Even though shift is always 1 here, if we input in_len = 0 we get an underflow\n // since we cannot isolate computation branches. The below is just to avoid that.\n let shift = if in_len == 0 { 0 } else { 1 };\n if in_len != 0 {\n // cache_size = 0, init absorb\n sponge.cache[0] = input[0];\n sponge.cache_size = 1;\n // shift = num elts already added to make cache_size 1 = 1 for a fresh sponge\n // M = max_chunks = (N - 1 - (N - 1) % 3) / 3: (must be written as a fn of N to compile)\n // max_remainder = (N - 1) % 3;\n // max_chunks = (N - 1 - max_remainder) / 3;\n sponge = poseidon2_absorb_chunks_loop::<N, (N - 1 - (N - 1) % 3) / 3>(\n sponge,\n input,\n in_len,\n variable,\n shift,\n );\n }\n sponge\n}\n\n// NB: If it's not required to check that the non-absorbed elts of 'input' are 0s, set skip_0_check=true\n#[no_predicates]\npub fn poseidon2_absorb_chunks_existing_sponge<let N: u32>(\n in_sponge: Poseidon2Sponge,\n input: [Field; N],\n in_len: u32,\n skip_0_check: bool,\n) -> Poseidon2Sponge {\n let mut sponge = in_sponge;\n // 'shift' is to account for already added inputs\n let mut shift = 0;\n // 'stop' is to avoid an underflow when inputting in_len = 0\n let mut stop = false;\n for i in 0..3 {\n if shift == in_len {\n stop = true;\n }\n if (sponge.cache_size != 1) & (!stop) {\n sponge.absorb(input[i]);\n shift += 1;\n }\n }\n sponge = if stop {\n sponge\n } else {\n // max_chunks = (N - (N % 3)) / 3;\n poseidon2_absorb_chunks_loop::<N, (N - (N % 3)) / 3>(\n sponge,\n input,\n in_len,\n skip_0_check,\n shift,\n )\n };\n sponge\n}\n\n// The below is the loop to absorb elts into a poseidon sponge in chunks of 3\n// shift - the num of elts already absorbed to ensure the sponge's cache_size = 1\n// M - the max number of chunks required to absorb N things (must be comptime to compile)\n// NB: The 0 checks ('Found non-zero field...') are messy, but having a separate loop over N to check\n// for 0s costs 3N gates. Current approach is approx 2N gates.\n#[no_predicates]\nfn poseidon2_absorb_chunks_loop<let N: u32, let M: u32>(\n in_sponge: Poseidon2Sponge,\n input: [Field; N],\n in_len: u32,\n variable: bool,\n shift: u32,\n) -> Poseidon2Sponge {\n assert(in_len <= N, \"Given in_len to absorb is larger than the input array len\");\n // When we have an existing sponge, we may have a shift of 0, and the final 'k+2' below = N\n // The below avoids an overflow\n let skip_last = 3 * M == N;\n // Writing in_sponge: &mut does not compile\n let mut sponge = in_sponge;\n let mut should_add = true;\n // The num of things left over after absorbing in 3s\n let remainder = (in_len - shift) % 3;\n // The num of chunks of 3 to absorb (maximum M)\n let chunks = (in_len - shift - remainder) / 3;\n for i in 0..M {\n // Now we loop through cache size = 1 -> 3\n should_add &= i != chunks;\n // This is the index at the start of the chunk (for readability)\n let k = 3 * i + shift;\n if should_add {\n // cache_size = 1, 2 => just assign\n sponge.cache[1] = input[k];\n sponge.cache[2] = input[k + 1];\n // cache_size = 3 => duplex + perm\n for j in 0..3 {\n sponge.state[j] += sponge.cache[j];\n }\n sponge.state = std::hash::poseidon2_permutation(sponge.state, 4);\n sponge.cache[0] = input[k + 2];\n // cache_size is now 1 again, repeat loop\n } else if (!variable) & (i != chunks) {\n // if we are hashing a fixed len array which is a subarray, we check the remaining elts are 0\n // NB: we don't check at i == chunks, because that chunk contains elts to be absorbed or checked below\n let last_0 = if (i == M - 1) & (skip_last) {\n 0\n } else {\n input[k + 2]\n };\n let all_0 = (input[k] == 0) & (input[k + 1] == 0) & (last_0 == 0);\n assert(all_0, \"Found non-zero field after breakpoint\");\n }\n }\n // we have 'remainder' num of items left to absorb\n should_add = true;\n // below is to avoid overflows (i.e. if inlen is close to N)\n let mut should_check = !variable;\n for i in 0..3 {\n should_add &= i != remainder;\n should_check &= in_len - remainder + i != N;\n if should_add {\n // we want to absorb the final 'remainder' items\n sponge.absorb(input[in_len - remainder + i]);\n } else if should_check {\n assert(input[in_len - remainder + i] == 0, \"Found non-zero field after breakpoint\");\n }\n }\n sponge\n}\n\npub fn poseidon2_hash_with_separator_slice<T>(inputs: [Field], separator: T) -> Field\nwhere\n T: ToField,\n{\n let in_len = inputs.len() + 1;\n let iv: Field = (in_len as Field) * TWO_POW_64;\n let mut sponge = Poseidon2Sponge::new(iv);\n sponge.absorb(separator.to_field());\n\n for i in 0..inputs.len() {\n sponge.absorb(inputs[i]);\n }\n\n sponge.squeeze()\n}\n\n#[no_predicates]\npub fn poseidon2_hash_bytes<let N: u32>(inputs: [u8; N]) -> Field {\n let mut fields = [0; (N + 30) / 31];\n let mut field_index = 0;\n let mut current_field = [0; 31];\n for i in 0..inputs.len() {\n let index = i % 31;\n current_field[index] = inputs[i];\n if index == 30 {\n fields[field_index] = field_from_bytes(current_field, false);\n current_field = [0; 31];\n field_index += 1;\n }\n }\n if field_index != fields.len() {\n fields[field_index] = field_from_bytes(current_field, false);\n }\n poseidon2_hash(fields)\n}\n\n#[test]\nfn poseidon_chunks_matches_fixed() {\n let in_len = 501;\n let mut input: [Field; 4096] = [0; 4096];\n let mut fixed_input = [3; 501];\n assert(in_len == fixed_input.len()); // sanity check\n for i in 0..in_len {\n input[i] = 3;\n }\n let sub_chunk_hash = poseidon2_hash_subarray(input, in_len);\n let fixed_len_hash = std::hash::poseidon2::Poseidon2::hash(fixed_input, fixed_input.len());\n assert(sub_chunk_hash == fixed_len_hash);\n}\n\n#[test]\nfn poseidon_chunks_matches_variable() {\n let in_len = 501;\n let mut input: [Field; 4096] = [0; 4096];\n for i in 0..in_len {\n input[i] = 3;\n }\n let variable_chunk_hash = poseidon2_cheaper_variable_hash(input, in_len);\n let variable_len_hash = std::hash::poseidon2::Poseidon2::hash(input, in_len);\n assert(variable_chunk_hash == variable_len_hash);\n}\n\n#[test]\nfn existing_sponge_poseidon_chunks_matches_fixed() {\n let in_len = 501;\n let mut input: [Field; 4096] = [0; 4096];\n let mut fixed_input = [3; 501];\n assert(in_len == fixed_input.len()); // sanity check\n for i in 0..in_len {\n input[i] = 3;\n }\n // absorb 250 of the 501 things\n let empty_sponge = Poseidon2Sponge::new((in_len as Field) * TWO_POW_64);\n let first_sponge = poseidon2_absorb_chunks_existing_sponge(empty_sponge, input, 250, true);\n // now absorb the final 251 (since they are all 3s, im being lazy and not making a new array)\n let mut final_sponge = poseidon2_absorb_chunks_existing_sponge(first_sponge, input, 251, true);\n let fixed_len_hash = Poseidon2Sponge::hash(fixed_input, fixed_input.len());\n assert(final_sponge.squeeze() == fixed_len_hash);\n}\n\n#[test]\nfn poseidon_chunks_empty_inputs() {\n let in_len = 0;\n let mut input: [Field; 4096] = [0; 4096];\n let mut constructed_empty_sponge = poseidon2_absorb_chunks(input, in_len, true);\n let mut first_sponge =\n poseidon2_absorb_chunks_existing_sponge(constructed_empty_sponge, input, in_len, true);\n assert(first_sponge.squeeze() == constructed_empty_sponge.squeeze());\n}\n\n#[test]\nfn smoke_sha256_to_field() {\n let full_buffer = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,\n 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,\n 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,\n 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,\n 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,\n 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,\n 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,\n 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,\n ];\n let result = sha256_to_field(full_buffer);\n\n assert(result == 0x448ebbc9e1a31220a2f3830c18eef61b9bd070e5084b7fa2a359fe729184c7);\n\n // to show correctness of the current ver (truncate one byte) vs old ver (mod full bytes):\n let result_bytes = sha256::digest(full_buffer);\n let truncated_field = crate::utils::field::field_from_bytes_32_trunc(result_bytes);\n assert(truncated_field == result);\n let mod_res = result + (result_bytes[31] as Field);\n assert(mod_res == 0x448ebbc9e1a31220a2f3830c18eef61b9bd070e5084b7fa2a359fe729184e0);\n}\n\n#[test]\nfn compute_l2_l1_hash() {\n // All zeroes\n let hash_result =\n compute_l2_to_l1_hash(AztecAddress::from_field(0), EthAddress::zero(), 0, 0, 0);\n assert(hash_result == 0xb393978842a0fa3d3e1470196f098f473f9678e72463cb65ec4ab5581856c2);\n\n // Non-zero case\n let hash_result = compute_l2_to_l1_hash(\n AztecAddress::from_field(1),\n EthAddress::from_field(3),\n 5,\n 2,\n 4,\n );\n assert(hash_result == 0x3f88c1044a05e5340ed20466276500f6d45ca5603913b9091e957161734e16);\n}\n\n#[test]\nfn silo_l2_to_l1_message_matches_typescript() {\n let version = 4;\n let chainId = 5;\n\n let hash = silo_l2_to_l1_message(\n ScopedL2ToL1Message {\n message: L2ToL1Message { recipient: EthAddress::from_field(1), content: 2, counter: 0 },\n contract_address: AztecAddress::from_field(3),\n },\n version,\n chainId,\n );\n\n // The following value was generated by `l2_to_l1_message.test.ts`\n let hash_from_typescript = 0x00c6155d69febb9d5039b374dd4f77bf57b7c881709aa524a18acaa0bd57476a;\n\n assert_eq(hash, hash_from_typescript);\n}\n"
3850
3850
  },
3851
- "286": {
3851
+ "288": {
3852
3852
  "path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/meta/mod.nr",
3853
3853
  "source": "use super::traits::{Deserialize, Packable, Serialize};\n\n/// Returns the typed expression of a trait method implementation.\n///\n/// This helper function is preferred over directly inlining with `$typ::target_method()` in a quote,\n/// as direct inlining would result in missing import warnings in the generated code (specifically,\n/// warnings that the trait implementation is not in scope).\n///\n/// # Note\n/// A copy of this function exists in `aztec-nr/aztec/src/macros/utils.nr`. We maintain separate copies\n/// because importing it there from here would cause the `target_trait` to be interpreted in the context\n/// of this crate, making it impossible to compile code for traits from that crate (e.g. NoteType).\ncomptime fn get_trait_impl_method(\n typ: Type,\n target_trait: Quoted,\n target_method: Quoted,\n) -> TypedExpr {\n let trait_constraint = target_trait.as_trait_constraint();\n typ\n .get_trait_impl(trait_constraint)\n .expect(f\"Could not find impl for {target_trait} for type {typ}\")\n .methods()\n .filter(|m| m.name() == target_method)[0]\n .as_typed_expr()\n}\n\n/// Generates code that deserializes a struct, primitive type, array or string from a field array.\n///\n/// # Parameters\n/// - `name`: The name of the current field being processed, used to identify fields for replacement.\n/// - `typ`: The type of the struct or field being deserialized (e.g., a custom struct, array, or primitive).\n/// - `field_array_name`: The name of the field array containing serialized field data (e.g., `\"values\"`).\n/// - `num_already_consumed`: The number of fields already processed in previous recursion calls.\n/// - `should_unpack`: A boolean indicating whether the type should be unpacked (see description of `Packable`\n/// and `Serialize` trait for more information about the difference between packing and serialization).\n///\n/// # Returns\n/// A tuple containing:\n/// - `Quoted`: A code that deserializes a given struct, primitive type, array, or string from the field array.\n/// - `u32`: The total number of fields consumed during deserialization (used for recursion).\n///\n/// # Nested Struct Example\n/// Given the following setup:\n/// ```\n/// struct UintNote {\n/// value: u128,\n/// owner: AztecAddress,\n/// randomness: Field,\n/// }\n///\n/// struct AztecAddress {\n/// inner: Field,\n/// }\n/// ```\n///\n/// If `UintNote` is the input type, the function will generate the following deserialization code:\n/// ```\n/// UintNote {\n/// value: fields[0] as u128,\n/// owner: AztecAddress {\n/// inner: fields[1],\n/// },\n/// randomness: fields[2],\n/// }\n/// ```\n/// # Nested Struct Example with Unpacking\n/// - given the same setup as above and given that u128, AztecAddress and Field implement the `Packable` trait\n/// the result we get is:\n/// ```\n/// UintNote {\n/// value: aztec::protocol_types::traits::Packable::unpack([fields[0]]),\n/// owner: aztec::protocol_types::traits::Packable::unpack([fields[1]]),\n/// randomness: aztec::protocol_types::traits::Packable::unpack([fields[2]]),\n/// }\n/// ```\n///\n/// # Panics\n/// - If the deserialization logic encounters a type it does not support.\n/// - If an incorrect number of fields are consumed when deserializing a string.\npub comptime fn generate_deserialize_from_fields(\n name: Quoted,\n typ: Type,\n field_array_name: Quoted,\n num_already_consumed: u32,\n should_unpack: bool,\n) -> (Quoted, u32) {\n let mut result = quote {};\n // Counter for the number of fields consumed\n let mut consumed_counter: u32 = 0;\n\n // If the type implements `Packable`, its length will be assigned to the `maybe_packed_len_typ` variable.\n let maybe_packed_len_typ = std::meta::typ::fresh_type_variable();\n let packable_constraint = quote { Packable<$maybe_packed_len_typ> }.as_trait_constraint();\n\n if (should_unpack & typ.implements(packable_constraint)) {\n // Unpacking is enabled and the given type implements the `Packable` trait so we call the `unpack()`\n // method, add the resulting field array to `aux_vars` and each field to `fields`.\n let packed_len = maybe_packed_len_typ.as_constant().unwrap();\n\n // We copy the packed fields into a new array and pass that to the unpack function in a quote\n let mut packed_fields_quotes = &[];\n for i in 0..packed_len {\n let index_in_field_array = i + num_already_consumed;\n packed_fields_quotes =\n packed_fields_quotes.push_back(quote { $field_array_name[$index_in_field_array] });\n }\n let packed_fields = packed_fields_quotes.join(quote {,});\n\n // Now we call unpack on the type\n let unpack_method = get_trait_impl_method(typ, quote { Packable<_> }, quote { unpack });\n result = quote { $unpack_method([ $packed_fields ]) };\n\n consumed_counter = packed_len;\n } else if typ.is_field() | typ.as_integer().is_some() | typ.is_bool() {\n // The field is a primitive so we just reference it in the field array\n result = quote { $field_array_name[$num_already_consumed] as $typ };\n consumed_counter = 1;\n } else if typ.as_data_type().is_some() {\n // The field is a struct so we iterate over each struct field and recursively call\n // `generate_deserialize_from_fields`\n let (nested_def, generics) = typ.as_data_type().unwrap();\n let nested_name = nested_def.name();\n let mut deserialized_fields_list = &[];\n\n // Iterate over each field in the struct\n for field in nested_def.fields(generics) {\n let (field_name, field_type) = field;\n // Recursively call `generate_deserialize_from_fields` for each field in the struct\n let (deserialized_field, num_consumed_in_recursion) = generate_deserialize_from_fields(\n field_name,\n field_type,\n field_array_name,\n consumed_counter + num_already_consumed,\n should_unpack,\n );\n // We increment the consumed counter by the number of fields consumed in the recursion\n consumed_counter += num_consumed_in_recursion;\n // We add the deserialized field to the list of deserialized fields.\n // E.g. `value: u128 { lo: fields[0], hi: fields[1] }`\n deserialized_fields_list =\n deserialized_fields_list.push_back(quote { $field_name: $deserialized_field });\n }\n\n // We can construct the struct from the deserialized fields\n let deserialized_fields = deserialized_fields_list.join(quote {,});\n result = quote {\n $nested_name {\n $deserialized_fields\n }\n };\n } else if typ.as_array().is_some() {\n // The field is an array so we iterate over each element and recursively call\n // `generate_deserialize_from_fields`\n let (element_type, array_len) = typ.as_array().unwrap();\n let array_len = array_len.as_constant().unwrap();\n let mut array_fields_list = &[];\n\n // Iterate over each element in the array\n for _ in 0..array_len {\n // Recursively call `generate_deserialize_from_fields` for each element in the array\n let (deserialized_field, num_consumed_in_recursion) = generate_deserialize_from_fields(\n name,\n element_type,\n field_array_name,\n consumed_counter + num_already_consumed,\n should_unpack,\n );\n // We increment the consumed counter by the number of fields consumed in the recursion\n consumed_counter += num_consumed_in_recursion;\n // We add the deserialized field to the list of deserialized fields.\n array_fields_list = array_fields_list.push_back(deserialized_field);\n }\n\n // We can construct the array from the deserialized fields\n let array_fields = array_fields_list.join(quote {,});\n result = quote { [ $array_fields ] };\n } else if typ.as_str().is_some() {\n // The field is a string and we expect each byte of the string to be represented as 1 field in the field\n // array. So we iterate over the string length and deserialize each character as u8 in the recursive call\n // to `generate_deserialize_from_fields`.\n let length_type = typ.as_str().unwrap();\n let str_len = length_type.as_constant().unwrap();\n let mut byte_list = &[];\n\n // Iterate over each character in the string\n for _ in 0..str_len {\n // Recursively call `generate_deserialize_from_fields` for each character in the string\n let (deserialized_field, num_consumed_in_recursion) = generate_deserialize_from_fields(\n name,\n quote {u8}.as_type(),\n field_array_name,\n consumed_counter + num_already_consumed,\n should_unpack,\n );\n\n // We should consume just one field in the recursion so we sanity check that\n assert_eq(\n num_consumed_in_recursion,\n 1,\n \"Incorrect number of fields consumed in string deserialization\",\n );\n\n // We increment the consumed counter by 1 as we have consumed one field\n consumed_counter += 1;\n\n // We add the deserialized field to the list of deserialized fields.\n // E.g. `fields[6] as u8`\n byte_list = byte_list.push_back(deserialized_field);\n }\n\n // We construct the string from the deserialized fields\n let bytes = byte_list.join(quote {,});\n result = quote { [ $bytes ].as_str_unchecked() };\n } else {\n panic(\n f\"Unsupported type for serialization of argument {name} and type {typ}\",\n )\n }\n\n (result, consumed_counter)\n}\n\n/// Generates code that serializes a type into an array of fields. Also generates auxiliary variables if necessary\n/// for serialization. If `should_pack` is true, we check if the type implements the `Packable` trait and pack it\n/// if it does.\n///\n/// # Parameters\n/// - `name`: The base identifier (e.g., `self`, `some_var`).\n/// - `typ`: The type being serialized (e.g., a custom struct, array, or primitive type).\n/// - `omit`: A list of field names (as `Quoted`) to be excluded from the serialized output.\n/// - `should_pack`: A boolean indicating whether the type should be packed.\n///\n/// # Returns\n/// A tuple containing:\n/// - A flattened array of `Quoted` field references representing the serialized fields.\n/// - An array of `Quoted` auxiliary variables needed for serialization, such as byte arrays for strings.\n///\n/// # Examples\n///\n/// ## Struct\n/// Given the following struct:\n/// ```rust\n/// struct MockStruct {\n/// a: Field,\n/// b: Field,\n/// }\n/// ```\n///\n/// Serializing the struct:\n/// ```rust\n/// generate_serialize_to_fields(quote { my_mock_struct }, MockStruct, &[], false)\n/// // Returns:\n/// // ([`my_mock_struct.a`, `my_mock_struct.b`], [])\n/// ```\n///\n/// ## Nested Struct\n/// For a more complex struct:\n/// ```rust\n/// struct NestedStruct {\n/// m1: MockStruct,\n/// m2: MockStruct,\n/// }\n/// ```\n///\n/// Serialization output:\n/// ```rust\n/// generate_serialize_to_fields(quote { self }, NestedStruct, &[], false)\n/// // Returns:\n/// // ([`self.m1.a`, `self.m1.b`, `self.m2.a`, `self.m2.b`], [])\n/// ```\n///\n/// ## Array\n/// For an array type:\n/// ```rust\n/// generate_serialize_to_fields(quote { my_array }, [Field; 3], &[], false)\n/// // Returns:\n/// // ([`my_array[0]`, `my_array[1]`, `my_array[2]`], [])\n/// ```\n///\n/// ## String\n/// For a string field, where each character is serialized as a `Field`:\n/// ```rust\n/// generate_serialize_to_fields(quote { my_string }, StringType, &[], false)\n/// // Returns:\n/// // ([`my_string_as_bytes[0] as Field`, `my_string_as_bytes[1] as Field`, ...],\n/// // [`let my_string_as_bytes = my_string.as_bytes()`])\n/// ```\n///\n/// ## Nested Struct with Omitted Field and packing enabled\n/// - u128 has a `Packable` implementation hence it will be packed.\n///\n/// For a more complex struct:\n/// ```rust\n/// struct MyStruct {\n/// value: u128,\n/// value2: Field,\n/// }\n/// ```\n///\n/// Serializing while omitting `value2`:\n/// ```rust\n/// generate_serialize_to_fields(quote { self }, MyStruct, &[quote { self.value2 }], true)\n/// // Returns:\n/// // ([`value_packed[0]`], [`let value_packed = self.value.pack()`])\n/// ```\n///\n/// # Panics\n/// - If the type is unsupported for serialization.\n/// - If the provided `typ` contains invalid constants or incompatible structures.\npub comptime fn generate_serialize_to_fields(\n name: Quoted,\n typ: Type,\n omit: [Quoted],\n should_pack: bool,\n) -> ([Quoted], [Quoted]) {\n let mut fields = &[];\n let mut aux_vars = &[];\n\n // Proceed if none of the omit rules omits this name\n if !omit.any(|to_omit| to_omit == name) {\n // If the type implements `Packable`, its length will be assigned to the `maybe_packed_len_typ` variable.\n let maybe_packed_len_typ = std::meta::typ::fresh_type_variable();\n let packable_constraint =\n quote { crate::traits::Packable<$maybe_packed_len_typ> }.as_trait_constraint();\n\n if (should_pack & typ.implements(packable_constraint)) {\n // Packing is enabled and the given type implements the `Packable` trait so we call the `pack()`\n // method, add the resulting field array to `aux_vars` and each field to `fields`.\n let packed_len = maybe_packed_len_typ.as_constant().unwrap();\n\n // We collapse the name to a one that gets tokenized as a single token (e.g. \"self.value\" -> \"self_value\").\n let name_at_one_token = collapse_to_one_token(name);\n let packed_struct_name = f\"{name_at_one_token}_aux_var\".quoted_contents();\n\n // We add the individual fields to the fields array\n let pack_method = get_trait_impl_method(\n typ,\n quote { crate::traits::Packable<$packed_len> },\n quote { pack },\n );\n let packed_struct = quote { let $packed_struct_name = $pack_method($name) };\n for i in 0..packed_len {\n fields = fields.push_back(quote { $packed_struct_name[$i] });\n }\n\n // We add the new auxiliary variable to the aux_vars array\n aux_vars = aux_vars.push_back(packed_struct);\n } else if typ.is_field() {\n // For field we just add the value to fields\n fields = fields.push_back(name);\n } else if typ.as_integer().is_some() | typ.is_bool() {\n // For integer and bool we just cast to Field and add the value to fields\n fields = fields.push_back(quote { $name as Field });\n } else if typ.as_data_type().is_some() {\n // For struct we pref\n let nested_struct = typ.as_data_type().unwrap();\n let params = nested_struct.0.fields(nested_struct.1);\n let struct_flattened = params.map(|(param_name, param_type): (Quoted, Type)| {\n let maybe_prefixed_name = if name == quote {} {\n // Triggered when the param name is of a value available in the current scope (e.g. a function\n // argument) --> then we don't prefix the name with anything.\n param_name\n } else {\n // Triggered when we want to prefix the param name with the `name` from function input. This\n // can typically be `self` when implementing a method on a struct.\n quote { $name.$param_name }\n };\n generate_serialize_to_fields(\n quote {$maybe_prefixed_name},\n param_type,\n omit,\n should_pack,\n )\n });\n let struct_flattened_fields = struct_flattened.fold(\n &[],\n |acc: [Quoted], (fields, _): (_, [Quoted])| acc.append(fields),\n );\n let struct_flattened_aux_vars = struct_flattened.fold(\n &[],\n |acc: [Quoted], (_, aux_vars): ([Quoted], _)| acc.append(aux_vars),\n );\n fields = fields.append(struct_flattened_fields);\n aux_vars = aux_vars.append(struct_flattened_aux_vars);\n } else if typ.as_array().is_some() {\n // For array we recursively call `generate_serialize_to_fields(...)` for each element\n let (element_type, array_len) = typ.as_array().unwrap();\n let array_len = array_len.as_constant().unwrap();\n for i in 0..array_len {\n let (element_fields, element_aux_vars) = generate_serialize_to_fields(\n quote { $name[$i] },\n element_type,\n omit,\n should_pack,\n );\n fields = fields.append(element_fields);\n aux_vars = aux_vars.append(element_aux_vars);\n }\n } else if typ.as_str().is_some() {\n // For string we convert the value to bytes, we store the `as_bytes` in an auxiliary variables and\n // then we add each byte to fields as a Field\n let length_type = typ.as_str().unwrap();\n let str_len = length_type.as_constant().unwrap();\n let as_member = name.as_expr().unwrap().as_member_access();\n let var_name = if as_member.is_some() {\n as_member.unwrap().1\n } else {\n name\n };\n let as_bytes_name = f\"{var_name}_as_bytes\".quoted_contents();\n let as_bytes = quote { let $as_bytes_name = $name.as_bytes() };\n for i in 0..str_len {\n fields = fields.push_back(quote { $as_bytes_name[$i] as Field });\n }\n aux_vars = aux_vars.push_back(as_bytes);\n } else {\n panic(\n f\"Unsupported type for serialization of argument {name} and type {typ}\",\n )\n }\n }\n (fields, aux_vars)\n}\n\n/// From a quote that gets tokenized to a multiple tokens we collapse it to a single token by replacing all `.` with `_`.\n/// E.g. \"self.values[0]\" -> \"self_values_0_\"\ncomptime fn collapse_to_one_token(q: Quoted) -> Quoted {\n let tokens = q.tokens();\n\n let mut single_token = quote {};\n for token in tokens {\n let new_token = if ((token == quote {.}) | (token == quote {[}) | (token == quote {]})) {\n quote {_}\n } else {\n token\n };\n single_token = f\"{single_token}{new_token}\".quoted_contents();\n }\n single_token\n}\n\npub(crate) comptime fn derive_serialize(s: TypeDefinition) -> Quoted {\n let typ = s.as_type();\n let (fields, aux_vars) = generate_serialize_to_fields(quote { self }, typ, &[], false);\n let aux_vars_for_serialization = if aux_vars.len() > 0 {\n let joint = aux_vars.join(quote {;});\n quote { $joint; }\n } else {\n quote {}\n };\n\n let field_serializations = fields.join(quote {,});\n let serialized_len = fields.len();\n quote {\n impl Serialize<$serialized_len> for $typ {\n fn serialize(self) -> [Field; $serialized_len] {\n $aux_vars_for_serialization\n [ $field_serializations ]\n }\n }\n }\n}\n\npub(crate) comptime fn derive_deserialize(s: TypeDefinition) -> Quoted {\n let typ = s.as_type();\n let (fields, _) = generate_serialize_to_fields(quote { self }, typ, &[], false);\n let serialized_len = fields.len();\n let (deserialized, _) =\n generate_deserialize_from_fields(quote { self }, typ, quote { serialized }, 0, false);\n quote {\n impl Deserialize<$serialized_len> for $typ {\n fn deserialize(serialized: [Field; $serialized_len]) -> Self {\n $deserialized\n }\n }\n }\n}\n\n/// Generates `Packable` implementation for a given struct and returns the packed length.\n///\n/// Note: We are having this function separate from `derive_packable` because we use this in the note macros to get\n/// the packed length of a note as well as the `Packable` implementation. We need the length to be able to register\n/// the note in the global `NOTES` map. There the length is used to generate partial note helper functions.\npub comptime fn derive_packable_and_get_packed_len(s: TypeDefinition) -> (Quoted, u32) {\n let packing_enabled = true;\n\n let typ = s.as_type();\n let (fields, aux_vars) =\n generate_serialize_to_fields(quote { self }, typ, &[], packing_enabled);\n let aux_vars_for_packing = if aux_vars.len() > 0 {\n let joint = aux_vars.join(quote {;});\n quote { $joint; }\n } else {\n quote {}\n };\n\n let (unpacked, _) =\n generate_deserialize_from_fields(quote { self }, typ, quote { packed }, 0, packing_enabled);\n\n let field_packings = fields.join(quote {,});\n let packed_len = fields.len();\n let packable_trait: TraitConstraint = quote { Packable<$packed_len> }.as_trait_constraint();\n (\n quote {\n impl $packable_trait for $typ {\n fn pack(self) -> [Field; $packed_len] {\n $aux_vars_for_packing\n [ $field_packings ]\n }\n\n fn unpack(packed: [Field; $packed_len]) -> Self {\n $unpacked\n }\n }\n },\n packed_len,\n )\n}\n\npub(crate) comptime fn derive_packable(s: TypeDefinition) -> Quoted {\n let (packable_impl, _) = derive_packable_and_get_packed_len(s);\n packable_impl\n}\n\n#[derive(Packable, Serialize, Deserialize, Eq)]\npub struct Smol {\n a: Field,\n b: Field,\n}\n\n#[derive(Serialize, Deserialize, Eq)]\npub struct HasArray {\n a: [Field; 2],\n b: bool,\n}\n\n#[derive(Serialize, Deserialize, Eq)]\npub struct Fancier {\n a: Smol,\n b: [Field; 2],\n c: [u8; 3],\n d: str<16>,\n}\n\nfn main() {\n assert(false);\n}\n\n#[test]\nfn smol_test() {\n let smol = Smol { a: 1, b: 2 };\n let serialized = smol.serialize();\n assert(serialized == [1, 2], serialized);\n let deserialized = Smol::deserialize(serialized);\n assert(deserialized == smol);\n\n // None of the struct members implements the `Packable` trait so the packed and serialized data should be the same\n let packed = smol.pack();\n assert_eq(packed, serialized, \"Packed does not match serialized\");\n}\n\n#[test]\nfn has_array_test() {\n let has_array = HasArray { a: [1, 2], b: true };\n let serialized = has_array.serialize();\n assert(serialized == [1, 2, 1], serialized);\n let deserialized = HasArray::deserialize(serialized);\n assert(deserialized == has_array);\n}\n\n#[test]\nfn fancier_test() {\n let fancier =\n Fancier { a: Smol { a: 1, b: 2 }, b: [0, 1], c: [1, 2, 3], d: \"metaprogramming!\" };\n let serialized = fancier.serialize();\n assert(\n serialized\n == [\n 1, 2, 0, 1, 1, 2, 3, 0x6d, 0x65, 0x74, 0x61, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61,\n 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x21,\n ],\n serialized,\n );\n let deserialized = Fancier::deserialize(serialized);\n assert(deserialized == fancier);\n}\n"
3854
3854
  },
3855
- "289": {
3855
+ "291": {
3856
3856
  "path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/poseidon2.nr",
3857
3857
  "source": "use crate::constants::TWO_POW_64;\n\n// NB: This is a clone of noir/noir-repo/noir_stdlib/src/hash/poseidon2.nr\n// It exists as we sometimes need to perform custom absorption, but the stdlib version\n// has a private absorb() method (it's also designed to just be a hasher)\n// Can be removed when standalone noir poseidon lib exists: See noir#6679\n\ncomptime global RATE: u32 = 3;\n\npub struct Poseidon2Sponge {\n pub cache: [Field; 3],\n pub state: [Field; 4],\n pub cache_size: u32,\n pub squeeze_mode: bool, // 0 => absorb, 1 => squeeze\n}\n\nimpl Poseidon2Sponge {\n #[no_predicates]\n pub fn hash<let N: u32>(input: [Field; N], message_size: u32) -> Field {\n Poseidon2Sponge::hash_internal(input, message_size, message_size != N)\n }\n\n pub(crate) fn new(iv: Field) -> Poseidon2Sponge {\n let mut result =\n Poseidon2Sponge { cache: [0; 3], state: [0; 4], cache_size: 0, squeeze_mode: false };\n result.state[RATE] = iv;\n result\n }\n\n fn perform_duplex(&mut self) {\n // add the cache into sponge state\n for i in 0..RATE {\n // We effectively zero-pad the cache by only adding to the state\n // cache that is less than the specified `cache_size`\n if i < self.cache_size {\n self.state[i] += self.cache[i];\n }\n }\n self.state = std::hash::poseidon2_permutation(self.state, 4);\n }\n\n pub fn absorb(&mut self, input: Field) {\n assert(!self.squeeze_mode);\n if self.cache_size == RATE {\n // If we're absorbing, and the cache is full, apply the sponge permutation to compress the cache\n self.perform_duplex();\n self.cache[0] = input;\n self.cache_size = 1;\n } else {\n // If we're absorbing, and the cache is not full, add the input into the cache\n self.cache[self.cache_size] = input;\n self.cache_size += 1;\n }\n }\n\n pub fn squeeze(&mut self) -> Field {\n assert(!self.squeeze_mode);\n // If we're in absorb mode, apply sponge permutation to compress the cache.\n self.perform_duplex();\n self.squeeze_mode = true;\n\n // Pop one item off the top of the permutation and return it.\n self.state[0]\n }\n\n fn hash_internal<let N: u32>(\n input: [Field; N],\n in_len: u32,\n is_variable_length: bool,\n ) -> Field {\n let iv: Field = (in_len as Field) * TWO_POW_64;\n let mut sponge = Poseidon2Sponge::new(iv);\n for i in 0..input.len() {\n if i < in_len {\n sponge.absorb(input[i]);\n }\n }\n\n // In the case where the hash preimage is variable-length, we append `1` to the end of the input, to distinguish\n // from fixed-length hashes. (the combination of this additional field element + the hash IV ensures\n // fixed-length and variable-length hashes do not collide)\n if is_variable_length {\n sponge.absorb(1);\n }\n sponge.squeeze()\n }\n}\n"
3858
3858
  },
3859
- "328": {
3859
+ "330": {
3860
3860
  "path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/type_serialization.nr",
3861
3861
  "source": "use crate::traits::{Deserialize, Serialize};\n\nglobal BOOL_SERIALIZED_LEN: u32 = 1;\nglobal U8_SERIALIZED_LEN: u32 = 1;\nglobal U16_SERIALIZED_LEN: u32 = 1;\nglobal U32_SERIALIZED_LEN: u32 = 1;\nglobal U64_SERIALIZED_LEN: u32 = 1;\nglobal U128_SERIALIZED_LEN: u32 = 1;\nglobal FIELD_SERIALIZED_LEN: u32 = 1;\nglobal I8_SERIALIZED_LEN: u32 = 1;\nglobal I16_SERIALIZED_LEN: u32 = 1;\nglobal I32_SERIALIZED_LEN: u32 = 1;\nglobal I64_SERIALIZED_LEN: u32 = 1;\n\nimpl Serialize<BOOL_SERIALIZED_LEN> for bool {\n fn serialize(self) -> [Field; BOOL_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<BOOL_SERIALIZED_LEN> for bool {\n fn deserialize(fields: [Field; BOOL_SERIALIZED_LEN]) -> bool {\n fields[0] as bool\n }\n}\n\nimpl Serialize<U8_SERIALIZED_LEN> for u8 {\n fn serialize(self) -> [Field; U8_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<U8_SERIALIZED_LEN> for u8 {\n fn deserialize(fields: [Field; U8_SERIALIZED_LEN]) -> Self {\n fields[0] as u8\n }\n}\n\nimpl Serialize<U16_SERIALIZED_LEN> for u16 {\n fn serialize(self) -> [Field; U16_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<U16_SERIALIZED_LEN> for u16 {\n fn deserialize(fields: [Field; U16_SERIALIZED_LEN]) -> Self {\n fields[0] as u16\n }\n}\n\nimpl Serialize<U32_SERIALIZED_LEN> for u32 {\n fn serialize(self) -> [Field; U32_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<U32_SERIALIZED_LEN> for u32 {\n fn deserialize(fields: [Field; U32_SERIALIZED_LEN]) -> Self {\n fields[0] as u32\n }\n}\n\nimpl Serialize<U64_SERIALIZED_LEN> for u64 {\n fn serialize(self) -> [Field; U64_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<U64_SERIALIZED_LEN> for u64 {\n fn deserialize(fields: [Field; U64_SERIALIZED_LEN]) -> Self {\n fields[0] as u64\n }\n}\n\nimpl Serialize<U128_SERIALIZED_LEN> for u128 {\n fn serialize(self) -> [Field; U128_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<U128_SERIALIZED_LEN> for u128 {\n fn deserialize(fields: [Field; U128_SERIALIZED_LEN]) -> Self {\n fields[0] as u128\n }\n}\n\nimpl Serialize<FIELD_SERIALIZED_LEN> for Field {\n fn serialize(self) -> [Field; FIELD_SERIALIZED_LEN] {\n [self]\n }\n}\n\nimpl Deserialize<FIELD_SERIALIZED_LEN> for Field {\n fn deserialize(fields: [Field; FIELD_SERIALIZED_LEN]) -> Self {\n fields[0]\n }\n}\n\nimpl Serialize<I8_SERIALIZED_LEN> for i8 {\n fn serialize(self) -> [Field; I8_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<I8_SERIALIZED_LEN> for i8 {\n fn deserialize(fields: [Field; I8_SERIALIZED_LEN]) -> Self {\n fields[0] as i8\n }\n}\n\nimpl Serialize<I16_SERIALIZED_LEN> for i16 {\n fn serialize(self) -> [Field; I16_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<I16_SERIALIZED_LEN> for i16 {\n fn deserialize(fields: [Field; I16_SERIALIZED_LEN]) -> Self {\n fields[0] as i16\n }\n}\n\nimpl Serialize<I32_SERIALIZED_LEN> for i32 {\n fn serialize(self) -> [Field; I32_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<I32_SERIALIZED_LEN> for i32 {\n fn deserialize(fields: [Field; I32_SERIALIZED_LEN]) -> Self {\n fields[0] as i32\n }\n}\n\nimpl Serialize<I64_SERIALIZED_LEN> for i64 {\n fn serialize(self) -> [Field; I64_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<I64_SERIALIZED_LEN> for i64 {\n fn deserialize(fields: [Field; I64_SERIALIZED_LEN]) -> Self {\n fields[0] as i64\n }\n}\n\nimpl<T, let N: u32, let M: u32> Serialize<N * M> for [T; N]\nwhere\n T: Serialize<M>,\n{\n fn serialize(self) -> [Field; N * M] {\n let mut result: [Field; N * M] = std::mem::zeroed();\n let mut serialized: [Field; M] = std::mem::zeroed();\n for i in 0..N {\n serialized = self[i].serialize();\n for j in 0..M {\n result[i * M + j] = serialized[j];\n }\n }\n result\n }\n}\n\nimpl<T, let N: u32, let M: u32> Deserialize<N * M> for [T; N]\nwhere\n T: Deserialize<M>,\n{\n fn deserialize(fields: [Field; N * M]) -> Self {\n let mut reader = crate::utils::reader::Reader::new(fields);\n let mut result: [T; N] = std::mem::zeroed();\n reader.read_struct_array::<T, M, N>(Deserialize::deserialize, result)\n }\n}\n\n#[test]\nfn test_u16_serialization() {\n let a: u16 = 10;\n assert_eq(a, u16::deserialize(a.serialize()));\n}\n\n#[test]\nfn test_i8_serialization() {\n let a: i8 = -10;\n assert_eq(a, i8::deserialize(a.serialize()));\n}\n\n#[test]\nfn test_i16_serialization() {\n let a: i16 = -10;\n assert_eq(a, i16::deserialize(a.serialize()));\n}\n\n#[test]\nfn test_i32_serialization() {\n let a: i32 = -10;\n assert_eq(a, i32::deserialize(a.serialize()));\n}\n\n#[test]\nfn test_i64_serialization() {\n let a: i64 = -10;\n assert_eq(a, i64::deserialize(a.serialize()));\n}\n"
3862
3862
  },
3863
- "344": {
3863
+ "346": {
3864
3864
  "path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays.nr",
3865
3865
  "source": "pub mod assert_array_appended;\npub mod assert_array_prepended;\npub mod assert_combined_array;\npub mod assert_combined_transformed_array;\npub mod assert_exposed_sorted_transformed_value_array;\npub mod assert_sorted_array;\npub mod assert_sorted_transformed_value_array;\npub mod assert_split_sorted_transformed_value_arrays;\npub mod assert_split_transformed_value_arrays;\npub mod get_sorted_result;\npub mod get_sorted_tuple;\npub mod sort_by;\npub mod sort_by_counter;\n\n// Re-exports.\npub use assert_array_appended::{\n assert_array_appended, assert_array_appended_and_scoped, assert_array_appended_reversed,\n assert_array_appended_scoped,\n};\npub use assert_array_prepended::assert_array_prepended;\npub use assert_combined_array::{assert_combined_array, combine_arrays};\npub use assert_combined_transformed_array::{\n assert_combined_transformed_array, combine_and_transform_arrays,\n};\npub use assert_exposed_sorted_transformed_value_array::{\n assert_exposed_sorted_transformed_value_array,\n get_order_hints::{get_order_hints_asc, get_order_hints_desc, OrderHint},\n};\npub use assert_sorted_array::assert_sorted_array;\npub use assert_sorted_transformed_value_array::{\n assert_sorted_transformed_value_array, assert_sorted_transformed_value_array_capped_size,\n};\npub use assert_split_sorted_transformed_value_arrays::{\n assert_split_sorted_transformed_value_arrays_asc,\n assert_split_sorted_transformed_value_arrays_desc,\n get_split_order_hints::{get_split_order_hints_asc, get_split_order_hints_desc, SplitOrderHints},\n};\npub use assert_split_transformed_value_arrays::assert_split_transformed_value_arrays;\npub use get_sorted_result::{get_sorted_result, SortedResult};\npub use sort_by_counter::{sort_by_counter_asc, sort_by_counter_desc};\n\nuse crate::traits::{Empty, is_empty};\n\npub fn subarray<let SRC_LEN: u32, let DST_LEN: u32>(\n src: [Field; SRC_LEN],\n offset: u32,\n) -> [Field; DST_LEN] {\n assert(offset + DST_LEN <= SRC_LEN, \"offset too large\");\n\n let mut dst: [Field; DST_LEN] = std::mem::zeroed();\n for i in 0..DST_LEN {\n dst[i] = src[i + offset];\n }\n\n dst\n}\n\n// Helper function to convert a validated array to BoundedVec.\n// Important: Only use it for validated arrays: validate_array(array) should be true.\npub unconstrained fn array_to_bounded_vec<T, let N: u32>(array: [T; N]) -> BoundedVec<T, N>\nwhere\n T: Empty + Eq,\n{\n let len = array_length(array);\n BoundedVec::from_parts_unchecked(array, len)\n}\n\n// Helper function to find the index of the first element in an array that satisfies a given predicate. If the element\n// is not found, the function returns N as the index.\npub unconstrained fn find_index_hint<T, let N: u32, Env>(\n array: [T; N],\n find: fn[Env](T) -> bool,\n) -> u32 {\n let mut index = N;\n for i in 0..N {\n // We check `index == N` to ensure that we only update the index if we haven't found a match yet.\n if (index == N) & find(array[i]) {\n index = i;\n }\n }\n index\n}\n\n// Routine which validates that all zero values of an array form a contiguous region at the end, i.e.,\n// of the form: [*,*,*...,0,0,0,0] where any * is non-zero. Note that a full array of non-zero values is\n// valid.\npub fn validate_array<T, let N: u32>(array: [T; N]) -> u32\nwhere\n T: Empty + Eq,\n{\n let mut seen_empty = false;\n let mut length = 0;\n for i in 0..N {\n if is_empty(array[i]) {\n seen_empty = true;\n } else {\n assert(seen_empty == false, \"invalid array\");\n length += 1;\n }\n }\n length\n}\n\n// Helper function to count the number of non-empty elements in a validated array.\n// Important: Only use it for validated arrays where validate_array(array) returns true,\n// which ensures that:\n// 1. All elements before the first empty element are non-empty\n// 2. All elements after and including the first empty element are empty\n// 3. The array forms a contiguous sequence of non-empty elements followed by empty elements\npub fn array_length<T, let N: u32>(array: [T; N]) -> u32\nwhere\n T: Empty + Eq,\n{\n // We get the length by checking the index of the first empty element.\n\n // Safety: This is safe because we have validated the array (see function doc above) and the emptiness\n // of the element and non-emptiness of the previous element is checked below.\n let length = unsafe { find_index_hint(array, |elem: T| is_empty(elem)) };\n if length != 0 {\n assert(!is_empty(array[length - 1]));\n }\n if length != N {\n assert(is_empty(array[length]));\n }\n length\n}\n\npub fn array_concat<T, let N: u32, let M: u32>(array1: [T; N], array2: [T; M]) -> [T; N + M] {\n let mut result = [array1[0]; N + M];\n for i in 1..N {\n result[i] = array1[i];\n }\n for i in 0..M {\n result[i + N] = array2[i];\n }\n result\n}\n/// This function assumes that `array1` and `array2` contain no more than N non-empty elements between them,\n/// if this is not the case then elements from the end of `array2` will be dropped.\npub fn array_merge<T, let N: u32>(array1: [T; N], array2: [T; N]) -> [T; N]\nwhere\n T: Empty + Eq,\n{\n // Safety: we constrain this array below\n let result = unsafe { array_merge_helper(array1, array2) };\n // We assume arrays have been validated. The only use cases so far are with previously validated arrays.\n let array1_len = array_length(array1);\n let mut add_from_left = true;\n for i in 0..N {\n add_from_left &= i != array1_len;\n if add_from_left {\n assert_eq(result[i], array1[i]);\n } else {\n assert_eq(result[i], array2[i - array1_len]);\n }\n }\n result\n}\n\nunconstrained fn array_merge_helper<T, let N: u32>(array1: [T; N], array2: [T; N]) -> [T; N]\nwhere\n T: Empty + Eq,\n{\n let mut result: [T; N] = [T::empty(); N];\n let mut i = 0;\n for elem in array1 {\n if !is_empty(elem) {\n result[i] = elem;\n i += 1;\n }\n }\n for elem in array2 {\n if !is_empty(elem) {\n result[i] = elem;\n i += 1;\n }\n }\n result\n}\n\n// Helper fn to create a subarray from a given array\npub fn array_splice<T, let N: u32, let M: u32>(array: [T; N], offset: u32) -> [T; M]\nwhere\n T: Empty,\n{\n assert(M + offset <= N, \"Subarray length larger than array length\");\n let mut result: [T; M] = [T::empty(); M];\n for i in 0..M {\n result[i] = array[offset + i];\n }\n result\n}\n\npub fn check_permutation<T, let N: u32>(\n original_array: [T; N],\n permuted_array: [T; N],\n original_indexes: [u32; N],\n)\nwhere\n T: Eq + Empty,\n{\n let mut seen_value = [false; N];\n for i in 0..N {\n let index = original_indexes[i];\n let original_value = original_array[index];\n assert(permuted_array[i].eq(original_value), \"Invalid index\");\n assert(!seen_value[index], \"Duplicated index\");\n seen_value[index] = true;\n }\n}\n\n// Helper function to find the index of the last element in an array, allowing empty elements.\n// e.g. useful for removing trailing 0s from [1, 0, 2, 0, 0, 0] -> [1, 0, 2]\n// Nothing to do with validated arrays. Correctness constrained by padded_array_length.\npub unconstrained fn find_last_value_index<T, let N: u32>(array: [T; N]) -> u32\nwhere\n T: Empty + Eq,\n{\n let mut index = N;\n for i in 0..N {\n let j = N - i - 1;\n // We check `index == N` to ensure that we only update the index if we haven't found a match yet.\n if (index == N) & !is_empty(array[j]) {\n index = j;\n }\n }\n index\n}\n\n// Routine which returns the length of an array right padded by empty elements\n// of the form: [*,*,*...,0,0,0,0] where * is any value (zeroes allowed).\n// See smoke_validate_array_trailing for examples.\n// Nothing to do with validated arrays. Correctness constrained by padded_array_length.\npub unconstrained fn unsafe_padded_array_length<T, let N: u32>(array: [T; N]) -> u32\nwhere\n T: Empty + Eq,\n{\n let index = find_last_value_index(array);\n if index == N {\n 0\n } else {\n index + 1\n }\n}\n\n// Routine which validates that zero values of an array form a contiguous region at the end, i.e.,\n// of the form: [*,*,*...,0,0,0,0] where * is any value (zeroes allowed).\npub fn padded_array_length<T, let N: u32>(array: [T; N]) -> u32\nwhere\n T: Empty + Eq,\n{\n // Safety: this value is constrained in the below loop.\n let length = unsafe { unsafe_padded_array_length(array) };\n // Check the elt just before length is non-zero:\n if length != 0 {\n assert(!is_empty(array[length - 1]), \"invalid right padded array\");\n }\n // Check all beyond length are zero:\n let mut check_zero = false;\n for i in 0..N {\n check_zero |= i == length;\n if check_zero {\n assert(is_empty(array[i]), \"invalid right padded array\");\n }\n }\n length\n}\n\n#[test]\nfn smoke_validate_array() {\n let valid_array: [Field; 0] = [];\n assert(validate_array(valid_array) == 0);\n\n let valid_array = [0];\n assert(validate_array(valid_array) == 0);\n\n let valid_array = [3];\n assert(validate_array(valid_array) == 1);\n\n let valid_array = [1, 2, 3];\n assert(validate_array(valid_array) == 3);\n\n let valid_array = [1, 2, 3, 0];\n assert(validate_array(valid_array) == 3);\n\n let valid_array = [1, 2, 3, 0, 0];\n assert(validate_array(valid_array) == 3);\n}\n\n#[test]\nfn smoke_validate_array_trailing() {\n let valid_array: [Field; 0] = [];\n assert(padded_array_length(valid_array) == 0);\n\n let valid_array = [0];\n assert(padded_array_length(valid_array) == 0);\n\n let valid_array = [3];\n assert(padded_array_length(valid_array) == 1);\n\n let valid_array = [1, 0, 3];\n assert(padded_array_length(valid_array) == 3);\n\n let valid_array = [1, 0, 3, 0];\n assert(padded_array_length(valid_array) == 3);\n\n let valid_array = [1, 2, 3, 0, 0];\n assert(padded_array_length(valid_array) == 3);\n\n let valid_array = [0, 0, 3, 0, 0];\n assert(padded_array_length(valid_array) == 3);\n}\n\n#[test(should_fail_with = \"invalid array\")]\nfn smoke_validate_array_invalid_case0() {\n let invalid_array = [0, 1];\n let _ = validate_array(invalid_array);\n}\n\n#[test(should_fail_with = \"invalid array\")]\nfn smoke_validate_array_invalid_case1() {\n let invalid_array = [1, 0, 0, 1, 0];\n let _ = validate_array(invalid_array);\n}\n\n#[test(should_fail_with = \"invalid array\")]\nfn smoke_validate_array_invalid_case2() {\n let invalid_array = [0, 0, 0, 0, 1];\n let _ = validate_array(invalid_array);\n}\n\n#[test]\nfn test_empty_array_length() {\n assert_eq(array_length([0]), 0);\n assert_eq(array_length([0, 0, 0]), 0);\n}\n\n#[test]\nfn test_array_length() {\n assert_eq(array_length([123]), 1);\n assert_eq(array_length([123, 0, 0]), 1);\n assert_eq(array_length([123, 456]), 2);\n assert_eq(array_length([123, 456, 0]), 2);\n}\n\n#[test]\nfn test_array_length_invalid_arrays() {\n // Result can be misleading (but correct) for invalid arrays.\n assert_eq(array_length([0, 0, 123]), 0);\n assert_eq(array_length([0, 123, 0]), 0);\n assert_eq(array_length([0, 123, 456]), 0);\n assert_eq(array_length([123, 0, 456]), 1);\n}\n\n#[test]\nunconstrained fn find_index_greater_than_min() {\n let values = [10, 20, 30, 40];\n let min = 22;\n let index = find_index_hint(values, |v: Field| min.lt(v));\n assert_eq(index, 2);\n}\n\n#[test]\nunconstrained fn find_index_not_found() {\n let values = [10, 20, 30, 40];\n let min = 100;\n let index = find_index_hint(values, |v: Field| min.lt(v));\n assert_eq(index, 4);\n}\n\n#[test]\nfn test_array_concat() {\n let array0 = [1, 2, 3];\n let array1 = [4, 5];\n let concatenated = array_concat(array0, array1);\n assert_eq(concatenated, [1, 2, 3, 4, 5]);\n}\n\n#[test]\nfn check_permutation_basic_test() {\n let original_array = [1, 2, 3];\n let permuted_array = [3, 1, 2];\n let indexes = [2, 0, 1];\n check_permutation(original_array, permuted_array, indexes);\n}\n\n#[test(should_fail_with = \"Duplicated index\")]\nfn check_permutation_duplicated_index() {\n let original_array = [0, 1, 0];\n let permuted_array = [1, 0, 0];\n let indexes = [1, 0, 0];\n check_permutation(original_array, permuted_array, indexes);\n}\n\n#[test(should_fail_with = \"Invalid index\")]\nfn check_permutation_invalid_index() {\n let original_array = [0, 1, 2];\n let permuted_array = [1, 0, 0];\n let indexes = [1, 0, 2];\n check_permutation(original_array, permuted_array, indexes);\n}\n"
3866
3866
  },
3867
- "347": {
3867
+ "349": {
3868
3868
  "path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/utils/reader.nr",
3869
3869
  "source": "pub struct Reader<let N: u32> {\n data: [Field; N],\n offset: u32,\n}\n\nimpl<let N: u32> Reader<N> {\n pub fn new(data: [Field; N]) -> Self {\n Self { data, offset: 0 }\n }\n\n pub fn read(&mut self) -> Field {\n let result = self.data[self.offset];\n self.offset += 1;\n result\n }\n\n pub fn read_u32(&mut self) -> u32 {\n self.read() as u32\n }\n\n pub fn read_bool(&mut self) -> bool {\n self.read() as bool\n }\n\n pub fn read_array<let K: u32>(&mut self) -> [Field; K] {\n let mut result = [0; K];\n for i in 0..K {\n result[i] = self.data[self.offset + i];\n }\n self.offset += K;\n result\n }\n\n pub fn read_struct<T, let K: u32>(&mut self, deserialise: fn([Field; K]) -> T) -> T {\n let result = deserialise(self.read_array());\n result\n }\n\n pub fn read_struct_array<T, let K: u32, let C: u32>(\n &mut self,\n deserialise: fn([Field; K]) -> T,\n mut result: [T; C],\n ) -> [T; C] {\n for i in 0..C {\n result[i] = self.read_struct(deserialise);\n }\n result\n }\n\n pub fn finish(self) {\n assert(self.offset == self.data.len(), \"Reader did not read all data\");\n }\n}\n"
3870
3870
  },
@@ -3890,7 +3890,7 @@
3890
3890
  },
3891
3891
  "6": {
3892
3892
  "path": "std/collections/bounded_vec.nr",
3893
- "source": "use crate::{cmp::Eq, convert::From, runtime::is_unconstrained, static_assert};\n\n/// A `BoundedVec<T, MaxLen>` is a growable storage similar to a `Vec<T>` except that it\n/// is bounded with a maximum possible length. Unlike `Vec`, `BoundedVec` is not implemented\n/// via slices and thus is not subject to the same restrictions slices are (notably, nested\n/// slices - and thus nested vectors as well - are disallowed).\n///\n/// Since a BoundedVec is backed by a normal array under the hood, growing the BoundedVec by\n/// pushing an additional element is also more efficient - the length only needs to be increased\n/// by one.\n///\n/// For these reasons `BoundedVec<T, N>` should generally be preferred over `Vec<T>` when there\n/// is a reasonable maximum bound that can be placed on the vector.\n///\n/// Example:\n///\n/// ```noir\n/// let mut vector: BoundedVec<Field, 10> = BoundedVec::new();\n/// for i in 0..5 {\n/// vector.push(i);\n/// }\n/// assert(vector.len() == 5);\n/// assert(vector.max_len() == 10);\n/// ```\npub struct BoundedVec<T, let MaxLen: u32> {\n storage: [T; MaxLen],\n len: u32,\n}\n\nimpl<T, let MaxLen: u32> BoundedVec<T, MaxLen> {\n /// Creates a new, empty vector of length zero.\n ///\n /// Since this container is backed by an array internally, it still needs an initial value\n /// to give each element. To resolve this, each element is zeroed internally. This value\n /// is guaranteed to be inaccessible unless `get_unchecked` is used.\n ///\n /// Example:\n ///\n /// ```noir\n /// let empty_vector: BoundedVec<Field, 10> = BoundedVec::new();\n /// assert(empty_vector.len() == 0);\n /// ```\n ///\n /// Note that whenever calling `new` the maximum length of the vector should always be specified\n /// via a type signature:\n ///\n /// ```noir\n /// fn good() -> BoundedVec<Field, 10> {\n /// // Ok! MaxLen is specified with a type annotation\n /// let v1: BoundedVec<Field, 3> = BoundedVec::new();\n /// let v2 = BoundedVec::new();\n ///\n /// // Ok! MaxLen is known from the type of `good`'s return value\n /// v2\n /// }\n ///\n /// fn bad() {\n /// // Error: Type annotation needed\n /// // The compiler can't infer `MaxLen` from the following code:\n /// let mut v3 = BoundedVec::new();\n /// v3.push(5);\n /// }\n /// ```\n ///\n /// This defaulting of `MaxLen` (and numeric generics in general) to zero may change in future noir versions\n /// but for now make sure to use type annotations when using bounded vectors. Otherwise, you will receive a\n /// constraint failure at runtime when the vec is pushed to.\n pub fn new() -> Self {\n let zeroed = crate::mem::zeroed();\n BoundedVec { storage: [zeroed; MaxLen], len: 0 }\n }\n\n /// Retrieves an element from the vector at the given index, starting from zero.\n ///\n /// If the given index is equal to or greater than the length of the vector, this\n /// will issue a constraint failure.\n ///\n /// Example:\n ///\n /// ```noir\n /// fn foo<let N: u32>(v: BoundedVec<u32, N>) {\n /// let first = v.get(0);\n /// let last = v.get(v.len() - 1);\n /// assert(first != last);\n /// }\n /// ```\n pub fn get(self, index: u32) -> T {\n assert(index < self.len, \"Attempted to read past end of BoundedVec\");\n self.get_unchecked(index)\n }\n\n /// Retrieves an element from the vector at the given index, starting from zero, without\n /// performing a bounds check.\n ///\n /// Since this function does not perform a bounds check on length before accessing the element,\n /// it is unsafe! Use at your own risk!\n ///\n /// Example:\n ///\n /// ```noir\n /// fn sum_of_first_three<let N: u32>(v: BoundedVec<u32, N>) -> u32 {\n /// // Always ensure the length is larger than the largest\n /// // index passed to get_unchecked\n /// assert(v.len() > 2);\n /// let first = v.get_unchecked(0);\n /// let second = v.get_unchecked(1);\n /// let third = v.get_unchecked(2);\n /// first + second + third\n /// }\n /// ```\n pub fn get_unchecked(self, index: u32) -> T {\n self.storage[index]\n }\n\n /// Writes an element to the vector at the given index, starting from zero.\n ///\n /// If the given index is equal to or greater than the length of the vector, this will issue a constraint failure.\n ///\n /// Example:\n ///\n /// ```noir\n /// fn foo<let N: u32>(v: BoundedVec<u32, N>) {\n /// let first = v.get(0);\n /// assert(first != 42);\n /// v.set(0, 42);\n /// let new_first = v.get(0);\n /// assert(new_first == 42);\n /// }\n /// ```\n pub fn set(&mut self, index: u32, value: T) {\n assert(index < self.len, \"Attempted to write past end of BoundedVec\");\n self.set_unchecked(index, value)\n }\n\n /// Writes an element to the vector at the given index, starting from zero, without performing a bounds check.\n ///\n /// Since this function does not perform a bounds check on length before accessing the element, it is unsafe! Use at your own risk!\n ///\n /// Example:\n ///\n /// ```noir\n /// fn set_unchecked_example() {\n /// let mut vec: BoundedVec<u32, 5> = BoundedVec::new();\n /// vec.extend_from_array([1, 2]);\n ///\n /// // Here we're safely writing within the valid range of `vec`\n /// // `vec` now has the value [42, 2]\n /// vec.set_unchecked(0, 42);\n ///\n /// // We can then safely read this value back out of `vec`.\n /// // Notice that we use the checked version of `get` which would prevent reading unsafe values.\n /// assert_eq(vec.get(0), 42);\n ///\n /// // We've now written past the end of `vec`.\n /// // As this index is still within the maximum potential length of `v`,\n /// // it won't cause a constraint failure.\n /// vec.set_unchecked(2, 42);\n /// println(vec);\n ///\n /// // This will write past the end of the maximum potential length of `vec`,\n /// // it will then trigger a constraint failure.\n /// vec.set_unchecked(5, 42);\n /// println(vec);\n /// }\n /// ```\n pub fn set_unchecked(&mut self, index: u32, value: T) {\n self.storage[index] = value;\n }\n\n /// Pushes an element to the end of the vector. This increases the length\n /// of the vector by one.\n ///\n /// Panics if the new length of the vector will be greater than the max length.\n ///\n /// Example:\n ///\n /// ```noir\n /// let mut v: BoundedVec<Field, 2> = BoundedVec::new();\n ///\n /// v.push(1);\n /// v.push(2);\n ///\n /// // Panics with failed assertion \"push out of bounds\"\n /// v.push(3);\n /// ```\n pub fn push(&mut self, elem: T) {\n assert(self.len < MaxLen, \"push out of bounds\");\n\n self.storage[self.len] = elem;\n self.len += 1;\n }\n\n /// Returns the current length of this vector\n ///\n /// Example:\n ///\n /// ```noir\n /// let mut v: BoundedVec<Field, 4> = BoundedVec::new();\n /// assert(v.len() == 0);\n ///\n /// v.push(100);\n /// assert(v.len() == 1);\n ///\n /// v.push(200);\n /// v.push(300);\n /// v.push(400);\n /// assert(v.len() == 4);\n ///\n /// let _ = v.pop();\n /// let _ = v.pop();\n /// assert(v.len() == 2);\n /// ```\n pub fn len(self) -> u32 {\n self.len\n }\n\n /// Returns the maximum length of this vector. This is always\n /// equal to the `MaxLen` parameter this vector was initialized with.\n ///\n /// Example:\n ///\n /// ```noir\n /// let mut v: BoundedVec<Field, 5> = BoundedVec::new();\n ///\n /// assert(v.max_len() == 5);\n /// v.push(10);\n /// assert(v.max_len() == 5);\n /// ```\n pub fn max_len(_self: BoundedVec<T, MaxLen>) -> u32 {\n MaxLen\n }\n\n /// Returns the internal array within this vector.\n ///\n /// Since arrays in Noir are immutable, mutating the returned storage array will not mutate\n /// the storage held internally by this vector.\n ///\n /// Note that uninitialized elements may be zeroed out!\n ///\n /// Example:\n ///\n /// ```noir\n /// let mut v: BoundedVec<Field, 5> = BoundedVec::new();\n ///\n /// assert(v.storage() == [0, 0, 0, 0, 0]);\n ///\n /// v.push(57);\n /// assert(v.storage() == [57, 0, 0, 0, 0]);\n /// ```\n pub fn storage(self) -> [T; MaxLen] {\n self.storage\n }\n\n /// Pushes each element from the given array to this vector.\n ///\n /// Panics if pushing each element would cause the length of this vector\n /// to exceed the maximum length.\n ///\n /// Example:\n ///\n /// ```noir\n /// let mut vec: BoundedVec<Field, 3> = BoundedVec::new();\n /// vec.extend_from_array([2, 4]);\n ///\n /// assert(vec.len == 2);\n /// assert(vec.get(0) == 2);\n /// assert(vec.get(1) == 4);\n /// ```\n pub fn extend_from_array<let Len: u32>(&mut self, array: [T; Len]) {\n let new_len = self.len + array.len();\n assert(new_len <= MaxLen, \"extend_from_array out of bounds\");\n for i in 0..array.len() {\n self.storage[self.len + i] = array[i];\n }\n self.len = new_len;\n }\n\n /// Pushes each element from the given slice to this vector.\n ///\n /// Panics if pushing each element would cause the length of this vector\n /// to exceed the maximum length.\n ///\n /// Example:\n ///\n /// ```noir\n /// let mut vec: BoundedVec<Field, 3> = BoundedVec::new();\n /// vec.extend_from_slice(&[2, 4]);\n ///\n /// assert(vec.len == 2);\n /// assert(vec.get(0) == 2);\n /// assert(vec.get(1) == 4);\n /// ```\n pub fn extend_from_slice(&mut self, slice: [T]) {\n let new_len = self.len + slice.len();\n assert(new_len <= MaxLen, \"extend_from_slice out of bounds\");\n for i in 0..slice.len() {\n self.storage[self.len + i] = slice[i];\n }\n self.len = new_len;\n }\n\n /// Pushes each element from the other vector to this vector. The length of\n /// the other vector is left unchanged.\n ///\n /// Panics if pushing each element would cause the length of this vector\n /// to exceed the maximum length.\n ///\n /// ```noir\n /// let mut v1: BoundedVec<Field, 5> = BoundedVec::new();\n /// let mut v2: BoundedVec<Field, 7> = BoundedVec::new();\n ///\n /// v2.extend_from_array([1, 2, 3]);\n /// v1.extend_from_bounded_vec(v2);\n ///\n /// assert(v1.storage() == [1, 2, 3, 0, 0]);\n /// assert(v2.storage() == [1, 2, 3, 0, 0, 0, 0]);\n /// ```\n pub fn extend_from_bounded_vec<let Len: u32>(&mut self, vec: BoundedVec<T, Len>) {\n let append_len = vec.len();\n let new_len = self.len + append_len;\n assert(new_len <= MaxLen, \"extend_from_bounded_vec out of bounds\");\n\n if is_unconstrained() {\n for i in 0..append_len {\n self.storage[self.len + i] = vec.get_unchecked(i);\n }\n } else {\n let mut exceeded_len = false;\n for i in 0..Len {\n exceeded_len |= i == append_len;\n if !exceeded_len {\n self.storage[self.len + i] = vec.get_unchecked(i);\n }\n }\n }\n self.len = new_len;\n }\n\n /// Creates a new vector, populating it with values derived from an array input.\n /// The maximum length of the vector is determined based on the type signature.\n ///\n /// Example:\n ///\n /// ```noir\n /// let bounded_vec: BoundedVec<Field, 10> = BoundedVec::from_array([1, 2, 3])\n /// ```\n pub fn from_array<let Len: u32>(array: [T; Len]) -> Self {\n static_assert(Len <= MaxLen, \"from array out of bounds\");\n let mut vec: BoundedVec<T, MaxLen> = BoundedVec::new();\n vec.extend_from_array(array);\n vec\n }\n\n /// Pops the element at the end of the vector. This will decrease the length\n /// of the vector by one.\n ///\n /// Panics if the vector is empty.\n ///\n /// Example:\n ///\n /// ```noir\n /// let mut v: BoundedVec<Field, 2> = BoundedVec::new();\n /// v.push(1);\n /// v.push(2);\n ///\n /// let two = v.pop();\n /// let one = v.pop();\n ///\n /// assert(two == 2);\n /// assert(one == 1);\n ///\n /// // error: cannot pop from an empty vector\n /// let _ = v.pop();\n /// ```\n pub fn pop(&mut self) -> T {\n assert(self.len > 0);\n self.len -= 1;\n\n let elem = self.storage[self.len];\n self.storage[self.len] = crate::mem::zeroed();\n elem\n }\n\n /// Returns true if the given predicate returns true for any element\n /// in this vector.\n ///\n /// Example:\n ///\n /// ```noir\n /// let mut v: BoundedVec<u32, 3> = BoundedVec::new();\n /// v.extend_from_array([2, 4, 6]);\n ///\n /// let all_even = !v.any(|elem: u32| elem % 2 != 0);\n /// assert(all_even);\n /// ```\n pub fn any<Env>(self, predicate: fn[Env](T) -> bool) -> bool {\n let mut ret = false;\n if is_unconstrained() {\n for i in 0..self.len {\n ret |= predicate(self.storage[i]);\n }\n } else {\n let mut ret = false;\n let mut exceeded_len = false;\n for i in 0..MaxLen {\n exceeded_len |= i == self.len;\n if !exceeded_len {\n ret |= predicate(self.storage[i]);\n }\n }\n }\n ret\n }\n\n /// Creates a new vector of equal size by calling a closure on each element in this vector.\n ///\n /// Example:\n ///\n /// ```noir\n /// let vec: BoundedVec<u32, 4> = BoundedVec::from_array([1, 2, 3, 4]);\n /// let result = vec.map(|value| value * 2);\n ///\n /// let expected = BoundedVec::from_array([2, 4, 6, 8]);\n /// assert_eq(result, expected);\n /// ```\n pub fn map<U, Env>(self, f: fn[Env](T) -> U) -> BoundedVec<U, MaxLen> {\n let mut ret = BoundedVec::new();\n ret.len = self.len();\n\n if is_unconstrained() {\n for i in 0..self.len() {\n ret.storage[i] = f(self.get_unchecked(i));\n }\n } else {\n for i in 0..MaxLen {\n if i < self.len() {\n ret.storage[i] = f(self.get_unchecked(i));\n }\n }\n }\n\n ret\n }\n\n /// Creates a new BoundedVec from the given array and length.\n /// The given length must be less than or equal to the length of the array.\n ///\n /// This function will zero out any elements at or past index `len` of `array`.\n /// This incurs an extra runtime cost of O(MaxLen). If you are sure your array is\n /// zeroed after that index, you can use `from_parts_unchecked` to remove the extra loop.\n ///\n /// Example:\n ///\n /// ```noir\n /// let vec: BoundedVec<u32, 4> = BoundedVec::from_parts([1, 2, 3, 0], 3);\n /// assert_eq(vec.len(), 3);\n /// ```\n pub fn from_parts(mut array: [T; MaxLen], len: u32) -> Self {\n assert(len <= MaxLen);\n let zeroed = crate::mem::zeroed();\n\n if is_unconstrained() {\n for i in len..MaxLen {\n array[i] = zeroed;\n }\n } else {\n for i in 0..MaxLen {\n if i >= len {\n array[i] = zeroed;\n }\n }\n }\n\n BoundedVec { storage: array, len }\n }\n\n /// Creates a new BoundedVec from the given array and length.\n /// The given length must be less than or equal to the length of the array.\n ///\n /// This function is unsafe because it expects all elements past the `len` index\n /// of `array` to be zeroed, but does not check for this internally. Use `from_parts`\n /// for a safe version of this function which does zero out any indices past the\n /// given length. Invalidating this assumption can notably cause `BoundedVec::eq`\n /// to give incorrect results since it will check even elements past `len`.\n ///\n /// Example:\n ///\n /// ```noir\n /// let vec: BoundedVec<u32, 4> = BoundedVec::from_parts_unchecked([1, 2, 3, 0], 3);\n /// assert_eq(vec.len(), 3);\n ///\n /// // invalid use!\n /// let vec1: BoundedVec<u32, 4> = BoundedVec::from_parts_unchecked([1, 2, 3, 1], 3);\n /// let vec2: BoundedVec<u32, 4> = BoundedVec::from_parts_unchecked([1, 2, 3, 2], 3);\n ///\n /// // both vecs have length 3 so we'd expect them to be equal, but this\n /// // fails because elements past the length are still checked in eq\n /// assert_eq(vec1, vec2); // fails\n /// ```\n pub fn from_parts_unchecked(array: [T; MaxLen], len: u32) -> Self {\n assert(len <= MaxLen);\n BoundedVec { storage: array, len }\n }\n}\n\nimpl<T, let MaxLen: u32> Eq for BoundedVec<T, MaxLen>\nwhere\n T: Eq,\n{\n fn eq(self, other: BoundedVec<T, MaxLen>) -> bool {\n // TODO: https://github.com/noir-lang/noir/issues/4837\n //\n // We make the assumption that the user has used the proper interface for working with `BoundedVec`s\n // rather than directly manipulating the internal fields as this can result in an inconsistent internal state.\n if self.len == other.len {\n self.storage == other.storage\n } else {\n false\n }\n }\n}\n\nimpl<T, let MaxLen: u32, let Len: u32> From<[T; Len]> for BoundedVec<T, MaxLen> {\n fn from(array: [T; Len]) -> BoundedVec<T, MaxLen> {\n BoundedVec::from_array(array)\n }\n}\n\nmod bounded_vec_tests {\n\n mod get {\n use crate::collections::bounded_vec::BoundedVec;\n\n #[test(should_fail_with = \"Attempted to read past end of BoundedVec\")]\n fn panics_when_reading_elements_past_end_of_vec() {\n let vec: BoundedVec<Field, 5> = BoundedVec::new();\n\n crate::println(vec.get(0));\n }\n }\n\n mod set {\n use crate::collections::bounded_vec::BoundedVec;\n\n #[test]\n fn set_updates_values_properly() {\n let mut vec = BoundedVec::from_array([0, 0, 0, 0, 0]);\n\n vec.set(0, 42);\n assert_eq(vec.storage, [42, 0, 0, 0, 0]);\n\n vec.set(1, 43);\n assert_eq(vec.storage, [42, 43, 0, 0, 0]);\n\n vec.set(2, 44);\n assert_eq(vec.storage, [42, 43, 44, 0, 0]);\n\n vec.set(1, 10);\n assert_eq(vec.storage, [42, 10, 44, 0, 0]);\n\n vec.set(0, 0);\n assert_eq(vec.storage, [0, 10, 44, 0, 0]);\n }\n\n #[test(should_fail_with = \"Attempted to write past end of BoundedVec\")]\n fn panics_when_writing_elements_past_end_of_vec() {\n let mut vec: BoundedVec<Field, 5> = BoundedVec::new();\n vec.set(0, 42);\n\n // Need to use println to avoid DIE removing the write operation.\n crate::println(vec.get(0));\n }\n }\n\n mod map {\n use crate::collections::bounded_vec::BoundedVec;\n\n #[test]\n fn applies_function_correctly() {\n // docs:start:bounded-vec-map-example\n let vec: BoundedVec<u32, 4> = BoundedVec::from_array([1, 2, 3, 4]);\n let result = vec.map(|value| value * 2);\n // docs:end:bounded-vec-map-example\n let expected = BoundedVec::from_array([2, 4, 6, 8]);\n\n assert_eq(result, expected);\n }\n\n #[test]\n fn applies_function_that_changes_return_type() {\n let vec: BoundedVec<u32, 4> = BoundedVec::from_array([1, 2, 3, 4]);\n let result = vec.map(|value| (value * 2) as Field);\n let expected: BoundedVec<Field, 4> = BoundedVec::from_array([2, 4, 6, 8]);\n\n assert_eq(result, expected);\n }\n\n #[test]\n fn does_not_apply_function_past_len() {\n let vec: BoundedVec<u32, 3> = BoundedVec::from_array([0, 1]);\n let result = vec.map(|value| if value == 0 { 5 } else { value });\n let expected = BoundedVec::from_array([5, 1]);\n\n assert_eq(result, expected);\n assert_eq(result.get_unchecked(2), 0);\n }\n }\n\n mod from_array {\n use crate::collections::bounded_vec::BoundedVec;\n\n #[test]\n fn empty() {\n let empty_array: [Field; 0] = [];\n let bounded_vec = BoundedVec::from_array([]);\n\n assert_eq(bounded_vec.max_len(), 0);\n assert_eq(bounded_vec.len(), 0);\n assert_eq(bounded_vec.storage(), empty_array);\n }\n\n #[test]\n fn equal_len() {\n let array = [1, 2, 3];\n let bounded_vec = BoundedVec::from_array(array);\n\n assert_eq(bounded_vec.max_len(), 3);\n assert_eq(bounded_vec.len(), 3);\n assert_eq(bounded_vec.storage(), array);\n }\n\n #[test]\n fn max_len_greater_then_array_len() {\n let array = [1, 2, 3];\n let bounded_vec: BoundedVec<Field, 10> = BoundedVec::from_array(array);\n\n assert_eq(bounded_vec.max_len(), 10);\n assert_eq(bounded_vec.len(), 3);\n assert_eq(bounded_vec.get(0), 1);\n assert_eq(bounded_vec.get(1), 2);\n assert_eq(bounded_vec.get(2), 3);\n }\n\n #[test(should_fail_with = \"from array out of bounds\")]\n fn max_len_lower_then_array_len() {\n let _: BoundedVec<Field, 2> = BoundedVec::from_array([0; 3]);\n }\n }\n\n mod trait_from {\n use crate::collections::bounded_vec::BoundedVec;\n use crate::convert::From;\n\n #[test]\n fn simple() {\n let array = [1, 2];\n let bounded_vec: BoundedVec<Field, 10> = BoundedVec::from(array);\n\n assert_eq(bounded_vec.max_len(), 10);\n assert_eq(bounded_vec.len(), 2);\n assert_eq(bounded_vec.get(0), 1);\n assert_eq(bounded_vec.get(1), 2);\n }\n }\n\n mod trait_eq {\n use crate::collections::bounded_vec::BoundedVec;\n\n #[test]\n fn empty_equality() {\n let mut bounded_vec1: BoundedVec<Field, 3> = BoundedVec::new();\n let mut bounded_vec2: BoundedVec<Field, 3> = BoundedVec::new();\n\n assert_eq(bounded_vec1, bounded_vec2);\n }\n\n #[test]\n fn inequality() {\n let mut bounded_vec1: BoundedVec<Field, 3> = BoundedVec::new();\n let mut bounded_vec2: BoundedVec<Field, 3> = BoundedVec::new();\n bounded_vec1.push(1);\n bounded_vec2.push(2);\n\n assert(bounded_vec1 != bounded_vec2);\n }\n }\n\n mod from_parts {\n use crate::collections::bounded_vec::BoundedVec;\n\n #[test]\n fn from_parts() {\n // docs:start:from-parts\n let vec: BoundedVec<u32, 4> = BoundedVec::from_parts([1, 2, 3, 0], 3);\n assert_eq(vec.len(), 3);\n\n // Any elements past the given length are zeroed out, so these\n // two BoundedVecs will be completely equal\n let vec1: BoundedVec<u32, 4> = BoundedVec::from_parts([1, 2, 3, 1], 3);\n let vec2: BoundedVec<u32, 4> = BoundedVec::from_parts([1, 2, 3, 2], 3);\n assert_eq(vec1, vec2);\n // docs:end:from-parts\n }\n\n #[test]\n fn from_parts_unchecked() {\n // docs:start:from-parts-unchecked\n let vec: BoundedVec<u32, 4> = BoundedVec::from_parts_unchecked([1, 2, 3, 0], 3);\n assert_eq(vec.len(), 3);\n\n // invalid use!\n let vec1: BoundedVec<u32, 4> = BoundedVec::from_parts_unchecked([1, 2, 3, 1], 3);\n let vec2: BoundedVec<u32, 4> = BoundedVec::from_parts_unchecked([1, 2, 3, 2], 3);\n\n // both vecs have length 3 so we'd expect them to be equal, but this\n // fails because elements past the length are still checked in eq\n assert(vec1 != vec2);\n // docs:end:from-parts-unchecked\n }\n }\n}\n"
3893
+ "source": "use crate::{cmp::Eq, convert::From, runtime::is_unconstrained, static_assert};\n\n/// A `BoundedVec<T, MaxLen>` is a growable storage similar to a `Vec<T>` except that it\n/// is bounded with a maximum possible length. Unlike `Vec`, `BoundedVec` is not implemented\n/// via slices and thus is not subject to the same restrictions slices are (notably, nested\n/// slices - and thus nested vectors as well - are disallowed).\n///\n/// Since a BoundedVec is backed by a normal array under the hood, growing the BoundedVec by\n/// pushing an additional element is also more efficient - the length only needs to be increased\n/// by one.\n///\n/// For these reasons `BoundedVec<T, N>` should generally be preferred over `Vec<T>` when there\n/// is a reasonable maximum bound that can be placed on the vector.\n///\n/// Example:\n///\n/// ```noir\n/// let mut vector: BoundedVec<Field, 10> = BoundedVec::new();\n/// for i in 0..5 {\n/// vector.push(i);\n/// }\n/// assert(vector.len() == 5);\n/// assert(vector.max_len() == 10);\n/// ```\npub struct BoundedVec<T, let MaxLen: u32> {\n storage: [T; MaxLen],\n len: u32,\n}\n\nimpl<T, let MaxLen: u32> BoundedVec<T, MaxLen> {\n /// Creates a new, empty vector of length zero.\n ///\n /// Since this container is backed by an array internally, it still needs an initial value\n /// to give each element. To resolve this, each element is zeroed internally. This value\n /// is guaranteed to be inaccessible unless `get_unchecked` is used.\n ///\n /// Example:\n ///\n /// ```noir\n /// let empty_vector: BoundedVec<Field, 10> = BoundedVec::new();\n /// assert(empty_vector.len() == 0);\n /// ```\n ///\n /// Note that whenever calling `new` the maximum length of the vector should always be specified\n /// via a type signature:\n ///\n /// ```noir\n /// fn good() -> BoundedVec<Field, 10> {\n /// // Ok! MaxLen is specified with a type annotation\n /// let v1: BoundedVec<Field, 3> = BoundedVec::new();\n /// let v2 = BoundedVec::new();\n ///\n /// // Ok! MaxLen is known from the type of `good`'s return value\n /// v2\n /// }\n ///\n /// fn bad() {\n /// // Error: Type annotation needed\n /// // The compiler can't infer `MaxLen` from the following code:\n /// let mut v3 = BoundedVec::new();\n /// v3.push(5);\n /// }\n /// ```\n ///\n /// This defaulting of `MaxLen` (and numeric generics in general) to zero may change in future noir versions\n /// but for now make sure to use type annotations when using bounded vectors. Otherwise, you will receive a\n /// constraint failure at runtime when the vec is pushed to.\n pub fn new() -> Self {\n let zeroed = crate::mem::zeroed();\n BoundedVec { storage: [zeroed; MaxLen], len: 0 }\n }\n\n /// Retrieves an element from the vector at the given index, starting from zero.\n ///\n /// If the given index is equal to or greater than the length of the vector, this\n /// will issue a constraint failure.\n ///\n /// Example:\n ///\n /// ```noir\n /// fn foo<let N: u32>(v: BoundedVec<u32, N>) {\n /// let first = v.get(0);\n /// let last = v.get(v.len() - 1);\n /// assert(first != last);\n /// }\n /// ```\n pub fn get(self, index: u32) -> T {\n assert(index < self.len, \"Attempted to read past end of BoundedVec\");\n self.get_unchecked(index)\n }\n\n /// Retrieves an element from the vector at the given index, starting from zero, without\n /// performing a bounds check.\n ///\n /// Since this function does not perform a bounds check on length before accessing the element,\n /// it is unsafe! Use at your own risk!\n ///\n /// Example:\n ///\n /// ```noir\n /// fn sum_of_first_three<let N: u32>(v: BoundedVec<u32, N>) -> u32 {\n /// // Always ensure the length is larger than the largest\n /// // index passed to get_unchecked\n /// assert(v.len() > 2);\n /// let first = v.get_unchecked(0);\n /// let second = v.get_unchecked(1);\n /// let third = v.get_unchecked(2);\n /// first + second + third\n /// }\n /// ```\n pub fn get_unchecked(self, index: u32) -> T {\n self.storage[index]\n }\n\n /// Writes an element to the vector at the given index, starting from zero.\n ///\n /// If the given index is equal to or greater than the length of the vector, this will issue a constraint failure.\n ///\n /// Example:\n ///\n /// ```noir\n /// fn foo<let N: u32>(v: BoundedVec<u32, N>) {\n /// let first = v.get(0);\n /// assert(first != 42);\n /// v.set(0, 42);\n /// let new_first = v.get(0);\n /// assert(new_first == 42);\n /// }\n /// ```\n pub fn set(&mut self, index: u32, value: T) {\n assert(index < self.len, \"Attempted to write past end of BoundedVec\");\n self.set_unchecked(index, value)\n }\n\n /// Writes an element to the vector at the given index, starting from zero, without performing a bounds check.\n ///\n /// Since this function does not perform a bounds check on length before accessing the element, it is unsafe! Use at your own risk!\n ///\n /// Example:\n ///\n /// ```noir\n /// fn set_unchecked_example() {\n /// let mut vec: BoundedVec<u32, 5> = BoundedVec::new();\n /// vec.extend_from_array([1, 2]);\n ///\n /// // Here we're safely writing within the valid range of `vec`\n /// // `vec` now has the value [42, 2]\n /// vec.set_unchecked(0, 42);\n ///\n /// // We can then safely read this value back out of `vec`.\n /// // Notice that we use the checked version of `get` which would prevent reading unsafe values.\n /// assert_eq(vec.get(0), 42);\n ///\n /// // We've now written past the end of `vec`.\n /// // As this index is still within the maximum potential length of `v`,\n /// // it won't cause a constraint failure.\n /// vec.set_unchecked(2, 42);\n /// println(vec);\n ///\n /// // This will write past the end of the maximum potential length of `vec`,\n /// // it will then trigger a constraint failure.\n /// vec.set_unchecked(5, 42);\n /// println(vec);\n /// }\n /// ```\n pub fn set_unchecked(&mut self, index: u32, value: T) {\n self.storage[index] = value;\n }\n\n /// Pushes an element to the end of the vector. This increases the length\n /// of the vector by one.\n ///\n /// Panics if the new length of the vector will be greater than the max length.\n ///\n /// Example:\n ///\n /// ```noir\n /// let mut v: BoundedVec<Field, 2> = BoundedVec::new();\n ///\n /// v.push(1);\n /// v.push(2);\n ///\n /// // Panics with failed assertion \"push out of bounds\"\n /// v.push(3);\n /// ```\n pub fn push(&mut self, elem: T) {\n assert(self.len < MaxLen, \"push out of bounds\");\n\n self.storage[self.len] = elem;\n self.len += 1;\n }\n\n /// Returns the current length of this vector\n ///\n /// Example:\n ///\n /// ```noir\n /// let mut v: BoundedVec<Field, 4> = BoundedVec::new();\n /// assert(v.len() == 0);\n ///\n /// v.push(100);\n /// assert(v.len() == 1);\n ///\n /// v.push(200);\n /// v.push(300);\n /// v.push(400);\n /// assert(v.len() == 4);\n ///\n /// let _ = v.pop();\n /// let _ = v.pop();\n /// assert(v.len() == 2);\n /// ```\n pub fn len(self) -> u32 {\n self.len\n }\n\n /// Returns the maximum length of this vector. This is always\n /// equal to the `MaxLen` parameter this vector was initialized with.\n ///\n /// Example:\n ///\n /// ```noir\n /// let mut v: BoundedVec<Field, 5> = BoundedVec::new();\n ///\n /// assert(v.max_len() == 5);\n /// v.push(10);\n /// assert(v.max_len() == 5);\n /// ```\n pub fn max_len(_self: BoundedVec<T, MaxLen>) -> u32 {\n MaxLen\n }\n\n /// Returns the internal array within this vector.\n ///\n /// Since arrays in Noir are immutable, mutating the returned storage array will not mutate\n /// the storage held internally by this vector.\n ///\n /// Note that uninitialized elements may be zeroed out!\n ///\n /// Example:\n ///\n /// ```noir\n /// let mut v: BoundedVec<Field, 5> = BoundedVec::new();\n ///\n /// assert(v.storage() == [0, 0, 0, 0, 0]);\n ///\n /// v.push(57);\n /// assert(v.storage() == [57, 0, 0, 0, 0]);\n /// ```\n pub fn storage(self) -> [T; MaxLen] {\n self.storage\n }\n\n /// Pushes each element from the given array to this vector.\n ///\n /// Panics if pushing each element would cause the length of this vector\n /// to exceed the maximum length.\n ///\n /// Example:\n ///\n /// ```noir\n /// let mut vec: BoundedVec<Field, 3> = BoundedVec::new();\n /// vec.extend_from_array([2, 4]);\n ///\n /// assert(vec.len == 2);\n /// assert(vec.get(0) == 2);\n /// assert(vec.get(1) == 4);\n /// ```\n pub fn extend_from_array<let Len: u32>(&mut self, array: [T; Len]) {\n let new_len = self.len + array.len();\n assert(new_len <= MaxLen, \"extend_from_array out of bounds\");\n for i in 0..array.len() {\n self.storage[self.len + i] = array[i];\n }\n self.len = new_len;\n }\n\n /// Pushes each element from the given slice to this vector.\n ///\n /// Panics if pushing each element would cause the length of this vector\n /// to exceed the maximum length.\n ///\n /// Example:\n ///\n /// ```noir\n /// let mut vec: BoundedVec<Field, 3> = BoundedVec::new();\n /// vec.extend_from_slice(&[2, 4]);\n ///\n /// assert(vec.len == 2);\n /// assert(vec.get(0) == 2);\n /// assert(vec.get(1) == 4);\n /// ```\n pub fn extend_from_slice(&mut self, slice: [T]) {\n let new_len = self.len + slice.len();\n assert(new_len <= MaxLen, \"extend_from_slice out of bounds\");\n for i in 0..slice.len() {\n self.storage[self.len + i] = slice[i];\n }\n self.len = new_len;\n }\n\n /// Pushes each element from the other vector to this vector. The length of\n /// the other vector is left unchanged.\n ///\n /// Panics if pushing each element would cause the length of this vector\n /// to exceed the maximum length.\n ///\n /// ```noir\n /// let mut v1: BoundedVec<Field, 5> = BoundedVec::new();\n /// let mut v2: BoundedVec<Field, 7> = BoundedVec::new();\n ///\n /// v2.extend_from_array([1, 2, 3]);\n /// v1.extend_from_bounded_vec(v2);\n ///\n /// assert(v1.storage() == [1, 2, 3, 0, 0]);\n /// assert(v2.storage() == [1, 2, 3, 0, 0, 0, 0]);\n /// ```\n pub fn extend_from_bounded_vec<let Len: u32>(&mut self, vec: BoundedVec<T, Len>) {\n let append_len = vec.len();\n let new_len = self.len + append_len;\n assert(new_len <= MaxLen, \"extend_from_bounded_vec out of bounds\");\n\n if is_unconstrained() {\n for i in 0..append_len {\n self.storage[self.len + i] = vec.get_unchecked(i);\n }\n } else {\n let mut exceeded_len = false;\n for i in 0..Len {\n exceeded_len |= i == append_len;\n if !exceeded_len {\n self.storage[self.len + i] = vec.get_unchecked(i);\n }\n }\n }\n self.len = new_len;\n }\n\n /// Creates a new vector, populating it with values derived from an array input.\n /// The maximum length of the vector is determined based on the type signature.\n ///\n /// Example:\n ///\n /// ```noir\n /// let bounded_vec: BoundedVec<Field, 10> = BoundedVec::from_array([1, 2, 3])\n /// ```\n pub fn from_array<let Len: u32>(array: [T; Len]) -> Self {\n static_assert(Len <= MaxLen, \"from array out of bounds\");\n let mut vec: BoundedVec<T, MaxLen> = BoundedVec::new();\n vec.extend_from_array(array);\n vec\n }\n\n /// Pops the element at the end of the vector. This will decrease the length\n /// of the vector by one.\n ///\n /// Panics if the vector is empty.\n ///\n /// Example:\n ///\n /// ```noir\n /// let mut v: BoundedVec<Field, 2> = BoundedVec::new();\n /// v.push(1);\n /// v.push(2);\n ///\n /// let two = v.pop();\n /// let one = v.pop();\n ///\n /// assert(two == 2);\n /// assert(one == 1);\n ///\n /// // error: cannot pop from an empty vector\n /// let _ = v.pop();\n /// ```\n pub fn pop(&mut self) -> T {\n assert(self.len > 0);\n self.len -= 1;\n\n let elem = self.storage[self.len];\n self.storage[self.len] = crate::mem::zeroed();\n elem\n }\n\n /// Returns true if the given predicate returns true for any element\n /// in this vector.\n ///\n /// Example:\n ///\n /// ```noir\n /// let mut v: BoundedVec<u32, 3> = BoundedVec::new();\n /// v.extend_from_array([2, 4, 6]);\n ///\n /// let all_even = !v.any(|elem: u32| elem % 2 != 0);\n /// assert(all_even);\n /// ```\n pub fn any<Env>(self, predicate: fn[Env](T) -> bool) -> bool {\n let mut ret = false;\n if is_unconstrained() {\n for i in 0..self.len {\n ret |= predicate(self.storage[i]);\n }\n } else {\n let mut ret = false;\n let mut exceeded_len = false;\n for i in 0..MaxLen {\n exceeded_len |= i == self.len;\n if !exceeded_len {\n ret |= predicate(self.storage[i]);\n }\n }\n }\n ret\n }\n\n /// Creates a new vector of equal size by calling a closure on each element in this vector.\n ///\n /// Example:\n ///\n /// ```noir\n /// let vec: BoundedVec<u32, 4> = BoundedVec::from_array([1, 2, 3, 4]);\n /// let result = vec.map(|value| value * 2);\n ///\n /// let expected = BoundedVec::from_array([2, 4, 6, 8]);\n /// assert_eq(result, expected);\n /// ```\n pub fn map<U, Env>(self, f: fn[Env](T) -> U) -> BoundedVec<U, MaxLen> {\n let mut ret = BoundedVec::new();\n ret.len = self.len();\n\n if is_unconstrained() {\n for i in 0..self.len() {\n ret.storage[i] = f(self.get_unchecked(i));\n }\n } else {\n for i in 0..MaxLen {\n if i < self.len() {\n ret.storage[i] = f(self.get_unchecked(i));\n }\n }\n }\n\n ret\n }\n\n /// Creates a new vector of equal size by calling a closure on each element\n /// in this vector, along with its index.\n ///\n /// Example:\n ///\n /// ```noir\n /// let vec: BoundedVec<u32, 4> = BoundedVec::from_array([1, 2, 3, 4]);\n /// let result = vec.mapi(|i, value| i + value * 2);\n ///\n /// let expected = BoundedVec::from_array([2, 5, 8, 11]);\n /// assert_eq(result, expected);\n /// ```\n pub fn mapi<U, Env>(self, f: fn[Env](u32, T) -> U) -> BoundedVec<U, MaxLen> {\n let mut ret = BoundedVec::new();\n ret.len = self.len();\n\n if is_unconstrained() {\n for i in 0..self.len() {\n ret.storage[i] = f(i, self.get_unchecked(i));\n }\n } else {\n for i in 0..MaxLen {\n if i < self.len() {\n ret.storage[i] = f(i, self.get_unchecked(i));\n }\n }\n }\n\n ret\n }\n\n /// Calls a closure on each element in this vector.\n ///\n /// Example:\n ///\n /// ```noir\n /// let vec: BoundedVec<u32, 4> = BoundedVec::from_array([1, 2, 3, 4]);\n /// let mut result = BoundedVec::<u32, 4>::new();\n /// vec.for_each(|value| result.push(value * 2));\n ///\n /// let expected = BoundedVec::from_array([2, 4, 6, 8]);\n /// assert_eq(result, expected);\n /// ```\n pub fn for_each<Env>(self, f: fn[Env](T) -> ()) {\n if is_unconstrained() {\n for i in 0..self.len() {\n f(self.get_unchecked(i));\n }\n } else {\n for i in 0..MaxLen {\n if i < self.len() {\n f(self.get_unchecked(i));\n }\n }\n }\n }\n\n /// Calls a closure on each element in this vector, along with its index.\n ///\n /// Example:\n ///\n /// ```noir\n /// let vec: BoundedVec<u32, 4> = BoundedVec::from_array([1, 2, 3, 4]);\n /// let mut result = BoundedVec::<u32, 4>::new();\n /// vec.for_eachi(|i, value| result.push(i + value * 2));\n ///\n /// let expected = BoundedVec::from_array([2, 5, 8, 11]);\n /// assert_eq(result, expected);\n /// ```\n pub fn for_eachi<Env>(self, f: fn[Env](u32, T) -> ()) {\n if is_unconstrained() {\n for i in 0..self.len() {\n f(i, self.get_unchecked(i));\n }\n } else {\n for i in 0..MaxLen {\n if i < self.len() {\n f(i, self.get_unchecked(i));\n }\n }\n }\n }\n\n /// Creates a new BoundedVec from the given array and length.\n /// The given length must be less than or equal to the length of the array.\n ///\n /// This function will zero out any elements at or past index `len` of `array`.\n /// This incurs an extra runtime cost of O(MaxLen). If you are sure your array is\n /// zeroed after that index, you can use `from_parts_unchecked` to remove the extra loop.\n ///\n /// Example:\n ///\n /// ```noir\n /// let vec: BoundedVec<u32, 4> = BoundedVec::from_parts([1, 2, 3, 0], 3);\n /// assert_eq(vec.len(), 3);\n /// ```\n pub fn from_parts(mut array: [T; MaxLen], len: u32) -> Self {\n assert(len <= MaxLen);\n let zeroed = crate::mem::zeroed();\n\n if is_unconstrained() {\n for i in len..MaxLen {\n array[i] = zeroed;\n }\n } else {\n for i in 0..MaxLen {\n if i >= len {\n array[i] = zeroed;\n }\n }\n }\n\n BoundedVec { storage: array, len }\n }\n\n /// Creates a new BoundedVec from the given array and length.\n /// The given length must be less than or equal to the length of the array.\n ///\n /// This function is unsafe because it expects all elements past the `len` index\n /// of `array` to be zeroed, but does not check for this internally. Use `from_parts`\n /// for a safe version of this function which does zero out any indices past the\n /// given length. Invalidating this assumption can notably cause `BoundedVec::eq`\n /// to give incorrect results since it will check even elements past `len`.\n ///\n /// Example:\n ///\n /// ```noir\n /// let vec: BoundedVec<u32, 4> = BoundedVec::from_parts_unchecked([1, 2, 3, 0], 3);\n /// assert_eq(vec.len(), 3);\n ///\n /// // invalid use!\n /// let vec1: BoundedVec<u32, 4> = BoundedVec::from_parts_unchecked([1, 2, 3, 1], 3);\n /// let vec2: BoundedVec<u32, 4> = BoundedVec::from_parts_unchecked([1, 2, 3, 2], 3);\n ///\n /// // both vecs have length 3 so we'd expect them to be equal, but this\n /// // fails because elements past the length are still checked in eq\n /// assert_eq(vec1, vec2); // fails\n /// ```\n pub fn from_parts_unchecked(array: [T; MaxLen], len: u32) -> Self {\n assert(len <= MaxLen);\n BoundedVec { storage: array, len }\n }\n}\n\nimpl<T, let MaxLen: u32> Eq for BoundedVec<T, MaxLen>\nwhere\n T: Eq,\n{\n fn eq(self, other: BoundedVec<T, MaxLen>) -> bool {\n // TODO: https://github.com/noir-lang/noir/issues/4837\n //\n // We make the assumption that the user has used the proper interface for working with `BoundedVec`s\n // rather than directly manipulating the internal fields as this can result in an inconsistent internal state.\n if self.len == other.len {\n self.storage == other.storage\n } else {\n false\n }\n }\n}\n\nimpl<T, let MaxLen: u32, let Len: u32> From<[T; Len]> for BoundedVec<T, MaxLen> {\n fn from(array: [T; Len]) -> BoundedVec<T, MaxLen> {\n BoundedVec::from_array(array)\n }\n}\n\nmod bounded_vec_tests {\n\n mod get {\n use crate::collections::bounded_vec::BoundedVec;\n\n #[test(should_fail_with = \"Attempted to read past end of BoundedVec\")]\n fn panics_when_reading_elements_past_end_of_vec() {\n let vec: BoundedVec<Field, 5> = BoundedVec::new();\n\n crate::println(vec.get(0));\n }\n }\n\n mod set {\n use crate::collections::bounded_vec::BoundedVec;\n\n #[test]\n fn set_updates_values_properly() {\n let mut vec = BoundedVec::from_array([0, 0, 0, 0, 0]);\n\n vec.set(0, 42);\n assert_eq(vec.storage, [42, 0, 0, 0, 0]);\n\n vec.set(1, 43);\n assert_eq(vec.storage, [42, 43, 0, 0, 0]);\n\n vec.set(2, 44);\n assert_eq(vec.storage, [42, 43, 44, 0, 0]);\n\n vec.set(1, 10);\n assert_eq(vec.storage, [42, 10, 44, 0, 0]);\n\n vec.set(0, 0);\n assert_eq(vec.storage, [0, 10, 44, 0, 0]);\n }\n\n #[test(should_fail_with = \"Attempted to write past end of BoundedVec\")]\n fn panics_when_writing_elements_past_end_of_vec() {\n let mut vec: BoundedVec<Field, 5> = BoundedVec::new();\n vec.set(0, 42);\n\n // Need to use println to avoid DIE removing the write operation.\n crate::println(vec.get(0));\n }\n }\n\n mod map {\n use crate::collections::bounded_vec::BoundedVec;\n\n #[test]\n fn applies_function_correctly() {\n // docs:start:bounded-vec-map-example\n let vec: BoundedVec<u32, 4> = BoundedVec::from_array([1, 2, 3, 4]);\n let result = vec.map(|value| value * 2);\n // docs:end:bounded-vec-map-example\n let expected = BoundedVec::from_array([2, 4, 6, 8]);\n\n assert_eq(result, expected);\n }\n\n #[test]\n fn applies_function_that_changes_return_type() {\n let vec: BoundedVec<u32, 4> = BoundedVec::from_array([1, 2, 3, 4]);\n let result = vec.map(|value| (value * 2) as Field);\n let expected: BoundedVec<Field, 4> = BoundedVec::from_array([2, 4, 6, 8]);\n\n assert_eq(result, expected);\n }\n\n #[test]\n fn does_not_apply_function_past_len() {\n let vec: BoundedVec<u32, 3> = BoundedVec::from_array([0, 1]);\n let result = vec.map(|value| if value == 0 { 5 } else { value });\n let expected = BoundedVec::from_array([5, 1]);\n\n assert_eq(result, expected);\n assert_eq(result.get_unchecked(2), 0);\n }\n }\n\n mod mapi {\n use crate::collections::bounded_vec::BoundedVec;\n\n #[test]\n fn applies_function_correctly() {\n // docs:start:bounded-vec-mapi-example\n let vec: BoundedVec<u32, 4> = BoundedVec::from_array([1, 2, 3, 4]);\n let result = vec.mapi(|i, value| i + value * 2);\n // docs:end:bounded-vec-mapi-example\n let expected = BoundedVec::from_array([2, 5, 8, 11]);\n\n assert_eq(result, expected);\n }\n\n #[test]\n fn applies_function_that_changes_return_type() {\n let vec: BoundedVec<u32, 4> = BoundedVec::from_array([1, 2, 3, 4]);\n let result = vec.mapi(|i, value| (i + value * 2) as Field);\n let expected: BoundedVec<Field, 4> = BoundedVec::from_array([2, 5, 8, 11]);\n\n assert_eq(result, expected);\n }\n\n #[test]\n fn does_not_apply_function_past_len() {\n let vec: BoundedVec<u32, 3> = BoundedVec::from_array([0, 1]);\n let result = vec.mapi(|_, value| if value == 0 { 5 } else { value });\n let expected = BoundedVec::from_array([5, 1]);\n\n assert_eq(result, expected);\n assert_eq(result.get_unchecked(2), 0);\n }\n }\n\n mod for_each {\n use crate::collections::bounded_vec::BoundedVec;\n\n // map in terms of for_each\n fn for_each_map<T, U, Env, let MaxLen: u32>(\n input: BoundedVec<T, MaxLen>,\n f: fn[Env](T) -> U,\n ) -> BoundedVec<U, MaxLen> {\n let mut output = BoundedVec::<U, MaxLen>::new();\n let output_ref = &mut output;\n input.for_each(|x| output_ref.push(f(x)));\n output\n }\n\n #[test]\n fn smoke_test() {\n let mut acc = 0;\n let acc_ref = &mut acc;\n // docs:start:bounded-vec-for-each-example\n let vec: BoundedVec<u32, 3> = BoundedVec::from_array([1, 2, 3]);\n vec.for_each(|value| { *acc_ref += value; });\n // docs:end:bounded-vec-for-each-example\n assert_eq(acc, 6);\n }\n\n #[test]\n fn applies_function_correctly() {\n let vec: BoundedVec<u32, 4> = BoundedVec::from_array([1, 2, 3, 4]);\n let result = for_each_map(vec, |value| value * 2);\n let expected = BoundedVec::from_array([2, 4, 6, 8]);\n\n assert_eq(result, expected);\n }\n\n #[test]\n fn applies_function_that_changes_return_type() {\n let vec: BoundedVec<u32, 4> = BoundedVec::from_array([1, 2, 3, 4]);\n let result = for_each_map(vec, |value| (value * 2) as Field);\n let expected: BoundedVec<Field, 4> = BoundedVec::from_array([2, 4, 6, 8]);\n\n assert_eq(result, expected);\n }\n\n #[test]\n fn does_not_apply_function_past_len() {\n let vec: BoundedVec<u32, 3> = BoundedVec::from_array([0, 1]);\n let result = for_each_map(vec, |value| if value == 0 { 5 } else { value });\n let expected = BoundedVec::from_array([5, 1]);\n\n assert_eq(result, expected);\n assert_eq(result.get_unchecked(2), 0);\n }\n }\n\n mod for_eachi {\n use crate::collections::bounded_vec::BoundedVec;\n\n // mapi in terms of for_eachi\n fn for_eachi_mapi<T, U, Env, let MaxLen: u32>(\n input: BoundedVec<T, MaxLen>,\n f: fn[Env](u32, T) -> U,\n ) -> BoundedVec<U, MaxLen> {\n let mut output = BoundedVec::<U, MaxLen>::new();\n let output_ref = &mut output;\n input.for_eachi(|i, x| output_ref.push(f(i, x)));\n output\n }\n\n #[test]\n fn smoke_test() {\n let mut acc = 0;\n let acc_ref = &mut acc;\n // docs:start:bounded-vec-for-eachi-example\n let vec: BoundedVec<u32, 3> = BoundedVec::from_array([1, 2, 3]);\n vec.for_eachi(|i, value| { *acc_ref += i * value; });\n // docs:end:bounded-vec-for-eachi-example\n\n // 0 * 1 + 1 * 2 + 2 * 3\n assert_eq(acc, 8);\n }\n\n #[test]\n fn applies_function_correctly() {\n let vec: BoundedVec<u32, 4> = BoundedVec::from_array([1, 2, 3, 4]);\n let result = for_eachi_mapi(vec, |i, value| i + value * 2);\n let expected = BoundedVec::from_array([2, 5, 8, 11]);\n\n assert_eq(result, expected);\n }\n\n #[test]\n fn applies_function_that_changes_return_type() {\n let vec: BoundedVec<u32, 4> = BoundedVec::from_array([1, 2, 3, 4]);\n let result = for_eachi_mapi(vec, |i, value| (i + value * 2) as Field);\n let expected: BoundedVec<Field, 4> = BoundedVec::from_array([2, 5, 8, 11]);\n\n assert_eq(result, expected);\n }\n\n #[test]\n fn does_not_apply_function_past_len() {\n let vec: BoundedVec<u32, 3> = BoundedVec::from_array([0, 1]);\n let result = for_eachi_mapi(vec, |_, value| if value == 0 { 5 } else { value });\n let expected = BoundedVec::from_array([5, 1]);\n\n assert_eq(result, expected);\n assert_eq(result.get_unchecked(2), 0);\n }\n }\n\n mod from_array {\n use crate::collections::bounded_vec::BoundedVec;\n\n #[test]\n fn empty() {\n let empty_array: [Field; 0] = [];\n let bounded_vec = BoundedVec::from_array([]);\n\n assert_eq(bounded_vec.max_len(), 0);\n assert_eq(bounded_vec.len(), 0);\n assert_eq(bounded_vec.storage(), empty_array);\n }\n\n #[test]\n fn equal_len() {\n let array = [1, 2, 3];\n let bounded_vec = BoundedVec::from_array(array);\n\n assert_eq(bounded_vec.max_len(), 3);\n assert_eq(bounded_vec.len(), 3);\n assert_eq(bounded_vec.storage(), array);\n }\n\n #[test]\n fn max_len_greater_then_array_len() {\n let array = [1, 2, 3];\n let bounded_vec: BoundedVec<Field, 10> = BoundedVec::from_array(array);\n\n assert_eq(bounded_vec.max_len(), 10);\n assert_eq(bounded_vec.len(), 3);\n assert_eq(bounded_vec.get(0), 1);\n assert_eq(bounded_vec.get(1), 2);\n assert_eq(bounded_vec.get(2), 3);\n }\n\n #[test(should_fail_with = \"from array out of bounds\")]\n fn max_len_lower_then_array_len() {\n let _: BoundedVec<Field, 2> = BoundedVec::from_array([0; 3]);\n }\n }\n\n mod trait_from {\n use crate::collections::bounded_vec::BoundedVec;\n use crate::convert::From;\n\n #[test]\n fn simple() {\n let array = [1, 2];\n let bounded_vec: BoundedVec<Field, 10> = BoundedVec::from(array);\n\n assert_eq(bounded_vec.max_len(), 10);\n assert_eq(bounded_vec.len(), 2);\n assert_eq(bounded_vec.get(0), 1);\n assert_eq(bounded_vec.get(1), 2);\n }\n }\n\n mod trait_eq {\n use crate::collections::bounded_vec::BoundedVec;\n\n #[test]\n fn empty_equality() {\n let mut bounded_vec1: BoundedVec<Field, 3> = BoundedVec::new();\n let mut bounded_vec2: BoundedVec<Field, 3> = BoundedVec::new();\n\n assert_eq(bounded_vec1, bounded_vec2);\n }\n\n #[test]\n fn inequality() {\n let mut bounded_vec1: BoundedVec<Field, 3> = BoundedVec::new();\n let mut bounded_vec2: BoundedVec<Field, 3> = BoundedVec::new();\n bounded_vec1.push(1);\n bounded_vec2.push(2);\n\n assert(bounded_vec1 != bounded_vec2);\n }\n }\n\n mod from_parts {\n use crate::collections::bounded_vec::BoundedVec;\n\n #[test]\n fn from_parts() {\n // docs:start:from-parts\n let vec: BoundedVec<u32, 4> = BoundedVec::from_parts([1, 2, 3, 0], 3);\n assert_eq(vec.len(), 3);\n\n // Any elements past the given length are zeroed out, so these\n // two BoundedVecs will be completely equal\n let vec1: BoundedVec<u32, 4> = BoundedVec::from_parts([1, 2, 3, 1], 3);\n let vec2: BoundedVec<u32, 4> = BoundedVec::from_parts([1, 2, 3, 2], 3);\n assert_eq(vec1, vec2);\n // docs:end:from-parts\n }\n\n #[test]\n fn from_parts_unchecked() {\n // docs:start:from-parts-unchecked\n let vec: BoundedVec<u32, 4> = BoundedVec::from_parts_unchecked([1, 2, 3, 0], 3);\n assert_eq(vec.len(), 3);\n\n // invalid use!\n let vec1: BoundedVec<u32, 4> = BoundedVec::from_parts_unchecked([1, 2, 3, 1], 3);\n let vec2: BoundedVec<u32, 4> = BoundedVec::from_parts_unchecked([1, 2, 3, 2], 3);\n\n // both vecs have length 3 so we'd expect them to be equal, but this\n // fails because elements past the length are still checked in eq\n assert(vec1 != vec2);\n // docs:end:from-parts-unchecked\n }\n }\n}\n"
3894
3894
  },
3895
3895
  "65": {
3896
3896
  "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/context/private_context.nr",
@@ -3906,21 +3906,21 @@
3906
3906
  },
3907
3907
  "70": {
3908
3908
  "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/discovery/mod.nr",
3909
- "source": "// TODO(#12750): don't make this value assume we're using AES.\nuse crate::encrypted_logs::log_assembly_strategies::default_aes128::note::encryption::PRIVATE_LOG_PLAINTEXT_SIZE_IN_FIELDS;\nuse dep::protocol_types::{address::AztecAddress, debug_log::debug_log};\n\npub mod private_logs;\npub mod partial_notes;\npub mod nonce_discovery;\n\n/// We reserve two fields in the note private log that are not part of the note content: one for the storage slot, and\n/// one for the combined log and note type ID.\nglobal NOTE_PRIVATE_LOG_RESERVED_FIELDS: u32 = 2;\n\n/// The maximum length of the packed representation of a note's contents. This is limited by private log size, encryption\n/// overhead and extra fields in the log (e.g. the combined log and note type ID).\npub global MAX_NOTE_PACKED_LEN: u32 =\n PRIVATE_LOG_PLAINTEXT_SIZE_IN_FIELDS - NOTE_PRIVATE_LOG_RESERVED_FIELDS;\n\npub struct NoteHashAndNullifier {\n /// The result of NoteHash::compute_note_hash\n pub note_hash: Field,\n /// The result of NoteHash::compute_nullifier_unconstrained (since all of note discovery is unconstrained)\n pub inner_nullifier: Field,\n}\n\n/// A function which takes a note's packed content, address of the emitting contract, nonce, storage slot and note type\n/// ID and attempts to compute its note hash (not siloed by nonce nor address) and inner nullifier (not siloed by\n/// address).\n///\n/// This function must be user-provided as its implementation requires knowledge of how note type IDs are allocated in a\n/// contract. The `#[aztec]` macro automatically creates such a contract library method called\n/// `_compute_note_hash_and_nullifier`, which looks something like this:\n///\n/// ```\n/// |packed_note_content, contract_address, nonce, storage_slot, note_type_id| {\n/// if note_type_id == MyNoteType::get_id() {\n/// assert(packed_note_content.len() == MY_NOTE_TYPE_SERIALIZATION_LENGTH);\n///\n/// let note = MyNoteType::unpack(aztec::utils::array::subarray(packed_note.storage(), 0));\n///\n/// let note_hash = note.compute_note_hash(storage_slot);\n/// let note_hash_for_nullify = aztec::note::utils::compute_note_hash_for_nullify(\n/// RetrievedNote{ note, contract_address, metadata: SettledNoteMetadata::new(nonce).into() },\n/// storage_slot\n/// );\n///\n/// let inner_nullifier = note.compute_nullifier_unconstrained(note_hash_for_nullify);\n///\n/// Option::some(\n/// aztec::discovery::NoteHashAndNullifier {\n/// note_hash, inner_nullifier\n/// }\n/// )\n/// } else if note_type_id == MyOtherNoteType::get_id() {\n/// ... // Similar to above but calling MyOtherNoteType::unpack_content\n/// } else {\n/// Option::none() // Unknown note type ID\n/// };\n/// }\n/// ```\ntype ComputeNoteHashAndNullifier<Env> = unconstrained fn[Env](/* packed_note_content */BoundedVec<Field, MAX_NOTE_PACKED_LEN>, /* storage_slot */ Field, /* note_type_id */ Field, /* contract_address */ AztecAddress, /* nonce */ Field) -> Option<NoteHashAndNullifier>;\n\n/// Performs the note discovery process, in which private and public logs are downloaded and inspected to find private\n/// notes, partial notes, and their completion. This is the mechanism via which PXE learns of new notes.\n///\n/// Receives the address of the contract on which discovery is performed (i.e. the contract that emitted the notes)\n/// along with its `compute_note_hash_and_nullifier` function.\npub unconstrained fn discover_new_notes<Env>(\n contract_address: AztecAddress,\n compute_note_hash_and_nullifier: ComputeNoteHashAndNullifier<Env>,\n) {\n debug_log(\"Performing note discovery\");\n\n private_logs::fetch_and_process_private_tagged_logs(\n contract_address,\n compute_note_hash_and_nullifier,\n );\n\n partial_notes::fetch_and_process_public_partial_note_completion_logs(\n contract_address,\n compute_note_hash_and_nullifier,\n );\n}\n"
3909
+ "source": "// TODO(#12750): don't make this value assume we're using AES.\nuse crate::encrypted_logs::log_assembly_strategies::default_aes128::note::encryption::PRIVATE_LOG_PLAINTEXT_SIZE_IN_FIELDS;\nuse dep::protocol_types::{address::AztecAddress, debug_log::debug_log};\n\npub mod private_logs;\npub mod private_notes;\npub mod partial_notes;\npub mod nonce_discovery;\n\n/// We reserve two fields in the note private log that are not part of the note content: one for the storage slot, and\n/// one for the combined log and note type ID.\nglobal PRIVATE_LOG_EXPANDED_METADATA_LEN: u32 = 1;\n\n/// The maximum length of the log's content, i.e. after log type ID and metadata extraction.\npub global MAX_LOG_CONTENT_LEN: u32 =\n PRIVATE_LOG_PLAINTEXT_SIZE_IN_FIELDS - PRIVATE_LOG_EXPANDED_METADATA_LEN;\n\nuse private_notes::MAX_NOTE_PACKED_LEN;\n\npub struct NoteHashAndNullifier {\n /// The result of NoteHash::compute_note_hash\n pub note_hash: Field,\n /// The result of NoteHash::compute_nullifier_unconstrained (since all of message discovery is unconstrained)\n pub inner_nullifier: Field,\n}\n\n/// A function which takes a note's packed content, address of the emitting contract, nonce, storage slot and note type\n/// ID and attempts to compute its note hash (not siloed by nonce nor address) and inner nullifier (not siloed by\n/// address).\n///\n/// This function must be user-provided as its implementation requires knowledge of how note type IDs are allocated in a\n/// contract. The `#[aztec]` macro automatically creates such a contract library method called\n/// `_compute_note_hash_and_nullifier`, which looks something like this:\n///\n/// ```\n/// |packed_note, contract_address, nonce, storage_slot, note_type_id| {\n/// if note_type_id == MyNoteType::get_id() {\n/// assert(packed_note.len() == MY_NOTE_TYPE_SERIALIZATION_LENGTH);\n///\n/// let note = MyNoteType::unpack(aztec::utils::array::subarray(packed_note.storage(), 0));\n///\n/// let note_hash = note.compute_note_hash(storage_slot);\n/// let note_hash_for_nullify = aztec::note::utils::compute_note_hash_for_nullify(\n/// RetrievedNote{ note, contract_address, metadata: SettledNoteMetadata::new(nonce).into() },\n/// storage_slot\n/// );\n///\n/// let inner_nullifier = note.compute_nullifier_unconstrained(note_hash_for_nullify);\n///\n/// Option::some(\n/// aztec::discovery::NoteHashAndNullifier {\n/// note_hash, inner_nullifier\n/// }\n/// )\n/// } else if note_type_id == MyOtherNoteType::get_id() {\n/// ... // Similar to above but calling MyOtherNoteType::unpack_content\n/// } else {\n/// Option::none() // Unknown note type ID\n/// };\n/// }\n/// ```\ntype ComputeNoteHashAndNullifier<Env> = unconstrained fn[Env](/* packed_note */BoundedVec<Field, MAX_NOTE_PACKED_LEN>, /* storage_slot */ Field, /* note_type_id */ Field, /* contract_address */ AztecAddress, /* nonce */ Field) -> Option<NoteHashAndNullifier>;\n\n/// Performs the message discovery process, in which private are downloaded and inspected to find new private notes,\n/// partial notes and events, etc., and pending partial notes are processed to search for their completion logs.\n/// This is the mechanism via which a contract updates its knowldge of its private state.\n///\n/// Receives the address of the contract on which discovery is performed along with its\n/// `compute_note_hash_and_nullifier` function.\npub unconstrained fn discover_new_messages<Env>(\n contract_address: AztecAddress,\n compute_note_hash_and_nullifier: ComputeNoteHashAndNullifier<Env>,\n) {\n debug_log(\"Performing message discovery\");\n\n private_logs::fetch_and_process_private_tagged_logs(\n contract_address,\n compute_note_hash_and_nullifier,\n );\n\n partial_notes::fetch_and_process_public_partial_note_completion_logs(\n contract_address,\n compute_note_hash_and_nullifier,\n );\n}\n"
3910
3910
  },
3911
3911
  "71": {
3912
3912
  "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/discovery/nonce_discovery.nr",
3913
- "source": "use crate::{discovery::{ComputeNoteHashAndNullifier, MAX_NOTE_PACKED_LEN}, utils::array};\n\nuse dep::protocol_types::{\n address::AztecAddress,\n constants::MAX_NOTE_HASHES_PER_TX,\n debug_log::debug_log_format,\n hash::{compute_note_hash_nonce, compute_siloed_note_hash, compute_unique_note_hash},\n traits::ToField,\n};\n\n/// A struct with the discovered information of a complete note, required for delivery to PXE. Note that this is *not*\n/// the complete note information, since it does not include content, storage slot, etc.\npub struct DiscoveredNoteInfo {\n pub nonce: Field,\n pub note_hash: Field,\n pub inner_nullifier: Field,\n}\n\n/// Searches for note nonces that will result in a note that was emitted in a transaction. While rare, it is possible\n/// for multiple notes to have the exact same packed content and storage slot but different nonces, resulting in\n/// different unique note hashes. Because of this this function returns a *vector* of discovered notes, though in most\n/// cases it will contain a single element.\n///\n/// Due to how nonces are computed, this function requires knowledge of the transaction in which the note was created,\n/// more specifically the list of all unique note hashes in it plus the value of its first nullifier.\npub unconstrained fn attempt_note_nonce_discovery<Env>(\n unique_note_hashes_in_tx: BoundedVec<Field, MAX_NOTE_HASHES_PER_TX>,\n first_nullifier_in_tx: Field,\n compute_note_hash_and_nullifier: ComputeNoteHashAndNullifier<Env>,\n contract_address: AztecAddress,\n storage_slot: Field,\n note_type_id: Field,\n packed_note_content: BoundedVec<Field, MAX_NOTE_PACKED_LEN>,\n) -> BoundedVec<DiscoveredNoteInfo, MAX_NOTE_HASHES_PER_TX> {\n let discovered_notes = &mut BoundedVec::new();\n\n debug_log_format(\n \"Attempting note discovery on {0} potential notes on contract {1} for storage slot {2}\",\n [unique_note_hashes_in_tx.len() as Field, contract_address.to_field(), storage_slot],\n );\n\n // We need to find nonces (typically just one) that result in a note hash that, once siloed into a unique note hash,\n // is one of the note hashes created by the transaction.\n array::for_each_in_bounded_vec(\n unique_note_hashes_in_tx,\n |expected_unique_note_hash, i| {\n // Nonces are computed by hashing the first nullifier in the transaction with the index of the note in the\n // new note hashes array. We therefore know for each note in every transaction what its nonce is.\n let candidate_nonce = compute_note_hash_nonce(first_nullifier_in_tx, i);\n\n // Given nonce, note content and metadata, we can compute the note hash and silo it to check if it matches\n // the note hash at the array index we're currently processing.\n // TODO(#11157): handle failed note_hash_and_nullifier computation\n let hashes = compute_note_hash_and_nullifier(\n packed_note_content,\n storage_slot,\n note_type_id,\n contract_address,\n candidate_nonce,\n )\n .expect(f\"Failed to compute a note hash for note type {note_type_id}\");\n\n let siloed_note_hash = compute_siloed_note_hash(contract_address, hashes.note_hash);\n let unique_note_hash = compute_unique_note_hash(candidate_nonce, siloed_note_hash);\n\n if unique_note_hash == expected_unique_note_hash {\n // Note that while we did check that the note hash is the preimage of the expected unique note hash, we\n // perform no validations on the nullifier - we fundamentally cannot, since only the application knows\n // how to compute nullifiers. We simply trust it to have provided the correct one: if it hasn't, then\n // PXE may fail to realize that a given note has been nullified already, and calls to the application\n // could result in invalid transactions (with duplicate nullifiers). This is not a concern because an\n // application already has more direct means of making a call to it fail the transaction.\n discovered_notes.push(\n DiscoveredNoteInfo {\n nonce: candidate_nonce,\n note_hash: hashes.note_hash,\n inner_nullifier: hashes.inner_nullifier,\n },\n );\n\n // We don't exit the loop - it is possible (though rare) for the exact same note content to be present\n // multiple times in the same transaction with different nonces. This typically doesn't happen due to\n // notes containing random values in order to hide their contents.\n }\n },\n );\n\n debug_log_format(\n \"Discovered a total of {0} notes\",\n [discovered_notes.len() as Field],\n );\n\n *discovered_notes\n}\n"
3913
+ "source": "use crate::{\n discovery::{ComputeNoteHashAndNullifier, private_notes::MAX_NOTE_PACKED_LEN},\n utils::array,\n};\n\nuse dep::protocol_types::{\n address::AztecAddress,\n constants::MAX_NOTE_HASHES_PER_TX,\n debug_log::debug_log_format,\n hash::{compute_note_hash_nonce, compute_siloed_note_hash, compute_unique_note_hash},\n traits::ToField,\n};\n\n/// A struct with the discovered information of a complete note, required for delivery to PXE. Note that this is *not*\n/// the complete note information, since it does not include content, storage slot, etc.\npub struct DiscoveredNoteInfo {\n pub nonce: Field,\n pub note_hash: Field,\n pub inner_nullifier: Field,\n}\n\n/// Searches for note nonces that will result in a note that was emitted in a transaction. While rare, it is possible\n/// for multiple notes to have the exact same packed content and storage slot but different nonces, resulting in\n/// different unique note hashes. Because of this this function returns a *vector* of discovered notes, though in most\n/// cases it will contain a single element.\n///\n/// Due to how nonces are computed, this function requires knowledge of the transaction in which the note was created,\n/// more specifically the list of all unique note hashes in it plus the value of its first nullifier.\npub unconstrained fn attempt_note_nonce_discovery<Env>(\n unique_note_hashes_in_tx: BoundedVec<Field, MAX_NOTE_HASHES_PER_TX>,\n first_nullifier_in_tx: Field,\n compute_note_hash_and_nullifier: ComputeNoteHashAndNullifier<Env>,\n contract_address: AztecAddress,\n storage_slot: Field,\n note_type_id: Field,\n packed_note: BoundedVec<Field, MAX_NOTE_PACKED_LEN>,\n) -> BoundedVec<DiscoveredNoteInfo, MAX_NOTE_HASHES_PER_TX> {\n let discovered_notes = &mut BoundedVec::new();\n\n debug_log_format(\n \"Attempting nonce discovery on {0} potential notes on contract {1} for storage slot {2}\",\n [unique_note_hashes_in_tx.len() as Field, contract_address.to_field(), storage_slot],\n );\n\n // We need to find nonces (typically just one) that result in a note hash that, once siloed into a unique note hash,\n // is one of the note hashes created by the transaction.\n array::for_each_in_bounded_vec(\n unique_note_hashes_in_tx,\n |expected_unique_note_hash, i| {\n // Nonces are computed by hashing the first nullifier in the transaction with the index of the note in the\n // new note hashes array. We therefore know for each note in every transaction what its nonce is.\n let candidate_nonce = compute_note_hash_nonce(first_nullifier_in_tx, i);\n\n // Given nonce, note content and metadata, we can compute the note hash and silo it to check if it matches\n // the note hash at the array index we're currently processing.\n // TODO(#11157): handle failed note_hash_and_nullifier computation\n let hashes = compute_note_hash_and_nullifier(\n packed_note,\n storage_slot,\n note_type_id,\n contract_address,\n candidate_nonce,\n )\n .expect(f\"Failed to compute a note hash for note type {note_type_id}\");\n\n let siloed_note_hash = compute_siloed_note_hash(contract_address, hashes.note_hash);\n let unique_note_hash = compute_unique_note_hash(candidate_nonce, siloed_note_hash);\n\n if unique_note_hash == expected_unique_note_hash {\n // Note that while we did check that the note hash is the preimage of the expected unique note hash, we\n // perform no validations on the nullifier - we fundamentally cannot, since only the application knows\n // how to compute nullifiers. We simply trust it to have provided the correct one: if it hasn't, then\n // PXE may fail to realize that a given note has been nullified already, and calls to the application\n // could result in invalid transactions (with duplicate nullifiers). This is not a concern because an\n // application already has more direct means of making a call to it fail the transaction.\n discovered_notes.push(\n DiscoveredNoteInfo {\n nonce: candidate_nonce,\n note_hash: hashes.note_hash,\n inner_nullifier: hashes.inner_nullifier,\n },\n );\n\n // We don't exit the loop - it is possible (though rare) for the exact same note content to be present\n // multiple times in the same transaction with different nonces. This typically doesn't happen due to\n // notes containing random values in order to hide their contents.\n }\n },\n );\n\n debug_log_format(\n \"Discovered a total of {0} notes\",\n [discovered_notes.len() as Field],\n );\n\n *discovered_notes\n}\n"
3914
3914
  },
3915
3915
  "72": {
3916
3916
  "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/discovery/partial_notes.nr",
3917
- "source": "use crate::{\n capsules::CapsuleArray,\n discovery::{\n ComputeNoteHashAndNullifier,\n nonce_discovery::{attempt_note_nonce_discovery, DiscoveredNoteInfo},\n private_logs::MAX_PARTIAL_NOTE_PRIVATE_PACKED_LEN,\n },\n oracle::note_discovery::{deliver_note, get_log_by_tag},\n utils::array,\n};\n\nuse dep::protocol_types::{\n address::AztecAddress,\n constants::PUBLIC_LOG_DATA_SIZE_IN_FIELDS,\n debug_log::debug_log_format,\n traits::{Deserialize, Serialize, ToField},\n};\n\n/// The slot in the PXE capsules where we store a `CapsuleArray` of `DeliveredPendingPartialNote`.\n// TODO(#11630): come up with some sort of slot allocation scheme.\npub global DELIVERED_PENDING_PARTIAL_NOTE_ARRAY_LENGTH_CAPSULES_SLOT: Field = 77;\n\n/// Public logs contain an extra field at the beginning with the address of the contract that emitted them, and partial\n/// notes emit their completion tag in the log, resulting in the first two fields in the public log not being part of\n/// the packed public content.\n// TODO(#10273): improve how contract log siloing is handled\npub global NON_PACKED_CONTENT_FIELDS_IN_PUBLIC_LOG: u32 = 2;\n\n/// The maximum length of the packed representation of public fields in a partial note. This is limited by public log\n/// size and extra fields in the log (e.g. the tag).\npub global MAX_PUBLIC_PARTIAL_NOTE_PACKED_CONTENT_LENGTH: u32 =\n PUBLIC_LOG_DATA_SIZE_IN_FIELDS - NON_PACKED_CONTENT_FIELDS_IN_PUBLIC_LOG;\n\n/// A partial note that was delivered but is still pending completion. Contains the information necessary to find the\n/// log that will complete it and lead to a note being discovered and delivered.\n#[derive(Serialize, Deserialize)]\npub(crate) struct DeliveredPendingPartialNote {\n pub(crate) note_completion_log_tag: Field,\n pub(crate) storage_slot: Field,\n pub(crate) note_type_id: Field,\n pub(crate) packed_private_note_content: BoundedVec<Field, MAX_PARTIAL_NOTE_PRIVATE_PACKED_LEN>,\n pub(crate) recipient: AztecAddress,\n}\n\n/// Searches for public logs that would result in the completion of pending partial notes, ultimately resulting in the\n/// notes being delivered to PXE if completed.\npub unconstrained fn fetch_and_process_public_partial_note_completion_logs<Env>(\n contract_address: AztecAddress,\n compute_note_hash_and_nullifier: ComputeNoteHashAndNullifier<Env>,\n) {\n let pending_partial_notes = CapsuleArray::at(\n contract_address,\n DELIVERED_PENDING_PARTIAL_NOTE_ARRAY_LENGTH_CAPSULES_SLOT,\n );\n\n debug_log_format(\n \"{} pending partial notes\",\n [pending_partial_notes.len() as Field],\n );\n\n let mut i = &mut 0;\n whyle(\n || *i < pending_partial_notes.len(),\n || {\n let pending_partial_note: DeliveredPendingPartialNote = pending_partial_notes.get(*i);\n\n let maybe_log = get_log_by_tag(pending_partial_note.note_completion_log_tag);\n if maybe_log.is_none() {\n debug_log_format(\n \"Found no completion logs for partial note with tag {}\",\n [pending_partial_note.note_completion_log_tag],\n );\n *i += 1 as u32;\n // Note that we're not removing the pending partial note from the PXE DB, so we will continue searching\n // for this tagged log when performing note discovery in the future until we either find it or the entry\n // is somehow removed from the PXE DB.\n } else {\n debug_log_format(\n \"Completion log found for partial note with tag {}\",\n [pending_partial_note.note_completion_log_tag],\n );\n let log = maybe_log.unwrap();\n\n // Public logs have an extra field at the beginning with the contract address, which we use to verify\n // that we're getting the logs from the expected contract.\n // TODO(#10273): improve how contract log siloing is handled\n assert_eq(\n log.log_content.get(0),\n contract_address.to_field(),\n \"Got a public log emitted by a different contract\",\n );\n\n // Public fields are assumed to all be placed at the end of the packed representation, so we combine the\n // private and public packed fields (i.e. the contents of the log sans the extra fields) to get the\n // complete packed content.\n let packed_public_note_content: BoundedVec<_, MAX_PUBLIC_PARTIAL_NOTE_PACKED_CONTENT_LENGTH> =\n array::subbvec(log.log_content, NON_PACKED_CONTENT_FIELDS_IN_PUBLIC_LOG);\n let complete_packed_note_content = array::append(\n pending_partial_note.packed_private_note_content,\n packed_public_note_content,\n );\n\n let discovered_notes = attempt_note_nonce_discovery(\n log.unique_note_hashes_in_tx,\n log.first_nullifier_in_tx,\n compute_note_hash_and_nullifier,\n contract_address,\n pending_partial_note.storage_slot,\n pending_partial_note.note_type_id,\n complete_packed_note_content,\n );\n\n debug_log_format(\n \"Discovered {0} notes for partial note with tag {1}\",\n [discovered_notes.len() as Field, pending_partial_note.note_completion_log_tag],\n );\n\n array::for_each_in_bounded_vec(\n discovered_notes,\n |discovered_note: DiscoveredNoteInfo, _| {\n // TODO:(#10728): decide how to handle notes that fail delivery. This could be due to e.g. a\n // temporary node connectivity issue - is simply throwing good enough here?\n assert(\n deliver_note(\n contract_address,\n pending_partial_note.storage_slot,\n discovered_note.nonce,\n complete_packed_note_content,\n discovered_note.note_hash,\n discovered_note.inner_nullifier,\n log.tx_hash,\n pending_partial_note.recipient,\n ),\n \"Failed to deliver note\",\n );\n },\n );\n\n // Because there is only a single log for a given tag, once we've processed the tagged log then we\n // simply delete the pending work entry, regardless of whether it was actually completed or not.\n // TODO(#11627): only remove the pending entry if we actually process a log that results in the note\n // being completed.\n pending_partial_notes.remove(*i);\n\n // We don't increment `i` here, because CapsuleArray is contiguous and its `remove(...)` function\n // shifts the elements to the left if the removed element is not the last element.\n }\n },\n );\n}\n\n/// Custom version of a while loop, calls `body` repeatedly until `condition` returns false. To be removed once Noir\n/// supports looping in unconstrained code.\nfn whyle<Env, Env2>(condition: fn[Env]() -> bool, body: fn[Env2]() -> ()) {\n if condition() {\n body();\n whyle(condition, body);\n }\n}\n"
3917
+ "source": "use crate::{\n capsules::CapsuleArray,\n discovery::{\n ComputeNoteHashAndNullifier,\n MAX_LOG_CONTENT_LEN,\n nonce_discovery::{attempt_note_nonce_discovery, DiscoveredNoteInfo},\n },\n oracle::message_discovery::{deliver_note, get_log_by_tag},\n utils::array,\n};\n\nuse dep::protocol_types::{\n address::AztecAddress,\n constants::PUBLIC_LOG_DATA_SIZE_IN_FIELDS,\n debug_log::debug_log_format,\n traits::{Deserialize, Serialize, ToField},\n};\n\nglobal PARTIAL_NOTE_PRIVATE_LOG_CONTENT_NON_NOTE_FIELDS_LEN: u32 = 2;\n\n/// Partial notes have a maximum packed length of their private fields bound by extra content in their private log (e.g.\n/// the storage slot, note completion log tag, etc.).\npub global MAX_PARTIAL_NOTE_PRIVATE_PACKED_LEN: u32 =\n MAX_LOG_CONTENT_LEN - PARTIAL_NOTE_PRIVATE_LOG_CONTENT_NON_NOTE_FIELDS_LEN;\n\n/// The slot in the PXE capsules where we store a `CapsuleArray` of `DeliveredPendingPartialNote`.\n// TODO(#11630): come up with some sort of slot allocation scheme.\npub global DELIVERED_PENDING_PARTIAL_NOTE_ARRAY_LENGTH_CAPSULES_SLOT: Field = 77;\n\n/// Public logs contain an extra field at the beginning with the address of the contract that emitted them, and partial\n/// notes emit their completion tag in the log, resulting in the first two fields in the public log not being part of\n/// the packed public content.\n// TODO(#10273): improve how contract log siloing is handled\npub global NON_PACKED_CONTENT_FIELDS_IN_PUBLIC_LOG: u32 = 2;\n\n/// The maximum length of the packed representation of public fields in a partial note. This is limited by public log\n/// size and extra fields in the log (e.g. the tag).\npub global MAX_PUBLIC_PARTIAL_NOTE_PACKED_CONTENT_LENGTH: u32 =\n PUBLIC_LOG_DATA_SIZE_IN_FIELDS - NON_PACKED_CONTENT_FIELDS_IN_PUBLIC_LOG;\n\n/// A partial note that was delivered but is still pending completion. Contains the information necessary to find the\n/// log that will complete it and lead to a note being discovered and delivered.\n#[derive(Serialize, Deserialize)]\npub(crate) struct DeliveredPendingPartialNote {\n pub(crate) note_completion_log_tag: Field,\n pub(crate) storage_slot: Field,\n pub(crate) note_type_id: Field,\n pub(crate) packed_private_note_content: BoundedVec<Field, MAX_PARTIAL_NOTE_PRIVATE_PACKED_LEN>,\n pub(crate) recipient: AztecAddress,\n}\n\npub unconstrained fn process_partial_note_private_log(\n contract_address: AztecAddress,\n recipient: AztecAddress,\n log_metadata: u64,\n log_content: BoundedVec<Field, MAX_LOG_CONTENT_LEN>,\n) {\n let (note_type_id, storage_slot, note_completion_log_tag, packed_private_note_content) =\n decode_partial_note_private_log(log_metadata, log_content);\n\n // We store the information of the partial note we found in a persistent capsule in PXE, so that we can later search\n // for the public log that will complete it.\n let pending = DeliveredPendingPartialNote {\n note_completion_log_tag,\n storage_slot,\n note_type_id,\n packed_private_note_content,\n recipient,\n };\n\n CapsuleArray::at(\n contract_address,\n DELIVERED_PENDING_PARTIAL_NOTE_ARRAY_LENGTH_CAPSULES_SLOT,\n )\n .push(pending);\n}\n\n/// Searches for public logs that would result in the completion of pending partial notes, ultimately resulting in the\n/// notes being delivered to PXE if completed.\npub unconstrained fn fetch_and_process_public_partial_note_completion_logs<Env>(\n contract_address: AztecAddress,\n compute_note_hash_and_nullifier: ComputeNoteHashAndNullifier<Env>,\n) {\n let pending_partial_notes = CapsuleArray::at(\n contract_address,\n DELIVERED_PENDING_PARTIAL_NOTE_ARRAY_LENGTH_CAPSULES_SLOT,\n );\n\n debug_log_format(\n \"{} pending partial notes\",\n [pending_partial_notes.len() as Field],\n );\n\n let mut i = 0;\n while i < pending_partial_notes.len() {\n let pending_partial_note: DeliveredPendingPartialNote = pending_partial_notes.get(i);\n\n let maybe_log = get_log_by_tag(pending_partial_note.note_completion_log_tag);\n if maybe_log.is_none() {\n debug_log_format(\n \"Found no completion logs for partial note with tag {}\",\n [pending_partial_note.note_completion_log_tag],\n );\n i += 1 as u32;\n // Note that we're not removing the pending partial note from the PXE DB, so we will continue searching\n // for this tagged log when performing message discovery in the future until we either find it or the\n // entry is somehow removed from the PXE DB.\n } else {\n debug_log_format(\n \"Completion log found for partial note with tag {}\",\n [pending_partial_note.note_completion_log_tag],\n );\n let log = maybe_log.unwrap();\n\n // Public logs have an extra field at the beginning with the contract address, which we use to verify\n // that we're getting the logs from the expected contract.\n // TODO(#10273): improve how contract log siloing is handled\n assert_eq(\n log.log_content.get(0),\n contract_address.to_field(),\n \"Got a public log emitted by a different contract\",\n );\n\n // Public fields are assumed to all be placed at the end of the packed representation, so we combine the\n // private and public packed fields (i.e. the contents of the log sans the extra fields) to get the\n // complete packed content.\n let packed_public_note_content: BoundedVec<_, MAX_PUBLIC_PARTIAL_NOTE_PACKED_CONTENT_LENGTH> =\n array::subbvec(log.log_content, NON_PACKED_CONTENT_FIELDS_IN_PUBLIC_LOG);\n let complete_packed_note = array::append(\n pending_partial_note.packed_private_note_content,\n packed_public_note_content,\n );\n\n let discovered_notes = attempt_note_nonce_discovery(\n log.unique_note_hashes_in_tx,\n log.first_nullifier_in_tx,\n compute_note_hash_and_nullifier,\n contract_address,\n pending_partial_note.storage_slot,\n pending_partial_note.note_type_id,\n complete_packed_note,\n );\n\n debug_log_format(\n \"Discovered {0} notes for partial note with tag {1}\",\n [discovered_notes.len() as Field, pending_partial_note.note_completion_log_tag],\n );\n\n array::for_each_in_bounded_vec(\n discovered_notes,\n |discovered_note: DiscoveredNoteInfo, _| {\n // TODO:(#10728): decide how to handle notes that fail delivery. This could be due to e.g. a\n // temporary node connectivity issue - is simply throwing good enough here?\n assert(\n deliver_note(\n contract_address,\n pending_partial_note.storage_slot,\n discovered_note.nonce,\n complete_packed_note,\n discovered_note.note_hash,\n discovered_note.inner_nullifier,\n log.tx_hash,\n pending_partial_note.recipient,\n ),\n \"Failed to deliver note\",\n );\n },\n );\n\n // Because there is only a single log for a given tag, once we've processed the tagged log then we\n // simply delete the pending work entry, regardless of whether it was actually completed or not.\n // TODO(#11627): only remove the pending entry if we actually process a log that results in the note\n // being completed.\n pending_partial_notes.remove(i);\n\n // We don't increment `i` here, because CapsuleArray is contiguous and its `remove(...)` function\n // shifts the elements to the left if the removed element is not the last element.\n }\n }\n}\n\nfn decode_partial_note_private_log(\n log_metadata: u64,\n log_content: BoundedVec<Field, MAX_LOG_CONTENT_LEN>,\n) -> (Field, Field, Field, BoundedVec<Field, MAX_PARTIAL_NOTE_PRIVATE_PACKED_LEN>) {\n let note_type_id = log_metadata as Field; // TODO: make note type id not be a full field\n\n assert(\n log_content.len() > PARTIAL_NOTE_PRIVATE_LOG_CONTENT_NON_NOTE_FIELDS_LEN,\n f\"Invalid private note log: all partial note private logs must have at least {PARTIAL_NOTE_PRIVATE_LOG_CONTENT_NON_NOTE_FIELDS_LEN} fields\",\n );\n\n // If PARTIAL_NOTE_PRIVATE_LOG_CONTENT_NON_NOTE_FIELDS_LEN is changed, causing the assertion below to fail, then the\n // destructuring of the partial note private log encoding below must be updated as well.\n std::static_assert(\n PARTIAL_NOTE_PRIVATE_LOG_CONTENT_NON_NOTE_FIELDS_LEN == 2,\n \"unexpected value for PARTIAL_NOTE_PRIVATE_LOG_CONTENT_NON_NOTE_FIELDS_LEN\",\n );\n\n // We currently have two fields that are not the partial note's packed representation, which are the storage slot\n // and the note completion log tag.\n let storage_slot = log_content.get(0);\n let note_completion_log_tag = log_content.get(1);\n\n let packed_private_note_content = array::subbvec(log_content, 2);\n\n (note_type_id, storage_slot, note_completion_log_tag, packed_private_note_content)\n}\n"
3918
3918
  },
3919
3919
  "73": {
3920
3920
  "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/discovery/private_logs.nr",
3921
- "source": "use std::static_assert;\n\nuse crate::{\n capsules::CapsuleArray,\n oracle::note_discovery::{deliver_note, sync_notes},\n utils::array,\n};\n\nuse dep::protocol_types::{\n address::AztecAddress,\n constants::{MAX_NOTE_HASHES_PER_TX, PRIVATE_LOG_SIZE_IN_FIELDS},\n debug_log::{debug_log, debug_log_format},\n};\n\nuse crate::discovery::{\n ComputeNoteHashAndNullifier,\n MAX_NOTE_PACKED_LEN,\n nonce_discovery::{attempt_note_nonce_discovery, DiscoveredNoteInfo},\n NOTE_PRIVATE_LOG_RESERVED_FIELDS,\n partial_notes::{\n DELIVERED_PENDING_PARTIAL_NOTE_ARRAY_LENGTH_CAPSULES_SLOT, DeliveredPendingPartialNote,\n },\n};\nuse crate::encrypted_logs::log_assembly_strategies::default_aes128::note::encryption::decrypt_log;\n// TODO(#12750): don't make this value assume we're using AES.\nuse crate::encrypted_logs::log_assembly_strategies::default_aes128::note::encryption::PRIVATE_LOG_PLAINTEXT_SIZE_IN_FIELDS;\n\npub global PARTIAL_NOTE_COMPLETION_LOG_TAG_LEN: u32 = 1;\n/// Partial notes have a maximum packed length of their private fields bound by extra content in their private log (i.e.\n/// the note completion log tag).\npub global MAX_PARTIAL_NOTE_PRIVATE_PACKED_LEN: u32 =\n MAX_NOTE_PACKED_LEN - PARTIAL_NOTE_COMPLETION_LOG_TAG_LEN;\n\n/// Searches for private logs that signal new private notes that are then delivered to PXE, or new partial notes that\n/// are stored in the PXE capsules so that `fetch_and_process_public_partial_note_completion_logs` can later search for\n/// public logs that will complete them.\npub unconstrained fn fetch_and_process_private_tagged_logs<Env>(\n _contract_address: AztecAddress,\n _compute_note_hash_and_nullifier: ComputeNoteHashAndNullifier<Env>,\n) {\n // We will eventually fetch tagged logs, decrypt and process them here, but for now we simply call the `syncNotes`\n // oracle. This has PXE perform tag synchronization, log download, decryption, and finally calls to the the\n // `process_log` contract function with the decrypted payload, which will in turn call `do_process_log` with a\n // decrypted log, letting us continue the work outside of PXE.\n sync_notes();\n}\n\n/// Processes a log's ciphertext by decrypting it and then searching the plaintext for private notes or partial notes. Private\n/// notes result in nonce discovery being performed prior to delivery, which requires knowledge of the transaction hash in\n/// which the notes would've been created (typically the same transaction in which the log was emitted), along with the\n/// list of unique note hashes in said transaction and the `compute_note_hash_and_nullifier` function.\npub unconstrained fn do_process_log<Env>(\n contract_address: AztecAddress,\n log: BoundedVec<Field, PRIVATE_LOG_SIZE_IN_FIELDS>,\n tx_hash: Field,\n unique_note_hashes_in_tx: BoundedVec<Field, MAX_NOTE_HASHES_PER_TX>,\n first_nullifier_in_tx: Field,\n recipient: AztecAddress,\n compute_note_hash_and_nullifier: ComputeNoteHashAndNullifier<Env>,\n) {\n let log_plaintext = decrypt_log(log, recipient);\n\n // The first thing to do after decrypting the log is to determine what type of private log we're processing. We\n // currently just have two log types: 0 for private notes and 1 for partial notes. This will likely be expanded and\n // improved upon in the future to also handle events, etc.\n\n let (storage_slot, note_type_id, log_type_id, log_payload) =\n destructure_log_plaintext(log_plaintext);\n\n if log_type_id == 0 {\n debug_log(\"Processing private note log\");\n\n attempt_note_discovery(\n contract_address,\n tx_hash,\n unique_note_hashes_in_tx,\n first_nullifier_in_tx,\n recipient,\n compute_note_hash_and_nullifier,\n storage_slot,\n note_type_id,\n log_payload,\n );\n } else if log_type_id == 1 {\n debug_log(\"Processing partial note private log\");\n\n process_partial_note_private_log(\n contract_address,\n storage_slot,\n note_type_id,\n log_payload,\n recipient,\n );\n } else {\n // TODO(#11569): handle events\n debug_log_format(\n \"Unknown log type id {0} (probably belonging to an event log)\",\n [log_type_id],\n );\n }\n}\n\nunconstrained fn destructure_log_plaintext(\n log_plaintext: BoundedVec<Field, PRIVATE_LOG_PLAINTEXT_SIZE_IN_FIELDS>,\n) -> (Field, Field, Field, BoundedVec<Field, MAX_NOTE_PACKED_LEN>) {\n assert(log_plaintext.len() >= NOTE_PRIVATE_LOG_RESERVED_FIELDS);\n\n // If NOTE_PRIVATE_LOG_RESERVED_FIELDS is changed, causing the assertion below to fail, then the declarations for\n // `storage_slot` and `note_type_id` must be updated as well.\n static_assert(\n NOTE_PRIVATE_LOG_RESERVED_FIELDS == 2,\n \"unexpected value for NOTE_PRIVATE_LOG_RESERVED_FIELDS\",\n );\n let storage_slot = log_plaintext.get(0);\n\n // We currently identify log types by packing the log type ID and note type ID into a single field, called the\n // combined type ID. We can do this because the note type ID is only 7 bits long, and so use an 8th bit to\n // distinguish private note logs and partial note logs.\n // This abuses the fact that the encoding of both of these logs is extremely similar, and will need improving and\n // more formalization once we introduce other dissimilar log types, such as events. Ideally we'd be able to\n // leverage enums and tagged unions to achieve this goal.\n let combined_type_id = log_plaintext.get(1);\n let note_type_id = ((combined_type_id as u64) % 128) as Field;\n let log_type_id = ((combined_type_id as u64) / 128) as Field;\n\n let log_payload = array::subbvec(log_plaintext, NOTE_PRIVATE_LOG_RESERVED_FIELDS);\n\n (storage_slot, note_type_id, log_type_id, log_payload)\n}\n\n/// Attempts discovery of a note given information about its contents and the transaction in which it is\n/// suspected the note was created.\npub unconstrained fn attempt_note_discovery<Env>(\n contract_address: AztecAddress,\n tx_hash: Field,\n unique_note_hashes_in_tx: BoundedVec<Field, MAX_NOTE_HASHES_PER_TX>,\n first_nullifier_in_tx: Field,\n recipient: AztecAddress,\n compute_note_hash_and_nullifier: ComputeNoteHashAndNullifier<Env>,\n storage_slot: Field,\n note_type_id: Field,\n packed_note_content: BoundedVec<Field, MAX_NOTE_PACKED_LEN>,\n) {\n let discovered_notes = attempt_note_nonce_discovery(\n unique_note_hashes_in_tx,\n first_nullifier_in_tx,\n compute_note_hash_and_nullifier,\n contract_address,\n storage_slot,\n note_type_id,\n packed_note_content,\n );\n\n debug_log_format(\n \"Discovered {0} notes from a private log\",\n [discovered_notes.len() as Field],\n );\n\n array::for_each_in_bounded_vec(\n discovered_notes,\n |discovered_note: DiscoveredNoteInfo, _| {\n // TODO:(#10728): handle notes that fail delivery. This could be due to e.g. a temporary node connectivity\n // issue, and we should perhaps not have marked the tag index as taken.\n assert(\n deliver_note(\n contract_address,\n storage_slot,\n discovered_note.nonce,\n packed_note_content,\n discovered_note.note_hash,\n discovered_note.inner_nullifier,\n tx_hash,\n recipient,\n ),\n \"Failed to deliver note\",\n );\n },\n );\n}\n\nunconstrained fn process_partial_note_private_log(\n contract_address: AztecAddress,\n storage_slot: Field,\n note_type_id: Field,\n log_payload: BoundedVec<Field, MAX_NOTE_PACKED_LEN>,\n recipient: AztecAddress,\n) {\n // We store the information of the partial note we found so that we can later search for the public log that will\n // complete it. The tag is the first value in the payload, with the packed note content taking up the rest of it.\n static_assert(\n PARTIAL_NOTE_COMPLETION_LOG_TAG_LEN == 1,\n \"unexpected value for PARTIAL_NOTE_COMPLETION_LOG_TAG_LEN\",\n );\n\n let pending = DeliveredPendingPartialNote {\n note_completion_log_tag: log_payload.get(0),\n storage_slot,\n note_type_id,\n packed_private_note_content: array::subbvec(log_payload, 1),\n recipient,\n };\n\n CapsuleArray::at(\n contract_address,\n DELIVERED_PENDING_PARTIAL_NOTE_ARRAY_LENGTH_CAPSULES_SLOT,\n )\n .push(pending);\n}\n"
3921
+ "source": "use crate::{oracle::message_discovery::sync_notes, utils::array};\n\nuse dep::protocol_types::{\n address::AztecAddress,\n constants::{MAX_NOTE_HASHES_PER_TX, PRIVATE_LOG_SIZE_IN_FIELDS},\n debug_log::{debug_log, debug_log_format},\n};\n\nuse crate::discovery::{\n ComputeNoteHashAndNullifier, MAX_LOG_CONTENT_LEN,\n partial_notes::process_partial_note_private_log, PRIVATE_LOG_EXPANDED_METADATA_LEN,\n private_notes::process_private_note_log,\n};\nuse crate::encrypted_logs::log_assembly_strategies::default_aes128::note::encryption::decrypt_log;\n// TODO(#12750): don't make this value assume we're using AES.\nuse crate::encrypted_logs::log_assembly_strategies::default_aes128::note::encryption::PRIVATE_LOG_PLAINTEXT_SIZE_IN_FIELDS;\n\n/// Searches for private logs that signal new private notes that are then delivered to PXE, or new partial notes that\n/// are stored in the PXE capsules so that `fetch_and_process_public_partial_note_completion_logs` can later search for\n/// public logs that will complete them.\npub unconstrained fn fetch_and_process_private_tagged_logs<Env>(\n _contract_address: AztecAddress,\n _compute_note_hash_and_nullifier: ComputeNoteHashAndNullifier<Env>,\n) {\n // We will eventually fetch tagged logs, decrypt and process them here, but for now we simply call the `syncNotes`\n // oracle. This has PXE perform tag synchronization, log download, decryption, and finally calls to the the\n // `process_log` contract function with the decrypted payload, which will in turn call `do_process_log` with a\n // decrypted log, letting us continue the work outside of PXE.\n sync_notes();\n}\n\n/// Processes a log's ciphertext by decrypting it and then searching the plaintext for private notes or partial notes.\n///\n/// Private notes result in nonce discovery being performed prior to delivery, which requires knowledge of the\n/// transaction hash in which the notes would've been created (typically the same transaction in which the log was\n/// emitted), along with the list of unique note hashes in said transaction and the `compute_note_hash_and_nullifier`\n/// function.\n///\n/// Partial notes result in a pending partial note entry being stored in a PXE capsule, which will later be retrieved to\n/// search for the note's completion public log.\npub unconstrained fn do_process_log<Env>(\n contract_address: AztecAddress,\n log: BoundedVec<Field, PRIVATE_LOG_SIZE_IN_FIELDS>,\n tx_hash: Field,\n unique_note_hashes_in_tx: BoundedVec<Field, MAX_NOTE_HASHES_PER_TX>,\n first_nullifier_in_tx: Field,\n recipient: AztecAddress,\n compute_note_hash_and_nullifier: ComputeNoteHashAndNullifier<Env>,\n) {\n debug_log_format(\"Processing log with tag {0}\", [log.get(0)]);\n\n let log_plaintext = decrypt_log(log, recipient);\n\n // The first thing to do after decrypting the log is to determine what type of private log we're processing. We\n // currently just have two log types: 0 for private notes and 1 for partial notes. This will likely be expanded and\n // improved upon in the future to also handle events, etc.\n\n let (log_type_id, log_metadata, log_content) = decode_log_plaintext(log_plaintext);\n\n if log_type_id == 0 {\n debug_log(\"Processing private note log\");\n\n process_private_note_log(\n contract_address,\n tx_hash,\n unique_note_hashes_in_tx,\n first_nullifier_in_tx,\n recipient,\n compute_note_hash_and_nullifier,\n log_metadata,\n log_content,\n );\n } else if log_type_id == 1 {\n debug_log(\"Processing partial note private log\");\n\n process_partial_note_private_log(contract_address, recipient, log_metadata, log_content);\n } else {\n // TODO(#11569): handle events\n debug_log_format(\n \"Unknown log type id {0} (probably belonging to an event log)\",\n [log_type_id as Field],\n );\n }\n}\n\n/// Decodes a log's plaintext following aztec-nr's standard log encoding.\n///\n/// The standard private log layout is composed of:\n/// - an initial field called the 'expanded metadata'\n/// - an arbitrary number of fields following that called the 'log content'\n///\n/// ```\n/// log_plainext: [ log_expanded_metadata, ...log_content ]\n/// ```\n///\n/// The expanded metadata itself is (currently) interpreted as a u64, of which:\n/// - the upper 57 bits are the log type id\n/// - the remaining 7 bits are called the 'log metadata'\n///\n/// ```\n/// log_expanded_metadata: [ log_type_id | log_metadata ]\n/// <--- 57 bits --->|<--- 7 bits --->\n/// ```\n///\n/// The meaning of the log metadata and log content depend on the value of the log type id. Note that there is\n/// nothing special about the log metadata, it _can_ be considered part of the content. It just has a different name\n/// to make it distinct from the log content given that it is not a full field.\nunconstrained fn decode_log_plaintext(\n log_plaintext: BoundedVec<Field, PRIVATE_LOG_PLAINTEXT_SIZE_IN_FIELDS>,\n) -> (u64, u64, BoundedVec<Field, MAX_LOG_CONTENT_LEN>) {\n assert(\n log_plaintext.len() >= PRIVATE_LOG_EXPANDED_METADATA_LEN,\n f\"Invalid log plaintext: all logs must be decrypted into at least {PRIVATE_LOG_EXPANDED_METADATA_LEN} fields\",\n );\n\n // If PRIVATE_LOG_EXPANDED_METADATA_LEN is changed, causing the assertion below to fail, then the destructuring of\n // the log encoding below must be updated as well.\n std::static_assert(\n PRIVATE_LOG_EXPANDED_METADATA_LEN == 1,\n \"unexpected value for PRIVATE_LOG_EXPANDED_METADATA_LEN\",\n );\n\n // See the documentation of this function for a description of the log layout\n let expanded_log_metadata = log_plaintext.get(0);\n\n let log_type_id = ((expanded_log_metadata as u64) / 128);\n let log_metadata = ((expanded_log_metadata as u64) % 128);\n\n let log_content = array::subbvec(log_plaintext, PRIVATE_LOG_EXPANDED_METADATA_LEN);\n\n (log_type_id, log_metadata, log_content)\n}\n"
3922
3922
  },
3923
- "87": {
3923
+ "88": {
3924
3924
  "path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/hash.nr",
3925
3925
  "source": "use dep::protocol_types::{\n address::{AztecAddress, EthAddress},\n constants::{\n GENERATOR_INDEX__FUNCTION_ARGS, GENERATOR_INDEX__MESSAGE_NULLIFIER,\n GENERATOR_INDEX__SECRET_HASH,\n },\n hash::{poseidon2_hash_with_separator, poseidon2_hash_with_separator_slice, sha256_to_field},\n point::Point,\n traits::{Hash, ToField},\n};\n\npub use dep::protocol_types::hash::{compute_siloed_nullifier, pedersen_hash};\n\npub fn pedersen_commitment<let N: u32>(inputs: [Field; N], hash_index: u32) -> Point {\n std::hash::pedersen_commitment_with_separator(inputs, hash_index)\n}\n\npub fn compute_secret_hash(secret: Field) -> Field {\n poseidon2_hash_with_separator([secret], GENERATOR_INDEX__SECRET_HASH)\n}\n\npub fn compute_l1_to_l2_message_hash(\n sender: EthAddress,\n chain_id: Field,\n recipient: AztecAddress,\n version: Field,\n content: Field,\n secret_hash: Field,\n leaf_index: Field,\n) -> Field {\n let mut hash_bytes = [0 as u8; 224];\n let sender_bytes: [u8; 32] = sender.to_field().to_be_bytes();\n let chain_id_bytes: [u8; 32] = chain_id.to_be_bytes();\n let recipient_bytes: [u8; 32] = recipient.to_field().to_be_bytes();\n let version_bytes: [u8; 32] = version.to_be_bytes();\n let content_bytes: [u8; 32] = content.to_be_bytes();\n let secret_hash_bytes: [u8; 32] = secret_hash.to_be_bytes();\n let leaf_index_bytes: [u8; 32] = leaf_index.to_be_bytes();\n\n for i in 0..32 {\n hash_bytes[i] = sender_bytes[i];\n hash_bytes[i + 32] = chain_id_bytes[i];\n hash_bytes[i + 64] = recipient_bytes[i];\n hash_bytes[i + 96] = version_bytes[i];\n hash_bytes[i + 128] = content_bytes[i];\n hash_bytes[i + 160] = secret_hash_bytes[i];\n hash_bytes[i + 192] = leaf_index_bytes[i];\n }\n\n sha256_to_field(hash_bytes)\n}\n\n// The nullifier of a l1 to l2 message is the hash of the message salted with the secret\npub fn compute_l1_to_l2_message_nullifier(message_hash: Field, secret: Field) -> Field {\n poseidon2_hash_with_separator([message_hash, secret], GENERATOR_INDEX__MESSAGE_NULLIFIER)\n}\n\npub struct ArgsHasher {\n pub fields: [Field],\n}\n\nimpl Hash for ArgsHasher {\n fn hash(self) -> Field {\n hash_args(self.fields)\n }\n}\n\nimpl ArgsHasher {\n pub fn new() -> Self {\n Self { fields: [] }\n }\n\n pub fn add(&mut self, field: Field) {\n self.fields = self.fields.push_back(field);\n }\n\n pub fn add_multiple<let N: u32>(&mut self, fields: [Field; N]) {\n for i in 0..N {\n self.fields = self.fields.push_back(fields[i]);\n }\n }\n}\n\npub fn hash_args_array<let N: u32>(args: [Field; N]) -> Field {\n if args.len() == 0 {\n 0\n } else {\n poseidon2_hash_with_separator(args, GENERATOR_INDEX__FUNCTION_ARGS)\n }\n}\n\npub fn hash_args(args: [Field]) -> Field {\n if args.len() == 0 {\n 0\n } else {\n poseidon2_hash_with_separator_slice(args, GENERATOR_INDEX__FUNCTION_ARGS)\n }\n}\n\n#[test]\nunconstrained fn compute_var_args_hash() {\n let mut input = ArgsHasher::new();\n for i in 0..100 {\n input.add(i as Field);\n }\n let hash = input.hash();\n dep::std::println(hash);\n assert(hash == 0x19b0d74feb06ebde19edd85a28986c97063e84b3b351a8b666c7cac963ce655f);\n}\n"
3926
3926
  }