@aztec/protocol-contracts 0.0.1-commit.a072138 → 0.0.1-commit.a4600f49
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/ContractClassRegistry.json +2608 -4410
- package/artifacts/ContractInstanceRegistry.json +3511 -936
- package/artifacts/FeeJuice.json +3868 -941
- package/dest/class-registry/contract_class_published_event.d.ts +6 -3
- package/dest/class-registry/contract_class_published_event.d.ts.map +1 -1
- package/dest/class-registry/contract_class_published_event.js +17 -17
- package/dest/class-registry/index.d.ts +1 -3
- package/dest/class-registry/index.d.ts.map +1 -1
- package/dest/class-registry/index.js +3 -5
- package/dest/class-registry/lazy.d.ts +1 -3
- package/dest/class-registry/lazy.d.ts.map +1 -1
- package/dest/class-registry/lazy.js +2 -4
- package/dest/fee-juice/index.d.ts +1 -1
- package/dest/fee-juice/index.d.ts.map +1 -1
- package/dest/fee-juice/index.js +3 -3
- package/dest/fee-juice/lazy.js +2 -2
- package/dest/instance-registry/contract_instance_published_event.d.ts +3 -2
- package/dest/instance-registry/contract_instance_published_event.d.ts.map +1 -1
- package/dest/instance-registry/contract_instance_published_event.js +7 -3
- package/dest/instance-registry/index.d.ts +1 -1
- package/dest/instance-registry/index.d.ts.map +1 -1
- package/dest/instance-registry/index.js +3 -3
- package/dest/instance-registry/lazy.js +2 -2
- package/dest/make_protocol_contract.d.ts +4 -4
- package/dest/make_protocol_contract.d.ts.map +1 -1
- package/dest/make_protocol_contract.js +30 -14
- package/dest/protocol_contract.d.ts +4 -1
- package/dest/protocol_contract.d.ts.map +1 -1
- package/dest/protocol_contract.js +5 -1
- package/dest/protocol_contract_data.d.ts +14 -5
- package/dest/protocol_contract_data.d.ts.map +1 -1
- package/dest/protocol_contract_data.js +73 -33
- package/dest/provider/bundle.d.ts +1 -1
- package/dest/provider/bundle.d.ts.map +1 -1
- package/dest/provider/bundle.js +2 -8
- package/dest/provider/lazy.d.ts +1 -1
- package/dest/provider/lazy.d.ts.map +1 -1
- package/dest/provider/lazy.js +0 -9
- package/dest/scripts/generate_data.js +75 -28
- package/dest/tests/fixtures.d.ts +1 -3
- package/dest/tests/fixtures.d.ts.map +1 -1
- package/dest/tests/fixtures.js +2 -12
- package/package.json +4 -4
- package/src/class-registry/contract_class_published_event.ts +16 -22
- package/src/class-registry/index.ts +3 -5
- package/src/class-registry/lazy.ts +2 -4
- package/src/fee-juice/index.ts +3 -3
- package/src/fee-juice/lazy.ts +2 -2
- package/src/instance-registry/contract_instance_published_event.ts +5 -1
- package/src/instance-registry/index.ts +3 -3
- package/src/instance-registry/lazy.ts +2 -2
- package/src/make_protocol_contract.ts +39 -15
- package/src/protocol_contract.ts +9 -1
- package/src/protocol_contract_data.ts +62 -35
- package/src/provider/bundle.ts +1 -7
- package/src/provider/lazy.ts +0 -9
- package/src/tests/fixtures.ts +2 -14
- package/artifacts/AuthRegistry.d.json.ts +0 -5
- package/artifacts/AuthRegistry.json +0 -2764
- package/artifacts/MultiCallEntrypoint.d.json.ts +0 -5
- package/artifacts/MultiCallEntrypoint.json +0 -2759
- package/artifacts/PublicChecks.d.json.ts +0 -5
- package/artifacts/PublicChecks.json +0 -970
- package/dest/auth-registry/index.d.ts +0 -6
- package/dest/auth-registry/index.d.ts.map +0 -1
- package/dest/auth-registry/index.js +0 -13
- package/dest/auth-registry/lazy.d.ts +0 -6
- package/dest/auth-registry/lazy.d.ts.map +0 -1
- package/dest/auth-registry/lazy.js +0 -23
- package/dest/class-registry/private_function_broadcasted_event.d.ts +0 -44
- package/dest/class-registry/private_function_broadcasted_event.d.ts.map +0 -1
- package/dest/class-registry/private_function_broadcasted_event.js +0 -85
- package/dest/class-registry/utility_function_broadcasted_event.d.ts +0 -38
- package/dest/class-registry/utility_function_broadcasted_event.d.ts.map +0 -1
- package/dest/class-registry/utility_function_broadcasted_event.js +0 -81
- package/dest/multi-call-entrypoint/index.d.ts +0 -5
- package/dest/multi-call-entrypoint/index.d.ts.map +0 -1
- package/dest/multi-call-entrypoint/index.js +0 -13
- package/dest/multi-call-entrypoint/lazy.d.ts +0 -6
- package/dest/multi-call-entrypoint/lazy.d.ts.map +0 -1
- package/dest/multi-call-entrypoint/lazy.js +0 -23
- package/dest/public-checks/index.d.ts +0 -5
- package/dest/public-checks/index.d.ts.map +0 -1
- package/dest/public-checks/index.js +0 -13
- package/dest/public-checks/lazy.d.ts +0 -6
- package/dest/public-checks/lazy.d.ts.map +0 -1
- package/dest/public-checks/lazy.js +0 -23
- package/src/auth-registry/index.ts +0 -18
- package/src/auth-registry/lazy.ts +0 -29
- package/src/class-registry/private_function_broadcasted_event.ts +0 -109
- package/src/class-registry/utility_function_broadcasted_event.ts +0 -103
- package/src/multi-call-entrypoint/index.ts +0 -18
- package/src/multi-call-entrypoint/lazy.ts +0 -29
- package/src/public-checks/index.ts +0 -18
- package/src/public-checks/lazy.ts +0 -29
|
@@ -1,2764 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"transpiled": true,
|
|
3
|
-
"noir_version": "1.0.0-beta.18+13ce5c89c1edbfbf5e92c4cbf2258ea6e63f46b5",
|
|
4
|
-
"name": "AuthRegistry",
|
|
5
|
-
"functions": [
|
|
6
|
-
{
|
|
7
|
-
"name": "_set_authorized",
|
|
8
|
-
"is_unconstrained": true,
|
|
9
|
-
"custom_attributes": [
|
|
10
|
-
"abi_public",
|
|
11
|
-
"abi_only_self"
|
|
12
|
-
],
|
|
13
|
-
"abi": {
|
|
14
|
-
"parameters": [
|
|
15
|
-
{
|
|
16
|
-
"name": "approver",
|
|
17
|
-
"type": {
|
|
18
|
-
"kind": "struct",
|
|
19
|
-
"path": "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
|
-
"361444214588792908": {
|
|
49
|
-
"error_kind": "string",
|
|
50
|
-
"string": "attempt to multiply with overflow"
|
|
51
|
-
},
|
|
52
|
-
"1998584279744703196": {
|
|
53
|
-
"error_kind": "string",
|
|
54
|
-
"string": "attempt to subtract with overflow"
|
|
55
|
-
},
|
|
56
|
-
"13455385521185560676": {
|
|
57
|
-
"error_kind": "string",
|
|
58
|
-
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
59
|
-
},
|
|
60
|
-
"13929691561421487185": {
|
|
61
|
-
"error_kind": "string",
|
|
62
|
-
"string": "Function _set_authorized can only be called by the same contract"
|
|
63
|
-
},
|
|
64
|
-
"14990209321349310352": {
|
|
65
|
-
"error_kind": "string",
|
|
66
|
-
"string": "attempt to add with overflow"
|
|
67
|
-
},
|
|
68
|
-
"15764276373176857197": {
|
|
69
|
-
"error_kind": "string",
|
|
70
|
-
"string": "Stack too deep"
|
|
71
|
-
},
|
|
72
|
-
"16431471497789672479": {
|
|
73
|
-
"error_kind": "string",
|
|
74
|
-
"string": "Index out of bounds"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
"bytecode": "JwACBAEoAAABBIBIJwAABEglAAAATicCBAQDJwIFBAAfCgAEAAUARRwAR0cBLQhFAS0IRgItCEcDJQAAAFknAgEESCcCAgQAOw4AAgABJwBDBAMnAEQAACYlAAABcR4CAAQBHgIABQAKKgQFBiQCAAYAAAB6JQAAAZcnAg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WGIYsSuiJFMAxixK6RYljFjkvFjAYBXaLSjdHMWrRG1x+pww1OGCGblHGJhWxzwjWwShKrwVSuDmRMQvZPH0zSrKZDFosm2oYmtTEKXYLXC9n2djaM/W9JNNVh0f+fBSMPQquY4nwctvGYw0e+yYA1zdt/7R2cl4sxi72GHtryYOIwURwsbg9kUGLuKzgMdcxi1K7BfKgRd8EYg03JzJq0Z8cQOSxrQiWSYVIgxZhseBbExm1WH6iAVBa/60axpac7/Jpf3+8fPjD6l29Lsf9z9PBPj6+nu+vvn35/9m/8T+8ni9P94eH18tBnZZ/veTlG8hdljxw+67PQeVjxR1F/RD1O3nEKVvT93cN5Q8="
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"name": "consume",
|
|
83
|
-
"is_unconstrained": true,
|
|
84
|
-
"custom_attributes": [
|
|
85
|
-
"abi_public"
|
|
86
|
-
],
|
|
87
|
-
"abi": {
|
|
88
|
-
"parameters": [
|
|
89
|
-
{
|
|
90
|
-
"name": "on_behalf_of",
|
|
91
|
-
"type": {
|
|
92
|
-
"kind": "struct",
|
|
93
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
94
|
-
"fields": [
|
|
95
|
-
{
|
|
96
|
-
"name": "inner",
|
|
97
|
-
"type": {
|
|
98
|
-
"kind": "field"
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
]
|
|
102
|
-
},
|
|
103
|
-
"visibility": "private"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"name": "inner_hash",
|
|
107
|
-
"type": {
|
|
108
|
-
"kind": "field"
|
|
109
|
-
},
|
|
110
|
-
"visibility": "private"
|
|
111
|
-
}
|
|
112
|
-
],
|
|
113
|
-
"return_type": {
|
|
114
|
-
"abi_type": {
|
|
115
|
-
"kind": "field"
|
|
116
|
-
},
|
|
117
|
-
"visibility": "public"
|
|
118
|
-
},
|
|
119
|
-
"error_types": {
|
|
120
|
-
"361444214588792908": {
|
|
121
|
-
"error_kind": "string",
|
|
122
|
-
"string": "attempt to multiply with overflow"
|
|
123
|
-
},
|
|
124
|
-
"1998584279744703196": {
|
|
125
|
-
"error_kind": "string",
|
|
126
|
-
"string": "attempt to subtract with overflow"
|
|
127
|
-
},
|
|
128
|
-
"5525725861591553972": {
|
|
129
|
-
"error_kind": "string",
|
|
130
|
-
"string": "rejecting all"
|
|
131
|
-
},
|
|
132
|
-
"13455385521185560676": {
|
|
133
|
-
"error_kind": "string",
|
|
134
|
-
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
135
|
-
},
|
|
136
|
-
"14990209321349310352": {
|
|
137
|
-
"error_kind": "string",
|
|
138
|
-
"string": "attempt to add with overflow"
|
|
139
|
-
},
|
|
140
|
-
"15764276373176857197": {
|
|
141
|
-
"error_kind": "string",
|
|
142
|
-
"string": "Stack too deep"
|
|
143
|
-
},
|
|
144
|
-
"16431471497789672479": {
|
|
145
|
-
"error_kind": "string",
|
|
146
|
-
"string": "Index out of bounds"
|
|
147
|
-
},
|
|
148
|
-
"17089945683942782951": {
|
|
149
|
-
"error_kind": "string",
|
|
150
|
-
"string": "unauthorized"
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
"bytecode": "JwACBAEoAAABBIBOJwAABE4lAAAASScCAwQCJwIEBAAfCgADAAQASy0ISwEtCEwCJQAAAJYtAgFNJwICBE0nAgMEATsOAAMAAikAAEMAR9rNcywAAEQAMGROcuExoCm4UEW2gYFYXSgz6Eh5uXCRQ+H1k/AAAAAnAEUEAycARgQAJwBHAAAnAEgBAScASQQBJwBKBAImJQAABPcnAgQAASkCAAUAQez6Sy0IAQYnAgcEBAAIAQcBJwMGBAEAIgYCBy0KBwgtDgUIACIIAggtDgQIACIIAggtDgEIJwIHBAgtCAAILQoGCS0IRQoACAAHACUAAAUdLQIAAC0KCQQKIgRHBicCBwEACioGBwgkAgAIAAABGiUAAAiCHgIABgAvKgAEAAYACBwKCAYBHAoGBAAcCgQGAQoqBgcEJA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dZRhlDb+zMbvV9Fr9PrkecbemVvGwR64X5IovvaSi/fj0lgNImWjkjwu3FdFsNFQ/Y9EiXoWKSSjnlRsktAOCRRgwVSExyTqMFbK/GYxL7uTDjfnNnrxVEJK/AE8VCB7+3ubEqAZQTwoBf7+kN7AzkmQUuX7ftaKwcldjWYwvn+UkznG0ybbnTw/hIei+R0iypF7ytf7jLeNXn24hLH7nb5H6LaZQ8HA9nVqN8byEGJ6FN4LHhMoqJJQD8oseuFw95Ajkrse90QNt96gL/1aAcldr042RnIUYmdr03k/60dmXM+0ae7rw/Pb/4s65W1nh/uvjzez4/fX56+Xnz7698/9Rv9s66fzz++3n97eb5nJf/bLvrnI29PqE346faG/5LhI62vt7RA8sfI31I/vkD89MrO/Ac="
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"name": "is_consumable",
|
|
159
|
-
"is_unconstrained": true,
|
|
160
|
-
"custom_attributes": [
|
|
161
|
-
"abi_public",
|
|
162
|
-
"abi_view"
|
|
163
|
-
],
|
|
164
|
-
"abi": {
|
|
165
|
-
"parameters": [
|
|
166
|
-
{
|
|
167
|
-
"name": "on_behalf_of",
|
|
168
|
-
"type": {
|
|
169
|
-
"kind": "struct",
|
|
170
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
171
|
-
"fields": [
|
|
172
|
-
{
|
|
173
|
-
"name": "inner",
|
|
174
|
-
"type": {
|
|
175
|
-
"kind": "field"
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
]
|
|
179
|
-
},
|
|
180
|
-
"visibility": "private"
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"name": "message_hash",
|
|
184
|
-
"type": {
|
|
185
|
-
"kind": "field"
|
|
186
|
-
},
|
|
187
|
-
"visibility": "private"
|
|
188
|
-
}
|
|
189
|
-
],
|
|
190
|
-
"return_type": {
|
|
191
|
-
"abi_type": {
|
|
192
|
-
"kind": "boolean"
|
|
193
|
-
},
|
|
194
|
-
"visibility": "public"
|
|
195
|
-
},
|
|
196
|
-
"error_types": {
|
|
197
|
-
"361444214588792908": {
|
|
198
|
-
"error_kind": "string",
|
|
199
|
-
"string": "attempt to multiply with overflow"
|
|
200
|
-
},
|
|
201
|
-
"1998584279744703196": {
|
|
202
|
-
"error_kind": "string",
|
|
203
|
-
"string": "attempt to subtract with overflow"
|
|
204
|
-
},
|
|
205
|
-
"13455385521185560676": {
|
|
206
|
-
"error_kind": "string",
|
|
207
|
-
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
208
|
-
},
|
|
209
|
-
"14990209321349310352": {
|
|
210
|
-
"error_kind": "string",
|
|
211
|
-
"string": "attempt to add with overflow"
|
|
212
|
-
},
|
|
213
|
-
"15764276373176857197": {
|
|
214
|
-
"error_kind": "string",
|
|
215
|
-
"string": "Stack too deep"
|
|
216
|
-
},
|
|
217
|
-
"16431471497789672479": {
|
|
218
|
-
"error_kind": "string",
|
|
219
|
-
"string": "Index out of bounds"
|
|
220
|
-
},
|
|
221
|
-
"17312933876399746100": {
|
|
222
|
-
"error_kind": "string",
|
|
223
|
-
"string": "Function is_consumable can only be called statically"
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
},
|
|
227
|
-
"bytecode": "JwACBAEoAAABBIBJJwAABEklAAAASScCAwQCJwIEBAAfCgADAAQARi0IRgEtCEcCJQAAAFktAgFIJwICBEgnAgMEATsOAAMAAicAQwQDJwBEAAAnAEUBASYlAAABfB4CAAMJJAIAAwAAAHAlAAABoicCAwACKQIABABB7PpLLQgBBScCBgQEAAgBBgEnAwUEAQAiBQIGLQoGBy0OBAcAIgcCBy0OAwcAIgcCBy0OAQcnAgMEBi0IAAYtCgUHLQhDCAAIAAMAJQAAAbQtAgAALQoHAQoiAUQDJwIFAQAKKgMFBiQCAAYAAADvJQAABSgtCAEDJwIGBAQACAEGAScDAwQBACIDAgYtCgYHLQ4EBwAiBwIHLQ4BBwAiBwIHLQ4CBycCAgQGLQgABi0KAwctCEMIAAgAAgA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Bnd3UgsxL9wAee5rYiGIPKcpMSbkjQtYHMSoyfmgAlrEpkP7fk3PHV7vFw/vL316donQ+7h+NeL5/fT48Xd9/+fbU79vfZ6/nlcf/0ft6L0vgPjT9+AS+8/CbvTl6r8iWfxUuQCy/3+I0pbwp3n+LKfw=="
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
"name": "is_reject_all",
|
|
232
|
-
"is_unconstrained": true,
|
|
233
|
-
"custom_attributes": [
|
|
234
|
-
"abi_public",
|
|
235
|
-
"abi_view"
|
|
236
|
-
],
|
|
237
|
-
"abi": {
|
|
238
|
-
"parameters": [
|
|
239
|
-
{
|
|
240
|
-
"name": "on_behalf_of",
|
|
241
|
-
"type": {
|
|
242
|
-
"kind": "struct",
|
|
243
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
244
|
-
"fields": [
|
|
245
|
-
{
|
|
246
|
-
"name": "inner",
|
|
247
|
-
"type": {
|
|
248
|
-
"kind": "field"
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
]
|
|
252
|
-
},
|
|
253
|
-
"visibility": "private"
|
|
254
|
-
}
|
|
255
|
-
],
|
|
256
|
-
"return_type": {
|
|
257
|
-
"abi_type": {
|
|
258
|
-
"kind": "boolean"
|
|
259
|
-
},
|
|
260
|
-
"visibility": "public"
|
|
261
|
-
},
|
|
262
|
-
"error_types": {
|
|
263
|
-
"11691217184967371519": {
|
|
264
|
-
"error_kind": "string",
|
|
265
|
-
"string": "Function is_reject_all can only be called statically"
|
|
266
|
-
},
|
|
267
|
-
"13455385521185560676": {
|
|
268
|
-
"error_kind": "string",
|
|
269
|
-
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
270
|
-
},
|
|
271
|
-
"15764276373176857197": {
|
|
272
|
-
"error_kind": "string",
|
|
273
|
-
"string": "Stack too deep"
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
},
|
|
277
|
-
"bytecode": "JwACBAEoAAABBIBGJwAABEYl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ptobO5NdMXTBqgGkeAyRCpdPLIqq2GX9rQosYioHJzocoOTLh16tUIorOJSh/bFJFRto2puC2UqadRN0StTqLwYpraebIlVC0AHPe/DZXvqp80rzBxRU98ehy5dXh7jaTV7/3vjGX4Fuk3XU3d+TF0kLe9B8c/4y0Jj7T6+54QLJxuH+zk++h8="
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
"name": "public_dispatch",
|
|
282
|
-
"is_unconstrained": true,
|
|
283
|
-
"custom_attributes": [
|
|
284
|
-
"abi_public"
|
|
285
|
-
],
|
|
286
|
-
"abi": {
|
|
287
|
-
"parameters": [
|
|
288
|
-
{
|
|
289
|
-
"name": "selector",
|
|
290
|
-
"type": {
|
|
291
|
-
"kind": "field"
|
|
292
|
-
},
|
|
293
|
-
"visibility": "private"
|
|
294
|
-
}
|
|
295
|
-
],
|
|
296
|
-
"return_type": null,
|
|
297
|
-
"error_types": {
|
|
298
|
-
"361444214588792908": {
|
|
299
|
-
"error_kind": "string",
|
|
300
|
-
"string": "attempt to multiply with overflow"
|
|
301
|
-
},
|
|
302
|
-
"1998584279744703196": {
|
|
303
|
-
"error_kind": "string",
|
|
304
|
-
"string": "attempt to subtract with overflow"
|
|
305
|
-
},
|
|
306
|
-
"5525725861591553972": {
|
|
307
|
-
"error_kind": "string",
|
|
308
|
-
"string": "rejecting all"
|
|
309
|
-
},
|
|
310
|
-
"11691217184967371519": {
|
|
311
|
-
"error_kind": "string",
|
|
312
|
-
"string": "Function is_reject_all can only be called statically"
|
|
313
|
-
},
|
|
314
|
-
"12511970388699677811": {
|
|
315
|
-
"error_kind": "fmtstring",
|
|
316
|
-
"length": 27,
|
|
317
|
-
"item_types": [
|
|
318
|
-
{
|
|
319
|
-
"kind": "field"
|
|
320
|
-
}
|
|
321
|
-
]
|
|
322
|
-
},
|
|
323
|
-
"13455385521185560676": {
|
|
324
|
-
"error_kind": "string",
|
|
325
|
-
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
326
|
-
},
|
|
327
|
-
"13929691561421487185": {
|
|
328
|
-
"error_kind": "string",
|
|
329
|
-
"string": "Function _set_authorized can only be called by the same contract"
|
|
330
|
-
},
|
|
331
|
-
"14990209321349310352": {
|
|
332
|
-
"error_kind": "string",
|
|
333
|
-
"string": "attempt to add with overflow"
|
|
334
|
-
},
|
|
335
|
-
"15764276373176857197": {
|
|
336
|
-
"error_kind": "string",
|
|
337
|
-
"string": "Stack too deep"
|
|
338
|
-
},
|
|
339
|
-
"16431471497789672479": {
|
|
340
|
-
"error_kind": "string",
|
|
341
|
-
"string": "Index out of bounds"
|
|
342
|
-
},
|
|
343
|
-
"17089945683942782951": {
|
|
344
|
-
"error_kind": "string",
|
|
345
|
-
"string": "unauthorized"
|
|
346
|
-
},
|
|
347
|
-
"17312933876399746100": {
|
|
348
|
-
"error_kind": "string",
|
|
349
|
-
"string": "Function is_consumable can only be called statically"
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
},
|
|
353
|
-
"bytecode": "JwACBAEoAAABBIBSJwAABFIlAAAAQScCAgQBJwIDBAAfCgACAAMAUS0IUQElAAAAxCcCAQRSJwICBAA7DgACAAEpAABDALg53pEpAABEAIlV9fwpAABFACcWsWYpAABGAGGWa3wpAABHAEb7RNopAABIAPjUXpspAABJAEfazXMsAABKADBkTnLhMaApuFBFtoGBWF0oM+hIeblwkUPh9ZPwAAAAJwBLBAMnAEwEACcATQAAJwBOAQEnAE8EAScAUAQCJiUAABCQCiIBQwInAgQEACcCBgQDACoEBgUtCAEDAAgBBQEnAwMEAQAiAwIFLQ4EBQAiBQIFLQ4EBScCBQQDACoDBQQnAgQAAikCAAUAQez6SycCBgEAJAIAAgAAAScjAAAC2S0IAQInAgcEAwAIAQcBJwMCBAEAIgICBx8wAFAATwAHLQgBBwAAAQIBLQ4CBy0IAQIAAAECAS0MTAInAgkECi0IAAotCgcLLQoCDAAIAAkAJQAAELYtAgAALQoLCAAiCE8KLQsKCScCCgQLLQgACy0KBwwtCgINAAgACg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s41Tcs2f5FQghPbADyqmC1+ZuEyxHe/NlMyDfrCK/x1vMUQIYHvBXueys8461w31vhGW/FZ7wV73srPOCtq1/129quvsZbz4+75lXNam/DuiwUbW9YsTyxYcV6f8O6qljtbVhXfdnesFK8v2H9xtBsblgpv+WGlaIHJH1cLm3yKPqvbHUd56Hzql71wIaV/LdrO5//UE1elauszHTYrMKrXiaG4LPyxVea7cQMBTx7pXl1J/zN7NgOxbJ/T6UrFdUn0pbaJRXNJ5+G5ZoK+2W+eAzbX6Gi+7S9gxwOP0HwGhXyb8EMFZCuWQHZVVC4pAJD9CwIXVOB9io1YrymYu/V47UVWy8e71pxVYU5eKJ4ycF331teqrCtHP/T7NdU7L34vNuRayp6oGdr4vF87+tUbL03vVKx+dZ0bvffml6aYWdRO5ZrPdl77Xo1qtF/OOG4yXjV5NnAVVx72mM03zr+1uPrOrL1WxS7HbmoIvoUHqFcU4HFVFC7qGLrJzV2O3JVxd7PaaxUJB/UFOtFFVu/DLLZkasqNn8VBFaVp/tzDtkOnBCupFqpRUvS0CUF1RVcSvYSWdhb6hUFxX/zCvLXCn7oH9///PHLj4d/Eu7vf1jVl4/vf/r0QT/++tfnnw//98///WP+n5++fPz06eNvP/7x5fefP/zy15cPrIn/30vQ/3zPqZx3fboLP7x7yfK5P+4xUumf+V/H/J7XyJ7f549R/n+S7+cf/mED/w8="
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
"name": "set_authorized",
|
|
358
|
-
"is_unconstrained": true,
|
|
359
|
-
"custom_attributes": [
|
|
360
|
-
"abi_public"
|
|
361
|
-
],
|
|
362
|
-
"abi": {
|
|
363
|
-
"parameters": [
|
|
364
|
-
{
|
|
365
|
-
"name": "message_hash",
|
|
366
|
-
"type": {
|
|
367
|
-
"kind": "field"
|
|
368
|
-
},
|
|
369
|
-
"visibility": "private"
|
|
370
|
-
},
|
|
371
|
-
{
|
|
372
|
-
"name": "authorize",
|
|
373
|
-
"type": {
|
|
374
|
-
"kind": "boolean"
|
|
375
|
-
},
|
|
376
|
-
"visibility": "private"
|
|
377
|
-
}
|
|
378
|
-
],
|
|
379
|
-
"return_type": null,
|
|
380
|
-
"error_types": {
|
|
381
|
-
"361444214588792908": {
|
|
382
|
-
"error_kind": "string",
|
|
383
|
-
"string": "attempt to multiply with overflow"
|
|
384
|
-
},
|
|
385
|
-
"1998584279744703196": {
|
|
386
|
-
"error_kind": "string",
|
|
387
|
-
"string": "attempt to subtract with overflow"
|
|
388
|
-
},
|
|
389
|
-
"13455385521185560676": {
|
|
390
|
-
"error_kind": "string",
|
|
391
|
-
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
392
|
-
},
|
|
393
|
-
"14990209321349310352": {
|
|
394
|
-
"error_kind": "string",
|
|
395
|
-
"string": "attempt to add with overflow"
|
|
396
|
-
},
|
|
397
|
-
"15764276373176857197": {
|
|
398
|
-
"error_kind": "string",
|
|
399
|
-
"string": "Stack too deep"
|
|
400
|
-
},
|
|
401
|
-
"16431471497789672479": {
|
|
402
|
-
"error_kind": "string",
|
|
403
|
-
"string": "Index out of bounds"
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
},
|
|
407
|
-
"bytecode": "JwACBAEoAAABBIBHJwAABEclAAAASicCAwQCJwIEBAAfCgADAAQARRwARkYBLQhFAS0IRgIlAAAAVScCAQRHJwICBAA7DgACAAEnAEMEAycARAAAJiUAAAFWHgIAAwEnAgQAAikCAAUAQez6Sy0IAQYnAgcEBAAIAQcBJwMGBAEAIgYCBy0KBwgtDgUIACIIAggtDgQIACIIAggtDgMIJwIEBActCAAHLQoGCC0IQwkACAAEACUAAAF8LQIAAC0KCAMKIgNEBCcCBgEACioEBgckAgAHAAAA3iUAAAT1LQgBBCcCBwQEAAgBBwEnAwQEAQAiBAIHLQoHCC0OBQgAIggCCC0OAwgAIggCCC0OAQgnAgMEBy0IAActCgQILQhDCQAIAAMAJQAAAXwtAgAALQoIAQoiAUQDCioDBgQkAgAEAAABSiUAAAT1HAoCAwA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-
"name": "set_authorized_private",
|
|
412
|
-
"is_unconstrained": false,
|
|
413
|
-
"custom_attributes": [
|
|
414
|
-
"abi_private"
|
|
415
|
-
],
|
|
416
|
-
"abi": {
|
|
417
|
-
"parameters": [
|
|
418
|
-
{
|
|
419
|
-
"name": "inputs",
|
|
420
|
-
"type": {
|
|
421
|
-
"kind": "struct",
|
|
422
|
-
"path": "aztec::context::inputs::PrivateContextInputs",
|
|
423
|
-
"fields": [
|
|
424
|
-
{
|
|
425
|
-
"name": "call_context",
|
|
426
|
-
"type": {
|
|
427
|
-
"kind": "struct",
|
|
428
|
-
"path": "aztec::protocol_types::abis::call_context::CallContext",
|
|
429
|
-
"fields": [
|
|
430
|
-
{
|
|
431
|
-
"name": "msg_sender",
|
|
432
|
-
"type": {
|
|
433
|
-
"kind": "struct",
|
|
434
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
435
|
-
"fields": [
|
|
436
|
-
{
|
|
437
|
-
"name": "inner",
|
|
438
|
-
"type": {
|
|
439
|
-
"kind": "field"
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
]
|
|
443
|
-
}
|
|
444
|
-
},
|
|
445
|
-
{
|
|
446
|
-
"name": "contract_address",
|
|
447
|
-
"type": {
|
|
448
|
-
"kind": "struct",
|
|
449
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
450
|
-
"fields": [
|
|
451
|
-
{
|
|
452
|
-
"name": "inner",
|
|
453
|
-
"type": {
|
|
454
|
-
"kind": "field"
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
]
|
|
458
|
-
}
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
"name": "function_selector",
|
|
462
|
-
"type": {
|
|
463
|
-
"kind": "struct",
|
|
464
|
-
"path": "aztec::protocol_types::abis::function_selector::FunctionSelector",
|
|
465
|
-
"fields": [
|
|
466
|
-
{
|
|
467
|
-
"name": "inner",
|
|
468
|
-
"type": {
|
|
469
|
-
"kind": "integer",
|
|
470
|
-
"sign": "unsigned",
|
|
471
|
-
"width": 32
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
]
|
|
475
|
-
}
|
|
476
|
-
},
|
|
477
|
-
{
|
|
478
|
-
"name": "is_static_call",
|
|
479
|
-
"type": {
|
|
480
|
-
"kind": "boolean"
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
]
|
|
484
|
-
}
|
|
485
|
-
},
|
|
486
|
-
{
|
|
487
|
-
"name": "anchor_block_header",
|
|
488
|
-
"type": {
|
|
489
|
-
"kind": "struct",
|
|
490
|
-
"path": "aztec::protocol_types::abis::block_header::BlockHeader",
|
|
491
|
-
"fields": [
|
|
492
|
-
{
|
|
493
|
-
"name": "last_archive",
|
|
494
|
-
"type": {
|
|
495
|
-
"kind": "struct",
|
|
496
|
-
"path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
497
|
-
"fields": [
|
|
498
|
-
{
|
|
499
|
-
"name": "root",
|
|
500
|
-
"type": {
|
|
501
|
-
"kind": "field"
|
|
502
|
-
}
|
|
503
|
-
},
|
|
504
|
-
{
|
|
505
|
-
"name": "next_available_leaf_index",
|
|
506
|
-
"type": {
|
|
507
|
-
"kind": "field"
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
]
|
|
511
|
-
}
|
|
512
|
-
},
|
|
513
|
-
{
|
|
514
|
-
"name": "state",
|
|
515
|
-
"type": {
|
|
516
|
-
"kind": "struct",
|
|
517
|
-
"path": "aztec::protocol_types::abis::state_reference::StateReference",
|
|
518
|
-
"fields": [
|
|
519
|
-
{
|
|
520
|
-
"name": "l1_to_l2_message_tree",
|
|
521
|
-
"type": {
|
|
522
|
-
"kind": "struct",
|
|
523
|
-
"path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
524
|
-
"fields": [
|
|
525
|
-
{
|
|
526
|
-
"name": "root",
|
|
527
|
-
"type": {
|
|
528
|
-
"kind": "field"
|
|
529
|
-
}
|
|
530
|
-
},
|
|
531
|
-
{
|
|
532
|
-
"name": "next_available_leaf_index",
|
|
533
|
-
"type": {
|
|
534
|
-
"kind": "field"
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
]
|
|
538
|
-
}
|
|
539
|
-
},
|
|
540
|
-
{
|
|
541
|
-
"name": "partial",
|
|
542
|
-
"type": {
|
|
543
|
-
"kind": "struct",
|
|
544
|
-
"path": "aztec::protocol_types::abis::partial_state_reference::PartialStateReference",
|
|
545
|
-
"fields": [
|
|
546
|
-
{
|
|
547
|
-
"name": "note_hash_tree",
|
|
548
|
-
"type": {
|
|
549
|
-
"kind": "struct",
|
|
550
|
-
"path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
551
|
-
"fields": [
|
|
552
|
-
{
|
|
553
|
-
"name": "root",
|
|
554
|
-
"type": {
|
|
555
|
-
"kind": "field"
|
|
556
|
-
}
|
|
557
|
-
},
|
|
558
|
-
{
|
|
559
|
-
"name": "next_available_leaf_index",
|
|
560
|
-
"type": {
|
|
561
|
-
"kind": "field"
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
]
|
|
565
|
-
}
|
|
566
|
-
},
|
|
567
|
-
{
|
|
568
|
-
"name": "nullifier_tree",
|
|
569
|
-
"type": {
|
|
570
|
-
"kind": "struct",
|
|
571
|
-
"path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
572
|
-
"fields": [
|
|
573
|
-
{
|
|
574
|
-
"name": "root",
|
|
575
|
-
"type": {
|
|
576
|
-
"kind": "field"
|
|
577
|
-
}
|
|
578
|
-
},
|
|
579
|
-
{
|
|
580
|
-
"name": "next_available_leaf_index",
|
|
581
|
-
"type": {
|
|
582
|
-
"kind": "field"
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
]
|
|
586
|
-
}
|
|
587
|
-
},
|
|
588
|
-
{
|
|
589
|
-
"name": "public_data_tree",
|
|
590
|
-
"type": {
|
|
591
|
-
"kind": "struct",
|
|
592
|
-
"path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
593
|
-
"fields": [
|
|
594
|
-
{
|
|
595
|
-
"name": "root",
|
|
596
|
-
"type": {
|
|
597
|
-
"kind": "field"
|
|
598
|
-
}
|
|
599
|
-
},
|
|
600
|
-
{
|
|
601
|
-
"name": "next_available_leaf_index",
|
|
602
|
-
"type": {
|
|
603
|
-
"kind": "field"
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
]
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
]
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
]
|
|
613
|
-
}
|
|
614
|
-
},
|
|
615
|
-
{
|
|
616
|
-
"name": "sponge_blob_hash",
|
|
617
|
-
"type": {
|
|
618
|
-
"kind": "field"
|
|
619
|
-
}
|
|
620
|
-
},
|
|
621
|
-
{
|
|
622
|
-
"name": "global_variables",
|
|
623
|
-
"type": {
|
|
624
|
-
"kind": "struct",
|
|
625
|
-
"path": "aztec::protocol_types::abis::global_variables::GlobalVariables",
|
|
626
|
-
"fields": [
|
|
627
|
-
{
|
|
628
|
-
"name": "chain_id",
|
|
629
|
-
"type": {
|
|
630
|
-
"kind": "field"
|
|
631
|
-
}
|
|
632
|
-
},
|
|
633
|
-
{
|
|
634
|
-
"name": "version",
|
|
635
|
-
"type": {
|
|
636
|
-
"kind": "field"
|
|
637
|
-
}
|
|
638
|
-
},
|
|
639
|
-
{
|
|
640
|
-
"name": "block_number",
|
|
641
|
-
"type": {
|
|
642
|
-
"kind": "integer",
|
|
643
|
-
"sign": "unsigned",
|
|
644
|
-
"width": 32
|
|
645
|
-
}
|
|
646
|
-
},
|
|
647
|
-
{
|
|
648
|
-
"name": "slot_number",
|
|
649
|
-
"type": {
|
|
650
|
-
"kind": "field"
|
|
651
|
-
}
|
|
652
|
-
},
|
|
653
|
-
{
|
|
654
|
-
"name": "timestamp",
|
|
655
|
-
"type": {
|
|
656
|
-
"kind": "integer",
|
|
657
|
-
"sign": "unsigned",
|
|
658
|
-
"width": 64
|
|
659
|
-
}
|
|
660
|
-
},
|
|
661
|
-
{
|
|
662
|
-
"name": "coinbase",
|
|
663
|
-
"type": {
|
|
664
|
-
"kind": "struct",
|
|
665
|
-
"path": "aztec::protocol_types::address::eth_address::EthAddress",
|
|
666
|
-
"fields": [
|
|
667
|
-
{
|
|
668
|
-
"name": "inner",
|
|
669
|
-
"type": {
|
|
670
|
-
"kind": "field"
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
]
|
|
674
|
-
}
|
|
675
|
-
},
|
|
676
|
-
{
|
|
677
|
-
"name": "fee_recipient",
|
|
678
|
-
"type": {
|
|
679
|
-
"kind": "struct",
|
|
680
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
681
|
-
"fields": [
|
|
682
|
-
{
|
|
683
|
-
"name": "inner",
|
|
684
|
-
"type": {
|
|
685
|
-
"kind": "field"
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
]
|
|
689
|
-
}
|
|
690
|
-
},
|
|
691
|
-
{
|
|
692
|
-
"name": "gas_fees",
|
|
693
|
-
"type": {
|
|
694
|
-
"kind": "struct",
|
|
695
|
-
"path": "aztec::protocol_types::abis::gas_fees::GasFees",
|
|
696
|
-
"fields": [
|
|
697
|
-
{
|
|
698
|
-
"name": "fee_per_da_gas",
|
|
699
|
-
"type": {
|
|
700
|
-
"kind": "integer",
|
|
701
|
-
"sign": "unsigned",
|
|
702
|
-
"width": 128
|
|
703
|
-
}
|
|
704
|
-
},
|
|
705
|
-
{
|
|
706
|
-
"name": "fee_per_l2_gas",
|
|
707
|
-
"type": {
|
|
708
|
-
"kind": "integer",
|
|
709
|
-
"sign": "unsigned",
|
|
710
|
-
"width": 128
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
]
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
]
|
|
717
|
-
}
|
|
718
|
-
},
|
|
719
|
-
{
|
|
720
|
-
"name": "total_fees",
|
|
721
|
-
"type": {
|
|
722
|
-
"kind": "field"
|
|
723
|
-
}
|
|
724
|
-
},
|
|
725
|
-
{
|
|
726
|
-
"name": "total_mana_used",
|
|
727
|
-
"type": {
|
|
728
|
-
"kind": "field"
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
]
|
|
732
|
-
}
|
|
733
|
-
},
|
|
734
|
-
{
|
|
735
|
-
"name": "tx_context",
|
|
736
|
-
"type": {
|
|
737
|
-
"kind": "struct",
|
|
738
|
-
"path": "aztec::protocol_types::abis::transaction::tx_context::TxContext",
|
|
739
|
-
"fields": [
|
|
740
|
-
{
|
|
741
|
-
"name": "chain_id",
|
|
742
|
-
"type": {
|
|
743
|
-
"kind": "field"
|
|
744
|
-
}
|
|
745
|
-
},
|
|
746
|
-
{
|
|
747
|
-
"name": "version",
|
|
748
|
-
"type": {
|
|
749
|
-
"kind": "field"
|
|
750
|
-
}
|
|
751
|
-
},
|
|
752
|
-
{
|
|
753
|
-
"name": "gas_settings",
|
|
754
|
-
"type": {
|
|
755
|
-
"kind": "struct",
|
|
756
|
-
"path": "aztec::protocol_types::abis::gas_settings::GasSettings",
|
|
757
|
-
"fields": [
|
|
758
|
-
{
|
|
759
|
-
"name": "gas_limits",
|
|
760
|
-
"type": {
|
|
761
|
-
"kind": "struct",
|
|
762
|
-
"path": "aztec::protocol_types::abis::gas::Gas",
|
|
763
|
-
"fields": [
|
|
764
|
-
{
|
|
765
|
-
"name": "da_gas",
|
|
766
|
-
"type": {
|
|
767
|
-
"kind": "integer",
|
|
768
|
-
"sign": "unsigned",
|
|
769
|
-
"width": 32
|
|
770
|
-
}
|
|
771
|
-
},
|
|
772
|
-
{
|
|
773
|
-
"name": "l2_gas",
|
|
774
|
-
"type": {
|
|
775
|
-
"kind": "integer",
|
|
776
|
-
"sign": "unsigned",
|
|
777
|
-
"width": 32
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
]
|
|
781
|
-
}
|
|
782
|
-
},
|
|
783
|
-
{
|
|
784
|
-
"name": "teardown_gas_limits",
|
|
785
|
-
"type": {
|
|
786
|
-
"kind": "struct",
|
|
787
|
-
"path": "aztec::protocol_types::abis::gas::Gas",
|
|
788
|
-
"fields": [
|
|
789
|
-
{
|
|
790
|
-
"name": "da_gas",
|
|
791
|
-
"type": {
|
|
792
|
-
"kind": "integer",
|
|
793
|
-
"sign": "unsigned",
|
|
794
|
-
"width": 32
|
|
795
|
-
}
|
|
796
|
-
},
|
|
797
|
-
{
|
|
798
|
-
"name": "l2_gas",
|
|
799
|
-
"type": {
|
|
800
|
-
"kind": "integer",
|
|
801
|
-
"sign": "unsigned",
|
|
802
|
-
"width": 32
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
]
|
|
806
|
-
}
|
|
807
|
-
},
|
|
808
|
-
{
|
|
809
|
-
"name": "max_fees_per_gas",
|
|
810
|
-
"type": {
|
|
811
|
-
"kind": "struct",
|
|
812
|
-
"path": "aztec::protocol_types::abis::gas_fees::GasFees",
|
|
813
|
-
"fields": [
|
|
814
|
-
{
|
|
815
|
-
"name": "fee_per_da_gas",
|
|
816
|
-
"type": {
|
|
817
|
-
"kind": "integer",
|
|
818
|
-
"sign": "unsigned",
|
|
819
|
-
"width": 128
|
|
820
|
-
}
|
|
821
|
-
},
|
|
822
|
-
{
|
|
823
|
-
"name": "fee_per_l2_gas",
|
|
824
|
-
"type": {
|
|
825
|
-
"kind": "integer",
|
|
826
|
-
"sign": "unsigned",
|
|
827
|
-
"width": 128
|
|
828
|
-
}
|
|
829
|
-
}
|
|
830
|
-
]
|
|
831
|
-
}
|
|
832
|
-
},
|
|
833
|
-
{
|
|
834
|
-
"name": "max_priority_fees_per_gas",
|
|
835
|
-
"type": {
|
|
836
|
-
"kind": "struct",
|
|
837
|
-
"path": "aztec::protocol_types::abis::gas_fees::GasFees",
|
|
838
|
-
"fields": [
|
|
839
|
-
{
|
|
840
|
-
"name": "fee_per_da_gas",
|
|
841
|
-
"type": {
|
|
842
|
-
"kind": "integer",
|
|
843
|
-
"sign": "unsigned",
|
|
844
|
-
"width": 128
|
|
845
|
-
}
|
|
846
|
-
},
|
|
847
|
-
{
|
|
848
|
-
"name": "fee_per_l2_gas",
|
|
849
|
-
"type": {
|
|
850
|
-
"kind": "integer",
|
|
851
|
-
"sign": "unsigned",
|
|
852
|
-
"width": 128
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
]
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
]
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
]
|
|
862
|
-
}
|
|
863
|
-
},
|
|
864
|
-
{
|
|
865
|
-
"name": "start_side_effect_counter",
|
|
866
|
-
"type": {
|
|
867
|
-
"kind": "integer",
|
|
868
|
-
"sign": "unsigned",
|
|
869
|
-
"width": 32
|
|
870
|
-
}
|
|
871
|
-
}
|
|
872
|
-
]
|
|
873
|
-
},
|
|
874
|
-
"visibility": "private"
|
|
875
|
-
},
|
|
876
|
-
{
|
|
877
|
-
"name": "approver",
|
|
878
|
-
"type": {
|
|
879
|
-
"kind": "struct",
|
|
880
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
881
|
-
"fields": [
|
|
882
|
-
{
|
|
883
|
-
"name": "inner",
|
|
884
|
-
"type": {
|
|
885
|
-
"kind": "field"
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
]
|
|
889
|
-
},
|
|
890
|
-
"visibility": "private"
|
|
891
|
-
},
|
|
892
|
-
{
|
|
893
|
-
"name": "message_hash",
|
|
894
|
-
"type": {
|
|
895
|
-
"kind": "field"
|
|
896
|
-
},
|
|
897
|
-
"visibility": "private"
|
|
898
|
-
},
|
|
899
|
-
{
|
|
900
|
-
"name": "authorize",
|
|
901
|
-
"type": {
|
|
902
|
-
"kind": "boolean"
|
|
903
|
-
},
|
|
904
|
-
"visibility": "private"
|
|
905
|
-
}
|
|
906
|
-
],
|
|
907
|
-
"return_type": {
|
|
908
|
-
"abi_type": {
|
|
909
|
-
"kind": "struct",
|
|
910
|
-
"path": "aztec::protocol_types::abis::private_circuit_public_inputs::PrivateCircuitPublicInputs",
|
|
911
|
-
"fields": [
|
|
912
|
-
{
|
|
913
|
-
"name": "call_context",
|
|
914
|
-
"type": {
|
|
915
|
-
"kind": "struct",
|
|
916
|
-
"path": "aztec::protocol_types::abis::call_context::CallContext",
|
|
917
|
-
"fields": [
|
|
918
|
-
{
|
|
919
|
-
"name": "msg_sender",
|
|
920
|
-
"type": {
|
|
921
|
-
"kind": "struct",
|
|
922
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
923
|
-
"fields": [
|
|
924
|
-
{
|
|
925
|
-
"name": "inner",
|
|
926
|
-
"type": {
|
|
927
|
-
"kind": "field"
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
]
|
|
931
|
-
}
|
|
932
|
-
},
|
|
933
|
-
{
|
|
934
|
-
"name": "contract_address",
|
|
935
|
-
"type": {
|
|
936
|
-
"kind": "struct",
|
|
937
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
938
|
-
"fields": [
|
|
939
|
-
{
|
|
940
|
-
"name": "inner",
|
|
941
|
-
"type": {
|
|
942
|
-
"kind": "field"
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
]
|
|
946
|
-
}
|
|
947
|
-
},
|
|
948
|
-
{
|
|
949
|
-
"name": "function_selector",
|
|
950
|
-
"type": {
|
|
951
|
-
"kind": "struct",
|
|
952
|
-
"path": "aztec::protocol_types::abis::function_selector::FunctionSelector",
|
|
953
|
-
"fields": [
|
|
954
|
-
{
|
|
955
|
-
"name": "inner",
|
|
956
|
-
"type": {
|
|
957
|
-
"kind": "integer",
|
|
958
|
-
"sign": "unsigned",
|
|
959
|
-
"width": 32
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
]
|
|
963
|
-
}
|
|
964
|
-
},
|
|
965
|
-
{
|
|
966
|
-
"name": "is_static_call",
|
|
967
|
-
"type": {
|
|
968
|
-
"kind": "boolean"
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
]
|
|
972
|
-
}
|
|
973
|
-
},
|
|
974
|
-
{
|
|
975
|
-
"name": "args_hash",
|
|
976
|
-
"type": {
|
|
977
|
-
"kind": "field"
|
|
978
|
-
}
|
|
979
|
-
},
|
|
980
|
-
{
|
|
981
|
-
"name": "returns_hash",
|
|
982
|
-
"type": {
|
|
983
|
-
"kind": "field"
|
|
984
|
-
}
|
|
985
|
-
},
|
|
986
|
-
{
|
|
987
|
-
"name": "anchor_block_header",
|
|
988
|
-
"type": {
|
|
989
|
-
"kind": "struct",
|
|
990
|
-
"path": "aztec::protocol_types::abis::block_header::BlockHeader",
|
|
991
|
-
"fields": [
|
|
992
|
-
{
|
|
993
|
-
"name": "last_archive",
|
|
994
|
-
"type": {
|
|
995
|
-
"kind": "struct",
|
|
996
|
-
"path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
997
|
-
"fields": [
|
|
998
|
-
{
|
|
999
|
-
"name": "root",
|
|
1000
|
-
"type": {
|
|
1001
|
-
"kind": "field"
|
|
1002
|
-
}
|
|
1003
|
-
},
|
|
1004
|
-
{
|
|
1005
|
-
"name": "next_available_leaf_index",
|
|
1006
|
-
"type": {
|
|
1007
|
-
"kind": "field"
|
|
1008
|
-
}
|
|
1009
|
-
}
|
|
1010
|
-
]
|
|
1011
|
-
}
|
|
1012
|
-
},
|
|
1013
|
-
{
|
|
1014
|
-
"name": "state",
|
|
1015
|
-
"type": {
|
|
1016
|
-
"kind": "struct",
|
|
1017
|
-
"path": "aztec::protocol_types::abis::state_reference::StateReference",
|
|
1018
|
-
"fields": [
|
|
1019
|
-
{
|
|
1020
|
-
"name": "l1_to_l2_message_tree",
|
|
1021
|
-
"type": {
|
|
1022
|
-
"kind": "struct",
|
|
1023
|
-
"path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
1024
|
-
"fields": [
|
|
1025
|
-
{
|
|
1026
|
-
"name": "root",
|
|
1027
|
-
"type": {
|
|
1028
|
-
"kind": "field"
|
|
1029
|
-
}
|
|
1030
|
-
},
|
|
1031
|
-
{
|
|
1032
|
-
"name": "next_available_leaf_index",
|
|
1033
|
-
"type": {
|
|
1034
|
-
"kind": "field"
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
|
-
]
|
|
1038
|
-
}
|
|
1039
|
-
},
|
|
1040
|
-
{
|
|
1041
|
-
"name": "partial",
|
|
1042
|
-
"type": {
|
|
1043
|
-
"kind": "struct",
|
|
1044
|
-
"path": "aztec::protocol_types::abis::partial_state_reference::PartialStateReference",
|
|
1045
|
-
"fields": [
|
|
1046
|
-
{
|
|
1047
|
-
"name": "note_hash_tree",
|
|
1048
|
-
"type": {
|
|
1049
|
-
"kind": "struct",
|
|
1050
|
-
"path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
1051
|
-
"fields": [
|
|
1052
|
-
{
|
|
1053
|
-
"name": "root",
|
|
1054
|
-
"type": {
|
|
1055
|
-
"kind": "field"
|
|
1056
|
-
}
|
|
1057
|
-
},
|
|
1058
|
-
{
|
|
1059
|
-
"name": "next_available_leaf_index",
|
|
1060
|
-
"type": {
|
|
1061
|
-
"kind": "field"
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
]
|
|
1065
|
-
}
|
|
1066
|
-
},
|
|
1067
|
-
{
|
|
1068
|
-
"name": "nullifier_tree",
|
|
1069
|
-
"type": {
|
|
1070
|
-
"kind": "struct",
|
|
1071
|
-
"path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
1072
|
-
"fields": [
|
|
1073
|
-
{
|
|
1074
|
-
"name": "root",
|
|
1075
|
-
"type": {
|
|
1076
|
-
"kind": "field"
|
|
1077
|
-
}
|
|
1078
|
-
},
|
|
1079
|
-
{
|
|
1080
|
-
"name": "next_available_leaf_index",
|
|
1081
|
-
"type": {
|
|
1082
|
-
"kind": "field"
|
|
1083
|
-
}
|
|
1084
|
-
}
|
|
1085
|
-
]
|
|
1086
|
-
}
|
|
1087
|
-
},
|
|
1088
|
-
{
|
|
1089
|
-
"name": "public_data_tree",
|
|
1090
|
-
"type": {
|
|
1091
|
-
"kind": "struct",
|
|
1092
|
-
"path": "aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot",
|
|
1093
|
-
"fields": [
|
|
1094
|
-
{
|
|
1095
|
-
"name": "root",
|
|
1096
|
-
"type": {
|
|
1097
|
-
"kind": "field"
|
|
1098
|
-
}
|
|
1099
|
-
},
|
|
1100
|
-
{
|
|
1101
|
-
"name": "next_available_leaf_index",
|
|
1102
|
-
"type": {
|
|
1103
|
-
"kind": "field"
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
]
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
]
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
]
|
|
1113
|
-
}
|
|
1114
|
-
},
|
|
1115
|
-
{
|
|
1116
|
-
"name": "sponge_blob_hash",
|
|
1117
|
-
"type": {
|
|
1118
|
-
"kind": "field"
|
|
1119
|
-
}
|
|
1120
|
-
},
|
|
1121
|
-
{
|
|
1122
|
-
"name": "global_variables",
|
|
1123
|
-
"type": {
|
|
1124
|
-
"kind": "struct",
|
|
1125
|
-
"path": "aztec::protocol_types::abis::global_variables::GlobalVariables",
|
|
1126
|
-
"fields": [
|
|
1127
|
-
{
|
|
1128
|
-
"name": "chain_id",
|
|
1129
|
-
"type": {
|
|
1130
|
-
"kind": "field"
|
|
1131
|
-
}
|
|
1132
|
-
},
|
|
1133
|
-
{
|
|
1134
|
-
"name": "version",
|
|
1135
|
-
"type": {
|
|
1136
|
-
"kind": "field"
|
|
1137
|
-
}
|
|
1138
|
-
},
|
|
1139
|
-
{
|
|
1140
|
-
"name": "block_number",
|
|
1141
|
-
"type": {
|
|
1142
|
-
"kind": "integer",
|
|
1143
|
-
"sign": "unsigned",
|
|
1144
|
-
"width": 32
|
|
1145
|
-
}
|
|
1146
|
-
},
|
|
1147
|
-
{
|
|
1148
|
-
"name": "slot_number",
|
|
1149
|
-
"type": {
|
|
1150
|
-
"kind": "field"
|
|
1151
|
-
}
|
|
1152
|
-
},
|
|
1153
|
-
{
|
|
1154
|
-
"name": "timestamp",
|
|
1155
|
-
"type": {
|
|
1156
|
-
"kind": "integer",
|
|
1157
|
-
"sign": "unsigned",
|
|
1158
|
-
"width": 64
|
|
1159
|
-
}
|
|
1160
|
-
},
|
|
1161
|
-
{
|
|
1162
|
-
"name": "coinbase",
|
|
1163
|
-
"type": {
|
|
1164
|
-
"kind": "struct",
|
|
1165
|
-
"path": "aztec::protocol_types::address::eth_address::EthAddress",
|
|
1166
|
-
"fields": [
|
|
1167
|
-
{
|
|
1168
|
-
"name": "inner",
|
|
1169
|
-
"type": {
|
|
1170
|
-
"kind": "field"
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
|
-
]
|
|
1174
|
-
}
|
|
1175
|
-
},
|
|
1176
|
-
{
|
|
1177
|
-
"name": "fee_recipient",
|
|
1178
|
-
"type": {
|
|
1179
|
-
"kind": "struct",
|
|
1180
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
1181
|
-
"fields": [
|
|
1182
|
-
{
|
|
1183
|
-
"name": "inner",
|
|
1184
|
-
"type": {
|
|
1185
|
-
"kind": "field"
|
|
1186
|
-
}
|
|
1187
|
-
}
|
|
1188
|
-
]
|
|
1189
|
-
}
|
|
1190
|
-
},
|
|
1191
|
-
{
|
|
1192
|
-
"name": "gas_fees",
|
|
1193
|
-
"type": {
|
|
1194
|
-
"kind": "struct",
|
|
1195
|
-
"path": "aztec::protocol_types::abis::gas_fees::GasFees",
|
|
1196
|
-
"fields": [
|
|
1197
|
-
{
|
|
1198
|
-
"name": "fee_per_da_gas",
|
|
1199
|
-
"type": {
|
|
1200
|
-
"kind": "integer",
|
|
1201
|
-
"sign": "unsigned",
|
|
1202
|
-
"width": 128
|
|
1203
|
-
}
|
|
1204
|
-
},
|
|
1205
|
-
{
|
|
1206
|
-
"name": "fee_per_l2_gas",
|
|
1207
|
-
"type": {
|
|
1208
|
-
"kind": "integer",
|
|
1209
|
-
"sign": "unsigned",
|
|
1210
|
-
"width": 128
|
|
1211
|
-
}
|
|
1212
|
-
}
|
|
1213
|
-
]
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
]
|
|
1217
|
-
}
|
|
1218
|
-
},
|
|
1219
|
-
{
|
|
1220
|
-
"name": "total_fees",
|
|
1221
|
-
"type": {
|
|
1222
|
-
"kind": "field"
|
|
1223
|
-
}
|
|
1224
|
-
},
|
|
1225
|
-
{
|
|
1226
|
-
"name": "total_mana_used",
|
|
1227
|
-
"type": {
|
|
1228
|
-
"kind": "field"
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1231
|
-
]
|
|
1232
|
-
}
|
|
1233
|
-
},
|
|
1234
|
-
{
|
|
1235
|
-
"name": "tx_context",
|
|
1236
|
-
"type": {
|
|
1237
|
-
"kind": "struct",
|
|
1238
|
-
"path": "aztec::protocol_types::abis::transaction::tx_context::TxContext",
|
|
1239
|
-
"fields": [
|
|
1240
|
-
{
|
|
1241
|
-
"name": "chain_id",
|
|
1242
|
-
"type": {
|
|
1243
|
-
"kind": "field"
|
|
1244
|
-
}
|
|
1245
|
-
},
|
|
1246
|
-
{
|
|
1247
|
-
"name": "version",
|
|
1248
|
-
"type": {
|
|
1249
|
-
"kind": "field"
|
|
1250
|
-
}
|
|
1251
|
-
},
|
|
1252
|
-
{
|
|
1253
|
-
"name": "gas_settings",
|
|
1254
|
-
"type": {
|
|
1255
|
-
"kind": "struct",
|
|
1256
|
-
"path": "aztec::protocol_types::abis::gas_settings::GasSettings",
|
|
1257
|
-
"fields": [
|
|
1258
|
-
{
|
|
1259
|
-
"name": "gas_limits",
|
|
1260
|
-
"type": {
|
|
1261
|
-
"kind": "struct",
|
|
1262
|
-
"path": "aztec::protocol_types::abis::gas::Gas",
|
|
1263
|
-
"fields": [
|
|
1264
|
-
{
|
|
1265
|
-
"name": "da_gas",
|
|
1266
|
-
"type": {
|
|
1267
|
-
"kind": "integer",
|
|
1268
|
-
"sign": "unsigned",
|
|
1269
|
-
"width": 32
|
|
1270
|
-
}
|
|
1271
|
-
},
|
|
1272
|
-
{
|
|
1273
|
-
"name": "l2_gas",
|
|
1274
|
-
"type": {
|
|
1275
|
-
"kind": "integer",
|
|
1276
|
-
"sign": "unsigned",
|
|
1277
|
-
"width": 32
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
]
|
|
1281
|
-
}
|
|
1282
|
-
},
|
|
1283
|
-
{
|
|
1284
|
-
"name": "teardown_gas_limits",
|
|
1285
|
-
"type": {
|
|
1286
|
-
"kind": "struct",
|
|
1287
|
-
"path": "aztec::protocol_types::abis::gas::Gas",
|
|
1288
|
-
"fields": [
|
|
1289
|
-
{
|
|
1290
|
-
"name": "da_gas",
|
|
1291
|
-
"type": {
|
|
1292
|
-
"kind": "integer",
|
|
1293
|
-
"sign": "unsigned",
|
|
1294
|
-
"width": 32
|
|
1295
|
-
}
|
|
1296
|
-
},
|
|
1297
|
-
{
|
|
1298
|
-
"name": "l2_gas",
|
|
1299
|
-
"type": {
|
|
1300
|
-
"kind": "integer",
|
|
1301
|
-
"sign": "unsigned",
|
|
1302
|
-
"width": 32
|
|
1303
|
-
}
|
|
1304
|
-
}
|
|
1305
|
-
]
|
|
1306
|
-
}
|
|
1307
|
-
},
|
|
1308
|
-
{
|
|
1309
|
-
"name": "max_fees_per_gas",
|
|
1310
|
-
"type": {
|
|
1311
|
-
"kind": "struct",
|
|
1312
|
-
"path": "aztec::protocol_types::abis::gas_fees::GasFees",
|
|
1313
|
-
"fields": [
|
|
1314
|
-
{
|
|
1315
|
-
"name": "fee_per_da_gas",
|
|
1316
|
-
"type": {
|
|
1317
|
-
"kind": "integer",
|
|
1318
|
-
"sign": "unsigned",
|
|
1319
|
-
"width": 128
|
|
1320
|
-
}
|
|
1321
|
-
},
|
|
1322
|
-
{
|
|
1323
|
-
"name": "fee_per_l2_gas",
|
|
1324
|
-
"type": {
|
|
1325
|
-
"kind": "integer",
|
|
1326
|
-
"sign": "unsigned",
|
|
1327
|
-
"width": 128
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
]
|
|
1331
|
-
}
|
|
1332
|
-
},
|
|
1333
|
-
{
|
|
1334
|
-
"name": "max_priority_fees_per_gas",
|
|
1335
|
-
"type": {
|
|
1336
|
-
"kind": "struct",
|
|
1337
|
-
"path": "aztec::protocol_types::abis::gas_fees::GasFees",
|
|
1338
|
-
"fields": [
|
|
1339
|
-
{
|
|
1340
|
-
"name": "fee_per_da_gas",
|
|
1341
|
-
"type": {
|
|
1342
|
-
"kind": "integer",
|
|
1343
|
-
"sign": "unsigned",
|
|
1344
|
-
"width": 128
|
|
1345
|
-
}
|
|
1346
|
-
},
|
|
1347
|
-
{
|
|
1348
|
-
"name": "fee_per_l2_gas",
|
|
1349
|
-
"type": {
|
|
1350
|
-
"kind": "integer",
|
|
1351
|
-
"sign": "unsigned",
|
|
1352
|
-
"width": 128
|
|
1353
|
-
}
|
|
1354
|
-
}
|
|
1355
|
-
]
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
]
|
|
1359
|
-
}
|
|
1360
|
-
}
|
|
1361
|
-
]
|
|
1362
|
-
}
|
|
1363
|
-
},
|
|
1364
|
-
{
|
|
1365
|
-
"name": "min_revertible_side_effect_counter",
|
|
1366
|
-
"type": {
|
|
1367
|
-
"kind": "integer",
|
|
1368
|
-
"sign": "unsigned",
|
|
1369
|
-
"width": 32
|
|
1370
|
-
}
|
|
1371
|
-
},
|
|
1372
|
-
{
|
|
1373
|
-
"name": "is_fee_payer",
|
|
1374
|
-
"type": {
|
|
1375
|
-
"kind": "boolean"
|
|
1376
|
-
}
|
|
1377
|
-
},
|
|
1378
|
-
{
|
|
1379
|
-
"name": "include_by_timestamp",
|
|
1380
|
-
"type": {
|
|
1381
|
-
"kind": "integer",
|
|
1382
|
-
"sign": "unsigned",
|
|
1383
|
-
"width": 64
|
|
1384
|
-
}
|
|
1385
|
-
},
|
|
1386
|
-
{
|
|
1387
|
-
"name": "start_side_effect_counter",
|
|
1388
|
-
"type": {
|
|
1389
|
-
"kind": "integer",
|
|
1390
|
-
"sign": "unsigned",
|
|
1391
|
-
"width": 32
|
|
1392
|
-
}
|
|
1393
|
-
},
|
|
1394
|
-
{
|
|
1395
|
-
"name": "end_side_effect_counter",
|
|
1396
|
-
"type": {
|
|
1397
|
-
"kind": "integer",
|
|
1398
|
-
"sign": "unsigned",
|
|
1399
|
-
"width": 32
|
|
1400
|
-
}
|
|
1401
|
-
},
|
|
1402
|
-
{
|
|
1403
|
-
"name": "expected_non_revertible_side_effect_counter",
|
|
1404
|
-
"type": {
|
|
1405
|
-
"kind": "integer",
|
|
1406
|
-
"sign": "unsigned",
|
|
1407
|
-
"width": 32
|
|
1408
|
-
}
|
|
1409
|
-
},
|
|
1410
|
-
{
|
|
1411
|
-
"name": "expected_revertible_side_effect_counter",
|
|
1412
|
-
"type": {
|
|
1413
|
-
"kind": "integer",
|
|
1414
|
-
"sign": "unsigned",
|
|
1415
|
-
"width": 32
|
|
1416
|
-
}
|
|
1417
|
-
},
|
|
1418
|
-
{
|
|
1419
|
-
"name": "note_hash_read_requests",
|
|
1420
|
-
"type": {
|
|
1421
|
-
"kind": "struct",
|
|
1422
|
-
"path": "aztec::protocol_types::utils::arrays::claimed_length_array::ClaimedLengthArray",
|
|
1423
|
-
"fields": [
|
|
1424
|
-
{
|
|
1425
|
-
"name": "array",
|
|
1426
|
-
"type": {
|
|
1427
|
-
"kind": "array",
|
|
1428
|
-
"length": 16,
|
|
1429
|
-
"type": {
|
|
1430
|
-
"kind": "struct",
|
|
1431
|
-
"path": "aztec::protocol_types::side_effect::scoped::Scoped",
|
|
1432
|
-
"fields": [
|
|
1433
|
-
{
|
|
1434
|
-
"name": "inner",
|
|
1435
|
-
"type": {
|
|
1436
|
-
"kind": "struct",
|
|
1437
|
-
"path": "aztec::protocol_types::side_effect::counted::Counted",
|
|
1438
|
-
"fields": [
|
|
1439
|
-
{
|
|
1440
|
-
"name": "inner",
|
|
1441
|
-
"type": {
|
|
1442
|
-
"kind": "field"
|
|
1443
|
-
}
|
|
1444
|
-
},
|
|
1445
|
-
{
|
|
1446
|
-
"name": "counter",
|
|
1447
|
-
"type": {
|
|
1448
|
-
"kind": "integer",
|
|
1449
|
-
"sign": "unsigned",
|
|
1450
|
-
"width": 32
|
|
1451
|
-
}
|
|
1452
|
-
}
|
|
1453
|
-
]
|
|
1454
|
-
}
|
|
1455
|
-
},
|
|
1456
|
-
{
|
|
1457
|
-
"name": "contract_address",
|
|
1458
|
-
"type": {
|
|
1459
|
-
"kind": "struct",
|
|
1460
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
1461
|
-
"fields": [
|
|
1462
|
-
{
|
|
1463
|
-
"name": "inner",
|
|
1464
|
-
"type": {
|
|
1465
|
-
"kind": "field"
|
|
1466
|
-
}
|
|
1467
|
-
}
|
|
1468
|
-
]
|
|
1469
|
-
}
|
|
1470
|
-
}
|
|
1471
|
-
]
|
|
1472
|
-
}
|
|
1473
|
-
}
|
|
1474
|
-
},
|
|
1475
|
-
{
|
|
1476
|
-
"name": "length",
|
|
1477
|
-
"type": {
|
|
1478
|
-
"kind": "integer",
|
|
1479
|
-
"sign": "unsigned",
|
|
1480
|
-
"width": 32
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
]
|
|
1484
|
-
}
|
|
1485
|
-
},
|
|
1486
|
-
{
|
|
1487
|
-
"name": "nullifier_read_requests",
|
|
1488
|
-
"type": {
|
|
1489
|
-
"kind": "struct",
|
|
1490
|
-
"path": "aztec::protocol_types::utils::arrays::claimed_length_array::ClaimedLengthArray",
|
|
1491
|
-
"fields": [
|
|
1492
|
-
{
|
|
1493
|
-
"name": "array",
|
|
1494
|
-
"type": {
|
|
1495
|
-
"kind": "array",
|
|
1496
|
-
"length": 16,
|
|
1497
|
-
"type": {
|
|
1498
|
-
"kind": "struct",
|
|
1499
|
-
"path": "aztec::protocol_types::side_effect::scoped::Scoped",
|
|
1500
|
-
"fields": [
|
|
1501
|
-
{
|
|
1502
|
-
"name": "inner",
|
|
1503
|
-
"type": {
|
|
1504
|
-
"kind": "struct",
|
|
1505
|
-
"path": "aztec::protocol_types::side_effect::counted::Counted",
|
|
1506
|
-
"fields": [
|
|
1507
|
-
{
|
|
1508
|
-
"name": "inner",
|
|
1509
|
-
"type": {
|
|
1510
|
-
"kind": "field"
|
|
1511
|
-
}
|
|
1512
|
-
},
|
|
1513
|
-
{
|
|
1514
|
-
"name": "counter",
|
|
1515
|
-
"type": {
|
|
1516
|
-
"kind": "integer",
|
|
1517
|
-
"sign": "unsigned",
|
|
1518
|
-
"width": 32
|
|
1519
|
-
}
|
|
1520
|
-
}
|
|
1521
|
-
]
|
|
1522
|
-
}
|
|
1523
|
-
},
|
|
1524
|
-
{
|
|
1525
|
-
"name": "contract_address",
|
|
1526
|
-
"type": {
|
|
1527
|
-
"kind": "struct",
|
|
1528
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
1529
|
-
"fields": [
|
|
1530
|
-
{
|
|
1531
|
-
"name": "inner",
|
|
1532
|
-
"type": {
|
|
1533
|
-
"kind": "field"
|
|
1534
|
-
}
|
|
1535
|
-
}
|
|
1536
|
-
]
|
|
1537
|
-
}
|
|
1538
|
-
}
|
|
1539
|
-
]
|
|
1540
|
-
}
|
|
1541
|
-
}
|
|
1542
|
-
},
|
|
1543
|
-
{
|
|
1544
|
-
"name": "length",
|
|
1545
|
-
"type": {
|
|
1546
|
-
"kind": "integer",
|
|
1547
|
-
"sign": "unsigned",
|
|
1548
|
-
"width": 32
|
|
1549
|
-
}
|
|
1550
|
-
}
|
|
1551
|
-
]
|
|
1552
|
-
}
|
|
1553
|
-
},
|
|
1554
|
-
{
|
|
1555
|
-
"name": "key_validation_requests_and_generators",
|
|
1556
|
-
"type": {
|
|
1557
|
-
"kind": "struct",
|
|
1558
|
-
"path": "aztec::protocol_types::utils::arrays::claimed_length_array::ClaimedLengthArray",
|
|
1559
|
-
"fields": [
|
|
1560
|
-
{
|
|
1561
|
-
"name": "array",
|
|
1562
|
-
"type": {
|
|
1563
|
-
"kind": "array",
|
|
1564
|
-
"length": 16,
|
|
1565
|
-
"type": {
|
|
1566
|
-
"kind": "struct",
|
|
1567
|
-
"path": "aztec::protocol_types::abis::validation_requests::key_validation_request_and_generator::KeyValidationRequestAndGenerator",
|
|
1568
|
-
"fields": [
|
|
1569
|
-
{
|
|
1570
|
-
"name": "request",
|
|
1571
|
-
"type": {
|
|
1572
|
-
"kind": "struct",
|
|
1573
|
-
"path": "aztec::protocol_types::abis::validation_requests::key_validation_request::KeyValidationRequest",
|
|
1574
|
-
"fields": [
|
|
1575
|
-
{
|
|
1576
|
-
"name": "pk_m",
|
|
1577
|
-
"type": {
|
|
1578
|
-
"kind": "struct",
|
|
1579
|
-
"path": "std::embedded_curve_ops::EmbeddedCurvePoint",
|
|
1580
|
-
"fields": [
|
|
1581
|
-
{
|
|
1582
|
-
"name": "x",
|
|
1583
|
-
"type": {
|
|
1584
|
-
"kind": "field"
|
|
1585
|
-
}
|
|
1586
|
-
},
|
|
1587
|
-
{
|
|
1588
|
-
"name": "y",
|
|
1589
|
-
"type": {
|
|
1590
|
-
"kind": "field"
|
|
1591
|
-
}
|
|
1592
|
-
},
|
|
1593
|
-
{
|
|
1594
|
-
"name": "is_infinite",
|
|
1595
|
-
"type": {
|
|
1596
|
-
"kind": "boolean"
|
|
1597
|
-
}
|
|
1598
|
-
}
|
|
1599
|
-
]
|
|
1600
|
-
}
|
|
1601
|
-
},
|
|
1602
|
-
{
|
|
1603
|
-
"name": "sk_app",
|
|
1604
|
-
"type": {
|
|
1605
|
-
"kind": "field"
|
|
1606
|
-
}
|
|
1607
|
-
}
|
|
1608
|
-
]
|
|
1609
|
-
}
|
|
1610
|
-
},
|
|
1611
|
-
{
|
|
1612
|
-
"name": "sk_app_generator",
|
|
1613
|
-
"type": {
|
|
1614
|
-
"kind": "field"
|
|
1615
|
-
}
|
|
1616
|
-
}
|
|
1617
|
-
]
|
|
1618
|
-
}
|
|
1619
|
-
}
|
|
1620
|
-
},
|
|
1621
|
-
{
|
|
1622
|
-
"name": "length",
|
|
1623
|
-
"type": {
|
|
1624
|
-
"kind": "integer",
|
|
1625
|
-
"sign": "unsigned",
|
|
1626
|
-
"width": 32
|
|
1627
|
-
}
|
|
1628
|
-
}
|
|
1629
|
-
]
|
|
1630
|
-
}
|
|
1631
|
-
},
|
|
1632
|
-
{
|
|
1633
|
-
"name": "private_call_requests",
|
|
1634
|
-
"type": {
|
|
1635
|
-
"kind": "struct",
|
|
1636
|
-
"path": "aztec::protocol_types::utils::arrays::claimed_length_array::ClaimedLengthArray",
|
|
1637
|
-
"fields": [
|
|
1638
|
-
{
|
|
1639
|
-
"name": "array",
|
|
1640
|
-
"type": {
|
|
1641
|
-
"kind": "array",
|
|
1642
|
-
"length": 8,
|
|
1643
|
-
"type": {
|
|
1644
|
-
"kind": "struct",
|
|
1645
|
-
"path": "aztec::protocol_types::abis::private_call_request::PrivateCallRequest",
|
|
1646
|
-
"fields": [
|
|
1647
|
-
{
|
|
1648
|
-
"name": "call_context",
|
|
1649
|
-
"type": {
|
|
1650
|
-
"kind": "struct",
|
|
1651
|
-
"path": "aztec::protocol_types::abis::call_context::CallContext",
|
|
1652
|
-
"fields": [
|
|
1653
|
-
{
|
|
1654
|
-
"name": "msg_sender",
|
|
1655
|
-
"type": {
|
|
1656
|
-
"kind": "struct",
|
|
1657
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
1658
|
-
"fields": [
|
|
1659
|
-
{
|
|
1660
|
-
"name": "inner",
|
|
1661
|
-
"type": {
|
|
1662
|
-
"kind": "field"
|
|
1663
|
-
}
|
|
1664
|
-
}
|
|
1665
|
-
]
|
|
1666
|
-
}
|
|
1667
|
-
},
|
|
1668
|
-
{
|
|
1669
|
-
"name": "contract_address",
|
|
1670
|
-
"type": {
|
|
1671
|
-
"kind": "struct",
|
|
1672
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
1673
|
-
"fields": [
|
|
1674
|
-
{
|
|
1675
|
-
"name": "inner",
|
|
1676
|
-
"type": {
|
|
1677
|
-
"kind": "field"
|
|
1678
|
-
}
|
|
1679
|
-
}
|
|
1680
|
-
]
|
|
1681
|
-
}
|
|
1682
|
-
},
|
|
1683
|
-
{
|
|
1684
|
-
"name": "function_selector",
|
|
1685
|
-
"type": {
|
|
1686
|
-
"kind": "struct",
|
|
1687
|
-
"path": "aztec::protocol_types::abis::function_selector::FunctionSelector",
|
|
1688
|
-
"fields": [
|
|
1689
|
-
{
|
|
1690
|
-
"name": "inner",
|
|
1691
|
-
"type": {
|
|
1692
|
-
"kind": "integer",
|
|
1693
|
-
"sign": "unsigned",
|
|
1694
|
-
"width": 32
|
|
1695
|
-
}
|
|
1696
|
-
}
|
|
1697
|
-
]
|
|
1698
|
-
}
|
|
1699
|
-
},
|
|
1700
|
-
{
|
|
1701
|
-
"name": "is_static_call",
|
|
1702
|
-
"type": {
|
|
1703
|
-
"kind": "boolean"
|
|
1704
|
-
}
|
|
1705
|
-
}
|
|
1706
|
-
]
|
|
1707
|
-
}
|
|
1708
|
-
},
|
|
1709
|
-
{
|
|
1710
|
-
"name": "args_hash",
|
|
1711
|
-
"type": {
|
|
1712
|
-
"kind": "field"
|
|
1713
|
-
}
|
|
1714
|
-
},
|
|
1715
|
-
{
|
|
1716
|
-
"name": "returns_hash",
|
|
1717
|
-
"type": {
|
|
1718
|
-
"kind": "field"
|
|
1719
|
-
}
|
|
1720
|
-
},
|
|
1721
|
-
{
|
|
1722
|
-
"name": "start_side_effect_counter",
|
|
1723
|
-
"type": {
|
|
1724
|
-
"kind": "integer",
|
|
1725
|
-
"sign": "unsigned",
|
|
1726
|
-
"width": 32
|
|
1727
|
-
}
|
|
1728
|
-
},
|
|
1729
|
-
{
|
|
1730
|
-
"name": "end_side_effect_counter",
|
|
1731
|
-
"type": {
|
|
1732
|
-
"kind": "integer",
|
|
1733
|
-
"sign": "unsigned",
|
|
1734
|
-
"width": 32
|
|
1735
|
-
}
|
|
1736
|
-
}
|
|
1737
|
-
]
|
|
1738
|
-
}
|
|
1739
|
-
}
|
|
1740
|
-
},
|
|
1741
|
-
{
|
|
1742
|
-
"name": "length",
|
|
1743
|
-
"type": {
|
|
1744
|
-
"kind": "integer",
|
|
1745
|
-
"sign": "unsigned",
|
|
1746
|
-
"width": 32
|
|
1747
|
-
}
|
|
1748
|
-
}
|
|
1749
|
-
]
|
|
1750
|
-
}
|
|
1751
|
-
},
|
|
1752
|
-
{
|
|
1753
|
-
"name": "public_call_requests",
|
|
1754
|
-
"type": {
|
|
1755
|
-
"kind": "struct",
|
|
1756
|
-
"path": "aztec::protocol_types::utils::arrays::claimed_length_array::ClaimedLengthArray",
|
|
1757
|
-
"fields": [
|
|
1758
|
-
{
|
|
1759
|
-
"name": "array",
|
|
1760
|
-
"type": {
|
|
1761
|
-
"kind": "array",
|
|
1762
|
-
"length": 32,
|
|
1763
|
-
"type": {
|
|
1764
|
-
"kind": "struct",
|
|
1765
|
-
"path": "aztec::protocol_types::side_effect::counted::Counted",
|
|
1766
|
-
"fields": [
|
|
1767
|
-
{
|
|
1768
|
-
"name": "inner",
|
|
1769
|
-
"type": {
|
|
1770
|
-
"kind": "struct",
|
|
1771
|
-
"path": "aztec::protocol_types::abis::public_call_request::PublicCallRequest",
|
|
1772
|
-
"fields": [
|
|
1773
|
-
{
|
|
1774
|
-
"name": "msg_sender",
|
|
1775
|
-
"type": {
|
|
1776
|
-
"kind": "struct",
|
|
1777
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
1778
|
-
"fields": [
|
|
1779
|
-
{
|
|
1780
|
-
"name": "inner",
|
|
1781
|
-
"type": {
|
|
1782
|
-
"kind": "field"
|
|
1783
|
-
}
|
|
1784
|
-
}
|
|
1785
|
-
]
|
|
1786
|
-
}
|
|
1787
|
-
},
|
|
1788
|
-
{
|
|
1789
|
-
"name": "contract_address",
|
|
1790
|
-
"type": {
|
|
1791
|
-
"kind": "struct",
|
|
1792
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
1793
|
-
"fields": [
|
|
1794
|
-
{
|
|
1795
|
-
"name": "inner",
|
|
1796
|
-
"type": {
|
|
1797
|
-
"kind": "field"
|
|
1798
|
-
}
|
|
1799
|
-
}
|
|
1800
|
-
]
|
|
1801
|
-
}
|
|
1802
|
-
},
|
|
1803
|
-
{
|
|
1804
|
-
"name": "is_static_call",
|
|
1805
|
-
"type": {
|
|
1806
|
-
"kind": "boolean"
|
|
1807
|
-
}
|
|
1808
|
-
},
|
|
1809
|
-
{
|
|
1810
|
-
"name": "calldata_hash",
|
|
1811
|
-
"type": {
|
|
1812
|
-
"kind": "field"
|
|
1813
|
-
}
|
|
1814
|
-
}
|
|
1815
|
-
]
|
|
1816
|
-
}
|
|
1817
|
-
},
|
|
1818
|
-
{
|
|
1819
|
-
"name": "counter",
|
|
1820
|
-
"type": {
|
|
1821
|
-
"kind": "integer",
|
|
1822
|
-
"sign": "unsigned",
|
|
1823
|
-
"width": 32
|
|
1824
|
-
}
|
|
1825
|
-
}
|
|
1826
|
-
]
|
|
1827
|
-
}
|
|
1828
|
-
}
|
|
1829
|
-
},
|
|
1830
|
-
{
|
|
1831
|
-
"name": "length",
|
|
1832
|
-
"type": {
|
|
1833
|
-
"kind": "integer",
|
|
1834
|
-
"sign": "unsigned",
|
|
1835
|
-
"width": 32
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1838
|
-
]
|
|
1839
|
-
}
|
|
1840
|
-
},
|
|
1841
|
-
{
|
|
1842
|
-
"name": "public_teardown_call_request",
|
|
1843
|
-
"type": {
|
|
1844
|
-
"kind": "struct",
|
|
1845
|
-
"path": "aztec::protocol_types::abis::public_call_request::PublicCallRequest",
|
|
1846
|
-
"fields": [
|
|
1847
|
-
{
|
|
1848
|
-
"name": "msg_sender",
|
|
1849
|
-
"type": {
|
|
1850
|
-
"kind": "struct",
|
|
1851
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
1852
|
-
"fields": [
|
|
1853
|
-
{
|
|
1854
|
-
"name": "inner",
|
|
1855
|
-
"type": {
|
|
1856
|
-
"kind": "field"
|
|
1857
|
-
}
|
|
1858
|
-
}
|
|
1859
|
-
]
|
|
1860
|
-
}
|
|
1861
|
-
},
|
|
1862
|
-
{
|
|
1863
|
-
"name": "contract_address",
|
|
1864
|
-
"type": {
|
|
1865
|
-
"kind": "struct",
|
|
1866
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
1867
|
-
"fields": [
|
|
1868
|
-
{
|
|
1869
|
-
"name": "inner",
|
|
1870
|
-
"type": {
|
|
1871
|
-
"kind": "field"
|
|
1872
|
-
}
|
|
1873
|
-
}
|
|
1874
|
-
]
|
|
1875
|
-
}
|
|
1876
|
-
},
|
|
1877
|
-
{
|
|
1878
|
-
"name": "is_static_call",
|
|
1879
|
-
"type": {
|
|
1880
|
-
"kind": "boolean"
|
|
1881
|
-
}
|
|
1882
|
-
},
|
|
1883
|
-
{
|
|
1884
|
-
"name": "calldata_hash",
|
|
1885
|
-
"type": {
|
|
1886
|
-
"kind": "field"
|
|
1887
|
-
}
|
|
1888
|
-
}
|
|
1889
|
-
]
|
|
1890
|
-
}
|
|
1891
|
-
},
|
|
1892
|
-
{
|
|
1893
|
-
"name": "note_hashes",
|
|
1894
|
-
"type": {
|
|
1895
|
-
"kind": "struct",
|
|
1896
|
-
"path": "aztec::protocol_types::utils::arrays::claimed_length_array::ClaimedLengthArray",
|
|
1897
|
-
"fields": [
|
|
1898
|
-
{
|
|
1899
|
-
"name": "array",
|
|
1900
|
-
"type": {
|
|
1901
|
-
"kind": "array",
|
|
1902
|
-
"length": 16,
|
|
1903
|
-
"type": {
|
|
1904
|
-
"kind": "struct",
|
|
1905
|
-
"path": "aztec::protocol_types::side_effect::counted::Counted",
|
|
1906
|
-
"fields": [
|
|
1907
|
-
{
|
|
1908
|
-
"name": "inner",
|
|
1909
|
-
"type": {
|
|
1910
|
-
"kind": "field"
|
|
1911
|
-
}
|
|
1912
|
-
},
|
|
1913
|
-
{
|
|
1914
|
-
"name": "counter",
|
|
1915
|
-
"type": {
|
|
1916
|
-
"kind": "integer",
|
|
1917
|
-
"sign": "unsigned",
|
|
1918
|
-
"width": 32
|
|
1919
|
-
}
|
|
1920
|
-
}
|
|
1921
|
-
]
|
|
1922
|
-
}
|
|
1923
|
-
}
|
|
1924
|
-
},
|
|
1925
|
-
{
|
|
1926
|
-
"name": "length",
|
|
1927
|
-
"type": {
|
|
1928
|
-
"kind": "integer",
|
|
1929
|
-
"sign": "unsigned",
|
|
1930
|
-
"width": 32
|
|
1931
|
-
}
|
|
1932
|
-
}
|
|
1933
|
-
]
|
|
1934
|
-
}
|
|
1935
|
-
},
|
|
1936
|
-
{
|
|
1937
|
-
"name": "nullifiers",
|
|
1938
|
-
"type": {
|
|
1939
|
-
"kind": "struct",
|
|
1940
|
-
"path": "aztec::protocol_types::utils::arrays::claimed_length_array::ClaimedLengthArray",
|
|
1941
|
-
"fields": [
|
|
1942
|
-
{
|
|
1943
|
-
"name": "array",
|
|
1944
|
-
"type": {
|
|
1945
|
-
"kind": "array",
|
|
1946
|
-
"length": 16,
|
|
1947
|
-
"type": {
|
|
1948
|
-
"kind": "struct",
|
|
1949
|
-
"path": "aztec::protocol_types::side_effect::counted::Counted",
|
|
1950
|
-
"fields": [
|
|
1951
|
-
{
|
|
1952
|
-
"name": "inner",
|
|
1953
|
-
"type": {
|
|
1954
|
-
"kind": "struct",
|
|
1955
|
-
"path": "aztec::protocol_types::abis::nullifier::Nullifier",
|
|
1956
|
-
"fields": [
|
|
1957
|
-
{
|
|
1958
|
-
"name": "value",
|
|
1959
|
-
"type": {
|
|
1960
|
-
"kind": "field"
|
|
1961
|
-
}
|
|
1962
|
-
},
|
|
1963
|
-
{
|
|
1964
|
-
"name": "note_hash",
|
|
1965
|
-
"type": {
|
|
1966
|
-
"kind": "field"
|
|
1967
|
-
}
|
|
1968
|
-
}
|
|
1969
|
-
]
|
|
1970
|
-
}
|
|
1971
|
-
},
|
|
1972
|
-
{
|
|
1973
|
-
"name": "counter",
|
|
1974
|
-
"type": {
|
|
1975
|
-
"kind": "integer",
|
|
1976
|
-
"sign": "unsigned",
|
|
1977
|
-
"width": 32
|
|
1978
|
-
}
|
|
1979
|
-
}
|
|
1980
|
-
]
|
|
1981
|
-
}
|
|
1982
|
-
}
|
|
1983
|
-
},
|
|
1984
|
-
{
|
|
1985
|
-
"name": "length",
|
|
1986
|
-
"type": {
|
|
1987
|
-
"kind": "integer",
|
|
1988
|
-
"sign": "unsigned",
|
|
1989
|
-
"width": 32
|
|
1990
|
-
}
|
|
1991
|
-
}
|
|
1992
|
-
]
|
|
1993
|
-
}
|
|
1994
|
-
},
|
|
1995
|
-
{
|
|
1996
|
-
"name": "l2_to_l1_msgs",
|
|
1997
|
-
"type": {
|
|
1998
|
-
"kind": "struct",
|
|
1999
|
-
"path": "aztec::protocol_types::utils::arrays::claimed_length_array::ClaimedLengthArray",
|
|
2000
|
-
"fields": [
|
|
2001
|
-
{
|
|
2002
|
-
"name": "array",
|
|
2003
|
-
"type": {
|
|
2004
|
-
"kind": "array",
|
|
2005
|
-
"length": 8,
|
|
2006
|
-
"type": {
|
|
2007
|
-
"kind": "struct",
|
|
2008
|
-
"path": "aztec::protocol_types::side_effect::counted::Counted",
|
|
2009
|
-
"fields": [
|
|
2010
|
-
{
|
|
2011
|
-
"name": "inner",
|
|
2012
|
-
"type": {
|
|
2013
|
-
"kind": "struct",
|
|
2014
|
-
"path": "aztec::protocol_types::messaging::l2_to_l1_message::L2ToL1Message",
|
|
2015
|
-
"fields": [
|
|
2016
|
-
{
|
|
2017
|
-
"name": "recipient",
|
|
2018
|
-
"type": {
|
|
2019
|
-
"kind": "struct",
|
|
2020
|
-
"path": "aztec::protocol_types::address::eth_address::EthAddress",
|
|
2021
|
-
"fields": [
|
|
2022
|
-
{
|
|
2023
|
-
"name": "inner",
|
|
2024
|
-
"type": {
|
|
2025
|
-
"kind": "field"
|
|
2026
|
-
}
|
|
2027
|
-
}
|
|
2028
|
-
]
|
|
2029
|
-
}
|
|
2030
|
-
},
|
|
2031
|
-
{
|
|
2032
|
-
"name": "content",
|
|
2033
|
-
"type": {
|
|
2034
|
-
"kind": "field"
|
|
2035
|
-
}
|
|
2036
|
-
}
|
|
2037
|
-
]
|
|
2038
|
-
}
|
|
2039
|
-
},
|
|
2040
|
-
{
|
|
2041
|
-
"name": "counter",
|
|
2042
|
-
"type": {
|
|
2043
|
-
"kind": "integer",
|
|
2044
|
-
"sign": "unsigned",
|
|
2045
|
-
"width": 32
|
|
2046
|
-
}
|
|
2047
|
-
}
|
|
2048
|
-
]
|
|
2049
|
-
}
|
|
2050
|
-
}
|
|
2051
|
-
},
|
|
2052
|
-
{
|
|
2053
|
-
"name": "length",
|
|
2054
|
-
"type": {
|
|
2055
|
-
"kind": "integer",
|
|
2056
|
-
"sign": "unsigned",
|
|
2057
|
-
"width": 32
|
|
2058
|
-
}
|
|
2059
|
-
}
|
|
2060
|
-
]
|
|
2061
|
-
}
|
|
2062
|
-
},
|
|
2063
|
-
{
|
|
2064
|
-
"name": "private_logs",
|
|
2065
|
-
"type": {
|
|
2066
|
-
"kind": "struct",
|
|
2067
|
-
"path": "aztec::protocol_types::utils::arrays::claimed_length_array::ClaimedLengthArray",
|
|
2068
|
-
"fields": [
|
|
2069
|
-
{
|
|
2070
|
-
"name": "array",
|
|
2071
|
-
"type": {
|
|
2072
|
-
"kind": "array",
|
|
2073
|
-
"length": 16,
|
|
2074
|
-
"type": {
|
|
2075
|
-
"kind": "struct",
|
|
2076
|
-
"path": "aztec::protocol_types::side_effect::counted::Counted",
|
|
2077
|
-
"fields": [
|
|
2078
|
-
{
|
|
2079
|
-
"name": "inner",
|
|
2080
|
-
"type": {
|
|
2081
|
-
"kind": "struct",
|
|
2082
|
-
"path": "aztec::protocol_types::abis::private_log::PrivateLogData",
|
|
2083
|
-
"fields": [
|
|
2084
|
-
{
|
|
2085
|
-
"name": "log",
|
|
2086
|
-
"type": {
|
|
2087
|
-
"kind": "struct",
|
|
2088
|
-
"path": "aztec::protocol_types::abis::log::Log",
|
|
2089
|
-
"fields": [
|
|
2090
|
-
{
|
|
2091
|
-
"name": "fields",
|
|
2092
|
-
"type": {
|
|
2093
|
-
"kind": "array",
|
|
2094
|
-
"length": 18,
|
|
2095
|
-
"type": {
|
|
2096
|
-
"kind": "field"
|
|
2097
|
-
}
|
|
2098
|
-
}
|
|
2099
|
-
},
|
|
2100
|
-
{
|
|
2101
|
-
"name": "length",
|
|
2102
|
-
"type": {
|
|
2103
|
-
"kind": "integer",
|
|
2104
|
-
"sign": "unsigned",
|
|
2105
|
-
"width": 32
|
|
2106
|
-
}
|
|
2107
|
-
}
|
|
2108
|
-
]
|
|
2109
|
-
}
|
|
2110
|
-
},
|
|
2111
|
-
{
|
|
2112
|
-
"name": "note_hash_counter",
|
|
2113
|
-
"type": {
|
|
2114
|
-
"kind": "integer",
|
|
2115
|
-
"sign": "unsigned",
|
|
2116
|
-
"width": 32
|
|
2117
|
-
}
|
|
2118
|
-
}
|
|
2119
|
-
]
|
|
2120
|
-
}
|
|
2121
|
-
},
|
|
2122
|
-
{
|
|
2123
|
-
"name": "counter",
|
|
2124
|
-
"type": {
|
|
2125
|
-
"kind": "integer",
|
|
2126
|
-
"sign": "unsigned",
|
|
2127
|
-
"width": 32
|
|
2128
|
-
}
|
|
2129
|
-
}
|
|
2130
|
-
]
|
|
2131
|
-
}
|
|
2132
|
-
}
|
|
2133
|
-
},
|
|
2134
|
-
{
|
|
2135
|
-
"name": "length",
|
|
2136
|
-
"type": {
|
|
2137
|
-
"kind": "integer",
|
|
2138
|
-
"sign": "unsigned",
|
|
2139
|
-
"width": 32
|
|
2140
|
-
}
|
|
2141
|
-
}
|
|
2142
|
-
]
|
|
2143
|
-
}
|
|
2144
|
-
},
|
|
2145
|
-
{
|
|
2146
|
-
"name": "contract_class_logs_hashes",
|
|
2147
|
-
"type": {
|
|
2148
|
-
"kind": "struct",
|
|
2149
|
-
"path": "aztec::protocol_types::utils::arrays::claimed_length_array::ClaimedLengthArray",
|
|
2150
|
-
"fields": [
|
|
2151
|
-
{
|
|
2152
|
-
"name": "array",
|
|
2153
|
-
"type": {
|
|
2154
|
-
"kind": "array",
|
|
2155
|
-
"length": 1,
|
|
2156
|
-
"type": {
|
|
2157
|
-
"kind": "struct",
|
|
2158
|
-
"path": "aztec::protocol_types::side_effect::counted::Counted",
|
|
2159
|
-
"fields": [
|
|
2160
|
-
{
|
|
2161
|
-
"name": "inner",
|
|
2162
|
-
"type": {
|
|
2163
|
-
"kind": "struct",
|
|
2164
|
-
"path": "aztec::protocol_types::abis::log_hash::LogHash",
|
|
2165
|
-
"fields": [
|
|
2166
|
-
{
|
|
2167
|
-
"name": "value",
|
|
2168
|
-
"type": {
|
|
2169
|
-
"kind": "field"
|
|
2170
|
-
}
|
|
2171
|
-
},
|
|
2172
|
-
{
|
|
2173
|
-
"name": "length",
|
|
2174
|
-
"type": {
|
|
2175
|
-
"kind": "integer",
|
|
2176
|
-
"sign": "unsigned",
|
|
2177
|
-
"width": 32
|
|
2178
|
-
}
|
|
2179
|
-
}
|
|
2180
|
-
]
|
|
2181
|
-
}
|
|
2182
|
-
},
|
|
2183
|
-
{
|
|
2184
|
-
"name": "counter",
|
|
2185
|
-
"type": {
|
|
2186
|
-
"kind": "integer",
|
|
2187
|
-
"sign": "unsigned",
|
|
2188
|
-
"width": 32
|
|
2189
|
-
}
|
|
2190
|
-
}
|
|
2191
|
-
]
|
|
2192
|
-
}
|
|
2193
|
-
}
|
|
2194
|
-
},
|
|
2195
|
-
{
|
|
2196
|
-
"name": "length",
|
|
2197
|
-
"type": {
|
|
2198
|
-
"kind": "integer",
|
|
2199
|
-
"sign": "unsigned",
|
|
2200
|
-
"width": 32
|
|
2201
|
-
}
|
|
2202
|
-
}
|
|
2203
|
-
]
|
|
2204
|
-
}
|
|
2205
|
-
}
|
|
2206
|
-
]
|
|
2207
|
-
},
|
|
2208
|
-
"visibility": "databus"
|
|
2209
|
-
},
|
|
2210
|
-
"error_types": {
|
|
2211
|
-
"7555607922535724711": {
|
|
2212
|
-
"error_kind": "string",
|
|
2213
|
-
"string": "Preimage mismatch"
|
|
2214
|
-
},
|
|
2215
|
-
"9894212961085021188": {
|
|
2216
|
-
"error_kind": "string",
|
|
2217
|
-
"string": "Message not authorized by account"
|
|
2218
|
-
},
|
|
2219
|
-
"14990209321349310352": {
|
|
2220
|
-
"error_kind": "string",
|
|
2221
|
-
"string": "attempt to add with overflow"
|
|
2222
|
-
},
|
|
2223
|
-
"15764276373176857197": {
|
|
2224
|
-
"error_kind": "string",
|
|
2225
|
-
"string": "Stack too deep"
|
|
2226
|
-
}
|
|
2227
|
-
}
|
|
2228
|
-
},
|
|
2229
|
-
"bytecode": "H4sIAAAAAAAA/+2dZ2BU1daGWWuFXqQjCop0REDA3qgJhC7NbgxhgGhI4iRBsMfeTQLYO1URRUQUBGxgY79SbICAYkPE3rvfgbRJP5Pkxe/eK384zJzzrH12L8mDZWXevjQlkBoTm5Y6KSkYf2FgfExyMH5KbGoAtnurvZq+qG9CbNx5fZOmRqUlxvWLTUhInzOyz7ABkVnp806JT00MpKRoKx83mfi4qYEfUqPePm5q6i73cVczX3e18JOqln5uOsjPTQf7uamVr5Qf4uuu1r7uauPrrrZ+Et9B0hf0DcYnJMRP3PP9jCoZGdMzMla3qlL6H0l/pE9KSiCYenogmDQ9IzNrdavDxw8L7uj+QKdnR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g5XmKtzsHW4GA5PmGtxcHW5mDrcLB1Odh64WJ9OSHUn92Xs/+k9Tnv1MDXO3H2grUhB8txACvHAawcB7ByHMDKcQArxwGsHAewchzAynEAK8cBrBwHsHIcwMpxACvHAawcB7ByHMDKcQArxwGsHAewchzAynEAK8cBrBwHsHIcwMpxACvHAawcB7ByHMDKcQArxwGsHAew9uBgOQ5g5TiAleMAVo4DWDkOYOU4gJXjAFaOA1g5DmDlOICV4wBWjgNYe1FOYZXjAFaOA1g5DmDlOICV4wBWjgNYOQ5g5TiAdSAHG83BDuJgB3OwQzjYoRwsx6WrHJeucly6ynHp6kgOluPSVY5LVzkuXeW4dJXj0lWOS1c5Ll3luHSV49JVjktXOS5d5bh0lePSVY5LVzkuXeW4dJXj0lWOS1c5Ll3luHSV49JVjktXOS5d5bh0lePSVY5LVzkuXeW4dJXj0lWOS1c5Ll0NcrAcl65yXLrKcekqx6WrHJeucly6ynHpKselqxyXrnJcuspx6SrHpascl65yXLrKcekqx6WrHJeucly6ynHpKselqxyXrnJcuspx6SrHpascl65yXLrKcekqx6WrHJeucly6ynHpahYHy3HpKselqxyXrnJcuspx6SrHpascl65yXLrKcekqx6WrHJeucly6ynHpKselqxyXrnJcuspx6SrHpascl65yXLrKcekqx6WrHJeucly6ynHpKselqxyXrnJcuspx6SrHpascl64u5mA5Ll3luHSV49JVjktXOS5d5bh0lePSVY5LVzkuXeW4dJXj0lWOS1c5Ll3luHSV49JVjktXOS5d5bh0lePSVY5LVzkuXeW4dJXj0lWOS1c5Ll3luHSV49JVjktXOS5d5bh0leRP2MjBcly6ynHpKselqxyXrnJcuspx6SrJZcJx6SrHpascl65yXLrKcekqx6WrHJeucly6ynHpKselqxyXrnJcuspx6SrHpascl67u4mA5Ll3luHSV49JVjktXOS5d5bh0lePSVY5LV7/jYDkuXeW4dJXj0lWOS1c5Ll3luHSV49JVjktXOS5d5bh0lePSVY5LVzkuXeO4dI3j0jWOS9c4Ll3juHSN49I1jkvXOC5d47h0jePSNY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AAAAAAAAAAAAAAAAAAAEPQY7Ewrfs3NCr0XQFVoAAAAAAAAAAAAAAAAAAACTMJUq50xXPRaG2ctKAHM4VAAAAAAAAAAAAAAAAAAAAAAAJhUixAiTMGRq/5ZzYZSUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8Nepy2QSHpGlFy04xXKoQvAAAAAAAAAAAAAAAAAAAAAAAIBUDyc7cmkIyuSdOzhhSAAAAAAAAAAAAAAAAAAAAizF7fkfZyV2l2FKAjszlMDsAAAAAAAAAAAAAAAAAAAAAAChZUIoJ+qgZ7katlCyP8AAAAAAAAAAAAAAAAAAAAGvMegX/lalrKJQkxfczZw2WAAAAAAAAAAAAAAAAAAAAAAAAxDcm91tv2g3iLODg36sAAAAAAAAAAAAAAAAAAAAdCgnXF47JO614WPluZPC0jQAAAAAAAAAAAAAAAAAAAAAAL5tuC04sAZaN5cMkgqp9AAAAAAAAAAAAAAAAAAAAFLmaKhz1vbFNGPy31tW7G0MAAAAAAAAAAAAAAAAAAAAAABibwBFKqYLGRXSxHbsAPgAAAAAAAAAAAAAAAAAAAIFYESpGMQpiuEn23VYsLIaUAAAAAAAAAAAAAAAAAAAAAAASkF6WwsjbCGXWk491oyQ="
|
|
2232
|
-
},
|
|
2233
|
-
{
|
|
2234
|
-
"name": "set_reject_all",
|
|
2235
|
-
"is_unconstrained": true,
|
|
2236
|
-
"custom_attributes": [
|
|
2237
|
-
"abi_public"
|
|
2238
|
-
],
|
|
2239
|
-
"abi": {
|
|
2240
|
-
"parameters": [
|
|
2241
|
-
{
|
|
2242
|
-
"name": "reject",
|
|
2243
|
-
"type": {
|
|
2244
|
-
"kind": "boolean"
|
|
2245
|
-
},
|
|
2246
|
-
"visibility": "private"
|
|
2247
|
-
}
|
|
2248
|
-
],
|
|
2249
|
-
"return_type": null,
|
|
2250
|
-
"error_types": {
|
|
2251
|
-
"13455385521185560676": {
|
|
2252
|
-
"error_kind": "string",
|
|
2253
|
-
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
2254
|
-
},
|
|
2255
|
-
"15764276373176857197": {
|
|
2256
|
-
"error_kind": "string",
|
|
2257
|
-
"string": "Stack too deep"
|
|
2258
|
-
}
|
|
2259
|
-
}
|
|
2260
|
-
},
|
|
2261
|
-
"bytecode": "JwACBAEoAAABBIBFJwAABEUlAAAARicCAgQBJwIDBAAfCgACAAMARBwAREQBLQhEASUAAABHJwIBBEUnAgIEADsOAAIAASYlAAABGh4CAAIBKQIAAwBB7PpLJwIEAAErAgAFAAAAAAAAAAADAAAAAAAAAAAtCAEGJwIHBAUACAEHAScDBgQBACIGAgctCgcILQ4DCAAiCAIILQ4ECAAiCAIILQ4CCAAiCAIILQ4FCC0LBgIAIgICAi0OAgYtCAECJwIDBAUACAEDAScDAgQBACIGAgMAIgICBD8PAAMABCcCAwQBACoCAwUtCwUEJwICAAAKKgQCAycCAgEACioDAgUkAgAFAAABDiUAAAFAHAoBAgAwCgACAAQmKAAABAR4RQwAAAQDJAAAAwAAAT8qAQABBdrF9da0SjJtPAQCASYqAQABBbq7IdeCMxhkPAQCASY=",
|
|
2262
|
-
"debug_symbols": "nZXbjqMwDIbfJddcxM65rzKqKtrSERKiFVNWWlW8+5oSB1gp0cxwwe8Y8uHYDnmJa3MeP09tf7t/icPHS5yHtuvaz1N3v9TP9t6T9yXkfHNWHLASHsQhVCLIRcxbAOyiKKNGv4pjFcc6jrWO6hc1Kqpb1GLUyHUQNXJcWNRHjicOABkB2XCLgRLZYA+wB9iD9HnA2fDRUOxR8zuaDI1ssMewx7DHmmg4Wif42SAPwjRVgjN6eg5NMyd0k2JK/KMemv4pDv3YdZX4U3fj+6WvR92/9VkP9FRWoumvpAS8tV0zW1O1zpb5qUoGFWcrkDYBDOwIUCDowACr03yH34/AAQNkwFwEKk8A1CYSAINJBK93BJ0noOcUquDTfA1mBzCFEOhKMZC5LkN5t4PYAkR6w8UAGaTMQlwhnQbTUlwCYNgDfCEXtG0iASHYXyHWgtDeUVkEFNpC+5RQ7Tf5hPDdKFQIa1U3Zf0/ilJnQeDmpp+WzXUWFBDGc0ntpqDe/mZ7AKjsBi02p1x7U0EuCCi3ptKpNb1eN7rZ1wMKrWlSRQ1udpnCH4ThglvDoF7IhRFKEGMxQSz4HARLZbGO86EcmN1/70ij+tIOu+NymllDW5+7Jg5vY3/ZPH3+ffATPm4fw/3SXMehmUnrmQt0/zC6MuE4H7I0sLKyeJzmT/8D"
|
|
2263
|
-
},
|
|
2264
|
-
{
|
|
2265
|
-
"name": "utility_is_consumable",
|
|
2266
|
-
"is_unconstrained": true,
|
|
2267
|
-
"custom_attributes": [
|
|
2268
|
-
"abi_utility"
|
|
2269
|
-
],
|
|
2270
|
-
"abi": {
|
|
2271
|
-
"parameters": [
|
|
2272
|
-
{
|
|
2273
|
-
"name": "on_behalf_of",
|
|
2274
|
-
"type": {
|
|
2275
|
-
"kind": "struct",
|
|
2276
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress",
|
|
2277
|
-
"fields": [
|
|
2278
|
-
{
|
|
2279
|
-
"name": "inner",
|
|
2280
|
-
"type": {
|
|
2281
|
-
"kind": "field"
|
|
2282
|
-
}
|
|
2283
|
-
}
|
|
2284
|
-
]
|
|
2285
|
-
},
|
|
2286
|
-
"visibility": "private"
|
|
2287
|
-
},
|
|
2288
|
-
{
|
|
2289
|
-
"name": "message_hash",
|
|
2290
|
-
"type": {
|
|
2291
|
-
"kind": "field"
|
|
2292
|
-
},
|
|
2293
|
-
"visibility": "private"
|
|
2294
|
-
}
|
|
2295
|
-
],
|
|
2296
|
-
"return_type": {
|
|
2297
|
-
"abi_type": {
|
|
2298
|
-
"kind": "boolean"
|
|
2299
|
-
},
|
|
2300
|
-
"visibility": "public"
|
|
2301
|
-
},
|
|
2302
|
-
"error_types": {
|
|
2303
|
-
"361444214588792908": {
|
|
2304
|
-
"error_kind": "string",
|
|
2305
|
-
"string": "attempt to multiply with overflow"
|
|
2306
|
-
},
|
|
2307
|
-
"1998584279744703196": {
|
|
2308
|
-
"error_kind": "string",
|
|
2309
|
-
"string": "attempt to subtract with overflow"
|
|
2310
|
-
},
|
|
2311
|
-
"13455385521185560676": {
|
|
2312
|
-
"error_kind": "string",
|
|
2313
|
-
"string": "Storage slot 0 not allowed. Storage slots must start from 1."
|
|
2314
|
-
},
|
|
2315
|
-
"14990209321349310352": {
|
|
2316
|
-
"error_kind": "string",
|
|
2317
|
-
"string": "attempt to add with overflow"
|
|
2318
|
-
},
|
|
2319
|
-
"15764276373176857197": {
|
|
2320
|
-
"error_kind": "string",
|
|
2321
|
-
"string": "Stack too deep"
|
|
2322
|
-
},
|
|
2323
|
-
"16431471497789672479": {
|
|
2324
|
-
"error_kind": "string",
|
|
2325
|
-
"string": "Index out of bounds"
|
|
2326
|
-
}
|
|
2327
|
-
}
|
|
2328
|
-
},
|
|
2329
|
-
"bytecode": "H4sIAAAAAAAA/+1cT2wcVxnf+f9v7TRJazusHQepICEhVXVQxQ0ldtKsa5MoaTghlU12MCvWu2Z3HcWCAwsHLiDtOqkQ4kTtmKASqFAqoQIHJOgFFhUkWrXKpVJPbY+tKvXU2Xpn5pv35ntv3uyMnEjOabNv3u97873vz+9931sr2/1fvrrZqdVrna0Xau0Xrjcb7c31yrW6K/e7L59t1er12tpipV6/Xdju7l2pNdbq7q1ef/sfpwrsf1KB+0hBDFDiA/aHiOsb3uJv9Xp8xO2C1OvLnvB4DTyQF7p3Fr3/dm5195ZqLfd6R+7+ttzouGtua+fq6QW+BHK+JDT/x6vk/IKY/NXu7nDv+pMBzt3Lbr3Sqd1wFTEkmUZQxRAK3d8P11KtdCqLzY2t4JWW4ZoA+M5q88Z2+IUUPk+MyP7Ic6O3nRo9Mfp6B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x1HHdsK1XyWEgw72fkgJb+/HQUfLim2rh2Pz0d6zRndc1D6vHbI68Ysnf3vdtO2PWP+gG3Wr8ev+UFbVTwnYYUXDXvUjq5Na/VF8kfWvy6dV/eUvVoruCkRXK1rFp+HiPGlvaa8dZfl+x6vZ9ivnixP2+r4kdfV+B6tRA+8adHVXKtHvnrprWJfUZSupL+6er+phXWxM2U7Gy6Lp1WQu0zT6AU+XRcKfPcZr3hwHH5/RSx6KdPCREz1BmuOEsRx1xFTdkfWgg9Udi8fWfzj8eI0a3j6Www6/ZFCscsxB29pSLEcdYXPUN4/lsGN7Y0R08Vr3taPom4+kdVWcw1YVH6vMc3UD71XmyyLSVyTWyLszsVKU7cVEpXpIcWM5fEI1fEIxvFLk4MnafqN6TLHle5ZwSMEhbhdgOaa4rag/oaY/oaQ/oaJfKnyDk8RDG/zWO8FSIb4iogd7cdut4oRLxfpOsb1pKvmg4qZryQm3krj6fdKNZ8D6VrKV41WPjeS2i80JNegJJegJFegJBegJ9ecJ5ecJ1ecJxecJtecJpecJlecJhecJdecJZWekg3Xnh/bV/efHl6s/TvltrpfH+09PD/PLrz+fP19898f/v+M7+OOW7y/fPj98+fnyYKbtL1zaP39xez3BuX6wPxxoX6b2ujVxsi+jfbcd2Mzlw2/rzL8="
|
|
2331
|
-
}
|
|
2332
|
-
],
|
|
2333
|
-
"outputs": {
|
|
2334
|
-
"globals": {},
|
|
2335
|
-
"structs": {
|
|
2336
|
-
"functions": [
|
|
2337
|
-
{
|
|
2338
|
-
"fields": [
|
|
2339
|
-
{
|
|
2340
|
-
"name": "parameters",
|
|
2341
|
-
"type": {
|
|
2342
|
-
"fields": [
|
|
2343
|
-
{
|
|
2344
|
-
"name": "_approver",
|
|
2345
|
-
"type": {
|
|
2346
|
-
"fields": [
|
|
2347
|
-
{
|
|
2348
|
-
"name": "inner",
|
|
2349
|
-
"type": {
|
|
2350
|
-
"kind": "field"
|
|
2351
|
-
}
|
|
2352
|
-
}
|
|
2353
|
-
],
|
|
2354
|
-
"kind": "struct",
|
|
2355
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
2356
|
-
}
|
|
2357
|
-
},
|
|
2358
|
-
{
|
|
2359
|
-
"name": "_message_hash",
|
|
2360
|
-
"type": {
|
|
2361
|
-
"kind": "field"
|
|
2362
|
-
}
|
|
2363
|
-
},
|
|
2364
|
-
{
|
|
2365
|
-
"name": "_authorize",
|
|
2366
|
-
"type": {
|
|
2367
|
-
"kind": "boolean"
|
|
2368
|
-
}
|
|
2369
|
-
}
|
|
2370
|
-
],
|
|
2371
|
-
"kind": "struct",
|
|
2372
|
-
"path": "AuthRegistry::_set_authorized_parameters"
|
|
2373
|
-
}
|
|
2374
|
-
}
|
|
2375
|
-
],
|
|
2376
|
-
"kind": "struct",
|
|
2377
|
-
"path": "AuthRegistry::_set_authorized_abi"
|
|
2378
|
-
},
|
|
2379
|
-
{
|
|
2380
|
-
"fields": [
|
|
2381
|
-
{
|
|
2382
|
-
"name": "parameters",
|
|
2383
|
-
"type": {
|
|
2384
|
-
"fields": [
|
|
2385
|
-
{
|
|
2386
|
-
"name": "_on_behalf_of",
|
|
2387
|
-
"type": {
|
|
2388
|
-
"fields": [
|
|
2389
|
-
{
|
|
2390
|
-
"name": "inner",
|
|
2391
|
-
"type": {
|
|
2392
|
-
"kind": "field"
|
|
2393
|
-
}
|
|
2394
|
-
}
|
|
2395
|
-
],
|
|
2396
|
-
"kind": "struct",
|
|
2397
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
2398
|
-
}
|
|
2399
|
-
},
|
|
2400
|
-
{
|
|
2401
|
-
"name": "_inner_hash",
|
|
2402
|
-
"type": {
|
|
2403
|
-
"kind": "field"
|
|
2404
|
-
}
|
|
2405
|
-
}
|
|
2406
|
-
],
|
|
2407
|
-
"kind": "struct",
|
|
2408
|
-
"path": "AuthRegistry::consume_parameters"
|
|
2409
|
-
}
|
|
2410
|
-
},
|
|
2411
|
-
{
|
|
2412
|
-
"name": "return_type",
|
|
2413
|
-
"type": {
|
|
2414
|
-
"kind": "field"
|
|
2415
|
-
}
|
|
2416
|
-
}
|
|
2417
|
-
],
|
|
2418
|
-
"kind": "struct",
|
|
2419
|
-
"path": "AuthRegistry::consume_abi"
|
|
2420
|
-
},
|
|
2421
|
-
{
|
|
2422
|
-
"fields": [
|
|
2423
|
-
{
|
|
2424
|
-
"name": "parameters",
|
|
2425
|
-
"type": {
|
|
2426
|
-
"fields": [
|
|
2427
|
-
{
|
|
2428
|
-
"name": "_on_behalf_of",
|
|
2429
|
-
"type": {
|
|
2430
|
-
"fields": [
|
|
2431
|
-
{
|
|
2432
|
-
"name": "inner",
|
|
2433
|
-
"type": {
|
|
2434
|
-
"kind": "field"
|
|
2435
|
-
}
|
|
2436
|
-
}
|
|
2437
|
-
],
|
|
2438
|
-
"kind": "struct",
|
|
2439
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
2440
|
-
}
|
|
2441
|
-
},
|
|
2442
|
-
{
|
|
2443
|
-
"name": "_message_hash",
|
|
2444
|
-
"type": {
|
|
2445
|
-
"kind": "field"
|
|
2446
|
-
}
|
|
2447
|
-
}
|
|
2448
|
-
],
|
|
2449
|
-
"kind": "struct",
|
|
2450
|
-
"path": "AuthRegistry::is_consumable_parameters"
|
|
2451
|
-
}
|
|
2452
|
-
},
|
|
2453
|
-
{
|
|
2454
|
-
"name": "return_type",
|
|
2455
|
-
"type": {
|
|
2456
|
-
"kind": "boolean"
|
|
2457
|
-
}
|
|
2458
|
-
}
|
|
2459
|
-
],
|
|
2460
|
-
"kind": "struct",
|
|
2461
|
-
"path": "AuthRegistry::is_consumable_abi"
|
|
2462
|
-
},
|
|
2463
|
-
{
|
|
2464
|
-
"fields": [
|
|
2465
|
-
{
|
|
2466
|
-
"name": "parameters",
|
|
2467
|
-
"type": {
|
|
2468
|
-
"fields": [
|
|
2469
|
-
{
|
|
2470
|
-
"name": "_on_behalf_of",
|
|
2471
|
-
"type": {
|
|
2472
|
-
"fields": [
|
|
2473
|
-
{
|
|
2474
|
-
"name": "inner",
|
|
2475
|
-
"type": {
|
|
2476
|
-
"kind": "field"
|
|
2477
|
-
}
|
|
2478
|
-
}
|
|
2479
|
-
],
|
|
2480
|
-
"kind": "struct",
|
|
2481
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
2482
|
-
}
|
|
2483
|
-
}
|
|
2484
|
-
],
|
|
2485
|
-
"kind": "struct",
|
|
2486
|
-
"path": "AuthRegistry::is_reject_all_parameters"
|
|
2487
|
-
}
|
|
2488
|
-
},
|
|
2489
|
-
{
|
|
2490
|
-
"name": "return_type",
|
|
2491
|
-
"type": {
|
|
2492
|
-
"kind": "boolean"
|
|
2493
|
-
}
|
|
2494
|
-
}
|
|
2495
|
-
],
|
|
2496
|
-
"kind": "struct",
|
|
2497
|
-
"path": "AuthRegistry::is_reject_all_abi"
|
|
2498
|
-
},
|
|
2499
|
-
{
|
|
2500
|
-
"fields": [
|
|
2501
|
-
{
|
|
2502
|
-
"name": "parameters",
|
|
2503
|
-
"type": {
|
|
2504
|
-
"fields": [
|
|
2505
|
-
{
|
|
2506
|
-
"name": "_message_hash",
|
|
2507
|
-
"type": {
|
|
2508
|
-
"kind": "field"
|
|
2509
|
-
}
|
|
2510
|
-
},
|
|
2511
|
-
{
|
|
2512
|
-
"name": "_authorize",
|
|
2513
|
-
"type": {
|
|
2514
|
-
"kind": "boolean"
|
|
2515
|
-
}
|
|
2516
|
-
}
|
|
2517
|
-
],
|
|
2518
|
-
"kind": "struct",
|
|
2519
|
-
"path": "AuthRegistry::set_authorized_parameters"
|
|
2520
|
-
}
|
|
2521
|
-
}
|
|
2522
|
-
],
|
|
2523
|
-
"kind": "struct",
|
|
2524
|
-
"path": "AuthRegistry::set_authorized_abi"
|
|
2525
|
-
},
|
|
2526
|
-
{
|
|
2527
|
-
"fields": [
|
|
2528
|
-
{
|
|
2529
|
-
"name": "parameters",
|
|
2530
|
-
"type": {
|
|
2531
|
-
"fields": [
|
|
2532
|
-
{
|
|
2533
|
-
"name": "_approver",
|
|
2534
|
-
"type": {
|
|
2535
|
-
"fields": [
|
|
2536
|
-
{
|
|
2537
|
-
"name": "inner",
|
|
2538
|
-
"type": {
|
|
2539
|
-
"kind": "field"
|
|
2540
|
-
}
|
|
2541
|
-
}
|
|
2542
|
-
],
|
|
2543
|
-
"kind": "struct",
|
|
2544
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
2545
|
-
}
|
|
2546
|
-
},
|
|
2547
|
-
{
|
|
2548
|
-
"name": "_message_hash",
|
|
2549
|
-
"type": {
|
|
2550
|
-
"kind": "field"
|
|
2551
|
-
}
|
|
2552
|
-
},
|
|
2553
|
-
{
|
|
2554
|
-
"name": "_authorize",
|
|
2555
|
-
"type": {
|
|
2556
|
-
"kind": "boolean"
|
|
2557
|
-
}
|
|
2558
|
-
}
|
|
2559
|
-
],
|
|
2560
|
-
"kind": "struct",
|
|
2561
|
-
"path": "AuthRegistry::set_authorized_private_parameters"
|
|
2562
|
-
}
|
|
2563
|
-
}
|
|
2564
|
-
],
|
|
2565
|
-
"kind": "struct",
|
|
2566
|
-
"path": "AuthRegistry::set_authorized_private_abi"
|
|
2567
|
-
},
|
|
2568
|
-
{
|
|
2569
|
-
"fields": [
|
|
2570
|
-
{
|
|
2571
|
-
"name": "parameters",
|
|
2572
|
-
"type": {
|
|
2573
|
-
"fields": [
|
|
2574
|
-
{
|
|
2575
|
-
"name": "_reject",
|
|
2576
|
-
"type": {
|
|
2577
|
-
"kind": "boolean"
|
|
2578
|
-
}
|
|
2579
|
-
}
|
|
2580
|
-
],
|
|
2581
|
-
"kind": "struct",
|
|
2582
|
-
"path": "AuthRegistry::set_reject_all_parameters"
|
|
2583
|
-
}
|
|
2584
|
-
}
|
|
2585
|
-
],
|
|
2586
|
-
"kind": "struct",
|
|
2587
|
-
"path": "AuthRegistry::set_reject_all_abi"
|
|
2588
|
-
},
|
|
2589
|
-
{
|
|
2590
|
-
"fields": [
|
|
2591
|
-
{
|
|
2592
|
-
"name": "parameters",
|
|
2593
|
-
"type": {
|
|
2594
|
-
"fields": [
|
|
2595
|
-
{
|
|
2596
|
-
"name": "_on_behalf_of",
|
|
2597
|
-
"type": {
|
|
2598
|
-
"fields": [
|
|
2599
|
-
{
|
|
2600
|
-
"name": "inner",
|
|
2601
|
-
"type": {
|
|
2602
|
-
"kind": "field"
|
|
2603
|
-
}
|
|
2604
|
-
}
|
|
2605
|
-
],
|
|
2606
|
-
"kind": "struct",
|
|
2607
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
2608
|
-
}
|
|
2609
|
-
},
|
|
2610
|
-
{
|
|
2611
|
-
"name": "_message_hash",
|
|
2612
|
-
"type": {
|
|
2613
|
-
"kind": "field"
|
|
2614
|
-
}
|
|
2615
|
-
}
|
|
2616
|
-
],
|
|
2617
|
-
"kind": "struct",
|
|
2618
|
-
"path": "AuthRegistry::utility_is_consumable_parameters"
|
|
2619
|
-
}
|
|
2620
|
-
},
|
|
2621
|
-
{
|
|
2622
|
-
"name": "return_type",
|
|
2623
|
-
"type": {
|
|
2624
|
-
"kind": "boolean"
|
|
2625
|
-
}
|
|
2626
|
-
}
|
|
2627
|
-
],
|
|
2628
|
-
"kind": "struct",
|
|
2629
|
-
"path": "AuthRegistry::utility_is_consumable_abi"
|
|
2630
|
-
}
|
|
2631
|
-
]
|
|
2632
|
-
}
|
|
2633
|
-
},
|
|
2634
|
-
"file_map": {
|
|
2635
|
-
"0": {
|
|
2636
|
-
"path": "std/aes128.nr",
|
|
2637
|
-
"source": "// docs:start:aes128\n// Given a plaintext as an array of bytes, returns the corresponding aes128 ciphertext (CBC mode). Input padding is performed using PKCS#7, so that the output length is `input.len() + (16 - input.len() % 16)`.\npub fn aes128_encrypt<let N: u32>(\n input: [u8; N],\n iv: [u8; 16],\n key: [u8; 16],\n) -> [u8; N + 16 - N % 16] {\n let padding_length = (16 - N % 16) as u8;\n let mut padded_input: [u8; N + 16 - N % 16] = [0; N + 16 - N % 16];\n for i in 0..N {\n padded_input[i] = input[i];\n }\n for i in N..N + 16 - N % 16 {\n padded_input[i] = padding_length;\n }\n let output = aes128_encrypt_padded_input(padded_input, iv, key);\n output\n}\n\n#[foreign(aes128_encrypt)]\nfn aes128_encrypt_padded_input<let N: u32>(input: [u8; N], iv: [u8; 16], key: [u8; 16]) -> [u8; N] {}\n\n// docs:end:aes128\n"
|
|
2638
|
-
},
|
|
2639
|
-
"19": {
|
|
2640
|
-
"path": "std/hash/mod.nr",
|
|
2641
|
-
"source": "// Exposed only for usage in `std::meta`\npub(crate) mod poseidon2;\n\nuse crate::default::Default;\nuse crate::embedded_curve_ops::{\n EmbeddedCurvePoint, EmbeddedCurveScalar, multi_scalar_mul, multi_scalar_mul_array_return,\n};\nuse crate::meta::derive_via;\n\n#[foreign(sha256_compression)]\n// docs:start:sha256_compression\npub fn sha256_compression(input: [u32; 16], state: [u32; 8]) -> [u32; 8] {}\n// docs:end:sha256_compression\n\n#[foreign(keccakf1600)]\n// docs:start:keccakf1600\npub fn keccakf1600(input: [u64; 25]) -> [u64; 25] {}\n// docs:end:keccakf1600\n\npub mod keccak {\n #[deprecated(\"This function has been moved to std::hash::keccakf1600\")]\n pub fn keccakf1600(input: [u64; 25]) -> [u64; 25] {\n super::keccakf1600(input)\n }\n}\n\n#[foreign(blake2s)]\n// docs:start:blake2s\npub fn blake2s<let N: u32>(input: [u8; N]) -> [u8; 32]\n// docs:end:blake2s\n{}\n\n// docs:start:blake3\npub fn blake3<let N: u32>(input: [u8; N]) -> [u8; 32]\n// docs:end:blake3\n{\n if crate::runtime::is_unconstrained() {\n // Temporary measure while Barretenberg is main proving system.\n // Please open an issue if you're working on another proving system and running into problems due to this.\n crate::static_assert(\n N <= 1024,\n \"Barretenberg cannot prove blake3 hashes with inputs larger than 1024 bytes\",\n );\n }\n __blake3(input)\n}\n\n#[foreign(blake3)]\nfn __blake3<let N: u32>(input: [u8; N]) -> [u8; 32] {}\n\n// docs:start:pedersen_commitment\npub fn pedersen_commitment<let N: u32>(input: [Field; N]) -> EmbeddedCurvePoint {\n // docs:end:pedersen_commitment\n pedersen_commitment_with_separator(input, 0)\n}\n\n#[inline_always]\npub fn pedersen_commitment_with_separator<let N: u32>(\n input: [Field; N],\n separator: u32,\n) -> EmbeddedCurvePoint {\n let mut points = [EmbeddedCurveScalar { lo: 0, hi: 0 }; N];\n for i in 0..N {\n // we use the unsafe version because the multi_scalar_mul will constrain the scalars.\n points[i] = from_field_unsafe(input[i]);\n }\n let generators = derive_generators(\"DEFAULT_DOMAIN_SEPARATOR\".as_bytes(), separator);\n multi_scalar_mul(generators, points)\n}\n\n// docs:start:pedersen_hash\npub fn pedersen_hash<let N: u32>(input: [Field; N]) -> Field\n// docs:end:pedersen_hash\n{\n pedersen_hash_with_separator(input, 0)\n}\n\n#[no_predicates]\npub fn pedersen_hash_with_separator<let N: u32>(input: [Field; N], separator: u32) -> Field {\n let mut scalars: [EmbeddedCurveScalar; N + 1] = [EmbeddedCurveScalar { lo: 0, hi: 0 }; N + 1];\n let mut generators: [EmbeddedCurvePoint; N + 1] =\n [EmbeddedCurvePoint::point_at_infinity(); N + 1];\n let domain_generators: [EmbeddedCurvePoint; N] =\n derive_generators(\"DEFAULT_DOMAIN_SEPARATOR\".as_bytes(), separator);\n\n for i in 0..N {\n scalars[i] = from_field_unsafe(input[i]);\n generators[i] = domain_generators[i];\n }\n scalars[N] = EmbeddedCurveScalar { lo: N as Field, hi: 0 as Field };\n\n let length_generator: [EmbeddedCurvePoint; 1] =\n derive_generators(\"pedersen_hash_length\".as_bytes(), 0);\n generators[N] = length_generator[0];\n multi_scalar_mul_array_return(generators, scalars, true)[0].x\n}\n\n#[field(bn254)]\n#[inline_always]\npub fn derive_generators<let N: u32, let M: u32>(\n domain_separator_bytes: [u8; M],\n starting_index: u32,\n) -> [EmbeddedCurvePoint; N] {\n crate::assert_constant(domain_separator_bytes);\n // TODO(https://github.com/noir-lang/noir/issues/5672): Add back assert_constant on starting_index\n __derive_generators(domain_separator_bytes, starting_index)\n}\n\n#[builtin(derive_pedersen_generators)]\n#[field(bn254)]\nfn __derive_generators<let N: u32, let M: u32>(\n domain_separator_bytes: [u8; M],\n starting_index: u32,\n) -> [EmbeddedCurvePoint; N] {}\n\n#[field(bn254)]\n// Decompose the input 'bn254 scalar' into two 128 bits limbs.\n// It is called 'unsafe' because it does not assert the limbs are 128 bits\n// Assuming the limbs are 128 bits:\n// Assert the decomposition does not overflow the field size.\nfn from_field_unsafe(scalar: Field) -> EmbeddedCurveScalar {\n // Safety: xlo and xhi decomposition is checked below\n let (xlo, xhi) = unsafe { crate::field::bn254::decompose_hint(scalar) };\n // Check that the decomposition is correct\n assert_eq(scalar, xlo + crate::field::bn254::TWO_POW_128 * xhi);\n // Check that the decomposition does not overflow the field size\n let (a, b) = if xhi == crate::field::bn254::PHI {\n (xlo, crate::field::bn254::PLO)\n } else {\n (xhi, crate::field::bn254::PHI)\n };\n crate::field::bn254::assert_lt(a, b);\n\n EmbeddedCurveScalar { lo: xlo, hi: xhi }\n}\n\npub fn poseidon2_permutation<let N: u32>(input: [Field; N], state_len: u32) -> [Field; N] {\n assert_eq(input.len(), state_len);\n poseidon2_permutation_internal(input)\n}\n\n#[foreign(poseidon2_permutation)]\nfn poseidon2_permutation_internal<let N: u32>(input: [Field; N]) -> [Field; N] {}\n\n// Generic hashing support.\n// Partially ported and impacted by rust.\n\n// Hash trait shall be implemented per type.\n#[derive_via(derive_hash)]\npub trait Hash {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher;\n}\n\n// docs:start:derive_hash\ncomptime fn derive_hash(s: TypeDefinition) -> Quoted {\n let name = quote { $crate::hash::Hash };\n let signature = quote { fn hash<H>(_self: Self, _state: &mut H) where H: $crate::hash::Hasher };\n let for_each_field = |name| quote { _self.$name.hash(_state); };\n crate::meta::make_trait_impl(\n s,\n name,\n signature,\n for_each_field,\n quote {},\n |fields| fields,\n )\n}\n// docs:end:derive_hash\n\n// Hasher trait shall be implemented by algorithms to provide hash-agnostic means.\n// TODO: consider making the types generic here ([u8], [Field], etc.)\npub trait Hasher {\n fn finish(self) -> Field;\n\n fn write(&mut self, input: Field);\n}\n\n// BuildHasher is a factory trait, responsible for production of specific Hasher.\npub trait BuildHasher {\n type H: Hasher;\n\n fn build_hasher(self) -> H;\n}\n\npub struct BuildHasherDefault<H>;\n\nimpl<H> BuildHasher for BuildHasherDefault<H>\nwhere\n H: Hasher + Default,\n{\n type H = H;\n\n fn build_hasher(_self: Self) -> H {\n H::default()\n }\n}\n\nimpl<H> Default for BuildHasherDefault<H>\nwhere\n H: Hasher + Default,\n{\n fn default() -> Self {\n BuildHasherDefault {}\n }\n}\n\nimpl Hash for Field {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self);\n }\n}\n\nimpl Hash for u1 {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as Field);\n }\n}\n\nimpl Hash for u8 {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as Field);\n }\n}\n\nimpl Hash for u16 {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as Field);\n }\n}\n\nimpl Hash for u32 {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as Field);\n }\n}\n\nimpl Hash for u64 {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as Field);\n }\n}\n\nimpl Hash for u128 {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as Field);\n }\n}\n\nimpl Hash for i8 {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as u8 as Field);\n }\n}\n\nimpl Hash for i16 {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as u16 as Field);\n }\n}\n\nimpl Hash for i32 {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as u32 as Field);\n }\n}\n\nimpl Hash for i64 {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as u64 as Field);\n }\n}\n\nimpl Hash for bool {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as Field);\n }\n}\n\nimpl Hash for () {\n fn hash<H>(_self: Self, _state: &mut H)\n where\n H: Hasher,\n {}\n}\n\nimpl<T, let N: u32> Hash for [T; N]\nwhere\n T: Hash,\n{\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n for elem in self {\n elem.hash(state);\n }\n }\n}\n\nimpl<T> Hash for [T]\nwhere\n T: Hash,\n{\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n self.len().hash(state);\n for elem in self {\n elem.hash(state);\n }\n }\n}\n\nimpl<A, B> Hash for (A, B)\nwhere\n A: Hash,\n B: Hash,\n{\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n self.0.hash(state);\n self.1.hash(state);\n }\n}\n\nimpl<A, B, C> Hash for (A, B, C)\nwhere\n A: Hash,\n B: Hash,\n C: Hash,\n{\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n self.0.hash(state);\n self.1.hash(state);\n self.2.hash(state);\n }\n}\n\nimpl<A, B, C, D> Hash for (A, B, C, D)\nwhere\n A: Hash,\n B: Hash,\n C: Hash,\n D: Hash,\n{\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n self.0.hash(state);\n self.1.hash(state);\n self.2.hash(state);\n self.3.hash(state);\n }\n}\n\nimpl<A, B, C, D, E> Hash for (A, B, C, D, E)\nwhere\n A: Hash,\n B: Hash,\n C: Hash,\n D: Hash,\n E: Hash,\n{\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n self.0.hash(state);\n self.1.hash(state);\n self.2.hash(state);\n self.3.hash(state);\n self.4.hash(state);\n }\n}\n\n// Some test vectors for Pedersen hash and Pedersen Commitment.\n// They have been generated using the same functions so the tests are for now useless\n// but they will be useful when we switch to Noir implementation.\n#[test]\nfn assert_pedersen() {\n assert_eq(\n pedersen_hash_with_separator([1], 1),\n 0x1b3f4b1a83092a13d8d1a59f7acb62aba15e7002f4440f2275edb99ebbc2305f,\n );\n assert_eq(\n pedersen_commitment_with_separator([1], 1),\n EmbeddedCurvePoint {\n x: 0x054aa86a73cb8a34525e5bbed6e43ba1198e860f5f3950268f71df4591bde402,\n y: 0x209dcfbf2cfb57f9f6046f44d71ac6faf87254afc7407c04eb621a6287cac126,\n is_infinite: false,\n },\n );\n\n assert_eq(\n pedersen_hash_with_separator([1, 2], 2),\n 0x26691c129448e9ace0c66d11f0a16d9014a9e8498ee78f4d69f0083168188255,\n );\n assert_eq(\n pedersen_commitment_with_separator([1, 2], 2),\n EmbeddedCurvePoint {\n x: 0x2e2b3b191e49541fe468ec6877721d445dcaffe41728df0a0eafeb15e87b0753,\n y: 0x2ff4482400ad3a6228be17a2af33e2bcdf41be04795f9782bd96efe7e24f8778,\n is_infinite: false,\n },\n );\n assert_eq(\n pedersen_hash_with_separator([1, 2, 3], 3),\n 0x0bc694b7a1f8d10d2d8987d07433f26bd616a2d351bc79a3c540d85b6206dbe4,\n );\n assert_eq(\n pedersen_commitment_with_separator([1, 2, 3], 3),\n EmbeddedCurvePoint {\n x: 0x1fee4e8cf8d2f527caa2684236b07c4b1bad7342c01b0f75e9a877a71827dc85,\n y: 0x2f9fedb9a090697ab69bf04c8bc15f7385b3e4b68c849c1536e5ae15ff138fd1,\n is_infinite: false,\n },\n );\n assert_eq(\n pedersen_hash_with_separator([1, 2, 3, 4], 4),\n 0xdae10fb32a8408521803905981a2b300d6a35e40e798743e9322b223a5eddc,\n );\n assert_eq(\n pedersen_commitment_with_separator([1, 2, 3, 4], 4),\n EmbeddedCurvePoint {\n x: 0x07ae3e202811e1fca39c2d81eabe6f79183978e6f12be0d3b8eda095b79bdbc9,\n y: 0x0afc6f892593db6fbba60f2da558517e279e0ae04f95758587760ba193145014,\n is_infinite: false,\n },\n );\n assert_eq(\n pedersen_hash_with_separator([1, 2, 3, 4, 5], 5),\n 0xfc375b062c4f4f0150f7100dfb8d9b72a6d28582dd9512390b0497cdad9c22,\n );\n assert_eq(\n pedersen_commitment_with_separator([1, 2, 3, 4, 5], 5),\n EmbeddedCurvePoint {\n x: 0x1754b12bd475a6984a1094b5109eeca9838f4f81ac89c5f0a41dbce53189bb29,\n y: 0x2da030e3cfcdc7ddad80eaf2599df6692cae0717d4e9f7bfbee8d073d5d278f7,\n is_infinite: false,\n },\n );\n assert_eq(\n pedersen_hash_with_separator([1, 2, 3, 4, 5, 6], 6),\n 0x1696ed13dc2730062a98ac9d8f9de0661bb98829c7582f699d0273b18c86a572,\n );\n assert_eq(\n pedersen_commitment_with_separator([1, 2, 3, 4, 5, 6], 6),\n EmbeddedCurvePoint {\n x: 0x190f6c0e97ad83e1e28da22a98aae156da083c5a4100e929b77e750d3106a697,\n y: 0x1f4b60f34ef91221a0b49756fa0705da93311a61af73d37a0c458877706616fb,\n is_infinite: false,\n },\n );\n assert_eq(\n pedersen_hash_with_separator([1, 2, 3, 4, 5, 6, 7], 7),\n 0x128c0ff144fc66b6cb60eeac8a38e23da52992fc427b92397a7dffd71c45ede3,\n );\n assert_eq(\n pedersen_commitment_with_separator([1, 2, 3, 4, 5, 6, 7], 7),\n EmbeddedCurvePoint {\n x: 0x015441e9d29491b06563fac16fc76abf7a9534c715421d0de85d20dbe2965939,\n y: 0x1d2575b0276f4e9087e6e07c2cb75aa1baafad127af4be5918ef8a2ef2fea8fc,\n is_infinite: false,\n },\n );\n assert_eq(\n pedersen_hash_with_separator([1, 2, 3, 4, 5, 6, 7, 8], 8),\n 0x2f960e117482044dfc99d12fece2ef6862fba9242be4846c7c9a3e854325a55c,\n );\n assert_eq(\n pedersen_commitment_with_separator([1, 2, 3, 4, 5, 6, 7, 8], 8),\n EmbeddedCurvePoint {\n x: 0x1657737676968887fceb6dd516382ea13b3a2c557f509811cd86d5d1199bc443,\n y: 0x1f39f0cb569040105fa1e2f156521e8b8e08261e635a2b210bdc94e8d6d65f77,\n is_infinite: false,\n },\n );\n assert_eq(\n pedersen_hash_with_separator([1, 2, 3, 4, 5, 6, 7, 8, 9], 9),\n 0x0c96db0790602dcb166cc4699e2d306c479a76926b81c2cb2aaa92d249ec7be7,\n );\n assert_eq(\n pedersen_commitment_with_separator([1, 2, 3, 4, 5, 6, 7, 8, 9], 9),\n EmbeddedCurvePoint {\n x: 0x0a3ceae42d14914a432aa60ec7fded4af7dad7dd4acdbf2908452675ec67e06d,\n y: 0xfc19761eaaf621ad4aec9a8b2e84a4eceffdba78f60f8b9391b0bd9345a2f2,\n is_infinite: false,\n },\n );\n assert_eq(\n pedersen_hash_with_separator([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 10),\n 0x2cd37505871bc460a62ea1e63c7fe51149df5d0801302cf1cbc48beb8dff7e94,\n );\n assert_eq(\n pedersen_commitment_with_separator([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 10),\n EmbeddedCurvePoint {\n x: 0x2fb3f8b3d41ddde007c8c3c62550f9a9380ee546fcc639ffbb3fd30c8d8de30c,\n y: 0x300783be23c446b11a4c0fabf6c91af148937cea15fcf5fb054abf7f752ee245,\n is_infinite: false,\n },\n );\n}\n"
|
|
2642
|
-
},
|
|
2643
|
-
"230": {
|
|
2644
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/oracle/version.nr",
|
|
2645
|
-
"source": "/// The ORACLE_VERSION constant is used to check that the oracle interface is in sync between PXE and Aztec.nr. We need\n/// to version the oracle interface to ensure that developers get a reasonable error message if they use incompatible\n/// versions of Aztec.nr and PXE. The TypeScript counterpart is in `oracle_version.ts`.\n///\n/// @dev Whenever a contract function or Noir test is run, the `utilityAssertCompatibleOracleVersion` oracle is called\n/// and if the oracle version is incompatible an error is thrown.\npub global ORACLE_VERSION: Field = 10;\n\n/// Asserts that the version of the oracle is compatible with the version expected by the contract.\npub fn assert_compatible_oracle_version() {\n // Safety: This oracle call returns nothing: we only call it to check Aztec.nr and Oracle interface versions are\n // compatible. It is therefore always safe to call.\n unsafe {\n assert_compatible_oracle_version_wrapper();\n }\n}\n\nunconstrained fn assert_compatible_oracle_version_wrapper() {\n assert_compatible_oracle_version_oracle(ORACLE_VERSION);\n}\n\n#[oracle(utilityAssertCompatibleOracleVersion)]\nunconstrained fn assert_compatible_oracle_version_oracle(version: Field) {}\n\nmod test {\n use super::{assert_compatible_oracle_version_oracle, ORACLE_VERSION};\n\n #[test]\n unconstrained fn compatible_oracle_version() {\n assert_compatible_oracle_version_oracle(ORACLE_VERSION);\n }\n\n #[test(should_fail_with = \"Incompatible oracle version. TXE is using version\")]\n unconstrained fn incompatible_oracle_version() {\n let arbitrary_incorrect_version = 318183437;\n assert_compatible_oracle_version_oracle(arbitrary_incorrect_version);\n }\n}\n"
|
|
2646
|
-
},
|
|
2647
|
-
"297": {
|
|
2648
|
-
"path": "/home/aztec-dev/nargo/github.com/noir-lang/poseidon/v0.2.3/src/poseidon2.nr",
|
|
2649
|
-
"source": "use std::default::Default;\nuse std::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)\n }\n\n pub(crate) 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 self.state[0] += self.cache[0];\n self.state[1] += self.cache[1];\n self.state[2] += self.cache[2];\n self.state = crate::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>(input: [Field; N], in_len: u32) -> Field {\n let two_pow_64 = 18446744073709551616;\n let iv: Field = (in_len as Field) * two_pow_64;\n let mut state = [0; 4];\n state[RATE] = iv;\n\n if std::runtime::is_unconstrained() {\n for i in 0..(in_len / RATE) {\n state[0] += input[i * RATE];\n state[1] += input[i * RATE + 1];\n state[2] += input[i * RATE + 2];\n state = crate::poseidon2_permutation(state, 4);\n }\n\n // handle remaining elements after last full RATE-sized chunk\n let num_extra_fields = in_len % RATE;\n if num_extra_fields != 0 {\n let remainder_start = in_len - num_extra_fields;\n state[0] += input[remainder_start];\n if num_extra_fields > 1 {\n state[1] += input[remainder_start + 1]\n }\n }\n } else {\n let mut states: [[Field; 4]; N / RATE + 1] = [[0; 4]; N / RATE + 1];\n states[0] = state;\n\n // process all full RATE-sized chunks, storing state after each permutation\n for chunk_idx in 0..(N / RATE) {\n for i in 0..RATE {\n state[i] += input[chunk_idx * RATE + i];\n }\n state = crate::poseidon2_permutation(state, 4);\n states[chunk_idx + 1] = state;\n }\n\n // get state at the last full block before in_len\n let first_partially_filled_chunk = in_len / RATE;\n state = states[first_partially_filled_chunk];\n\n // handle remaining elements after last full RATE-sized chunk\n let remainder_start = (in_len / RATE) * RATE;\n for j in 0..RATE {\n let idx = remainder_start + j;\n if idx < in_len {\n state[j] += input[idx];\n }\n }\n }\n\n // always run final permutation unless we just completed a full chunk\n // still need to permute once if in_len is 0\n if (in_len == 0) | (in_len % RATE != 0) {\n state = crate::poseidon2_permutation(state, 4)\n };\n\n state[0]\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"
|
|
2650
|
-
},
|
|
2651
|
-
"3": {
|
|
2652
|
-
"path": "std/array/mod.nr",
|
|
2653
|
-
"source": "use crate::cmp::{Eq, Ord};\nuse crate::convert::From;\nuse crate::runtime::is_unconstrained;\n\nmod check_shuffle;\nmod quicksort;\n\nimpl<T, let N: u32> [T; N] {\n /// Returns the length of this array.\n ///\n /// ```noir\n /// fn len(self) -> Field\n /// ```\n ///\n /// example\n ///\n /// ```noir\n /// fn main() {\n /// let array = [42, 42];\n /// assert(array.len() == 2);\n /// }\n /// ```\n #[builtin(array_len)]\n pub fn len(self) -> u32 {}\n\n /// Returns this array as a vector.\n ///\n /// ```noir\n /// let array = [1, 2];\n /// let vector = array.as_vector();\n /// assert_eq(vector, [1, 2].as_vector());\n /// ```\n #[builtin(as_vector)]\n pub fn as_vector(self) -> [T] {}\n\n /// Returns this array as a vector.\n /// This method is deprecated in favor of `as_vector`.\n ///\n /// ```noir\n /// let array = [1, 2];\n /// let vector = array.as_slice();\n /// assert_eq(vector, [1, 2].as_vector());\n /// ```\n #[builtin(as_vector)]\n #[deprecated(\"This method has been renamed to `as_vector`\")]\n pub fn as_slice(self) -> [T] {}\n\n /// Applies a function to each element of this array, returning a new array containing the mapped elements.\n ///\n /// Example:\n ///\n /// ```rust\n /// let a = [1, 2, 3];\n /// let b = a.map(|a| a * 2);\n /// assert_eq(b, [2, 4, 6]);\n /// ```\n pub fn map<U, Env>(self, f: fn[Env](T) -> U) -> [U; N] {\n let uninitialized = crate::mem::zeroed();\n let mut ret = [uninitialized; N];\n\n for i in 0..self.len() {\n ret[i] = f(self[i]);\n }\n\n ret\n }\n\n /// Applies a function to each element of this array along with its index,\n /// returning a new array containing the mapped elements.\n ///\n /// Example:\n ///\n /// ```rust\n /// let a = [1, 2, 3];\n /// let b = a.mapi(|i, a| i + a * 2);\n /// assert_eq(b, [2, 5, 8]);\n /// ```\n pub fn mapi<U, Env>(self, f: fn[Env](u32, T) -> U) -> [U; N] {\n let uninitialized = crate::mem::zeroed();\n let mut ret = [uninitialized; N];\n\n for i in 0..self.len() {\n ret[i] = f(i, self[i]);\n }\n\n ret\n }\n\n /// Applies a function to each element of this array.\n ///\n /// Example:\n ///\n /// ```rust\n /// let a = [1, 2, 3];\n /// let mut b = [0; 3];\n /// let mut i = 0;\n /// a.for_each(|x| {\n /// b[i] = x;\n /// i += 1;\n /// });\n /// assert_eq(a, b);\n /// ```\n pub fn for_each<Env>(self, f: fn[Env](T) -> ()) {\n for i in 0..self.len() {\n f(self[i]);\n }\n }\n\n /// Applies a function to each element of this array along with its index.\n ///\n /// Example:\n ///\n /// ```rust\n /// let a = [1, 2, 3];\n /// let mut b = [0; 3];\n /// a.for_eachi(|i, x| {\n /// b[i] = x;\n /// });\n /// assert_eq(a, b);\n /// ```\n pub fn for_eachi<Env>(self, f: fn[Env](u32, T) -> ()) {\n for i in 0..self.len() {\n f(i, self[i]);\n }\n }\n\n /// Applies a function to each element of the array, returning the final accumulated value. The first\n /// parameter is the initial value.\n ///\n /// This is a left fold, so the given function will be applied to the accumulator and first element of\n /// the array, then the second, and so on. For a given call the expected result would be equivalent to:\n ///\n /// ```rust\n /// let a1 = [1];\n /// let a2 = [1, 2];\n /// let a3 = [1, 2, 3];\n ///\n /// let f = |a, b| a - b;\n /// a1.fold(10, f); //=> f(10, 1)\n /// a2.fold(10, f); //=> f(f(10, 1), 2)\n /// a3.fold(10, f); //=> f(f(f(10, 1), 2), 3)\n ///\n /// assert_eq(a3.fold(10, f), 10 - 1 - 2 - 3);\n /// ```\n pub fn fold<U, Env>(self, mut accumulator: U, f: fn[Env](U, T) -> U) -> U {\n for elem in self {\n accumulator = f(accumulator, elem);\n }\n accumulator\n }\n\n /// Same as fold, but uses the first element as the starting element.\n ///\n /// Requires the input array to be non-empty.\n ///\n /// Example:\n ///\n /// ```noir\n /// fn main() {\n /// let arr = [1, 2, 3, 4];\n /// let reduced = arr.reduce(|a, b| a + b);\n /// assert(reduced == 10);\n /// }\n /// ```\n pub fn reduce<Env>(self, f: fn[Env](T, T) -> T) -> T {\n let mut accumulator = self[0];\n for i in 1..self.len() {\n accumulator = f(accumulator, self[i]);\n }\n accumulator\n }\n\n /// Returns true if all the elements in this array satisfy the given predicate.\n ///\n /// Example:\n ///\n /// ```noir\n /// fn main() {\n /// let arr = [2, 2, 2, 2, 2];\n /// let all = arr.all(|a| a == 2);\n /// assert(all);\n /// }\n /// ```\n pub fn all<Env>(self, predicate: fn[Env](T) -> bool) -> bool {\n let mut ret = true;\n for elem in self {\n ret &= predicate(elem);\n }\n ret\n }\n\n /// Returns true if any of the elements in this array satisfy the given predicate.\n ///\n /// Example:\n ///\n /// ```noir\n /// fn main() {\n /// let arr = [2, 2, 2, 2, 5];\n /// let any = arr.any(|a| a == 5);\n /// assert(any);\n /// }\n /// ```\n pub fn any<Env>(self, predicate: fn[Env](T) -> bool) -> bool {\n let mut ret = false;\n for elem in self {\n ret |= predicate(elem);\n }\n ret\n }\n\n /// Concatenates this array with another array.\n ///\n /// Example:\n ///\n /// ```noir\n /// fn main() {\n /// let arr1 = [1, 2, 3, 4];\n /// let arr2 = [6, 7, 8, 9, 10, 11];\n /// let concatenated_arr = arr1.concat(arr2);\n /// assert(concatenated_arr == [1, 2, 3, 4, 6, 7, 8, 9, 10, 11]);\n /// }\n /// ```\n pub fn concat<let M: u32>(self, array2: [T; M]) -> [T; N + M] {\n let mut result = [crate::mem::zeroed(); N + M];\n for i in 0..N {\n result[i] = self[i];\n }\n for i in 0..M {\n result[i + N] = array2[i];\n }\n result\n }\n}\n\nimpl<T, let N: u32> [T; N]\nwhere\n T: Ord + Eq,\n{\n /// Returns a new sorted array. The original array remains untouched. Notice that this function will\n /// only work for arrays of fields or integers, not for any arbitrary type. This is because the sorting\n /// logic it uses internally is optimized specifically for these values. If you need a sort function to\n /// sort any type, you should use the [`Self::sort_via`] function.\n ///\n /// Example:\n ///\n /// ```rust\n /// fn main() {\n /// let arr = [42, 32];\n /// let sorted = arr.sort();\n /// assert(sorted == [32, 42]);\n /// }\n /// ```\n pub fn sort(self) -> Self {\n self.sort_via(|a, b| a <= b)\n }\n}\n\nimpl<T, let N: u32> [T; N]\nwhere\n T: Eq,\n{\n /// Returns a new sorted array by sorting it with a custom comparison function.\n /// The original array remains untouched.\n /// The ordering function must return true if the first argument should be sorted to be before the second argument or is equal to the second argument.\n ///\n /// Using this method with an operator like `<` that does not return `true` for equal values will result in an assertion failure for arrays with equal elements.\n ///\n /// Example:\n ///\n /// ```rust\n /// fn main() {\n /// let arr = [42, 32]\n /// let sorted_ascending = arr.sort_via(|a, b| a <= b);\n /// assert(sorted_ascending == [32, 42]); // verifies\n ///\n /// let sorted_descending = arr.sort_via(|a, b| a >= b);\n /// assert(sorted_descending == [32, 42]); // does not verify\n /// }\n /// ```\n pub fn sort_via<Env>(self, ordering: fn[Env](T, T) -> bool) -> Self {\n // Safety: `sorted` array is checked to be:\n // a. a permutation of `input`'s elements\n // b. satisfying the predicate `ordering`\n let sorted = unsafe { quicksort::quicksort(self, ordering) };\n\n if !is_unconstrained() {\n for i in 0..N - 1 {\n assert(\n ordering(sorted[i], sorted[i + 1]),\n \"Array has not been sorted correctly according to `ordering`.\",\n );\n }\n check_shuffle::check_shuffle(self, sorted);\n }\n sorted\n }\n}\n\nimpl<let N: u32> [u8; N] {\n /// Converts a byte array of type `[u8; N]` to a string. Note that this performs no UTF-8 validation -\n /// the given array is interpreted as-is as a string.\n ///\n /// Example:\n ///\n /// ```rust\n /// fn main() {\n /// let hi = [104, 105].as_str_unchecked();\n /// assert_eq(hi, \"hi\");\n /// }\n /// ```\n #[builtin(array_as_str_unchecked)]\n pub fn as_str_unchecked(self) -> str<N> {}\n}\n\nimpl<let N: u32> From<str<N>> for [u8; N] {\n /// Returns an array of the string bytes.\n fn from(s: str<N>) -> Self {\n s.as_bytes()\n }\n}\n\nmod test {\n #[test]\n fn map_empty() {\n assert_eq([].map(|x| x + 1), []);\n }\n\n global arr_with_100_values: [u32; 100] = [\n 42, 123, 87, 93, 48, 80, 50, 5, 104, 84, 70, 47, 119, 66, 71, 121, 3, 29, 42, 118, 2, 54,\n 89, 44, 81, 0, 26, 106, 68, 96, 84, 48, 95, 54, 45, 32, 89, 100, 109, 19, 37, 41, 19, 98,\n 53, 114, 107, 66, 6, 74, 13, 19, 105, 64, 123, 28, 44, 50, 89, 58, 123, 126, 21, 43, 86, 35,\n 21, 62, 82, 0, 108, 120, 72, 72, 62, 80, 12, 71, 70, 86, 116, 73, 38, 15, 127, 81, 30, 8,\n 125, 28, 26, 69, 114, 63, 27, 28, 61, 42, 13, 32,\n ];\n global expected_with_100_values: [u32; 100] = [\n 0, 0, 2, 3, 5, 6, 8, 12, 13, 13, 15, 19, 19, 19, 21, 21, 26, 26, 27, 28, 28, 28, 29, 30, 32,\n 32, 35, 37, 38, 41, 42, 42, 42, 43, 44, 44, 45, 47, 48, 48, 50, 50, 53, 54, 54, 58, 61, 62,\n 62, 63, 64, 66, 66, 68, 69, 70, 70, 71, 71, 72, 72, 73, 74, 80, 80, 81, 81, 82, 84, 84, 86,\n 86, 87, 89, 89, 89, 93, 95, 96, 98, 100, 104, 105, 106, 107, 108, 109, 114, 114, 116, 118,\n 119, 120, 121, 123, 123, 123, 125, 126, 127,\n ];\n fn sort_u32(a: u32, b: u32) -> bool {\n a <= b\n }\n\n #[test]\n fn test_sort() {\n let mut arr: [u32; 7] = [3, 6, 8, 10, 1, 2, 1];\n\n let sorted = arr.sort();\n\n let expected: [u32; 7] = [1, 1, 2, 3, 6, 8, 10];\n assert(sorted == expected);\n }\n\n #[test]\n fn test_sort_100_values() {\n let mut arr: [u32; 100] = [\n 42, 123, 87, 93, 48, 80, 50, 5, 104, 84, 70, 47, 119, 66, 71, 121, 3, 29, 42, 118, 2,\n 54, 89, 44, 81, 0, 26, 106, 68, 96, 84, 48, 95, 54, 45, 32, 89, 100, 109, 19, 37, 41,\n 19, 98, 53, 114, 107, 66, 6, 74, 13, 19, 105, 64, 123, 28, 44, 50, 89, 58, 123, 126, 21,\n 43, 86, 35, 21, 62, 82, 0, 108, 120, 72, 72, 62, 80, 12, 71, 70, 86, 116, 73, 38, 15,\n 127, 81, 30, 8, 125, 28, 26, 69, 114, 63, 27, 28, 61, 42, 13, 32,\n ];\n\n let sorted = arr.sort();\n\n let expected: [u32; 100] = [\n 0, 0, 2, 3, 5, 6, 8, 12, 13, 13, 15, 19, 19, 19, 21, 21, 26, 26, 27, 28, 28, 28, 29, 30,\n 32, 32, 35, 37, 38, 41, 42, 42, 42, 43, 44, 44, 45, 47, 48, 48, 50, 50, 53, 54, 54, 58,\n 61, 62, 62, 63, 64, 66, 66, 68, 69, 70, 70, 71, 71, 72, 72, 73, 74, 80, 80, 81, 81, 82,\n 84, 84, 86, 86, 87, 89, 89, 89, 93, 95, 96, 98, 100, 104, 105, 106, 107, 108, 109, 114,\n 114, 116, 118, 119, 120, 121, 123, 123, 123, 125, 126, 127,\n ];\n assert(sorted == expected);\n }\n\n #[test]\n fn test_sort_100_values_comptime() {\n let sorted = arr_with_100_values.sort();\n assert(sorted == expected_with_100_values);\n }\n\n #[test]\n fn test_sort_via() {\n let mut arr: [u32; 7] = [3, 6, 8, 10, 1, 2, 1];\n\n let sorted = arr.sort_via(sort_u32);\n\n let expected: [u32; 7] = [1, 1, 2, 3, 6, 8, 10];\n assert(sorted == expected);\n }\n\n #[test]\n fn test_sort_via_100_values() {\n let mut arr: [u32; 100] = [\n 42, 123, 87, 93, 48, 80, 50, 5, 104, 84, 70, 47, 119, 66, 71, 121, 3, 29, 42, 118, 2,\n 54, 89, 44, 81, 0, 26, 106, 68, 96, 84, 48, 95, 54, 45, 32, 89, 100, 109, 19, 37, 41,\n 19, 98, 53, 114, 107, 66, 6, 74, 13, 19, 105, 64, 123, 28, 44, 50, 89, 58, 123, 126, 21,\n 43, 86, 35, 21, 62, 82, 0, 108, 120, 72, 72, 62, 80, 12, 71, 70, 86, 116, 73, 38, 15,\n 127, 81, 30, 8, 125, 28, 26, 69, 114, 63, 27, 28, 61, 42, 13, 32,\n ];\n\n let sorted = arr.sort_via(sort_u32);\n\n let expected: [u32; 100] = [\n 0, 0, 2, 3, 5, 6, 8, 12, 13, 13, 15, 19, 19, 19, 21, 21, 26, 26, 27, 28, 28, 28, 29, 30,\n 32, 32, 35, 37, 38, 41, 42, 42, 42, 43, 44, 44, 45, 47, 48, 48, 50, 50, 53, 54, 54, 58,\n 61, 62, 62, 63, 64, 66, 66, 68, 69, 70, 70, 71, 71, 72, 72, 73, 74, 80, 80, 81, 81, 82,\n 84, 84, 86, 86, 87, 89, 89, 89, 93, 95, 96, 98, 100, 104, 105, 106, 107, 108, 109, 114,\n 114, 116, 118, 119, 120, 121, 123, 123, 123, 125, 126, 127,\n ];\n assert(sorted == expected);\n }\n\n #[test]\n fn mapi_empty() {\n assert_eq([].mapi(|i, x| i * x + 1), []);\n }\n\n #[test]\n fn for_each_empty() {\n let empty_array: [Field; 0] = [];\n empty_array.for_each(|_x| assert(false));\n }\n\n #[test]\n fn for_eachi_empty() {\n let empty_array: [Field; 0] = [];\n empty_array.for_eachi(|_i, _x| assert(false));\n }\n\n #[test]\n fn map_example() {\n let a = [1, 2, 3];\n let b = a.map(|a| a * 2);\n assert_eq(b, [2, 4, 6]);\n }\n\n #[test]\n fn mapi_example() {\n let a = [1, 2, 3];\n let b = a.mapi(|i, a| i + a * 2);\n assert_eq(b, [2, 5, 8]);\n }\n\n #[test]\n fn for_each_example() {\n let a = [1, 2, 3];\n let mut b = [0, 0, 0];\n let b_ref = &mut b;\n let mut i = 0;\n let i_ref = &mut i;\n a.for_each(|x| {\n b_ref[*i_ref] = x * 2;\n *i_ref += 1;\n });\n assert_eq(b, [2, 4, 6]);\n assert_eq(i, 3);\n }\n\n #[test]\n fn for_eachi_example() {\n let a = [1, 2, 3];\n let mut b = [0, 0, 0];\n let b_ref = &mut b;\n a.for_eachi(|i, a| { b_ref[i] = i + a * 2; });\n assert_eq(b, [2, 5, 8]);\n }\n\n #[test]\n fn concat() {\n let arr1 = [1, 2, 3, 4];\n let arr2 = [6, 7, 8, 9, 10, 11];\n let concatenated_arr = arr1.concat(arr2);\n assert_eq(concatenated_arr, [1, 2, 3, 4, 6, 7, 8, 9, 10, 11]);\n }\n\n #[test]\n fn concat_zero_length_with_something() {\n let arr1 = [];\n let arr2 = [1];\n let concatenated_arr = arr1.concat(arr2);\n assert_eq(concatenated_arr, [1]);\n }\n\n #[test]\n fn concat_something_with_zero_length() {\n let arr1 = [1];\n let arr2 = [];\n let concatenated_arr = arr1.concat(arr2);\n assert_eq(concatenated_arr, [1]);\n }\n\n #[test]\n fn concat_zero_lengths() {\n let arr1: [Field; 0] = [];\n let arr2: [Field; 0] = [];\n let concatenated_arr = arr1.concat(arr2);\n assert_eq(concatenated_arr, []);\n }\n}\n"
|
|
2654
|
-
},
|
|
2655
|
-
"308": {
|
|
2656
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/abis/block_header.nr",
|
|
2657
|
-
"source": "use crate::{\n abis::{\n append_only_tree_snapshot::AppendOnlyTreeSnapshot, global_variables::GlobalVariables,\n state_reference::StateReference,\n },\n constants::{BLOCK_HEADER_LENGTH, DOM_SEP__BLOCK_HEADER_HASH, GENESIS_BLOCK_HEADER_HASH},\n hash::poseidon2_hash_with_separator,\n traits::{Deserialize, Empty, Hash, Serialize},\n};\nuse std::meta::derive;\n\n// docs:start:block-header\n#[derive(Deserialize, Eq, Serialize)]\npub struct BlockHeader {\n pub last_archive: AppendOnlyTreeSnapshot,\n pub state: StateReference,\n\n // The hash of the sponge blob for this block, which commits to the tx effects added in this block.\n // Note: it may also include tx effects from previous blocks within the same checkpoint.\n // When proving tx effects from this block only, we must refer to the `sponge_blob_hash` in the previous block\n // header to show that the effect was added after the previous block.\n // The previous block header can be validated using a membership proof of the last leaf in `last_archive`.\n pub sponge_blob_hash: Field,\n\n pub global_variables: GlobalVariables,\n pub total_fees: Field,\n pub total_mana_used: Field,\n}\n// docs:end:block-header\n\nimpl Empty for BlockHeader {\n fn empty() -> Self {\n Self {\n last_archive: AppendOnlyTreeSnapshot::empty(),\n state: StateReference::empty(),\n sponge_blob_hash: 0,\n global_variables: GlobalVariables::empty(),\n total_fees: 0,\n total_mana_used: 0,\n }\n }\n}\n\nimpl Hash for BlockHeader {\n fn hash(self) -> Field {\n poseidon2_hash_with_separator(self.serialize(), DOM_SEP__BLOCK_HEADER_HASH)\n }\n}\n\n#[test]\nfn serialization_of_empty() {\n let header = BlockHeader::empty();\n // We use the BLOCK_HEADER_LENGTH constant to ensure that there is a match\n // between the derived trait implementation and the constant.\n let serialized: [Field; BLOCK_HEADER_LENGTH] = header.serialize();\n let deserialized = BlockHeader::deserialize(serialized);\n assert(header.eq(deserialized));\n}\n\n#[test]\nfn hash_of_genesis_block_header() {\n let mut header = BlockHeader::empty();\n // The following values are taken from world_state.test.cpp > WorldStateTest.GetInitialTreeInfoForAllTrees.\n header.state.l1_to_l2_message_tree.root =\n 0x0d582c10ff8115413aa5b70564fdd2f3cefe1f33a1e43a47bc495081e91e73e5;\n header.state.partial.note_hash_tree.root =\n 0x2ac5dda169f6bb3b9ca09bbac34e14c94d1654597db740153a1288d859a8a30a;\n header.state.partial.nullifier_tree.root =\n 0x1ec3788cd1c32e54d889d67fe29e481114f9d4afe9b44b229aa29d8ad528dd31;\n header.state.partial.nullifier_tree.next_available_leaf_index = 128;\n header.state.partial.public_data_tree.root =\n 0x23c08a6b1297210c5e24c76b9a936250a1ce2721576c26ea797c7ec35f9e46a9;\n header.state.partial.public_data_tree.next_available_leaf_index = 128;\n\n let hash = header.hash();\n assert_eq(hash, GENESIS_BLOCK_HEADER_HASH);\n}\n\n#[test]\nfn hash_of_empty_block_header_match_typescript() {\n let header = BlockHeader::empty();\n let hash = header.hash();\n\n // Value from block_header.test.ts \"computes empty hash\" test\n let test_data_empty_hash = 0x2332f3e8426f1e4fbf66323836e2de1916d47eeb53feb7d3d09ee30d001374be;\n assert_eq(hash, test_data_empty_hash);\n}\n"
|
|
2658
|
-
},
|
|
2659
|
-
"387": {
|
|
2660
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/hash.nr",
|
|
2661
|
-
"source": "mod poseidon2_chunks;\n\nuse crate::{\n abis::{\n contract_class_function_leaf_preimage::ContractClassFunctionLeafPreimage,\n function_selector::FunctionSelector,\n note_hash::NoteHash,\n nullifier::Nullifier,\n private_log::{PrivateLog, PrivateLogData},\n transaction::tx_request::TxRequest,\n },\n address::{AztecAddress, EthAddress},\n constants::{\n CONTRACT_CLASS_LOG_SIZE_IN_FIELDS, DOM_SEP__NOTE_HASH_NONCE,\n DOM_SEP__PRIVATE_LOG_FIRST_FIELD, DOM_SEP__SILOED_NOTE_HASH, DOM_SEP__SILOED_NULLIFIER,\n DOM_SEP__UNIQUE_NOTE_HASH, FUNCTION_TREE_HEIGHT, NULL_MSG_SENDER_CONTRACT_ADDRESS,\n TWO_POW_64,\n },\n merkle_tree::root_from_sibling_path,\n messaging::l2_to_l1_message::L2ToL1Message,\n poseidon2::Poseidon2Sponge,\n side_effect::{Counted, Scoped},\n traits::{FromField, Hash, ToField},\n utils::field::{field_from_bytes, field_from_bytes_32_trunc},\n};\n\npub use poseidon2_chunks::poseidon2_absorb_in_chunks_existing_sponge;\nuse poseidon2_chunks::poseidon2_absorb_in_chunks;\nuse std::embedded_curve_ops::EmbeddedCurveScalar;\n\n// TODO: refactor these into their own files: sha256, poseidon2, some protocol-specific hash computations, some merkle computations.\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 DOM_SEP__NOTE_HASH_NONCE,\n )\n}\n\npub fn compute_unique_note_hash(note_nonce: Field, siloed_note_hash: Field) -> Field {\n let inputs = [note_nonce, siloed_note_hash];\n poseidon2_hash_with_separator(inputs, DOM_SEP__UNIQUE_NOTE_HASH)\n}\n\npub fn compute_note_nonce_and_unique_note_hash(\n siloed_note_hash: Field,\n first_nullifier: Field,\n note_index_in_tx: u32,\n) -> Field {\n let note_nonce = compute_note_hash_nonce(first_nullifier, note_index_in_tx);\n compute_unique_note_hash(note_nonce, siloed_note_hash)\n}\n\npub fn compute_siloed_note_hash(contract_address: AztecAddress, note_hash: Field) -> Field {\n poseidon2_hash_with_separator(\n [contract_address.to_field(), note_hash],\n DOM_SEP__SILOED_NOTE_HASH,\n )\n}\n\n/// Computes unique, siloed note hashes from siloed note hashes.\n///\n/// The protocol injects uniqueness into every note_hash, so that every single note_hash in the\n/// tree is unique. This prevents faerie gold attacks, where a malicious sender could create\n/// two identical note_hashes for a recipient (meaning only one would be nullifiable in future).\n///\n/// Most privacy protocols will inject the note's leaf_index (its position in the Note Hashes Tree)\n/// into the note, but this requires the creator of a note to wait until their tx is included in\n/// a block to know the note's final note hash (the unique, siloed note hash), because inserting\n/// leaves into trees is the job of a block producer.\n///\n/// We took a different approach so that the creator of a note will know each note's unique, siloed\n/// note hash before broadcasting their tx to the network.\n/// (There was also a historical requirement relating to \"chained transactions\" -- a feature that\n/// Aztec Connect had to enable notes to be spent from distinct txs earlier in the same block,\n/// and hence before an archive block root had been established for that block -- but that feature\n/// was abandoned for the Aztec Network for having too many bad tradeoffs).\n///\n/// (\n/// Edit: it is no longer true that all final note_hashes will be known by the creator of a tx\n/// before they send it to the network. If a tx makes public function calls, then _revertible_\n/// note_hashes that are created in private will not be made unique in private by the Reset circuit,\n/// but will instead be made unique by the AVM, because the `note_index_in_tx` will not be known\n/// until the AVM has executed the public functions of the tx. (See an explanation in\n/// reset_output_composer.nr for why).\n/// For some such txs, the `note_index_in_tx` might still be predictable through simulation, but\n/// for txs whose public functions create a varying number of non-revertible notes (determined at\n/// runtime), the `note_index_in_tx` will not be deterministically derivable before submitting the\n/// tx to the network.\n/// )\n///\n/// We use the `first_nullifier` of a tx as a seed of uniqueness. We have a guarantee that there will\n/// always be at least one nullifier per tx, because the init circuit will create one if one isn't\n/// created naturally by any functions of the tx. (Search \"protocol_nullifier\").\n/// We combine the `first_nullifier` with the note's index (its position within this tx's new\n/// note_hashes array) (`note_index_in_tx`) to get a truly unique value to inject into a note, which\n/// we call a `note_nonce`.\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 compute_note_nonce_and_unique_note_hash(siloed_note_hash, first_nullifier, note_index_in_tx)\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: Scoped<Counted<NoteHash>>) -> Field {\n if note_hash.contract_address.is_zero() {\n 0\n } else {\n compute_siloed_note_hash(note_hash.contract_address, note_hash.innermost())\n }\n}\n\npub fn compute_siloed_nullifier(contract_address: AztecAddress, nullifier: Field) -> Field {\n poseidon2_hash_with_separator(\n [contract_address.to_field(), nullifier],\n DOM_SEP__SILOED_NULLIFIER,\n )\n}\n\npub fn silo_nullifier(nullifier: Scoped<Counted<Nullifier>>) -> Field {\n let value = nullifier.innermost().value;\n // Q: shouldn't we be checking whether the _whole_ scoped, counted, nullifier struct is empty?\n // A: We don't have to. The init and inner circuits add a contract address only to non-empty nullifiers.\n // So we know we should silo it if the contract address is not empty.\n if nullifier.contract_address.is_zero() {\n // Return `.value` instead of 0, because already-siloed nullifiers also have a zero\n // contract_address field, and we of course want to return that already-siloed nullifier\n // (we just don't want to silo it a second time).\n value\n } else {\n compute_siloed_nullifier(nullifier.contract_address, value)\n }\n}\n\npub fn create_protocol_nullifier(tx_request: TxRequest) -> Scoped<Counted<Nullifier>> {\n // The protocol nullifier is ascribed a special side-effect counter of 1. No other side-effect\n // can have counter 1 (see `validate_as_first_call` for that assertion).\n Nullifier { value: tx_request.hash(), note_hash: 0 }.count(1).scope(\n NULL_MSG_SENDER_CONTRACT_ADDRESS,\n )\n}\n\npub fn compute_siloed_private_log_first_field(\n contract_address: AztecAddress,\n field: Field,\n) -> Field {\n poseidon2_hash_with_separator(\n [contract_address.to_field(), field],\n DOM_SEP__PRIVATE_LOG_FIRST_FIELD,\n )\n}\n\npub fn silo_private_log(private_log: Scoped<Counted<PrivateLogData>>) -> PrivateLog {\n let log = private_log.innermost().log;\n if private_log.contract_address.is_zero() {\n log\n } else {\n let mut fields = log.fields;\n fields[0] = compute_siloed_private_log_first_field(private_log.contract_address, fields[0]);\n PrivateLog::new(fields, log.length)\n }\n}\n\npub fn compute_contract_class_log_hash(log: [Field; CONTRACT_CLASS_LOG_SIZE_IN_FIELDS]) -> Field {\n poseidon2_hash(log)\n}\n\npub fn compute_app_siloed_secret_key(\n master_secret_key: EmbeddedCurveScalar,\n app_address: AztecAddress,\n app_secret_key_domain_separator: Field,\n) -> Field {\n poseidon2_hash_with_separator(\n [master_secret_key.hi, master_secret_key.lo, app_address.to_field()],\n app_secret_key_domain_separator,\n )\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 contract_address_bytes: [u8; 32] = contract_address.to_field().to_be_bytes();\n let recipient_bytes: [u8; 20] = recipient.to_be_bytes();\n let content_bytes: [u8; 32] = content.to_be_bytes();\n let rollup_version_id_bytes: [u8; 32] = rollup_version_id.to_be_bytes();\n let chain_id_bytes: [u8; 32] = chain_id.to_be_bytes();\n\n let mut bytes: [u8; 148] = std::mem::zeroed();\n for i in 0..32 {\n bytes[i] = contract_address_bytes[i];\n bytes[i + 32] = rollup_version_id_bytes[i];\n // 64 - 84 are for recipient.\n bytes[i + 84] = chain_id_bytes[i];\n bytes[i + 116] = content_bytes[i];\n }\n\n for i in 0..20 {\n bytes[64 + i] = recipient_bytes[i];\n }\n\n sha256_to_field(bytes)\n}\n\npub fn silo_l2_to_l1_message(\n msg: Scoped<L2ToL1Message>,\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.inner.recipient,\n msg.inner.content,\n rollup_version_id,\n chain_id,\n )\n }\n}\n\n// TODO: consider a variant that enables domain separation with a u32 (we seem to have standardised u32s for domain separators)\n/// Computes sha256 hash of 2 input fields.\n///\n/// @returns A truncated field (i.e., the first byte is always 0).\npub fn accumulate_sha256(v0: Field, v1: Field) -> Field {\n // Concatenate two fields into 32 x 2 = 64 bytes\n let v0_as_bytes: [u8; 32] = v0.to_be_bytes();\n let v1_as_bytes: [u8; 32] = v1.to_be_bytes();\n let hash_input_flattened = v0_as_bytes.concat(v1_as_bytes);\n\n sha256_to_field(hash_input_flattened)\n}\n\npub fn poseidon2_hash<let N: u32>(inputs: [Field; N]) -> Field {\n poseidon::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 = [separator.to_field()].concat(inputs);\n poseidon2_hash(inputs_with_separator)\n}\n\n/// Computes a Poseidon2 hash over a dynamic-length subarray of the given input.\n/// Only the first `in_len` fields of `input` are absorbed; any remaining fields are ignored.\n/// The caller is responsible for ensuring that the input is padded with zeros if required.\n#[no_predicates]\npub fn poseidon2_hash_subarray<let N: u32>(input: [Field; N], in_len: u32) -> Field {\n let mut sponge = poseidon2_absorb_in_chunks(input, in_len);\n sponge.squeeze()\n}\n\n// NB the below is the same as poseidon::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_in_chunks(input, in_len);\n sponge.squeeze()\n}\n\n// This function is unconstrained because it is intended to be used in unconstrained context only as\n// in constrained contexts it would be too inefficient.\npub unconstrained fn poseidon2_hash_with_separator_bounded_vec<let N: u32, T>(\n inputs: BoundedVec<Field, N>,\n separator: T,\n) -> 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.get(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 = poseidon::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 = poseidon::poseidon2::Poseidon2::hash(input, in_len);\n assert(variable_chunk_hash == variable_len_hash);\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 == 0x3b18c58c739716e76429634a61375c45b3b5cd470c22ab6d3e14cee23dd992);\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 == 0xaab2a5828156782b12a1dc6f336e2bc627eb1b9514b02d511f66296990c050);\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 L2ToL1Message { recipient: EthAddress::from_field(1), content: 2 }.scope(\n AztecAddress::from_field(3),\n ),\n version,\n chainId,\n );\n\n // The following value was generated by `yarn-project/stdlib/src/hash/hash.test.ts`\n let hash_from_typescript = 0x0081edf209e087ad31b3fd24263698723d57190bd1d6e9fe056fc0c0a68ee661;\n\n assert_eq(hash, hash_from_typescript);\n}\n\n#[test]\nunconstrained fn poseidon2_hash_with_separator_bounded_vec_matches_non_bounded_vec_version() {\n let inputs = BoundedVec::<Field, 4>::from_array([1, 2, 3]);\n let separator = 42;\n\n // Hash using bounded vec version\n let bounded_result = poseidon2_hash_with_separator_bounded_vec(inputs, separator);\n\n // Hash using regular version\n let regular_result = poseidon2_hash_with_separator([1, 2, 3], separator);\n\n // Results should match\n assert_eq(bounded_result, regular_result);\n}\n"
|
|
2662
|
-
},
|
|
2663
|
-
"415": {
|
|
2664
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/storage/map.nr",
|
|
2665
|
-
"source": "use crate::{\n constants::DOM_SEP__PUBLIC_STORAGE_MAP_SLOT, hash::poseidon2_hash_with_separator,\n traits::ToField,\n};\n\n// TODO: Move this to src/public_data/storage/map.nr\npub fn derive_storage_slot_in_map<K>(storage_slot: Field, key: K) -> Field\nwhere\n K: ToField,\n{\n poseidon2_hash_with_separator(\n [storage_slot, key.to_field()],\n DOM_SEP__PUBLIC_STORAGE_MAP_SLOT,\n )\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 0x1b2a77ec2627004dee6041ffce459c39150329b3752ec46160f4ca55429ae7b1;\n\n assert_eq(slot, slot_from_typescript);\n }\n}\n"
|
|
2666
|
-
},
|
|
2667
|
-
"42": {
|
|
2668
|
-
"path": "std/option.nr",
|
|
2669
|
-
"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"
|
|
2670
|
-
},
|
|
2671
|
-
"43": {
|
|
2672
|
-
"path": "std/panic.nr",
|
|
2673
|
-
"source": "pub fn panic<T, U>(message: T) -> U\nwhere\n T: StringLike,\n{\n assert(false, message);\n crate::mem::zeroed()\n}\n\ntrait StringLike {}\n\nimpl<let N: u32> StringLike for str<N> {}\nimpl<let N: u32, T> StringLike for fmtstr<N, T> {}\n"
|
|
2674
|
-
},
|
|
2675
|
-
"432": {
|
|
2676
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/types/src/type_packing.nr",
|
|
2677
|
-
"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 for bool {\n let N: u32 = BOOL_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as Field]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> bool {\n (fields[0] as u1) != 0\n }\n}\n\nimpl Packable for u8 {\n let N: u32 = U8_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as Field]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0] as u8\n }\n}\n\nimpl Packable for u16 {\n let N: u32 = U16_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as Field]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0] as u16\n }\n}\n\nimpl Packable for u32 {\n let N: u32 = U32_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as Field]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0] as u32\n }\n}\n\nimpl Packable for u64 {\n let N: u32 = U64_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as Field]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0] as u64\n }\n}\n\nimpl Packable for u128 {\n let N: u32 = U128_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as Field]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0] as u128\n }\n}\n\nimpl Packable for Field {\n let N: u32 = FIELD_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0]\n }\n}\n\nimpl Packable for i8 {\n let N: u32 = I8_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as u8 as Field]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0] as u8 as i8\n }\n}\n\nimpl Packable for i16 {\n let N: u32 = I16_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as u16 as Field]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0] as u16 as i16\n }\n}\n\nimpl Packable for i32 {\n let N: u32 = I32_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as u32 as Field]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0] as u32 as i32\n }\n}\n\nimpl Packable for i64 {\n let N: u32 = I64_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as u64 as Field]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0] as u64 as i64\n }\n}\n\nimpl<T, let M: u32> Packable for [T; M]\nwhere\n T: Packable,\n{\n let N: u32 = M * <T as Packable>::N;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n let mut result: [Field; Self::N] = std::mem::zeroed();\n for i in 0..M {\n let serialized = self[i].pack();\n for j in 0..<T as Packable>::N {\n result[i * <T as Packable>::N + j] = serialized[j];\n }\n }\n result\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n let mut reader = crate::utils::reader::Reader::new(fields);\n let mut result: [T; M] = std::mem::zeroed();\n reader.read_struct_array::<T, <T as Packable>::N, M>(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"
|
|
2678
|
-
},
|
|
2679
|
-
"445": {
|
|
2680
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/serde/src/reader.nr",
|
|
2681
|
-
"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_u64(&mut self) -> u64 {\n self.read() as u64\n }\n\n pub fn read_bool(&mut self) -> bool {\n self.read() != 0\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 peek_offset(&mut self, offset: u32) -> Field {\n self.data[self.offset + offset]\n }\n\n pub fn advance_offset(&mut self, offset: u32) {\n self.offset += offset;\n }\n\n pub fn finish(self) {\n assert_eq(self.offset, self.data.len(), \"Reader did not read all data\");\n }\n}\n"
|
|
2682
|
-
},
|
|
2683
|
-
"446": {
|
|
2684
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/serde/src/serialization.nr",
|
|
2685
|
-
"source": "use crate::{reader::Reader, writer::Writer};\n\n// docs:start:serialize\n/// Trait for serializing Noir types into arrays of Fields.\n///\n/// An implementation of the Serialize trait has to follow Noir's intrinsic serialization (each member of a struct\n/// converted directly into one or more Fields without any packing or compression). This trait (and Deserialize) are\n/// typically used to communicate between Noir and TypeScript (via oracles and function arguments).\n///\n/// # On Following Noir's Intrinsic Serialization\n/// When calling a Noir function from TypeScript (TS), first the function arguments are serialized into an array\n/// of fields. This array is then included in the initial witness. Noir's intrinsic serialization is then used\n/// to deserialize the arguments from the witness. When the same Noir function is called from Noir this Serialize trait\n/// is used instead of the serialization in TS. For this reason we need to have a match between TS serialization,\n/// Noir's intrinsic serialization and the implementation of this trait. If there is a mismatch, the function calls\n/// fail with an arguments hash mismatch error message.\n///\n/// # Associated Constants\n/// * `N` - The length of the output Field array, known at compile time\n///\n/// # Example\n/// ```\n/// impl<let N: u32> Serialize for str<N> {\n/// let N: u32 = N;\n///\n/// fn serialize(self) -> [Field; Self::N] {\n/// let mut writer: Writer<Self::N> = Writer::new();\n/// self.stream_serialize(&mut writer);\n/// writer.finish()\n/// }\n///\n/// fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n/// let bytes = self.as_bytes();\n/// for i in 0..bytes.len() {\n/// writer.write(bytes[i] as Field);\n/// }\n/// }\n/// }\n/// ```\n#[derive_via(derive_serialize)]\npub trait Serialize {\n let N: u32;\n\n fn serialize(self) -> [Field; Self::N];\n\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>);\n}\n\n/// Generates a `Serialize` trait implementation for a struct type.\n///\n/// # Parameters\n/// - `s`: The struct type definition to generate the implementation for\n///\n/// # Returns\n/// A quoted code block containing the trait implementation\n///\n/// # Example\n/// For a struct defined as:\n/// ```\n/// struct Log<N> {\n/// fields: [Field; N],\n/// length: u32\n/// }\n/// ```\n///\n/// This function generates code equivalent to:\n/// ```\n/// impl<let N: u32> Serialize for Log<N> {\n/// let N: u32 = <[Field; N] as Serialize>::N + <u32 as Serialize>::N;\n///\n/// fn serialize(self) -> [Field; Self::N] {\n/// let mut writer: Writer<Self::N> = Writer::new();\n/// self.stream_serialize(&mut writer);\n/// writer.finish()\n/// }\n///\n/// #[inline_always]\n/// fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n/// Serialize::stream_serialize(self.fields, writer);\n/// Serialize::stream_serialize(self.length, writer);\n/// }\n/// }\n/// ```\npub comptime fn derive_serialize(s: TypeDefinition) -> Quoted {\n let typ = s.as_type();\n let nested_struct = typ.as_data_type().unwrap();\n\n // We care only about the name and type so we drop the last item of the tuple\n let params = nested_struct.0.fields(nested_struct.1).map(|(name, typ, _)| (name, typ));\n\n // Generates the generic parameter declarations (to be placed after the `impl` keyword) and the `where` clause\n // for the `Serialize` trait.\n let generics_declarations = get_generics_declarations(s);\n let where_serialize_clause = get_where_trait_clause(s, quote {Serialize});\n\n let params_len_quote = get_params_len_quote(params);\n\n let function_body = params\n .map(|(name, _typ): (Quoted, Type)| {\n quote {\n $crate::serialization::Serialize::stream_serialize(self.$name, writer);\n }\n })\n .join(quote {});\n\n quote {\n impl$generics_declarations $crate::serialization::Serialize for $typ\n $where_serialize_clause\n {\n let N: u32 = $params_len_quote;\n\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: $crate::writer::Writer<Self::N> = $crate::writer::Writer::new();\n $crate::serialization::Serialize::stream_serialize(self, &mut writer);\n writer.finish()\n }\n\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut $crate::writer::Writer<K>) {\n $function_body\n }\n }\n }\n}\n\n// docs:start:deserialize\n/// Trait for deserializing Noir types from arrays of Fields.\n///\n/// An implementation of the Deserialize trait has to follow Noir's intrinsic serialization (each member of a struct\n/// converted directly into one or more Fields without any packing or compression). This trait is typically used when\n/// deserializing return values from function calls in Noir. Since the same function could be called from TypeScript\n/// (TS), in which case the TS deserialization would get used, we need to have a match between the 2.\n///\n/// # Associated Constants\n/// * `N` - The length of the input Field array, known at compile time\n///\n/// # Example\n/// ```\n/// impl<let M: u32> Deserialize for str<M> {\n/// let N: u32 = M;\n///\n/// fn deserialize(fields: [Field; Self::N]) -> Self {\n/// let mut reader = Reader::new(fields);\n/// let result = Self::stream_deserialize(&mut reader);\n/// reader.finish();\n/// result\n/// }\n///\n/// fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n/// let mut bytes = [0 as u8; M];\n/// for i in 0..M {\n/// bytes[i] = reader.read() as u8;\n/// }\n/// str::<M>::from(bytes)\n/// }\n/// }\n/// ```\n#[derive_via(derive_deserialize)]\npub trait Deserialize {\n let N: u32;\n\n fn deserialize(fields: [Field; Self::N]) -> Self;\n\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self;\n}\n\n/// Generates a `Deserialize` trait implementation for a given struct `s`.\n///\n/// # Arguments\n/// * `s` - The struct type definition to generate the implementation for\n///\n/// # Returns\n/// A `Quoted` block containing the generated trait implementation\n///\n/// # Requirements\n/// Each struct member type must implement the `Deserialize` trait (it gets used in the generated code).\n///\n/// # Example\n/// For a struct like:\n/// ```\n/// struct MyStruct {\n/// x: AztecAddress,\n/// y: Field,\n/// }\n/// ```\n///\n/// This generates:\n/// ```\n/// impl Deserialize for MyStruct {\n/// let N: u32 = <AztecAddress as Deserialize>::N + <Field as Deserialize>::N;\n///\n/// fn deserialize(fields: [Field; Self::N]) -> Self {\n/// let mut reader = Reader::new(fields);\n/// let result = Self::stream_deserialize(&mut reader);\n/// reader.finish();\n/// result\n/// }\n///\n/// #[inline_always]\n/// fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n/// let x = <AztecAddress as Deserialize>::stream_deserialize(reader);\n/// let y = <Field as Deserialize>::stream_deserialize(reader);\n/// Self { x, y }\n/// }\n/// }\n/// ```\npub comptime fn derive_deserialize(s: TypeDefinition) -> Quoted {\n let typ = s.as_type();\n let nested_struct = typ.as_data_type().unwrap();\n let params = nested_struct.0.fields(nested_struct.1);\n\n // Generates the generic parameter declarations (to be placed after the `impl` keyword) and the `where` clause\n // for the `Deserialize` trait.\n let generics_declarations = get_generics_declarations(s);\n let where_deserialize_clause = get_where_trait_clause(s, quote {Deserialize});\n\n // The following will give us:\n // <type_of_struct_member_1 as Deserialize>::N + <type_of_struct_member_2 as Deserialize>::N + ...\n // (or 0 if the struct has no members)\n let right_hand_side_of_definition_of_n = if params.len() > 0 {\n params\n .map(|(_, param_type, _): (Quoted, Type, Quoted)| {\n quote {\n <$param_type as $crate::serialization::Deserialize>::N\n }\n })\n .join(quote {+})\n } else {\n quote {0}\n };\n\n // For structs containing a single member, we can enhance performance by directly deserializing the input array,\n // bypassing the need for loop-based array construction. While this optimization yields significant benefits in\n // Brillig where the loops are expected to not be optimized, it is not relevant in ACIR where the loops are\n // expected to be optimized away.\n let function_body = if params.len() > 1 {\n // This generates deserialization code for each struct member and concatenates them together.\n let deserialization_of_struct_members = params\n .map(|(param_name, param_type, _): (Quoted, Type, Quoted)| {\n quote {\n let $param_name = <$param_type as Deserialize>::stream_deserialize(reader);\n }\n })\n .join(quote {});\n\n // We join the struct member names with a comma to be used in the `Self { ... }` syntax\n // This will give us e.g. `a, b, c` for a struct with three fields named `a`, `b`, and `c`.\n let struct_members = params\n .map(|(param_name, _, _): (Quoted, Type, Quoted)| quote { $param_name })\n .join(quote {,});\n\n quote {\n $deserialization_of_struct_members\n\n Self { $struct_members }\n }\n } else if params.len() == 1 {\n let param_name = params[0].0;\n quote {\n Self { $param_name: $crate::serialization::Deserialize::stream_deserialize(reader) }\n }\n } else {\n quote {\n Self {}\n }\n };\n\n quote {\n impl$generics_declarations $crate::serialization::Deserialize for $typ\n $where_deserialize_clause\n {\n let N: u32 = $right_hand_side_of_definition_of_n;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = $crate::reader::Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut $crate::reader::Reader<K>) -> Self {\n $function_body\n }\n }\n }\n}\n\n/// Generates a quoted expression that computes the total serialized length of function parameters.\n///\n/// # Parameters\n/// * `params` - An array of tuples where each tuple contains a quoted parameter name and its Type. The type needs\n/// to implement the Serialize trait.\n///\n/// # Returns\n/// A quoted expression that evaluates to:\n/// * `0` if there are no parameters\n/// * `(<type1 as Serialize>::N + <type2 as Serialize>::N + ...)` for one or more parameters\ncomptime fn get_params_len_quote(params: [(Quoted, Type)]) -> Quoted {\n if params.len() == 0 {\n quote { 0 }\n } else {\n let params_quote_without_parentheses = params\n .map(|(_, param_type): (Quoted, Type)| {\n quote {\n <$param_type as $crate::serialization::Serialize>::N\n }\n })\n .join(quote {+});\n quote { ($params_quote_without_parentheses) }\n }\n}\n\ncomptime fn get_generics_declarations(s: TypeDefinition) -> Quoted {\n let generics = s.generics();\n\n if generics.len() > 0 {\n let generics_declarations_items = generics\n .map(|(name, maybe_integer_typ)| {\n // The second item in the generics tuple is an Option of an integer type that is Some only if\n // the generic is numeric.\n if maybe_integer_typ.is_some() {\n // The generic is numeric, so we return a quote defined as e.g. \"let N: u32\"\n let integer_type = maybe_integer_typ.unwrap();\n quote {let $name: $integer_type}\n } else {\n // The generic is not numeric, so we return a quote containing the name of the generic (e.g. \"T\")\n quote {$name}\n }\n })\n .join(quote {,});\n quote {<$generics_declarations_items>}\n } else {\n // The struct doesn't have any generics defined, so we just return an empty quote.\n quote {}\n }\n}\n\ncomptime fn get_where_trait_clause(s: TypeDefinition, trait_name: Quoted) -> Quoted {\n let generics = s.generics();\n\n // The second item in the generics tuple is an Option of an integer type that is Some only if the generic is\n // numeric.\n let non_numeric_generics =\n generics.filter(|(_, maybe_integer_typ)| maybe_integer_typ.is_none());\n\n if non_numeric_generics.len() > 0 {\n let non_numeric_generics_declarations =\n non_numeric_generics.map(|(name, _)| quote {$name: $trait_name}).join(quote {,});\n quote {where $non_numeric_generics_declarations}\n } else {\n // There are no non-numeric generics, so we return an empty quote.\n quote {}\n }\n}\n"
|
|
2686
|
-
},
|
|
2687
|
-
"448": {
|
|
2688
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/serde/src/type_impls.nr",
|
|
2689
|
-
"source": "use crate::{reader::Reader, serialization::{Deserialize, Serialize}, writer::Writer};\nuse dep::std::embedded_curve_ops::EmbeddedCurvePoint;\nuse dep::std::embedded_curve_ops::EmbeddedCurveScalar;\n\nglobal U1_SERIALIZED_LEN: u32 = 1;\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 for bool {\n let N: u32 = BOOL_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as Field);\n }\n}\n\nimpl Deserialize for bool {\n let N: u32 = BOOL_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> bool {\n reader.read() != 0\n }\n}\n\nimpl Serialize for u1 {\n let N: u32 = U1_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as Field);\n }\n}\n\nimpl Deserialize for u1 {\n let N: u32 = U1_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read() as u1\n }\n}\n\nimpl Serialize for u8 {\n let N: u32 = U8_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as Field);\n }\n}\n\nimpl Deserialize for u8 {\n let N: u32 = U8_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read() as u8\n }\n}\n\nimpl Serialize for u16 {\n let N: u32 = U16_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as Field);\n }\n}\n\nimpl Deserialize for u16 {\n let N: u32 = U16_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read() as u16\n }\n}\n\nimpl Serialize for u32 {\n let N: u32 = U32_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as Field);\n }\n}\n\nimpl Deserialize for u32 {\n let N: u32 = U32_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read() as u32\n }\n}\n\nimpl Serialize for u64 {\n let N: u32 = U64_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as Field);\n }\n}\n\nimpl Deserialize for u64 {\n let N: u32 = U64_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read() as u64\n }\n}\n\nimpl Serialize for u128 {\n let N: u32 = U128_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as Field);\n }\n}\n\nimpl Deserialize for u128 {\n let N: u32 = U128_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read() as u128\n }\n}\n\nimpl Serialize for Field {\n let N: u32 = FIELD_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self);\n }\n}\n\nimpl Deserialize for Field {\n let N: u32 = FIELD_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read()\n }\n}\n\nimpl Serialize for i8 {\n let N: u32 = I8_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as u8 as Field);\n }\n}\n\nimpl Deserialize for i8 {\n let N: u32 = I8_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read() as u8 as i8\n }\n}\n\nimpl Serialize for i16 {\n let N: u32 = I16_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as u16 as Field);\n }\n}\n\nimpl Deserialize for i16 {\n let N: u32 = I16_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read() as u16 as i16\n }\n}\n\nimpl Serialize for i32 {\n let N: u32 = I32_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as u32 as Field);\n }\n}\n\nimpl Deserialize for i32 {\n let N: u32 = I32_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read() as u32 as i32\n }\n}\n\nimpl Serialize for i64 {\n let N: u32 = I64_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as u64 as Field);\n }\n}\n\nimpl Deserialize for i64 {\n let N: u32 = I64_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read() as u64 as i64\n }\n}\n\nimpl<T, let M: u32> Serialize for [T; M]\nwhere\n T: Serialize,\n{\n let N: u32 = <T as Serialize>::N * M;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n for i in 0..M {\n self[i].stream_serialize(writer);\n }\n }\n}\n\nimpl<T, let M: u32> Deserialize for [T; M]\nwhere\n T: Deserialize,\n{\n let N: u32 = <T as Deserialize>::N * M;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n let mut result: [T; M] = std::mem::zeroed();\n for i in 0..M {\n result[i] = T::stream_deserialize(reader);\n }\n result\n }\n}\n\nimpl<T> Serialize for Option<T>\nwhere\n T: Serialize,\n{\n let N: u32 = <T as Serialize>::N + 1;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write_bool(self.is_some());\n if self.is_some() {\n self.unwrap_unchecked().stream_serialize(writer);\n } else {\n writer.advance_offset(<T as Serialize>::N);\n }\n }\n}\n\nimpl<T> Deserialize for Option<T>\nwhere\n T: Deserialize,\n{\n let N: u32 = <T as Deserialize>::N + 1;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n if reader.read_bool() {\n Option::some(<T as Deserialize>::stream_deserialize(reader))\n } else {\n reader.advance_offset(<T as Deserialize>::N);\n Option::none()\n }\n }\n}\n\nglobal SCALAR_SIZE: u32 = 2;\n\nimpl Serialize for EmbeddedCurveScalar {\n\n let N: u32 = SCALAR_SIZE;\n\n fn serialize(self) -> [Field; SCALAR_SIZE] {\n [self.lo, self.hi]\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self.lo);\n writer.write(self.hi);\n }\n}\n\nimpl Deserialize for EmbeddedCurveScalar {\n let N: u32 = SCALAR_SIZE;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n Self { lo: fields[0], hi: fields[1] }\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n Self { lo: reader.read(), hi: reader.read() }\n }\n}\n\nglobal POINT_SIZE: u32 = 3;\n\nimpl Serialize for EmbeddedCurvePoint {\n let N: u32 = POINT_SIZE;\n\n fn serialize(self) -> [Field; Self::N] {\n [self.x, self.y, self.is_infinite as Field]\n }\n\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self.x);\n writer.write(self.y);\n writer.write(self.is_infinite as Field);\n }\n}\n\nimpl Deserialize for EmbeddedCurvePoint {\n let N: u32 = POINT_SIZE;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n Self { x: fields[0], y: fields[1], is_infinite: fields[2] != 0 }\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n Self { x: reader.read(), y: reader.read(), is_infinite: reader.read_bool() }\n }\n}\n\nimpl<let M: u32> Deserialize for str<M> {\n let N: u32 = M;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n let u8_arr = <[u8; Self::N] as Deserialize>::stream_deserialize(reader);\n str::<Self::N>::from(u8_arr)\n }\n}\n\nimpl<let M: u32> Serialize for str<M> {\n let N: u32 = M;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n self.as_bytes().stream_serialize(writer);\n }\n}\n\n// Note: Not deriving this because it's not supported to call derive_serialize on a \"remote\" struct (and it will never\n// be supported).\nimpl<T, let M: u32> Deserialize for BoundedVec<T, M>\nwhere\n T: Deserialize,\n{\n let N: u32 = <T as Deserialize>::N * M + 1;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n let mut new_bounded_vec: BoundedVec<T, M> = BoundedVec::new();\n let payload_len = Self::N - 1;\n\n // Length is stored in the last field as we need to match intrinsic Noir serialization and the `len` struct\n // field is after `storage` struct field (see `bounded_vec.nr` in noir-stdlib)\n let len = reader.peek_offset(payload_len) as u32;\n\n for i in 0..M {\n if i < len {\n new_bounded_vec.push(<T as Deserialize>::stream_deserialize(reader));\n }\n }\n\n // +1 for the length of the BoundedVec\n reader.advance_offset((M - len) * <T as Deserialize>::N + 1);\n\n new_bounded_vec\n }\n}\n\n// This may cause issues if used as program input, because noir disallows empty arrays for program input.\n// I think this is okay because I don't foresee a unit type being used as input. But leaving this comment as a hint\n// if someone does run into this in the future.\nimpl Deserialize for () {\n let N: u32 = 0;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(_reader: &mut Reader<K>) -> Self {\n ()\n }\n}\n\n// Note: Not deriving this because it's not supported to call derive_serialize on a \"remote\" struct (and it will never\n// be supported).\nimpl<T, let M: u32> Serialize for BoundedVec<T, M>\nwhere\n T: Serialize,\n{\n let N: u32 = <T as Serialize>::N * M + 1; // +1 for the length of the BoundedVec\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n self.storage().stream_serialize(writer);\n // Length is stored in the last field as we need to match intrinsic Noir serialization and the `len` struct\n // field is after `storage` struct field (see `bounded_vec.nr` in noir-stdlib)\n writer.write_u32(self.len() as u32);\n }\n}\n\n// Create a slice of the given length with each element made from `f(i)` where `i` is the current index\ncomptime fn make_slice<Env, T>(length: u32, f: fn[Env](u32) -> T) -> [T] {\n let mut slice = @[];\n for i in 0..length {\n slice = slice.push_back(f(i));\n }\n slice\n}\n\n// Implements Serialize and Deserialize for an arbitrary tuple type\ncomptime fn impl_serialize_for_tuple(_m: Module, length: u32) -> Quoted {\n // `T0`, `T1`, `T2`\n let type_names = make_slice(length, |i| f\"T{i}\".quoted_contents());\n\n // `result0`, `result1`, `result2`\n let result_names = make_slice(length, |i| f\"result{i}\".quoted_contents());\n\n // `T0, T1, T2`\n let field_generics = type_names.join(quote [,]);\n\n // `<T0 as Serialize>::N + <T1 as Serialize>::N + <T2 as Serialize>::N`\n let full_size_serialize = type_names\n .map(|type_name| quote {\n <$type_name as Serialize>::N\n })\n .join(quote [+]);\n\n // `<T0 as Deserialize>::N + <T1 as Deserialize>::N + <T2 as Deserialize>::N`\n let full_size_deserialize = type_names\n .map(|type_name| quote {\n <$type_name as Deserialize>::N\n })\n .join(quote [+]);\n\n // `T0: Serialize, T1: Serialize, T2: Serialize,`\n let serialize_constraints = type_names\n .map(|field_name| quote {\n $field_name: Serialize,\n })\n .join(quote []);\n\n // `T0: Deserialize, T1: Deserialize, T2: Deserialize,`\n let deserialize_constraints = type_names\n .map(|field_name| quote {\n $field_name: Deserialize,\n })\n .join(quote []);\n\n // Statements to serialize each field\n let serialized_fields = type_names\n .mapi(|i, _type_name| quote {\n $crate::serialization::Serialize::stream_serialize(self.$i, writer);\n })\n .join(quote []);\n\n // Statements to deserialize each field\n let deserialized_fields = type_names\n .mapi(|i, type_name| {\n let result_name = result_names[i];\n quote {\n let $result_name = <$type_name as $crate::serialization::Deserialize>::stream_deserialize(reader);\n }\n })\n .join(quote []);\n let deserialize_results = result_names.join(quote [,]);\n\n quote {\n impl<$field_generics> Serialize for ($field_generics) where $serialize_constraints {\n let N: u32 = $full_size_serialize;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: $crate::writer::Writer<Self::N> = $crate::writer::Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut $crate::writer::Writer<K>) {\n\n $serialized_fields\n }\n }\n\n impl<$field_generics> Deserialize for ($field_generics) where $deserialize_constraints {\n let N: u32 = $full_size_deserialize;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = $crate::reader::Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n \n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut $crate::reader::Reader<K>) -> Self {\n $deserialized_fields\n ($deserialize_results)\n }\n }\n }\n}\n\n// Keeping these manual impls. They are more efficient since they do not\n// require copying sub-arrays from any serialized arrays.\nimpl<T1> Serialize for (T1,)\nwhere\n T1: Serialize,\n{\n let N: u32 = <T1 as Serialize>::N;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: crate::writer::Writer<Self::N> = crate::writer::Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n self.0.stream_serialize(writer);\n }\n}\n\nimpl<T1> Deserialize for (T1,)\nwhere\n T1: Deserialize,\n{\n let N: u32 = <T1 as Deserialize>::N;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = crate::reader::Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n (<T1 as Deserialize>::stream_deserialize(reader),)\n }\n}\n\n#[impl_serialize_for_tuple(2)]\n#[impl_serialize_for_tuple(3)]\n#[impl_serialize_for_tuple(4)]\n#[impl_serialize_for_tuple(5)]\n#[impl_serialize_for_tuple(6)]\nmod impls {\n use crate::serialization::{Deserialize, Serialize};\n}\n"
|
|
2690
|
-
},
|
|
2691
|
-
"449": {
|
|
2692
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-protocol-circuits/crates/serde/src/writer.nr",
|
|
2693
|
-
"source": "pub struct Writer<let N: u32> {\n data: [Field; N],\n offset: u32,\n}\n\nimpl<let N: u32> Writer<N> {\n pub fn new() -> Self {\n Self { data: [0; N], offset: 0 }\n }\n\n pub fn write(&mut self, value: Field) {\n self.data[self.offset] = value;\n self.offset += 1;\n }\n\n pub fn write_u32(&mut self, value: u32) {\n self.write(value as Field);\n }\n\n pub fn write_u64(&mut self, value: u64) {\n self.write(value as Field);\n }\n\n pub fn write_bool(&mut self, value: bool) {\n self.write(value as Field);\n }\n\n pub fn write_array<let K: u32>(&mut self, value: [Field; K]) {\n for i in 0..K {\n self.data[i + self.offset] = value[i];\n }\n self.offset += K;\n }\n\n pub fn write_struct<T, let K: u32>(&mut self, value: T, serialize: fn(T) -> [Field; K]) {\n self.write_array(serialize(value));\n }\n\n pub fn write_struct_array<T, let K: u32, let C: u32>(\n &mut self,\n value: [T; C],\n serialize: fn(T) -> [Field; K],\n ) {\n for i in 0..C {\n self.write_struct(value[i], serialize);\n }\n }\n\n pub fn advance_offset(&mut self, offset: u32) {\n self.offset += offset;\n }\n\n pub fn finish(self) -> [Field; N] {\n assert_eq(self.offset, self.data.len(), \"Writer did not write all data\");\n self.data\n }\n}\n"
|
|
2694
|
-
},
|
|
2695
|
-
"5": {
|
|
2696
|
-
"path": "std/cmp.nr",
|
|
2697
|
-
"source": "use crate::meta::derive_via;\n\n#[derive_via(derive_eq)]\n// docs:start:eq-trait\npub trait Eq {\n fn eq(self, other: Self) -> bool;\n}\n// docs:end:eq-trait\n\n// docs:start:derive_eq\ncomptime fn derive_eq(s: TypeDefinition) -> Quoted {\n let signature = quote { fn eq(_self: Self, _other: Self) -> bool };\n let for_each_field = |name| quote { (_self.$name == _other.$name) };\n let body = |fields| {\n if s.fields_as_written().len() == 0 {\n quote { true }\n } else {\n fields\n }\n };\n crate::meta::make_trait_impl(\n s,\n quote { $crate::cmp::Eq },\n signature,\n for_each_field,\n quote { & },\n body,\n )\n}\n// docs:end:derive_eq\n\nimpl Eq for Field {\n fn eq(self, other: Field) -> bool {\n self == other\n }\n}\n\nimpl Eq for u128 {\n fn eq(self, other: u128) -> bool {\n self == other\n }\n}\nimpl Eq for u64 {\n fn eq(self, other: u64) -> bool {\n self == other\n }\n}\nimpl Eq for u32 {\n fn eq(self, other: u32) -> bool {\n self == other\n }\n}\nimpl Eq for u16 {\n fn eq(self, other: u16) -> bool {\n self == other\n }\n}\nimpl Eq for u8 {\n fn eq(self, other: u8) -> bool {\n self == other\n }\n}\nimpl Eq for u1 {\n fn eq(self, other: u1) -> bool {\n self == other\n }\n}\n\nimpl Eq for i8 {\n fn eq(self, other: i8) -> bool {\n self == other\n }\n}\nimpl Eq for i16 {\n fn eq(self, other: i16) -> bool {\n self == other\n }\n}\nimpl Eq for i32 {\n fn eq(self, other: i32) -> bool {\n self == other\n }\n}\nimpl Eq for i64 {\n fn eq(self, other: i64) -> bool {\n self == other\n }\n}\n\nimpl Eq for () {\n fn eq(_self: Self, _other: ()) -> bool {\n true\n }\n}\nimpl Eq for bool {\n fn eq(self, other: bool) -> bool {\n self == other\n }\n}\n\nimpl<T, let N: u32> Eq for [T; N]\nwhere\n T: Eq,\n{\n fn eq(self, other: [T; N]) -> bool {\n let mut result = true;\n for i in 0..self.len() {\n result &= self[i].eq(other[i]);\n }\n result\n }\n}\n\nimpl<T> Eq for [T]\nwhere\n T: Eq,\n{\n fn eq(self, other: [T]) -> bool {\n let mut result = self.len() == other.len();\n if result {\n for i in 0..self.len() {\n result &= self[i].eq(other[i]);\n }\n }\n result\n }\n}\n\nimpl<let N: u32> Eq for str<N> {\n fn eq(self, other: str<N>) -> bool {\n let self_bytes = self.as_bytes();\n let other_bytes = other.as_bytes();\n self_bytes == other_bytes\n }\n}\n\nimpl<A, B> Eq for (A, B)\nwhere\n A: Eq,\n B: Eq,\n{\n fn eq(self, other: (A, B)) -> bool {\n self.0.eq(other.0) & self.1.eq(other.1)\n }\n}\n\nimpl<A, B, C> Eq for (A, B, C)\nwhere\n A: Eq,\n B: Eq,\n C: Eq,\n{\n fn eq(self, other: (A, B, C)) -> bool {\n self.0.eq(other.0) & self.1.eq(other.1) & self.2.eq(other.2)\n }\n}\n\nimpl<A, B, C, D> Eq for (A, B, C, D)\nwhere\n A: Eq,\n B: Eq,\n C: Eq,\n D: Eq,\n{\n fn eq(self, other: (A, B, C, D)) -> bool {\n self.0.eq(other.0) & self.1.eq(other.1) & self.2.eq(other.2) & self.3.eq(other.3)\n }\n}\n\nimpl<A, B, C, D, E> Eq for (A, B, C, D, E)\nwhere\n A: Eq,\n B: Eq,\n C: Eq,\n D: Eq,\n E: Eq,\n{\n fn eq(self, other: (A, B, C, D, E)) -> bool {\n self.0.eq(other.0)\n & self.1.eq(other.1)\n & self.2.eq(other.2)\n & self.3.eq(other.3)\n & self.4.eq(other.4)\n }\n}\n\nimpl Eq for Ordering {\n fn eq(self, other: Ordering) -> bool {\n self.result == other.result\n }\n}\n\n// Noir doesn't have enums yet so we emulate (Lt | Eq | Gt) with a struct\n// that has 3 public functions for constructing the struct.\npub struct Ordering {\n result: Field,\n}\n\nimpl Ordering {\n // Implementation note: 0, 1, and 2 for Lt, Eq, and Gt are built\n // into the compiler, do not change these without also updating\n // the compiler itself!\n pub fn less() -> Ordering {\n Ordering { result: 0 }\n }\n\n pub fn equal() -> Ordering {\n Ordering { result: 1 }\n }\n\n pub fn greater() -> Ordering {\n Ordering { result: 2 }\n }\n}\n\n#[derive_via(derive_ord)]\n// docs:start:ord-trait\npub trait Ord {\n fn cmp(self, other: Self) -> Ordering;\n}\n// docs:end:ord-trait\n\n// docs:start:derive_ord\ncomptime fn derive_ord(s: TypeDefinition) -> Quoted {\n let name = quote { $crate::cmp::Ord };\n let signature = quote { fn cmp(_self: Self, _other: Self) -> $crate::cmp::Ordering };\n let for_each_field = |name| quote {\n if result == $crate::cmp::Ordering::equal() {\n result = _self.$name.cmp(_other.$name);\n }\n };\n let body = |fields| quote {\n let mut result = $crate::cmp::Ordering::equal();\n $fields\n result\n };\n crate::meta::make_trait_impl(s, name, signature, for_each_field, quote {}, body)\n}\n// docs:end:derive_ord\n\n// Note: Field deliberately does not implement Ord\n\nimpl Ord for u128 {\n fn cmp(self, other: u128) -> Ordering {\n if self < other {\n Ordering::less()\n } else if self > other {\n Ordering::greater()\n } else {\n Ordering::equal()\n }\n }\n}\nimpl Ord for u64 {\n fn cmp(self, other: u64) -> Ordering {\n if self < other {\n Ordering::less()\n } else if self > other {\n Ordering::greater()\n } else {\n Ordering::equal()\n }\n }\n}\n\nimpl Ord for u32 {\n fn cmp(self, other: u32) -> Ordering {\n if self < other {\n Ordering::less()\n } else if self > other {\n Ordering::greater()\n } else {\n Ordering::equal()\n }\n }\n}\n\nimpl Ord for u16 {\n fn cmp(self, other: u16) -> Ordering {\n if self < other {\n Ordering::less()\n } else if self > other {\n Ordering::greater()\n } else {\n Ordering::equal()\n }\n }\n}\n\nimpl Ord for u8 {\n fn cmp(self, other: u8) -> Ordering {\n if self < other {\n Ordering::less()\n } else if self > other {\n Ordering::greater()\n } else {\n Ordering::equal()\n }\n }\n}\n\nimpl Ord for i8 {\n fn cmp(self, other: i8) -> Ordering {\n if self < other {\n Ordering::less()\n } else if self > other {\n Ordering::greater()\n } else {\n Ordering::equal()\n }\n }\n}\n\nimpl Ord for i16 {\n fn cmp(self, other: i16) -> Ordering {\n if self < other {\n Ordering::less()\n } else if self > other {\n Ordering::greater()\n } else {\n Ordering::equal()\n }\n }\n}\n\nimpl Ord for i32 {\n fn cmp(self, other: i32) -> Ordering {\n if self < other {\n Ordering::less()\n } else if self > other {\n Ordering::greater()\n } else {\n Ordering::equal()\n }\n }\n}\n\nimpl Ord for i64 {\n fn cmp(self, other: i64) -> Ordering {\n if self < other {\n Ordering::less()\n } else if self > other {\n Ordering::greater()\n } else {\n Ordering::equal()\n }\n }\n}\n\nimpl Ord for () {\n fn cmp(_self: Self, _other: ()) -> Ordering {\n Ordering::equal()\n }\n}\n\nimpl Ord for bool {\n fn cmp(self, other: bool) -> Ordering {\n if self {\n if other {\n Ordering::equal()\n } else {\n Ordering::greater()\n }\n } else if other {\n Ordering::less()\n } else {\n Ordering::equal()\n }\n }\n}\n\nimpl<T, let N: u32> Ord for [T; N]\nwhere\n T: Ord,\n{\n // The first non-equal element of both arrays determines\n // the ordering for the whole array.\n fn cmp(self, other: [T; N]) -> Ordering {\n let mut result = Ordering::equal();\n for i in 0..self.len() {\n if result == Ordering::equal() {\n result = self[i].cmp(other[i]);\n }\n }\n result\n }\n}\n\nimpl<T> Ord for [T]\nwhere\n T: Ord,\n{\n // The first non-equal element of both arrays determines\n // the ordering for the whole array.\n fn cmp(self, other: [T]) -> Ordering {\n let self_len = self.len();\n let other_len = other.len();\n let min_len = if self_len < other_len {\n self_len\n } else {\n other_len\n };\n\n let mut result = Ordering::equal();\n for i in 0..min_len {\n if result == Ordering::equal() {\n result = self[i].cmp(other[i]);\n }\n }\n\n if result != Ordering::equal() {\n result\n } else {\n self_len.cmp(other_len)\n }\n }\n}\n\nimpl<A, B> Ord for (A, B)\nwhere\n A: Ord,\n B: Ord,\n{\n fn cmp(self, other: (A, B)) -> Ordering {\n let result = self.0.cmp(other.0);\n\n if result != Ordering::equal() {\n result\n } else {\n self.1.cmp(other.1)\n }\n }\n}\n\nimpl<A, B, C> Ord for (A, B, C)\nwhere\n A: Ord,\n B: Ord,\n C: Ord,\n{\n fn cmp(self, other: (A, B, C)) -> Ordering {\n let mut result = self.0.cmp(other.0);\n\n if result == Ordering::equal() {\n result = self.1.cmp(other.1);\n }\n\n if result == Ordering::equal() {\n result = self.2.cmp(other.2);\n }\n\n result\n }\n}\n\nimpl<A, B, C, D> Ord for (A, B, C, D)\nwhere\n A: Ord,\n B: Ord,\n C: Ord,\n D: Ord,\n{\n fn cmp(self, other: (A, B, C, D)) -> Ordering {\n let mut result = self.0.cmp(other.0);\n\n if result == Ordering::equal() {\n result = self.1.cmp(other.1);\n }\n\n if result == Ordering::equal() {\n result = self.2.cmp(other.2);\n }\n\n if result == Ordering::equal() {\n result = self.3.cmp(other.3);\n }\n\n result\n }\n}\n\nimpl<A, B, C, D, E> Ord for (A, B, C, D, E)\nwhere\n A: Ord,\n B: Ord,\n C: Ord,\n D: Ord,\n E: Ord,\n{\n fn cmp(self, other: (A, B, C, D, E)) -> Ordering {\n let mut result = self.0.cmp(other.0);\n\n if result == Ordering::equal() {\n result = self.1.cmp(other.1);\n }\n\n if result == Ordering::equal() {\n result = self.2.cmp(other.2);\n }\n\n if result == Ordering::equal() {\n result = self.3.cmp(other.3);\n }\n\n if result == Ordering::equal() {\n result = self.4.cmp(other.4);\n }\n\n result\n }\n}\n\n// Compares and returns the maximum of two values.\n//\n// Returns the second argument if the comparison determines them to be equal.\n//\n// # Examples\n//\n// ```\n// use std::cmp;\n//\n// assert_eq(cmp::max(1, 2), 2);\n// assert_eq(cmp::max(2, 2), 2);\n// ```\npub fn max<T>(v1: T, v2: T) -> T\nwhere\n T: Ord,\n{\n if v1 > v2 {\n v1\n } else {\n v2\n }\n}\n\n// Compares and returns the minimum of two values.\n//\n// Returns the first argument if the comparison determines them to be equal.\n//\n// # Examples\n//\n// ```\n// use std::cmp;\n//\n// assert_eq(cmp::min(1, 2), 1);\n// assert_eq(cmp::min(2, 2), 2);\n// ```\npub fn min<T>(v1: T, v2: T) -> T\nwhere\n T: Ord,\n{\n if v1 > v2 {\n v2\n } else {\n v1\n }\n}\n\nmod cmp_tests {\n use super::{Eq, max, min, Ord};\n\n #[test]\n fn sanity_check_min() {\n assert_eq(min(0_u64, 1), 0);\n assert_eq(min(0_u64, 0), 0);\n assert_eq(min(1_u64, 1), 1);\n assert_eq(min(255_u8, 0), 0);\n }\n\n #[test]\n fn sanity_check_max() {\n assert_eq(max(0_u64, 1), 1);\n assert_eq(max(0_u64, 0), 0);\n assert_eq(max(1_u64, 1), 1);\n assert_eq(max(255_u8, 0), 255);\n }\n\n #[test]\n fn correctly_handles_unequal_length_vectors() {\n let vector_1 = [0, 1, 2, 3].as_vector();\n let vector_2 = [0, 1, 2].as_vector();\n assert(!vector_1.eq(vector_2));\n }\n\n #[test]\n fn lexicographic_ordering_for_vectors() {\n assert(\n [2_u32].as_vector().cmp([1_u32, 1_u32, 1_u32].as_vector())\n == super::Ordering::greater(),\n );\n assert(\n [1_u32, 2_u32].as_vector().cmp([1_u32, 2_u32, 3_u32].as_vector())\n == super::Ordering::less(),\n );\n }\n}\n"
|
|
2698
|
-
},
|
|
2699
|
-
"51": {
|
|
2700
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-contracts/contracts/protocol/auth_registry_contract/src/main.nr",
|
|
2701
|
-
"source": "/**\n * @title AuthRegistry Contract\n * @notice Manages authorization of public actions through authentication witnesses (authwits)\n * @dev This contract allows users to approve/reject public actions that can be performed on their behalf by other\n * addresses\n */\npub contract AuthRegistry {\n use aztec::{\n authwit::auth::{\n assert_current_call_valid_authwit, compute_authwit_message_hash, IS_VALID_SELECTOR,\n },\n context::{PrivateContext, PublicContext, UtilityContext},\n hash::{hash_args, hash_calldata_array},\n oracle::{avm, execution_cache, version::assert_compatible_oracle_version},\n protocol::{\n abis::function_selector::FunctionSelector,\n address::AztecAddress,\n traits::{Deserialize, FromField, Serialize, ToField},\n utils::reader::Reader,\n },\n state_vars::{Map, PublicMutable, StateVariable},\n };\n\n struct Storage<Context> {\n /// Map of addresses that have rejected all actions\n reject_all: Map<AztecAddress, PublicMutable<bool, Context>, Context>,\n /// Nested map of approvers to their authorized message hashes\n /// First key is the approver address, second key is the message hash, value is authorization status\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 #[aztec::macros::internals_functions_generation::abi_attributes::abi_public]\n unconstrained fn set_authorized(message_hash: Field, authorize: bool) {\n // MACRO CODE START\n let context: PublicContext = PublicContext::new(\n || -> Field {\n let serialized_args: [Field; 2] =\n avm::calldata_copy(1, <Field as Serialize>::N + <bool as Serialize>::N);\n hash_args(serialized_args)\n },\n );\n let storage: Storage<PublicContext> = Storage::init(context);\n // MACRO CODE END\n\n storage.approved_actions.at(avm::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 #[aztec::macros::internals_functions_generation::abi_attributes::abi_public]\n unconstrained fn set_reject_all(reject: bool) {\n // MACRO CODE START\n let context: PublicContext = PublicContext::new(\n || -> Field {\n let serialized_args: [Field; 1] = avm::calldata_copy(1, <bool as Serialize>::N);\n hash_args(serialized_args)\n },\n );\n let storage: Storage<PublicContext> = Storage::init(context);\n // MACRO CODE END\n\n storage.reject_all.at(avm::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 #[aztec::macros::internals_functions_generation::abi_attributes::abi_public]\n unconstrained fn consume(on_behalf_of: AztecAddress, inner_hash: Field) -> pub Field {\n // MACRO CODE START\n let context: PublicContext = PublicContext::new(\n || -> Field {\n let serialized_args: [Field; 2] =\n avm::calldata_copy(1, <AztecAddress as Serialize>::N + <Field as Serialize>::N);\n hash_args(serialized_args)\n },\n );\n let storage: Storage<PublicContext> = Storage::init(context);\n // MACRO CODE END\n\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.maybe_msg_sender().unwrap(),\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 #[aztec::macros::internals_functions_generation::abi_attributes::abi_private]\n fn set_authorized_private(\n inputs: aztec::context::inputs::PrivateContextInputs,\n approver: AztecAddress,\n message_hash: Field,\n authorize: bool,\n ) -> return_data aztec::protocol::abis::private_circuit_public_inputs::PrivateCircuitPublicInputs {\n // MACRO CODE START\n // Note: The macros initially inserted a phase check here, but since there is no phase change in this function\n // body or in the subsequent enqueued public function call, I have removed that check.\n assert_compatible_oracle_version();\n\n let serialized_params: [Field; 3] =\n [approver.to_field(), message_hash, authorize.to_field()];\n let args_hash: Field = hash_args(serialized_params);\n let mut context: PrivateContext = PrivateContext::new(inputs, args_hash);\n\n // MACRO CODE END\n\n // 3 corresponds to the number of arguments of the function\n assert_current_call_valid_authwit::<3>(&mut context, approver);\n\n // Enqueue call to _set_authorized\n // Note: This was originally just `self.enqueue_self._set_authorized(approver, message_hash, authorize);`\n // before de-macroification.\n {\n let enqueue_params: [Field; 3] =\n [approver.to_field(), message_hash, authorize.to_field()];\n let selector: FunctionSelector = FunctionSelector::from_field(_SET_AUTHORIZED_SELECTOR);\n let calldata: [Field; 4] = [selector.to_field()].concat(enqueue_params);\n let calldata_hash: Field = hash_calldata_array(calldata);\n execution_cache::store(calldata, calldata_hash);\n context.call_public_function_with_calldata_hash(\n context.this_address(),\n calldata_hash,\n false,\n false,\n );\n }\n\n // MACRO CODE START\n context.finish()\n // MACRO CODE END\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 #[aztec::macros::internals_functions_generation::abi_attributes::abi_public]\n #[aztec::macros::internals_functions_generation::abi_attributes::abi_only_self]\n unconstrained fn _set_authorized(approver: AztecAddress, message_hash: Field, authorize: bool) {\n // MACRO CODE START\n let context: PublicContext = PublicContext::new(\n || -> Field {\n let serialized_args: [Field; 3] = avm::calldata_copy(\n 1,\n (<AztecAddress as Serialize>::N + <Field as Serialize>::N)\n + <bool as Serialize>::N,\n );\n hash_args(serialized_args)\n },\n );\n let storage: Storage<PublicContext> = Storage::init(context);\n\n // Originally injected by the #[only_self] macro\n assert(\n avm::sender() == context.this_address(),\n \"Function _set_authorized can only be called by the same contract\",\n );\n // MACRO CODE END\n\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 #[aztec::macros::internals_functions_generation::abi_attributes::abi_public]\n #[aztec::macros::internals_functions_generation::abi_attributes::abi_view]\n unconstrained fn is_reject_all(on_behalf_of: AztecAddress) -> pub bool {\n // MACRO CODE START\n let context: PublicContext = PublicContext::new(\n || -> Field {\n let serialized_args: [Field; 1] =\n avm::calldata_copy(1, <AztecAddress as Serialize>::N);\n hash_args(serialized_args)\n },\n );\n let storage: Storage<PublicContext> = Storage::init(context);\n\n // Originally injected by the #[view] macro\n assert(context.is_static_call(), \"Function is_reject_all can only be called statically\");\n // MACRO CODE END\n\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 #[aztec::macros::internals_functions_generation::abi_attributes::abi_public]\n #[aztec::macros::internals_functions_generation::abi_attributes::abi_view]\n unconstrained fn is_consumable(on_behalf_of: AztecAddress, message_hash: Field) -> pub bool {\n // MACRO CODE START\n let context: PublicContext = PublicContext::new(\n || -> Field {\n let serialized_args: [Field; 2] =\n avm::calldata_copy(1, <AztecAddress as Serialize>::N + <Field as Serialize>::N);\n hash_args(serialized_args)\n },\n );\n let storage: Storage<PublicContext> = Storage::init(context);\n\n // Originally injected by the #[view] macro\n assert(context.is_static_call(), \"Function is_consumable can only be called statically\");\n // MACRO CODE END\n\n storage.approved_actions.at(on_behalf_of).at(message_hash).read()\n }\n\n /**\n * Just like `is_consumable`, but a utility function and not public.\n */\n #[aztec::macros::internals_functions_generation::abi_attributes::abi_utility]\n unconstrained fn utility_is_consumable(\n on_behalf_of: AztecAddress,\n message_hash: Field,\n ) -> pub bool {\n // MACRO CODE START\n assert_compatible_oracle_version();\n\n let context: UtilityContext = UtilityContext::new();\n let storage: Storage<UtilityContext> = Storage::init(context);\n // MACRO CODE END\n\n storage.approved_actions.at(on_behalf_of).at(message_hash).read()\n }\n\n // // THE REST OF THE CODE IN THIS CONTRACT WAS ORIGINALLY INJECTED BY THE #[aztec] MACRO.\n\n // Function selectors computed at comptime from function signatures\n global SET_AUTHORIZED_SELECTOR: Field =\n comptime { FunctionSelector::from_signature(\"set_authorized(Field,bool)\").to_field() };\n global SET_REJECT_ALL_SELECTOR: Field =\n comptime { FunctionSelector::from_signature(\"set_reject_all(bool)\").to_field() };\n global CONSUME_SELECTOR: Field =\n comptime { FunctionSelector::from_signature(\"consume((Field),Field)\").to_field() };\n global _SET_AUTHORIZED_SELECTOR: Field = comptime {\n FunctionSelector::from_signature(\"_set_authorized((Field),Field,bool)\").to_field()\n };\n global IS_REJECT_ALL_SELECTOR: Field =\n comptime { FunctionSelector::from_signature(\"is_reject_all((Field))\").to_field() };\n global IS_CONSUMABLE_SELECTOR: Field =\n comptime { FunctionSelector::from_signature(\"is_consumable((Field),Field)\").to_field() };\n\n #[aztec::macros::internals_functions_generation::abi_attributes::abi_public]\n pub unconstrained fn public_dispatch(selector: Field) {\n if selector == SET_AUTHORIZED_SELECTOR {\n let input_calldata: [Field; 2] =\n avm::calldata_copy(1, <Field as Serialize>::N + <bool as Serialize>::N);\n let mut reader: Reader<2> = Reader::new(input_calldata);\n let arg0: Field = reader.read_struct(<Field as Deserialize>::deserialize);\n let arg1: bool = reader.read_struct(<bool as Deserialize>::deserialize);\n set_authorized(arg0, arg1);\n avm::avm_return([].as_vector());\n };\n if selector == SET_REJECT_ALL_SELECTOR {\n let input_calldata: [Field; 1] = avm::calldata_copy(1, <bool as Serialize>::N);\n let mut reader: Reader<1> = Reader::new(input_calldata);\n let arg0: bool = reader.read_struct(<bool as Deserialize>::deserialize);\n set_reject_all(arg0);\n avm::avm_return([].as_vector());\n };\n if selector == CONSUME_SELECTOR {\n let input_calldata: [Field; 2] =\n avm::calldata_copy(1, <AztecAddress as Serialize>::N + <Field as Serialize>::N);\n let mut reader: Reader<2> = Reader::new(input_calldata);\n let arg0: AztecAddress = reader.read_struct(<AztecAddress as Deserialize>::deserialize);\n let arg1: Field = reader.read_struct(<Field as Deserialize>::deserialize);\n let return_value: [Field; 1] = <Field as Serialize>::serialize(consume(arg0, arg1));\n avm::avm_return(return_value.as_vector());\n };\n if selector == _SET_AUTHORIZED_SELECTOR {\n let input_calldata: [Field; 3] = avm::calldata_copy(\n 1,\n (<AztecAddress as Serialize>::N + <Field as Serialize>::N) + <bool as Serialize>::N,\n );\n let mut reader: Reader<3> = Reader::new(input_calldata);\n let arg0: AztecAddress = reader.read_struct(<AztecAddress as Deserialize>::deserialize);\n let arg1: Field = reader.read_struct(<Field as Deserialize>::deserialize);\n let arg2: bool = reader.read_struct(<bool as Deserialize>::deserialize);\n _set_authorized(arg0, arg1, arg2);\n avm::avm_return([].as_vector());\n };\n if selector == IS_REJECT_ALL_SELECTOR {\n let input_calldata: [Field; 1] = avm::calldata_copy(1, <AztecAddress as Serialize>::N);\n let mut reader: Reader<1> = Reader::new(input_calldata);\n let arg0: AztecAddress = reader.read_struct(<AztecAddress as Deserialize>::deserialize);\n let return_value: [Field; 1] = <bool as Serialize>::serialize(is_reject_all(arg0));\n avm::avm_return(return_value.as_vector());\n };\n if selector == IS_CONSUMABLE_SELECTOR {\n let input_calldata: [Field; 2] =\n avm::calldata_copy(1, <AztecAddress as Serialize>::N + <Field as Serialize>::N);\n let mut reader: Reader<2> = Reader::new(input_calldata);\n let arg0: AztecAddress = reader.read_struct(<AztecAddress as Deserialize>::deserialize);\n let arg1: Field = reader.read_struct(<Field as Deserialize>::deserialize);\n let return_value: [Field; 1] =\n <bool as Serialize>::serialize(is_consumable(arg0, arg1));\n avm::avm_return(return_value.as_vector());\n };\n panic(f\"Unknown selector {selector}\")\n }\n\n impl<Context> Storage<Context> {\n fn init(context: Context) -> Self {\n Self {\n reject_all: <Map<AztecAddress, PublicMutable<bool, Context>, Context> as StateVariable<1, Context>>::new(\n context,\n 1,\n ),\n approved_actions: <Map<AztecAddress, Map<Field, PublicMutable<bool, Context>, Context>, Context> as StateVariable<1, Context>>::new(\n context,\n 2,\n ),\n }\n }\n }\n\n // Parameter structs for ABI\n pub struct _set_authorized_parameters {\n pub _approver: AztecAddress,\n pub _message_hash: Field,\n pub _authorize: bool,\n }\n\n pub struct consume_parameters {\n pub _on_behalf_of: AztecAddress,\n pub _inner_hash: Field,\n }\n\n pub struct is_consumable_parameters {\n pub _on_behalf_of: AztecAddress,\n pub _message_hash: Field,\n }\n\n pub struct is_reject_all_parameters {\n pub _on_behalf_of: AztecAddress,\n }\n\n pub struct set_authorized_parameters {\n pub _message_hash: Field,\n pub _authorize: bool,\n }\n\n pub struct set_authorized_private_parameters {\n pub _approver: AztecAddress,\n pub _message_hash: Field,\n pub _authorize: bool,\n }\n\n pub struct set_reject_all_parameters {\n pub _reject: bool,\n }\n\n pub struct utility_is_consumable_parameters {\n pub _on_behalf_of: AztecAddress,\n pub _message_hash: Field,\n }\n\n // ABI structs\n #[abi(functions)]\n pub struct _set_authorized_abi {\n parameters: _set_authorized_parameters,\n }\n\n #[abi(functions)]\n pub struct consume_abi {\n parameters: consume_parameters,\n return_type: Field,\n }\n\n #[abi(functions)]\n pub struct is_consumable_abi {\n parameters: is_consumable_parameters,\n return_type: bool,\n }\n\n #[abi(functions)]\n pub struct is_reject_all_abi {\n parameters: is_reject_all_parameters,\n return_type: bool,\n }\n\n #[abi(functions)]\n pub struct set_authorized_abi {\n parameters: set_authorized_parameters,\n }\n\n #[abi(functions)]\n pub struct set_authorized_private_abi {\n parameters: set_authorized_private_parameters,\n }\n\n #[abi(functions)]\n pub struct set_reject_all_abi {\n parameters: set_reject_all_parameters,\n }\n\n #[abi(functions)]\n pub struct utility_is_consumable_abi {\n parameters: utility_is_consumable_parameters,\n return_type: bool,\n }\n}\n"
|
|
2702
|
-
},
|
|
2703
|
-
"52": {
|
|
2704
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-contracts/contracts/protocol/aztec_sublib/src/authwit/auth.nr",
|
|
2705
|
-
"source": "use crate::context::{gas::GasOpts, PrivateContext, PublicContext};\nuse crate::protocol::{\n abis::function_selector::FunctionSelector,\n address::AztecAddress,\n constants::{\n CANONICAL_AUTH_REGISTRY_ADDRESS, DOM_SEP__AUTHWIT_INNER, DOM_SEP__AUTHWIT_NULLIFIER,\n DOM_SEP__AUTHWIT_OUTER,\n },\n hash::poseidon2_hash_with_separator,\n traits::ToField,\n};\n\n/// Success indicator for authwit - 4 last bytes of poseidon2_hash_bytes(\"IS_VALID()\")\npub global IS_VALID_SELECTOR: Field = 0x47dacd73;\n\n/// Assert that `on_behalf_of` has authorized the current call with a valid authentication witness\n///\n/// @param on_behalf_of The address that has allegedly authorized the current call\npub fn assert_current_call_valid_authwit<let N: u32>(\n context: &mut PrivateContext,\n on_behalf_of: AztecAddress,\n) {\n let args_hash: Field = context.get_args_hash();\n\n let inner_hash = compute_inner_authwit_hash([\n context.maybe_msg_sender().unwrap().to_field(),\n context.selector().to_field(),\n args_hash,\n ]);\n\n assert_inner_hash_valid_authwit(context, on_behalf_of, inner_hash);\n}\n\n/// Assert that a specific `inner_hash` is valid for the `on_behalf_of` address\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\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 to prevent replay attacks\n let nullifier = compute_authwit_nullifier(on_behalf_of, inner_hash);\n context.push_nullifier(nullifier);\n}\n\n/// Assert that `on_behalf_of` has authorized the current call in the authentication registry\n///\n/// @param on_behalf_of The address that has allegedly authorized the current call\npub unconstrained fn assert_current_call_valid_authwit_public(\n context: PublicContext,\n on_behalf_of: AztecAddress,\n) {\n let inner_hash = compute_inner_authwit_hash([\n context.maybe_msg_sender().unwrap().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\n/// Assert that `on_behalf_of` has authorized a specific `inner_hash` in the authentication registry\n///\n/// @param on_behalf_of The address that has allegedly authorized the `inner_hash`\npub unconstrained fn assert_inner_hash_valid_authwit_public(\n context: 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],\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/// Computes the `inner_hash` of the authentication witness\n///\n/// @param args The arguments to hash\npub fn compute_inner_authwit_hash<let N: u32>(args: [Field; N]) -> Field {\n poseidon2_hash_with_separator(args, DOM_SEP__AUTHWIT_INNER)\n}\n\n/// Computes the `authwit_nullifier` for a specific `on_behalf_of` and `inner_hash`\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\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 DOM_SEP__AUTHWIT_NULLIFIER,\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\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 DOM_SEP__AUTHWIT_OUTER,\n )\n}\n\n/// Helper function 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\npub unconstrained fn set_authorized(context: PublicContext, message_hash: Field, authorize: bool) {\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],\n GasOpts::default(),\n );\n assert(res.len() == 0);\n}\n\n/// Helper function to reject all authwits\n///\n/// @param reject True if all authwits should be rejected, false otherwise\npub unconstrained fn set_reject_all(context: 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],\n GasOpts::default(),\n );\n assert(res.len() == 0);\n}\n"
|
|
2706
|
-
},
|
|
2707
|
-
"58": {
|
|
2708
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-contracts/contracts/protocol/aztec_sublib/src/context/private_context.nr",
|
|
2709
|
-
"source": "use crate::{\n context::{inputs::PrivateContextInputs, NullifierExistenceRequest, ReturnsHash},\n hash::hash_args,\n messaging::process_l1_to_l2_message,\n oracle::{\n call_private_function::call_private_function_internal,\n enqueue_public_function_call::{\n is_side_effect_counter_revertible_oracle_wrapper, notify_enqueued_public_function_call,\n notify_set_min_revertible_side_effect_counter,\n },\n execution_cache,\n logs::notify_created_contract_class_log,\n nullifiers::notify_created_nullifier,\n },\n};\nuse crate::protocol::{\n abis::{\n block_header::BlockHeader,\n call_context::CallContext,\n function_selector::FunctionSelector,\n gas_settings::GasSettings,\n log_hash::LogHash,\n nullifier::Nullifier,\n private_call_request::PrivateCallRequest,\n private_circuit_public_inputs::PrivateCircuitPublicInputs,\n private_log::{PrivateLog, PrivateLogData},\n public_call_request::PublicCallRequest,\n },\n address::{AztecAddress, EthAddress},\n constants::{\n CONTRACT_CLASS_LOG_SIZE_IN_FIELDS, MAX_CONTRACT_CLASS_LOGS_PER_CALL,\n MAX_ENQUEUED_CALLS_PER_CALL, MAX_INCLUDE_BY_TIMESTAMP_DURATION, MAX_L2_TO_L1_MSGS_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 NULL_MSG_SENDER_CONTRACT_ADDRESS, PRIVATE_LOG_SIZE_IN_FIELDS,\n },\n hash::poseidon2_hash,\n messaging::l2_to_l1_message::L2ToL1Message,\n side_effect::{Counted, scoped::Scoped},\n traits::Empty,\n utils::arrays::{ClaimedLengthArray, trimmed_array_length_hint},\n};\n\n/// Minimal PrivateContext for protocol contracts going to audit.\n/// Contains only the methods actually used by: fee_juice, auth_registry, contract_class_registry, contract_instance_registry\n#[derive(Eq)]\npub struct PrivateContext {\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 include_by_timestamp: u64,\n\n pub nullifier_read_requests: BoundedVec<Scoped<Counted<Field>>, MAX_NULLIFIER_READ_REQUESTS_PER_CALL>,\n\n pub nullifiers: BoundedVec<Counted<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<Counted<L2ToL1Message>, MAX_L2_TO_L1_MSGS_PER_CALL>,\n\n // Header of a block whose state is used during private execution (not the block the transaction is included in).\n pub anchor_block_header: BlockHeader,\n\n pub private_logs: BoundedVec<Counted<PrivateLogData>, MAX_PRIVATE_LOGS_PER_CALL>,\n pub contract_class_logs_hashes: BoundedVec<Counted<LogHash>, MAX_CONTRACT_CLASS_LOGS_PER_CALL>,\n\n pub expected_non_revertible_side_effect_counter: u32,\n pub expected_revertible_side_effect_counter: u32,\n}\n\nimpl PrivateContext {\n pub fn new(inputs: PrivateContextInputs, args_hash: Field) -> PrivateContext {\n let max_allowed_include_by_timestamp = inputs.anchor_block_header.global_variables.timestamp\n + MAX_INCLUDE_BY_TIMESTAMP_DURATION;\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 include_by_timestamp: max_allowed_include_by_timestamp,\n nullifier_read_requests: BoundedVec::new(),\n nullifiers: BoundedVec::new(),\n anchor_block_header: inputs.anchor_block_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 expected_non_revertible_side_effect_counter: 0,\n expected_revertible_side_effect_counter: 0,\n }\n }\n\n /// Returns the contract address that initiated this function call (similar to msg.sender in Solidity).\n pub fn maybe_msg_sender(self) -> Option<AztecAddress> {\n let maybe_msg_sender = self.inputs.call_context.msg_sender;\n if maybe_msg_sender == NULL_MSG_SENDER_CONTRACT_ADDRESS {\n Option::none()\n } else {\n Option::some(maybe_msg_sender)\n }\n }\n\n /// Returns the contract address of the current function being executed.\n pub fn this_address(self) -> AztecAddress {\n self.inputs.call_context.contract_address\n }\n\n /// Returns the chain ID of the current network.\n pub fn chain_id(self) -> Field {\n self.inputs.tx_context.chain_id\n }\n\n /// Returns the protocol version.\n pub fn version(self) -> Field {\n self.inputs.tx_context.version\n }\n\n /// Returns the gas settings for the current transaction.\n pub fn gas_settings(self) -> GasSettings {\n self.inputs.tx_context.gas_settings\n }\n\n /// Returns the function selector of the currently executing function.\n pub fn selector(self) -> FunctionSelector {\n self.inputs.call_context.function_selector\n }\n\n /// Returns the hash of the arguments passed to the current function.\n pub fn get_args_hash(self) -> Field {\n self.args_hash\n }\n\n /// Returns the anchor block header.\n pub fn get_anchor_block_header(self) -> BlockHeader {\n self.anchor_block_header\n }\n\n /// Sets the hash of the return values for this private function.\n pub fn set_return_hash<let N: u32>(&mut self, serialized_return_values: [Field; N]) {\n let return_hash = hash_args(serialized_return_values);\n self.return_hash = return_hash;\n execution_cache::store(serialized_return_values, return_hash);\n }\n\n /// Builds the PrivateCircuitPublicInputs for this private function.\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 include_by_timestamp: self.include_by_timestamp,\n note_hash_read_requests: ClaimedLengthArray::empty(), // Not used by protocol contracts\n nullifier_read_requests: ClaimedLengthArray::from_bounded_vec(\n self.nullifier_read_requests,\n ),\n key_validation_requests_and_generators: ClaimedLengthArray::empty(), // Not used by protocol contracts\n note_hashes: ClaimedLengthArray::empty(), // Not used by protocol contracts\n nullifiers: ClaimedLengthArray::from_bounded_vec(self.nullifiers),\n private_call_requests: ClaimedLengthArray::from_bounded_vec(self.private_call_requests),\n public_call_requests: ClaimedLengthArray::from_bounded_vec(self.public_call_requests),\n public_teardown_call_request: self.public_teardown_call_request,\n l2_to_l1_msgs: ClaimedLengthArray::from_bounded_vec(self.l2_to_l1_msgs),\n start_side_effect_counter: self.inputs.start_side_effect_counter,\n end_side_effect_counter: self.side_effect_counter,\n private_logs: ClaimedLengthArray::from_bounded_vec(self.private_logs),\n contract_class_logs_hashes: ClaimedLengthArray::from_bounded_vec(\n self.contract_class_logs_hashes,\n ),\n anchor_block_header: self.anchor_block_header,\n tx_context: self.inputs.tx_context,\n expected_non_revertible_side_effect_counter: self\n .expected_non_revertible_side_effect_counter,\n expected_revertible_side_effect_counter: self.expected_revertible_side_effect_counter,\n }\n }\n\n /// Declares the end of the \"setup phase\" of this tx. Used by fee_juice.\n pub fn end_setup(&mut self) {\n self.side_effect_counter += 1;\n self.min_revertible_side_effect_counter = self.next_counter();\n notify_set_min_revertible_side_effect_counter(self.min_revertible_side_effect_counter);\n }\n\n pub fn in_revertible_phase(&mut self) -> bool {\n let current_counter = self.side_effect_counter;\n\n // Safety: Kernel will validate that the claim is correct by validating the expected counters.\n let is_revertible =\n unsafe { is_side_effect_counter_revertible_oracle_wrapper(current_counter) };\n\n if is_revertible {\n if (self.expected_revertible_side_effect_counter == 0)\n | (current_counter < self.expected_revertible_side_effect_counter) {\n self.expected_revertible_side_effect_counter = current_counter;\n }\n } else if current_counter > self.expected_non_revertible_side_effect_counter {\n self.expected_non_revertible_side_effect_counter = current_counter;\n }\n\n is_revertible\n }\n\n /// Sets a deadline for when this transaction must be included in a block.\n pub fn set_include_by_timestamp(&mut self, include_by_timestamp: u64) {\n self.include_by_timestamp = std::cmp::min(self.include_by_timestamp, include_by_timestamp);\n }\n\n /// Pushes a new nullifier. Used by class_registry and instance_registry.\n pub fn push_nullifier(&mut self, nullifier: Field) {\n notify_created_nullifier(nullifier);\n self.nullifiers.push(Nullifier { value: nullifier, note_hash: 0 }.count(self.next_counter()));\n }\n\n /// Asserts that a nullifier has been emitted. Used by instance_registry.\n pub fn assert_nullifier_exists(\n &mut self,\n nullifier_existence_request: NullifierExistenceRequest,\n ) {\n let nullifier = nullifier_existence_request.nullifier();\n let contract_address =\n nullifier_existence_request.maybe_contract_address().unwrap_or(AztecAddress::zero());\n\n let request = Scoped::new(\n Counted::new(nullifier, self.next_counter()),\n contract_address,\n );\n\n self.nullifier_read_requests.push(request);\n }\n\n /// Consumes a message sent from Ethereum (L1) to Aztec (L2). Used by fee_juice.\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 nullifier = process_l1_to_l2_message(\n self.anchor_block_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\n /// Emits a private log. Used by instance_registry.\n pub fn emit_private_log(&mut self, log: [Field; PRIVATE_LOG_SIZE_IN_FIELDS], length: u32) {\n let counter = self.next_counter();\n let private_log = PrivateLogData { log: PrivateLog::new(log, length), note_hash_counter: 0 }\n .count(counter);\n self.private_logs.push(private_log);\n }\n\n /// Emits a contract class log. Used by class_registry.\n pub fn emit_contract_class_log<let N: u32>(&mut self, log: [Field; N]) {\n let contract_address = self.this_address();\n let counter = self.next_counter();\n\n let log_to_emit: [Field; CONTRACT_CLASS_LOG_SIZE_IN_FIELDS] =\n log.concat([0; CONTRACT_CLASS_LOG_SIZE_IN_FIELDS - N]);\n // Safety: The below length is constrained in the base rollup, which will make sure that all the fields beyond\n // length are zero. However, it won't be able to check that we didn't add extra padding (trailing zeroes) or\n // that we cut trailing zeroes from the end.\n let length = unsafe { trimmed_array_length_hint(log_to_emit) };\n // We hash the entire padded log to ensure a user cannot pass a shorter length and so emit incorrect shorter\n // bytecode.\n let log_hash = poseidon2_hash(log_to_emit);\n // Safety: the below only exists to broadcast the raw log, so we can provide it to the base rollup later to be\n // constrained.\n unsafe {\n notify_created_contract_class_log(contract_address, log_to_emit, length, counter);\n }\n\n self.contract_class_logs_hashes.push(LogHash { value: log_hash, length: length }.count(\n counter,\n ));\n }\n\n /// Makes a read-only call to a private function. Used by auth_registry for authwit.\n pub fn static_call_private_function<let ArgsCount: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ArgsCount],\n ) -> ReturnsHash {\n let args_hash = hash_args(args);\n execution_cache::store(args, args_hash);\n self.call_private_function_with_args_hash(\n contract_address,\n function_selector,\n args_hash,\n true,\n )\n }\n\n 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.\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 self.side_effect_counter = end_side_effect_counter + 1;\n ReturnsHash::new(returns_hash)\n }\n\n /// Enqueues a call to a public function with a calldata hash. Used by fee_juice and auth_registry.\n pub fn call_public_function_with_calldata_hash(\n &mut self,\n contract_address: AztecAddress,\n calldata_hash: Field,\n is_static_call: bool,\n hide_msg_sender: 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\n notify_enqueued_public_function_call(\n contract_address,\n calldata_hash,\n counter,\n is_static_call,\n );\n\n let msg_sender = if hide_msg_sender {\n NULL_MSG_SENDER_CONTRACT_ADDRESS\n } else {\n self.this_address()\n };\n\n let call_request =\n PublicCallRequest { msg_sender, contract_address, is_static_call, calldata_hash };\n\n self.public_call_requests.push(Counted::new(call_request, counter));\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 include_by_timestamp: 0,\n nullifier_read_requests: 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 anchor_block_header: BlockHeader::empty(),\n private_logs: BoundedVec::new(),\n contract_class_logs_hashes: BoundedVec::new(),\n expected_non_revertible_side_effect_counter: 0,\n expected_revertible_side_effect_counter: 0,\n }\n }\n}\n"
|
|
2710
|
-
},
|
|
2711
|
-
"59": {
|
|
2712
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-contracts/contracts/protocol/aztec_sublib/src/context/public_context.nr",
|
|
2713
|
-
"source": "use crate::{\n context::gas::GasOpts,\n hash::{\n compute_l1_to_l2_message_hash, compute_l1_to_l2_message_nullifier, compute_secret_hash,\n compute_siloed_nullifier,\n },\n oracle::avm,\n};\nuse crate::protocol::{\n abis::function_selector::FunctionSelector,\n address::{AztecAddress, EthAddress},\n constants::{MAX_U32_VALUE, NULL_MSG_SENDER_CONTRACT_ADDRESS},\n traits::{Empty, FromField, Packable, Serialize, ToField},\n};\n\n/// Minimal PublicContext for protocol contracts going to audit.\npub struct PublicContext {\n pub args_hash: Option<Field>,\n pub compute_args_hash: fn() -> Field,\n}\n\nimpl Eq for PublicContext {\n fn eq(self, other: Self) -> bool {\n (self.args_hash == other.args_hash)\n // Can't compare the function compute_args_hash\n }\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 /// Emits a _public_ log that will be visible onchain to everyone.\n pub fn emit_public_log<T>(_self: Self, log: T)\n where\n T: Serialize,\n {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { avm::emit_public_log(Serialize::serialize(log).as_vector()) };\n }\n\n /// Checks if a given note hash exists in the note hash tree at a particular leaf_index.\n pub fn note_hash_exists(_self: Self, note_hash: Field, leaf_index: u64) -> bool {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { avm::note_hash_exists(note_hash, leaf_index) } == 1\n }\n\n /// Checks if a specific L1-to-L2 message exists in the L1-to-L2 message tree at a particular leaf index.\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 TODO(alvaro): Make l1l2msg leaf index a u64 upstream\n unsafe { avm::l1_to_l2_msg_exists(msg_hash, msg_leaf_index as u64) } == 1\n }\n\n /// Returns `true` if an `unsiloed_nullifier` has been emitted by `contract_address`.\n pub fn nullifier_exists_unsafe(\n _self: Self,\n unsiloed_nullifier: Field,\n contract_address: AztecAddress,\n ) -> bool {\n let siloed_nullifier = compute_siloed_nullifier(contract_address, unsiloed_nullifier);\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { avm::nullifier_exists(siloed_nullifier) } == 1\n }\n\n /// Consumes a message sent from Ethereum (L1) to Aztec (L2).\n pub fn consume_l1_to_l2_message(\n self: 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_unsafe(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 /// Sends an \"L2 -> L1 message\".\n pub fn message_portal(_self: Self, recipient: EthAddress, content: Field) {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { avm::send_l2_to_l1_msg(recipient, content) };\n }\n\n /// Calls a public function on another contract.\n pub unconstrained fn call_public_function<let N: u32>(\n _self: Self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; N],\n gas_opts: GasOpts,\n ) -> [Field] {\n let calldata = [function_selector.to_field()].concat(args);\n\n avm::call(\n gas_opts.l2_gas.unwrap_or(MAX_U32_VALUE),\n gas_opts.da_gas.unwrap_or(MAX_U32_VALUE),\n contract_address,\n calldata,\n );\n // Use success_copy to determine whether the call succeeded\n let success = avm::success_copy();\n\n let result_data = avm::returndata_copy(0, avm::returndata_size());\n if !success {\n // Rethrow the revert data.\n avm::revert(result_data);\n }\n result_data\n }\n\n /// Makes a read-only call to a public function on another contract.\n pub unconstrained fn static_call_public_function<let N: u32>(\n _self: Self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; N],\n gas_opts: GasOpts,\n ) -> [Field] {\n let calldata = [function_selector.to_field()].concat(args);\n\n avm::call_static(\n gas_opts.l2_gas.unwrap_or(MAX_U32_VALUE),\n gas_opts.da_gas.unwrap_or(MAX_U32_VALUE),\n contract_address,\n calldata,\n );\n // Use success_copy to determine whether the call succeeded\n let success = avm::success_copy();\n\n let result_data = avm::returndata_copy(0, avm::returndata_size());\n if !success {\n // Rethrow the revert data.\n avm::revert(result_data);\n }\n result_data\n }\n\n /// Adds a new note hash to the Note Hash Tree.\n pub fn push_note_hash(_self: Self, note_hash: Field) {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { avm::emit_note_hash(note_hash) };\n }\n\n /// Adds a new nullifier to the Nullifier Tree.\n pub fn push_nullifier(_self: Self, nullifier: Field) {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { avm::emit_nullifier(nullifier) };\n }\n\n /// Returns the address of the current contract being executed.\n pub fn this_address(_self: Self) -> AztecAddress {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::address()\n }\n }\n\n /// Returns the contract address that initiated this function call.\n pub fn maybe_msg_sender(_self: Self) -> Option<AztecAddress> {\n // Safety: AVM opcodes are constrained by the AVM itself\n let maybe_msg_sender = unsafe { avm::sender() };\n if maybe_msg_sender == NULL_MSG_SENDER_CONTRACT_ADDRESS {\n Option::none()\n } else {\n Option::some(maybe_msg_sender)\n }\n }\n\n /// Returns the function selector of the currently-executing function.\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 { avm::calldata_copy(0, 1) };\n FunctionSelector::from_field(raw_selector[0])\n }\n\n /// Returns the hash of the arguments passed to the current function.\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\n /// Returns the \"transaction fee\" for the current transaction.\n pub fn transaction_fee(_self: Self) -> Field {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::transaction_fee()\n }\n }\n\n /// Returns the chain ID of the current network.\n pub fn chain_id(_self: Self) -> Field {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::chain_id()\n }\n }\n\n /// Returns the protocol version.\n pub fn version(_self: Self) -> Field {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::version()\n }\n }\n\n /// Returns the current block number.\n pub fn block_number(_self: Self) -> u32 {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::block_number()\n }\n }\n\n /// Returns the timestamp of the current block.\n pub fn timestamp(_self: Self) -> u64 {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::timestamp()\n }\n }\n\n /// Returns the fee per unit of L2 gas.\n pub fn min_fee_per_l2_gas(_self: Self) -> u128 {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::min_fee_per_l2_gas()\n }\n }\n\n /// Returns the fee per unit of DA gas.\n pub fn min_fee_per_da_gas(_self: Self) -> u128 {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::min_fee_per_da_gas()\n }\n }\n\n /// Returns the remaining L2 gas available.\n pub fn l2_gas_left(_self: Self) -> u32 {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::l2_gas_left()\n }\n }\n\n /// Returns the remaining DA gas available.\n pub fn da_gas_left(_self: Self) -> u32 {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::da_gas_left()\n }\n }\n\n /// Checks if the current execution is within a staticcall context.\n pub fn is_static_call(_self: Self) -> bool {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { avm::is_static_call() } == 1\n }\n\n /// Reads raw field values from public storage.\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 {\n avm::storage_read(storage_slot + i as Field, self.this_address().to_field())\n };\n }\n out\n }\n\n /// Reads a typed value from public storage.\n pub fn storage_read<T>(self, storage_slot: Field) -> T\n where\n T: Packable,\n {\n T::unpack(self.raw_storage_read(storage_slot))\n }\n\n /// Writes raw field values to public storage.\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 { avm::storage_write(storage_slot + i as Field, values[i]) };\n }\n }\n\n /// Writes a typed value to public storage.\n pub fn storage_write<T>(self, storage_slot: Field, value: T)\n where\n T: Packable,\n {\n self.raw_storage_write(storage_slot, value.pack());\n }\n}\n\nimpl Empty for PublicContext {\n fn empty() -> Self {\n PublicContext::new(|| 0)\n }\n}\n"
|
|
2714
|
-
},
|
|
2715
|
-
"60": {
|
|
2716
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-contracts/contracts/protocol/aztec_sublib/src/context/returns_hash.nr",
|
|
2717
|
-
"source": "use crate::{hash::hash_args, oracle::execution_cache};\nuse crate::protocol::traits::Deserialize;\n\n/// A hash that represents a private contract function call's return value. Call `get_preimage` to get the underlying\n/// value.\n///\n/// The kernels don't process the actual return values but instead their hashes, so it is up to contracts to populate\n/// oracles with the preimages of these hashes on return to make them available to their callers.\n///\n/// Public calls don't utilize this mechanism since the AVM does process the full return values.\npub struct ReturnsHash {\n hash: Field,\n}\n\nimpl ReturnsHash {\n pub fn new(hash: Field) -> Self {\n ReturnsHash { hash }\n }\n\n /// Fetches the underlying return value from an oracle, constraining that it corresponds to the return data hash.\n pub fn get_preimage<T>(self) -> T\n where\n T: Deserialize,\n {\n // Safety: We verify that the value returned by `load` is the preimage of `hash`, fully constraining it. If `T`\n // is `()`, then `preimage` must be an array of length 0 (since that is `()`'s deserialization length).\n // `hash_args` handles empty arrays following the protocol rules (i.e. an empty args array is signaled with a\n // zero hash), correctly constraining `self.hash`.\n let preimage = unsafe { execution_cache::load(self.hash) };\n assert_eq(self.hash, hash_args(preimage), \"Preimage mismatch\");\n\n Deserialize::deserialize(preimage)\n }\n}\n"
|
|
2718
|
-
},
|
|
2719
|
-
"61": {
|
|
2720
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-contracts/contracts/protocol/aztec_sublib/src/context/utility_context.nr",
|
|
2721
|
-
"source": "use crate::oracle::{execution::get_utility_context, storage::storage_read};\nuse crate::protocol::{abis::block_header::BlockHeader, address::AztecAddress, traits::Packable};\n\n// If you'll modify this struct don't forget to update utility_context.ts as well.\npub struct UtilityContext {\n block_header: BlockHeader,\n contract_address: AztecAddress,\n}\n\nimpl UtilityContext {\n pub unconstrained fn new() -> Self {\n get_utility_context()\n }\n\n pub unconstrained fn at(contract_address: AztecAddress) -> Self {\n // We get a context with default contract address, and then we construct the final context with the provided\n // contract address.\n let default_context = get_utility_context();\n\n Self { block_header: default_context.block_header, contract_address }\n }\n\n pub fn block_header(self) -> BlockHeader {\n self.block_header\n }\n\n pub fn block_number(self) -> u32 {\n self.block_header.global_variables.block_number\n }\n\n pub fn timestamp(self) -> u64 {\n self.block_header.global_variables.timestamp\n }\n\n pub fn this_address(self) -> AztecAddress {\n self.contract_address\n }\n\n pub fn version(self) -> Field {\n self.block_header.global_variables.version\n }\n\n pub fn chain_id(self) -> Field {\n self.block_header.global_variables.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.block_header, self.this_address(), storage_slot)\n }\n\n pub unconstrained fn storage_read<T>(self, storage_slot: Field) -> T\n where\n T: Packable,\n {\n T::unpack(self.raw_storage_read(storage_slot))\n }\n}\n"
|
|
2722
|
-
},
|
|
2723
|
-
"62": {
|
|
2724
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-contracts/contracts/protocol/aztec_sublib/src/hash.nr",
|
|
2725
|
-
"source": "//! Aztec hash functions.\n\nuse crate::protocol::{\n address::{AztecAddress, EthAddress},\n constants::{\n DOM_SEP__FUNCTION_ARGS, DOM_SEP__MESSAGE_NULLIFIER, DOM_SEP__PUBLIC_BYTECODE,\n DOM_SEP__PUBLIC_CALLDATA, DOM_SEP__SECRET_HASH, MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS,\n },\n hash::{poseidon2_hash_subarray, poseidon2_hash_with_separator, sha256_to_field},\n traits::ToField,\n};\n\npub use crate::protocol::hash::compute_siloed_nullifier;\n\npub fn compute_secret_hash(secret: Field) -> Field {\n poseidon2_hash_with_separator([secret], DOM_SEP__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], DOM_SEP__MESSAGE_NULLIFIER)\n}\n\n// Computes the hash of input arguments or return values for private functions, or for authwit creation.\npub fn hash_args<let N: u32>(args: [Field; N]) -> Field {\n if args.len() == 0 {\n 0\n } else {\n poseidon2_hash_with_separator(args, DOM_SEP__FUNCTION_ARGS)\n }\n}\n\n// Computes the hash of calldata for public functions.\npub fn hash_calldata_array<let N: u32>(calldata: [Field; N]) -> Field {\n poseidon2_hash_with_separator(calldata, DOM_SEP__PUBLIC_CALLDATA)\n}\n\n/// Computes the public bytecode commitment for a contract class. The commitment is `hash([separator, ...bytecode])`\n/// where bytecode omits the length prefix present in `packed_bytecode`.\n///\n/// @param packed_bytecode - The packed bytecode of the contract class. 0th word is the length in bytes.\n/// packed_bytecode is mutable so that we can avoid copying the array to construct one starting with separator instead\n/// of length. @returns The public bytecode commitment.\npub fn compute_public_bytecode_commitment(\n mut packed_public_bytecode: [Field; MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS],\n) -> Field {\n // First field element contains the length of the bytecode\n let bytecode_length_in_bytes: u32 = packed_public_bytecode[0] as u32;\n let bytecode_length_in_fields: u32 =\n (bytecode_length_in_bytes / 31) + (bytecode_length_in_bytes % 31 != 0) as u32;\n // Don't allow empty public bytecode. AVM doesn't handle execution of contracts that exist with empty bytecode.\n assert(bytecode_length_in_fields != 0);\n assert(bytecode_length_in_fields < MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS);\n\n // Packed_bytecode's 0th entry is the length. Replace it with separator before hashing.\n let separator = DOM_SEP__PUBLIC_BYTECODE.to_field();\n packed_public_bytecode[0] = separator;\n\n // `fields_to_hash` is the number of fields from the start of `packed_public_bytecode` that should be included in\n // the hash. Fields after this length are ignored. +1 to account for the separator.\n let num_fields_to_hash = bytecode_length_in_fields + 1;\n\n poseidon2_hash_subarray(packed_public_bytecode, num_fields_to_hash)\n}\n"
|
|
2726
|
-
},
|
|
2727
|
-
"72": {
|
|
2728
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-contracts/contracts/protocol/aztec_sublib/src/oracle/avm.nr",
|
|
2729
|
-
"source": "//! AVM oracles.\n//!\n//! There are only available during public execution. Calling any of them from a private or utility function will\n//! result in runtime errors.\n\nuse crate::protocol::address::{AztecAddress, EthAddress};\n\npub unconstrained fn address() -> AztecAddress {\n address_opcode()\n}\npub unconstrained fn sender() -> AztecAddress {\n sender_opcode()\n}\npub unconstrained fn transaction_fee() -> Field {\n transaction_fee_opcode()\n}\npub unconstrained fn chain_id() -> Field {\n chain_id_opcode()\n}\npub unconstrained fn version() -> Field {\n version_opcode()\n}\npub unconstrained fn block_number() -> u32 {\n block_number_opcode()\n}\npub unconstrained fn timestamp() -> u64 {\n timestamp_opcode()\n}\npub unconstrained fn min_fee_per_l2_gas() -> u128 {\n min_fee_per_l2_gas_opcode()\n}\npub unconstrained fn min_fee_per_da_gas() -> u128 {\n min_fee_per_da_gas_opcode()\n}\npub unconstrained fn l2_gas_left() -> u32 {\n l2_gas_left_opcode()\n}\npub unconstrained fn da_gas_left() -> u32 {\n da_gas_left_opcode()\n}\npub unconstrained fn is_static_call() -> u1 {\n is_static_call_opcode()\n}\npub unconstrained fn note_hash_exists(note_hash: Field, leaf_index: u64) -> u1 {\n note_hash_exists_opcode(note_hash, leaf_index)\n}\npub unconstrained fn emit_note_hash(note_hash: Field) {\n emit_note_hash_opcode(note_hash)\n}\npub unconstrained fn nullifier_exists(siloed_nullifier: Field) -> u1 {\n nullifier_exists_opcode(siloed_nullifier)\n}\npub unconstrained fn emit_nullifier(nullifier: Field) {\n emit_nullifier_opcode(nullifier)\n}\npub unconstrained fn emit_public_log(message: [Field]) {\n emit_public_log_opcode(message)\n}\npub unconstrained fn l1_to_l2_msg_exists(msg_hash: Field, msg_leaf_index: u64) -> u1 {\n l1_to_l2_msg_exists_opcode(msg_hash, msg_leaf_index)\n}\npub unconstrained fn send_l2_to_l1_msg(recipient: EthAddress, content: Field) {\n send_l2_to_l1_msg_opcode(recipient, content)\n}\n\npub unconstrained fn call<let N: u32>(\n l2_gas_allocation: u32,\n da_gas_allocation: u32,\n address: AztecAddress,\n args: [Field; N],\n) {\n call_opcode(l2_gas_allocation, da_gas_allocation, address, N, args)\n}\n\npub unconstrained fn call_static<let N: u32>(\n l2_gas_allocation: u32,\n da_gas_allocation: u32,\n address: AztecAddress,\n args: [Field; N],\n) {\n call_static_opcode(l2_gas_allocation, da_gas_allocation, address, N, 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\npub unconstrained fn success_copy() -> bool {\n success_copy_opcode()\n}\n\npub unconstrained fn returndata_size() -> u32 {\n returndata_size_opcode()\n}\n\npub unconstrained fn returndata_copy(rdoffset: u32, copy_size: u32) -> [Field] {\n returndata_copy_opcode(rdoffset, copy_size)\n}\n\n/// The additional prefix is to avoid clashing with the `return` Noir keyword.\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 to do rethrows, where the revert\n/// data is the same as the original revert data. For normal reverts, use Noir's `assert` which, on top of reverting,\n/// will also add an error selector to the revert data.\npub unconstrained fn revert(revertdata: [Field]) {\n revert_opcode(revertdata)\n}\n\npub unconstrained fn storage_read(storage_slot: Field, contract_address: Field) -> Field {\n storage_read_opcode(storage_slot, contract_address)\n}\n\npub unconstrained fn storage_write(storage_slot: Field, value: Field) {\n storage_write_opcode(storage_slot, value);\n}\n\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() -> u32 {}\n\n#[oracle(avmOpcodeTimestamp)]\nunconstrained fn timestamp_opcode() -> u64 {}\n\n#[oracle(avmOpcodeMinFeePerL2Gas)]\nunconstrained fn min_fee_per_l2_gas_opcode() -> u128 {}\n\n#[oracle(avmOpcodeMinFeePerDaGas)]\nunconstrained fn min_fee_per_da_gas_opcode() -> u128 {}\n\n#[oracle(avmOpcodeL2GasLeft)]\nunconstrained fn l2_gas_left_opcode() -> u32 {}\n\n#[oracle(avmOpcodeDaGasLeft)]\nunconstrained fn da_gas_left_opcode() -> u32 {}\n\n#[oracle(avmOpcodeIsStaticCall)]\nunconstrained fn is_static_call_opcode() -> u1 {}\n\n#[oracle(avmOpcodeNoteHashExists)]\nunconstrained fn note_hash_exists_opcode(note_hash: Field, leaf_index: u64) -> u1 {}\n\n#[oracle(avmOpcodeEmitNoteHash)]\nunconstrained fn emit_note_hash_opcode(note_hash: Field) {}\n\n#[oracle(avmOpcodeNullifierExists)]\nunconstrained fn nullifier_exists_opcode(siloed_nullifier: 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: u64) -> 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#[oracle(avmOpcodeRevert)]\nunconstrained fn revert_opcode(revertdata: [Field]) {}\n\n// While the length parameter might seem unnecessary given that we have N we keep it around because at the AVM bytecode\n// level, we want to support non-comptime-known lengths for such opcodes, even if Noir code will not generally take\n// that route.\n#[oracle(avmOpcodeCall)]\nunconstrained fn call_opcode<let N: u32>(\n l2_gas_allocation: u32,\n da_gas_allocation: u32,\n address: AztecAddress,\n length: u32,\n args: [Field; N],\n) {}\n\n// While the length parameter might seem unnecessary given that we have N we keep it around because at the AVM bytecode\n// level, we want to support non-comptime-known lengths for such opcodes, even if Noir code will not generally take\n// that route.\n#[oracle(avmOpcodeStaticCall)]\nunconstrained fn call_static_opcode<let N: u32>(\n l2_gas_allocation: u32,\n da_gas_allocation: u32,\n address: AztecAddress,\n length: u32,\n args: [Field; N],\n) {}\n\n#[oracle(avmOpcodeSuccessCopy)]\nunconstrained fn success_copy_opcode() -> bool {}\n\n#[oracle(avmOpcodeStorageRead)]\nunconstrained fn storage_read_opcode(storage_slot: Field, contract_address: Field) -> Field {}\n\n#[oracle(avmOpcodeStorageWrite)]\nunconstrained fn storage_write_opcode(storage_slot: Field, value: Field) {}\n"
|
|
2730
|
-
},
|
|
2731
|
-
"73": {
|
|
2732
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-contracts/contracts/protocol/aztec_sublib/src/oracle/call_private_function.nr",
|
|
2733
|
-
"source": "use crate::protocol::{\n abis::function_selector::FunctionSelector, address::AztecAddress, utils::reader::Reader,\n};\n\n#[oracle(privateCallPrivateFunction)]\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"
|
|
2734
|
-
},
|
|
2735
|
-
"75": {
|
|
2736
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-contracts/contracts/protocol/aztec_sublib/src/oracle/enqueue_public_function_call.nr",
|
|
2737
|
-
"source": "use crate::protocol::address::AztecAddress;\n\n#[oracle(privateNotifyEnqueuedPublicFunctionCall)]\nunconstrained fn notify_enqueued_public_function_call_oracle(\n _contract_address: AztecAddress,\n _calldata_hash: Field,\n _side_effect_counter: u32,\n _is_static_call: bool,\n) {}\n\nunconstrained fn notify_enqueued_public_function_call_wrapper(\n contract_address: AztecAddress,\n calldata_hash: Field,\n side_effect_counter: u32,\n is_static_call: bool,\n) {\n notify_enqueued_public_function_call_oracle(\n contract_address,\n calldata_hash,\n side_effect_counter,\n is_static_call,\n )\n}\n\npub fn notify_enqueued_public_function_call(\n contract_address: AztecAddress,\n calldata_hash: Field,\n side_effect_counter: u32,\n is_static_call: bool,\n) {\n // Safety: Notifies the simulator that a public call has been enqueued, allowing it to prepare hints for the AVM to\n // process this call.\n unsafe {\n notify_enqueued_public_function_call_wrapper(\n contract_address,\n calldata_hash,\n side_effect_counter,\n is_static_call,\n )\n }\n}\n\n#[oracle(privateNotifySetPublicTeardownFunctionCall)]\nunconstrained fn notify_set_public_teardown_function_call_oracle(\n _contract_address: AztecAddress,\n _calldata_hash: Field,\n _side_effect_counter: u32,\n _is_static_call: bool,\n) {}\n\nunconstrained fn notify_set_public_teardown_function_call_wrapper(\n contract_address: AztecAddress,\n calldata_hash: Field,\n side_effect_counter: u32,\n is_static_call: bool,\n) {\n notify_set_public_teardown_function_call_oracle(\n contract_address,\n calldata_hash,\n side_effect_counter,\n is_static_call,\n )\n}\n\npub fn notify_set_public_teardown_function_call(\n contract_address: AztecAddress,\n calldata_hash: Field,\n side_effect_counter: u32,\n is_static_call: bool,\n) {\n // Safety: Notifies the simulator that a teardown call has been set, allowing it to prepare hints for the AVM to\n // process this call.\n unsafe {\n notify_set_public_teardown_function_call_wrapper(\n contract_address,\n calldata_hash,\n side_effect_counter,\n is_static_call,\n )\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 to\n // 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(privateNotifySetMinRevertibleSideEffectCounter)]\nunconstrained fn notify_set_min_revertible_side_effect_counter_oracle(_counter: u32) {}\n\npub unconstrained fn is_side_effect_counter_revertible_oracle_wrapper(counter: u32) -> bool {\n is_side_effect_counter_revertible_oracle(counter)\n}\n\n#[oracle(privateIsSideEffectCounterRevertible)]\nunconstrained fn is_side_effect_counter_revertible_oracle(counter: u32) -> bool {}\n"
|
|
2738
|
-
},
|
|
2739
|
-
"76": {
|
|
2740
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-contracts/contracts/protocol/aztec_sublib/src/oracle/execution.nr",
|
|
2741
|
-
"source": "use crate::context::UtilityContext;\n\n#[oracle(utilityGetUtilityContext)]\nunconstrained fn get_utility_context_oracle() -> UtilityContext {}\n\n/// Returns a utility context built from the global variables of anchor block and the contract address of the function\n/// being executed.\npub unconstrained fn get_utility_context() -> UtilityContext {\n get_utility_context_oracle()\n}\n"
|
|
2742
|
-
},
|
|
2743
|
-
"77": {
|
|
2744
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-contracts/contracts/protocol/aztec_sublib/src/oracle/execution_cache.nr",
|
|
2745
|
-
"source": "/// Stores values represented as slice in execution cache to be later obtained by its hash.\npub fn store<let N: u32>(values: [Field; N], hash: Field) {\n // Safety: This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to\n // 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, hash) };\n}\n\nunconstrained fn store_in_execution_cache_oracle_wrapper<let N: u32>(\n values: [Field; N],\n hash: Field,\n) {\n store_in_execution_cache_oracle(values, hash);\n}\n\npub unconstrained fn load<let N: u32>(hash: Field) -> [Field; N] {\n load_from_execution_cache_oracle(hash)\n}\n\n#[oracle(privateStoreInExecutionCache)]\nunconstrained fn store_in_execution_cache_oracle<let N: u32>(_values: [Field; N], _hash: Field) {}\n\n#[oracle(privateLoadFromExecutionCache)]\nunconstrained fn load_from_execution_cache_oracle<let N: u32>(_hash: Field) -> [Field; N] {}\n"
|
|
2746
|
-
},
|
|
2747
|
-
"81": {
|
|
2748
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-contracts/contracts/protocol/aztec_sublib/src/oracle/nullifiers.nr",
|
|
2749
|
-
"source": "//! Nullifier creation, existence checks, etc.\n\nuse crate::protocol::address::aztec_address::AztecAddress;\n\n/// Notifies the simulator that a nullifier has been created, so that its correct status (pending or settled) can be\n/// determined when reading nullifiers in subsequent private function calls. The first non-revertible nullifier emitted\n/// is also used to compute note nonces.\npub fn notify_created_nullifier(inner_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(inner_nullifier) };\n}\n\n#[oracle(privateNotifyCreatedNullifier)]\nunconstrained fn notify_created_nullifier_oracle(_inner_nullifier: Field) {}\n\n/// Returns true if the nullifier has been emitted in the same transaction, i.e. if [notify_created_nullifier] has been\n/// called for this inner nullifier from the contract with the specified address.\n///\n/// Note that despite sharing pending transaction information with the app, this is not a privacy leak: anyone in the\n/// network can always determine in which transaction a inner nullifier was emitted by a given contract by simply\n/// inspecting transaction effects. What _would_ constitute a leak would be to share the list of inner pending\n/// nullifiers, as that would reveal their preimages.\npub unconstrained fn is_nullifier_pending(\n inner_nullifier: Field,\n contract_address: AztecAddress,\n) -> bool {\n is_nullifier_pending_oracle(inner_nullifier, contract_address)\n}\n\n#[oracle(privateIsNullifierPending)]\nunconstrained fn is_nullifier_pending_oracle(\n _inner_nullifier: Field,\n _contract_address: AztecAddress,\n) -> bool {}\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\n/// the current transaction is included in a block. While this might seem of little use at first, certain design\n/// patterns 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(utilityCheckNullifierExists)]\nunconstrained fn check_nullifier_exists_oracle(_inner_nullifier: Field) -> bool {}\n"
|
|
2750
|
-
},
|
|
2751
|
-
"82": {
|
|
2752
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-contracts/contracts/protocol/aztec_sublib/src/oracle/storage.nr",
|
|
2753
|
-
"source": "use crate::protocol::{\n abis::block_header::BlockHeader,\n address::AztecAddress,\n traits::{Hash, Packable, ToField},\n};\n\n#[oracle(utilityStorageRead)]\nunconstrained fn storage_read_oracle<let N: u32>(\n block_hash: Field,\n address: Field,\n storage_slot: Field,\n length: u32,\n) -> [Field; N] {}\n\npub unconstrained fn raw_storage_read<let N: u32>(\n block_hash_to_read_from: Field,\n address: AztecAddress,\n storage_slot: Field,\n) -> [Field; N] {\n storage_read_oracle(block_hash_to_read_from, address.to_field(), storage_slot, N)\n}\n\npub unconstrained fn storage_read<T>(\n header_to_read_from: BlockHeader,\n address: AztecAddress,\n storage_slot: Field,\n) -> T\nwhere\n T: Packable,\n{\n let block_hash_to_read_from = header_to_read_from.hash();\n T::unpack(\n raw_storage_read(block_hash_to_read_from, address, storage_slot),\n )\n}\n"
|
|
2754
|
-
},
|
|
2755
|
-
"84": {
|
|
2756
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-contracts/contracts/protocol/aztec_sublib/src/state_vars/map.nr",
|
|
2757
|
-
"source": "use crate::protocol::{storage::map::derive_storage_slot_in_map, traits::ToField};\nuse crate::state_vars::StateVariable;\n\n/// A key-value container for state variables.\n///\n/// A key-value storage container that maps keys to state variables, similar to Solidity mappings.\npub struct Map<K, V, Context> {\n pub context: Context,\n storage_slot: Field,\n}\n\n// Map reserves a single storage slot regardless of what it stores because nothing is stored at said slot: it is only\n// used to derive the storage slots of nested state variables.\nimpl<K, V, Context> StateVariable<1, Context> for Map<K, V, Context> {\n fn new(context: Context, storage_slot: Field) -> Self {\n assert(storage_slot != 0, \"Storage slot 0 not allowed. Storage slots must start from 1.\");\n Map { context, storage_slot }\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 /// Returns the state variable associated with the given key.\n ///\n /// This is equivalent to accessing `mapping[key]` in Solidity.\n pub fn at<let N: u32>(self, key: K) -> V\n where\n K: ToField,\n V: StateVariable<N, Context>,\n {\n V::new(\n self.context,\n derive_storage_slot_in_map(self.storage_slot, key),\n )\n }\n}\n"
|
|
2758
|
-
},
|
|
2759
|
-
"86": {
|
|
2760
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/noir-contracts/contracts/protocol/aztec_sublib/src/state_vars/public_mutable.nr",
|
|
2761
|
-
"source": "use crate::context::{PublicContext, UtilityContext};\nuse crate::protocol::traits::Packable;\nuse crate::state_vars::StateVariable;\n\n/// Mutable public values.\n///\n/// This is one of the most basic public state variables. It is equivalent to a non-`immutable` non-`constant` Solidity\n/// state variable.\npub struct PublicMutable<T, Context> {\n context: Context,\n storage_slot: Field,\n}\n\nimpl<T, Context, let M: u32> StateVariable<M, Context> for PublicMutable<T, Context>\nwhere\n T: Packable<N = M>,\n{\n fn new(context: Context, storage_slot: Field) -> Self {\n assert(storage_slot != 0, \"Storage slot 0 not allowed. Storage slots must start from 1.\");\n PublicMutable { context, storage_slot }\n }\n\n fn get_storage_slot(self) -> Field {\n self.storage_slot\n }\n}\n\nimpl<T> PublicMutable<T, PublicContext> {\n /// Returns the current value.\n pub fn read(self) -> T\n where\n T: Packable,\n {\n self.context.storage_read(self.storage_slot)\n }\n\n /// Stores a new value.\n pub fn write(self, value: T)\n where\n T: Packable,\n {\n self.context.storage_write(self.storage_slot, value);\n }\n}\n\nimpl<T> PublicMutable<T, UtilityContext> {\n /// Returns the value at the anchor block.\n pub unconstrained fn read(self) -> T\n where\n T: Packable,\n {\n self.context.storage_read(self.storage_slot)\n }\n}\n"
|
|
2762
|
-
}
|
|
2763
|
-
}
|
|
2764
|
-
}
|