@aztec/protocol-contracts 0.80.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.
- package/artifacts/AuthRegistry.json +877 -763
- package/artifacts/ContractClassRegisterer.json +1343 -1220
- package/artifacts/ContractInstanceDeployer.json +707 -593
- package/artifacts/FeeJuice.json +1056 -938
- package/artifacts/MultiCallEntrypoint.json +539 -383
- package/artifacts/Router.json +896 -766
- package/dest/protocol_contract_data.js +7 -7
- package/package.json +4 -4
- package/src/protocol_contract_data.ts +7 -7
|
@@ -4,19 +4,245 @@
|
|
|
4
4
|
"name": "AuthRegistry",
|
|
5
5
|
"functions": [
|
|
6
6
|
{
|
|
7
|
-
"name": "
|
|
7
|
+
"name": "_set_authorized",
|
|
8
|
+
"is_unconstrained": true,
|
|
9
|
+
"custom_attributes": [
|
|
10
|
+
"public",
|
|
11
|
+
"internal"
|
|
12
|
+
],
|
|
13
|
+
"abi": {
|
|
14
|
+
"parameters": [
|
|
15
|
+
{
|
|
16
|
+
"name": "approver",
|
|
17
|
+
"type": {
|
|
18
|
+
"kind": "struct",
|
|
19
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
20
|
+
"fields": [
|
|
21
|
+
{
|
|
22
|
+
"name": "inner",
|
|
23
|
+
"type": {
|
|
24
|
+
"kind": "field"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"visibility": "private"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "message_hash",
|
|
33
|
+
"type": {
|
|
34
|
+
"kind": "field"
|
|
35
|
+
},
|
|
36
|
+
"visibility": "private"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "authorize",
|
|
40
|
+
"type": {
|
|
41
|
+
"kind": "boolean"
|
|
42
|
+
},
|
|
43
|
+
"visibility": "private"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"return_type": null,
|
|
47
|
+
"error_types": {
|
|
48
|
+
"206160798890201757": {
|
|
49
|
+
"error_kind": "string",
|
|
50
|
+
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
51
|
+
},
|
|
52
|
+
"5019202896831570965": {
|
|
53
|
+
"error_kind": "string",
|
|
54
|
+
"string": "attempt to add with overflow"
|
|
55
|
+
},
|
|
56
|
+
"6304245522015439386": {
|
|
57
|
+
"error_kind": "string",
|
|
58
|
+
"string": "Function _set_authorized can only be called internally"
|
|
59
|
+
},
|
|
60
|
+
"16761564377371454734": {
|
|
61
|
+
"error_kind": "string",
|
|
62
|
+
"string": "Array index out of bounds"
|
|
63
|
+
},
|
|
64
|
+
"17843811134343075018": {
|
|
65
|
+
"error_kind": "string",
|
|
66
|
+
"string": "Stack too deep"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"bytecode": "JwACBAEoAAABBIBKJwAABAMnAgQEAycCBQQAHxgABQAEgEcdAIBJgEkBLgiARwABLgiASAACLgiASQADJQAAAFglAAAAdSgCAAEEgEonAgIEADsNAAEAAigAgEMEAAMoAIBEAQAAKACARQQAACgAgEYEAAEmJQAABOEeAgAFAR4CAAYACjgFBgckAgAHAAAAliUAAAUKJwIFAAItCAEGJwIHBAMAEAEHAScDBgQBACgGAgctDAcILQ4FCAAoCAIILQ4BCCcCAQAALQgBBScCBwQEABABBwEnAwUEAQAoBQIHLQwHCC0OAQgAKAgCCC0OAQgAKAgCCC0OAQgtDQUHACgHAgctDgcFKwIABwAAAAAAAAAAAgAAAAAAAAAALQgBCCcCCQQFABABCQEnAwgEAQAoCAIJLQwJCi0OAQoAKAoCCi0OAQoAKAoCCi0OAQoAKAoCCi0OBwotDQUJACgJAgktDgkFLQgBCQAAAQIBLQ4FCS0NCAUAKAUCBS0OBQgtCAEFAAABAgEtDggFLQgBCAAAAQIBLgqARQAILQgBCgAAAQIBLgqARAAKJwILBAIuCIBFAAQjAAABugw4BAsMJ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Fc3FMprLxyXP38Xz/SSBbfx6noYmX67h14LMM8iXj5m+XN5P4O/bhubyaxpI0A9J+uFjWhj9uiRbafh429AI+uFXds9r+HXPDY2gnyDoJ8TG9WE0fFyfv6YxXq5Jgn7S5flQ4Kuz85oiuBfK5eNBNFagyZdryAk0gn6s4Hzs5b4TnRFoLveDWCRZQiySLCHx1b5hwnSYPAWqVUWi4ldYtFT81W2q+AxymP1NqlzT4EfIfRY7qryp+wokUgWRqkhUkfeocHgjLARTq7JElUR98e+kNlVRouLzoaaqCFTZeInqxEympQoSlRX1ZU+cV5pePA6livLZWZEqSVQ+SFTBiFQiGiFLVFHEkM97yB1eFHeOalWUqE7UMloqL1JlierECNBSSWgUQyKVqC8yIpUXqSTky4lo7nyaVNHUqixR8T/y3FJ5I1JFiepE5tBSFYnqRA4wnzmUKMmISiKR6uK+vg2f/rl+3F7f7O6eBs3+yy/3t8/bh/vXj8//fh6/uXnc7nbbT+8/Pz7c3n348nj3fvdwu/9uY17/vBuKnFee4t6a/Ucb7JUNaf9xf0Ke0vBtGXodev4P",
|
|
72
|
+
"brillig_names": [
|
|
73
|
+
"_set_authorized"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "sync_notes",
|
|
8
78
|
"is_unconstrained": true,
|
|
9
79
|
"custom_attributes": [],
|
|
10
80
|
"abi": {
|
|
81
|
+
"parameters": [],
|
|
82
|
+
"return_type": null,
|
|
11
83
|
"error_types": {
|
|
84
|
+
"2920182694213909827": {
|
|
85
|
+
"error_kind": "string",
|
|
86
|
+
"string": "attempt to subtract with overflow"
|
|
87
|
+
},
|
|
88
|
+
"3305101268118424981": {
|
|
89
|
+
"error_kind": "string",
|
|
90
|
+
"string": "Attempted to delete past the length of a CapsuleArray"
|
|
91
|
+
},
|
|
92
|
+
"3367683922240523006": {
|
|
93
|
+
"error_kind": "fmtstring",
|
|
94
|
+
"length": 58,
|
|
95
|
+
"item_types": [
|
|
96
|
+
{
|
|
97
|
+
"kind": "field"
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
"5019202896831570965": {
|
|
102
|
+
"error_kind": "string",
|
|
103
|
+
"string": "attempt to add with overflow"
|
|
104
|
+
},
|
|
105
|
+
"5727012404371710682": {
|
|
106
|
+
"error_kind": "string",
|
|
107
|
+
"string": "push out of bounds"
|
|
108
|
+
},
|
|
109
|
+
"6753155520859132764": {
|
|
110
|
+
"error_kind": "string",
|
|
111
|
+
"string": "Failed to deliver note"
|
|
112
|
+
},
|
|
113
|
+
"8830323656616886390": {
|
|
114
|
+
"error_kind": "string",
|
|
115
|
+
"string": "Got a public log emitted by a different contract"
|
|
116
|
+
},
|
|
117
|
+
"13649294680379557736": {
|
|
118
|
+
"error_kind": "string",
|
|
119
|
+
"string": "extend_from_bounded_vec out of bounds"
|
|
120
|
+
},
|
|
121
|
+
"14657895983200220173": {
|
|
122
|
+
"error_kind": "string",
|
|
123
|
+
"string": "Attempted to read past the length of a CapsuleArray"
|
|
124
|
+
},
|
|
12
125
|
"16761564377371454734": {
|
|
13
126
|
"error_kind": "string",
|
|
14
127
|
"string": "Array index out of bounds"
|
|
15
128
|
},
|
|
129
|
+
"16775516380094354375": {
|
|
130
|
+
"error_kind": "fmtstring",
|
|
131
|
+
"length": 40,
|
|
132
|
+
"item_types": []
|
|
133
|
+
},
|
|
134
|
+
"16954218183513903507": {
|
|
135
|
+
"error_kind": "string",
|
|
136
|
+
"string": "Attempted to read past end of BoundedVec"
|
|
137
|
+
},
|
|
16
138
|
"17843811134343075018": {
|
|
17
139
|
"error_kind": "string",
|
|
18
140
|
"string": "Stack too deep"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"bytecode": "H4sIAAAAAAAA/+1dXYhcyXWunu6eme6Z1rT+tV7J6/WPdjde2/03f5Jszb9GWv2sd9eGQCD0dLcUO+uVWWkNBkMmJBDyYkhiHPKSvDgEB4c4TmJsMAkO+SEQ/BQ2GILJ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jM8vImfk3yAtp8tOnVu6PrH3KvvUp99an/Fuforc+Fd76VHzrU+mtT+W3PvUWN+Jb3IhvcSO+xY34Fjdi+Hy2WP5FvZipqy5u4TNvXPnLvwK+/jvLP6ZVPuPe+Ix/4zP0BgZvZOb0RmZO78Tnjcy8LMK+/syylln5zDIPwsTrktzzZ9wbn/FvfIbe+Ex44zPxjc+kNz5T48HSZ97gQXmDB8uvma18xr3xGf/GZ97IB+WNfFDeyAfljXxQ3sgH5fM88Ma88Rn7xmfcG5/5JA/+c/m3//3xt+8//vnnn/55+cT1P/7rl7/8/v3XX27/+vv//WP6L3/+7fvPP3//+5/+8duvf/npr//67ac//fzrX67/7Zu5/c9/O+/sD86Tu1jjh3836fLvNl3+fdjKfJF7zA+X/wnX/8MOJ2y+nHDmYsvFnv8H",
|
|
146
|
+
"brillig_names": [
|
|
147
|
+
"sync_notes"
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "public_dispatch",
|
|
152
|
+
"is_unconstrained": true,
|
|
153
|
+
"custom_attributes": [
|
|
154
|
+
"public"
|
|
155
|
+
],
|
|
156
|
+
"abi": {
|
|
157
|
+
"parameters": [
|
|
158
|
+
{
|
|
159
|
+
"name": "selector",
|
|
160
|
+
"type": {
|
|
161
|
+
"kind": "field"
|
|
162
|
+
},
|
|
163
|
+
"visibility": "private"
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
"return_type": null,
|
|
167
|
+
"error_types": {
|
|
168
|
+
"206160798890201757": {
|
|
169
|
+
"error_kind": "string",
|
|
170
|
+
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
171
|
+
},
|
|
172
|
+
"715723737710351018": {
|
|
173
|
+
"error_kind": "string",
|
|
174
|
+
"string": "rejecting all"
|
|
175
|
+
},
|
|
176
|
+
"2830029349304997821": {
|
|
177
|
+
"error_kind": "fmtstring",
|
|
178
|
+
"length": 27,
|
|
179
|
+
"item_types": [
|
|
180
|
+
{
|
|
181
|
+
"kind": "field"
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
"5019202896831570965": {
|
|
186
|
+
"error_kind": "string",
|
|
187
|
+
"string": "attempt to add with overflow"
|
|
188
|
+
},
|
|
189
|
+
"5444967152290923376": {
|
|
190
|
+
"error_kind": "string",
|
|
191
|
+
"string": "Function is_consumable can only be called statically"
|
|
19
192
|
},
|
|
193
|
+
"6304245522015439386": {
|
|
194
|
+
"error_kind": "string",
|
|
195
|
+
"string": "Function _set_authorized can only be called internally"
|
|
196
|
+
},
|
|
197
|
+
"9474245853673257536": {
|
|
198
|
+
"error_kind": "string",
|
|
199
|
+
"string": "Function is_reject_all can only be called statically"
|
|
200
|
+
},
|
|
201
|
+
"12737498021964987455": {
|
|
202
|
+
"error_kind": "string",
|
|
203
|
+
"string": "unauthorized"
|
|
204
|
+
},
|
|
205
|
+
"16761564377371454734": {
|
|
206
|
+
"error_kind": "string",
|
|
207
|
+
"string": "Array index out of bounds"
|
|
208
|
+
},
|
|
209
|
+
"17843811134343075018": {
|
|
210
|
+
"error_kind": "string",
|
|
211
|
+
"string": "Stack too deep"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"bytecode": "JwACBAEoAAABBIBRJwAABAMnAgIEAScCAwQAHxgAAwACgFAuCIBQAAElAAAARSUAAACxKAIAAQSAUScCAgQAOw0AAQACKQCAQwBH2s1zKACARAQAAygAgEUBAAAoAIBGBAAAKACARwAAACgAgEgBAAEoAIBJBAABKACASgQAAigAgEsAAAQoAIBMAAAOKACATQAAMygAgE4AADcrAIBPAAAAAAAAAAACAAAAAAAAAAAmJQAAFlEpAgACALg53pEKOAECAycCBAQAJwIGBAMAOAQGBS0IAQIAEAEFAScDAgQBACgCAgUtDgQFACgFAgUtDgQFJwIFBAMAOAIFBCcCBAACJAIAAwAAAQ8jAAADbi0IAQUnAgYEAwAQAQYBJwMFBAEAKAUCBh8kgEmASgAGLQ0FBgAoBgI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DmrjtEoLVTioegfaRLG4No5nn+MsDyVcoTYyarVQmYPa2EpuoQoHVVhqbGyN3kZtXTBroDYOk0S/omL01yhgoQoHtZGap4VCDmqjB2ihWGoklvKJx8VSHljKA0v5jdE8JlxR2V2jkIPaOB7UQhUOaiObegO1ETm0UMRAbZ2PvR05bB02baC8Y6FYXPWjlrguJSw7SleY+rJuSSfXLQDXGGBgyv2Y+ljSwOD9sT9tnXhsoTIHtXWWooFicQUWV2BxRRZXZHElVn0lFhew7AJgoQoHtXVBsIFitZT63P9mHxPrUWtxp1uPJVxjGP3SxrmzmzzJ3V+2VO/TG5jEwND9GoTIwDB46u32NiYx6jQxeIDBU2+vBU5+XfBqJpHq420Dw+CpL683MHQ/hhg8xOCpn/i9qJ8aBu+uU3CBgWHw+PvjIaiv8jQw97eFjXfkG5j7+wOo50hvYO6PCQEYPMCwJzN8JzPqB+/0g7+XP/3vd799/u77Lz/+viBe/vHPn3/44/MvP7//8Y//+/X0L9//9vnLl88/ffvrb7/88ON//vztx2+//PLDy799cu//+bdfNg+/8cvq/FKaF1fxL1tIy067W/78Os4tq8PLXyyzupe/eOlYl+lu/Gb5DyxlWcrz/w==",
|
|
217
|
+
"brillig_names": [
|
|
218
|
+
"public_dispatch"
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"name": "set_authorized",
|
|
223
|
+
"is_unconstrained": true,
|
|
224
|
+
"custom_attributes": [
|
|
225
|
+
"public"
|
|
226
|
+
],
|
|
227
|
+
"abi": {
|
|
228
|
+
"parameters": [
|
|
229
|
+
{
|
|
230
|
+
"name": "message_hash",
|
|
231
|
+
"type": {
|
|
232
|
+
"kind": "field"
|
|
233
|
+
},
|
|
234
|
+
"visibility": "private"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"name": "authorize",
|
|
238
|
+
"type": {
|
|
239
|
+
"kind": "boolean"
|
|
240
|
+
},
|
|
241
|
+
"visibility": "private"
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
"return_type": null,
|
|
245
|
+
"error_types": {
|
|
20
246
|
"206160798890201757": {
|
|
21
247
|
"error_kind": "string",
|
|
22
248
|
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
@@ -24,12 +250,34 @@
|
|
|
24
250
|
"5019202896831570965": {
|
|
25
251
|
"error_kind": "string",
|
|
26
252
|
"string": "attempt to add with overflow"
|
|
253
|
+
},
|
|
254
|
+
"16761564377371454734": {
|
|
255
|
+
"error_kind": "string",
|
|
256
|
+
"string": "Array index out of bounds"
|
|
257
|
+
},
|
|
258
|
+
"17843811134343075018": {
|
|
259
|
+
"error_kind": "string",
|
|
260
|
+
"string": "Stack too deep"
|
|
27
261
|
}
|
|
28
|
-
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"bytecode": "JwACBAEoAAABBIBJJwAABAMnAgMEAicCBAQAHxgABAADgEcdAIBIgEgBLgiARwABLgiASAACJQAAAFIlAAAAbygCAAEEgEknAgIEADsNAAEAAigAgEMEAAMoAIBEAQAAKACARQQAACgAgEYEAAEmJQAABMQeAgAEAScCBQACLQgBBicCBwQDABABBwEnAwYEAQAoBgIHLQwHCC0OBQgAKAgCCC0OBAgnAgQAAC0IAQUnAgcEBAAQAQcBJwMFBAEAKAUCBy0MBwgtDgQIACgIAggtDgQIACgIAggtDgQILQ0FBwAoBwIHLQ4HBSsCAAcAAAAAAAAAAAIAAAAAAAAAAC0IAQgnAgkEBQAQAQkBJwMIBAEAKAgCCS0MCQotDgQKACgKAgotDgQKACgKAgotDgQKACgKAgotDgcKLQ0FCQAoCQIJLQ4JBS0IAQkAAAECAS0OBQktDQgFACgFAgUtDgUILQgBBQAAAQIBLQ4IBS0IAQgAAAECAS4KgEUACC0IAQoAAAECAS4KgEQACicCCwQCLgiARQADIwAAAZ0MOAMLDCQCAAwAAARRIwAAAa8tDQoGCygABoBEAAwkAgAMAAABzCcCDQQAPAkBDScCBgQMLQgADC0MCQ0tDAUOLQwIDy0MChA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FZXhOGJBgnCbYnCWInC/ZPXh4HkSRVQgxGpOKrBPvqwaJgK1V0EtXMG7dbqiBS8RXksMGTKlc00kxjaTLjs1DDr7ZWkUiVJaqZVigtFR9R4fRE2HAiqVQzT5G0VKKxPIlURaKaWa/dUM08MttSJYlq5kqmpcoSVRKNlWa2K01PHYdSZfm59x40VDON5FqqLFDlmZmnlkpCI8+8QbWlkjDMM81X/Okpce9trSoS1cxcRkuVJKqZdSQtVRCpRDSCiHwQjRVF5KOIfBKRn8nmntKkitXZJs+8RKalyhLVzHvdW6oiUJWZyqGhmqkBWqooqBzm2l61VJKKqPjFY30fPv1z9bC/uj7cPg6a4z+/3t087e/vXj4+/ftl/M/1w/5w2H++/PJwf3P78evD7eXh/ub4v515+fGXz+mCTD56c/zoBqIuuOPHYwCSKRdk7TDqMPJ/",
|
|
266
|
+
"brillig_names": [
|
|
267
|
+
"set_authorized"
|
|
268
|
+
]
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"name": "unconstrained_is_consumable",
|
|
272
|
+
"is_unconstrained": true,
|
|
273
|
+
"custom_attributes": [],
|
|
274
|
+
"abi": {
|
|
29
275
|
"parameters": [
|
|
30
276
|
{
|
|
31
277
|
"name": "on_behalf_of",
|
|
32
278
|
"type": {
|
|
279
|
+
"kind": "struct",
|
|
280
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
33
281
|
"fields": [
|
|
34
282
|
{
|
|
35
283
|
"name": "inner",
|
|
@@ -37,9 +285,7 @@
|
|
|
37
285
|
"kind": "field"
|
|
38
286
|
}
|
|
39
287
|
}
|
|
40
|
-
]
|
|
41
|
-
"kind": "struct",
|
|
42
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
288
|
+
]
|
|
43
289
|
},
|
|
44
290
|
"visibility": "private"
|
|
45
291
|
},
|
|
@@ -55,13 +301,102 @@
|
|
|
55
301
|
"abi_type": {
|
|
56
302
|
"kind": "boolean"
|
|
57
303
|
},
|
|
58
|
-
"visibility": "public"
|
|
304
|
+
"visibility": "public"
|
|
305
|
+
},
|
|
306
|
+
"error_types": {
|
|
307
|
+
"206160798890201757": {
|
|
308
|
+
"error_kind": "string",
|
|
309
|
+
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
310
|
+
},
|
|
311
|
+
"5019202896831570965": {
|
|
312
|
+
"error_kind": "string",
|
|
313
|
+
"string": "attempt to add with overflow"
|
|
314
|
+
},
|
|
315
|
+
"16761564377371454734": {
|
|
316
|
+
"error_kind": "string",
|
|
317
|
+
"string": "Array index out of bounds"
|
|
318
|
+
},
|
|
319
|
+
"17843811134343075018": {
|
|
320
|
+
"error_kind": "string",
|
|
321
|
+
"string": "Stack too deep"
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"bytecode": "H4sIAAAAAAAA/9VbzW4cRRDu8e7s7ux/Ep6BC5eZ9TqOOS2JHcglQoDCBSQ23nUSAbFkG4njPAIcEBduSEECiQtPwRMgDjwBEuLAA+C2p7zfflPTnl1PO0lL1sxOV9dXXV1VXdUzDsx52zj9C7L7OjzjJjST7BpfrSUV8op9yhlUKGcAcm7kbkB4vNf6f85uIqKxj2sVTj4i3Cr534nH08gst4rl34yApwf+I+Ff98M/bmZ83k2X+RvC7WW/0X5kjPShHb2X9bVO//pmcX8L+Nn2AHCFd0T8KraJHc9rltwqkF/mZtu91Av2pvDfBf6mOv6x8N/zI/8F//t++Ccdc26HYaaYrlnY55P5yd0vDvc/f/jVl4/nRxwp0QONsrLYLNebC673Dp+fHE33T96ZzY7mx8fMIVQ4mwKubeD6dPrs+YMZc2usx+3R/Oj42eFz5tYsyU18qgXPJtk1vlobSXyJSDbEbcPzKv0pIDxjluOGIfw2yVq1/QaEJ/KwfiT2iO46iqxDpa8F99iHOB0FR+PFa4Q6nFSjj7hn8nZ3TbYxXtc2Wn7kcdoG6mdd2wjovgrbqJLXwOTXm+1Z003bgYPjhS5Sxk2ya7xaG/EDX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GyLyLWIfIuo5YiILUdEbDkiUssRkVqOiNRyROSXBDh5Ock/A5/UuEJzIi6pP9Hzz9qe2ovJP+F6WqLrJVQvqb4AG2XrJa5e4usloV4S6yWpWpJ/uiO58UhOgZhE10uoXmLqJbZe4uolvl5S6v2MpL73dX3v5/+W+bRE10uoXlJ/7lP9uU/15z7Vn/tUf+5Tfe9Tfe+b+t439b1v6nvfNhRcxtoWUb7g0mbOP04zkW8RhRZRbBHlC64hvE2iyEDkp+e0VdMzSlaxPeWnr0oi2yJyLaJ8Pzma6DmnmCi0iGKLKDWI8q+hK4l0i4haRKZFZFtErkXUckT4d46I6SE77RIbv31sEaUGUVAtIt0iohaRaRHZFlG+c828LNQwfDFRaBHFFlFqEL0zM1IQ6RYRtYhMi8i2iFyLqOWIiC1HxDszI8OoP4k8u7C8MzNyWvTOzEhBpFtE1CIyLSLbImopCfJTKiVRaBHFWtHz8Omfq4ft1fXu9nHQ7H/58+7maXt/d/j49O+P8TfXD9vdbvv98sfD/c3t158Pt5e7+5v97zbq8OPLsP0LSzSYeQn55PUFeb//uD8a7DDmWXLDXoc9/wc=",
|
|
327
|
+
"brillig_names": [
|
|
328
|
+
"unconstrained_is_consumable"
|
|
329
|
+
]
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"name": "consume",
|
|
333
|
+
"is_unconstrained": true,
|
|
334
|
+
"custom_attributes": [
|
|
335
|
+
"public"
|
|
336
|
+
],
|
|
337
|
+
"abi": {
|
|
338
|
+
"parameters": [
|
|
339
|
+
{
|
|
340
|
+
"name": "on_behalf_of",
|
|
341
|
+
"type": {
|
|
342
|
+
"kind": "struct",
|
|
343
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
344
|
+
"fields": [
|
|
345
|
+
{
|
|
346
|
+
"name": "inner",
|
|
347
|
+
"type": {
|
|
348
|
+
"kind": "field"
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
]
|
|
352
|
+
},
|
|
353
|
+
"visibility": "private"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"name": "inner_hash",
|
|
357
|
+
"type": {
|
|
358
|
+
"kind": "field"
|
|
359
|
+
},
|
|
360
|
+
"visibility": "private"
|
|
361
|
+
}
|
|
362
|
+
],
|
|
363
|
+
"return_type": {
|
|
364
|
+
"abi_type": {
|
|
365
|
+
"kind": "field"
|
|
366
|
+
},
|
|
367
|
+
"visibility": "public"
|
|
368
|
+
},
|
|
369
|
+
"error_types": {
|
|
370
|
+
"206160798890201757": {
|
|
371
|
+
"error_kind": "string",
|
|
372
|
+
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
373
|
+
},
|
|
374
|
+
"715723737710351018": {
|
|
375
|
+
"error_kind": "string",
|
|
376
|
+
"string": "rejecting all"
|
|
377
|
+
},
|
|
378
|
+
"5019202896831570965": {
|
|
379
|
+
"error_kind": "string",
|
|
380
|
+
"string": "attempt to add with overflow"
|
|
381
|
+
},
|
|
382
|
+
"12737498021964987455": {
|
|
383
|
+
"error_kind": "string",
|
|
384
|
+
"string": "unauthorized"
|
|
385
|
+
},
|
|
386
|
+
"16761564377371454734": {
|
|
387
|
+
"error_kind": "string",
|
|
388
|
+
"string": "Array index out of bounds"
|
|
389
|
+
},
|
|
390
|
+
"17843811134343075018": {
|
|
391
|
+
"error_kind": "string",
|
|
392
|
+
"string": "Stack too deep"
|
|
393
|
+
}
|
|
59
394
|
}
|
|
60
395
|
},
|
|
61
|
-
"bytecode": "
|
|
62
|
-
"debug_symbols": "
|
|
396
|
+
"bytecode": "JwACBAEoAAABBIBNJwAABAMnAgMEAicCBAQAHxgABAADgEouCIBKAAEuCIBLAAIlAAAAUSUAAACFLgQAAYBMKAIAAgSATCcCAwQBOw0AAgADKQCAQwBH2s1zKACARAQAAygAgEUBAAAoAIBGBAAAKACARwAAACgAgEgBAAEoAIBJBAABJiUAAAoRLQgBBAAAAQIBLgqARQAELQgBBAAAAQIBLgqARwAELQgBBAAAAQIBJwIFAAItD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lieqMUcHMk6Xpf7ZtdcYoIaozRklRWROF9z9sdIthjKaNSpqoqGqrM9oIUSloovAdLWJU1kThJyyIUUUThb/XFqM0bVnTOa+8jGyxuibKGlVU1EQ5r4oqmiiv0vBJExVUhgF/vvyhEnnfjBsWv2tajCqaKLxWF6OSJqozAkhRKo2ski+qtopKvqrkq0bedaq5D3mJSqaNSpoo61VRRRPlgiqqaqI6cwAhqjMHWJ85dJ7dJ0ZpZkSdZ79JUXhmnv087c3h5S6A97h61TB33RpjG5NOj8H1TogJiphy+tzf+06FlKKyJqpTIaUoVVtB1VZQtRVVbUVVW0n190qqtrLqvPDz2qUofO2uGBVUUapPCp5Zr48x+NbNauY9zeqamKAYlwL+FK+34xS54T1nISYqYurpBiEoYhTt4M/tekxS/E2Top2saAd/Xmuc+3XNzUoi4HorxCjaqUERU0+OiSYoYhTt4Nno0d8HxZST/6bReUWMoh1/+nyocx2OEHP6ZyHGoIg5fTyI+KEx6zHZKGI07SjOpyj6TlH8feqJ/eDX9NO/Pz7cfPx0e/1tinj8xx93n7/f3N89//j9P1/nf/n0cHN7e/Plw9eH+8/Xf/94uP5we//58d+uzPN//squvsvRTLk8zdCji++if/rxMbFYpx9rnlqdWv4v",
|
|
63
398
|
"brillig_names": [
|
|
64
|
-
"
|
|
399
|
+
"consume"
|
|
65
400
|
]
|
|
66
401
|
},
|
|
67
402
|
{
|
|
@@ -69,21 +404,12 @@
|
|
|
69
404
|
"is_unconstrained": true,
|
|
70
405
|
"custom_attributes": [],
|
|
71
406
|
"abi": {
|
|
72
|
-
"error_types": {
|
|
73
|
-
"16775516380094354375": {
|
|
74
|
-
"error_kind": "fmtstring",
|
|
75
|
-
"item_types": [],
|
|
76
|
-
"length": 40
|
|
77
|
-
},
|
|
78
|
-
"17843811134343075018": {
|
|
79
|
-
"error_kind": "string",
|
|
80
|
-
"string": "Stack too deep"
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
407
|
"parameters": [
|
|
84
408
|
{
|
|
85
|
-
"name": "
|
|
409
|
+
"name": "_log_ciphertext",
|
|
86
410
|
"type": {
|
|
411
|
+
"kind": "struct",
|
|
412
|
+
"path": "std::collections::bounded_vec::BoundedVec",
|
|
87
413
|
"fields": [
|
|
88
414
|
{
|
|
89
415
|
"name": "storage",
|
|
@@ -103,9 +429,7 @@
|
|
|
103
429
|
"width": 32
|
|
104
430
|
}
|
|
105
431
|
}
|
|
106
|
-
]
|
|
107
|
-
"kind": "struct",
|
|
108
|
-
"path": "std::collections::bounded_vec::BoundedVec"
|
|
432
|
+
]
|
|
109
433
|
},
|
|
110
434
|
"visibility": "private"
|
|
111
435
|
},
|
|
@@ -119,6 +443,8 @@
|
|
|
119
443
|
{
|
|
120
444
|
"name": "_unique_note_hashes_in_tx",
|
|
121
445
|
"type": {
|
|
446
|
+
"kind": "struct",
|
|
447
|
+
"path": "std::collections::bounded_vec::BoundedVec",
|
|
122
448
|
"fields": [
|
|
123
449
|
{
|
|
124
450
|
"name": "storage",
|
|
@@ -138,9 +464,7 @@
|
|
|
138
464
|
"width": 32
|
|
139
465
|
}
|
|
140
466
|
}
|
|
141
|
-
]
|
|
142
|
-
"kind": "struct",
|
|
143
|
-
"path": "std::collections::bounded_vec::BoundedVec"
|
|
467
|
+
]
|
|
144
468
|
},
|
|
145
469
|
"visibility": "private"
|
|
146
470
|
},
|
|
@@ -154,6 +478,8 @@
|
|
|
154
478
|
{
|
|
155
479
|
"name": "_recipient",
|
|
156
480
|
"type": {
|
|
481
|
+
"kind": "struct",
|
|
482
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
157
483
|
"fields": [
|
|
158
484
|
{
|
|
159
485
|
"name": "inner",
|
|
@@ -161,100 +487,44 @@
|
|
|
161
487
|
"kind": "field"
|
|
162
488
|
}
|
|
163
489
|
}
|
|
164
|
-
]
|
|
165
|
-
"kind": "struct",
|
|
166
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
490
|
+
]
|
|
167
491
|
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ptMUJO3lB4mOtN4uzecfgntofDMz9H+dJ8xDq3tlmhzC/oWoPwaleSVzNfO9oq64KKuEiSBXg==",
|
|
175
|
-
"brillig_names": [
|
|
176
|
-
"process_log"
|
|
177
|
-
]
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
"name": "set_reject_all",
|
|
181
|
-
"is_unconstrained": true,
|
|
182
|
-
"custom_attributes": [
|
|
183
|
-
"public"
|
|
184
|
-
],
|
|
185
|
-
"abi": {
|
|
495
|
+
"return_type": null,
|
|
186
496
|
"error_types": {
|
|
187
|
-
"
|
|
188
|
-
"error_kind": "
|
|
189
|
-
"
|
|
497
|
+
"16775516380094354375": {
|
|
498
|
+
"error_kind": "fmtstring",
|
|
499
|
+
"length": 40,
|
|
500
|
+
"item_types": []
|
|
190
501
|
},
|
|
191
502
|
"17843811134343075018": {
|
|
192
503
|
"error_kind": "string",
|
|
193
504
|
"string": "Stack too deep"
|
|
194
|
-
},
|
|
195
|
-
"206160798890201757": {
|
|
196
|
-
"error_kind": "string",
|
|
197
|
-
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
198
|
-
},
|
|
199
|
-
"5019202896831570965": {
|
|
200
|
-
"error_kind": "string",
|
|
201
|
-
"string": "attempt to add with overflow"
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
"parameters": [
|
|
205
|
-
{
|
|
206
|
-
"name": "reject",
|
|
207
|
-
"type": {
|
|
208
|
-
"kind": "boolean"
|
|
209
|
-
},
|
|
210
|
-
"visibility": "private"
|
|
211
505
|
}
|
|
212
|
-
|
|
213
|
-
"return_type": null
|
|
506
|
+
}
|
|
214
507
|
},
|
|
215
|
-
"bytecode": "
|
|
216
|
-
"debug_symbols": "
|
|
508
|
+
"bytecode": "H4sIAAAAAAAA/+Wc6XLbNhDHKZu0TcmyZPmK3Svp3bRpKYnU0dNt0/u+lM+KYz8HHyPta7Rf2qer/jFXWsHojDteTPxPMMOhpYV2f1wuARBYuBadl8nsqFV/x9V5v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Jf8Jrr47OI4rj5nVyrDwtdO2ukfdH1toaH+U9HfCKK/l4n+zTD8836qGeb+DkT/Vhj+efy0wvD3RH87DP+Z6N8Owz9/j+kE0V/Mx+U7Yfjn8b8bxv9z/r0w/HP9+2H45/f3IIz+sYw7bkSL4o4zD9X3dv1/b3zZcabYrzusocaZhw6P6x89zoTsyMPa9sjcZ/TIY+fIY8ena9NQ14Ghrm1DXQ1DXfuGutqGuuqGuvYMdbUMdaWGuizvo6W/LGN111CXZaxuGeq6ru2E5fNo6fvrGqsbhrosY8IyVi39tWOoy7KNthwDNA11WfYdls/QdY2vp6H9CtEPhV0PzDLfPFhkp987D2aoPxNfS6zquW9tU64vcer/6fh5M4ife1N5J5M2SPvCN1dlabvm2Isi//us2G96eIS77pFd5R/Mno5OTsf383wwzIuifzKsOfqF1f1OzzvrPkfX970b++bVDH098q3xtJRfUWIl23JkiZIJo17j8c07WvJfxv/aftsjc8del72XnWg51vTz2IgWz3Bc2l/7cHTeljxirPQn0fIabuTYT5z6f1ef3bbuqs/I2XDaPetPz6bF9MGD/GTacfRrH8JP/wJJ9PoyCV0AAA==",
|
|
509
|
+
"debug_symbols": "tZbRCoMgGIXfxWsv0qV/26uMMawsBLGwGozo3acjttiuz0105NfPCz84K2ttvfR3F7phYpfryvzQmNkNIaV146yOznvX34/LrMgfofR7wzSakPM0mzizizgJUpzZ0OZ/KVU6pHPepiT0xv/mSe7DRJ/JkrYbTwBCAyo04AwG6AINEGiARANOaECJBig0AG2yRpus0SZrtMmENpnQJhPaZEKbTGiTCW0yoU0mtMkENXlL6WGiM7W3e8PpltAcCs/8HO1P9xnj0Nh2iTa3oG8Byq+xlFzJfO1sr6gKLiqVIAn0Ag==",
|
|
217
510
|
"brillig_names": [
|
|
218
|
-
"
|
|
511
|
+
"process_log"
|
|
219
512
|
]
|
|
220
513
|
},
|
|
221
514
|
{
|
|
222
|
-
"name": "
|
|
515
|
+
"name": "is_consumable",
|
|
223
516
|
"is_unconstrained": true,
|
|
224
517
|
"custom_attributes": [
|
|
225
|
-
"public"
|
|
518
|
+
"public",
|
|
519
|
+
"view"
|
|
226
520
|
],
|
|
227
521
|
"abi": {
|
|
228
|
-
"error_types": {
|
|
229
|
-
"12737498021964987455": {
|
|
230
|
-
"error_kind": "string",
|
|
231
|
-
"string": "unauthorized"
|
|
232
|
-
},
|
|
233
|
-
"16761564377371454734": {
|
|
234
|
-
"error_kind": "string",
|
|
235
|
-
"string": "Array index out of bounds"
|
|
236
|
-
},
|
|
237
|
-
"17843811134343075018": {
|
|
238
|
-
"error_kind": "string",
|
|
239
|
-
"string": "Stack too deep"
|
|
240
|
-
},
|
|
241
|
-
"206160798890201757": {
|
|
242
|
-
"error_kind": "string",
|
|
243
|
-
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
244
|
-
},
|
|
245
|
-
"5019202896831570965": {
|
|
246
|
-
"error_kind": "string",
|
|
247
|
-
"string": "attempt to add with overflow"
|
|
248
|
-
},
|
|
249
|
-
"715723737710351018": {
|
|
250
|
-
"error_kind": "string",
|
|
251
|
-
"string": "rejecting all"
|
|
252
|
-
}
|
|
253
|
-
},
|
|
254
522
|
"parameters": [
|
|
255
523
|
{
|
|
256
524
|
"name": "on_behalf_of",
|
|
257
525
|
"type": {
|
|
526
|
+
"kind": "struct",
|
|
527
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
258
528
|
"fields": [
|
|
259
529
|
{
|
|
260
530
|
"name": "inner",
|
|
@@ -262,14 +532,12 @@
|
|
|
262
532
|
"kind": "field"
|
|
263
533
|
}
|
|
264
534
|
}
|
|
265
|
-
]
|
|
266
|
-
"kind": "struct",
|
|
267
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
535
|
+
]
|
|
268
536
|
},
|
|
269
537
|
"visibility": "private"
|
|
270
538
|
},
|
|
271
539
|
{
|
|
272
|
-
"name": "
|
|
540
|
+
"name": "message_hash",
|
|
273
541
|
"type": {
|
|
274
542
|
"kind": "field"
|
|
275
543
|
},
|
|
@@ -278,15 +546,37 @@
|
|
|
278
546
|
],
|
|
279
547
|
"return_type": {
|
|
280
548
|
"abi_type": {
|
|
281
|
-
"kind": "
|
|
549
|
+
"kind": "boolean"
|
|
282
550
|
},
|
|
283
551
|
"visibility": "public"
|
|
552
|
+
},
|
|
553
|
+
"error_types": {
|
|
554
|
+
"206160798890201757": {
|
|
555
|
+
"error_kind": "string",
|
|
556
|
+
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
557
|
+
},
|
|
558
|
+
"5019202896831570965": {
|
|
559
|
+
"error_kind": "string",
|
|
560
|
+
"string": "attempt to add with overflow"
|
|
561
|
+
},
|
|
562
|
+
"5444967152290923376": {
|
|
563
|
+
"error_kind": "string",
|
|
564
|
+
"string": "Function is_consumable can only be called statically"
|
|
565
|
+
},
|
|
566
|
+
"16761564377371454734": {
|
|
567
|
+
"error_kind": "string",
|
|
568
|
+
"string": "Array index out of bounds"
|
|
569
|
+
},
|
|
570
|
+
"17843811134343075018": {
|
|
571
|
+
"error_kind": "string",
|
|
572
|
+
"string": "Stack too deep"
|
|
573
|
+
}
|
|
284
574
|
}
|
|
285
575
|
},
|
|
286
|
-
"bytecode": "
|
|
287
|
-
"debug_symbols": "
|
|
576
|
+
"bytecode": "JwACBAEoAAABBIBKJwAABAMnAgMEAicCBAQAHxgABAADgEcuCIBHAAEuCIBIAAIlAAAAUSUAAABuLgQAAYBJKAIAAgSASScCAwQBOw0AAgADKACAQwQAAygAgEQBAAAoAIBFBAAAKACARgQAASYlAAAE5B4CAAQJJwIFAAEKOAQFBiQCAAYAAACPJQAABQ0nAgQAAi0IAQUnAgYEAwAQAQYBJwMFBAEAKAUCBi0MBgctDgQHACgHAgctDgEHJwIBAAAtCAEEJwIGBAQAEAEGAScDBAQBACgEAgYtDAYHLQ4BBwAoBwIHLQ4BBwAoBwIHLQ4BBy0NBAYAKAYCBi0OBgQrAgAGAAAAAAAAAAACAAAAAAAAAAAtCAEH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UXGmz3qlRSWACkOlz8zcoGLR23JU0NsyVJwFFYYKYoWh4vucXzlPxTu24s/TMr0cfKXh99miMBqiWNvh3+rd0KT5Gn6+qKEJnGa4/TGtVTSp1CqSqPg5iqaqSFRFZKuIbJHIFklsBeNFKsnvFazIlhWdF7/9Y1OVJCr+4e2mKohUNLuPCYHlTmbc6o4co5nfLwX+Kj5vJwt849fznNfwq10amjifARmBZr6dyF+3Dc383zRagR0rsMNfrxTHuKbsak2er/ECO/zK7oYmztdEgZ0osUON34fR8Hn9/G+aaL4mC+wUJ9Dk+Rqafy0kYwSa+f1B4tcMNDTza8LkBHac4Hzc/NhJXvD7+PlxcOKt1o3MfeJdzk0VXyVYfxw8RVup+HmflopfYdFURZGKryCH0d+kKjUNvocc6tHpObdgalv8A/1NVZGo+Ae3myo+oqKbGA7JoVJlK1KJbJUgUpFExddDDVUxTqTKEtWJkUxLVSQqJ7LlTpzX9GTfkM6qLF98lKj4+qipKhJV9CKViEayIpWIIV/3WH98Qt97W6tIojoxl9FSZYmK3yq4qYoilYTGiW1QmyqRLetFKgl5clakOkE+5EmVqt6GvBWpikQVvEhFEtWJyqGhOlEDtFRJUDmc2OakqZJURFRm2/o5HP1zeb+7vNrfPAyaw4ffb68fd3e3L4eP/34bP7m63+33u68X3+7vrm8+f7+/udjfXR8+25iXP588pW2w+eDN4dBFv3WxHA4PAThMFW6HSfzB6mD5Pw==",
|
|
288
578
|
"brillig_names": [
|
|
289
|
-
"
|
|
579
|
+
"is_consumable"
|
|
290
580
|
]
|
|
291
581
|
},
|
|
292
582
|
{
|
|
@@ -296,36 +586,24 @@
|
|
|
296
586
|
"private"
|
|
297
587
|
],
|
|
298
588
|
"abi": {
|
|
299
|
-
"error_types": {
|
|
300
|
-
"16761564377371454734": {
|
|
301
|
-
"error_kind": "string",
|
|
302
|
-
"string": "Array index out of bounds"
|
|
303
|
-
},
|
|
304
|
-
"17843811134343075018": {
|
|
305
|
-
"error_kind": "string",
|
|
306
|
-
"string": "Stack too deep"
|
|
307
|
-
},
|
|
308
|
-
"4939791462094160055": {
|
|
309
|
-
"error_kind": "string",
|
|
310
|
-
"string": "Message not authorized by account"
|
|
311
|
-
},
|
|
312
|
-
"5019202896831570965": {
|
|
313
|
-
"error_kind": "string",
|
|
314
|
-
"string": "attempt to add with overflow"
|
|
315
|
-
}
|
|
316
|
-
},
|
|
317
589
|
"parameters": [
|
|
318
590
|
{
|
|
319
591
|
"name": "inputs",
|
|
320
592
|
"type": {
|
|
593
|
+
"kind": "struct",
|
|
594
|
+
"path": "aztec::context::inputs::private_context_inputs::PrivateContextInputs",
|
|
321
595
|
"fields": [
|
|
322
596
|
{
|
|
323
597
|
"name": "call_context",
|
|
324
598
|
"type": {
|
|
599
|
+
"kind": "struct",
|
|
600
|
+
"path": "authwit::aztec::protocol_types::abis::call_context::CallContext",
|
|
325
601
|
"fields": [
|
|
326
602
|
{
|
|
327
603
|
"name": "msg_sender",
|
|
328
604
|
"type": {
|
|
605
|
+
"kind": "struct",
|
|
606
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
329
607
|
"fields": [
|
|
330
608
|
{
|
|
331
609
|
"name": "inner",
|
|
@@ -333,14 +611,14 @@
|
|
|
333
611
|
"kind": "field"
|
|
334
612
|
}
|
|
335
613
|
}
|
|
336
|
-
]
|
|
337
|
-
"kind": "struct",
|
|
338
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
614
|
+
]
|
|
339
615
|
}
|
|
340
616
|
},
|
|
341
617
|
{
|
|
342
618
|
"name": "contract_address",
|
|
343
619
|
"type": {
|
|
620
|
+
"kind": "struct",
|
|
621
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
344
622
|
"fields": [
|
|
345
623
|
{
|
|
346
624
|
"name": "inner",
|
|
@@ -348,14 +626,14 @@
|
|
|
348
626
|
"kind": "field"
|
|
349
627
|
}
|
|
350
628
|
}
|
|
351
|
-
]
|
|
352
|
-
"kind": "struct",
|
|
353
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
629
|
+
]
|
|
354
630
|
}
|
|
355
631
|
},
|
|
356
632
|
{
|
|
357
633
|
"name": "function_selector",
|
|
358
634
|
"type": {
|
|
635
|
+
"kind": "struct",
|
|
636
|
+
"path": "authwit::aztec::protocol_types::abis::function_selector::FunctionSelector",
|
|
359
637
|
"fields": [
|
|
360
638
|
{
|
|
361
639
|
"name": "inner",
|
|
@@ -365,9 +643,7 @@
|
|
|
365
643
|
"width": 32
|
|
366
644
|
}
|
|
367
645
|
}
|
|
368
|
-
]
|
|
369
|
-
"kind": "struct",
|
|
370
|
-
"path": "authwit::aztec::protocol_types::abis::function_selector::FunctionSelector"
|
|
646
|
+
]
|
|
371
647
|
}
|
|
372
648
|
},
|
|
373
649
|
{
|
|
@@ -376,18 +652,20 @@
|
|
|
376
652
|
"kind": "boolean"
|
|
377
653
|
}
|
|
378
654
|
}
|
|
379
|
-
]
|
|
380
|
-
"kind": "struct",
|
|
381
|
-
"path": "authwit::aztec::protocol_types::abis::call_context::CallContext"
|
|
655
|
+
]
|
|
382
656
|
}
|
|
383
657
|
},
|
|
384
658
|
{
|
|
385
659
|
"name": "historical_header",
|
|
386
660
|
"type": {
|
|
661
|
+
"kind": "struct",
|
|
662
|
+
"path": "authwit::aztec::protocol_types::block_header::BlockHeader",
|
|
387
663
|
"fields": [
|
|
388
664
|
{
|
|
389
665
|
"name": "last_archive",
|
|
390
666
|
"type": {
|
|
667
|
+
"kind": "struct",
|
|
668
|
+
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
391
669
|
"fields": [
|
|
392
670
|
{
|
|
393
671
|
"name": "root",
|
|
@@ -403,14 +681,14 @@
|
|
|
403
681
|
"width": 32
|
|
404
682
|
}
|
|
405
683
|
}
|
|
406
|
-
]
|
|
407
|
-
"kind": "struct",
|
|
408
|
-
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
|
|
684
|
+
]
|
|
409
685
|
}
|
|
410
686
|
},
|
|
411
687
|
{
|
|
412
688
|
"name": "content_commitment",
|
|
413
689
|
"type": {
|
|
690
|
+
"kind": "struct",
|
|
691
|
+
"path": "authwit::aztec::protocol_types::content_commitment::ContentCommitment",
|
|
414
692
|
"fields": [
|
|
415
693
|
{
|
|
416
694
|
"name": "num_txs",
|
|
@@ -436,18 +714,20 @@
|
|
|
436
714
|
"kind": "field"
|
|
437
715
|
}
|
|
438
716
|
}
|
|
439
|
-
]
|
|
440
|
-
"kind": "struct",
|
|
441
|
-
"path": "authwit::aztec::protocol_types::content_commitment::ContentCommitment"
|
|
717
|
+
]
|
|
442
718
|
}
|
|
443
719
|
},
|
|
444
720
|
{
|
|
445
721
|
"name": "state",
|
|
446
722
|
"type": {
|
|
723
|
+
"kind": "struct",
|
|
724
|
+
"path": "authwit::aztec::protocol_types::state_reference::StateReference",
|
|
447
725
|
"fields": [
|
|
448
726
|
{
|
|
449
727
|
"name": "l1_to_l2_message_tree",
|
|
450
728
|
"type": {
|
|
729
|
+
"kind": "struct",
|
|
730
|
+
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
451
731
|
"fields": [
|
|
452
732
|
{
|
|
453
733
|
"name": "root",
|
|
@@ -463,18 +743,20 @@
|
|
|
463
743
|
"width": 32
|
|
464
744
|
}
|
|
465
745
|
}
|
|
466
|
-
]
|
|
467
|
-
"kind": "struct",
|
|
468
|
-
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
|
|
746
|
+
]
|
|
469
747
|
}
|
|
470
748
|
},
|
|
471
749
|
{
|
|
472
750
|
"name": "partial",
|
|
473
751
|
"type": {
|
|
752
|
+
"kind": "struct",
|
|
753
|
+
"path": "authwit::aztec::protocol_types::partial_state_reference::PartialStateReference",
|
|
474
754
|
"fields": [
|
|
475
755
|
{
|
|
476
756
|
"name": "note_hash_tree",
|
|
477
757
|
"type": {
|
|
758
|
+
"kind": "struct",
|
|
759
|
+
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
478
760
|
"fields": [
|
|
479
761
|
{
|
|
480
762
|
"name": "root",
|
|
@@ -490,14 +772,14 @@
|
|
|
490
772
|
"width": 32
|
|
491
773
|
}
|
|
492
774
|
}
|
|
493
|
-
]
|
|
494
|
-
"kind": "struct",
|
|
495
|
-
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
|
|
775
|
+
]
|
|
496
776
|
}
|
|
497
777
|
},
|
|
498
778
|
{
|
|
499
779
|
"name": "nullifier_tree",
|
|
500
780
|
"type": {
|
|
781
|
+
"kind": "struct",
|
|
782
|
+
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
501
783
|
"fields": [
|
|
502
784
|
{
|
|
503
785
|
"name": "root",
|
|
@@ -513,14 +795,14 @@
|
|
|
513
795
|
"width": 32
|
|
514
796
|
}
|
|
515
797
|
}
|
|
516
|
-
]
|
|
517
|
-
"kind": "struct",
|
|
518
|
-
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
|
|
798
|
+
]
|
|
519
799
|
}
|
|
520
800
|
},
|
|
521
801
|
{
|
|
522
802
|
"name": "public_data_tree",
|
|
523
803
|
"type": {
|
|
804
|
+
"kind": "struct",
|
|
805
|
+
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
524
806
|
"fields": [
|
|
525
807
|
{
|
|
526
808
|
"name": "root",
|
|
@@ -536,24 +818,20 @@
|
|
|
536
818
|
"width": 32
|
|
537
819
|
}
|
|
538
820
|
}
|
|
539
|
-
]
|
|
540
|
-
"kind": "struct",
|
|
541
|
-
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
|
|
821
|
+
]
|
|
542
822
|
}
|
|
543
823
|
}
|
|
544
|
-
]
|
|
545
|
-
"kind": "struct",
|
|
546
|
-
"path": "authwit::aztec::protocol_types::partial_state_reference::PartialStateReference"
|
|
824
|
+
]
|
|
547
825
|
}
|
|
548
826
|
}
|
|
549
|
-
]
|
|
550
|
-
"kind": "struct",
|
|
551
|
-
"path": "authwit::aztec::protocol_types::state_reference::StateReference"
|
|
827
|
+
]
|
|
552
828
|
}
|
|
553
829
|
},
|
|
554
830
|
{
|
|
555
831
|
"name": "global_variables",
|
|
556
832
|
"type": {
|
|
833
|
+
"kind": "struct",
|
|
834
|
+
"path": "authwit::aztec::protocol_types::abis::global_variables::GlobalVariables",
|
|
557
835
|
"fields": [
|
|
558
836
|
{
|
|
559
837
|
"name": "chain_id",
|
|
@@ -590,6 +868,8 @@
|
|
|
590
868
|
{
|
|
591
869
|
"name": "coinbase",
|
|
592
870
|
"type": {
|
|
871
|
+
"kind": "struct",
|
|
872
|
+
"path": "authwit::aztec::protocol_types::address::eth_address::EthAddress",
|
|
593
873
|
"fields": [
|
|
594
874
|
{
|
|
595
875
|
"name": "inner",
|
|
@@ -597,14 +877,14 @@
|
|
|
597
877
|
"kind": "field"
|
|
598
878
|
}
|
|
599
879
|
}
|
|
600
|
-
]
|
|
601
|
-
"kind": "struct",
|
|
602
|
-
"path": "authwit::aztec::protocol_types::address::eth_address::EthAddress"
|
|
880
|
+
]
|
|
603
881
|
}
|
|
604
882
|
},
|
|
605
883
|
{
|
|
606
884
|
"name": "fee_recipient",
|
|
607
885
|
"type": {
|
|
886
|
+
"kind": "struct",
|
|
887
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
608
888
|
"fields": [
|
|
609
889
|
{
|
|
610
890
|
"name": "inner",
|
|
@@ -612,14 +892,14 @@
|
|
|
612
892
|
"kind": "field"
|
|
613
893
|
}
|
|
614
894
|
}
|
|
615
|
-
]
|
|
616
|
-
"kind": "struct",
|
|
617
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
895
|
+
]
|
|
618
896
|
}
|
|
619
897
|
},
|
|
620
898
|
{
|
|
621
899
|
"name": "gas_fees",
|
|
622
900
|
"type": {
|
|
901
|
+
"kind": "struct",
|
|
902
|
+
"path": "authwit::aztec::protocol_types::abis::gas_fees::GasFees",
|
|
623
903
|
"fields": [
|
|
624
904
|
{
|
|
625
905
|
"name": "fee_per_da_gas",
|
|
@@ -633,14 +913,10 @@
|
|
|
633
913
|
"kind": "field"
|
|
634
914
|
}
|
|
635
915
|
}
|
|
636
|
-
]
|
|
637
|
-
"kind": "struct",
|
|
638
|
-
"path": "authwit::aztec::protocol_types::abis::gas_fees::GasFees"
|
|
916
|
+
]
|
|
639
917
|
}
|
|
640
918
|
}
|
|
641
|
-
]
|
|
642
|
-
"kind": "struct",
|
|
643
|
-
"path": "authwit::aztec::protocol_types::abis::global_variables::GlobalVariables"
|
|
919
|
+
]
|
|
644
920
|
}
|
|
645
921
|
},
|
|
646
922
|
{
|
|
@@ -655,14 +931,14 @@
|
|
|
655
931
|
"kind": "field"
|
|
656
932
|
}
|
|
657
933
|
}
|
|
658
|
-
]
|
|
659
|
-
"kind": "struct",
|
|
660
|
-
"path": "authwit::aztec::protocol_types::block_header::BlockHeader"
|
|
934
|
+
]
|
|
661
935
|
}
|
|
662
936
|
},
|
|
663
937
|
{
|
|
664
938
|
"name": "tx_context",
|
|
665
939
|
"type": {
|
|
940
|
+
"kind": "struct",
|
|
941
|
+
"path": "authwit::aztec::protocol_types::transaction::tx_context::TxContext",
|
|
666
942
|
"fields": [
|
|
667
943
|
{
|
|
668
944
|
"name": "chain_id",
|
|
@@ -679,10 +955,14 @@
|
|
|
679
955
|
{
|
|
680
956
|
"name": "gas_settings",
|
|
681
957
|
"type": {
|
|
958
|
+
"kind": "struct",
|
|
959
|
+
"path": "authwit::aztec::protocol_types::abis::gas_settings::GasSettings",
|
|
682
960
|
"fields": [
|
|
683
961
|
{
|
|
684
962
|
"name": "gas_limits",
|
|
685
963
|
"type": {
|
|
964
|
+
"kind": "struct",
|
|
965
|
+
"path": "authwit::aztec::protocol_types::abis::gas::Gas",
|
|
686
966
|
"fields": [
|
|
687
967
|
{
|
|
688
968
|
"name": "da_gas",
|
|
@@ -700,14 +980,14 @@
|
|
|
700
980
|
"width": 32
|
|
701
981
|
}
|
|
702
982
|
}
|
|
703
|
-
]
|
|
704
|
-
"kind": "struct",
|
|
705
|
-
"path": "authwit::aztec::protocol_types::abis::gas::Gas"
|
|
983
|
+
]
|
|
706
984
|
}
|
|
707
985
|
},
|
|
708
986
|
{
|
|
709
987
|
"name": "teardown_gas_limits",
|
|
710
988
|
"type": {
|
|
989
|
+
"kind": "struct",
|
|
990
|
+
"path": "authwit::aztec::protocol_types::abis::gas::Gas",
|
|
711
991
|
"fields": [
|
|
712
992
|
{
|
|
713
993
|
"name": "da_gas",
|
|
@@ -725,14 +1005,14 @@
|
|
|
725
1005
|
"width": 32
|
|
726
1006
|
}
|
|
727
1007
|
}
|
|
728
|
-
]
|
|
729
|
-
"kind": "struct",
|
|
730
|
-
"path": "authwit::aztec::protocol_types::abis::gas::Gas"
|
|
1008
|
+
]
|
|
731
1009
|
}
|
|
732
1010
|
},
|
|
733
1011
|
{
|
|
734
1012
|
"name": "max_fees_per_gas",
|
|
735
1013
|
"type": {
|
|
1014
|
+
"kind": "struct",
|
|
1015
|
+
"path": "authwit::aztec::protocol_types::abis::gas_fees::GasFees",
|
|
736
1016
|
"fields": [
|
|
737
1017
|
{
|
|
738
1018
|
"name": "fee_per_da_gas",
|
|
@@ -746,14 +1026,14 @@
|
|
|
746
1026
|
"kind": "field"
|
|
747
1027
|
}
|
|
748
1028
|
}
|
|
749
|
-
]
|
|
750
|
-
"kind": "struct",
|
|
751
|
-
"path": "authwit::aztec::protocol_types::abis::gas_fees::GasFees"
|
|
1029
|
+
]
|
|
752
1030
|
}
|
|
753
1031
|
},
|
|
754
1032
|
{
|
|
755
1033
|
"name": "max_priority_fees_per_gas",
|
|
756
1034
|
"type": {
|
|
1035
|
+
"kind": "struct",
|
|
1036
|
+
"path": "authwit::aztec::protocol_types::abis::gas_fees::GasFees",
|
|
757
1037
|
"fields": [
|
|
758
1038
|
{
|
|
759
1039
|
"name": "fee_per_da_gas",
|
|
@@ -767,19 +1047,13 @@
|
|
|
767
1047
|
"kind": "field"
|
|
768
1048
|
}
|
|
769
1049
|
}
|
|
770
|
-
]
|
|
771
|
-
"kind": "struct",
|
|
772
|
-
"path": "authwit::aztec::protocol_types::abis::gas_fees::GasFees"
|
|
1050
|
+
]
|
|
773
1051
|
}
|
|
774
1052
|
}
|
|
775
|
-
]
|
|
776
|
-
"kind": "struct",
|
|
777
|
-
"path": "authwit::aztec::protocol_types::abis::gas_settings::GasSettings"
|
|
1053
|
+
]
|
|
778
1054
|
}
|
|
779
1055
|
}
|
|
780
|
-
]
|
|
781
|
-
"kind": "struct",
|
|
782
|
-
"path": "authwit::aztec::protocol_types::transaction::tx_context::TxContext"
|
|
1056
|
+
]
|
|
783
1057
|
}
|
|
784
1058
|
},
|
|
785
1059
|
{
|
|
@@ -790,15 +1064,15 @@
|
|
|
790
1064
|
"width": 32
|
|
791
1065
|
}
|
|
792
1066
|
}
|
|
793
|
-
]
|
|
794
|
-
"kind": "struct",
|
|
795
|
-
"path": "aztec::context::inputs::private_context_inputs::PrivateContextInputs"
|
|
1067
|
+
]
|
|
796
1068
|
},
|
|
797
1069
|
"visibility": "private"
|
|
798
1070
|
},
|
|
799
1071
|
{
|
|
800
1072
|
"name": "approver",
|
|
801
1073
|
"type": {
|
|
1074
|
+
"kind": "struct",
|
|
1075
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
802
1076
|
"fields": [
|
|
803
1077
|
{
|
|
804
1078
|
"name": "inner",
|
|
@@ -806,9 +1080,7 @@
|
|
|
806
1080
|
"kind": "field"
|
|
807
1081
|
}
|
|
808
1082
|
}
|
|
809
|
-
]
|
|
810
|
-
"kind": "struct",
|
|
811
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
1083
|
+
]
|
|
812
1084
|
},
|
|
813
1085
|
"visibility": "private"
|
|
814
1086
|
},
|
|
@@ -829,14 +1101,20 @@
|
|
|
829
1101
|
],
|
|
830
1102
|
"return_type": {
|
|
831
1103
|
"abi_type": {
|
|
1104
|
+
"kind": "struct",
|
|
1105
|
+
"path": "authwit::aztec::protocol_types::abis::private_circuit_public_inputs::PrivateCircuitPublicInputs",
|
|
832
1106
|
"fields": [
|
|
833
1107
|
{
|
|
834
1108
|
"name": "call_context",
|
|
835
1109
|
"type": {
|
|
1110
|
+
"kind": "struct",
|
|
1111
|
+
"path": "authwit::aztec::protocol_types::abis::call_context::CallContext",
|
|
836
1112
|
"fields": [
|
|
837
1113
|
{
|
|
838
1114
|
"name": "msg_sender",
|
|
839
1115
|
"type": {
|
|
1116
|
+
"kind": "struct",
|
|
1117
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
840
1118
|
"fields": [
|
|
841
1119
|
{
|
|
842
1120
|
"name": "inner",
|
|
@@ -844,14 +1122,14 @@
|
|
|
844
1122
|
"kind": "field"
|
|
845
1123
|
}
|
|
846
1124
|
}
|
|
847
|
-
]
|
|
848
|
-
"kind": "struct",
|
|
849
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
1125
|
+
]
|
|
850
1126
|
}
|
|
851
1127
|
},
|
|
852
1128
|
{
|
|
853
1129
|
"name": "contract_address",
|
|
854
1130
|
"type": {
|
|
1131
|
+
"kind": "struct",
|
|
1132
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
855
1133
|
"fields": [
|
|
856
1134
|
{
|
|
857
1135
|
"name": "inner",
|
|
@@ -859,14 +1137,14 @@
|
|
|
859
1137
|
"kind": "field"
|
|
860
1138
|
}
|
|
861
1139
|
}
|
|
862
|
-
]
|
|
863
|
-
"kind": "struct",
|
|
864
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
1140
|
+
]
|
|
865
1141
|
}
|
|
866
1142
|
},
|
|
867
1143
|
{
|
|
868
1144
|
"name": "function_selector",
|
|
869
1145
|
"type": {
|
|
1146
|
+
"kind": "struct",
|
|
1147
|
+
"path": "authwit::aztec::protocol_types::abis::function_selector::FunctionSelector",
|
|
870
1148
|
"fields": [
|
|
871
1149
|
{
|
|
872
1150
|
"name": "inner",
|
|
@@ -876,9 +1154,7 @@
|
|
|
876
1154
|
"width": 32
|
|
877
1155
|
}
|
|
878
1156
|
}
|
|
879
|
-
]
|
|
880
|
-
"kind": "struct",
|
|
881
|
-
"path": "authwit::aztec::protocol_types::abis::function_selector::FunctionSelector"
|
|
1157
|
+
]
|
|
882
1158
|
}
|
|
883
1159
|
},
|
|
884
1160
|
{
|
|
@@ -887,9 +1163,7 @@
|
|
|
887
1163
|
"kind": "boolean"
|
|
888
1164
|
}
|
|
889
1165
|
}
|
|
890
|
-
]
|
|
891
|
-
"kind": "struct",
|
|
892
|
-
"path": "authwit::aztec::protocol_types::abis::call_context::CallContext"
|
|
1166
|
+
]
|
|
893
1167
|
}
|
|
894
1168
|
},
|
|
895
1169
|
{
|
|
@@ -921,10 +1195,14 @@
|
|
|
921
1195
|
{
|
|
922
1196
|
"name": "max_block_number",
|
|
923
1197
|
"type": {
|
|
1198
|
+
"kind": "struct",
|
|
1199
|
+
"path": "authwit::aztec::protocol_types::abis::max_block_number::MaxBlockNumber",
|
|
924
1200
|
"fields": [
|
|
925
1201
|
{
|
|
926
1202
|
"name": "_opt",
|
|
927
1203
|
"type": {
|
|
1204
|
+
"kind": "struct",
|
|
1205
|
+
"path": "std::option::Option",
|
|
928
1206
|
"fields": [
|
|
929
1207
|
{
|
|
930
1208
|
"name": "_is_some",
|
|
@@ -940,14 +1218,10 @@
|
|
|
940
1218
|
"width": 32
|
|
941
1219
|
}
|
|
942
1220
|
}
|
|
943
|
-
]
|
|
944
|
-
"kind": "struct",
|
|
945
|
-
"path": "std::option::Option"
|
|
1221
|
+
]
|
|
946
1222
|
}
|
|
947
1223
|
}
|
|
948
|
-
]
|
|
949
|
-
"kind": "struct",
|
|
950
|
-
"path": "authwit::aztec::protocol_types::abis::max_block_number::MaxBlockNumber"
|
|
1224
|
+
]
|
|
951
1225
|
}
|
|
952
1226
|
},
|
|
953
1227
|
{
|
|
@@ -956,6 +1230,8 @@
|
|
|
956
1230
|
"kind": "array",
|
|
957
1231
|
"length": 16,
|
|
958
1232
|
"type": {
|
|
1233
|
+
"kind": "struct",
|
|
1234
|
+
"path": "authwit::aztec::protocol_types::abis::read_request::ReadRequest",
|
|
959
1235
|
"fields": [
|
|
960
1236
|
{
|
|
961
1237
|
"name": "value",
|
|
@@ -971,9 +1247,7 @@
|
|
|
971
1247
|
"width": 32
|
|
972
1248
|
}
|
|
973
1249
|
}
|
|
974
|
-
]
|
|
975
|
-
"kind": "struct",
|
|
976
|
-
"path": "authwit::aztec::protocol_types::abis::read_request::ReadRequest"
|
|
1250
|
+
]
|
|
977
1251
|
}
|
|
978
1252
|
}
|
|
979
1253
|
},
|
|
@@ -983,6 +1257,8 @@
|
|
|
983
1257
|
"kind": "array",
|
|
984
1258
|
"length": 16,
|
|
985
1259
|
"type": {
|
|
1260
|
+
"kind": "struct",
|
|
1261
|
+
"path": "authwit::aztec::protocol_types::abis::read_request::ReadRequest",
|
|
986
1262
|
"fields": [
|
|
987
1263
|
{
|
|
988
1264
|
"name": "value",
|
|
@@ -998,9 +1274,7 @@
|
|
|
998
1274
|
"width": 32
|
|
999
1275
|
}
|
|
1000
1276
|
}
|
|
1001
|
-
]
|
|
1002
|
-
"kind": "struct",
|
|
1003
|
-
"path": "authwit::aztec::protocol_types::abis::read_request::ReadRequest"
|
|
1277
|
+
]
|
|
1004
1278
|
}
|
|
1005
1279
|
}
|
|
1006
1280
|
},
|
|
@@ -1010,14 +1284,20 @@
|
|
|
1010
1284
|
"kind": "array",
|
|
1011
1285
|
"length": 16,
|
|
1012
1286
|
"type": {
|
|
1287
|
+
"kind": "struct",
|
|
1288
|
+
"path": "authwit::aztec::protocol_types::abis::validation_requests::key_validation_request_and_generator::KeyValidationRequestAndGenerator",
|
|
1013
1289
|
"fields": [
|
|
1014
1290
|
{
|
|
1015
1291
|
"name": "request",
|
|
1016
1292
|
"type": {
|
|
1293
|
+
"kind": "struct",
|
|
1294
|
+
"path": "authwit::aztec::protocol_types::abis::validation_requests::key_validation_request::KeyValidationRequest",
|
|
1017
1295
|
"fields": [
|
|
1018
1296
|
{
|
|
1019
1297
|
"name": "pk_m",
|
|
1020
1298
|
"type": {
|
|
1299
|
+
"kind": "struct",
|
|
1300
|
+
"path": "std::embedded_curve_ops::EmbeddedCurvePoint",
|
|
1021
1301
|
"fields": [
|
|
1022
1302
|
{
|
|
1023
1303
|
"name": "x",
|
|
@@ -1037,9 +1317,7 @@
|
|
|
1037
1317
|
"kind": "boolean"
|
|
1038
1318
|
}
|
|
1039
1319
|
}
|
|
1040
|
-
]
|
|
1041
|
-
"kind": "struct",
|
|
1042
|
-
"path": "std::embedded_curve_ops::EmbeddedCurvePoint"
|
|
1320
|
+
]
|
|
1043
1321
|
}
|
|
1044
1322
|
},
|
|
1045
1323
|
{
|
|
@@ -1048,9 +1326,7 @@
|
|
|
1048
1326
|
"kind": "field"
|
|
1049
1327
|
}
|
|
1050
1328
|
}
|
|
1051
|
-
]
|
|
1052
|
-
"kind": "struct",
|
|
1053
|
-
"path": "authwit::aztec::protocol_types::abis::validation_requests::key_validation_request::KeyValidationRequest"
|
|
1329
|
+
]
|
|
1054
1330
|
}
|
|
1055
1331
|
},
|
|
1056
1332
|
{
|
|
@@ -1059,9 +1335,7 @@
|
|
|
1059
1335
|
"kind": "field"
|
|
1060
1336
|
}
|
|
1061
1337
|
}
|
|
1062
|
-
]
|
|
1063
|
-
"kind": "struct",
|
|
1064
|
-
"path": "authwit::aztec::protocol_types::abis::validation_requests::key_validation_request_and_generator::KeyValidationRequestAndGenerator"
|
|
1338
|
+
]
|
|
1065
1339
|
}
|
|
1066
1340
|
}
|
|
1067
1341
|
},
|
|
@@ -1071,6 +1345,8 @@
|
|
|
1071
1345
|
"kind": "array",
|
|
1072
1346
|
"length": 16,
|
|
1073
1347
|
"type": {
|
|
1348
|
+
"kind": "struct",
|
|
1349
|
+
"path": "authwit::aztec::protocol_types::abis::note_hash::NoteHash",
|
|
1074
1350
|
"fields": [
|
|
1075
1351
|
{
|
|
1076
1352
|
"name": "value",
|
|
@@ -1086,9 +1362,7 @@
|
|
|
1086
1362
|
"width": 32
|
|
1087
1363
|
}
|
|
1088
1364
|
}
|
|
1089
|
-
]
|
|
1090
|
-
"kind": "struct",
|
|
1091
|
-
"path": "authwit::aztec::protocol_types::abis::note_hash::NoteHash"
|
|
1365
|
+
]
|
|
1092
1366
|
}
|
|
1093
1367
|
}
|
|
1094
1368
|
},
|
|
@@ -1098,6 +1372,8 @@
|
|
|
1098
1372
|
"kind": "array",
|
|
1099
1373
|
"length": 16,
|
|
1100
1374
|
"type": {
|
|
1375
|
+
"kind": "struct",
|
|
1376
|
+
"path": "authwit::aztec::protocol_types::abis::nullifier::Nullifier",
|
|
1101
1377
|
"fields": [
|
|
1102
1378
|
{
|
|
1103
1379
|
"name": "value",
|
|
@@ -1119,9 +1395,7 @@
|
|
|
1119
1395
|
"kind": "field"
|
|
1120
1396
|
}
|
|
1121
1397
|
}
|
|
1122
|
-
]
|
|
1123
|
-
"kind": "struct",
|
|
1124
|
-
"path": "authwit::aztec::protocol_types::abis::nullifier::Nullifier"
|
|
1398
|
+
]
|
|
1125
1399
|
}
|
|
1126
1400
|
}
|
|
1127
1401
|
},
|
|
@@ -1131,14 +1405,20 @@
|
|
|
1131
1405
|
"kind": "array",
|
|
1132
1406
|
"length": 5,
|
|
1133
1407
|
"type": {
|
|
1408
|
+
"kind": "struct",
|
|
1409
|
+
"path": "authwit::aztec::protocol_types::abis::private_call_request::PrivateCallRequest",
|
|
1134
1410
|
"fields": [
|
|
1135
1411
|
{
|
|
1136
1412
|
"name": "call_context",
|
|
1137
1413
|
"type": {
|
|
1414
|
+
"kind": "struct",
|
|
1415
|
+
"path": "authwit::aztec::protocol_types::abis::call_context::CallContext",
|
|
1138
1416
|
"fields": [
|
|
1139
1417
|
{
|
|
1140
1418
|
"name": "msg_sender",
|
|
1141
1419
|
"type": {
|
|
1420
|
+
"kind": "struct",
|
|
1421
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
1142
1422
|
"fields": [
|
|
1143
1423
|
{
|
|
1144
1424
|
"name": "inner",
|
|
@@ -1146,14 +1426,14 @@
|
|
|
1146
1426
|
"kind": "field"
|
|
1147
1427
|
}
|
|
1148
1428
|
}
|
|
1149
|
-
]
|
|
1150
|
-
"kind": "struct",
|
|
1151
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
1429
|
+
]
|
|
1152
1430
|
}
|
|
1153
1431
|
},
|
|
1154
1432
|
{
|
|
1155
1433
|
"name": "contract_address",
|
|
1156
1434
|
"type": {
|
|
1435
|
+
"kind": "struct",
|
|
1436
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
1157
1437
|
"fields": [
|
|
1158
1438
|
{
|
|
1159
1439
|
"name": "inner",
|
|
@@ -1161,14 +1441,14 @@
|
|
|
1161
1441
|
"kind": "field"
|
|
1162
1442
|
}
|
|
1163
1443
|
}
|
|
1164
|
-
]
|
|
1165
|
-
"kind": "struct",
|
|
1166
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
1444
|
+
]
|
|
1167
1445
|
}
|
|
1168
1446
|
},
|
|
1169
1447
|
{
|
|
1170
1448
|
"name": "function_selector",
|
|
1171
1449
|
"type": {
|
|
1450
|
+
"kind": "struct",
|
|
1451
|
+
"path": "authwit::aztec::protocol_types::abis::function_selector::FunctionSelector",
|
|
1172
1452
|
"fields": [
|
|
1173
1453
|
{
|
|
1174
1454
|
"name": "inner",
|
|
@@ -1178,9 +1458,7 @@
|
|
|
1178
1458
|
"width": 32
|
|
1179
1459
|
}
|
|
1180
1460
|
}
|
|
1181
|
-
]
|
|
1182
|
-
"kind": "struct",
|
|
1183
|
-
"path": "authwit::aztec::protocol_types::abis::function_selector::FunctionSelector"
|
|
1461
|
+
]
|
|
1184
1462
|
}
|
|
1185
1463
|
},
|
|
1186
1464
|
{
|
|
@@ -1189,9 +1467,7 @@
|
|
|
1189
1467
|
"kind": "boolean"
|
|
1190
1468
|
}
|
|
1191
1469
|
}
|
|
1192
|
-
]
|
|
1193
|
-
"kind": "struct",
|
|
1194
|
-
"path": "authwit::aztec::protocol_types::abis::call_context::CallContext"
|
|
1470
|
+
]
|
|
1195
1471
|
}
|
|
1196
1472
|
},
|
|
1197
1473
|
{
|
|
@@ -1222,9 +1498,7 @@
|
|
|
1222
1498
|
"width": 32
|
|
1223
1499
|
}
|
|
1224
1500
|
}
|
|
1225
|
-
]
|
|
1226
|
-
"kind": "struct",
|
|
1227
|
-
"path": "authwit::aztec::protocol_types::abis::private_call_request::PrivateCallRequest"
|
|
1501
|
+
]
|
|
1228
1502
|
}
|
|
1229
1503
|
}
|
|
1230
1504
|
},
|
|
@@ -1234,14 +1508,20 @@
|
|
|
1234
1508
|
"kind": "array",
|
|
1235
1509
|
"length": 16,
|
|
1236
1510
|
"type": {
|
|
1511
|
+
"kind": "struct",
|
|
1512
|
+
"path": "authwit::aztec::protocol_types::abis::side_effect::counted::Counted",
|
|
1237
1513
|
"fields": [
|
|
1238
1514
|
{
|
|
1239
1515
|
"name": "inner",
|
|
1240
1516
|
"type": {
|
|
1517
|
+
"kind": "struct",
|
|
1518
|
+
"path": "authwit::aztec::protocol_types::abis::public_call_request::PublicCallRequest",
|
|
1241
1519
|
"fields": [
|
|
1242
1520
|
{
|
|
1243
1521
|
"name": "msg_sender",
|
|
1244
1522
|
"type": {
|
|
1523
|
+
"kind": "struct",
|
|
1524
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
1245
1525
|
"fields": [
|
|
1246
1526
|
{
|
|
1247
1527
|
"name": "inner",
|
|
@@ -1249,14 +1529,14 @@
|
|
|
1249
1529
|
"kind": "field"
|
|
1250
1530
|
}
|
|
1251
1531
|
}
|
|
1252
|
-
]
|
|
1253
|
-
"kind": "struct",
|
|
1254
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
1532
|
+
]
|
|
1255
1533
|
}
|
|
1256
1534
|
},
|
|
1257
1535
|
{
|
|
1258
1536
|
"name": "contract_address",
|
|
1259
1537
|
"type": {
|
|
1538
|
+
"kind": "struct",
|
|
1539
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
1260
1540
|
"fields": [
|
|
1261
1541
|
{
|
|
1262
1542
|
"name": "inner",
|
|
@@ -1264,14 +1544,14 @@
|
|
|
1264
1544
|
"kind": "field"
|
|
1265
1545
|
}
|
|
1266
1546
|
}
|
|
1267
|
-
]
|
|
1268
|
-
"kind": "struct",
|
|
1269
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
1547
|
+
]
|
|
1270
1548
|
}
|
|
1271
1549
|
},
|
|
1272
1550
|
{
|
|
1273
1551
|
"name": "function_selector",
|
|
1274
1552
|
"type": {
|
|
1553
|
+
"kind": "struct",
|
|
1554
|
+
"path": "authwit::aztec::protocol_types::abis::function_selector::FunctionSelector",
|
|
1275
1555
|
"fields": [
|
|
1276
1556
|
{
|
|
1277
1557
|
"name": "inner",
|
|
@@ -1281,9 +1561,7 @@
|
|
|
1281
1561
|
"width": 32
|
|
1282
1562
|
}
|
|
1283
1563
|
}
|
|
1284
|
-
]
|
|
1285
|
-
"kind": "struct",
|
|
1286
|
-
"path": "authwit::aztec::protocol_types::abis::function_selector::FunctionSelector"
|
|
1564
|
+
]
|
|
1287
1565
|
}
|
|
1288
1566
|
},
|
|
1289
1567
|
{
|
|
@@ -1298,9 +1576,7 @@
|
|
|
1298
1576
|
"kind": "field"
|
|
1299
1577
|
}
|
|
1300
1578
|
}
|
|
1301
|
-
]
|
|
1302
|
-
"kind": "struct",
|
|
1303
|
-
"path": "authwit::aztec::protocol_types::abis::public_call_request::PublicCallRequest"
|
|
1579
|
+
]
|
|
1304
1580
|
}
|
|
1305
1581
|
},
|
|
1306
1582
|
{
|
|
@@ -1311,19 +1587,21 @@
|
|
|
1311
1587
|
"width": 32
|
|
1312
1588
|
}
|
|
1313
1589
|
}
|
|
1314
|
-
]
|
|
1315
|
-
"kind": "struct",
|
|
1316
|
-
"path": "authwit::aztec::protocol_types::abis::side_effect::counted::Counted"
|
|
1590
|
+
]
|
|
1317
1591
|
}
|
|
1318
1592
|
}
|
|
1319
1593
|
},
|
|
1320
1594
|
{
|
|
1321
1595
|
"name": "public_teardown_call_request",
|
|
1322
1596
|
"type": {
|
|
1597
|
+
"kind": "struct",
|
|
1598
|
+
"path": "authwit::aztec::protocol_types::abis::public_call_request::PublicCallRequest",
|
|
1323
1599
|
"fields": [
|
|
1324
1600
|
{
|
|
1325
1601
|
"name": "msg_sender",
|
|
1326
1602
|
"type": {
|
|
1603
|
+
"kind": "struct",
|
|
1604
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
1327
1605
|
"fields": [
|
|
1328
1606
|
{
|
|
1329
1607
|
"name": "inner",
|
|
@@ -1331,14 +1609,14 @@
|
|
|
1331
1609
|
"kind": "field"
|
|
1332
1610
|
}
|
|
1333
1611
|
}
|
|
1334
|
-
]
|
|
1335
|
-
"kind": "struct",
|
|
1336
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
1612
|
+
]
|
|
1337
1613
|
}
|
|
1338
1614
|
},
|
|
1339
1615
|
{
|
|
1340
1616
|
"name": "contract_address",
|
|
1341
1617
|
"type": {
|
|
1618
|
+
"kind": "struct",
|
|
1619
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
1342
1620
|
"fields": [
|
|
1343
1621
|
{
|
|
1344
1622
|
"name": "inner",
|
|
@@ -1346,14 +1624,14 @@
|
|
|
1346
1624
|
"kind": "field"
|
|
1347
1625
|
}
|
|
1348
1626
|
}
|
|
1349
|
-
]
|
|
1350
|
-
"kind": "struct",
|
|
1351
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
1627
|
+
]
|
|
1352
1628
|
}
|
|
1353
1629
|
},
|
|
1354
1630
|
{
|
|
1355
1631
|
"name": "function_selector",
|
|
1356
1632
|
"type": {
|
|
1633
|
+
"kind": "struct",
|
|
1634
|
+
"path": "authwit::aztec::protocol_types::abis::function_selector::FunctionSelector",
|
|
1357
1635
|
"fields": [
|
|
1358
1636
|
{
|
|
1359
1637
|
"name": "inner",
|
|
@@ -1363,9 +1641,7 @@
|
|
|
1363
1641
|
"width": 32
|
|
1364
1642
|
}
|
|
1365
1643
|
}
|
|
1366
|
-
]
|
|
1367
|
-
"kind": "struct",
|
|
1368
|
-
"path": "authwit::aztec::protocol_types::abis::function_selector::FunctionSelector"
|
|
1644
|
+
]
|
|
1369
1645
|
}
|
|
1370
1646
|
},
|
|
1371
1647
|
{
|
|
@@ -1380,9 +1656,7 @@
|
|
|
1380
1656
|
"kind": "field"
|
|
1381
1657
|
}
|
|
1382
1658
|
}
|
|
1383
|
-
]
|
|
1384
|
-
"kind": "struct",
|
|
1385
|
-
"path": "authwit::aztec::protocol_types::abis::public_call_request::PublicCallRequest"
|
|
1659
|
+
]
|
|
1386
1660
|
}
|
|
1387
1661
|
},
|
|
1388
1662
|
{
|
|
@@ -1391,10 +1665,14 @@
|
|
|
1391
1665
|
"kind": "array",
|
|
1392
1666
|
"length": 2,
|
|
1393
1667
|
"type": {
|
|
1668
|
+
"kind": "struct",
|
|
1669
|
+
"path": "authwit::aztec::protocol_types::messaging::l2_to_l1_message::L2ToL1Message",
|
|
1394
1670
|
"fields": [
|
|
1395
1671
|
{
|
|
1396
1672
|
"name": "recipient",
|
|
1397
1673
|
"type": {
|
|
1674
|
+
"kind": "struct",
|
|
1675
|
+
"path": "authwit::aztec::protocol_types::address::eth_address::EthAddress",
|
|
1398
1676
|
"fields": [
|
|
1399
1677
|
{
|
|
1400
1678
|
"name": "inner",
|
|
@@ -1402,9 +1680,7 @@
|
|
|
1402
1680
|
"kind": "field"
|
|
1403
1681
|
}
|
|
1404
1682
|
}
|
|
1405
|
-
]
|
|
1406
|
-
"kind": "struct",
|
|
1407
|
-
"path": "authwit::aztec::protocol_types::address::eth_address::EthAddress"
|
|
1683
|
+
]
|
|
1408
1684
|
}
|
|
1409
1685
|
},
|
|
1410
1686
|
{
|
|
@@ -1421,9 +1697,7 @@
|
|
|
1421
1697
|
"width": 32
|
|
1422
1698
|
}
|
|
1423
1699
|
}
|
|
1424
|
-
]
|
|
1425
|
-
"kind": "struct",
|
|
1426
|
-
"path": "authwit::aztec::protocol_types::messaging::l2_to_l1_message::L2ToL1Message"
|
|
1700
|
+
]
|
|
1427
1701
|
}
|
|
1428
1702
|
}
|
|
1429
1703
|
},
|
|
@@ -1433,10 +1707,14 @@
|
|
|
1433
1707
|
"kind": "array",
|
|
1434
1708
|
"length": 16,
|
|
1435
1709
|
"type": {
|
|
1710
|
+
"kind": "struct",
|
|
1711
|
+
"path": "authwit::aztec::protocol_types::abis::private_log::PrivateLogData",
|
|
1436
1712
|
"fields": [
|
|
1437
1713
|
{
|
|
1438
1714
|
"name": "log",
|
|
1439
1715
|
"type": {
|
|
1716
|
+
"kind": "struct",
|
|
1717
|
+
"path": "authwit::aztec::protocol_types::abis::log::Log",
|
|
1440
1718
|
"fields": [
|
|
1441
1719
|
{
|
|
1442
1720
|
"name": "fields",
|
|
@@ -1448,9 +1726,7 @@
|
|
|
1448
1726
|
}
|
|
1449
1727
|
}
|
|
1450
1728
|
}
|
|
1451
|
-
]
|
|
1452
|
-
"kind": "struct",
|
|
1453
|
-
"path": "authwit::aztec::protocol_types::abis::log::Log"
|
|
1729
|
+
]
|
|
1454
1730
|
}
|
|
1455
1731
|
},
|
|
1456
1732
|
{
|
|
@@ -1469,9 +1745,7 @@
|
|
|
1469
1745
|
"width": 32
|
|
1470
1746
|
}
|
|
1471
1747
|
}
|
|
1472
|
-
]
|
|
1473
|
-
"kind": "struct",
|
|
1474
|
-
"path": "authwit::aztec::protocol_types::abis::private_log::PrivateLogData"
|
|
1748
|
+
]
|
|
1475
1749
|
}
|
|
1476
1750
|
}
|
|
1477
1751
|
},
|
|
@@ -1481,6 +1755,8 @@
|
|
|
1481
1755
|
"kind": "array",
|
|
1482
1756
|
"length": 1,
|
|
1483
1757
|
"type": {
|
|
1758
|
+
"kind": "struct",
|
|
1759
|
+
"path": "authwit::aztec::protocol_types::abis::log_hash::LogHash",
|
|
1484
1760
|
"fields": [
|
|
1485
1761
|
{
|
|
1486
1762
|
"name": "value",
|
|
@@ -1504,9 +1780,7 @@
|
|
|
1504
1780
|
"width": 32
|
|
1505
1781
|
}
|
|
1506
1782
|
}
|
|
1507
|
-
]
|
|
1508
|
-
"kind": "struct",
|
|
1509
|
-
"path": "authwit::aztec::protocol_types::abis::log_hash::LogHash"
|
|
1783
|
+
]
|
|
1510
1784
|
}
|
|
1511
1785
|
}
|
|
1512
1786
|
},
|
|
@@ -1529,10 +1803,14 @@
|
|
|
1529
1803
|
{
|
|
1530
1804
|
"name": "historical_header",
|
|
1531
1805
|
"type": {
|
|
1806
|
+
"kind": "struct",
|
|
1807
|
+
"path": "authwit::aztec::protocol_types::block_header::BlockHeader",
|
|
1532
1808
|
"fields": [
|
|
1533
1809
|
{
|
|
1534
1810
|
"name": "last_archive",
|
|
1535
1811
|
"type": {
|
|
1812
|
+
"kind": "struct",
|
|
1813
|
+
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
1536
1814
|
"fields": [
|
|
1537
1815
|
{
|
|
1538
1816
|
"name": "root",
|
|
@@ -1548,14 +1826,14 @@
|
|
|
1548
1826
|
"width": 32
|
|
1549
1827
|
}
|
|
1550
1828
|
}
|
|
1551
|
-
]
|
|
1552
|
-
"kind": "struct",
|
|
1553
|
-
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
|
|
1829
|
+
]
|
|
1554
1830
|
}
|
|
1555
1831
|
},
|
|
1556
1832
|
{
|
|
1557
1833
|
"name": "content_commitment",
|
|
1558
1834
|
"type": {
|
|
1835
|
+
"kind": "struct",
|
|
1836
|
+
"path": "authwit::aztec::protocol_types::content_commitment::ContentCommitment",
|
|
1559
1837
|
"fields": [
|
|
1560
1838
|
{
|
|
1561
1839
|
"name": "num_txs",
|
|
@@ -1581,18 +1859,20 @@
|
|
|
1581
1859
|
"kind": "field"
|
|
1582
1860
|
}
|
|
1583
1861
|
}
|
|
1584
|
-
]
|
|
1585
|
-
"kind": "struct",
|
|
1586
|
-
"path": "authwit::aztec::protocol_types::content_commitment::ContentCommitment"
|
|
1862
|
+
]
|
|
1587
1863
|
}
|
|
1588
1864
|
},
|
|
1589
1865
|
{
|
|
1590
1866
|
"name": "state",
|
|
1591
1867
|
"type": {
|
|
1868
|
+
"kind": "struct",
|
|
1869
|
+
"path": "authwit::aztec::protocol_types::state_reference::StateReference",
|
|
1592
1870
|
"fields": [
|
|
1593
1871
|
{
|
|
1594
1872
|
"name": "l1_to_l2_message_tree",
|
|
1595
1873
|
"type": {
|
|
1874
|
+
"kind": "struct",
|
|
1875
|
+
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
1596
1876
|
"fields": [
|
|
1597
1877
|
{
|
|
1598
1878
|
"name": "root",
|
|
@@ -1608,18 +1888,20 @@
|
|
|
1608
1888
|
"width": 32
|
|
1609
1889
|
}
|
|
1610
1890
|
}
|
|
1611
|
-
]
|
|
1612
|
-
"kind": "struct",
|
|
1613
|
-
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
|
|
1891
|
+
]
|
|
1614
1892
|
}
|
|
1615
1893
|
},
|
|
1616
1894
|
{
|
|
1617
1895
|
"name": "partial",
|
|
1618
1896
|
"type": {
|
|
1897
|
+
"kind": "struct",
|
|
1898
|
+
"path": "authwit::aztec::protocol_types::partial_state_reference::PartialStateReference",
|
|
1619
1899
|
"fields": [
|
|
1620
1900
|
{
|
|
1621
1901
|
"name": "note_hash_tree",
|
|
1622
1902
|
"type": {
|
|
1903
|
+
"kind": "struct",
|
|
1904
|
+
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
1623
1905
|
"fields": [
|
|
1624
1906
|
{
|
|
1625
1907
|
"name": "root",
|
|
@@ -1635,14 +1917,14 @@
|
|
|
1635
1917
|
"width": 32
|
|
1636
1918
|
}
|
|
1637
1919
|
}
|
|
1638
|
-
]
|
|
1639
|
-
"kind": "struct",
|
|
1640
|
-
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
|
|
1920
|
+
]
|
|
1641
1921
|
}
|
|
1642
1922
|
},
|
|
1643
1923
|
{
|
|
1644
1924
|
"name": "nullifier_tree",
|
|
1645
1925
|
"type": {
|
|
1926
|
+
"kind": "struct",
|
|
1927
|
+
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
1646
1928
|
"fields": [
|
|
1647
1929
|
{
|
|
1648
1930
|
"name": "root",
|
|
@@ -1658,14 +1940,14 @@
|
|
|
1658
1940
|
"width": 32
|
|
1659
1941
|
}
|
|
1660
1942
|
}
|
|
1661
|
-
]
|
|
1662
|
-
"kind": "struct",
|
|
1663
|
-
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
|
|
1943
|
+
]
|
|
1664
1944
|
}
|
|
1665
1945
|
},
|
|
1666
1946
|
{
|
|
1667
1947
|
"name": "public_data_tree",
|
|
1668
1948
|
"type": {
|
|
1949
|
+
"kind": "struct",
|
|
1950
|
+
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
1669
1951
|
"fields": [
|
|
1670
1952
|
{
|
|
1671
1953
|
"name": "root",
|
|
@@ -1681,24 +1963,20 @@
|
|
|
1681
1963
|
"width": 32
|
|
1682
1964
|
}
|
|
1683
1965
|
}
|
|
1684
|
-
]
|
|
1685
|
-
"kind": "struct",
|
|
1686
|
-
"path": "authwit::aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot"
|
|
1966
|
+
]
|
|
1687
1967
|
}
|
|
1688
1968
|
}
|
|
1689
|
-
]
|
|
1690
|
-
"kind": "struct",
|
|
1691
|
-
"path": "authwit::aztec::protocol_types::partial_state_reference::PartialStateReference"
|
|
1969
|
+
]
|
|
1692
1970
|
}
|
|
1693
1971
|
}
|
|
1694
|
-
]
|
|
1695
|
-
"kind": "struct",
|
|
1696
|
-
"path": "authwit::aztec::protocol_types::state_reference::StateReference"
|
|
1972
|
+
]
|
|
1697
1973
|
}
|
|
1698
1974
|
},
|
|
1699
1975
|
{
|
|
1700
1976
|
"name": "global_variables",
|
|
1701
1977
|
"type": {
|
|
1978
|
+
"kind": "struct",
|
|
1979
|
+
"path": "authwit::aztec::protocol_types::abis::global_variables::GlobalVariables",
|
|
1702
1980
|
"fields": [
|
|
1703
1981
|
{
|
|
1704
1982
|
"name": "chain_id",
|
|
@@ -1735,6 +2013,8 @@
|
|
|
1735
2013
|
{
|
|
1736
2014
|
"name": "coinbase",
|
|
1737
2015
|
"type": {
|
|
2016
|
+
"kind": "struct",
|
|
2017
|
+
"path": "authwit::aztec::protocol_types::address::eth_address::EthAddress",
|
|
1738
2018
|
"fields": [
|
|
1739
2019
|
{
|
|
1740
2020
|
"name": "inner",
|
|
@@ -1742,14 +2022,14 @@
|
|
|
1742
2022
|
"kind": "field"
|
|
1743
2023
|
}
|
|
1744
2024
|
}
|
|
1745
|
-
]
|
|
1746
|
-
"kind": "struct",
|
|
1747
|
-
"path": "authwit::aztec::protocol_types::address::eth_address::EthAddress"
|
|
2025
|
+
]
|
|
1748
2026
|
}
|
|
1749
2027
|
},
|
|
1750
2028
|
{
|
|
1751
2029
|
"name": "fee_recipient",
|
|
1752
2030
|
"type": {
|
|
2031
|
+
"kind": "struct",
|
|
2032
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
1753
2033
|
"fields": [
|
|
1754
2034
|
{
|
|
1755
2035
|
"name": "inner",
|
|
@@ -1757,14 +2037,14 @@
|
|
|
1757
2037
|
"kind": "field"
|
|
1758
2038
|
}
|
|
1759
2039
|
}
|
|
1760
|
-
]
|
|
1761
|
-
"kind": "struct",
|
|
1762
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
2040
|
+
]
|
|
1763
2041
|
}
|
|
1764
2042
|
},
|
|
1765
2043
|
{
|
|
1766
2044
|
"name": "gas_fees",
|
|
1767
2045
|
"type": {
|
|
2046
|
+
"kind": "struct",
|
|
2047
|
+
"path": "authwit::aztec::protocol_types::abis::gas_fees::GasFees",
|
|
1768
2048
|
"fields": [
|
|
1769
2049
|
{
|
|
1770
2050
|
"name": "fee_per_da_gas",
|
|
@@ -1778,14 +2058,10 @@
|
|
|
1778
2058
|
"kind": "field"
|
|
1779
2059
|
}
|
|
1780
2060
|
}
|
|
1781
|
-
]
|
|
1782
|
-
"kind": "struct",
|
|
1783
|
-
"path": "authwit::aztec::protocol_types::abis::gas_fees::GasFees"
|
|
2061
|
+
]
|
|
1784
2062
|
}
|
|
1785
2063
|
}
|
|
1786
|
-
]
|
|
1787
|
-
"kind": "struct",
|
|
1788
|
-
"path": "authwit::aztec::protocol_types::abis::global_variables::GlobalVariables"
|
|
2064
|
+
]
|
|
1789
2065
|
}
|
|
1790
2066
|
},
|
|
1791
2067
|
{
|
|
@@ -1800,14 +2076,14 @@
|
|
|
1800
2076
|
"kind": "field"
|
|
1801
2077
|
}
|
|
1802
2078
|
}
|
|
1803
|
-
]
|
|
1804
|
-
"kind": "struct",
|
|
1805
|
-
"path": "authwit::aztec::protocol_types::block_header::BlockHeader"
|
|
2079
|
+
]
|
|
1806
2080
|
}
|
|
1807
2081
|
},
|
|
1808
2082
|
{
|
|
1809
2083
|
"name": "tx_context",
|
|
1810
2084
|
"type": {
|
|
2085
|
+
"kind": "struct",
|
|
2086
|
+
"path": "authwit::aztec::protocol_types::transaction::tx_context::TxContext",
|
|
1811
2087
|
"fields": [
|
|
1812
2088
|
{
|
|
1813
2089
|
"name": "chain_id",
|
|
@@ -1824,10 +2100,14 @@
|
|
|
1824
2100
|
{
|
|
1825
2101
|
"name": "gas_settings",
|
|
1826
2102
|
"type": {
|
|
2103
|
+
"kind": "struct",
|
|
2104
|
+
"path": "authwit::aztec::protocol_types::abis::gas_settings::GasSettings",
|
|
1827
2105
|
"fields": [
|
|
1828
2106
|
{
|
|
1829
2107
|
"name": "gas_limits",
|
|
1830
2108
|
"type": {
|
|
2109
|
+
"kind": "struct",
|
|
2110
|
+
"path": "authwit::aztec::protocol_types::abis::gas::Gas",
|
|
1831
2111
|
"fields": [
|
|
1832
2112
|
{
|
|
1833
2113
|
"name": "da_gas",
|
|
@@ -1845,14 +2125,14 @@
|
|
|
1845
2125
|
"width": 32
|
|
1846
2126
|
}
|
|
1847
2127
|
}
|
|
1848
|
-
]
|
|
1849
|
-
"kind": "struct",
|
|
1850
|
-
"path": "authwit::aztec::protocol_types::abis::gas::Gas"
|
|
2128
|
+
]
|
|
1851
2129
|
}
|
|
1852
2130
|
},
|
|
1853
2131
|
{
|
|
1854
2132
|
"name": "teardown_gas_limits",
|
|
1855
2133
|
"type": {
|
|
2134
|
+
"kind": "struct",
|
|
2135
|
+
"path": "authwit::aztec::protocol_types::abis::gas::Gas",
|
|
1856
2136
|
"fields": [
|
|
1857
2137
|
{
|
|
1858
2138
|
"name": "da_gas",
|
|
@@ -1870,14 +2150,14 @@
|
|
|
1870
2150
|
"width": 32
|
|
1871
2151
|
}
|
|
1872
2152
|
}
|
|
1873
|
-
]
|
|
1874
|
-
"kind": "struct",
|
|
1875
|
-
"path": "authwit::aztec::protocol_types::abis::gas::Gas"
|
|
2153
|
+
]
|
|
1876
2154
|
}
|
|
1877
2155
|
},
|
|
1878
2156
|
{
|
|
1879
2157
|
"name": "max_fees_per_gas",
|
|
1880
2158
|
"type": {
|
|
2159
|
+
"kind": "struct",
|
|
2160
|
+
"path": "authwit::aztec::protocol_types::abis::gas_fees::GasFees",
|
|
1881
2161
|
"fields": [
|
|
1882
2162
|
{
|
|
1883
2163
|
"name": "fee_per_da_gas",
|
|
@@ -1891,14 +2171,14 @@
|
|
|
1891
2171
|
"kind": "field"
|
|
1892
2172
|
}
|
|
1893
2173
|
}
|
|
1894
|
-
]
|
|
1895
|
-
"kind": "struct",
|
|
1896
|
-
"path": "authwit::aztec::protocol_types::abis::gas_fees::GasFees"
|
|
2174
|
+
]
|
|
1897
2175
|
}
|
|
1898
2176
|
},
|
|
1899
2177
|
{
|
|
1900
2178
|
"name": "max_priority_fees_per_gas",
|
|
1901
2179
|
"type": {
|
|
2180
|
+
"kind": "struct",
|
|
2181
|
+
"path": "authwit::aztec::protocol_types::abis::gas_fees::GasFees",
|
|
1902
2182
|
"fields": [
|
|
1903
2183
|
{
|
|
1904
2184
|
"name": "fee_per_da_gas",
|
|
@@ -1912,247 +2192,28 @@
|
|
|
1912
2192
|
"kind": "field"
|
|
1913
2193
|
}
|
|
1914
2194
|
}
|
|
1915
|
-
]
|
|
1916
|
-
"kind": "struct",
|
|
1917
|
-
"path": "authwit::aztec::protocol_types::abis::gas_fees::GasFees"
|
|
2195
|
+
]
|
|
1918
2196
|
}
|
|
1919
2197
|
}
|
|
1920
|
-
]
|
|
1921
|
-
"kind": "struct",
|
|
1922
|
-
"path": "authwit::aztec::protocol_types::abis::gas_settings::GasSettings"
|
|
2198
|
+
]
|
|
1923
2199
|
}
|
|
1924
2200
|
}
|
|
1925
|
-
]
|
|
1926
|
-
"kind": "struct",
|
|
1927
|
-
"path": "authwit::aztec::protocol_types::transaction::tx_context::TxContext"
|
|
2201
|
+
]
|
|
1928
2202
|
}
|
|
1929
2203
|
}
|
|
1930
|
-
]
|
|
1931
|
-
"kind": "struct",
|
|
1932
|
-
"path": "authwit::aztec::protocol_types::abis::private_circuit_public_inputs::PrivateCircuitPublicInputs"
|
|
2204
|
+
]
|
|
1933
2205
|
},
|
|
1934
2206
|
"visibility": "databus"
|
|
1935
|
-
}
|
|
1936
|
-
},
|
|
1937
|
-
"bytecode": "H4sIAAAAAAAA/+2dBXgUV9uGJ9kkENxdgpNAws5KdjdYcHd3NskGAgGKhEI1daXuClRoqSv1Um+pu7e0hbq70v95253mZJiEr82ZlOcvc133tWM7c79n7MzMmXMSjD+7Ph7DaOr5sz8BeOK/iSDNNs76VfuTHear7TCursO4+g7jGjqMawZybePaO8yX5jCug8O4jg7jujmMy4j/qp01nBv/9XuzA4FYyBcz/WbU64vkhYPeQDAvO2yGzWA4WOAL+/2xcCAciuRFQt6IGfDHzMJgxF/o/bNr4ClblrdKnS/fTc+G/9wzYB8hbo1AkuIq6bAr3t/dKOtPV/obxuex/tcIw41Bk/g+nGTbVh5bGnir1pkZGpfVyKNv2zTTtg85b5tmyrZprPQ3Ufqb2rZNcwy3AC1BK4dtk6h523TTuK+31peepno+keWm2dJB93HaRt/5pMBpX2ijbHPprP5Eo+LjtC2G24H2En81HKfNNW6/thqP0w4uH6cdlG3TTulvr/Sn2bZNRwx3Ap1BF4dto3v/7KoxDdz07PbPPX32EXu63nVU+rsq/d1s26o7htNBBugR31bWtESj4i5XT3qbVt6vsnT3Vq0zO7qxfyQZZZlVw+UAuhvu7OC6NmZ+KBQORMyQq2lQTQe5t2qd2dqzd28ry1M9uHvGr5aZ9ruyng65C925rJ4ar4ZZLuWysuLpkBSP337GcmNHytR8Zbccrf5eVnCVXUZ6/Y+XES+GTeAD/mrImmdq3Gm8JGeWXhpijoZ9Qb8vHKvMs6rpGdB3u1Dopmfwn3v67SOcjqNABY8f1KxZ0HYcZWM4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PiMvMIxRcepcb1br3ZrL99efF6mev/tMtFSleVwTSWK0zsFLVTvJ0SjJTUgh7Zvt1VyhKEwU0zMBy/cByniJ2idoq3U4Kd0lyMBSwUDoeU9onhOAXsFLRTyE5hO0XsFLVTvJ0S7JS2+iGPQSHGF5SxKYx8ndspPero0vD9zMNpzeNpzdNpzfNpzctpzetpzft3NB/olflwWvPxpOal2WtjeREzkj8cRwTsFLRTyE5hO0XsFLVTvJmiwU6JZoo/8gprLhhUf1gwHuwUtFPITmE7RewUtVPa76/7+iL1q17pg50SzZTg7BSwU9BOISMltXC/JWi6p6ULqPLh9qP9Du84hewUtlPETlEjJbWoRx75n6VYLgAx6sHxWGrxvBVNY/u+7ppFJOWtZy/DSZoSMTX/W+7Wy+vNqt/W978+bW/yLj81H/+/z7/kc4D73d3N6vZpt+pPBOphQF+NBB1DigD6Li2uEynb5P1XCp1q/3vfQULsIpQ+09PTtoFiprPrWGpp9F+BdghF8uMPlMJA6cilMFOoPwA=",
|
|
1939
|
-
"brillig_names": [
|
|
1940
|
-
"store_in_execution_cache_oracle_wrapper",
|
|
1941
|
-
"call_private_function_internal",
|
|
1942
|
-
"load",
|
|
1943
|
-
"notify_created_nullifier_oracle_wrapper",
|
|
1944
|
-
"store_in_execution_cache_oracle_wrapper",
|
|
1945
|
-
"enqueue_public_function_call_internal"
|
|
1946
|
-
],
|
|
1947
|
-
"verification_key": "AAAAAAAQAAAAAAAAAAAAFAAAAAAAAAAQAAAAAAADKLEBAAAAAAAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAAAAAAAAAAAAAGGx7t6AYK9pp+sz79yGWAEZ6OnDjQw9Do3YDQmLdbp0DiRb8S8+G91LV/+Pe7k3bI+E6fj7QCRlgcD7j1rCKXRc0rL4DF9uewSIihG9yc5jiN5nrfvaKN2yfIYkVZ9OgJEShpSozifZh2sfOJXKzNzVyUcaTAl6vPRqmHhEtcb4kl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stQRNUjiKIII650zdewGCRlEqALo3R6B2kgUMn7fMxqutLU5yPCBvQDENyb3W2/aDeIs4ODfq2vMegX/lalrKJQkxfczZw2WL5tuC04sAZaN5cMkgqp9HQoJ1xeOyTuteFj5bmTwtI0dWKphxkrVIgQ9ecSAIhnlW6GXUa3+bDYyTT+2wtoJiS18GKk8Pa5YgJ+q7saoanj0s7xh8Z1ucGk1m79H5/kH"
|
|
1948
|
-
},
|
|
1949
|
-
{
|
|
1950
|
-
"name": "set_authorized",
|
|
1951
|
-
"is_unconstrained": true,
|
|
1952
|
-
"custom_attributes": [
|
|
1953
|
-
"public"
|
|
1954
|
-
],
|
|
1955
|
-
"abi": {
|
|
1956
|
-
"error_types": {
|
|
1957
|
-
"16761564377371454734": {
|
|
1958
|
-
"error_kind": "string",
|
|
1959
|
-
"string": "Array index out of bounds"
|
|
1960
|
-
},
|
|
1961
|
-
"17843811134343075018": {
|
|
1962
|
-
"error_kind": "string",
|
|
1963
|
-
"string": "Stack too deep"
|
|
1964
|
-
},
|
|
1965
|
-
"206160798890201757": {
|
|
1966
|
-
"error_kind": "string",
|
|
1967
|
-
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
1968
|
-
},
|
|
1969
|
-
"5019202896831570965": {
|
|
1970
|
-
"error_kind": "string",
|
|
1971
|
-
"string": "attempt to add with overflow"
|
|
1972
|
-
}
|
|
1973
|
-
},
|
|
1974
|
-
"parameters": [
|
|
1975
|
-
{
|
|
1976
|
-
"name": "message_hash",
|
|
1977
|
-
"type": {
|
|
1978
|
-
"kind": "field"
|
|
1979
|
-
},
|
|
1980
|
-
"visibility": "private"
|
|
1981
|
-
},
|
|
1982
|
-
{
|
|
1983
|
-
"name": "authorize",
|
|
1984
|
-
"type": {
|
|
1985
|
-
"kind": "boolean"
|
|
1986
|
-
},
|
|
1987
|
-
"visibility": "private"
|
|
1988
|
-
}
|
|
1989
|
-
],
|
|
1990
|
-
"return_type": null
|
|
1991
|
-
},
|
|
1992
|
-
"b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3N8X878/zjvc/pgkw+WnP86AaiLrjjx6MDkikXZO3Q69Dz/w==",
|
|
1994
|
-
"brillig_names": [
|
|
1995
|
-
"set_authorized"
|
|
1996
|
-
]
|
|
1997
|
-
},
|
|
1998
|
-
{
|
|
1999
|
-
"name": "is_reject_all",
|
|
2000
|
-
"is_unconstrained": true,
|
|
2001
|
-
"custom_attributes": [
|
|
2002
|
-
"public",
|
|
2003
|
-
"view"
|
|
2004
|
-
],
|
|
2005
|
-
"abi": {
|
|
2006
|
-
"error_types": {
|
|
2007
|
-
"16761564377371454734": {
|
|
2008
|
-
"error_kind": "string",
|
|
2009
|
-
"string": "Array index out of bounds"
|
|
2010
|
-
},
|
|
2011
|
-
"17843811134343075018": {
|
|
2012
|
-
"error_kind": "string",
|
|
2013
|
-
"string": "Stack too deep"
|
|
2014
|
-
},
|
|
2015
|
-
"206160798890201757": {
|
|
2016
|
-
"error_kind": "string",
|
|
2017
|
-
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
2018
|
-
},
|
|
2019
|
-
"5019202896831570965": {
|
|
2020
|
-
"error_kind": "string",
|
|
2021
|
-
"string": "attempt to add with overflow"
|
|
2022
|
-
},
|
|
2023
|
-
"9474245853673257536": {
|
|
2024
|
-
"error_kind": "string",
|
|
2025
|
-
"string": "Function is_reject_all can only be called statically"
|
|
2026
|
-
}
|
|
2027
2207
|
},
|
|
2028
|
-
"parameters": [
|
|
2029
|
-
{
|
|
2030
|
-
"name": "on_behalf_of",
|
|
2031
|
-
"type": {
|
|
2032
|
-
"fields": [
|
|
2033
|
-
{
|
|
2034
|
-
"name": "inner",
|
|
2035
|
-
"type": {
|
|
2036
|
-
"kind": "field"
|
|
2037
|
-
}
|
|
2038
|
-
}
|
|
2039
|
-
],
|
|
2040
|
-
"kind": "struct",
|
|
2041
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
2042
|
-
},
|
|
2043
|
-
"visibility": "private"
|
|
2044
|
-
}
|
|
2045
|
-
],
|
|
2046
|
-
"return_type": {
|
|
2047
|
-
"abi_type": {
|
|
2048
|
-
"kind": "boolean"
|
|
2049
|
-
},
|
|
2050
|
-
"visibility": "public"
|
|
2051
|
-
}
|
|
2052
|
-
},
|
|
2053
|
-
"bytecode": "JwACBAEoAAABBIBIJwAABAMnAgIEAScCAwQAHxgAAwACgEYuCIBGAAElAAAASyUAAABhLgQAAYBHKAIAAgSARycCAwQBOw0AAgADKACAQwQAAygAgEQEAAAoAIBFBAABJiUAAAO2HgIAAwknAgQAAQo4AwQFJAIABQAAAIIlAAAD3y0IAQMnAgUEAwAQAQUBJwMDBAEAKAMCBS0MBQYtDgQGACgGAgYtDgEGJwIBAAAtCAEEJwIFBAQAEAEFAScDBAQBACgEAgUtDAUGLQ4BBgAoBgIGLQ4BBgAoBgIGLQ4BBi0NBAUAKAUCBS0OBQQrAgAFAAAAAAAAAAACAAAAAAAAAAAtCAEGJwIHBAUAEAEHAScDBgQBACgGAgctDAcILQ4BCAAoCAIILQ4BCAAoCAIILQ4BCAAoCAIILQ4FCC0NBAUAKAUCBS0OBQQtCAEFAAABAgEtDgQFLQ0GBAAoBAIELQ4EBi0IAQQAAAECAS0OBgQtCAEGAAABAgEuCoBEAAYtCAEHAAABAgEnAggBAC0OCAcnAgkEAi4IgEQAAiMAAAGkDDgCCQokAgAKAAACUSMAAAG2LQ0HAgo4AggDJAIAAwAAAdAnAgkEADwJAQknAgIECS0IAAktDAUKLQwECy0MBgwtDAcNABAAAgAlAAAD8S0EAAAtDQUCLQ0EAy0NBgktDgIFLQ4DBC0OCQYnAgIBAS0OAgcBKAADgEUABC0NBAIKOAIBAwo4AwgBJAIAAQAAAjslAAAFSS8MAAIAARwMAQMBHAwDAgAcDAIBASYkAgAKAAACXiMAAAOlJwILBAIMOAILDCQCAAwAAAJ1JQAABVsAKAMCCwA4CwIMLQ0MCi0NBgstDQcMCjgMCA0kAgANAAACoScCDgQAPAkBDgsoAAuAQwAMJAIADAAAAzIjAAACti0NBQst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able",
|
|
2061
|
-
"is_unconstrained": true,
|
|
2062
|
-
"custom_attributes": [
|
|
2063
|
-
"public",
|
|
2064
|
-
"view"
|
|
2065
|
-
],
|
|
2066
|
-
"abi": {
|
|
2067
2208
|
"error_types": {
|
|
2068
|
-
"
|
|
2069
|
-
"error_kind": "string",
|
|
2070
|
-
"string": "Array index out of bounds"
|
|
2071
|
-
},
|
|
2072
|
-
"17843811134343075018": {
|
|
2073
|
-
"error_kind": "string",
|
|
2074
|
-
"string": "Stack too deep"
|
|
2075
|
-
},
|
|
2076
|
-
"206160798890201757": {
|
|
2209
|
+
"4939791462094160055": {
|
|
2077
2210
|
"error_kind": "string",
|
|
2078
|
-
"string": "
|
|
2211
|
+
"string": "Message not authorized by account"
|
|
2079
2212
|
},
|
|
2080
2213
|
"5019202896831570965": {
|
|
2081
2214
|
"error_kind": "string",
|
|
2082
2215
|
"string": "attempt to add with overflow"
|
|
2083
2216
|
},
|
|
2084
|
-
"5444967152290923376": {
|
|
2085
|
-
"error_kind": "string",
|
|
2086
|
-
"string": "Function is_consumable can only be called statically"
|
|
2087
|
-
}
|
|
2088
|
-
},
|
|
2089
|
-
"parameters": [
|
|
2090
|
-
{
|
|
2091
|
-
"name": "on_behalf_of",
|
|
2092
|
-
"type": {
|
|
2093
|
-
"fields": [
|
|
2094
|
-
{
|
|
2095
|
-
"name": "inner",
|
|
2096
|
-
"type": {
|
|
2097
|
-
"kind": "field"
|
|
2098
|
-
}
|
|
2099
|
-
}
|
|
2100
|
-
],
|
|
2101
|
-
"kind": "struct",
|
|
2102
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
2103
|
-
},
|
|
2104
|
-
"visibility": "private"
|
|
2105
|
-
},
|
|
2106
|
-
{
|
|
2107
|
-
"name": "message_hash",
|
|
2108
|
-
"type": {
|
|
2109
|
-
"kind": "field"
|
|
2110
|
-
},
|
|
2111
|
-
"visibility": "private"
|
|
2112
|
-
}
|
|
2113
|
-
],
|
|
2114
|
-
"return_type": {
|
|
2115
|
-
"abi_type": {
|
|
2116
|
-
"kind": "boolean"
|
|
2117
|
-
},
|
|
2118
|
-
"visibility": "public"
|
|
2119
|
-
}
|
|
2120
|
-
},
|
|
2121
|
-
"bytecode": "JwACBAEoAAABBIBKJwAABAMnAgMEAicCBAQAHxgABAADgEcuCIBHAAEuCIBIAAIlAAAAUSUAAABuLgQAAYBJKAIAAgSASScCAwQBOw0AAgADKACAQwQAAygAgEQBAAAoAIBFBAAAKACARgQAASYlAAAE5B4CAAQJJwIFAAEKOAQFBiQCAAYAAACPJQAABQ0nAgQAAi0IAQUnAgYEAwAQAQYBJwMFBAEAKAUCBi0MBgctDgQHACgHAgctDgEHJwIBAAAtCAEEJwIGBAQAEAEGAScDBAQBACgEAgYtDAYHLQ4BBwAoBwIHLQ4BBwAoBwIHLQ4BBy0NBAYAKAYCBi0OBgQrAgAGAAAAAAAAAAACAAAAAAAAAAAtCAEHJwIIBAUAEAEIAScDBwQBACgHAggtDAgJLQ4BCQAoCQIJLQ4BCQAoCQIJLQ4BCQAoCQIJLQ4GCS0NBAgAKAgCCC0OCAQtCAEIAAABAgEtDgQILQ0HBAAoBAIELQ4EBy0IAQQAAAECAS0OBwQtCAEHAAABAgEuCoBFAActCAEJAAABAgEuCoBEAAknAgoEAi4IgEUAAyMAAAGzDDgDCgskAgALAAAEcSMAAAHFLQ0JBQsoAAWARAALJAIACwAAAeInAgwEADwJAQwnAgUECy0IAAstDAgMLQwEDS0MBw4tDAkPABAABQAlAAAFHy0EAAAtDQgFLQ0ECy0NBwwtDgUILQ4LBC0ODAcnAgQBAS0OBAkBKAALgEYABy0NBwUKOAUBBwsoAAeARAAIJAIACAAAAlAlAAAGdy0IAQcnAggEAwAQAQgBJwMHBAEAKAcCCC0MCAktDgUJACgJAgktDgIJLQgBAicCBQQEABABBQEnAwIEAQAoAgIFLQwFCC0OAQgAKAgCCC0OAQgAKAgCCC0OAQgtDQIFACgFAgUtDgUCLQgBBScCCAQFABABCAE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9rVUkUZ0Yy2ipskTFbxXcVEWRSkLjxDaoTZXIlvUilYQ8OStSnSAf8qRKVW9D3opURaIKXqQiiepE5dBQnagBWqokqBxObHPSVEkqIiqzbf0cPv1zeb+7vNrfPAyaw5ffb68fd3e3zx8f//02fnN1v9vvd18vvt3fXd98/n5/c7G/uz58tzHPfz55Sttg88Gbw0cX/dbFcvh4CMBhqHA7DOIPVgfL/wE=",
|
|
2123
|
-
"brillig_names": [
|
|
2124
|
-
"is_consumable"
|
|
2125
|
-
]
|
|
2126
|
-
},
|
|
2127
|
-
{
|
|
2128
|
-
"name": "sync_notes",
|
|
2129
|
-
"is_unconstrained": true,
|
|
2130
|
-
"custom_attributes": [],
|
|
2131
|
-
"abi": {
|
|
2132
|
-
"error_types": {
|
|
2133
|
-
"17843811134343075018": {
|
|
2134
|
-
"error_kind": "string",
|
|
2135
|
-
"string": "Stack too deep"
|
|
2136
|
-
}
|
|
2137
|
-
},
|
|
2138
|
-
"parameters": [],
|
|
2139
|
-
"return_type": null
|
|
2140
|
-
},
|
|
2141
|
-
"bytecode": "H4sIAAAAAAAA/7WTyw7CIBBFqcUo0sTEx39MU0y7dOHafyCtLHVRN+766dZkJkyI0QVwEzJMgMNcHoXwKjBKESGCHDEqjAs2Xs7tjDnEqVbBvin5HRijvvhLWH+jkFnk4QPxM50/rJBzmTyfe6F913PTrF8J/z5y+af7y+l//8OzRq9bzCvh/8P4uvfXx/M2ij/SbJGc0ptoOwAqvkT+EvmhJBvn8w+Yb4Svj6KMqNO1tnaNdfZkh8H0dhfwP+KH/QbzqHp4zgQAAA==",
|
|
2142
|
-
"debug_symbols": "ZY5bCsMgEEX3Mt9+RFMLzVZCCSaZBEE0+CgUce8dQ6DS/lzmDofLybDinPZJ280FGMYMxi0qamep5cJg9toYvU/tG7oavD/5cChba4jKRxh4/xCCAdr1vO+SNjZtkJrghf3xhF/0jfMvK2V5Fqov5bWaDV42W7JLIxffB/54Ht4tuCaP1biRpRy5ZKKjWZr+AA==",
|
|
2143
|
-
"brillig_names": [
|
|
2144
|
-
"sync_notes"
|
|
2145
|
-
]
|
|
2146
|
-
},
|
|
2147
|
-
{
|
|
2148
|
-
"name": "_set_authorized",
|
|
2149
|
-
"is_unconstrained": true,
|
|
2150
|
-
"custom_attributes": [
|
|
2151
|
-
"public",
|
|
2152
|
-
"internal"
|
|
2153
|
-
],
|
|
2154
|
-
"abi": {
|
|
2155
|
-
"error_types": {
|
|
2156
2217
|
"16761564377371454734": {
|
|
2157
2218
|
"error_kind": "string",
|
|
2158
2219
|
"string": "Array index out of bounds"
|
|
@@ -2160,24 +2221,35 @@
|
|
|
2160
2221
|
"17843811134343075018": {
|
|
2161
2222
|
"error_kind": "string",
|
|
2162
2223
|
"string": "Stack too deep"
|
|
2163
|
-
},
|
|
2164
|
-
"206160798890201757": {
|
|
2165
|
-
"error_kind": "string",
|
|
2166
|
-
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
2167
|
-
},
|
|
2168
|
-
"5019202896831570965": {
|
|
2169
|
-
"error_kind": "string",
|
|
2170
|
-
"string": "attempt to add with overflow"
|
|
2171
|
-
},
|
|
2172
|
-
"6304245522015439386": {
|
|
2173
|
-
"error_kind": "string",
|
|
2174
|
-
"string": "Function _set_authorized can only be called internally"
|
|
2175
2224
|
}
|
|
2176
|
-
}
|
|
2225
|
+
}
|
|
2226
|
+
},
|
|
2227
|
+
"bytecode": "H4sIAAAAAAAA/+2dBXgUV9uGJ9kkENxdgpNAws5KdjdYcHd3NskGAgGKhEI1daXuClRoqSv1Um+pu7e0hbq70v95253mZJiEr82ZlOcvc133tWM7c79n7MzMmXMSjD+7Ph7DaOr5sz8BeOK/iSDNNs76VfuTHear7TCursO4+g7jGjqMawZybePaO8yX5jCug8O4jg7jujmMy4j/qp01nBv/9XuzA4FYyBcz/WbU64vkhYPeQDAvO2yGzWA4WOAL+/2xcCAciuRFQt6IGfDHzMJgxF/o/bNr4ClblrdKnS/fTc+G/9wzYB8hbo1AkuIq6bAr3t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per",
|
|
2231
|
+
"call_private_function_internal",
|
|
2232
|
+
"load",
|
|
2233
|
+
"notify_created_nullifier_oracle_wrapper",
|
|
2234
|
+
"store_in_execution_cache_oracle_wrapper",
|
|
2235
|
+
"enqueue_public_function_call_internal"
|
|
2236
|
+
],
|
|
2237
|
+
"verification_key": "AAAAAAAQAAAAAAAAAAAAFAAAAAAAAAAQAAAAAAADKLEBAAAAAAAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAAAAAAAAAAAAAGGx7t6AYK9pp+sz79yGWAEZ6OnDjQw9Do3YDQmLdbp0DiRb8S8+G91LV/+Pe7k3bI+E6fj7QCRlgcD7j1rCKXRc0rL4DF9uewSIihG9yc5jiN5nrfvaKN2yfIYkVZ9OgJEShpSozifZh2sfOJXKzNzVyUcaTAl6vPRqmHhEtcb4klgEUWKDobYj+UO+lqgdjpzlayeTFqXsr6WtwOd7/JRyUI9UpUPbDkKbU7c7til3D5hUZ/uNstxo4H0eLcG+oJisiDoto9LLLkNd6uj8HfNqei1JVDCIbnlA5O7At7WEFbMQwSnkNmqvXg+nYBZKN+dC4wf9l6uGqYKvNDAncQxvpl+IP3kdKiU52C3DhuwFCnnqMTdXBX+5VOhageR7qGo4A475ukbhRQWLejSavmbZx5f61XMD5AuJT2PeCVXAu2CCCQ6Dlbk6RKkXbzIugQmCi7vb7xVMyGKXmvT0Y9R0iAC5k8tE+atr8jK6zbEEykoKw4sJzutsozhvCpcAVBFa7cBtbC0Y7vPDE/nGQVSOT0JUz4bIAS9hOn4pTqI8DgPTmuzBHdr/U+yLiCYd0FWSB6aP48JHTDbEAOm2qtCmMMxH8kXD5LelAsEKquZDVPGo7JjOc2mtz35IIMUFZB7BfQIphKEclkBa5IErkvzdTfrGWsFwdmPpRAWqbrLsImCjclwyV9ZQIs0eVdlH3h5t+RlUI3oDlOwUkk4EvdQJFY/pw9nWn1hTCcLQT5v7xGkLwAIQ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N+A2/zPDAB7JdicSK4xeDNXtxm4GkwrcicSNdbVxY29bvrSoBvb0WWICMBtq5OsOu+rdIDNABm8oE1dI8RljHD/gf6nXAANOPidFTvmStL+EuXuqdHEuJXg1Ud9QwATsfNH03Ys7ZKZvKsSXm2XlZWjFoxsU7Rj3bPDO7MtHmN50GuibZOglj4RHfBtiVlpVm6e7OIMuLSmftoZ40BULzFsW3IJSNT1D+nDpkjnBwcZ+JxoO6sUV06xaGZq7dJM6TvyYxZsoFO3nzSfa7QDDPBKGC8SwRi041tS6Hkdjp07NsRyh80aWgMJw5VFRU0RZL1kYj6dlEts56JKCazJhDuCCUeAF/OkXwNXcoBlHfFL2B1MythIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACI0/Bx6/BkMJAU7VYrBY7z/E1DWAUymCZstQRNUjiKIII650zdewGCRlEqALo3R6B2kgUMn7fMxqutLU5yPCBvQDENyb3W2/aDeIs4ODfq2vMegX/lalrKJQkxfczZw2WL5tuC04sAZaN5cMkgqp9HQoJ1xeOyTuteFj5bmTwtI0dWKphxkrVIgQ9ecSAIhnlW6GXUa3+bDYyTT+2wtoJiS18GKk8Pa5YgJ+q7saoanj0s7xh8Z1ucGk1m79H5/kH"
|
|
2238
|
+
},
|
|
2239
|
+
{
|
|
2240
|
+
"name": "is_reject_all",
|
|
2241
|
+
"is_unconstrained": true,
|
|
2242
|
+
"custom_attributes": [
|
|
2243
|
+
"public",
|
|
2244
|
+
"view"
|
|
2245
|
+
],
|
|
2246
|
+
"abi": {
|
|
2177
2247
|
"parameters": [
|
|
2178
2248
|
{
|
|
2179
|
-
"name": "
|
|
2249
|
+
"name": "on_behalf_of",
|
|
2180
2250
|
"type": {
|
|
2251
|
+
"kind": "struct",
|
|
2252
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
2181
2253
|
"fields": [
|
|
2182
2254
|
{
|
|
2183
2255
|
"name": "inner",
|
|
@@ -2185,60 +2257,64 @@
|
|
|
2185
2257
|
"kind": "field"
|
|
2186
2258
|
}
|
|
2187
2259
|
}
|
|
2188
|
-
]
|
|
2189
|
-
"kind": "struct",
|
|
2190
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
2260
|
+
]
|
|
2191
2261
|
},
|
|
2192
2262
|
"visibility": "private"
|
|
2263
|
+
}
|
|
2264
|
+
],
|
|
2265
|
+
"return_type": {
|
|
2266
|
+
"abi_type": {
|
|
2267
|
+
"kind": "boolean"
|
|
2193
2268
|
},
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
"
|
|
2269
|
+
"visibility": "public"
|
|
2270
|
+
},
|
|
2271
|
+
"error_types": {
|
|
2272
|
+
"206160798890201757": {
|
|
2273
|
+
"error_kind": "string",
|
|
2274
|
+
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
2200
2275
|
},
|
|
2201
|
-
{
|
|
2202
|
-
"
|
|
2203
|
-
"
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
"
|
|
2276
|
+
"5019202896831570965": {
|
|
2277
|
+
"error_kind": "string",
|
|
2278
|
+
"string": "attempt to add with overflow"
|
|
2279
|
+
},
|
|
2280
|
+
"9474245853673257536": {
|
|
2281
|
+
"error_kind": "string",
|
|
2282
|
+
"string": "Function is_reject_all can only be called statically"
|
|
2283
|
+
},
|
|
2284
|
+
"16761564377371454734": {
|
|
2285
|
+
"error_kind": "string",
|
|
2286
|
+
"string": "Array index out of bounds"
|
|
2287
|
+
},
|
|
2288
|
+
"17843811134343075018": {
|
|
2289
|
+
"error_kind": "string",
|
|
2290
|
+
"string": "Stack too deep"
|
|
2207
2291
|
}
|
|
2208
|
-
|
|
2209
|
-
"return_type": null
|
|
2292
|
+
}
|
|
2210
2293
|
},
|
|
2211
|
-
"bytecode": "
|
|
2212
|
-
"debug_symbols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jKPirqk+ItjmhF9FgqbNDCiLIKmpfYYigm2mSxUJNlqUWpNgm+G1IsFGi1LzCFozts9HkaTRYqwsglpM7zQVUR8MbW7zqkfQiTaXL2sSRDbDJNjogY5ZBI0c22eMiAi2WYxVkWCru6grEkQsZhJUyKi5BDGqYxLUyGaYBDE/yCaIOWomwUYP9KtJEH2QSbDRowLzCI4FSGSCjAgim2ESbPRVTRUJNvqyoZoEEUl4BH2jLxyqSRDzg1yCiMVMgoT5wVmCatqkpNTpOolvdLtrTYKIxUyCCrGYSxCxmEsQsZhJEHXUbILIZpgEDfoglyCyGSZBi2yGSxDZDJcgspl5gtqNBO3pSpNv9P1LFQl6zPJzCSIWMwkG5INcghiT8AgG1PJzCaKWn7kbIpAGQSZBPAeZBBs9u6UiQdTynxDsoJCQyZGaGw/4clpFOumK9KAHQ8HEdowo0NEFOj5fJ12be/7Qie5PrkQrXYM5q2VLtHyRLV9kKxTZCiW2SFCRVsnvRVRki4rald7xNquli7R8iZaSRVou+xlDOsk9iOEVo0EmdPKfS5S+i8/bcQW+pWfEZnRCvo5X+Qx8/jOTQr4dmb5vZ3Tyf1NJBXaowE76fg1m6NfByVjH5OuoAjvp1+2e10mvQc/oFNgxBXbSK2sHv09CJx3Xz/+m1uXruAI7XhTomHydUHAvhPzngRKqQCfk65Au0CmwIwvaI/P7jlJUoJPZDz66q//vdqu7+/XypdPoP3zbPLyutpuvy9ffz8Mn97vVer16un3ebR+Wj2+75e16+9B/thBf//zsOvyNDGqfwXWX/XHZ9HnZN0YG3X1qO6ud5T8=",
|
|
2213
2296
|
"brillig_names": [
|
|
2214
|
-
"
|
|
2297
|
+
"is_reject_all"
|
|
2215
2298
|
]
|
|
2216
2299
|
},
|
|
2217
2300
|
{
|
|
2218
|
-
"name": "
|
|
2301
|
+
"name": "set_reject_all",
|
|
2219
2302
|
"is_unconstrained": true,
|
|
2220
2303
|
"custom_attributes": [
|
|
2221
2304
|
"public"
|
|
2222
2305
|
],
|
|
2223
2306
|
"abi": {
|
|
2307
|
+
"parameters": [
|
|
2308
|
+
{
|
|
2309
|
+
"name": "reject",
|
|
2310
|
+
"type": {
|
|
2311
|
+
"kind": "boolean"
|
|
2312
|
+
},
|
|
2313
|
+
"visibility": "private"
|
|
2314
|
+
}
|
|
2315
|
+
],
|
|
2316
|
+
"return_type": null,
|
|
2224
2317
|
"error_types": {
|
|
2225
|
-
"12737498021964987455": {
|
|
2226
|
-
"error_kind": "string",
|
|
2227
|
-
"string": "unauthorized"
|
|
2228
|
-
},
|
|
2229
|
-
"16541607464495309456": {
|
|
2230
|
-
"error_kind": "fmtstring",
|
|
2231
|
-
"item_types": [],
|
|
2232
|
-
"length": 16
|
|
2233
|
-
},
|
|
2234
|
-
"16761564377371454734": {
|
|
2235
|
-
"error_kind": "string",
|
|
2236
|
-
"string": "Array index out of bounds"
|
|
2237
|
-
},
|
|
2238
|
-
"17843811134343075018": {
|
|
2239
|
-
"error_kind": "string",
|
|
2240
|
-
"string": "Stack too deep"
|
|
2241
|
-
},
|
|
2242
2318
|
"206160798890201757": {
|
|
2243
2319
|
"error_kind": "string",
|
|
2244
2320
|
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
@@ -2247,38 +2323,20 @@
|
|
|
2247
2323
|
"error_kind": "string",
|
|
2248
2324
|
"string": "attempt to add with overflow"
|
|
2249
2325
|
},
|
|
2250
|
-
"
|
|
2251
|
-
"error_kind": "string",
|
|
2252
|
-
"string": "Function is_consumable can only be called statically"
|
|
2253
|
-
},
|
|
2254
|
-
"6304245522015439386": {
|
|
2255
|
-
"error_kind": "string",
|
|
2256
|
-
"string": "Function _set_authorized can only be called internally"
|
|
2257
|
-
},
|
|
2258
|
-
"715723737710351018": {
|
|
2326
|
+
"16761564377371454734": {
|
|
2259
2327
|
"error_kind": "string",
|
|
2260
|
-
"string": "
|
|
2328
|
+
"string": "Array index out of bounds"
|
|
2261
2329
|
},
|
|
2262
|
-
"
|
|
2330
|
+
"17843811134343075018": {
|
|
2263
2331
|
"error_kind": "string",
|
|
2264
|
-
"string": "
|
|
2265
|
-
}
|
|
2266
|
-
},
|
|
2267
|
-
"parameters": [
|
|
2268
|
-
{
|
|
2269
|
-
"name": "selector",
|
|
2270
|
-
"type": {
|
|
2271
|
-
"kind": "field"
|
|
2272
|
-
},
|
|
2273
|
-
"visibility": "private"
|
|
2332
|
+
"string": "Stack too deep"
|
|
2274
2333
|
}
|
|
2275
|
-
|
|
2276
|
-
"return_type": null
|
|
2334
|
+
}
|
|
2277
2335
|
},
|
|
2278
|
-
"bytecode": "JwACBAEoAAABBIBRJwAABAMnAgIEAScCAwQAHxgAAwACgFAuCIBQAAElAAAARSUAAACxKAIAAQSAUScCAgQAOw0AAQACKQCAQwBH2s1zKACARAQAAygAgEUBAAAoAIBGBAAAKACARwAAACgAgEgBAAEoAIBJBAABKACASgQAAigAgEsAAAQoAIBMAAAOKACATQAAMygAgE4AADcrAIBPAAAAAAAAAAACAAAAAAAAAAAmJQAAFdspAgACALg53pEKOAECAycCBAQAJwIGBAMAOAQGBS0IAQIAEAEFAScDAgQBACgCAgUtDgQFACgFAgUtDgQFJwIFBAMAOAIFBCcCBAACJAIAAwAAAQ8jAAADbi0IAQUnAgYEAwAQAQYBJwMFBAEAKAUCBh8kgEmASgAGLQ0FBgAoBgIGLQ4GBS0IAQYAAAECAS0OBQYtCAEFAAABAgEuCoBGAAUnAggECS0IAAktDAYKLQwFCy4IgEsADAAQAAgAJQAAFgQtBAAALQwKBycCCQQKLQgACi0MBgstDAUMABAACQAlAAAWfS0EAAAtDAsIJwIGBAktCAAJLQwICgAQAAYAJQAAFvYtBAAALQwKBS0IAQYAAAECAS4KgEUABi0IAQgAAAECAS4KgEcACC0IAQkAAAECAScCCgBrLQ4KCR4CAAoBLQgBCycCDAQDABABDAEnAwsEAQAoCwIMLQwMDS0OBA0AKA0CDS0OCg0nAg8EEC0IABAuCIBPABEAEAAPACUAABcbLQQAAC0MEQotDBIMLQwTDS0MFA4tDQoPACgPAg8tDg8KL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rpb9ecEVZuFp5oECQSnCEqtTzLrhGCb6VJFgo0uMa5IkNoMrzUJIhZPE7Qm3p9PIkmjG1rOIkhCRBgi8cFGt7SsSbDNYbSaBJHNMAk2urx0FkEzFs2NEQnBNicFVSTY6OaW9Qg6gVjMJYiMmkmw0aJpTYLIZpgEUR/kEmx0AX9NgujVMQkSfJBLEN/BaYIuTo404XyHIdfoAv6aBFFhZRK0iCRMgg6RhEsQkYRLEPVBJsFGl59XJBhQH5wkqMfFMlrLhCDqgzyCXiAWcwkiFnMJIhYzCaLKzyaISMIk2OhGxzUJwgeZBDFOwiZIIMgkiGyGSRAz0f+CILlI0IqEIHyQSdCgys8k2OhGxzUJIh9kEsRqCDZBzH5jEsRcfuZqCO8xZ4FJECNNbILwQR7BgLn8ZwR7KD6bJDs9bLfgSJ+pSJFfVhJoaCcYk+qYAp0wX0fqAp38q3VxzwkplCrSsiVaX+zJOKVV1BYVtUVFbZmitkxRW7boedmitlzRfX2x8HdKK5RofZEUTmkVvSlBzf/G5CdWBDHshBhUoiMLvksy/xZfbkcV2JYfGJjQoQIdP58B6QKdgnby7+1lHVvwTG1BO66gnfz7Gszg18GpRCcfbyd0CtrJL56d0PGzdZTQBToF7eQnGJw8n5yOm/1MlVIFOgXt6Pn5kMovgJnQmf8uKKMLdOZ/D1T+/6hN6MzPCZUraMcV3I8v8B1f8HzCTD94747+vduv7+43q5dOoz/5un04rHfbj8PDf8/Dmfv9erNZP90+73cPq8fX/ep2s3vozy3Ex49f3YNbKm+Ocbo7lF4vpffHT0h/1tvurO9a7Vr+Hw==",
|
|
2280
2338
|
"brillig_names": [
|
|
2281
|
-
"
|
|
2339
|
+
"set_reject_all"
|
|
2282
2340
|
]
|
|
2283
2341
|
}
|
|
2284
2342
|
],
|
|
@@ -2348,7 +2406,7 @@
|
|
|
2348
2406
|
"type": {
|
|
2349
2407
|
"fields": [
|
|
2350
2408
|
{
|
|
2351
|
-
"name": "
|
|
2409
|
+
"name": "on_behalf_of",
|
|
2352
2410
|
"type": {
|
|
2353
2411
|
"fields": [
|
|
2354
2412
|
{
|
|
@@ -2363,25 +2421,25 @@
|
|
|
2363
2421
|
}
|
|
2364
2422
|
},
|
|
2365
2423
|
{
|
|
2366
|
-
"name": "
|
|
2424
|
+
"name": "inner_hash",
|
|
2367
2425
|
"type": {
|
|
2368
2426
|
"kind": "field"
|
|
2369
2427
|
}
|
|
2370
|
-
},
|
|
2371
|
-
{
|
|
2372
|
-
"name": "authorize",
|
|
2373
|
-
"type": {
|
|
2374
|
-
"kind": "boolean"
|
|
2375
|
-
}
|
|
2376
2428
|
}
|
|
2377
2429
|
],
|
|
2378
2430
|
"kind": "struct",
|
|
2379
|
-
"path": "AuthRegistry::
|
|
2431
|
+
"path": "AuthRegistry::consume_parameters"
|
|
2432
|
+
}
|
|
2433
|
+
},
|
|
2434
|
+
{
|
|
2435
|
+
"name": "return_type",
|
|
2436
|
+
"type": {
|
|
2437
|
+
"kind": "field"
|
|
2380
2438
|
}
|
|
2381
2439
|
}
|
|
2382
2440
|
],
|
|
2383
2441
|
"kind": "struct",
|
|
2384
|
-
"path": "AuthRegistry::
|
|
2442
|
+
"path": "AuthRegistry::consume_abi"
|
|
2385
2443
|
},
|
|
2386
2444
|
{
|
|
2387
2445
|
"fields": [
|
|
@@ -2389,21 +2447,6 @@
|
|
|
2389
2447
|
"name": "parameters",
|
|
2390
2448
|
"type": {
|
|
2391
2449
|
"fields": [
|
|
2392
|
-
{
|
|
2393
|
-
"name": "approver",
|
|
2394
|
-
"type": {
|
|
2395
|
-
"fields": [
|
|
2396
|
-
{
|
|
2397
|
-
"name": "inner",
|
|
2398
|
-
"type": {
|
|
2399
|
-
"kind": "field"
|
|
2400
|
-
}
|
|
2401
|
-
}
|
|
2402
|
-
],
|
|
2403
|
-
"kind": "struct",
|
|
2404
|
-
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
2405
|
-
}
|
|
2406
|
-
},
|
|
2407
2450
|
{
|
|
2408
2451
|
"name": "message_hash",
|
|
2409
2452
|
"type": {
|
|
@@ -2418,12 +2461,12 @@
|
|
|
2418
2461
|
}
|
|
2419
2462
|
],
|
|
2420
2463
|
"kind": "struct",
|
|
2421
|
-
"path": "AuthRegistry::
|
|
2464
|
+
"path": "AuthRegistry::set_authorized_parameters"
|
|
2422
2465
|
}
|
|
2423
2466
|
}
|
|
2424
2467
|
],
|
|
2425
2468
|
"kind": "struct",
|
|
2426
|
-
"path": "AuthRegistry::
|
|
2469
|
+
"path": "AuthRegistry::set_authorized_abi"
|
|
2427
2470
|
},
|
|
2428
2471
|
{
|
|
2429
2472
|
"fields": [
|
|
@@ -2432,7 +2475,7 @@
|
|
|
2432
2475
|
"type": {
|
|
2433
2476
|
"fields": [
|
|
2434
2477
|
{
|
|
2435
|
-
"name": "
|
|
2478
|
+
"name": "approver",
|
|
2436
2479
|
"type": {
|
|
2437
2480
|
"fields": [
|
|
2438
2481
|
{
|
|
@@ -2451,21 +2494,21 @@
|
|
|
2451
2494
|
"type": {
|
|
2452
2495
|
"kind": "field"
|
|
2453
2496
|
}
|
|
2497
|
+
},
|
|
2498
|
+
{
|
|
2499
|
+
"name": "authorize",
|
|
2500
|
+
"type": {
|
|
2501
|
+
"kind": "boolean"
|
|
2502
|
+
}
|
|
2454
2503
|
}
|
|
2455
2504
|
],
|
|
2456
2505
|
"kind": "struct",
|
|
2457
|
-
"path": "AuthRegistry::
|
|
2458
|
-
}
|
|
2459
|
-
},
|
|
2460
|
-
{
|
|
2461
|
-
"name": "return_type",
|
|
2462
|
-
"type": {
|
|
2463
|
-
"kind": "boolean"
|
|
2506
|
+
"path": "AuthRegistry::set_authorized_private_parameters"
|
|
2464
2507
|
}
|
|
2465
2508
|
}
|
|
2466
2509
|
],
|
|
2467
2510
|
"kind": "struct",
|
|
2468
|
-
"path": "AuthRegistry::
|
|
2511
|
+
"path": "AuthRegistry::set_authorized_private_abi"
|
|
2469
2512
|
},
|
|
2470
2513
|
{
|
|
2471
2514
|
"fields": [
|
|
@@ -2495,25 +2538,34 @@
|
|
|
2495
2538
|
"type": {
|
|
2496
2539
|
"fields": [
|
|
2497
2540
|
{
|
|
2498
|
-
"name": "
|
|
2499
|
-
"type": {
|
|
2500
|
-
"kind": "field"
|
|
2501
|
-
}
|
|
2502
|
-
},
|
|
2503
|
-
{
|
|
2504
|
-
"name": "authorize",
|
|
2541
|
+
"name": "on_behalf_of",
|
|
2505
2542
|
"type": {
|
|
2506
|
-
"
|
|
2543
|
+
"fields": [
|
|
2544
|
+
{
|
|
2545
|
+
"name": "inner",
|
|
2546
|
+
"type": {
|
|
2547
|
+
"kind": "field"
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
],
|
|
2551
|
+
"kind": "struct",
|
|
2552
|
+
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
2507
2553
|
}
|
|
2508
2554
|
}
|
|
2509
2555
|
],
|
|
2510
2556
|
"kind": "struct",
|
|
2511
|
-
"path": "AuthRegistry::
|
|
2557
|
+
"path": "AuthRegistry::is_reject_all_parameters"
|
|
2558
|
+
}
|
|
2559
|
+
},
|
|
2560
|
+
{
|
|
2561
|
+
"name": "return_type",
|
|
2562
|
+
"type": {
|
|
2563
|
+
"kind": "boolean"
|
|
2512
2564
|
}
|
|
2513
2565
|
}
|
|
2514
2566
|
],
|
|
2515
2567
|
"kind": "struct",
|
|
2516
|
-
"path": "AuthRegistry::
|
|
2568
|
+
"path": "AuthRegistry::is_reject_all_abi"
|
|
2517
2569
|
},
|
|
2518
2570
|
{
|
|
2519
2571
|
"fields": [
|
|
@@ -2535,10 +2587,16 @@
|
|
|
2535
2587
|
"kind": "struct",
|
|
2536
2588
|
"path": "authwit::aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
2537
2589
|
}
|
|
2590
|
+
},
|
|
2591
|
+
{
|
|
2592
|
+
"name": "message_hash",
|
|
2593
|
+
"type": {
|
|
2594
|
+
"kind": "field"
|
|
2595
|
+
}
|
|
2538
2596
|
}
|
|
2539
2597
|
],
|
|
2540
2598
|
"kind": "struct",
|
|
2541
|
-
"path": "AuthRegistry::
|
|
2599
|
+
"path": "AuthRegistry::is_consumable_parameters"
|
|
2542
2600
|
}
|
|
2543
2601
|
},
|
|
2544
2602
|
{
|
|
@@ -2549,7 +2607,7 @@
|
|
|
2549
2607
|
}
|
|
2550
2608
|
],
|
|
2551
2609
|
"kind": "struct",
|
|
2552
|
-
"path": "AuthRegistry::
|
|
2610
|
+
"path": "AuthRegistry::is_consumable_abi"
|
|
2553
2611
|
},
|
|
2554
2612
|
{
|
|
2555
2613
|
"fields": [
|
|
@@ -2558,7 +2616,7 @@
|
|
|
2558
2616
|
"type": {
|
|
2559
2617
|
"fields": [
|
|
2560
2618
|
{
|
|
2561
|
-
"name": "
|
|
2619
|
+
"name": "approver",
|
|
2562
2620
|
"type": {
|
|
2563
2621
|
"fields": [
|
|
2564
2622
|
{
|
|
@@ -2573,152 +2631,208 @@
|
|
|
2573
2631
|
}
|
|
2574
2632
|
},
|
|
2575
2633
|
{
|
|
2576
|
-
"name": "
|
|
2634
|
+
"name": "message_hash",
|
|
2577
2635
|
"type": {
|
|
2578
2636
|
"kind": "field"
|
|
2579
2637
|
}
|
|
2638
|
+
},
|
|
2639
|
+
{
|
|
2640
|
+
"name": "authorize",
|
|
2641
|
+
"type": {
|
|
2642
|
+
"kind": "boolean"
|
|
2643
|
+
}
|
|
2580
2644
|
}
|
|
2581
2645
|
],
|
|
2582
2646
|
"kind": "struct",
|
|
2583
|
-
"path": "AuthRegistry::
|
|
2584
|
-
}
|
|
2585
|
-
},
|
|
2586
|
-
{
|
|
2587
|
-
"name": "return_type",
|
|
2588
|
-
"type": {
|
|
2589
|
-
"kind": "field"
|
|
2647
|
+
"path": "AuthRegistry::_set_authorized_parameters"
|
|
2590
2648
|
}
|
|
2591
2649
|
}
|
|
2592
2650
|
],
|
|
2593
2651
|
"kind": "struct",
|
|
2594
|
-
"path": "AuthRegistry::
|
|
2652
|
+
"path": "AuthRegistry::_set_authorized_abi"
|
|
2595
2653
|
}
|
|
2596
2654
|
]
|
|
2597
2655
|
}
|
|
2598
2656
|
},
|
|
2599
2657
|
"file_map": {
|
|
2600
|
-
"
|
|
2601
|
-
"path": "/
|
|
2602
|
-
"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\") });\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_struct().map(|typ: (StructDefinition, [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"
|
|
2658
|
+
"116": {
|
|
2659
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/macros/aztec.nr",
|
|
2660
|
+
"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"
|
|
2603
2661
|
},
|
|
2604
|
-
"
|
|
2605
|
-
"path": "/
|
|
2606
|
-
"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_view, modify_fn_body, module_has_initializer, 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 transform_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.\ncomptime 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"
|
|
2662
|
+
"117": {
|
|
2663
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/macros/dispatch.nr",
|
|
2664
|
+
"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"
|
|
2607
2665
|
},
|
|
2608
|
-
"
|
|
2609
|
-
"path": "/
|
|
2610
|
-
"source": "pub mod dispatch;\npub mod functions;\npub mod utils;\npub mod notes;\npub mod storage;\npub mod events;\n\nuse functions::{stub_registry, utils::transform_unconstrained};\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 let unconstrained_functions = m.functions().filter(|f: FunctionDefinition| {\n f.is_unconstrained() & !f.has_named_attribute(\"test\") & !f.has_named_attribute(\"public\")\n });\n for f in unconstrained_functions {\n transform_unconstrained(f);\n }\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 let mut max_note_packed_len: u32 = 0;\n if notes.len() > 0 {\n max_note_packed_len = notes.fold(\n 0,\n |acc, (_, (_, len, _, _)): (Type, (StructDefinition, 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 `process_private_note_log`.\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 ) -> 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_plaintext: 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_plaintext,\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_plaintext: 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): (StructDefinition, 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 quote {\n unconstrained fn sync_notes() {\n aztec::oracle::note_discovery::sync_notes();\n }\n }\n}\n"
|
|
2666
|
+
"124": {
|
|
2667
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/macros/functions/utils.nr",
|
|
2668
|
+
"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"
|
|
2611
2669
|
},
|
|
2612
|
-
"
|
|
2613
|
-
"path": "/
|
|
2614
|
-
"source": "use std::{collections::umap::UHashMap, hash::{BuildHasherDefault, poseidon2::Poseidon2Hasher}};\n\nuse super::utils::AsStrQuote;\nuse super::utils::get_storage_size;\nuse super::utils::is_note;\n\n/// Stores a map from a module to the name of the struct that describes its storage layout.\n/// This is then used when generating a `storage_layout()` getter on the contract struct.\npub comptime mut global STORAGE_LAYOUT_NAME: UHashMap<Module, Quoted, BuildHasherDefault<Poseidon2Hasher>> =\n UHashMap::default();\n\n/// Marks a struct as the one describing the storage layout of a contract. Only a single struct in the entire contract\n/// should have this macro (or `storage_no_init`) applied to it.\n/// The contract's storage is accessed via the `storage` variable, which will will automatically be made available in\n/// all functions as an instance of the struct this macro was applied to.\npub comptime fn storage(s:
|
|
2670
|
+
"127": {
|
|
2671
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/macros/storage.nr",
|
|
2672
|
+
"source": "use std::{collections::umap::UHashMap, hash::{BuildHasherDefault, poseidon2::Poseidon2Hasher}};\n\nuse super::utils::AsStrQuote;\nuse super::utils::get_storage_size;\nuse super::utils::is_note;\n\n/// Stores a map from a module to the name of the struct that describes its storage layout.\n/// This is then used when generating a `storage_layout()` getter on the contract struct.\npub comptime mut global STORAGE_LAYOUT_NAME: UHashMap<Module, Quoted, BuildHasherDefault<Poseidon2Hasher>> =\n UHashMap::default();\n\n/// Marks a struct as the one describing the storage layout of a contract. Only a single struct in the entire contract\n/// should have this macro (or `storage_no_init`) applied to it.\n/// The contract's storage is accessed via the `storage` variable, which will will automatically be made available in\n/// all functions as an instance of the struct this macro was applied to.\npub comptime fn storage(s: TypeDefinition) -> Quoted {\n // This macro performs three things:\n // - it marks the contract as having storage, so that `macros::utils::module_has_storage` will return true and\n // functions will have the storage variable injected and initialized via the `init` function.\n // - it implements said `init` function by allocating appropriate storage slots to each state variable.\n // - it exposes the storage layout by creating a `StorageLayout` struct that is exposed via the `abi(storage)`\n // macro.\n let mut slot: u32 = 1;\n let mut storage_vars_constructors = &[];\n let mut storage_layout_fields = &[];\n let mut storage_layout_constructors = &[];\n\n // TODO(#8658): uncomment the code below to inject the Context type parameter.\n //let mut new_storage_fields = &[];\n //let context_generic = s.add_generic(\"Context\");\n for field in s.fields_as_written() {\n // FIXME: This doesn't handle field types with generics\n let (name, typ) = field;\n let (storage_field_constructor, storage_size) =\n generate_storage_field_constructor(typ, quote { $slot }, false);\n storage_vars_constructors =\n storage_vars_constructors.push_back(quote { $name: $storage_field_constructor });\n // We have `Storable` in a separate `.nr` file instead of defining it in the last quote of this function\n // because that way a dev gets a more reasonable error if he defines a struct with the same name in\n // a contract.\n storage_layout_fields =\n storage_layout_fields.push_back(quote { pub $name: dep::aztec::prelude::Storable });\n storage_layout_constructors = storage_layout_constructors.push_back(\n quote { $name: dep::aztec::prelude::Storable { slot: $slot } },\n );\n //let with_context_generic = add_context_generic(typ, context_generic);\n //println(with_context_generic);\n //new_storage_fields = new_storage_fields.push_back((name, with_context_generic ));\n slot += storage_size;\n }\n\n //s.set_fields(new_storage_fields);\n let storage_vars_constructors = storage_vars_constructors.join(quote {,});\n let storage_impl = quote {\n impl<Context> Storage<Context> {\n fn init(context: Context) -> Self {\n Self {\n $storage_vars_constructors\n }\n }\n }\n };\n\n let storage_layout_fields = storage_layout_fields.join(quote {,});\n let storage_layout_constructors = storage_layout_constructors.join(quote {,});\n\n let module = s.module();\n let module_name = module.name();\n let storage_layout_name = f\"STORAGE_LAYOUT_{module_name}\".quoted_contents();\n let (module_name_str, module_name_len) = module_name.as_str_quote();\n STORAGE_LAYOUT_NAME.insert(module, storage_layout_name);\n\n quote {\n $storage_impl\n\n pub struct StorageLayoutFields {\n $storage_layout_fields\n }\n\n pub struct StorageLayout<let N: u32> {\n pub contract_name: str<N>,\n pub fields: StorageLayoutFields\n }\n\n #[abi(storage)]\n pub global $storage_layout_name: StorageLayout<$module_name_len> = StorageLayout {\n contract_name: $module_name_str,\n fields: StorageLayoutFields { $storage_layout_constructors }\n };\n }\n}\n\n/// Same as `storage`, except the user is in charge of providing an implementation of the `init` constructor function\n/// with signature `fn init<Context>(context: Context) -> Self`, which allows for manual control of storage slot\n/// allocation. Similarly, no `StorageLayout` struct will be created.\n/// Only a single struct in the entire contract should have this macro (or `storage`) applied to it.\npub comptime fn storage_no_init(_s: TypeDefinition) {\n // All `storage` does is provide the `init` implementation, so we don't need to do anything here. Applying this\n // macro however will cause for `macros::utils::module_has_storage` to return true, resulting in the injection of\n // the `storage` variable.\n}\n\n/// Returns the expression required to initialize a state variable with a given slot, along with its serialization size,\n/// i.e. how many contiguous storage slots the variable requires.\ncomptime fn generate_storage_field_constructor(\n typ: Type,\n slot: Quoted,\n parent_is_map: bool,\n) -> (Quoted, u32) {\n assert(\n typ.as_data_type().is_some(),\n \"Storage containers must be generic structs of the form `Container<_, Context>`, or Map<Key, _, Context>\",\n );\n let (container_struct, generics) = typ.as_data_type().unwrap();\n let struct_name = container_struct.name();\n\n if is_storage_map(typ) {\n // Map state variables recursively initialize their contents - this includes nested maps.\n let (value_constructor, _) =\n generate_storage_field_constructor(generics[1], quote { slot }, true);\n (quote { $struct_name::new(context, $slot, | context, slot | { $value_constructor }) }, 1)\n } else {\n let storage_size = if parent_is_map {\n // Variables inside a map do not require contiguous slots since the map slot derivation is assumed to result\n // in slots very far away from one another.\n 1\n } else {\n let (_, container_struct_generics) = typ.as_data_type().unwrap();\n let stored_struct = container_struct_generics[0];\n\n if is_note(stored_struct) {\n // Private notes always occupy a single slot, since the slot is only used as a state variable\n // identifier.\n 1\n } else {\n get_storage_size(typ)\n }\n };\n\n // We assume below that all state variables implement `fn new<Context>(context: Context, slot: Field) -> Self`.\n (quote { $struct_name::new(context, $slot)}, storage_size)\n }\n}\n\n/// Returns true if `typ` is `state_vars::map::Map`.\ncomptime fn is_storage_map(typ: Type) -> bool {\n if typ.as_data_type().is_some() {\n let (def, generics) = typ.as_data_type().unwrap();\n let maybe_map = if (def.name() == quote { Map }) & (generics.len() == 3) {\n let maybe_key = generics[0];\n let maybe_value = generics[1];\n let maybe_context = generics[2];\n quote { crate::state_vars::map::Map<$maybe_key, $maybe_value, $maybe_context> }.as_type()\n } else {\n quote {()}.as_type()\n };\n typ == maybe_map\n } else {\n false\n }\n}\n\ncomptime fn add_context_generic(typ: Type, context_generic: Type) -> Type {\n let (def, mut generics) = typ.as_data_type().expect(\n f\"Storage containers must be generic structs of the form `Container<..., Context>`\",\n );\n let name = def.name();\n\n if is_storage_map(typ) {\n generics[generics.len() - 2] = add_context_generic(generics[1], context_generic);\n generics[generics.len() - 1] = context_generic;\n } else {\n generics[generics.len() - 1] = context_generic;\n }\n\n let generics = generics.map(|typ: Type| quote {$typ}).join(quote {,});\n quote { $name<$generics> }.as_type()\n}\n"
|
|
2615
2673
|
},
|
|
2616
|
-
"
|
|
2617
|
-
"path": "/
|
|
2674
|
+
"145": {
|
|
2675
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/oracle/call_private_function.nr",
|
|
2618
2676
|
"source": "use dep::protocol_types::{\n abis::function_selector::FunctionSelector, address::AztecAddress, utils::reader::Reader,\n};\n\n#[oracle(callPrivateFunction)]\nunconstrained fn call_private_function_oracle(\n _contract_address: AztecAddress,\n _function_selector: FunctionSelector,\n _args_hash: Field,\n _start_side_effect_counter: u32,\n _is_static_call: bool,\n) -> [Field; 2] {}\n\npub unconstrained fn call_private_function_internal(\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n start_side_effect_counter: u32,\n is_static_call: bool,\n) -> (u32, Field) {\n let fields = call_private_function_oracle(\n contract_address,\n function_selector,\n args_hash,\n start_side_effect_counter,\n is_static_call,\n );\n\n let mut reader = Reader::new(fields);\n let end_side_effect_counter = reader.read_u32();\n let returns_hash = reader.read();\n\n (end_side_effect_counter, returns_hash)\n}\n"
|
|
2619
2677
|
},
|
|
2620
|
-
"
|
|
2621
|
-
"path": "/
|
|
2678
|
+
"146": {
|
|
2679
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/oracle/capsules.nr",
|
|
2680
|
+
"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"
|
|
2681
|
+
},
|
|
2682
|
+
"147": {
|
|
2683
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/oracle/enqueue_public_function_call.nr",
|
|
2622
2684
|
"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"
|
|
2623
2685
|
},
|
|
2624
|
-
"
|
|
2625
|
-
"path": "/
|
|
2686
|
+
"148": {
|
|
2687
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/oracle/execution.nr",
|
|
2626
2688
|
"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"
|
|
2627
2689
|
},
|
|
2628
|
-
"
|
|
2629
|
-
"path": "/
|
|
2690
|
+
"149": {
|
|
2691
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/oracle/execution_cache.nr",
|
|
2630
2692
|
"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"
|
|
2631
2693
|
},
|
|
2632
|
-
"
|
|
2633
|
-
"path": "/
|
|
2634
|
-
"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
|
|
2694
|
+
"158": {
|
|
2695
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/oracle/message_discovery.nr",
|
|
2696
|
+
"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"
|
|
2635
2697
|
},
|
|
2636
|
-
"
|
|
2637
|
-
"path": "/
|
|
2638
|
-
"source": "use crate::{\n note::{note_interface::NoteType, note_metadata::NoteMetadata, retrieved_note::RetrievedNote},\n utils::array,\n};\n\nuse dep::protocol_types::{\n address::AztecAddress,\n indexed_tagging_secret::{INDEXED_TAGGING_SECRET_LENGTH, IndexedTaggingSecret},\n traits::{Deserialize, FromField, Packable},\n};\n\n/// Notifies the simulator that a note has been created, so that it can be returned in future read requests in the same\n/// transaction. This note should only be added to the non-volatile database if found in an actual block.\npub fn notify_created_note<let N: u32>(\n storage_slot: Field,\n note_type_id: Field,\n packed_note: [Field; N],\n note_hash: Field,\n counter: u32,\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 {\n notify_created_note_oracle_wrapper(\n storage_slot,\n note_type_id,\n packed_note,\n note_hash,\n counter,\n )\n };\n}\n\n/// Notifies the simulator that a note has been nullified, so that it is no longer returned in future read requests in\n/// the same transaction. This note should only be removed to the non-volatile database if its nullifier is found in an\n/// actual block.\npub fn notify_nullified_note(nullifier: Field, note_hash: Field, counter: u32) {\n // Safety: This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to\n // call.\n unsafe { notify_nullified_note_oracle_wrapper(nullifier, note_hash, counter) };\n}\n\n/// Notifies the simulator that a non-note nullifier has been created, so that it can be used for note nonces.\npub fn notify_created_nullifier(nullifier: Field) {\n // Safety: This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to\n // call.\n unsafe { notify_created_nullifier_oracle_wrapper(nullifier) };\n}\n\nunconstrained fn notify_created_note_oracle_wrapper<let N: u32>(\n storage_slot: Field,\n note_type_id: Field,\n packed_note: [Field; N],\n note_hash: Field,\n counter: u32,\n) {\n let _ = notify_created_note_oracle(storage_slot, note_type_id, packed_note, note_hash, counter);\n}\n\n#[oracle(notifyCreatedNote)]\nunconstrained fn notify_created_note_oracle<let N: u32>(\n _storage_slot: Field,\n _note_type_id: Field,\n _packed_note: [Field; N],\n _note_hash: Field,\n _counter: u32,\n) -> Field {}\n\nunconstrained fn notify_nullified_note_oracle_wrapper(\n nullifier: Field,\n note_hash: Field,\n counter: u32,\n) {\n let _ = notify_nullified_note_oracle(nullifier, note_hash, counter);\n}\n\n#[oracle(notifyNullifiedNote)]\nunconstrained fn notify_nullified_note_oracle(\n _nullifier: Field,\n _note_hash: Field,\n _counter: u32,\n) -> Field {}\n\nunconstrained fn notify_created_nullifier_oracle_wrapper(nullifier: Field) {\n let _ = notify_created_nullifier_oracle(nullifier);\n}\n\n#[oracle(notifyCreatedNullifier)]\nunconstrained fn notify_created_nullifier_oracle(_nullifier: Field) -> Field {}\n\n#[oracle(getNotes)]\nunconstrained fn get_notes_oracle<let N: u32, let S: u32>(\n _storage_slot: Field,\n _num_selects: u8,\n _select_by_indexes: [u8; N],\n _select_by_offsets: [u8; N],\n _select_by_lengths: [u8; N],\n _select_values: [Field; N],\n _select_comparators: [u8; N],\n _sort_by_indexes: [u8; N],\n _sort_by_offsets: [u8; N],\n _sort_by_lengths: [u8; N],\n _sort_order: [u8; N],\n _limit: u32,\n _offset: u32,\n _status: u8,\n _return_size: u32,\n _placeholder_fields: [Field; S],\n) -> [Field; S] {}\n\nunconstrained fn get_notes_oracle_wrapper<let N: u32, let S: u32>(\n storage_slot: Field,\n num_selects: u8,\n select_by_indexes: [u8; N],\n select_by_offsets: [u8; N],\n select_by_lengths: [u8; N],\n select_values: [Field; N],\n select_comparators: [u8; N],\n sort_by_indexes: [u8; N],\n sort_by_offsets: [u8; N],\n sort_by_lengths: [u8; N],\n sort_order: [u8; N],\n limit: u32,\n offset: u32,\n status: u8,\n mut placeholder_fields: [Field; S],\n) -> [Field; S] {\n let return_size = placeholder_fields.len() as u32;\n get_notes_oracle(\n storage_slot,\n num_selects,\n select_by_indexes,\n select_by_offsets,\n select_by_lengths,\n select_values,\n select_comparators,\n sort_by_indexes,\n sort_by_offsets,\n sort_by_lengths,\n sort_order,\n limit,\n offset,\n status,\n return_size,\n placeholder_fields,\n )\n}\n\npub unconstrained fn get_notes<Note, let N: u32, let M: u32, let S: u32, let NS: u32>(\n storage_slot: Field,\n num_selects: u8,\n select_by_indexes: [u8; M],\n select_by_offsets: [u8; M],\n select_by_lengths: [u8; M],\n select_values: [Field; M],\n select_comparators: [u8; M],\n sort_by_indexes: [u8; M],\n sort_by_offsets: [u8; M],\n sort_by_lengths: [u8; M],\n sort_order: [u8; M],\n limit: u32,\n offset: u32,\n status: u8,\n mut placeholder_opt_notes: [Option<RetrievedNote<Note>>; S], // TODO: Remove it and use `limit` to initialize the note array.\n placeholder_fields: [Field; NS], // TODO: Remove it and use `limit` to initialize the note array.\n _placeholder_note_length: [Field; N], // Turbofish hack? Compiler breaks calculating read_offset unless we add this parameter TODO(benesjan): try removing this.\n) -> [Option<RetrievedNote<Note>>; S]\nwhere\n Note: NoteType + Packable<N>,\n{\n let fields = get_notes_oracle_wrapper(\n storage_slot,\n num_selects,\n select_by_indexes,\n select_by_offsets,\n select_by_lengths,\n select_values,\n select_comparators,\n sort_by_indexes,\n sort_by_offsets,\n sort_by_lengths,\n sort_order,\n limit,\n offset,\n status,\n placeholder_fields,\n );\n let num_notes = fields[0] as u32;\n let contract_address = AztecAddress::from_field(fields[1]);\n for i in 0..placeholder_opt_notes.len() {\n if i < num_notes {\n // lengths named as per typescript.\n let return_header_length: u32 = 2; // num_notes & contract_address.\n let extra_preimage_length: u32 = 2; // nonce & note_hash_counter.\n let read_offset: u32 = return_header_length + i * (N + extra_preimage_length);\n\n let maybe_nonce = fields[read_offset];\n let maybe_note_hash_counter = fields[read_offset + 1] as u32;\n let packed_note = array::subarray(fields, read_offset + 2);\n\n let note = Note::unpack(packed_note);\n let retrieved_note = RetrievedNote {\n note,\n contract_address,\n metadata: NoteMetadata::from_raw_data(maybe_note_hash_counter != 0, maybe_nonce),\n };\n\n placeholder_opt_notes[i] = Option::some(retrieved_note);\n };\n }\n placeholder_opt_notes\n}\n\n/// Returns true if the nullifier exists. Note that a `true` value can be constrained by proving existence of the\n/// nullifier, but a `false` value should not be relied upon since other transactions may emit this nullifier before the\n/// current transaction is included in a block. While this might seem of little use at first, certain design patterns\n/// benefit from this abstraction (see e.g. `PrivateMutable`).\npub unconstrained fn check_nullifier_exists(inner_nullifier: Field) -> bool {\n check_nullifier_exists_oracle(inner_nullifier) == 1\n}\n\n#[oracle(checkNullifierExists)]\nunconstrained fn check_nullifier_exists_oracle(_inner_nullifier: Field) -> Field {}\n\n/// Same as `get_indexed_tagging_secret_as_sender`, except it returns the derived tag, ready to be included in a log.\npub unconstrained fn get_app_tag_as_sender(sender: AztecAddress, recipient: AztecAddress) -> Field {\n get_indexed_tagging_secret_as_sender(sender, recipient).compute_tag(recipient)\n}\n\n/// Returns the tagging secret for a given sender and recipient pair, siloed for the current contract address.\n/// Includes the last known index used to send a note tagged with this secret.\n/// For this to work, PXE must know the ivsk_m of the sender.\n/// For the recipient's side, only the address is needed.\npub unconstrained fn get_indexed_tagging_secret_as_sender(\n sender: AztecAddress,\n recipient: AztecAddress,\n) -> IndexedTaggingSecret {\n let result = get_indexed_tagging_secret_as_sender_oracle(sender, recipient);\n IndexedTaggingSecret::deserialize(result)\n}\n\n#[oracle(getIndexedTaggingSecretAsSender)]\nunconstrained fn get_indexed_tagging_secret_as_sender_oracle(\n _sender: AztecAddress,\n _recipient: AztecAddress,\n) -> [Field; INDEXED_TAGGING_SECRET_LENGTH] {}\n\n/// Notifies the simulator that a tag has been used in a note, and to therefore increment the associated index so that\n/// future notes get a different tag and can be discovered by the recipient.\n/// This change should only be persisted in a non-volatile database if the tagged log is found in an actual block -\n/// otherwise e.g. a reverting transaction can cause the sender to accidentally skip indices and later produce notes\n/// that are not found by the recipient.\npub fn increment_app_tagging_secret_index_as_sender(sender: AztecAddress, recipient: AztecAddress) {\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 {\n increment_app_tagging_secret_index_as_sender_wrapper(sender, recipient);\n }\n}\n\nunconstrained fn increment_app_tagging_secret_index_as_sender_wrapper(\n sender: AztecAddress,\n recipient: AztecAddress,\n) {\n increment_app_tagging_secret_index_as_sender_oracle(sender, recipient);\n}\n\n#[oracle(incrementAppTaggingSecretIndexAsSender)]\nunconstrained fn increment_app_tagging_secret_index_as_sender_oracle(\n _sender: AztecAddress,\n _recipient: AztecAddress,\n) {}\n"
|
|
2698
|
+
"160": {
|
|
2699
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/oracle/notes.nr",
|
|
2700
|
+
"source": "use crate::{\n note::{note_interface::NoteType, note_metadata::NoteMetadata, retrieved_note::RetrievedNote},\n utils::array,\n};\n\nuse dep::protocol_types::{\n address::AztecAddress,\n indexed_tagging_secret::{INDEXED_TAGGING_SECRET_LENGTH, IndexedTaggingSecret},\n traits::{Deserialize, FromField, Packable},\n};\n\n/// Notifies the simulator that a note has been created, so that it can be returned in future read requests in the same\n/// transaction. This note should only be added to the non-volatile database if found in an actual block.\npub fn notify_created_note<let N: u32>(\n storage_slot: Field,\n note_type_id: Field,\n packed_note: [Field; N],\n note_hash: Field,\n counter: u32,\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 {\n notify_created_note_oracle_wrapper(\n storage_slot,\n note_type_id,\n packed_note,\n note_hash,\n counter,\n )\n };\n}\n\n/// Notifies the simulator that a note has been nullified, so that it is no longer returned in future read requests in\n/// the same transaction. This note should only be removed to the non-volatile database if its nullifier is found in an\n/// actual block.\npub fn notify_nullified_note(nullifier: Field, note_hash: Field, counter: u32) {\n // Safety: This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to\n // call.\n unsafe { notify_nullified_note_oracle_wrapper(nullifier, note_hash, counter) };\n}\n\n/// Notifies the simulator that a non-note nullifier has been created, so that it can be used for note nonces.\npub fn notify_created_nullifier(nullifier: Field) {\n // Safety: This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to\n // call.\n unsafe { notify_created_nullifier_oracle_wrapper(nullifier) };\n}\n\nunconstrained fn notify_created_note_oracle_wrapper<let N: u32>(\n storage_slot: Field,\n note_type_id: Field,\n packed_note: [Field; N],\n note_hash: Field,\n counter: u32,\n) {\n notify_created_note_oracle(storage_slot, note_type_id, packed_note, note_hash, counter);\n}\n\n#[oracle(notifyCreatedNote)]\nunconstrained fn notify_created_note_oracle<let N: u32>(\n _storage_slot: Field,\n _note_type_id: Field,\n _packed_note: [Field; N],\n _note_hash: Field,\n _counter: u32,\n) {}\n\nunconstrained fn notify_nullified_note_oracle_wrapper(\n nullifier: Field,\n note_hash: Field,\n counter: u32,\n) {\n notify_nullified_note_oracle(nullifier, note_hash, counter);\n}\n\n#[oracle(notifyNullifiedNote)]\nunconstrained fn notify_nullified_note_oracle(_nullifier: Field, _note_hash: Field, _counter: u32) {}\n\nunconstrained fn notify_created_nullifier_oracle_wrapper(nullifier: Field) {\n notify_created_nullifier_oracle(nullifier);\n}\n\n#[oracle(notifyCreatedNullifier)]\nunconstrained fn notify_created_nullifier_oracle(_nullifier: Field) {}\n\n#[oracle(getNotes)]\nunconstrained fn get_notes_oracle<let N: u32, let ORACLE_RETURN_FIELD_LENGTH: u32>(\n _storage_slot: Field,\n _num_selects: u8,\n _select_by_indexes: [u8; N],\n _select_by_offsets: [u8; N],\n _select_by_lengths: [u8; N],\n _select_values: [Field; N],\n _select_comparators: [u8; N],\n _sort_by_indexes: [u8; N],\n _sort_by_offsets: [u8; N],\n _sort_by_lengths: [u8; N],\n _sort_order: [u8; N],\n _limit: u32,\n _offset: u32,\n _status: u8,\n _return_size: u32,\n) -> [Field; ORACLE_RETURN_FIELD_LENGTH] {}\n\nunconstrained fn get_notes_oracle_wrapper<let N: u32, let ORACLE_RETURN_FIELD_LENGTH: u32>(\n storage_slot: Field,\n num_selects: u8,\n select_by_indexes: [u8; N],\n select_by_offsets: [u8; N],\n select_by_lengths: [u8; N],\n select_values: [Field; N],\n select_comparators: [u8; N],\n sort_by_indexes: [u8; N],\n sort_by_offsets: [u8; N],\n sort_by_lengths: [u8; N],\n sort_order: [u8; N],\n limit: u32,\n offset: u32,\n status: u8,\n) -> [Field; ORACLE_RETURN_FIELD_LENGTH] {\n // This wrapper exists to extract the ORACLE_RETURN_FIELD_LENGTH generic numeric param into a value and pass it to\n // the oracle, so that it knows how big the return array must be.\n get_notes_oracle(\n storage_slot,\n num_selects,\n select_by_indexes,\n select_by_offsets,\n select_by_lengths,\n select_values,\n select_comparators,\n sort_by_indexes,\n sort_by_offsets,\n sort_by_lengths,\n sort_order,\n limit,\n offset,\n status,\n ORACLE_RETURN_FIELD_LENGTH,\n )\n}\n\npub unconstrained fn get_notes<Note, let N: u32, let M: u32, let MAX_NOTES: u32, let ORACLE_RETURN_FIELD_LENGTH: u32>(\n storage_slot: Field,\n num_selects: u8,\n select_by_indexes: [u8; M],\n select_by_offsets: [u8; M],\n select_by_lengths: [u8; M],\n select_values: [Field; M],\n select_comparators: [u8; M],\n sort_by_indexes: [u8; M],\n sort_by_offsets: [u8; M],\n sort_by_lengths: [u8; M],\n sort_order: [u8; M],\n limit: u32,\n offset: u32,\n status: u8,\n _placeholder_fields: [Field; ORACLE_RETURN_FIELD_LENGTH], // TODO: Compute this value automatically from MAX_NOTES\n) -> [Option<RetrievedNote<Note>>; MAX_NOTES]\nwhere\n Note: NoteType + Packable<N>,\n{\n let fields: [_; ORACLE_RETURN_FIELD_LENGTH] = get_notes_oracle_wrapper(\n storage_slot,\n num_selects,\n select_by_indexes,\n select_by_offsets,\n select_by_lengths,\n select_values,\n select_comparators,\n sort_by_indexes,\n sort_by_offsets,\n sort_by_lengths,\n sort_order,\n limit,\n offset,\n status,\n );\n let num_notes = fields[0] as u32;\n let contract_address = AztecAddress::from_field(fields[1]);\n\n let mut opt_notes = [Option::none(); MAX_NOTES];\n for i in 0..opt_notes.len() {\n if i < num_notes {\n // lengths named as per typescript.\n let return_header_length: u32 = 2; // num_notes & contract_address.\n let extra_preimage_length: u32 = 2; // nonce & note_hash_counter.\n let read_offset: u32 = return_header_length + i * (N + extra_preimage_length);\n\n let maybe_nonce = fields[read_offset];\n let maybe_note_hash_counter = fields[read_offset + 1] as u32;\n let packed_note = array::subarray(fields, read_offset + 2);\n\n let note = Note::unpack(packed_note);\n let retrieved_note = RetrievedNote {\n note,\n contract_address,\n metadata: NoteMetadata::from_raw_data(maybe_note_hash_counter != 0, maybe_nonce),\n };\n\n opt_notes[i] = Option::some(retrieved_note);\n };\n }\n opt_notes\n}\n\n/// Returns true if the nullifier exists. Note that a `true` value can be constrained by proving existence of the\n/// nullifier, but a `false` value should not be relied upon since other transactions may emit this nullifier before the\n/// current transaction is included in a block. While this might seem of little use at first, certain design patterns\n/// benefit from this abstraction (see e.g. `PrivateMutable`).\npub unconstrained fn check_nullifier_exists(inner_nullifier: Field) -> bool {\n check_nullifier_exists_oracle(inner_nullifier)\n}\n\n#[oracle(checkNullifierExists)]\nunconstrained fn check_nullifier_exists_oracle(_inner_nullifier: Field) -> bool {}\n\n/// Same as `get_indexed_tagging_secret_as_sender`, except it returns the derived tag, ready to be included in a log.\npub unconstrained fn get_app_tag_as_sender(sender: AztecAddress, recipient: AztecAddress) -> Field {\n get_indexed_tagging_secret_as_sender(sender, recipient).compute_tag(recipient)\n}\n\n/// Returns the tagging secret for a given sender and recipient pair, siloed for the current contract address.\n/// Includes the last known index used to send a note tagged with this secret.\n/// For this to work, PXE must know the ivsk_m of the sender.\n/// For the recipient's side, only the address is needed.\npub unconstrained fn get_indexed_tagging_secret_as_sender(\n sender: AztecAddress,\n recipient: AztecAddress,\n) -> IndexedTaggingSecret {\n let result = get_indexed_tagging_secret_as_sender_oracle(sender, recipient);\n IndexedTaggingSecret::deserialize(result)\n}\n\n#[oracle(getIndexedTaggingSecretAsSender)]\nunconstrained fn get_indexed_tagging_secret_as_sender_oracle(\n _sender: AztecAddress,\n _recipient: AztecAddress,\n) -> [Field; INDEXED_TAGGING_SECRET_LENGTH] {}\n\n/// Notifies the simulator that a tag has been used in a note, and to therefore increment the associated index so that\n/// future notes get a different tag and can be discovered by the recipient.\n/// This change should only be persisted in a non-volatile database if the tagged log is found in an actual block -\n/// otherwise e.g. a reverting transaction can cause the sender to accidentally skip indices and later produce notes\n/// that are not found by the recipient.\npub fn increment_app_tagging_secret_index_as_sender(sender: AztecAddress, recipient: AztecAddress) {\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 {\n increment_app_tagging_secret_index_as_sender_wrapper(sender, recipient);\n }\n}\n\nunconstrained fn increment_app_tagging_secret_index_as_sender_wrapper(\n sender: AztecAddress,\n recipient: AztecAddress,\n) {\n increment_app_tagging_secret_index_as_sender_oracle(sender, recipient);\n}\n\n#[oracle(incrementAppTaggingSecretIndexAsSender)]\nunconstrained fn increment_app_tagging_secret_index_as_sender_oracle(\n _sender: AztecAddress,\n _recipient: AztecAddress,\n) {}\n"
|
|
2639
2701
|
},
|
|
2640
|
-
"
|
|
2641
|
-
"path": "/
|
|
2702
|
+
"163": {
|
|
2703
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/oracle/storage.nr",
|
|
2642
2704
|
"source": "use dep::protocol_types::{address::AztecAddress, traits::{Packable, ToField}};\n\n#[oracle(storageRead)]\nunconstrained fn storage_read_oracle<let N: u32>(\n address: Field,\n storage_slot: Field,\n block_number: Field,\n length: Field,\n) -> [Field; N] {}\n\npub unconstrained fn raw_storage_read<let N: u32>(\n address: AztecAddress,\n storage_slot: Field,\n block_number: u32,\n) -> [Field; N] {\n storage_read_oracle(\n address.to_field(),\n storage_slot,\n block_number as Field,\n N as Field,\n )\n}\n\npub unconstrained fn storage_read<T, let N: u32>(\n address: AztecAddress,\n storage_slot: Field,\n block_number: u32,\n) -> T\nwhere\n T: Packable<N>,\n{\n T::unpack(raw_storage_read(address, storage_slot, block_number))\n}\n\nmod tests {\n use crate::oracle::storage::{raw_storage_read, storage_read};\n use dep::protocol_types::{address::AztecAddress, traits::{FromField, Packable}};\n\n use crate::test::mocks::mock_struct::MockStruct;\n use std::test::OracleMock;\n\n global address: AztecAddress = AztecAddress::from_field(29);\n global slot: Field = 7;\n global block_number: u32 = 17;\n\n #[test]\n unconstrained fn test_raw_storage_read() {\n let written = MockStruct { a: 13, b: 42 };\n\n let _ = OracleMock::mock(\"storageRead\").returns(written.pack());\n\n let read: [Field; 2] = raw_storage_read(address, slot, block_number);\n assert_eq(read[0], 13);\n assert_eq(read[1], 42);\n }\n\n #[test]\n unconstrained fn test_storage_read() {\n let written = MockStruct { a: 13, b: 42 };\n\n let _ = OracleMock::mock(\"storageRead\").returns(written.pack());\n\n let read: MockStruct = storage_read(address, slot, block_number);\n assert_eq(read.a, 13);\n assert_eq(read.b, 42);\n }\n}\n"
|
|
2643
2705
|
},
|
|
2644
|
-
"
|
|
2645
|
-
"path": "/
|
|
2706
|
+
"165": {
|
|
2707
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/state_vars/map.nr",
|
|
2646
2708
|
"source": "use crate::state_vars::storage::Storage;\nuse dep::protocol_types::{storage::map::derive_storage_slot_in_map, traits::{Packable, ToField}};\n\n// docs:start:map\npub struct Map<K, V, Context> {\n context: Context,\n storage_slot: Field,\n state_var_constructor: fn(Context, Field) -> V,\n}\n// docs:end:map\n\nimpl<K, T, Context, let N: u32> Storage<N> for Map<K, T, Context>\nwhere\n T: Packable<N>,\n{\n fn get_storage_slot(self) -> Field {\n self.storage_slot\n }\n}\n\nimpl<K, V, Context> Map<K, V, Context> {\n // docs:start:new\n pub fn new(\n context: Context,\n storage_slot: Field,\n state_var_constructor: fn(Context, Field) -> V,\n ) -> Self {\n assert(storage_slot != 0, \"Storage slot 0 not allowed. Storage slots must start from 1.\");\n Map { context, storage_slot, state_var_constructor }\n }\n // docs:end:new\n\n // docs:start:at\n pub fn at(self, key: K) -> V\n where\n K: ToField,\n {\n // TODO(#1204): use a generator index for the storage slot\n let derived_storage_slot = derive_storage_slot_in_map(self.storage_slot, key);\n\n let state_var_constructor = self.state_var_constructor;\n state_var_constructor(self.context, derived_storage_slot)\n }\n // docs:end:at\n}\n"
|
|
2647
2709
|
},
|
|
2648
|
-
"
|
|
2649
|
-
"path": "/
|
|
2710
|
+
"173": {
|
|
2711
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/state_vars/public_mutable.nr",
|
|
2650
2712
|
"source": "use crate::context::{PublicContext, UnconstrainedContext};\nuse crate::state_vars::storage::Storage;\nuse dep::protocol_types::traits::Packable;\n\n// docs:start:public_mutable_struct\npub struct PublicMutable<T, Context> {\n context: Context,\n storage_slot: Field,\n}\n// docs:end:public_mutable_struct\n\nimpl<T, Context, let N: u32> Storage<N> for PublicMutable<T, Context>\nwhere\n T: Packable<N>,\n{\n fn get_storage_slot(self) -> Field {\n self.storage_slot\n }\n}\n\nimpl<T, Context> PublicMutable<T, Context> {\n // docs:start:public_mutable_struct_new\n pub fn new(\n // Note: Passing the contexts to new(...) just to have an interface compatible with a Map.\n context: Context,\n storage_slot: Field,\n ) -> Self {\n assert(storage_slot != 0, \"Storage slot 0 not allowed. Storage slots must start from 1.\");\n PublicMutable { context, storage_slot }\n }\n // docs:end:public_mutable_struct_new\n}\n\nimpl<T, let T_PACKED_LEN: u32> PublicMutable<T, &mut PublicContext>\nwhere\n T: Packable<T_PACKED_LEN>,\n{\n // docs:start:public_mutable_struct_read\n pub fn read(self) -> T {\n self.context.storage_read(self.storage_slot)\n }\n // docs:end:public_mutable_struct_read\n\n // docs:start:public_mutable_struct_write\n pub fn write(self, value: T) {\n self.context.storage_write(self.storage_slot, value);\n }\n // docs:end:public_mutable_struct_write\n}\n\nimpl<T, let T_PACKED_LEN: u32> PublicMutable<T, UnconstrainedContext>\nwhere\n T: Packable<T_PACKED_LEN>,\n{\n pub unconstrained fn read(self) -> T {\n self.context.storage_read(self.storage_slot)\n }\n}\n"
|
|
2651
2713
|
},
|
|
2714
|
+
"187": {
|
|
2715
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/utils/array/append.nr",
|
|
2716
|
+
"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"
|
|
2717
|
+
},
|
|
2718
|
+
"189": {
|
|
2719
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/utils/array/mod.nr",
|
|
2720
|
+
"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"
|
|
2721
|
+
},
|
|
2722
|
+
"190": {
|
|
2723
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/utils/array/subarray.nr",
|
|
2724
|
+
"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"
|
|
2725
|
+
},
|
|
2726
|
+
"191": {
|
|
2727
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/utils/array/subbvec.nr",
|
|
2728
|
+
"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"
|
|
2729
|
+
},
|
|
2652
2730
|
"24": {
|
|
2653
2731
|
"path": "std/hash/poseidon2.nr",
|
|
2654
2732
|
"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"
|
|
2655
2733
|
},
|
|
2656
|
-
"
|
|
2657
|
-
"path": "/
|
|
2658
|
-
"source": "use crate::{\n address::{\n partial_address::PartialAddress, salted_initialization_hash::SaltedInitializationHash,\n },\n constants::{\n AZTEC_ADDRESS_LENGTH, GENERATOR_INDEX__CONTRACT_ADDRESS_V1, MAX_FIELD_VALUE,\n MAX_PROTOCOL_CONTRACTS,\n },\n contract_class_id::ContractClassId,\n hash::poseidon2_hash_with_separator,\n public_keys::{IvpkM, NpkM, OvpkM, PublicKeys, ToPoint, TpkM},\n traits::{Deserialize, Empty, FromField, Packable, Serialize, ToField},\n};\n\n// We do below because `use crate::point::Point;` does not work\nuse dep::std::embedded_curve_ops::EmbeddedCurvePoint as Point;\n\nuse crate::public_keys::AddressPoint;\nuse
|
|
2734
|
+
"263": {
|
|
2735
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/address/aztec_address.nr",
|
|
2736
|
+
"source": "use crate::{\n address::{\n partial_address::PartialAddress, salted_initialization_hash::SaltedInitializationHash,\n },\n constants::{\n AZTEC_ADDRESS_LENGTH, GENERATOR_INDEX__CONTRACT_ADDRESS_V1, MAX_FIELD_VALUE,\n MAX_PROTOCOL_CONTRACTS,\n },\n contract_class_id::ContractClassId,\n hash::poseidon2_hash_with_separator,\n public_keys::{IvpkM, NpkM, OvpkM, PublicKeys, ToPoint, TpkM},\n traits::{Deserialize, Empty, FromField, Packable, Serialize, ToField},\n utils::field::{pow, sqrt},\n};\n\n// We do below because `use crate::point::Point;` does not work\nuse dep::std::embedded_curve_ops::EmbeddedCurvePoint as Point;\n\nuse crate::public_keys::AddressPoint;\nuse std::{\n embedded_curve_ops::{EmbeddedCurveScalar, fixed_base_scalar_mul as derive_public_key},\n ops::Add,\n};\n\n// Aztec address\npub struct AztecAddress {\n pub inner: Field,\n}\n\nimpl Eq for AztecAddress {\n fn eq(self, other: Self) -> bool {\n self.to_field() == other.to_field()\n }\n}\n\nimpl Empty for AztecAddress {\n fn empty() -> Self {\n Self { inner: 0 }\n }\n}\n\nimpl ToField for AztecAddress {\n fn to_field(self) -> Field {\n self.inner\n }\n}\n\nimpl FromField for AztecAddress {\n fn from_field(value: Field) -> AztecAddress {\n AztecAddress { inner: value }\n }\n}\n\nimpl Serialize<AZTEC_ADDRESS_LENGTH> for AztecAddress {\n fn serialize(self: Self) -> [Field; AZTEC_ADDRESS_LENGTH] {\n [self.to_field()]\n }\n}\n\nimpl Deserialize<AZTEC_ADDRESS_LENGTH> for AztecAddress {\n fn deserialize(fields: [Field; AZTEC_ADDRESS_LENGTH]) -> Self {\n FromField::from_field(fields[0])\n }\n}\n\n/// We implement the Packable trait for AztecAddress because it can be stored in contract's storage (and there\n/// the implementation of Packable is required).\nimpl Packable<AZTEC_ADDRESS_LENGTH> for AztecAddress {\n fn pack(self) -> [Field; AZTEC_ADDRESS_LENGTH] {\n self.serialize()\n }\n\n fn unpack(fields: [Field; AZTEC_ADDRESS_LENGTH]) -> Self {\n Self::deserialize(fields)\n }\n}\n\nimpl AztecAddress {\n pub fn zero() -> Self {\n Self { inner: 0 }\n }\n\n pub fn to_address_point(self) -> AddressPoint {\n // We compute the address point by taking our address, setting it to x, and then solving for y in the\n // equation which defines our bn curve:\n // y^2 = x^3 - 17; x = address\n let x = self.inner;\n let y_squared = pow(x, 3) - 17;\n\n // TODO (#8970): Handle cases where we cannot recover a point from an address\n let mut y = sqrt(y_squared);\n\n // If we get a negative y coordinate (any y where y > MAX_FIELD_VALUE / 2), we pin it to the\n // positive one (any value where y <= MAX_FIELD_VALUE / 2) by subtracting it from the Field modulus\n // note: The field modulus is MAX_FIELD_VALUE + 1\n if (!(y.lt(MAX_FIELD_VALUE / 2) | y.eq(MAX_FIELD_VALUE / 2))) {\n y = (MAX_FIELD_VALUE + 1) - y;\n }\n\n AddressPoint { inner: Point { x: self.inner, y, is_infinite: false } }\n }\n\n pub fn compute(public_keys: PublicKeys, partial_address: PartialAddress) -> AztecAddress {\n let public_keys_hash = public_keys.hash();\n\n let pre_address = poseidon2_hash_with_separator(\n [public_keys_hash.to_field(), partial_address.to_field()],\n GENERATOR_INDEX__CONTRACT_ADDRESS_V1,\n );\n\n let address_point = derive_public_key(EmbeddedCurveScalar::from_field(pre_address)).add(\n public_keys.ivpk_m.to_point(),\n );\n\n // Note that our address is only the x-coordinate of the full address_point. This is okay because when people want to encrypt something and send it to us\n // they can recover our full point using the x-coordinate (our address itself). To do this, they recompute the y-coordinate according to the equation y^2 = x^3 - 17.\n // When they do this, they may get a positive y-coordinate (a value that is less than or equal to MAX_FIELD_VALUE / 2) or\n // a negative y-coordinate (a value that is more than MAX_FIELD_VALUE), and we cannot dictate which one they get and hence the recovered point may sometimes be different than the one\n // our secret can decrypt. Regardless though, they should and will always encrypt using point with the positive y-coordinate by convention.\n // This ensures that everyone encrypts to the same point given an arbitrary x-coordinate (address). This is allowed because even though our original point may not have a positive y-coordinate,\n // with our original secret, we will be able to derive the secret to the point with the flipped (and now positive) y-coordinate that everyone encrypts to.\n AztecAddress::from_field(address_point.x)\n }\n\n pub fn compute_from_class_id(\n contract_class_id: ContractClassId,\n salted_initialization_hash: SaltedInitializationHash,\n public_keys: PublicKeys,\n ) -> Self {\n let partial_address = PartialAddress::compute_from_salted_initialization_hash(\n contract_class_id,\n salted_initialization_hash,\n );\n\n AztecAddress::compute(public_keys, partial_address)\n }\n\n pub fn is_protocol_contract(self) -> bool {\n self.inner.lt(MAX_PROTOCOL_CONTRACTS as Field)\n }\n\n pub fn is_zero(self) -> bool {\n self.inner == 0\n }\n\n pub fn assert_is_zero(self) {\n assert(self.to_field() == 0);\n }\n}\n\n#[test]\nfn compute_address_from_partial_and_pub_keys() {\n let public_keys = PublicKeys {\n npk_m: NpkM {\n inner: Point {\n x: 0x22f7fcddfa3ce3e8f0cc8e82d7b94cdd740afa3e77f8e4a63ea78a239432dcab,\n y: 0x0471657de2b6216ade6c506d28fbc22ba8b8ed95c871ad9f3e3984e90d9723a7,\n is_infinite: false,\n },\n },\n ivpk_m: IvpkM {\n inner: Point {\n x: 0x111223493147f6785514b1c195bb37a2589f22a6596d30bb2bb145fdc9ca8f1e,\n y: 0x273bbffd678edce8fe30e0deafc4f66d58357c06fd4a820285294b9746c3be95,\n is_infinite: false,\n },\n },\n ovpk_m: OvpkM {\n inner: Point {\n x: 0x09115c96e962322ffed6522f57194627136b8d03ac7469109707f5e44190c484,\n y: 0x0c49773308a13d740a7f0d4f0e6163b02c5a408b6f965856b6a491002d073d5b,\n is_infinite: false,\n },\n },\n tpk_m: TpkM {\n inner: Point {\n x: 0x00d3d81beb009873eb7116327cf47c612d5758ef083d4fda78e9b63980b2a762,\n y: 0x2f567d22d2b02fe1f4ad42db9d58a36afd1983e7e2909d1cab61cafedad6193a,\n is_infinite: false,\n },\n },\n };\n\n let partial_address = PartialAddress::from_field(\n 0x0a7c585381b10f4666044266a02405bf6e01fa564c8517d4ad5823493abd31de,\n );\n\n let address = AztecAddress::compute(public_keys, partial_address);\n\n // The following value was generated by `derivation.test.ts`.\n // --> Run the test with AZTEC_GENERATE_TEST_DATA=1 flag to update test data.\n let expected_computed_address_from_partial_and_pubkeys =\n 0x24e4646f58b9fbe7d38e317db8d5636c423fbbdfbe119fc190fe9c64747e0c62;\n assert(address.to_field() == expected_computed_address_from_partial_and_pubkeys);\n}\n\n#[test]\nfn compute_preaddress_from_partial_and_pub_keys() {\n let pre_address = poseidon2_hash_with_separator([1, 2], GENERATOR_INDEX__CONTRACT_ADDRESS_V1);\n let expected_computed_preaddress_from_partial_and_pubkey =\n 0x23ce9be3fa3c846b0f9245cc796902e731d04f086e8a42473bb29e405fc98075;\n assert(pre_address == expected_computed_preaddress_from_partial_and_pubkey);\n}\n\n#[test]\nfn from_field_to_field() {\n let address = AztecAddress { inner: 37 };\n assert_eq(FromField::from_field(address.to_field()), address);\n}\n\n#[test]\nfn serde() {\n let address = AztecAddress { inner: 37 };\n assert_eq(Deserialize::deserialize(address.serialize()), address);\n}\n"
|
|
2737
|
+
},
|
|
2738
|
+
"280": {
|
|
2739
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/debug_log.nr",
|
|
2740
|
+
"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"
|
|
2659
2741
|
},
|
|
2660
|
-
"
|
|
2661
|
-
"path": "/
|
|
2742
|
+
"281": {
|
|
2743
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/hash.nr",
|
|
2662
2744
|
"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"
|
|
2663
2745
|
},
|
|
2664
|
-
"
|
|
2665
|
-
"path": "/
|
|
2746
|
+
"295": {
|
|
2747
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/meta/mod.nr",
|
|
2748
|
+
"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"
|
|
2749
|
+
},
|
|
2750
|
+
"298": {
|
|
2751
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/poseidon2.nr",
|
|
2666
2752
|
"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"
|
|
2667
2753
|
},
|
|
2668
|
-
"
|
|
2669
|
-
"path": "/
|
|
2754
|
+
"318": {
|
|
2755
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/storage/map.nr",
|
|
2670
2756
|
"source": "use crate::{hash::poseidon2_hash, traits::ToField};\n\npub fn derive_storage_slot_in_map<K>(storage_slot: Field, key: K) -> Field\nwhere\n K: ToField,\n{\n poseidon2_hash([storage_slot, key.to_field()])\n}\n\nmod test {\n use crate::{address::AztecAddress, storage::map::derive_storage_slot_in_map, traits::FromField};\n\n #[test]\n fn test_derive_storage_slot_in_map_matches_typescript() {\n let map_slot = 0x132258fb6962c4387ba659d9556521102d227549a386d39f0b22d1890d59c2b5;\n let key = AztecAddress::from_field(\n 0x302dbc2f9b50a73283d5fb2f35bc01eae8935615817a0b4219a057b2ba8a5a3f,\n );\n\n let slot = derive_storage_slot_in_map(map_slot, key);\n\n // The following value was generated by `map_slot.test.ts`\n let slot_from_typescript =\n 0x15b9fe39449affd8b377461263e9d2b610b9ad40580553500b4e41d9cbd887ac;\n\n assert_eq(slot, slot_from_typescript);\n }\n}\n"
|
|
2671
2757
|
},
|
|
2672
|
-
"
|
|
2673
|
-
"path": "/
|
|
2758
|
+
"336": {
|
|
2759
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/type_packing.nr",
|
|
2674
2760
|
"source": "use crate::traits::Packable;\n\nglobal BOOL_PACKED_LEN: u32 = 1;\nglobal U8_PACKED_LEN: u32 = 1;\nglobal U16_PACKED_LEN: u32 = 1;\nglobal U32_PACKED_LEN: u32 = 1;\nglobal U64_PACKED_LEN: u32 = 1;\nglobal U128_PACKED_LEN: u32 = 1;\nglobal FIELD_PACKED_LEN: u32 = 1;\nglobal I8_PACKED_LEN: u32 = 1;\nglobal I16_PACKED_LEN: u32 = 1;\nglobal I32_PACKED_LEN: u32 = 1;\nglobal I64_PACKED_LEN: u32 = 1;\n\nimpl Packable<BOOL_PACKED_LEN> for bool {\n fn pack(self) -> [Field; BOOL_PACKED_LEN] {\n [self as Field]\n }\n\n fn unpack(fields: [Field; BOOL_PACKED_LEN]) -> bool {\n fields[0] as bool\n }\n}\n\nimpl Packable<U8_PACKED_LEN> for u8 {\n fn pack(self) -> [Field; U8_PACKED_LEN] {\n [self as Field]\n }\n\n fn unpack(fields: [Field; U8_PACKED_LEN]) -> Self {\n fields[0] as u8\n }\n}\n\nimpl Packable<U16_PACKED_LEN> for u16 {\n fn pack(self) -> [Field; U16_PACKED_LEN] {\n [self as Field]\n }\n\n fn unpack(fields: [Field; U16_PACKED_LEN]) -> Self {\n fields[0] as u16\n }\n}\n\nimpl Packable<U32_PACKED_LEN> for u32 {\n fn pack(self) -> [Field; U32_PACKED_LEN] {\n [self as Field]\n }\n\n fn unpack(fields: [Field; U32_PACKED_LEN]) -> Self {\n fields[0] as u32\n }\n}\n\nimpl Packable<U64_PACKED_LEN> for u64 {\n fn pack(self) -> [Field; U64_PACKED_LEN] {\n [self as Field]\n }\n\n fn unpack(fields: [Field; U64_PACKED_LEN]) -> Self {\n fields[0] as u64\n }\n}\n\nimpl Packable<U128_PACKED_LEN> for u128 {\n fn pack(self) -> [Field; U128_PACKED_LEN] {\n [self as Field]\n }\n\n fn unpack(fields: [Field; U128_PACKED_LEN]) -> Self {\n fields[0] as u128\n }\n}\n\nimpl Packable<FIELD_PACKED_LEN> for Field {\n fn pack(self) -> [Field; FIELD_PACKED_LEN] {\n [self]\n }\n\n fn unpack(fields: [Field; FIELD_PACKED_LEN]) -> Self {\n fields[0]\n }\n}\n\nimpl Packable<I8_PACKED_LEN> for i8 {\n fn pack(self) -> [Field; I8_PACKED_LEN] {\n [self as Field]\n }\n\n fn unpack(fields: [Field; I8_PACKED_LEN]) -> Self {\n fields[0] as i8\n }\n}\n\nimpl Packable<I16_PACKED_LEN> for i16 {\n fn pack(self) -> [Field; I16_PACKED_LEN] {\n [self as Field]\n }\n\n fn unpack(fields: [Field; I16_PACKED_LEN]) -> Self {\n fields[0] as i16\n }\n}\n\nimpl Packable<I32_PACKED_LEN> for i32 {\n fn pack(self) -> [Field; I32_PACKED_LEN] {\n [self as Field]\n }\n\n fn unpack(fields: [Field; I32_PACKED_LEN]) -> Self {\n fields[0] as i32\n }\n}\n\nimpl Packable<I64_PACKED_LEN> for i64 {\n fn pack(self) -> [Field; I64_PACKED_LEN] {\n [self as Field]\n }\n\n fn unpack(fields: [Field; I64_PACKED_LEN]) -> Self {\n fields[0] as i64\n }\n}\n\nimpl<T, let N: u32, let M: u32> Packable<N * M> for [T; N]\nwhere\n T: Packable<M>,\n{\n fn pack(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].pack();\n for j in 0..M {\n result[i * M + j] = serialized[j];\n }\n }\n result\n }\n\n fn unpack(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>(Packable::unpack, result)\n }\n}\n\n#[test]\nfn test_u16_packing() {\n let a: u16 = 10;\n assert_eq(a, u16::unpack(a.pack()));\n}\n\n#[test]\nfn test_i8_packing() {\n let a: i8 = -10;\n assert_eq(a, i8::unpack(a.pack()));\n}\n\n#[test]\nfn test_i16_packing() {\n let a: i16 = -10;\n assert_eq(a, i16::unpack(a.pack()));\n}\n\n#[test]\nfn test_i32_packing() {\n let a: i32 = -10;\n assert_eq(a, i32::unpack(a.pack()));\n}\n\n#[test]\nfn test_i64_packing() {\n let a: i64 = -10;\n assert_eq(a, i64::unpack(a.pack()));\n}\n"
|
|
2675
2761
|
},
|
|
2676
|
-
"
|
|
2677
|
-
"path": "/
|
|
2762
|
+
"337": {
|
|
2763
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/type_serialization.nr",
|
|
2678
2764
|
"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"
|
|
2679
2765
|
},
|
|
2680
|
-
"
|
|
2681
|
-
"path": "/
|
|
2766
|
+
"353": {
|
|
2767
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/utils/arrays.nr",
|
|
2682
2768
|
"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"
|
|
2683
2769
|
},
|
|
2684
|
-
"
|
|
2685
|
-
"path": "/
|
|
2770
|
+
"356": {
|
|
2771
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/utils/reader.nr",
|
|
2686
2772
|
"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"
|
|
2687
2773
|
},
|
|
2774
|
+
"46": {
|
|
2775
|
+
"path": "std/option.nr",
|
|
2776
|
+
"source": "use crate::cmp::{Eq, Ord, Ordering};\nuse crate::default::Default;\nuse crate::hash::{Hash, Hasher};\n\npub struct Option<T> {\n _is_some: bool,\n _value: T,\n}\n\nimpl<T> Option<T> {\n /// Constructs a None value\n pub fn none() -> Self {\n Self { _is_some: false, _value: crate::mem::zeroed() }\n }\n\n /// Constructs a Some wrapper around the given value\n pub fn some(_value: T) -> Self {\n Self { _is_some: true, _value }\n }\n\n /// True if this Option is None\n pub fn is_none(self) -> bool {\n !self._is_some\n }\n\n /// True if this Option is Some\n pub fn is_some(self) -> bool {\n self._is_some\n }\n\n /// Asserts `self.is_some()` and returns the wrapped value.\n pub fn unwrap(self) -> T {\n assert(self._is_some);\n self._value\n }\n\n /// Returns the inner value without asserting `self.is_some()`\n /// Note that if `self` is `None`, there is no guarantee what value will be returned,\n /// only that it will be of type `T`.\n pub fn unwrap_unchecked(self) -> T {\n self._value\n }\n\n /// Returns the wrapped value if `self.is_some()`. Otherwise, returns the given default value.\n pub fn unwrap_or(self, default: T) -> T {\n if self._is_some {\n self._value\n } else {\n default\n }\n }\n\n /// Returns the wrapped value if `self.is_some()`. Otherwise, calls the given function to return\n /// a default value.\n pub fn unwrap_or_else<Env>(self, default: fn[Env]() -> T) -> T {\n if self._is_some {\n self._value\n } else {\n default()\n }\n }\n\n /// Asserts `self.is_some()` with a provided custom message and returns the contained `Some` value\n pub fn expect<let N: u32, MessageTypes>(self, message: fmtstr<N, MessageTypes>) -> T {\n assert(self.is_some(), message);\n self._value\n }\n\n /// If self is `Some(x)`, this returns `Some(f(x))`. Otherwise, this returns `None`.\n pub fn map<U, Env>(self, f: fn[Env](T) -> U) -> Option<U> {\n if self._is_some {\n Option::some(f(self._value))\n } else {\n Option::none()\n }\n }\n\n /// If self is `Some(x)`, this returns `f(x)`. Otherwise, this returns the given default value.\n pub fn map_or<U, Env>(self, default: U, f: fn[Env](T) -> U) -> U {\n if self._is_some {\n f(self._value)\n } else {\n default\n }\n }\n\n /// If self is `Some(x)`, this returns `f(x)`. Otherwise, this returns `default()`.\n pub fn map_or_else<U, Env1, Env2>(self, default: fn[Env1]() -> U, f: fn[Env2](T) -> U) -> U {\n if self._is_some {\n f(self._value)\n } else {\n default()\n }\n }\n\n /// Returns None if self is None. Otherwise, this returns `other`.\n pub fn and(self, other: Self) -> Self {\n if self.is_none() {\n Option::none()\n } else {\n other\n }\n }\n\n /// If self is None, this returns None. Otherwise, this calls the given function\n /// with the Some value contained within self, and returns the result of that call.\n ///\n /// In some languages this function is called `flat_map` or `bind`.\n pub fn and_then<U, Env>(self, f: fn[Env](T) -> Option<U>) -> Option<U> {\n if self._is_some {\n f(self._value)\n } else {\n Option::none()\n }\n }\n\n /// If self is Some, return self. Otherwise, return `other`.\n pub fn or(self, other: Self) -> Self {\n if self._is_some {\n self\n } else {\n other\n }\n }\n\n /// If self is Some, return self. Otherwise, return `default()`.\n pub fn or_else<Env>(self, default: fn[Env]() -> Self) -> Self {\n if self._is_some {\n self\n } else {\n default()\n }\n }\n\n // If only one of the two Options is Some, return that option.\n // Otherwise, if both options are Some or both are None, None is returned.\n pub fn xor(self, other: Self) -> Self {\n if self._is_some {\n if other._is_some {\n Option::none()\n } else {\n self\n }\n } else if other._is_some {\n other\n } else {\n Option::none()\n }\n }\n\n /// Returns `Some(x)` if self is `Some(x)` and `predicate(x)` is true.\n /// Otherwise, this returns `None`\n pub fn filter<Env>(self, predicate: fn[Env](T) -> bool) -> Self {\n if self._is_some {\n if predicate(self._value) {\n self\n } else {\n Option::none()\n }\n } else {\n Option::none()\n }\n }\n\n /// Flattens an Option<Option<T>> into a Option<T>.\n /// This returns None if the outer Option is None. Otherwise, this returns the inner Option.\n pub fn flatten(option: Option<Option<T>>) -> Option<T> {\n if option._is_some {\n option._value\n } else {\n Option::none()\n }\n }\n}\n\nimpl<T> Default for Option<T> {\n fn default() -> Self {\n Option::none()\n }\n}\n\nimpl<T> Eq for Option<T>\nwhere\n T: Eq,\n{\n fn eq(self, other: Self) -> bool {\n if self._is_some == other._is_some {\n if self._is_some {\n self._value == other._value\n } else {\n true\n }\n } else {\n false\n }\n }\n}\n\nimpl<T> Hash for Option<T>\nwhere\n T: Hash,\n{\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n self._is_some.hash(state);\n if self._is_some {\n self._value.hash(state);\n }\n }\n}\n\n// For this impl we're declaring Option::none < Option::some\nimpl<T> Ord for Option<T>\nwhere\n T: Ord,\n{\n fn cmp(self, other: Self) -> Ordering {\n if self._is_some {\n if other._is_some {\n self._value.cmp(other._value)\n } else {\n Ordering::greater()\n }\n } else if other._is_some {\n Ordering::less()\n } else {\n Ordering::equal()\n }\n }\n}\n"
|
|
2777
|
+
},
|
|
2688
2778
|
"47": {
|
|
2689
2779
|
"path": "std/panic.nr",
|
|
2690
2780
|
"source": "pub fn panic<T, U, let N: u32>(message: fmtstr<N, T>) -> U {\n assert(false, message);\n crate::mem::zeroed()\n}\n"
|
|
2691
2781
|
},
|
|
2692
2782
|
"54": {
|
|
2693
|
-
"path": "/
|
|
2783
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-contracts/contracts/auth_registry_contract/src/main.nr",
|
|
2694
2784
|
"source": "use dep::aztec::macros::aztec;\n\n#[aztec]\npub contract AuthRegistry {\n use dep::authwit::auth::{\n assert_current_call_valid_authwit, compute_authwit_message_hash, IS_VALID_SELECTOR,\n };\n use dep::aztec::{\n macros::{functions::{internal, private, public, view}, storage::storage},\n protocol_types::address::AztecAddress,\n state_vars::{Map, PublicMutable},\n };\n\n #[storage]\n struct Storage<Context> {\n reject_all: Map<AztecAddress, PublicMutable<bool, Context>, Context>,\n // on_behalf_of => authwit hash => authorized\n approved_actions: Map<AztecAddress, Map<Field, PublicMutable<bool, Context>, Context>, Context>,\n }\n\n /**\n * Updates the `authorized` value for `msg_sender` for `message_hash`.\n *\n * @param message_hash The message hash being authorized\n * @param authorize True if the caller is authorized to perform the message hash, false otherwise\n */\n #[public]\n fn set_authorized(message_hash: Field, authorize: bool) {\n storage.approved_actions.at(context.msg_sender()).at(message_hash).write(authorize);\n }\n\n /**\n * Updates the `reject_all` value for `msg_sender`.\n *\n * When `reject_all` is `true` any `consume` on `msg_sender` will revert.\n *\n * @param reject True if all actions should be rejected, false otherwise\n */\n #[public]\n fn set_reject_all(reject: bool) {\n storage.reject_all.at(context.msg_sender()).write(reject);\n }\n\n /**\n * Consumes an `inner_hash` on behalf of `on_behalf_of` if the caller is authorized to do so.\n *\n * Will revert even if the caller is authorized if `reject_all` is set to true for `on_behalf_of`.\n * This is to support \"mass-revoke\".\n *\n * @param on_behalf_of The address on whose behalf the action is being consumed\n * @param inner_hash The inner_hash of the authwit\n * @return `IS_VALID_SELECTOR` if the action was consumed, revert otherwise\n */\n #[public]\n fn consume(on_behalf_of: AztecAddress, inner_hash: Field) -> Field {\n assert_eq(false, storage.reject_all.at(on_behalf_of).read(), \"rejecting all\");\n\n let message_hash = compute_authwit_message_hash(\n context.msg_sender(),\n context.chain_id(),\n context.version(),\n inner_hash,\n );\n\n let authorized = storage.approved_actions.at(on_behalf_of).at(message_hash).read();\n\n assert_eq(true, authorized, \"unauthorized\");\n storage.approved_actions.at(on_behalf_of).at(message_hash).write(false);\n\n IS_VALID_SELECTOR\n }\n\n /**\n * Updates a public authwit using a private authwit\n *\n * Useful for the case where you want someone else to insert a public authwit for you.\n * For example, if Alice wants Bob to insert an authwit in public, such that they can execute\n * a trade, Alice can create a private authwit, and Bob can call this function with it.\n *\n * @param approver The address of the approver (Alice in the example)\n * @param message_hash The message hash to authorize\n * @param authorize True if the message hash should be authorized, false otherwise\n */\n #[private]\n fn set_authorized_private(approver: AztecAddress, message_hash: Field, authorize: bool) {\n assert_current_call_valid_authwit(&mut context, approver);\n AuthRegistry::at(context.this_address())\n ._set_authorized(approver, message_hash, authorize)\n .enqueue(&mut context);\n }\n\n /**\n * Internal function to update the `authorized` value for `approver` for `messageHash`.\n * Used along with `set_authorized_private` to update the public authwit.\n *\n * @param approver The address of the approver\n * @param message_hash The message hash being authorized\n * @param authorize True if the caller is authorized to perform the message hash, false otherwise\n */\n #[public]\n #[internal]\n fn _set_authorized(approver: AztecAddress, message_hash: Field, authorize: bool) {\n storage.approved_actions.at(approver).at(message_hash).write(authorize);\n }\n\n /**\n * Fetches the `reject_all` value for `on_behalf_of`.\n *\n * @param on_behalf_of The address to check\n * @return True if all actions are rejected, false otherwise\n */\n #[public]\n #[view]\n fn is_reject_all(on_behalf_of: AztecAddress) -> bool {\n storage.reject_all.at(on_behalf_of).read()\n }\n\n /**\n * Fetches the `authorized` value for `on_behalf_of` for `message_hash`.\n *\n * @param on_behalf_of The address on whose behalf the action is being consumed\n * @param message_hash The message hash to check\n * @return True if the caller is authorized to perform the action, false otherwise\n */\n #[public]\n #[view]\n fn is_consumable(on_behalf_of: AztecAddress, message_hash: Field) -> bool {\n storage.approved_actions.at(on_behalf_of).at(message_hash).read()\n }\n\n unconstrained fn unconstrained_is_consumable(\n on_behalf_of: AztecAddress,\n message_hash: Field,\n ) -> pub bool {\n storage.approved_actions.at(on_behalf_of).at(message_hash).read()\n }\n}\n"
|
|
2695
2785
|
},
|
|
2696
2786
|
"56": {
|
|
2697
|
-
"path": "/
|
|
2698
|
-
"source": "use dep::aztec::{context::{gas::GasOpts, PrivateContext, PublicContext}, hash::hash_args_array};\nuse dep::aztec::protocol_types::{\n abis::function_selector::FunctionSelector,\n address::AztecAddress,\n constants::{\n CANONICAL_AUTH_REGISTRY_ADDRESS, GENERATOR_INDEX__AUTHWIT_INNER,\n GENERATOR_INDEX__AUTHWIT_NULLIFIER, GENERATOR_INDEX__AUTHWIT_OUTER,\n },\n hash::poseidon2_hash_with_separator,\n traits::ToField,\n};\n\n/**\n * Authenticaion witness helper library\n *\n * Authentication Witness is a scheme for authenticating actions on Aztec, so users can allow third-parties\n * (e.g. protocols or other users) to execute an action on their behalf.\n *\n * This library provides helper functions to manage such witnesses.\n * The authentication witness, is some \"witness\" (data) that authenticates a `message_hash`.\n * The simplest example of an authentication witness, is a signature. The signature is the \"evidence\",\n * that the signer has seen the message, agrees with it, and has allowed it.\n * It does not need to be a signature. It could be any kind of \"proof\" that the message is allowed.\n * Another proof could be knowing some kind of secret, or having some kind of \"token\" that allows the message.\n *\n * The `message_hash` is a hash of the following structure:\n * hash(consumer, chain_id, version, inner_hash)\n * - consumer: the address of the contract that is \"consuming\" the message,\n * - chain_id: the chain id of the chain that the message is being consumed on,\n * - version: the version of the chain that the message is being consumed on,\n * - inner_hash: the hash of the \"inner\" message that is being consumed, this is the \"actual\" message or action.\n *\n * While the `inner_hash` could be anything, such as showing you signed a specific message, it will often be\n * a hash of the \"action\" to approve, along with who made the call. As part of this library, we provide a few\n * helper functions to deal with such messages.\n *\n * For example, we provide helper function that is used for checking that the message is an encoding of the current call.\n * This can be used to let some contract \"allow\" another contract to act on its behalf, as long as it can\n * show that it is acting on behalf of the contract.\n *\n * If we take a case of allowing a contract to transfer tokens on behalf of an account, the `inner_hash` can be\n * derived as:\n * inner_hash = hash(caller, \"transfer\", hash(to, amount))\n *\n * Where the `caller` would be the address of the contract that is trying to transfer the tokens, and `to` and `amount`\n * the arguments for the transfer.\n *\n * Note that we have both a `caller` and a `consumer`, the `consumer` will be the contract that is consuming the message,\n * in the case of the transfer, it would be the `Token` contract itself, while the caller, will be the actor that is\n * allowed to transfer the tokens.\n *\n *\n * The authentication mechanism works differently in public and private contexts. In private, we recall that everything\n * is executed on the user's device, so we can use `oracles` to \"ask\" the user (not contract) for information. In public\n * we cannot do this, since it is executed by the sequencer (someone else). Therefore we can instead use a \"registry\"\n * to store the messages that we have approved.\n *\n * A simple example would be a \"token\" that is being \"pulled\" from one account into another. We will first outline\n * how this would look in private, and then in public later.\n *\n * Say that a user `Alice` wants to deposit some tokens into a DeFi protocol (say a DEX).\n * `Alice` would make a `deposit` transaction, that she is executing using her account contract.\n * The account would call the `DeFi` contract to execute `deposit`, which would try to pull funds from the `Token`\n * contract. Since the `DeFi` contract is trying to pull funds from an account that is not its own, it needs to\n * convince the `Token` contract that it is allowed to do so.\n *\n * This is where the authentication witness comes in The `Token` contract computes a `message_hash` from the\n * `transfer` call, and then asks `Alice Account` contract to verify that the `DeFi` contract is allowed to\n * execute that call.\n *\n * `Alice Account` contract can then ask `Alice` if she wants to allow the `DeFi` contract to pull funds from her\n * account. If she does, she will sign the `message_hash` and return the signature to the `Alice Account` which\n * will validate it and return success to the `Token` contract which will then allow the `DeFi` contract to pull\n * funds from `Alice`.\n *\n * To ensure that the same \"approval\" cannot be used multiple times, we also compute a `nullifier` for the\n * authentication witness, and emit it from the `Token` contract (consumer).\n *\n * Note that we can do this flow as we are in private were we can do oracle calls out from contracts.\n *\n *\n * Person Contract Contract Contract\n * Alice Alice Account Token DeFi\n * | | | |\n * | Defi.deposit(Token, 1000) | |\n * |----------------->| | |\n * | | deposit(Token, 1000) |\n * | |---------------------------------------->|\n * | | | |\n * | | | transfer(Alice, Defi, 1000)\n * | | |<---------------------|\n * | | | |\n * | | Check if Defi may call transfer(Alice, Defi, 1000)\n * | |<-----------------| |\n * | | | |\n * | Please give me AuthWit for DeFi | |\n * | calling transfer(Alice, Defi, 1000) | |\n * |<-----------------| | |\n * | | | |\n * | | | |\n * | AuthWit for transfer(Alice, Defi, 1000) |\n * |----------------->| | |\n * | | AuthWit validity | |\n * | |----------------->| |\n * | | | |\n * | | throw if invalid AuthWit |\n * | | | |\n * | | emit AuthWit nullifier |\n * | | | |\n * | | transfer(Alice, Defi, 1000) |\n * | | | |\n * | | | |\n * | | | success |\n * | | |--------------------->|\n * | | | |\n * | | | |\n * | | | deposit(Token, 1000)\n * | | | |\n * | | | |\n *\n *\n * If we instead were in public, we cannot do the same flow. Instead we would use an authentication registry to store\n * the messages that we have approved.\n *\n * To approve a message, `Alice Account` can make a `set_authorized` call to the registry, to set a `message_hash`\n * as authorized. This is essentially a mapping from `message_hash` to `true` for `Alice Contract`. Every account\n * has its own map in the registry, so `Alice` cannot approve a message for `Bob`.\n *\n * The `Token` contract can then try to \"spend\" the approval by calling `consume` on the registry. If the message\n * was approved, the value is updated to `false`, and we return the success flag. For more information on the\n * registry, see `main.nr` in `auth_registry_contract`.\n *\n * Person Contract Contract Contract Contract\n * Alice Alice Account Registry Token DeFi\n * | | | | |\n * | Registry.set_authorized(..., true) | | |\n * |----------------->| | | |\n * | | set_authorized(..., true) | |\n * | |------------------->| | |\n * | | | | |\n * | | set authorized to true | |\n * | | | | |\n * | | | | |\n * | Defi.deposit(Token, 1000) | | |\n * |----------------->| | | |\n * | | deposit(Token, 1000) | |\n * | |-------------------------------------------------------------->|\n * | | | | |\n * | | | transfer(Alice, Defi, 1000) |\n * | | | |<---------------------|\n * | | | | |\n * | | | Check if Defi may call transfer(Alice, Defi, 1000)\n * | | |<------------------| |\n * | | | | |\n * | | throw if invalid AuthWit | |\n * | | | | |\n * | | | | |\n * | | set authorized to false | |\n * | | | | |\n * | | | | |\n * | | | AuthWit validity | |\n * | | |------------------>| |\n * | | | | |\n * | | | | transfer(Alice, Defi, 1000)\n * | | | |<-------------------->|\n * | | | | |\n * | | | | success |\n * | | | |--------------------->|\n * | | | | |\n * | | | | deposit(Token, 1000)\n * | | | | |\n *\n *\n * --- FAQ ---\n * Q: Why are we using a success flag of `poseidon2_hash_bytes(\"IS_VALID()\")` instead of just returning a boolean?\n * A: We want to make sure that we don't accidentally return `true` if there is a collision in the function selector.\n * By returning a hash of `IS_VALID()`, it becomes very unlikely that there is both a collision and we return\n * a success flag.\n *\n * Q: Why are we using static calls?\n * A: We are using static calls to ensure that the account contract cannot re-enter. If it was a normal call, it\n * could make a new call and do a re-entry attack. Using a static ensures that it cannot update any state.\n *\n * Q: Would it not be cheaper to use a nullifier instead of updating state in public?\n * A: At a quick glance, a public state update + nullifier is 96 bytes, but two state updates are 128, so it would be\n * cheaper to use a nullifier, if this is the way it would always be done. However, if both the approval and the\n * consumption is done in the same transaction, then we will be able to squash the updates (only final tx state diff is posted to DA), and now it is cheaper.\n *\n * Q: Why is the chain id and the version part of the message hash?\n * A: The chain id and the version is part of the message hash to ensure that the message is only valid on a specific\n * chain to avoid a case where the same message could be used across multiple chains.\n */\n\nglobal IS_VALID_SELECTOR: Field = 0x47dacd73; // 4 last bytes of poseidon2_hash_bytes(\"IS_VALID()\")\n\n/**\n * Assert that `on_behalf_of` has authorized the current call with a valid authentication witness\n *\n * Compute the `inner_hash` using the `msg_sender`, `selector` and `args_hash` and then make a call out to the\n * `on_behalf_of` contract to verify that the `inner_hash` is valid.\n *\n * @param on_behalf_of The address that has allegedly authorized the current call\n */\n// docs:start:assert_current_call_valid_authwit\npub fn assert_current_call_valid_authwit(context: &mut PrivateContext, on_behalf_of: AztecAddress) {\n let inner_hash = compute_inner_authwit_hash([\n context.msg_sender().to_field(),\n context.selector().to_field(),\n context.args_hash,\n ]);\n assert_inner_hash_valid_authwit(context, on_behalf_of, inner_hash);\n}\n// docs:end:assert_current_call_valid_authwit\n\n/**\n * Assert that a specific `inner_hash` is valid for the `on_behalf_of` address\n *\n * Used as an internal function for `assert_current_call_valid_authwit` and can be used as a standalone function when\n * the `inner_hash` is from a different source, e.g., say a block of text etc.\n *\n * @param on_behalf_of The address that has allegedly authorized the current call\n * @param inner_hash The hash of the message to authorize\n */\npub fn assert_inner_hash_valid_authwit(\n context: &mut PrivateContext,\n on_behalf_of: AztecAddress,\n inner_hash: Field,\n) {\n // We perform a static call here and not a standard one to ensure that the account contract cannot re-enter.\n let result: Field = context\n .static_call_private_function(\n on_behalf_of,\n comptime { FunctionSelector::from_signature(\"verify_private_authwit(Field)\") },\n [inner_hash],\n )\n .get_preimage();\n assert(result == IS_VALID_SELECTOR, \"Message not authorized by account\");\n // Compute the nullifier, similar computation to the outer hash, but without the chain_id and version.\n // Those should already be handled in the verification, so we just need something to nullify, that allows the same inner_hash for multiple actors.\n let nullifier = compute_authwit_nullifier(on_behalf_of, inner_hash);\n context.push_nullifier(nullifier);\n}\n\n/**\n * Assert that `on_behalf_of` has authorized the current call in the authentication registry\n *\n * Compute the `inner_hash` using the `msg_sender`, `selector` and `args_hash` and then make a call out to the\n * `on_behalf_of` contract to verify that the `inner_hash` is valid.\n *\n * Note that the authentication registry will take the `msg_sender` into account as the consumer, so this will only\n * work if the `msg_sender` is the same as the `consumer` when the `message_hash` was inserted into the registry.\n *\n * @param on_behalf_of The address that has allegedly authorized the current call\n */\n// docs:start:assert_current_call_valid_authwit_public\npub unconstrained fn assert_current_call_valid_authwit_public(\n context: &mut PublicContext,\n on_behalf_of: AztecAddress,\n) {\n let inner_hash = compute_inner_authwit_hash([\n (*context).msg_sender().to_field(),\n (*context).selector().to_field(),\n (*context).get_args_hash(),\n ]);\n assert_inner_hash_valid_authwit_public(context, on_behalf_of, inner_hash);\n}\n// docs:end:assert_current_call_valid_authwit_public\n\n/**\n * Assert that `on_behalf_of` has authorized a specific `inner_hash` in the authentication registry\n *\n * Compute the `inner_hash` using the `msg_sender`, `selector` and `args_hash` and then make a call out to the\n * `on_behalf_of` contract to verify that the `inner_hash` is valid.\n *\n * Note that the authentication registry will take the `msg_sender` into account as the consumer, so this will only\n * work if the `msg_sender` is the same as the `consumer` when the `message_hash` was inserted into the registry.\n *\n * @param on_behalf_of The address that has allegedly authorized the `inner_hash`\n */\npub unconstrained fn assert_inner_hash_valid_authwit_public(\n context: &mut PublicContext,\n on_behalf_of: AztecAddress,\n inner_hash: Field,\n) {\n let results: [Field] = context.call_public_function(\n CANONICAL_AUTH_REGISTRY_ADDRESS,\n comptime { FunctionSelector::from_signature(\"consume((Field),Field)\") },\n [on_behalf_of.to_field(), inner_hash].as_slice(),\n GasOpts::default(),\n );\n assert(results.len() == 1, \"Invalid response from registry\");\n assert(results[0] == IS_VALID_SELECTOR, \"Message not authorized by account\");\n}\n\n/**\n * Compute the `message_hash` from a function call to be used by an authentication witness\n *\n * Useful for when you need a non-account contract to approve during execution. For example if you need a contract\n * to make a call to nested contract, e.g., contract A wants to exit token T to L1 using bridge B, so it needs to allow\n * B to transfer T on its behalf.\n *\n * @param caller The address of the contract that is calling the function, in the example above, this would be B\n * @param consumer The address of the contract that is consuming the message, in the example above, this would be T\n * @param chain_id The chain id of the chain that the message is being consumed on\n * @param version The version of the chain that the message is being consumed on\n * @param selector The function selector of the function that is being called\n * @param args The arguments of the function that is being called\n */\n// docs:start:compute_authwit_message_hash_from_call\npub fn compute_authwit_message_hash_from_call<let N: u32>(\n caller: AztecAddress,\n consumer: AztecAddress,\n chain_id: Field,\n version: Field,\n selector: FunctionSelector,\n args: [Field; N],\n) -> Field {\n let args_hash = hash_args_array(args);\n let inner_hash =\n compute_inner_authwit_hash([caller.to_field(), selector.to_field(), args_hash]);\n compute_authwit_message_hash(consumer, chain_id, version, inner_hash)\n}\n// docs:end:compute_authwit_message_hash_from_call\n\n/**\n * Computes the `inner_hash` of the authentication witness\n *\n * This is used internally, but also useful in cases where you want to compute the `inner_hash` for a specific message\n * that is not necessarily a call, but just some \"bytes\" or text.\n *\n * @param args The arguments to hash\n */\npub fn compute_inner_authwit_hash<let N: u32>(args: [Field; N]) -> Field {\n poseidon2_hash_with_separator(args, GENERATOR_INDEX__AUTHWIT_INNER)\n}\n\n/**\n * Computes the `authwit_nullifier` for a specific `on_behalf_of` and `inner_hash`\n *\n * Using the `on_behalf_of` and the `inner_hash` to ensure that the nullifier is siloed for a specific `on_behalf_of`.\n *\n * @param on_behalf_of The address that has authorized the `inner_hash`\n * @param inner_hash The hash of the message to authorize\n */\npub fn compute_authwit_nullifier(on_behalf_of: AztecAddress, inner_hash: Field) -> Field {\n poseidon2_hash_with_separator(\n [on_behalf_of.to_field(), inner_hash],\n GENERATOR_INDEX__AUTHWIT_NULLIFIER,\n )\n}\n\n/**\n * Computes the `message_hash` for the authentication witness\n *\n * @param consumer The address of the contract that is consuming the message\n * @param chain_id The chain id of the chain that the message is being consumed on\n * @param version The version of the chain that the message is being consumed on\n * @param inner_hash The hash of the \"inner\" message that is being consumed\n */\npub fn compute_authwit_message_hash(\n consumer: AztecAddress,\n chain_id: Field,\n version: Field,\n inner_hash: Field,\n) -> Field {\n poseidon2_hash_with_separator(\n [consumer.to_field(), chain_id, version, inner_hash],\n GENERATOR_INDEX__AUTHWIT_OUTER,\n )\n}\n\n/**\n * Helper function to set the authorization status of a message hash\n *\n * Wraps a public call to the authentication registry to set the authorization status of a `message_hash`\n *\n * @param message_hash The hash of the message to authorize\n * @param authorize True if the message should be authorized, false if it should be revoked\n */\npub unconstrained fn set_authorized(\n context: &mut PublicContext,\n message_hash: Field,\n authorize: bool,\n) {\n let res = context.call_public_function(\n CANONICAL_AUTH_REGISTRY_ADDRESS,\n comptime { FunctionSelector::from_signature(\"set_authorized(Field,bool)\") },\n [message_hash, authorize as Field].as_slice(),\n GasOpts::default(),\n );\n assert(res.len() == 0);\n}\n\n/**\n * Helper function to reject all authwits\n *\n * Wraps a public call to the authentication registry to set the `reject_all` flag\n *\n * @param reject True if all authwits should be rejected, false otherwise\n */\npub unconstrained fn set_reject_all(context: &mut PublicContext, reject: bool) {\n let res = context.call_public_function(\n CANONICAL_AUTH_REGISTRY_ADDRESS,\n comptime { FunctionSelector::from_signature(\"set_reject_all(bool)\") },\n [context.this_address().to_field(), reject as Field].as_slice(),\n GasOpts::default(),\n );\n assert(res.len() == 0);\n}\n"
|
|
2787
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/authwit/src/auth.nr",
|
|
2788
|
+
"source": "use dep::aztec::{context::{gas::GasOpts, PrivateContext, PublicContext}, hash::hash_args_array};\nuse dep::aztec::protocol_types::{\n abis::function_selector::FunctionSelector,\n address::AztecAddress,\n constants::{\n CANONICAL_AUTH_REGISTRY_ADDRESS, GENERATOR_INDEX__AUTHWIT_INNER,\n GENERATOR_INDEX__AUTHWIT_NULLIFIER, GENERATOR_INDEX__AUTHWIT_OUTER,\n },\n hash::poseidon2_hash_with_separator,\n traits::ToField,\n};\n\n/**\n * Authenticaion witness helper library\n *\n * Authentication Witness is a scheme for authenticating actions on Aztec, so users can allow third-parties\n * (e.g. protocols or other users) to execute an action on their behalf.\n *\n * This library provides helper functions to manage such witnesses.\n * The authentication witness, is some \"witness\" (data) that authenticates a `message_hash`.\n * The simplest example of an authentication witness, is a signature. The signature is the \"evidence\",\n * that the signer has seen the message, agrees with it, and has allowed it.\n * It does not need to be a signature. It could be any kind of \"proof\" that the message is allowed.\n * Another proof could be knowing some kind of secret, or having some kind of \"token\" that allows the message.\n *\n * The `message_hash` is a hash of the following structure:\n * hash(consumer, chain_id, version, inner_hash)\n * - consumer: the address of the contract that is \"consuming\" the message,\n * - chain_id: the chain id of the chain that the message is being consumed on,\n * - version: the version of the chain that the message is being consumed on,\n * - inner_hash: the hash of the \"inner\" message that is being consumed, this is the \"actual\" message or action.\n *\n * While the `inner_hash` could be anything, such as showing you signed a specific message, it will often be\n * a hash of the \"action\" to approve, along with who made the call. As part of this library, we provide a few\n * helper functions to deal with such messages.\n *\n * For example, we provide helper function that is used for checking that the message is an encoding of the current call.\n * This can be used to let some contract \"allow\" another contract to act on its behalf, as long as it can\n * show that it is acting on behalf of the contract.\n *\n * If we take a case of allowing a contract to transfer tokens on behalf of an account, the `inner_hash` can be\n * derived as:\n * inner_hash = hash(caller, \"transfer\", hash(to, amount))\n *\n * Where the `caller` would be the address of the contract that is trying to transfer the tokens, and `to` and `amount`\n * the arguments for the transfer.\n *\n * Note that we have both a `caller` and a `consumer`, the `consumer` will be the contract that is consuming the message,\n * in the case of the transfer, it would be the `Token` contract itself, while the caller, will be the actor that is\n * allowed to transfer the tokens.\n *\n *\n * The authentication mechanism works differently in public and private contexts. In private, we recall that everything\n * is executed on the user's device, so we can use `oracles` to \"ask\" the user (not contract) for information. In public\n * we cannot do this, since it is executed by the sequencer (someone else). Therefore we can instead use a \"registry\"\n * to store the messages that we have approved.\n *\n * A simple example would be a \"token\" that is being \"pulled\" from one account into another. We will first outline\n * how this would look in private, and then in public later.\n *\n * Say that a user `Alice` wants to deposit some tokens into a DeFi protocol (say a DEX).\n * `Alice` would make a `deposit` transaction, that she is executing using her account contract.\n * The account would call the `DeFi` contract to execute `deposit`, which would try to pull funds from the `Token`\n * contract. Since the `DeFi` contract is trying to pull funds from an account that is not its own, it needs to\n * convince the `Token` contract that it is allowed to do so.\n *\n * This is where the authentication witness comes in The `Token` contract computes a `message_hash` from the\n * `transfer` call, and then asks `Alice Account` contract to verify that the `DeFi` contract is allowed to\n * execute that call.\n *\n * `Alice Account` contract can then ask `Alice` if she wants to allow the `DeFi` contract to pull funds from her\n * account. If she does, she will sign the `message_hash` and return the signature to the `Alice Account` which\n * will validate it and return success to the `Token` contract which will then allow the `DeFi` contract to pull\n * funds from `Alice`.\n *\n * To ensure that the same \"approval\" cannot be used multiple times, we also compute a `nullifier` for the\n * authentication witness, and emit it from the `Token` contract (consumer).\n *\n * Note that we can do this flow as we are in private were we can do oracle calls out from contracts.\n *\n *\n * Person Contract Contract Contract\n * Alice Alice Account Token DeFi\n * | | | |\n * | Defi.deposit(Token, 1000) | |\n * |----------------->| | |\n * | | deposit(Token, 1000) |\n * | |---------------------------------------->|\n * | | | |\n * | | | transfer(Alice, Defi, 1000)\n * | | |<---------------------|\n * | | | |\n * | | Check if Defi may call transfer(Alice, Defi, 1000)\n * | |<-----------------| |\n * | | | |\n * | Please give me AuthWit for DeFi | |\n * | calling transfer(Alice, Defi, 1000) | |\n * |<-----------------| | |\n * | | | |\n * | | | |\n * | AuthWit for transfer(Alice, Defi, 1000) |\n * |----------------->| | |\n * | | AuthWit validity | |\n * | |----------------->| |\n * | | | |\n * | | throw if invalid AuthWit |\n * | | | |\n * | | emit AuthWit nullifier |\n * | | | |\n * | | transfer(Alice, Defi, 1000) |\n * | | | |\n * | | | |\n * | | | success |\n * | | |--------------------->|\n * | | | |\n * | | | |\n * | | | deposit(Token, 1000)\n * | | | |\n * | | | |\n *\n *\n * If we instead were in public, we cannot do the same flow. Instead we would use an authentication registry to store\n * the messages that we have approved.\n *\n * To approve a message, `Alice Account` can make a `set_authorized` call to the registry, to set a `message_hash`\n * as authorized. This is essentially a mapping from `message_hash` to `true` for `Alice Contract`. Every account\n * has its own map in the registry, so `Alice` cannot approve a message for `Bob`.\n *\n * The `Token` contract can then try to \"spend\" the approval by calling `consume` on the registry. If the message\n * was approved, the value is updated to `false`, and we return the success flag. For more information on the\n * registry, see `main.nr` in `auth_registry_contract`.\n *\n * Person Contract Contract Contract Contract\n * Alice Alice Account Registry Token DeFi\n * | | | | |\n * | Registry.set_authorized(..., true) | | |\n * |----------------->| | | |\n * | | set_authorized(..., true) | |\n * | |------------------->| | |\n * | | | | |\n * | | set authorized to true | |\n * | | | | |\n * | | | | |\n * | Defi.deposit(Token, 1000) | | |\n * |----------------->| | | |\n * | | deposit(Token, 1000) | |\n * | |-------------------------------------------------------------->|\n * | | | | |\n * | | | transfer(Alice, Defi, 1000) |\n * | | | |<---------------------|\n * | | | | |\n * | | | Check if Defi may call transfer(Alice, Defi, 1000)\n * | | |<------------------| |\n * | | | | |\n * | | throw if invalid AuthWit | |\n * | | | | |\n * | | | | |\n * | | set authorized to false | |\n * | | | | |\n * | | | | |\n * | | | AuthWit validity | |\n * | | |------------------>| |\n * | | | | |\n * | | | | transfer(Alice, Defi, 1000)\n * | | | |<-------------------->|\n * | | | | |\n * | | | | success |\n * | | | |--------------------->|\n * | | | | |\n * | | | | deposit(Token, 1000)\n * | | | | |\n *\n *\n * --- FAQ ---\n * Q: Why are we using a success flag of `poseidon2_hash_bytes(\"IS_VALID()\")` instead of just returning a boolean?\n * A: We want to make sure that we don't accidentally return `true` if there is a collision in the function selector.\n * By returning a hash of `IS_VALID()`, it becomes very unlikely that there is both a collision and we return\n * a success flag.\n *\n * Q: Why are we using static calls?\n * A: We are using static calls to ensure that the account contract cannot re-enter. If it was a normal call, it\n * could make a new call and do a re-entry attack. Using a static ensures that it cannot update any state.\n *\n * Q: Would it not be cheaper to use a nullifier instead of updating state in public?\n * A: At a quick glance, a public state update + nullifier is 96 bytes, but two state updates are 128, so it would be\n * cheaper to use a nullifier, if this is the way it would always be done. However, if both the approval and the\n * consumption is done in the same transaction, then we will be able to squash the updates (only final tx state diff is posted to DA), and now it is cheaper.\n *\n * Q: Why is the chain id and the version part of the message hash?\n * A: The chain id and the version is part of the message hash to ensure that the message is only valid on a specific\n * chain to avoid a case where the same message could be used across multiple chains.\n */\n\npub global IS_VALID_SELECTOR: Field = 0x47dacd73; // 4 last bytes of poseidon2_hash_bytes(\"IS_VALID()\")\n\n/**\n * Assert that `on_behalf_of` has authorized the current call with a valid authentication witness\n *\n * Compute the `inner_hash` using the `msg_sender`, `selector` and `args_hash` and then make a call out to the\n * `on_behalf_of` contract to verify that the `inner_hash` is valid.\n *\n * @param on_behalf_of The address that has allegedly authorized the current call\n */\n// docs:start:assert_current_call_valid_authwit\npub fn assert_current_call_valid_authwit(context: &mut PrivateContext, on_behalf_of: AztecAddress) {\n let inner_hash = compute_inner_authwit_hash([\n context.msg_sender().to_field(),\n context.selector().to_field(),\n context.args_hash,\n ]);\n assert_inner_hash_valid_authwit(context, on_behalf_of, inner_hash);\n}\n// docs:end:assert_current_call_valid_authwit\n\n/**\n * Assert that a specific `inner_hash` is valid for the `on_behalf_of` address\n *\n * Used as an internal function for `assert_current_call_valid_authwit` and can be used as a standalone function when\n * the `inner_hash` is from a different source, e.g., say a block of text etc.\n *\n * @param on_behalf_of The address that has allegedly authorized the current call\n * @param inner_hash The hash of the message to authorize\n */\npub fn assert_inner_hash_valid_authwit(\n context: &mut PrivateContext,\n on_behalf_of: AztecAddress,\n inner_hash: Field,\n) {\n // We perform a static call here and not a standard one to ensure that the account contract cannot re-enter.\n let result: Field = context\n .static_call_private_function(\n on_behalf_of,\n comptime { FunctionSelector::from_signature(\"verify_private_authwit(Field)\") },\n [inner_hash],\n )\n .get_preimage();\n assert(result == IS_VALID_SELECTOR, \"Message not authorized by account\");\n // Compute the nullifier, similar computation to the outer hash, but without the chain_id and version.\n // Those should already be handled in the verification, so we just need something to nullify, that allows the same inner_hash for multiple actors.\n let nullifier = compute_authwit_nullifier(on_behalf_of, inner_hash);\n context.push_nullifier(nullifier);\n}\n\n/**\n * Assert that `on_behalf_of` has authorized the current call in the authentication registry\n *\n * Compute the `inner_hash` using the `msg_sender`, `selector` and `args_hash` and then make a call out to the\n * `on_behalf_of` contract to verify that the `inner_hash` is valid.\n *\n * Note that the authentication registry will take the `msg_sender` into account as the consumer, so this will only\n * work if the `msg_sender` is the same as the `consumer` when the `message_hash` was inserted into the registry.\n *\n * @param on_behalf_of The address that has allegedly authorized the current call\n */\n// docs:start:assert_current_call_valid_authwit_public\npub unconstrained fn assert_current_call_valid_authwit_public(\n context: &mut PublicContext,\n on_behalf_of: AztecAddress,\n) {\n let inner_hash = compute_inner_authwit_hash([\n (*context).msg_sender().to_field(),\n (*context).selector().to_field(),\n (*context).get_args_hash(),\n ]);\n assert_inner_hash_valid_authwit_public(context, on_behalf_of, inner_hash);\n}\n// docs:end:assert_current_call_valid_authwit_public\n\n/**\n * Assert that `on_behalf_of` has authorized a specific `inner_hash` in the authentication registry\n *\n * Compute the `inner_hash` using the `msg_sender`, `selector` and `args_hash` and then make a call out to the\n * `on_behalf_of` contract to verify that the `inner_hash` is valid.\n *\n * Note that the authentication registry will take the `msg_sender` into account as the consumer, so this will only\n * work if the `msg_sender` is the same as the `consumer` when the `message_hash` was inserted into the registry.\n *\n * @param on_behalf_of The address that has allegedly authorized the `inner_hash`\n */\npub unconstrained fn assert_inner_hash_valid_authwit_public(\n context: &mut PublicContext,\n on_behalf_of: AztecAddress,\n inner_hash: Field,\n) {\n let results: [Field] = context.call_public_function(\n CANONICAL_AUTH_REGISTRY_ADDRESS,\n comptime { FunctionSelector::from_signature(\"consume((Field),Field)\") },\n [on_behalf_of.to_field(), inner_hash].as_slice(),\n GasOpts::default(),\n );\n assert(results.len() == 1, \"Invalid response from registry\");\n assert(results[0] == IS_VALID_SELECTOR, \"Message not authorized by account\");\n}\n\n/**\n * Compute the `message_hash` from a function call to be used by an authentication witness\n *\n * Useful for when you need a non-account contract to approve during execution. For example if you need a contract\n * to make a call to nested contract, e.g., contract A wants to exit token T to L1 using bridge B, so it needs to allow\n * B to transfer T on its behalf.\n *\n * @param caller The address of the contract that is calling the function, in the example above, this would be B\n * @param consumer The address of the contract that is consuming the message, in the example above, this would be T\n * @param chain_id The chain id of the chain that the message is being consumed on\n * @param version The version of the chain that the message is being consumed on\n * @param selector The function selector of the function that is being called\n * @param args The arguments of the function that is being called\n */\n// docs:start:compute_authwit_message_hash_from_call\npub fn compute_authwit_message_hash_from_call<let N: u32>(\n caller: AztecAddress,\n consumer: AztecAddress,\n chain_id: Field,\n version: Field,\n selector: FunctionSelector,\n args: [Field; N],\n) -> Field {\n let args_hash = hash_args_array(args);\n let inner_hash =\n compute_inner_authwit_hash([caller.to_field(), selector.to_field(), args_hash]);\n compute_authwit_message_hash(consumer, chain_id, version, inner_hash)\n}\n// docs:end:compute_authwit_message_hash_from_call\n\n/**\n * Computes the `inner_hash` of the authentication witness\n *\n * This is used internally, but also useful in cases where you want to compute the `inner_hash` for a specific message\n * that is not necessarily a call, but just some \"bytes\" or text.\n *\n * @param args The arguments to hash\n */\npub fn compute_inner_authwit_hash<let N: u32>(args: [Field; N]) -> Field {\n poseidon2_hash_with_separator(args, GENERATOR_INDEX__AUTHWIT_INNER)\n}\n\n/**\n * Computes the `authwit_nullifier` for a specific `on_behalf_of` and `inner_hash`\n *\n * Using the `on_behalf_of` and the `inner_hash` to ensure that the nullifier is siloed for a specific `on_behalf_of`.\n *\n * @param on_behalf_of The address that has authorized the `inner_hash`\n * @param inner_hash The hash of the message to authorize\n */\npub fn compute_authwit_nullifier(on_behalf_of: AztecAddress, inner_hash: Field) -> Field {\n poseidon2_hash_with_separator(\n [on_behalf_of.to_field(), inner_hash],\n GENERATOR_INDEX__AUTHWIT_NULLIFIER,\n )\n}\n\n/**\n * Computes the `message_hash` for the authentication witness\n *\n * @param consumer The address of the contract that is consuming the message\n * @param chain_id The chain id of the chain that the message is being consumed on\n * @param version The version of the chain that the message is being consumed on\n * @param inner_hash The hash of the \"inner\" message that is being consumed\n */\npub fn compute_authwit_message_hash(\n consumer: AztecAddress,\n chain_id: Field,\n version: Field,\n inner_hash: Field,\n) -> Field {\n poseidon2_hash_with_separator(\n [consumer.to_field(), chain_id, version, inner_hash],\n GENERATOR_INDEX__AUTHWIT_OUTER,\n )\n}\n\n/**\n * Helper function to set the authorization status of a message hash\n *\n * Wraps a public call to the authentication registry to set the authorization status of a `message_hash`\n *\n * @param message_hash The hash of the message to authorize\n * @param authorize True if the message should be authorized, false if it should be revoked\n */\npub unconstrained fn set_authorized(\n context: &mut PublicContext,\n message_hash: Field,\n authorize: bool,\n) {\n let res = context.call_public_function(\n CANONICAL_AUTH_REGISTRY_ADDRESS,\n comptime { FunctionSelector::from_signature(\"set_authorized(Field,bool)\") },\n [message_hash, authorize as Field].as_slice(),\n GasOpts::default(),\n );\n assert(res.len() == 0);\n}\n\n/**\n * Helper function to reject all authwits\n *\n * Wraps a public call to the authentication registry to set the `reject_all` flag\n *\n * @param reject True if all authwits should be rejected, false otherwise\n */\npub unconstrained fn set_reject_all(context: &mut PublicContext, reject: bool) {\n let res = context.call_public_function(\n CANONICAL_AUTH_REGISTRY_ADDRESS,\n comptime { FunctionSelector::from_signature(\"set_reject_all(bool)\") },\n [context.this_address().to_field(), reject as Field].as_slice(),\n GasOpts::default(),\n );\n assert(res.len() == 0);\n}\n"
|
|
2789
|
+
},
|
|
2790
|
+
"6": {
|
|
2791
|
+
"path": "std/collections/bounded_vec.nr",
|
|
2792
|
+
"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"
|
|
2793
|
+
},
|
|
2794
|
+
"64": {
|
|
2795
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/capsules/mod.nr",
|
|
2796
|
+
"source": "use crate::oracle::capsules;\nuse protocol_types::{address::AztecAddress, traits::{Deserialize, Serialize}};\n\n/// A dynamically sized array backed by PXE's non-volatile database (called capsules). Values are persisted until\n/// deleted, so they can be e.g. stored during simulation of a transaction and later retrieved during witness\n/// generation. All values are scoped per contract address, so external contracts cannot access them.\npub struct CapsuleArray<T> {\n contract_address: AztecAddress,\n /// The base slot is where the array length is stored in capsules. Array elements are stored in consecutive slots\n /// after the base slot. For example, with base slot 5: the length is at slot 5, the first element (index 0) is at\n /// slot 6, the second element (index 1) is at slot 7, and so on.\n base_slot: Field,\n}\n\nimpl<T, let N: u32> CapsuleArray<T>\nwhere\n T: Serialize<N> + Deserialize<N>,\n{\n /// Returns a CapsuleArray connected to a contract's capsules at a base slot. Array elements are stored in\n /// contiguous slots following the base slot, so there should be sufficient space between array base slots to\n /// accommodate elements. A reasonable strategy is to make the base slot a hash of a unique value.\n pub unconstrained fn at(contract_address: AztecAddress, base_slot: Field) -> Self {\n Self { contract_address, base_slot }\n }\n\n /// Returns the number of elements stored in the array.\n pub unconstrained fn len(self) -> u32 {\n // An uninitialized array defaults to a length of 0.\n capsules::load(self.contract_address, self.base_slot).unwrap_or(0) as u32\n }\n\n /// Stores a value at the end of the array.\n pub unconstrained fn push(self, value: T) {\n let current_length = self.len();\n\n // The slot corresponding to the index `current_length` is the first slot immediately after the end of the\n // array, which is where we want to place the new value.\n capsules::store(self.contract_address, self.slot_at(current_length), value);\n\n // Then we simply update the length.\n let new_length = current_length + 1;\n capsules::store(self.contract_address, self.base_slot, new_length);\n }\n\n /// Retrieves the value stored in the array at `index`. Throws if the index is out of bounds.\n pub unconstrained fn get(self, index: u32) -> T {\n assert(index < self.len(), \"Attempted to read past the length of a CapsuleArray\");\n\n capsules::load(self.contract_address, self.slot_at(index)).unwrap()\n }\n\n /// Deletes the value stored in the array at `index`. Throws if the index is out of bounds.\n pub unconstrained fn remove(self, index: u32) {\n let current_length = self.len();\n assert(index < current_length, \"Attempted to delete past the length of a CapsuleArray\");\n\n // In order to be able to remove elements at arbitrary indices, we need to shift the entire contents of the\n // array past the removed element one slot backward so that we don't end up with a gap and preserve the\n // contiguous slots. We can skip this when deleting the last element however.\n if index != current_length - 1 {\n // The source and destination regions overlap, but `copy` supports this.\n capsules::copy(\n self.contract_address,\n self.slot_at(index + 1),\n self.slot_at(index),\n current_length - index - 1,\n );\n }\n\n // We can now delete the last element (which has either been copied to the slot immediately before it, or was\n // the element we meant to delete in the first place) and update the length.\n capsules::delete(self.contract_address, self.slot_at(current_length - 1));\n capsules::store(self.contract_address, self.base_slot, current_length - 1);\n }\n\n unconstrained fn slot_at(self, index: u32) -> Field {\n // Elements are stored immediately after the base slot, so we add 1 to it to compute the slot for the first\n // element.\n self.base_slot + 1 + index as Field\n }\n}\n\nmod test {\n use crate::test::helpers::test_environment::TestEnvironment;\n use super::CapsuleArray;\n use protocol_types::address::AztecAddress;\n\n global SLOT: Field = 1230;\n\n unconstrained fn setup() -> AztecAddress {\n TestEnvironment::new().unkonstrained().this_address()\n }\n\n #[test]\n unconstrained fn empty_array() {\n let contract_address = setup();\n\n let array: CapsuleArray<Field> = CapsuleArray::at(contract_address, SLOT);\n assert_eq(array.len(), 0);\n }\n\n #[test(should_fail_with = \"Attempted to read past the length of a CapsuleArray\")]\n unconstrained fn empty_array_read() {\n let contract_address = setup();\n\n let array = CapsuleArray::at(contract_address, SLOT);\n let _: Field = array.get(0);\n }\n\n #[test]\n unconstrained fn array_push() {\n let contract_address = setup();\n\n let array = CapsuleArray::at(contract_address, SLOT);\n array.push(5);\n\n assert_eq(array.len(), 1);\n assert_eq(array.get(0), 5);\n }\n\n #[test(should_fail_with = \"Attempted to read past the length of a CapsuleArray\")]\n unconstrained fn read_past_len() {\n let contract_address = setup();\n\n let array = CapsuleArray::at(contract_address, SLOT);\n array.push(5);\n\n let _ = array.get(1);\n }\n\n #[test]\n unconstrained fn array_remove_last() {\n let contract_address = setup();\n\n let array = CapsuleArray::at(contract_address, SLOT);\n\n array.push(5);\n array.remove(0);\n\n assert_eq(array.len(), 0);\n }\n\n #[test]\n unconstrained fn array_remove_some() {\n let contract_address = setup();\n\n let array = CapsuleArray::at(contract_address, SLOT);\n\n array.push(7);\n array.push(8);\n array.push(9);\n\n assert_eq(array.len(), 3);\n assert_eq(array.get(0), 7);\n assert_eq(array.get(1), 8);\n assert_eq(array.get(2), 9);\n\n array.remove(1);\n\n assert_eq(array.len(), 2);\n assert_eq(array.get(0), 7);\n assert_eq(array.get(1), 9);\n }\n\n #[test]\n unconstrained fn array_remove_all() {\n let contract_address = setup();\n\n let array = CapsuleArray::at(contract_address, SLOT);\n\n array.push(7);\n array.push(8);\n array.push(9);\n\n array.remove(1);\n array.remove(1);\n array.remove(0);\n\n assert_eq(array.len(), 0);\n }\n}\n"
|
|
2699
2797
|
},
|
|
2700
2798
|
"65": {
|
|
2701
|
-
"path": "/
|
|
2799
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/context/call_interfaces.nr",
|
|
2702
2800
|
"source": "use dep::protocol_types::{\n abis::function_selector::FunctionSelector, address::AztecAddress, traits::Deserialize,\n};\n\nuse crate::context::{gas::GasOpts, private_context::PrivateContext, public_context::PublicContext};\n\nuse crate::hash::hash_args;\nuse crate::oracle::execution_cache;\n\npub trait CallInterface<let N: u32> {\n fn get_args(self) -> [Field];\n fn get_selector(self) -> FunctionSelector;\n fn get_name(self) -> str<N>;\n fn get_contract_address(self) -> AztecAddress;\n fn get_is_static(self) -> bool;\n}\n\n// PrivateCallInterface\n\npub struct PrivateCallInterface<let N: u32, T> {\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<N>,\n args_hash: Field,\n args: [Field],\n return_type: T,\n is_static: bool,\n}\n\nimpl<let N: u32, T> PrivateCallInterface<N, T> {\n pub fn new(\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<N>,\n args: [Field],\n is_static: bool,\n ) -> Self {\n let args_hash = hash_args(args);\n Self {\n target_contract,\n selector,\n name,\n args_hash,\n args,\n return_type: std::mem::zeroed(),\n is_static,\n }\n }\n\n pub fn call<let M: u32>(self, context: &mut PrivateContext) -> T\n where\n T: Deserialize<M>,\n {\n execution_cache::store(self.args);\n let returns_hash = context.call_private_function_with_args_hash(\n self.target_contract,\n self.selector,\n self.args_hash,\n false,\n );\n let returns: T = returns_hash.get_preimage();\n returns\n }\n\n pub fn view<let M: u32>(self, context: &mut PrivateContext) -> T\n where\n T: Deserialize<M>,\n {\n execution_cache::store(self.args);\n let returns_hash = context.call_private_function_with_args_hash(\n self.target_contract,\n self.selector,\n self.args_hash,\n true,\n );\n returns_hash.get_preimage()\n }\n}\n\nimpl<let N: u32, T> CallInterface<N> for PrivateCallInterface<N, T> {\n fn get_args(self) -> [Field] {\n self.args\n }\n\n fn get_selector(self) -> FunctionSelector {\n self.selector\n }\n\n fn get_name(self) -> str<N> {\n self.name\n }\n\n fn get_contract_address(self) -> AztecAddress {\n self.target_contract\n }\n\n fn get_is_static(self) -> bool {\n self.is_static\n }\n}\n\n// PrivateVoidCallInterface\n\npub struct PrivateVoidCallInterface<let N: u32> {\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<N>,\n args_hash: Field,\n args: [Field],\n return_type: (), // Unit type () indicates this interface is for functions that return nothing (void)\n is_static: bool,\n}\n\nimpl<let N: u32> PrivateVoidCallInterface<N> {\n pub fn new(\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<N>,\n args: [Field],\n is_static: bool,\n ) -> Self {\n let args_hash = hash_args(args);\n Self { target_contract, selector, name, args_hash, args, return_type: (), is_static }\n }\n\n pub fn call(self, context: &mut PrivateContext) {\n execution_cache::store(self.args);\n context\n .call_private_function_with_args_hash(\n self.target_contract,\n self.selector,\n self.args_hash,\n false,\n )\n .assert_empty();\n }\n\n pub fn view(self, context: &mut PrivateContext) {\n execution_cache::store(self.args);\n context\n .call_private_function_with_args_hash(\n self.target_contract,\n self.selector,\n self.args_hash,\n true,\n )\n .assert_empty();\n }\n}\n\nimpl<let N: u32> CallInterface<N> for PrivateVoidCallInterface<N> {\n fn get_args(self) -> [Field] {\n self.args\n }\n\n fn get_selector(self) -> FunctionSelector {\n self.selector\n }\n\n fn get_name(self) -> str<N> {\n self.name\n }\n\n fn get_contract_address(self) -> AztecAddress {\n self.target_contract\n }\n\n fn get_is_static(self) -> bool {\n self.is_static\n }\n}\n\n// PrivateStaticCallInterface\n\npub struct PrivateStaticCallInterface<let N: u32, T> {\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<N>,\n args_hash: Field,\n args: [Field],\n return_type: T,\n is_static: bool,\n}\n\nimpl<let N: u32, T> PrivateStaticCallInterface<N, T> {\n pub fn new(\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<N>,\n args: [Field],\n ) -> Self {\n let args_hash = hash_args(args);\n Self {\n target_contract,\n selector,\n name,\n args_hash,\n args,\n return_type: std::mem::zeroed(),\n is_static: true,\n }\n }\n\n pub fn view<let M: u32>(self, context: &mut PrivateContext) -> T\n where\n T: Deserialize<M>,\n {\n execution_cache::store(self.args);\n let returns = context.call_private_function_with_args_hash(\n self.target_contract,\n self.selector,\n self.args_hash,\n true,\n );\n returns.get_preimage()\n }\n}\n\nimpl<let N: u32, T> CallInterface<N> for PrivateStaticCallInterface<N, T> {\n fn get_args(self) -> [Field] {\n self.args\n }\n\n fn get_selector(self) -> FunctionSelector {\n self.selector\n }\n\n fn get_name(self) -> str<N> {\n self.name\n }\n\n fn get_contract_address(self) -> AztecAddress {\n self.target_contract\n }\n\n fn get_is_static(self) -> bool {\n self.is_static\n }\n}\n\n// PrivateStaticVoidCallInterface\n\npub struct PrivateStaticVoidCallInterface<let N: u32> {\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<N>,\n args_hash: Field,\n args: [Field],\n return_type: (), // Unit type () indicates this interface is for functions that return nothing (void)\n is_static: bool,\n}\n\nimpl<let N: u32> PrivateStaticVoidCallInterface<N> {\n pub fn new(\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<N>,\n args: [Field],\n ) -> Self {\n let args_hash = hash_args(args);\n Self { target_contract, selector, name, args_hash, args, return_type: (), is_static: true }\n }\n\n pub fn view(self, context: &mut PrivateContext) {\n execution_cache::store(self.args);\n context\n .call_private_function_with_args_hash(\n self.target_contract,\n self.selector,\n self.args_hash,\n true,\n )\n .assert_empty();\n }\n}\n\nimpl<let N: u32> CallInterface<N> for PrivateStaticVoidCallInterface<N> {\n fn get_args(self) -> [Field] {\n self.args\n }\n\n fn get_selector(self) -> FunctionSelector {\n self.selector\n }\n\n fn get_name(self) -> str<N> {\n self.name\n }\n\n fn get_contract_address(self) -> AztecAddress {\n self.target_contract\n }\n\n fn get_is_static(self) -> bool {\n self.is_static\n }\n}\n\n// PublicCallInterface\n\npub struct PublicCallInterface<let N: u32, T> {\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<N>,\n args: [Field],\n gas_opts: GasOpts,\n return_type: T,\n is_static: bool,\n}\n\nimpl<let N: u32, T> PublicCallInterface<N, T> {\n pub fn new(\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<N>,\n args: [Field],\n is_static: bool,\n ) -> Self {\n Self {\n target_contract,\n selector,\n name,\n args,\n gas_opts: GasOpts::default(),\n return_type: std::mem::zeroed(),\n is_static,\n }\n }\n\n pub fn with_gas(self: &mut Self, gas_opts: GasOpts) -> &mut Self {\n self.gas_opts = gas_opts;\n self\n }\n\n pub unconstrained fn call<let M: u32>(self, context: &mut PublicContext) -> T\n where\n T: Deserialize<M>,\n {\n let returns = context.call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n Deserialize::deserialize(returns.as_array::<M>())\n }\n\n pub unconstrained fn view<let M: u32>(self, context: &mut PublicContext) -> T\n where\n T: Deserialize<M>,\n {\n let returns = context.static_call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n Deserialize::deserialize(returns.as_array::<M>())\n }\n\n pub fn enqueue(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n execution_cache::store(self.args);\n context.call_public_function_with_args_hash(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n false,\n )\n }\n\n pub fn enqueue_view(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n execution_cache::store(self.args);\n context.call_public_function_with_args_hash(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n true,\n )\n }\n}\n\nimpl<let N: u32, T> CallInterface<N> for PublicCallInterface<N, T> {\n fn get_args(self) -> [Field] {\n self.args\n }\n\n fn get_selector(self) -> FunctionSelector {\n self.selector\n }\n\n fn get_name(self) -> str<N> {\n self.name\n }\n\n fn get_contract_address(self) -> AztecAddress {\n self.target_contract\n }\n\n fn get_is_static(self) -> bool {\n self.is_static\n }\n}\n\n// PublicVoidCallInterface\n\npub struct PublicVoidCallInterface<let N: u32> {\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<N>,\n args: [Field],\n return_type: (), // Unit type () indicates this interface is for functions that return nothing (void)\n is_static: bool,\n gas_opts: GasOpts,\n}\n\nimpl<let N: u32> PublicVoidCallInterface<N> {\n pub fn new(\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<N>,\n args: [Field],\n is_static: bool,\n ) -> Self {\n Self {\n target_contract,\n selector,\n name,\n args,\n return_type: (),\n is_static,\n gas_opts: GasOpts::default(),\n }\n }\n\n pub fn with_gas(self: &mut Self, gas_opts: GasOpts) -> &mut Self {\n self.gas_opts = gas_opts;\n self\n }\n\n pub unconstrained fn call(self, context: &mut PublicContext) {\n let returns = context.call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n assert(returns.len() == 0);\n }\n\n pub unconstrained fn view(self, context: &mut PublicContext) {\n let returns = context.static_call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n assert(returns.len() == 0);\n }\n\n pub fn enqueue(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n execution_cache::store(self.args);\n context.call_public_function_with_args_hash(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n false,\n )\n }\n\n pub fn enqueue_view(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n execution_cache::store(self.args);\n context.call_public_function_with_args_hash(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n true,\n )\n }\n\n pub fn set_as_teardown(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n execution_cache::store(self.args);\n context.set_public_teardown_function_with_args_hash(\n self.target_contract,\n self.selector,\n args_hash,\n false,\n )\n }\n}\n\nimpl<let N: u32> CallInterface<N> for PublicVoidCallInterface<N> {\n fn get_args(self) -> [Field] {\n self.args\n }\n\n fn get_selector(self) -> FunctionSelector {\n self.selector\n }\n\n fn get_name(self) -> str<N> {\n self.name\n }\n\n fn get_contract_address(self) -> AztecAddress {\n self.target_contract\n }\n\n fn get_is_static(self) -> bool {\n self.is_static\n }\n}\n\n// PublicStaticCallInterface\n\npub struct PublicStaticCallInterface<let N: u32, T> {\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<N>,\n args: [Field],\n return_type: T,\n is_static: bool,\n gas_opts: GasOpts,\n}\n\nimpl<let N: u32, T> PublicStaticCallInterface<N, T> {\n pub fn new(\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<N>,\n args: [Field],\n ) -> Self {\n Self {\n target_contract,\n selector,\n name,\n args,\n return_type: std::mem::zeroed(),\n is_static: true,\n gas_opts: GasOpts::default(),\n }\n }\n\n pub fn with_gas(self: &mut Self, gas_opts: GasOpts) -> &mut Self {\n self.gas_opts = gas_opts;\n self\n }\n\n pub unconstrained fn view<let M: u32>(self, context: &mut PublicContext) -> T\n where\n T: Deserialize<M>,\n {\n let returns = context.static_call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n Deserialize::deserialize(returns.as_array::<M>())\n }\n\n pub fn enqueue_view(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n execution_cache::store(self.args);\n context.call_public_function_with_args_hash(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n true,\n )\n }\n}\n\nimpl<let N: u32, T> CallInterface<N> for PublicStaticCallInterface<N, T> {\n fn get_args(self) -> [Field] {\n self.args\n }\n\n fn get_selector(self) -> FunctionSelector {\n self.selector\n }\n\n fn get_name(self) -> str<N> {\n self.name\n }\n\n fn get_contract_address(self) -> AztecAddress {\n self.target_contract\n }\n\n fn get_is_static(self) -> bool {\n self.is_static\n }\n}\n\n// PublicStaticVoidCallInterface\n\npub struct PublicStaticVoidCallInterface<let N: u32> {\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<N>,\n args: [Field],\n return_type: (), // Unit type () indicates this interface is for functions that return nothing (void)\n is_static: bool,\n gas_opts: GasOpts,\n}\n\nimpl<let N: u32> PublicStaticVoidCallInterface<N> {\n pub fn new(\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<N>,\n args: [Field],\n ) -> Self {\n Self {\n target_contract,\n selector,\n name,\n args,\n return_type: (),\n is_static: true,\n gas_opts: GasOpts::default(),\n }\n }\n\n pub fn with_gas(self: &mut Self, gas_opts: GasOpts) -> &mut Self {\n self.gas_opts = gas_opts;\n self\n }\n\n pub unconstrained fn view(self, context: &mut PublicContext) {\n let returns = context.static_call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n assert(returns.len() == 0);\n }\n\n pub fn enqueue_view(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n execution_cache::store(self.args);\n context.call_public_function_with_args_hash(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n true,\n )\n }\n}\n\nimpl<let N: u32> CallInterface<N> for PublicStaticVoidCallInterface<N> {\n fn get_args(self) -> [Field] {\n self.args\n }\n\n fn get_selector(self) -> FunctionSelector {\n self.selector\n }\n\n fn get_name(self) -> str<N> {\n self.name\n }\n\n fn get_contract_address(self) -> AztecAddress {\n self.target_contract\n }\n\n fn get_is_static(self) -> bool {\n self.is_static\n }\n}\n"
|
|
2703
2801
|
},
|
|
2704
2802
|
"72": {
|
|
2705
|
-
"path": "/
|
|
2803
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/context/private_context.nr",
|
|
2706
2804
|
"source": "use dep::protocol_types::debug_log::debug_log_format;\n\nuse crate::{\n context::{inputs::PrivateContextInputs, returns_hash::ReturnsHash},\n hash::{ArgsHasher, hash_args_array},\n keys::constants::{NULLIFIER_INDEX, NUM_KEY_TYPES, OUTGOING_INDEX, sk_generators},\n messaging::process_l1_to_l2_message,\n oracle::{\n block_header::get_block_header_at,\n call_private_function::call_private_function_internal,\n enqueue_public_function_call::{\n enqueue_public_function_call_internal, notify_set_min_revertible_side_effect_counter,\n set_public_teardown_function_call_internal,\n },\n execution_cache,\n key_validation_request::get_key_validation_request,\n notes::{notify_created_nullifier, notify_nullified_note},\n },\n};\nuse dep::protocol_types::{\n abis::{\n call_context::CallContext,\n function_selector::FunctionSelector,\n gas_settings::GasSettings,\n log::Log,\n log_hash::LogHash,\n max_block_number::MaxBlockNumber,\n note_hash::NoteHash,\n nullifier::Nullifier,\n private_call_request::PrivateCallRequest,\n private_circuit_public_inputs::PrivateCircuitPublicInputs,\n private_log::PrivateLogData,\n public_call_request::PublicCallRequest,\n read_request::ReadRequest,\n side_effect::Counted,\n validation_requests::{KeyValidationRequest, KeyValidationRequestAndGenerator},\n },\n address::{AztecAddress, EthAddress},\n block_header::BlockHeader,\n constants::{\n MAX_CONTRACT_CLASS_LOGS_PER_CALL, MAX_ENQUEUED_CALLS_PER_CALL,\n MAX_KEY_VALIDATION_REQUESTS_PER_CALL, MAX_L2_TO_L1_MSGS_PER_CALL,\n MAX_NOTE_HASH_READ_REQUESTS_PER_CALL, MAX_NOTE_HASHES_PER_CALL,\n MAX_NULLIFIER_READ_REQUESTS_PER_CALL, MAX_NULLIFIERS_PER_CALL,\n MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL, MAX_PRIVATE_LOGS_PER_CALL,\n PRIVATE_LOG_SIZE_IN_FIELDS, PUBLIC_DISPATCH_SELECTOR,\n },\n messaging::l2_to_l1_message::L2ToL1Message,\n traits::{Empty, FromField, Hash, ToField},\n};\n\n// When finished, one can call .finish() to convert back to the abi\npub struct PrivateContext {\n // docs:start:private-context\n pub inputs: PrivateContextInputs,\n pub side_effect_counter: u32,\n\n pub min_revertible_side_effect_counter: u32,\n pub is_fee_payer: bool,\n\n pub args_hash: Field,\n pub return_hash: Field,\n\n pub max_block_number: MaxBlockNumber,\n\n pub note_hash_read_requests: BoundedVec<ReadRequest, MAX_NOTE_HASH_READ_REQUESTS_PER_CALL>,\n pub nullifier_read_requests: BoundedVec<ReadRequest, MAX_NULLIFIER_READ_REQUESTS_PER_CALL>,\n key_validation_requests_and_generators: BoundedVec<KeyValidationRequestAndGenerator, MAX_KEY_VALIDATION_REQUESTS_PER_CALL>,\n\n pub note_hashes: BoundedVec<NoteHash, MAX_NOTE_HASHES_PER_CALL>,\n pub nullifiers: BoundedVec<Nullifier, MAX_NULLIFIERS_PER_CALL>,\n\n pub private_call_requests: BoundedVec<PrivateCallRequest, MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL>,\n pub public_call_requests: BoundedVec<Counted<PublicCallRequest>, MAX_ENQUEUED_CALLS_PER_CALL>,\n pub public_teardown_call_request: PublicCallRequest,\n pub l2_to_l1_msgs: BoundedVec<L2ToL1Message, MAX_L2_TO_L1_MSGS_PER_CALL>,\n // docs:end:private-context\n\n // Header of a block whose state is used during private execution (not the block the transaction is included in).\n pub historical_header: BlockHeader,\n\n pub private_logs: BoundedVec<PrivateLogData, MAX_PRIVATE_LOGS_PER_CALL>,\n pub contract_class_logs_hashes: BoundedVec<LogHash, MAX_CONTRACT_CLASS_LOGS_PER_CALL>,\n\n // Contains the last key validation request for each key type. This is used to cache the last request and avoid\n // fetching the same request multiple times.\n // The index of the array corresponds to the key type (0 nullifier, 1 incoming, 2 outgoing, 3 tagging).\n pub last_key_validation_requests: [Option<KeyValidationRequest>; NUM_KEY_TYPES],\n}\n\nimpl PrivateContext {\n pub fn new(inputs: PrivateContextInputs, args_hash: Field) -> PrivateContext {\n PrivateContext {\n inputs,\n side_effect_counter: inputs.start_side_effect_counter + 1,\n min_revertible_side_effect_counter: 0,\n is_fee_payer: false,\n args_hash,\n return_hash: 0,\n max_block_number: MaxBlockNumber::empty(),\n note_hash_read_requests: BoundedVec::new(),\n nullifier_read_requests: BoundedVec::new(),\n key_validation_requests_and_generators: BoundedVec::new(),\n note_hashes: BoundedVec::new(),\n nullifiers: BoundedVec::new(),\n historical_header: inputs.historical_header,\n private_call_requests: BoundedVec::new(),\n public_call_requests: BoundedVec::new(),\n public_teardown_call_request: PublicCallRequest::empty(),\n l2_to_l1_msgs: BoundedVec::new(),\n private_logs: BoundedVec::new(),\n contract_class_logs_hashes: BoundedVec::new(),\n last_key_validation_requests: [Option::none(); NUM_KEY_TYPES],\n }\n }\n\n pub fn msg_sender(self) -> AztecAddress {\n self.inputs.call_context.msg_sender\n }\n\n pub fn this_address(self) -> AztecAddress {\n self.inputs.call_context.contract_address\n }\n\n pub fn chain_id(self) -> Field {\n self.inputs.tx_context.chain_id\n }\n\n pub fn version(self) -> Field {\n self.inputs.tx_context.version\n }\n\n pub fn gas_settings(self) -> GasSettings {\n self.inputs.tx_context.gas_settings\n }\n\n pub fn selector(self) -> FunctionSelector {\n self.inputs.call_context.function_selector\n }\n\n pub fn get_args_hash(self) -> Field {\n self.args_hash\n }\n\n pub fn push_note_hash(&mut self, note_hash: Field) {\n self.note_hashes.push(NoteHash { value: note_hash, counter: self.next_counter() });\n\n // WARNING(https://github.com/AztecProtocol/aztec-packages/issues/10558): if you delete this debug_log_format line, some tests fail.\n debug_log_format(\n \"Context.note_hashes, after pushing new note hash: {0}\",\n self.note_hashes.storage().map(|nh: NoteHash| nh.value),\n );\n }\n\n pub fn push_nullifier(&mut self, nullifier: Field) {\n notify_created_nullifier(nullifier);\n self.nullifiers.push(\n Nullifier { value: nullifier, note_hash: 0, counter: self.next_counter() },\n );\n }\n\n pub fn push_nullifier_for_note_hash(&mut self, nullifier: Field, nullified_note_hash: Field) {\n let nullifier_counter = self.next_counter();\n notify_nullified_note(nullifier, nullified_note_hash, nullifier_counter);\n self.nullifiers.push(\n Nullifier {\n value: nullifier,\n note_hash: nullified_note_hash,\n counter: nullifier_counter,\n },\n );\n }\n\n // Returns the header of a block whose state is used during private execution (not the block the transaction is\n // included in).\n pub fn get_block_header(self) -> BlockHeader {\n self.historical_header\n }\n\n // Returns the header of an arbitrary block whose block number is less than or equal to the block number\n // of historical header.\n pub fn get_block_header_at(self, block_number: u32) -> BlockHeader {\n get_block_header_at(block_number, self)\n }\n\n pub fn set_return_hash(&mut self, returns_hasher: ArgsHasher) {\n execution_cache::store(returns_hasher.fields);\n self.return_hash = returns_hasher.hash();\n }\n\n pub fn finish(self) -> PrivateCircuitPublicInputs {\n PrivateCircuitPublicInputs {\n call_context: self.inputs.call_context,\n args_hash: self.args_hash,\n returns_hash: self.return_hash,\n min_revertible_side_effect_counter: self.min_revertible_side_effect_counter,\n is_fee_payer: self.is_fee_payer,\n max_block_number: self.max_block_number,\n note_hash_read_requests: self.note_hash_read_requests.storage(),\n nullifier_read_requests: self.nullifier_read_requests.storage(),\n key_validation_requests_and_generators: self\n .key_validation_requests_and_generators\n .storage(),\n note_hashes: self.note_hashes.storage(),\n nullifiers: self.nullifiers.storage(),\n private_call_requests: self.private_call_requests.storage(),\n public_call_requests: self.public_call_requests.storage(),\n public_teardown_call_request: self.public_teardown_call_request,\n l2_to_l1_msgs: self.l2_to_l1_msgs.storage(),\n start_side_effect_counter: self.inputs.start_side_effect_counter,\n end_side_effect_counter: self.side_effect_counter,\n private_logs: self.private_logs.storage(),\n contract_class_logs_hashes: self.contract_class_logs_hashes.storage(),\n historical_header: self.historical_header,\n tx_context: self.inputs.tx_context,\n }\n }\n\n pub fn set_as_fee_payer(&mut self) {\n dep::protocol_types::debug_log::debug_log_format(\n \"Setting {0} as fee payer\",\n [self.this_address().to_field()],\n );\n self.is_fee_payer = true;\n }\n\n pub fn end_setup(&mut self) {\n // dep::protocol_types::debug_log::debug_log_format(\n // \"Ending setup at counter {0}\",\n // [self.side_effect_counter as Field]\n // );\n self.min_revertible_side_effect_counter = self.side_effect_counter;\n notify_set_min_revertible_side_effect_counter(self.min_revertible_side_effect_counter);\n }\n\n // docs:start:max-block-number\n pub fn set_tx_max_block_number(&mut self, max_block_number: u32) {\n // docs:end:max-block-number\n self.max_block_number =\n MaxBlockNumber::min_with_u32(self.max_block_number, max_block_number);\n }\n\n pub fn push_note_hash_read_request(&mut self, note_hash: Field) {\n let side_effect = ReadRequest { value: note_hash, counter: self.next_counter() };\n self.note_hash_read_requests.push(side_effect);\n }\n\n pub fn push_nullifier_read_request(&mut self, nullifier: Field) {\n let request = ReadRequest { value: nullifier, counter: self.next_counter() };\n self.nullifier_read_requests.push(request);\n }\n\n pub fn request_nsk_app(&mut self, npk_m_hash: Field) -> Field {\n self.request_sk_app(npk_m_hash, NULLIFIER_INDEX)\n }\n\n pub fn request_ovsk_app(&mut self, ovpk_m_hash: Field) -> Field {\n self.request_sk_app(ovpk_m_hash, OUTGOING_INDEX)\n }\n\n fn request_sk_app(&mut self, pk_m_hash: Field, key_index: Field) -> Field {\n let cached_request =\n self.last_key_validation_requests[key_index].unwrap_or(KeyValidationRequest::empty());\n\n if cached_request.pk_m.hash() == pk_m_hash {\n // We get a match so the cached request is the latest one\n cached_request.sk_app\n } else {\n // We didn't get a match meaning the cached result is stale\n // Typically we'd validate keys by showing that they are the preimage of `pk_m_hash`, but that'd require\n // the oracle returning the master secret keys, which could cause malicious contracts to leak it or learn\n // about secrets from other contracts. We therefore silo secret keys, and rely on the private kernel to\n // validate that we siloed secret key corresponds to correct siloing of the master secret key that hashes\n // to `pk_m_hash`.\n\n // Safety: Kernels verify that the key validation request is valid and below we verify that a request\n // for the correct public key has been received.\n let request = unsafe { get_key_validation_request(pk_m_hash, key_index) };\n assert_eq(request.pk_m.hash(), pk_m_hash, \"Obtained invalid key validation request\");\n\n self.key_validation_requests_and_generators.push(\n KeyValidationRequestAndGenerator {\n request,\n sk_app_generator: sk_generators[key_index],\n },\n );\n self.last_key_validation_requests[key_index] = Option::some(request);\n request.sk_app\n }\n }\n\n // docs:start:context_message_portal\n pub fn message_portal(&mut self, recipient: EthAddress, content: Field) {\n // docs:end:context_message_portal\n let message = L2ToL1Message { recipient, content, counter: self.next_counter() };\n self.l2_to_l1_msgs.push(message);\n }\n\n // docs:start:context_consume_l1_to_l2_message\n // docs:start:consume_l1_to_l2_message\n pub fn consume_l1_to_l2_message(\n &mut self,\n content: Field,\n secret: Field,\n sender: EthAddress,\n leaf_index: Field,\n ) {\n // docs:end:context_consume_l1_to_l2_message\n let nullifier = process_l1_to_l2_message(\n self.historical_header.state.l1_to_l2_message_tree.root,\n self.this_address(),\n sender,\n self.chain_id(),\n self.version(),\n content,\n secret,\n leaf_index,\n );\n\n // Push nullifier (and the \"commitment\" corresponding to this can be \"empty\")\n self.push_nullifier(nullifier)\n }\n // docs:end:consume_l1_to_l2_message\n\n pub fn emit_private_log(&mut self, log: [Field; PRIVATE_LOG_SIZE_IN_FIELDS]) {\n let counter = self.next_counter();\n let private_log = PrivateLogData { log: Log::new(log), note_hash_counter: 0, counter };\n self.private_logs.push(private_log);\n }\n\n pub fn emit_raw_note_log(\n &mut self,\n log: [Field; PRIVATE_LOG_SIZE_IN_FIELDS],\n note_hash_counter: u32,\n ) {\n let counter = self.next_counter();\n let private_log = PrivateLogData { log: Log::new(log), note_hash_counter, counter };\n self.private_logs.push(private_log);\n }\n\n pub fn call_private_function<let ARGS_COUNT: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) -> ReturnsHash {\n let args_hash = hash_args_array(args);\n execution_cache::store(args);\n self.call_private_function_with_args_hash(\n contract_address,\n function_selector,\n args_hash,\n false,\n )\n }\n\n pub fn static_call_private_function<let ARGS_COUNT: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) -> ReturnsHash {\n let args_hash = hash_args_array(args);\n execution_cache::store(args);\n self.call_private_function_with_args_hash(\n contract_address,\n function_selector,\n args_hash,\n true,\n )\n }\n\n pub fn call_private_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) -> ReturnsHash {\n self.call_private_function_with_args_hash(contract_address, function_selector, 0, false)\n }\n\n pub fn static_call_private_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) -> ReturnsHash {\n self.call_private_function_with_args_hash(contract_address, function_selector, 0, true)\n }\n\n pub fn call_private_function_with_args_hash(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n is_static_call: bool,\n ) -> ReturnsHash {\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n let start_side_effect_counter = self.side_effect_counter;\n\n // Safety: The oracle simulates the private call and returns the value of the side effects counter after\n // execution of the call (which means that end_side_effect_counter - start_side_effect_counter is\n // the number of side effects that took place), along with the hash of the return values. We validate these\n // by requesting a private kernel iteration in which the return values are constrained to hash\n // to `returns_hash` and the side effects counter to increment from start to end.\n let (end_side_effect_counter, returns_hash) = unsafe {\n call_private_function_internal(\n contract_address,\n function_selector,\n args_hash,\n start_side_effect_counter,\n is_static_call,\n )\n };\n\n self.private_call_requests.push(\n PrivateCallRequest {\n call_context: CallContext {\n msg_sender: self.this_address(),\n contract_address,\n function_selector,\n is_static_call,\n },\n args_hash,\n returns_hash,\n start_side_effect_counter,\n end_side_effect_counter,\n },\n );\n\n // TODO (fees) figure out why this crashes the prover and enable it\n // we need this in order to pay fees inside child call contexts\n // assert(\n // (item.public_inputs.min_revertible_side_effect_counter == 0 as u32)\n // | (item.public_inputs.min_revertible_side_effect_counter\n // > self.min_revertible_side_effect_counter)\n // );\n // if item.public_inputs.min_revertible_side_effect_counter\n // > self.min_revertible_side_effect_counter {\n // self.min_revertible_side_effect_counter = item.public_inputs.min_revertible_side_effect_counter;\n // }\n self.side_effect_counter = end_side_effect_counter + 1;\n ReturnsHash::new(returns_hash)\n }\n\n pub fn call_public_function<let ARGS_COUNT: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) {\n let args_hash = hash_args_array(args);\n execution_cache::store(args);\n self.call_public_function_with_args_hash(\n contract_address,\n function_selector,\n args_hash,\n false,\n )\n }\n\n pub fn static_call_public_function<let ARGS_COUNT: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) {\n let args_hash = hash_args_array(args);\n execution_cache::store(args);\n self.call_public_function_with_args_hash(\n contract_address,\n function_selector,\n args_hash,\n true,\n )\n }\n\n pub fn call_public_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) {\n self.call_public_function_with_args_hash(contract_address, function_selector, 0, false)\n }\n\n pub fn static_call_public_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) {\n self.call_public_function_with_args_hash(contract_address, function_selector, 0, true)\n }\n\n pub fn call_public_function_with_args_hash(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n is_static_call: bool,\n ) {\n let counter = self.next_counter();\n\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n // Safety: TODO(https://github.com/AztecProtocol/aztec-packages/issues/8985): Fix this.\n // WARNING: This is insecure and should be temporary!\n // The oracle hashes the arguments and returns a new args_hash.\n // new_args = [selector, ...old_args], so as to make it suitable to call the public dispatch function.\n // We don't validate or compute it in the circuit because a) it's harder to do with slices, and\n // b) this is only temporary.\n let args_hash = unsafe {\n enqueue_public_function_call_internal(\n contract_address,\n function_selector,\n args_hash,\n counter,\n is_static_call,\n )\n };\n\n // Public calls are rerouted through the dispatch function.\n let function_selector = comptime { FunctionSelector::from_field(PUBLIC_DISPATCH_SELECTOR) };\n\n let call_request = PublicCallRequest {\n msg_sender: self.this_address(),\n contract_address,\n function_selector,\n is_static_call,\n args_hash,\n };\n\n self.public_call_requests.push(Counted::new(call_request, counter));\n }\n\n pub fn set_public_teardown_function<let ARGS_COUNT: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) {\n let args_hash = hash_args_array(args);\n execution_cache::store(args);\n self.set_public_teardown_function_with_args_hash(\n contract_address,\n function_selector,\n args_hash,\n false,\n )\n }\n\n pub fn set_public_teardown_function_with_args_hash(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n is_static_call: bool,\n ) {\n let counter = self.next_counter();\n\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n // Safety: TODO(https://github.com/AztecProtocol/aztec-packages/issues/8985): Fix this.\n // WARNING: This is insecure and should be temporary!\n // The oracle hashes the arguments and returns a new args_hash.\n // new_args = [selector, ...old_args], so as to make it suitable to call the public dispatch function.\n // We don't validate or compute it in the circuit because a) it's harder to do with slices, and\n // b) this is only temporary.\n let args_hash = unsafe {\n set_public_teardown_function_call_internal(\n contract_address,\n function_selector,\n args_hash,\n counter,\n is_static_call,\n )\n };\n\n let function_selector = comptime { FunctionSelector::from_field(PUBLIC_DISPATCH_SELECTOR) };\n\n self.public_teardown_call_request = PublicCallRequest {\n msg_sender: self.this_address(),\n contract_address,\n function_selector,\n is_static_call,\n args_hash,\n };\n }\n\n fn next_counter(&mut self) -> u32 {\n let counter = self.side_effect_counter;\n self.side_effect_counter += 1;\n counter\n }\n}\n\nimpl Empty for PrivateContext {\n fn empty() -> Self {\n PrivateContext {\n inputs: PrivateContextInputs::empty(),\n side_effect_counter: 0 as u32,\n min_revertible_side_effect_counter: 0 as u32,\n is_fee_payer: false,\n args_hash: 0,\n return_hash: 0,\n max_block_number: MaxBlockNumber::empty(),\n note_hash_read_requests: BoundedVec::new(),\n nullifier_read_requests: BoundedVec::new(),\n key_validation_requests_and_generators: BoundedVec::new(),\n note_hashes: BoundedVec::new(),\n nullifiers: BoundedVec::new(),\n private_call_requests: BoundedVec::new(),\n public_call_requests: BoundedVec::new(),\n public_teardown_call_request: PublicCallRequest::empty(),\n l2_to_l1_msgs: BoundedVec::new(),\n historical_header: BlockHeader::empty(),\n private_logs: BoundedVec::new(),\n contract_class_logs_hashes: BoundedVec::new(),\n last_key_validation_requests: [Option::none(); NUM_KEY_TYPES],\n }\n }\n}\n"
|
|
2707
2805
|
},
|
|
2708
2806
|
"73": {
|
|
2709
|
-
"path": "/
|
|
2807
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/context/public_context.nr",
|
|
2710
2808
|
"source": "use crate::context::gas::GasOpts;\nuse crate::hash::{\n compute_l1_to_l2_message_hash, compute_l1_to_l2_message_nullifier, compute_secret_hash,\n};\nuse dep::protocol_types::abis::function_selector::FunctionSelector;\nuse dep::protocol_types::address::{AztecAddress, EthAddress};\nuse dep::protocol_types::constants::MAX_FIELD_VALUE;\nuse dep::protocol_types::traits::{Empty, FromField, Packable, Serialize, ToField};\n\npub struct PublicContext {\n pub args_hash: Option<Field>,\n pub compute_args_hash: fn() -> Field,\n}\n\nimpl PublicContext {\n pub fn new(compute_args_hash: fn() -> Field) -> Self {\n PublicContext { args_hash: Option::none(), compute_args_hash }\n }\n\n pub fn emit_public_log<T, let N: u32>(_self: &mut Self, log: T)\n where\n T: Serialize<N>,\n {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { emit_public_log(Serialize::serialize(log).as_slice()) };\n }\n\n pub fn note_hash_exists(_self: Self, note_hash: Field, leaf_index: Field) -> bool {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { note_hash_exists(note_hash, leaf_index) } == 1\n }\n\n pub fn l1_to_l2_msg_exists(_self: Self, msg_hash: Field, msg_leaf_index: Field) -> bool {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { l1_to_l2_msg_exists(msg_hash, msg_leaf_index) } == 1\n }\n\n pub fn nullifier_exists(_self: Self, unsiloed_nullifier: Field, address: AztecAddress) -> bool {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { nullifier_exists(unsiloed_nullifier, address.to_field()) } == 1\n }\n\n pub fn consume_l1_to_l2_message(\n &mut self,\n content: Field,\n secret: Field,\n sender: EthAddress,\n leaf_index: Field,\n ) {\n let secret_hash = compute_secret_hash(secret);\n let message_hash = compute_l1_to_l2_message_hash(\n sender,\n self.chain_id(),\n /*recipient=*/\n self.this_address(),\n self.version(),\n content,\n secret_hash,\n leaf_index,\n );\n let nullifier = compute_l1_to_l2_message_nullifier(message_hash, secret);\n\n assert(\n !self.nullifier_exists(nullifier, self.this_address()),\n \"L1-to-L2 message is already nullified\",\n );\n assert(\n self.l1_to_l2_msg_exists(message_hash, leaf_index),\n \"Tried to consume nonexistent L1-to-L2 message\",\n );\n\n self.push_nullifier(nullifier);\n }\n\n pub fn message_portal(_self: &mut Self, recipient: EthAddress, content: Field) {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { send_l2_to_l1_msg(recipient, content) };\n }\n\n pub unconstrained fn call_public_function(\n _self: &mut Self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field],\n gas_opts: GasOpts,\n ) -> [Field] {\n let args = args.push_front(function_selector.to_field());\n\n call(gas_for_call(gas_opts), contract_address, args);\n // Use success_copy to determine whether the call succeeded\n let success = success_copy();\n\n let result_data = returndata_copy(0, returndata_size());\n if !success {\n // Rethrow the revert data.\n avm_revert(result_data);\n }\n result_data\n }\n\n pub unconstrained fn static_call_public_function(\n _self: &mut Self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field],\n gas_opts: GasOpts,\n ) -> [Field] {\n let args = args.push_front(function_selector.to_field());\n\n call_static(gas_for_call(gas_opts), contract_address, args);\n // Use success_copy to determine whether the call succeeded\n let success = success_copy();\n\n let result_data = returndata_copy(0, returndata_size());\n if !success {\n // Rethrow the revert data.\n avm_revert(result_data);\n }\n result_data\n }\n\n pub fn push_note_hash(_self: &mut Self, note_hash: Field) {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { emit_note_hash(note_hash) };\n }\n pub fn push_nullifier(_self: &mut Self, nullifier: Field) {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { emit_nullifier(nullifier) };\n }\n\n pub fn this_address(_self: Self) -> AztecAddress {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n address()\n }\n }\n pub fn msg_sender(_self: Self) -> AztecAddress {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n sender()\n }\n }\n pub fn selector(_self: Self) -> FunctionSelector {\n // The selector is the first element of the calldata when calling a public function through dispatch.\n // Safety: AVM opcodes are constrained by the AVM itself\n let raw_selector: [Field; 1] = unsafe { calldata_copy(0, 1) };\n FunctionSelector::from_field(raw_selector[0])\n }\n pub fn get_args_hash(mut self) -> Field {\n if !self.args_hash.is_some() {\n self.args_hash = Option::some((self.compute_args_hash)());\n }\n\n self.args_hash.unwrap_unchecked()\n }\n pub fn transaction_fee(_self: Self) -> Field {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n transaction_fee()\n }\n }\n\n pub fn chain_id(_self: Self) -> Field {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n chain_id()\n }\n }\n pub fn version(_self: Self) -> Field {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n version()\n }\n }\n pub fn block_number(_self: Self) -> Field {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n block_number()\n }\n }\n pub fn timestamp(_self: Self) -> u64 {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n timestamp()\n }\n }\n pub fn fee_per_l2_gas(_self: Self) -> Field {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n fee_per_l2_gas()\n }\n }\n pub fn fee_per_da_gas(_self: Self) -> Field {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n fee_per_da_gas()\n }\n }\n\n pub fn l2_gas_left(_self: Self) -> Field {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n l2_gas_left()\n }\n }\n pub fn da_gas_left(_self: Self) -> Field {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n da_gas_left()\n }\n }\n pub fn is_static_call(_self: Self) -> bool {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { is_static_call() } == 1\n }\n\n pub fn raw_storage_read<let N: u32>(_self: Self, storage_slot: Field) -> [Field; N] {\n let mut out = [0; N];\n for i in 0..N {\n // Safety: AVM opcodes are constrained by the AVM itself\n out[i] = unsafe { storage_read(storage_slot + i as Field) };\n }\n out\n }\n\n pub fn storage_read<T, let N: u32>(self, storage_slot: Field) -> T\n where\n T: Packable<N>,\n {\n T::unpack(self.raw_storage_read(storage_slot))\n }\n\n pub fn raw_storage_write<let N: u32>(_self: Self, storage_slot: Field, values: [Field; N]) {\n for i in 0..N {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { storage_write(storage_slot + i as Field, values[i]) };\n }\n }\n\n pub fn storage_write<T, let N: u32>(self, storage_slot: Field, value: T)\n where\n T: Packable<N>,\n {\n self.raw_storage_write(storage_slot, value.pack());\n }\n}\n\n// Helper functions\nfn gas_for_call(user_gas: GasOpts) -> [Field; 2] {\n // It's ok to use the max possible gas here, because the gas will be\n // capped by the gas left in the (STATIC)CALL instruction.\n [user_gas.l2_gas.unwrap_or(MAX_FIELD_VALUE), user_gas.da_gas.unwrap_or(MAX_FIELD_VALUE)]\n}\n\n// Unconstrained opcode wrappers (do not use directly).\nunconstrained fn address() -> AztecAddress {\n address_opcode()\n}\nunconstrained fn sender() -> AztecAddress {\n sender_opcode()\n}\nunconstrained fn transaction_fee() -> Field {\n transaction_fee_opcode()\n}\nunconstrained fn chain_id() -> Field {\n chain_id_opcode()\n}\nunconstrained fn version() -> Field {\n version_opcode()\n}\nunconstrained fn block_number() -> Field {\n block_number_opcode()\n}\nunconstrained fn timestamp() -> u64 {\n timestamp_opcode()\n}\nunconstrained fn fee_per_l2_gas() -> Field {\n fee_per_l2_gas_opcode()\n}\nunconstrained fn fee_per_da_gas() -> Field {\n fee_per_da_gas_opcode()\n}\nunconstrained fn l2_gas_left() -> Field {\n l2_gas_left_opcode()\n}\nunconstrained fn da_gas_left() -> Field {\n da_gas_left_opcode()\n}\nunconstrained fn is_static_call() -> Field {\n is_static_call_opcode()\n}\nunconstrained fn note_hash_exists(note_hash: Field, leaf_index: Field) -> u1 {\n note_hash_exists_opcode(note_hash, leaf_index)\n}\nunconstrained fn emit_note_hash(note_hash: Field) {\n emit_note_hash_opcode(note_hash)\n}\nunconstrained fn nullifier_exists(nullifier: Field, address: Field) -> u1 {\n nullifier_exists_opcode(nullifier, address)\n}\nunconstrained fn emit_nullifier(nullifier: Field) {\n emit_nullifier_opcode(nullifier)\n}\nunconstrained fn emit_public_log(message: [Field]) {\n emit_public_log_opcode(message)\n}\nunconstrained fn l1_to_l2_msg_exists(msg_hash: Field, msg_leaf_index: Field) -> u1 {\n l1_to_l2_msg_exists_opcode(msg_hash, msg_leaf_index)\n}\nunconstrained fn send_l2_to_l1_msg(recipient: EthAddress, content: Field) {\n send_l2_to_l1_msg_opcode(recipient, content)\n}\nunconstrained fn call(gas: [Field; 2], address: AztecAddress, args: [Field]) {\n call_opcode(gas, address, args)\n}\n\nunconstrained fn call_static(gas: [Field; 2], address: AztecAddress, args: [Field]) {\n call_static_opcode(gas, address, args)\n}\n\npub unconstrained fn calldata_copy<let N: u32>(cdoffset: u32, copy_size: u32) -> [Field; N] {\n calldata_copy_opcode(cdoffset, copy_size)\n}\n\n// `success_copy` is placed immediately after the CALL opcode to get the success value\nunconstrained fn success_copy() -> bool {\n success_copy_opcode()\n}\n\nunconstrained fn returndata_size() -> u32 {\n returndata_size_opcode()\n}\n\nunconstrained fn returndata_copy(rdoffset: u32, copy_size: u32) -> [Field] {\n returndata_copy_opcode(rdoffset, copy_size)\n}\n\npub unconstrained fn avm_return(returndata: [Field]) {\n return_opcode(returndata)\n}\n\n// This opcode reverts using the exact data given. In general it should only be used\n// to do rethrows, where the revert data is the same as the original revert data.\n// For normal reverts, use Noir's `assert` which, on top of reverting, will also add\n// an error selector to the revert data.\nunconstrained fn avm_revert(revertdata: [Field]) {\n revert_opcode(revertdata)\n}\n\nunconstrained fn storage_read(storage_slot: Field) -> Field {\n storage_read_opcode(storage_slot)\n}\n\nunconstrained fn storage_write(storage_slot: Field, value: Field) {\n storage_write_opcode(storage_slot, value);\n}\n\nimpl Empty for PublicContext {\n fn empty() -> Self {\n PublicContext::new(|| 0)\n }\n}\n\n// AVM oracles (opcodes) follow, do not use directly.\n#[oracle(avmOpcodeAddress)]\nunconstrained fn address_opcode() -> AztecAddress {}\n\n#[oracle(avmOpcodeSender)]\nunconstrained fn sender_opcode() -> AztecAddress {}\n\n#[oracle(avmOpcodeTransactionFee)]\nunconstrained fn transaction_fee_opcode() -> Field {}\n\n#[oracle(avmOpcodeChainId)]\nunconstrained fn chain_id_opcode() -> Field {}\n\n#[oracle(avmOpcodeVersion)]\nunconstrained fn version_opcode() -> Field {}\n\n#[oracle(avmOpcodeBlockNumber)]\nunconstrained fn block_number_opcode() -> Field {}\n\n#[oracle(avmOpcodeTimestamp)]\nunconstrained fn timestamp_opcode() -> u64 {}\n\n#[oracle(avmOpcodeFeePerL2Gas)]\nunconstrained fn fee_per_l2_gas_opcode() -> Field {}\n\n#[oracle(avmOpcodeFeePerDaGas)]\nunconstrained fn fee_per_da_gas_opcode() -> Field {}\n\n#[oracle(avmOpcodeL2GasLeft)]\nunconstrained fn l2_gas_left_opcode() -> Field {}\n\n#[oracle(avmOpcodeDaGasLeft)]\nunconstrained fn da_gas_left_opcode() -> Field {}\n\n#[oracle(avmOpcodeIsStaticCall)]\nunconstrained fn is_static_call_opcode() -> Field {}\n\n#[oracle(avmOpcodeNoteHashExists)]\nunconstrained fn note_hash_exists_opcode(note_hash: Field, leaf_index: Field) -> u1 {}\n\n#[oracle(avmOpcodeEmitNoteHash)]\nunconstrained fn emit_note_hash_opcode(note_hash: Field) {}\n\n#[oracle(avmOpcodeNullifierExists)]\nunconstrained fn nullifier_exists_opcode(nullifier: Field, address: Field) -> u1 {}\n\n#[oracle(avmOpcodeEmitNullifier)]\nunconstrained fn emit_nullifier_opcode(nullifier: Field) {}\n\n// TODO(#11124): rename unencrypted to public in avm\n#[oracle(avmOpcodeEmitUnencryptedLog)]\nunconstrained fn emit_public_log_opcode(message: [Field]) {}\n\n#[oracle(avmOpcodeL1ToL2MsgExists)]\nunconstrained fn l1_to_l2_msg_exists_opcode(msg_hash: Field, msg_leaf_index: Field) -> u1 {}\n\n#[oracle(avmOpcodeSendL2ToL1Msg)]\nunconstrained fn send_l2_to_l1_msg_opcode(recipient: EthAddress, content: Field) {}\n\n#[oracle(avmOpcodeCalldataCopy)]\nunconstrained fn calldata_copy_opcode<let N: u32>(cdoffset: u32, copy_size: u32) -> [Field; N] {}\n\n#[oracle(avmOpcodeReturndataSize)]\nunconstrained fn returndata_size_opcode() -> u32 {}\n\n#[oracle(avmOpcodeReturndataCopy)]\nunconstrained fn returndata_copy_opcode(rdoffset: u32, copy_size: u32) -> [Field] {}\n\n#[oracle(avmOpcodeReturn)]\nunconstrained fn return_opcode(returndata: [Field]) {}\n\n// This opcode reverts using the exact data given. In general it should only be used\n// to do rethrows, where the revert data is the same as the original revert data.\n// For normal reverts, use Noir's `assert` which, on top of reverting, will also add\n// an error selector to the revert data.\n#[oracle(avmOpcodeRevert)]\nunconstrained fn revert_opcode(revertdata: [Field]) {}\n\n#[oracle(avmOpcodeCall)]\nunconstrained fn call_opcode(\n gas: [Field; 2], // gas allocation: [l2_gas, da_gas]\n address: AztecAddress,\n args: [Field],\n) {}\n\n#[oracle(avmOpcodeStaticCall)]\nunconstrained fn call_static_opcode(\n gas: [Field; 2], // gas allocation: [l2_gas, da_gas]\n address: AztecAddress,\n args: [Field],\n) {}\n\n#[oracle(avmOpcodeSuccessCopy)]\nunconstrained fn success_copy_opcode() -> bool {}\n\n#[oracle(avmOpcodeStorageRead)]\nunconstrained fn storage_read_opcode(storage_slot: Field) -> Field {}\n\n#[oracle(avmOpcodeStorageWrite)]\nunconstrained fn storage_write_opcode(storage_slot: Field, value: Field) {}\n"
|
|
2711
2809
|
},
|
|
2712
2810
|
"74": {
|
|
2713
|
-
"path": "/
|
|
2811
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/context/returns_hash.nr",
|
|
2714
2812
|
"source": "use crate::{hash::hash_args_array, oracle::execution_cache};\nuse dep::protocol_types::traits::Deserialize;\n\npub struct ReturnsHash {\n hash: Field,\n}\n\nimpl ReturnsHash {\n pub fn new(hash: Field) -> Self {\n ReturnsHash { hash }\n }\n\n pub fn assert_empty(self) {\n assert_eq(self.hash, 0);\n }\n\n pub fn raw(self) -> Field {\n self.hash\n }\n\n /// This is only used during private execution, since in public it is the VM itself that keeps track of return\n /// values.\n pub fn get_preimage<T, let N: u32>(self) -> T\n where\n T: Deserialize<N>,\n {\n // Safety: We verify that the value returned by `load` is the preimage of `hash`, fully constraining it.\n let preimage: [Field; N] = unsafe { execution_cache::load(self.hash) };\n assert_eq(self.hash, hash_args_array(preimage));\n\n Deserialize::deserialize(preimage)\n }\n}\n"
|
|
2715
2813
|
},
|
|
2716
2814
|
"75": {
|
|
2717
|
-
"path": "/
|
|
2815
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/context/unconstrained_context.nr",
|
|
2718
2816
|
"source": "use crate::oracle::{\n execution::{get_block_number, get_chain_id, get_contract_address, get_version},\n storage::storage_read,\n};\nuse dep::protocol_types::{address::AztecAddress, traits::Packable};\n\npub struct UnconstrainedContext {\n block_number: u32,\n contract_address: AztecAddress,\n version: Field,\n chain_id: Field,\n}\n\nimpl UnconstrainedContext {\n pub unconstrained fn new() -> Self {\n // We could call these oracles on the getters instead of at creation, which makes sense given that they might\n // not even be accessed. However any performance gains are minimal, and we'd rather fail early if a user\n // incorrectly attempts to create an UnconstrainedContext in an environment in which these oracles are not\n // available.\n let block_number = get_block_number();\n let contract_address = get_contract_address();\n let chain_id = get_chain_id();\n let version = get_version();\n Self { block_number, contract_address, version, chain_id }\n }\n\n pub unconstrained fn at(contract_address: AztecAddress) -> Self {\n let block_number = get_block_number();\n let chain_id = get_chain_id();\n let version = get_version();\n Self { block_number, contract_address, version, chain_id }\n }\n\n pub unconstrained fn at_historical(contract_address: AztecAddress, block_number: u32) -> Self {\n let chain_id = get_chain_id();\n let version = get_version();\n Self { block_number, contract_address, version, chain_id }\n }\n\n pub fn block_number(self) -> u32 {\n self.block_number\n }\n\n pub fn this_address(self) -> AztecAddress {\n self.contract_address\n }\n\n pub fn version(self) -> Field {\n self.version\n }\n\n pub fn chain_id(self) -> Field {\n self.chain_id\n }\n\n pub unconstrained fn raw_storage_read<let N: u32>(\n self: Self,\n storage_slot: Field,\n ) -> [Field; N] {\n storage_read(self.this_address(), storage_slot, self.block_number())\n }\n\n pub unconstrained fn storage_read<T, let N: u32>(self, storage_slot: Field) -> T\n where\n T: Packable<N>,\n {\n T::unpack(self.raw_storage_read(storage_slot))\n }\n}\n"
|
|
2719
2817
|
},
|
|
2720
|
-
"
|
|
2721
|
-
"path": "/
|
|
2818
|
+
"77": {
|
|
2819
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/discovery/mod.nr",
|
|
2820
|
+
"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"
|
|
2821
|
+
},
|
|
2822
|
+
"78": {
|
|
2823
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/discovery/nonce_discovery.nr",
|
|
2824
|
+
"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"
|
|
2825
|
+
},
|
|
2826
|
+
"79": {
|
|
2827
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/discovery/partial_notes.nr",
|
|
2828
|
+
"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"
|
|
2829
|
+
},
|
|
2830
|
+
"80": {
|
|
2831
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/discovery/private_logs.nr",
|
|
2832
|
+
"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"
|
|
2833
|
+
},
|
|
2834
|
+
"95": {
|
|
2835
|
+
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/hash.nr",
|
|
2722
2836
|
"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"
|
|
2723
2837
|
}
|
|
2724
2838
|
}
|