@aztec/protocol-contracts 0.74.0 → 0.75.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/AuthRegistry.json +420 -420
- package/artifacts/ContractClassRegisterer.json +617 -617
- package/artifacts/ContractInstanceDeployer.json +34 -34
- package/artifacts/FeeJuice.json +3394 -3369
- package/artifacts/MultiCallEntrypoint.json +229 -229
- package/artifacts/Router.json +360 -360
- package/dest/protocol_contract_data.js +7 -7
- package/package.json +4 -4
- package/src/protocol_contract_data.ts +7 -7
package/artifacts/Router.json
CHANGED
|
@@ -1,348 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"transpiled": true,
|
|
3
|
-
"noir_version": "1.0.0-beta.1+
|
|
3
|
+
"noir_version": "1.0.0-beta.1+4144a8dce4789d85",
|
|
4
4
|
"name": "Router",
|
|
5
5
|
"functions": [
|
|
6
|
-
{
|
|
7
|
-
"name": "sync_notes",
|
|
8
|
-
"is_unconstrained": true,
|
|
9
|
-
"custom_attributes": [],
|
|
10
|
-
"abi": {
|
|
11
|
-
"error_types": {
|
|
12
|
-
"17843811134343075018": {
|
|
13
|
-
"error_kind": "string",
|
|
14
|
-
"string": "Stack too deep"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"parameters": [],
|
|
18
|
-
"return_type": null
|
|
19
|
-
},
|
|
20
|
-
"bytecode": "H4sIAAAAAAAA/7WTyw7CIBBFqcUo0sTEx39MU0y7dOHafyCtLHVRN+766dZkJkyI0QVwEzJMgMNcHoXwKjBKESGCHDEqjAs2Xs7tjDnEqVbBvin5HRijvvhLWH+jkFnk4QPxM50/rJBzmTyfe6F913PTrF8J/z5y+af7y+l//8OzRq9bzCvh/8P4uvfXx/M2ij/SbJGc0ptoOwAqvkT+EvmhJBvn8w+Yb4Svj6KMqNO1tnaNdfZkh8H0dhfwP+KH/QbzqHp4zgQAAA==",
|
|
21
|
-
"debug_symbols": "bY9dCoQwDITvkuc+NHUV9CqySNUohdJKrQuLePdNF5Huz0uYCV+GzA4j9dvcGTf5FZp2B+sHHY137PZDQB+MtWbu8jXINLB48+uiXbJr1CFCU5SFAHIjqwr5fjKWoKnUIX5QlCjVCbNW9YXjDf/zNV68QvnB3w+2Dx2M7i2dz0+bG7Iu8bnQV60l+IHGLVAqmHXj2WIplORYjn4B",
|
|
22
|
-
"brillig_names": [
|
|
23
|
-
"sync_notes"
|
|
24
|
-
]
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"name": "compute_note_hash_and_optionally_a_nullifier",
|
|
28
|
-
"is_unconstrained": true,
|
|
29
|
-
"custom_attributes": [],
|
|
30
|
-
"abi": {
|
|
31
|
-
"error_types": {
|
|
32
|
-
"16541607464495309456": {
|
|
33
|
-
"error_kind": "fmtstring",
|
|
34
|
-
"item_types": [],
|
|
35
|
-
"length": 16
|
|
36
|
-
},
|
|
37
|
-
"17843811134343075018": {
|
|
38
|
-
"error_kind": "string",
|
|
39
|
-
"string": "Stack too deep"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"parameters": [
|
|
43
|
-
{
|
|
44
|
-
"name": "contract_address",
|
|
45
|
-
"type": {
|
|
46
|
-
"fields": [
|
|
47
|
-
{
|
|
48
|
-
"name": "inner",
|
|
49
|
-
"type": {
|
|
50
|
-
"kind": "field"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
"kind": "struct",
|
|
55
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
56
|
-
},
|
|
57
|
-
"visibility": "private"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"name": "nonce",
|
|
61
|
-
"type": {
|
|
62
|
-
"kind": "field"
|
|
63
|
-
},
|
|
64
|
-
"visibility": "private"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"name": "storage_slot",
|
|
68
|
-
"type": {
|
|
69
|
-
"kind": "field"
|
|
70
|
-
},
|
|
71
|
-
"visibility": "private"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"name": "note_type_id",
|
|
75
|
-
"type": {
|
|
76
|
-
"kind": "field"
|
|
77
|
-
},
|
|
78
|
-
"visibility": "private"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"name": "compute_nullifier",
|
|
82
|
-
"type": {
|
|
83
|
-
"kind": "boolean"
|
|
84
|
-
},
|
|
85
|
-
"visibility": "private"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"name": "packed_note_content",
|
|
89
|
-
"type": {
|
|
90
|
-
"kind": "array",
|
|
91
|
-
"length": 0,
|
|
92
|
-
"type": {
|
|
93
|
-
"kind": "field"
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
"visibility": "private"
|
|
97
|
-
}
|
|
98
|
-
],
|
|
99
|
-
"return_type": {
|
|
100
|
-
"abi_type": {
|
|
101
|
-
"kind": "array",
|
|
102
|
-
"length": 4,
|
|
103
|
-
"type": {
|
|
104
|
-
"kind": "field"
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
"visibility": "public"
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
"bytecode": "H4sIAAAAAAAA/9VZy67aQAwdSEJIuAEKn3Cl7tomXJ47Fn3c30AFPqHrrLppP7qMGCcH46siYVfFEpoknhyfOXZmJqHjztY//TrhOA5tz10b9dmGtrzPKkWs0pJn50F4dh+EZ/QgPGNFnh2Bp2/peUvc+ZlL3fl5bC7iTT7BEdzk/gYAwX6HNgttF/yKCakyYZBa+Otyvs/cpSnzf8kCZmqDvyD8vg1+Sbw/1y0+joXiRqF9rVstX+Eeb0U4xuIlXPJ1wfeF+SLwfWU+rOFvzId1T5xIN1qYlOtqY50XGlsKY+u80TrXaofXSOvcmdZoRTnPGB/On/gU1Kdu+fSYLwZfxnwJ+Eh/3z5DP577FPp9hONP0IfXZ+Su65n8lH/U3aK+YgP8k82lHPD8xPVlbPRhDmLQ85npY7FuoD4W+nt9pm/wp2Nvae0ai5ieqBFp1sf+zJeBL64v4+ThPIY4iEU8Etb/QzgfhbYH99D9YyF+j8W/4C1cQ404ViRco/7++Xwfjgfh52voJ93jructvc31ci7N4Xr4qwY/s+F/JPzcBn9J+AMb/GZv82SCPysJv7Dh38xBQ5v6afaWIxv+B8Ifm+DPD7QOv3OtNXNEOJ7Adb35u6pu2SNh/JxxtdojTRgfrg+uwd43FbiOBR/P4VSIMxXiSFiZItaTItboPx1jXxFroIg1VMTSzGOqiKWpV66IVShiada9pl6UR2mf5m0b2vJOk/ZpiviVtE/TfJcnram+YkFDHF/C+v9gOg9MeFYzWnPoWacYGLswin3rek3xC4EP8c4F3z0fZw+L9XGzXmxOW7JqOds0+SwYV34N34twPsb+0tov7fsUtS6ld/8h6OotBl/BfAn4iKP07j804n+L/hh/LPj4+n9rLifuej0csHHjN6+typjb74HSt3rj+Wtx67NJ8XN3PV//q++NqA/fS+cC17Hg4/uTXIiTC3EeEYt/s0cNfV2TTnHd+rVyuVq3f3TRXJS4y/8BHIufsP6/wjmOjdp75vzjalcdX3bH3WK338+/7yYM31sXdPoDg5oBSR0fAAA=",
|
|
111
|
-
"debug_symbols": "tdfBioMwFIXhd8k6C29iksZXGYYSNZZAiBJ1YBDffWLptKVdlrMpjVw/N/7g3Vjv2/VyDmkYZ9Z8bSyOnVvCmMpp2zlrc4gxXM7Pl1l1/Fh1nZ8nl47jvLi8sEYqyZlPffmnqdw/hOhZo8XO30aNuE0acx9UYv/mzGocbXD0CUdbGE1VBbQJaAugLYF2DbQV0NZA2wDtE9AGdknALgnYJQG7JGCXBOySgF0SsEsCdkmfdmn/J8tr8YZbIC4qJE5IXCBxicRrJK6QuEbiBokjCxXIQiWyUAkrdC+nH5eDa6O/7V/DmrqndWz5nfzLZjblsfP9mv2xoz3WsyNGqXitrt8p5UCy5iRteUh50B8=",
|
|
112
|
-
"brillig_names": [
|
|
113
|
-
"compute_note_hash_and_optionally_a_nullifier"
|
|
114
|
-
]
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"name": "process_log",
|
|
118
|
-
"is_unconstrained": true,
|
|
119
|
-
"custom_attributes": [],
|
|
120
|
-
"abi": {
|
|
121
|
-
"error_types": {
|
|
122
|
-
"16541607464495309456": {
|
|
123
|
-
"error_kind": "fmtstring",
|
|
124
|
-
"item_types": [],
|
|
125
|
-
"length": 16
|
|
126
|
-
},
|
|
127
|
-
"17843811134343075018": {
|
|
128
|
-
"error_kind": "string",
|
|
129
|
-
"string": "Stack too deep"
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
"parameters": [
|
|
133
|
-
{
|
|
134
|
-
"name": "log_plaintext",
|
|
135
|
-
"type": {
|
|
136
|
-
"fields": [
|
|
137
|
-
{
|
|
138
|
-
"name": "storage",
|
|
139
|
-
"type": {
|
|
140
|
-
"kind": "array",
|
|
141
|
-
"length": 18,
|
|
142
|
-
"type": {
|
|
143
|
-
"kind": "field"
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"name": "len",
|
|
149
|
-
"type": {
|
|
150
|
-
"kind": "integer",
|
|
151
|
-
"sign": "unsigned",
|
|
152
|
-
"width": 32
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
],
|
|
156
|
-
"kind": "struct",
|
|
157
|
-
"path": "std::collections::bounded_vec::BoundedVec"
|
|
158
|
-
},
|
|
159
|
-
"visibility": "private"
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
"name": "tx_hash",
|
|
163
|
-
"type": {
|
|
164
|
-
"kind": "field"
|
|
165
|
-
},
|
|
166
|
-
"visibility": "private"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"name": "unique_note_hashes_in_tx",
|
|
170
|
-
"type": {
|
|
171
|
-
"fields": [
|
|
172
|
-
{
|
|
173
|
-
"name": "storage",
|
|
174
|
-
"type": {
|
|
175
|
-
"kind": "array",
|
|
176
|
-
"length": 64,
|
|
177
|
-
"type": {
|
|
178
|
-
"kind": "field"
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"name": "len",
|
|
184
|
-
"type": {
|
|
185
|
-
"kind": "integer",
|
|
186
|
-
"sign": "unsigned",
|
|
187
|
-
"width": 32
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
],
|
|
191
|
-
"kind": "struct",
|
|
192
|
-
"path": "std::collections::bounded_vec::BoundedVec"
|
|
193
|
-
},
|
|
194
|
-
"visibility": "private"
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
"name": "first_nullifier_in_tx",
|
|
198
|
-
"type": {
|
|
199
|
-
"kind": "field"
|
|
200
|
-
},
|
|
201
|
-
"visibility": "private"
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
"name": "recipient",
|
|
205
|
-
"type": {
|
|
206
|
-
"fields": [
|
|
207
|
-
{
|
|
208
|
-
"name": "inner",
|
|
209
|
-
"type": {
|
|
210
|
-
"kind": "field"
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
],
|
|
214
|
-
"kind": "struct",
|
|
215
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
216
|
-
},
|
|
217
|
-
"visibility": "private"
|
|
218
|
-
}
|
|
219
|
-
],
|
|
220
|
-
"return_type": null
|
|
221
|
-
},
|
|
222
|
-
"bytecode": "H4sIAAAAAAAA/92c927bMBDG5URKIieOndG9927leHeme+/W/dsdfosWAtqHSPu09Zfw7DPDAilCovkqQJCto+9+PFHUiTy6EG1s3cFeMJ9jc5w2R5xfjMY3Kbtqjtn2tqpHXVkoxgIB4wQB4yQBY0zAmBAwThEwThMwzhAwpgSMRQLGWQLGOQLGEgHjPAFjmYCxQsC4EIAxBOciCeeSR04d24fiXY52fhvdRcC4m4BxDwHjXgLGfQSM+wkYDxAwHiRgPETAeJiA8QgB41ECxmMEjMcJGE8QMJ4kYDxFwHiagPEMAeNZAsZz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QP+37po/W7ma6T2E+s8l8tP88F8fNoHEr6M+0LVyzl0/ZWn9div+TgEe6iQ7adP0D70mj3O+1GZxDSV5srnaxg6RdW+5x+L9L9iy7veva74j6Pvs5cYxBl5VdssZLNW7JEyYRRj0G44mKf/Fvxv7Zfccjs/nmr13IxGm9r+n6cjUb3c5z7r3urvfHHLuuMRn8SjY8xRpb9xCr/3Xy3+7rt3iP9Vq/ar/X6vUbv8+f6p96ipV/7EH76DXVGL3ipUwAA",
|
|
223
|
-
"debug_symbols": "tZZBCoMwEEXvknUWzli19SqlSNQogRAlaqGId28i0kq7/puQCZM3ZPHIX0Wr66WvjOuGSZT3VdihUbMZXKjWTYraG2tNX52PRRIXSni/MI3KxXqalZ9FmWapFNq1YZdTAHTGalHmvMm/1oKPzqL4NGa8PWRgp0D2BcjOgOwcyC6A7CuQfcOxKQGyCcgGeklALwnoJQG9JKCXBPSSgF4S0EsGeslALxnoJQO9ZJSXW6ieyhtVW33EjW5xzSl9zK9R/wSR0Q+NbhevYyT5ppH4/gvLjPdfIRTEuaSUwpAw6A0=",
|
|
224
|
-
"brillig_names": [
|
|
225
|
-
"process_log"
|
|
226
|
-
]
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
"name": "_check_timestamp",
|
|
230
|
-
"is_unconstrained": true,
|
|
231
|
-
"custom_attributes": [
|
|
232
|
-
"public",
|
|
233
|
-
"internal",
|
|
234
|
-
"view"
|
|
235
|
-
],
|
|
236
|
-
"abi": {
|
|
237
|
-
"error_types": {
|
|
238
|
-
"11405868724477732285": {
|
|
239
|
-
"error_kind": "string",
|
|
240
|
-
"string": "Function _check_timestamp can only be called internally"
|
|
241
|
-
},
|
|
242
|
-
"13418685691864489983": {
|
|
243
|
-
"error_kind": "string",
|
|
244
|
-
"string": "Function _check_timestamp can only be called statically"
|
|
245
|
-
},
|
|
246
|
-
"1433889167918961673": {
|
|
247
|
-
"error_kind": "fmtstring",
|
|
248
|
-
"item_types": [],
|
|
249
|
-
"length": 17
|
|
250
|
-
},
|
|
251
|
-
"17843811134343075018": {
|
|
252
|
-
"error_kind": "string",
|
|
253
|
-
"string": "Stack too deep"
|
|
254
|
-
},
|
|
255
|
-
"8443716675528357851": {
|
|
256
|
-
"error_kind": "string",
|
|
257
|
-
"string": "Timestamp mismatch."
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
"parameters": [
|
|
261
|
-
{
|
|
262
|
-
"name": "operation",
|
|
263
|
-
"type": {
|
|
264
|
-
"kind": "integer",
|
|
265
|
-
"sign": "unsigned",
|
|
266
|
-
"width": 8
|
|
267
|
-
},
|
|
268
|
-
"visibility": "private"
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
"name": "value",
|
|
272
|
-
"type": {
|
|
273
|
-
"kind": "integer",
|
|
274
|
-
"sign": "unsigned",
|
|
275
|
-
"width": 64
|
|
276
|
-
},
|
|
277
|
-
"visibility": "private"
|
|
278
|
-
}
|
|
279
|
-
],
|
|
280
|
-
"return_type": null
|
|
281
|
-
},
|
|
282
|
-
"bytecode": "JgACBAEnAAABBIBLJgAABAMmAgMEAiYCBAQAHxgABAADgEkdAIBJgEkCHQCASoBKBS0IgEkAAS0IgEoAAiQAAABZJAAAAIQnAgABBIBLJgICBAA6DQABAAInAIBDAgAEJwCARAIABicAgEUCAAEnAIBGAgACJwCARwIABScAgEgCAAMlJAAAA1IeAgAEAR4CAAUACjgEBQYjAgAGAAAApSQAAAN7HgIABAkmAgUAAQo4BAUGIwIABgAAAMEkAAADjR4CAAQGHAwEBQAcDAIEAAo4BQQCDDgFBAYLKAABgEUABCYCBQEBIwIABAAAAzsiAAAA9AsoAAGARgAHFgwCCCMCAAcAAAMpIgAAAQ0LKAABgEgACSMCAAkAAAMXIgAAASILKAABgEMACiMCAAoAAAMAIgAAATcLKAABgEcAChYMBgsjAgAKAAAC6SIAAAFQCygAAYBEAAgjAgAIAAAC1yIAAAFlJgIBAnQmAggCcCYCCgJkJgILAmEmAgwCSSYCDQJyJgIOAm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Koe0LyfwoJxr1WmTNNyQlOiWJJ2sVsrUqZVyiJfVytSPnMn1XC27hYPpDUl+C5L7DUk5jiVli50OmX4QmCR1ApPaD4+jkXSPo4VwLnD2y8UwEZ8RCDRKgClYnyTDpHGpSL1Pyn6Zd8xdrNAxlM0PABwnA0jodJUYvgGMPLjRO12z0PFL4Dw2MPVfghCfDD02ctTQlRxV8uVgZrKu3fA3hk0hB1mm6y7S624y0F1kMoAyfcVqtAHAf5rfNQBHD1ikAUDK0xmY9I4cAmSaDJBi58iUBgCRGStR5OkSmXXmcooDgJjAAGpggBTQAGgGhmZgaAaOZuBoBhnNIIMZCAU0AJoBoxkwmkFAMwjgdi2R0QBoBoJmIGgGSmgAQQOApy2SIhrAwQDol76gX/riaKM52mgZbbSsaACw0ZQEDQA2mnJEA4CNpuhZhaJnFYqeVWgEG02F0ABoowm6VSjaaIpuFeilBEUvJaihjWboVuFoozm6VTjaaBndKvJ0o7l066bNRsjn5SX9fhvRjovQeti9SBSLqaQYTbgYTQIXU0kqpZJIxVSipVQixWgywyxrpkpm2BeZqZIZZj1zVVKMJlaMJlbMe8eL8U4upp/kUnqsUSmaGJWjSS6lEi7FOyYz/PyRfvjhmQibYeU89fUnHxw48qt3kNqkq1/8vz+buz/L3Wr5sK6/Dl8+v28eT85i7v++1mfHMl9328f66X1Xtwc0j2cz2xk7myzYpSmGW6tyCgtO1t62s2h2bT61BrVB/gc=",
|
|
284
|
-
"brillig_names": [
|
|
285
|
-
"_check_timestamp"
|
|
286
|
-
]
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
"name": "_check_block_number",
|
|
290
|
-
"is_unconstrained": true,
|
|
291
|
-
"custom_attributes": [
|
|
292
|
-
"public",
|
|
293
|
-
"internal",
|
|
294
|
-
"view"
|
|
295
|
-
],
|
|
296
|
-
"abi": {
|
|
297
|
-
"error_types": {
|
|
298
|
-
"10421965853029650238": {
|
|
299
|
-
"error_kind": "string",
|
|
300
|
-
"string": "Function _check_block_number can only be called statically"
|
|
301
|
-
},
|
|
302
|
-
"1433889167918961673": {
|
|
303
|
-
"error_kind": "fmtstring",
|
|
304
|
-
"item_types": [],
|
|
305
|
-
"length": 17
|
|
306
|
-
},
|
|
307
|
-
"17843811134343075018": {
|
|
308
|
-
"error_kind": "string",
|
|
309
|
-
"string": "Stack too deep"
|
|
310
|
-
},
|
|
311
|
-
"2242946026394210301": {
|
|
312
|
-
"error_kind": "string",
|
|
313
|
-
"string": "Block number mismatch."
|
|
314
|
-
},
|
|
315
|
-
"8209322232883590150": {
|
|
316
|
-
"error_kind": "string",
|
|
317
|
-
"string": "Function _check_block_number can only be called internally"
|
|
318
|
-
}
|
|
319
|
-
},
|
|
320
|
-
"parameters": [
|
|
321
|
-
{
|
|
322
|
-
"name": "operation",
|
|
323
|
-
"type": {
|
|
324
|
-
"kind": "integer",
|
|
325
|
-
"sign": "unsigned",
|
|
326
|
-
"width": 8
|
|
327
|
-
},
|
|
328
|
-
"visibility": "private"
|
|
329
|
-
},
|
|
330
|
-
{
|
|
331
|
-
"name": "value",
|
|
332
|
-
"type": {
|
|
333
|
-
"kind": "field"
|
|
334
|
-
},
|
|
335
|
-
"visibility": "private"
|
|
336
|
-
}
|
|
337
|
-
],
|
|
338
|
-
"return_type": null
|
|
339
|
-
},
|
|
340
|
-
"bytecode": "JgACBAEnAAABBIBLJgAABAMmAgMEAiYCBAQAHxgABAADgEkdAIBJgEkCLQiASQABLQiASgACJAAAAFIkAAAAfScCAAEEgEsmAgIEADoNAAEAAicAgEMCAAQnAIBEAgAGJwCARQIAAScAgEYCAAInAIBHAgAFJwCASAIAAyUkAAADQR4CAAQBHgIABQAKOAQFBiMCAAYAAACeJAAAA2oeAgAECSYCBQABCjgEBQYjAgAGAAAAuiQAAAN8HgIABAUKOAQCBQw4BAIGCygAAYBFAAImAgQBASMCAAIAAAMqIgAAAOMLKAABgEYABxYMBQgjAgAHAAADGCIAAAD8CygAAYBIAAkjAgAJAAADBiIAAAERCygAAYBDAAojAgAK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BfXVYf0wX7ft6M11tqgcS8ZOqXry2j+qbId5m87p6kOax1ziKp33j5jF1jTWcaWxB88gWTI8bP04aOjycToya6USW3+g47uh4OqUTb3XnqxPf0YnDPZ1ssFuSXHZLkg/X3UquGzk541O35B4NYnd00nuQjO7pJOc7hdB14nDdYjbNFrMl+mVCSrA8IYXTqcXpggbPBw3xOp2QMkB01jUltW8AGQwQvWSA4H8AnJlRwWKeUdEdygGlcwM7FzvqdDT0uZED+6wzcEzXGxM57QSSS3ZMpLHFu+G+x9j5ftR077v3OhiAyeVpFrQHcKmy3gCgnf0aXA+A/XAFmgHE9QEuhf4GgENsRfoAKWItCm64Rao5XOZCD4ASGODSgjgeAIMBGK2A0QoErUDQChStQNEKDK3A0AoSWkECK2h2A2gAuAJwuY4U0QBoBR6twKMVhIAGUDBA9GgAAQMwoQHQpQK96EdBB03QQVN00NTAAIYOmqFLRUIHLYFLBaN3FYzeVTB6V8HoXQUTOGjsAxoAHDQOHg2ADlokNAA6aOijBGZ00BhdKgQdNEGXCkUHTdGlwoYHzWI+NzX9eax5hkz+nKKHQ2j230ykFCapGE9SKZ6Ii8UwSaUwoVAMEyuFiS/GkxF2WSMxGeG7yFhMuBQmXIwnXIwnUsq6I1JMdrSYeqLF1FgrxhMrxpPki2FSSnbUj/DzJ3bD9+9E6Agn59LxbybTKYDd/AWp7XTzwv/42bz9na5m0+d5vb8V+bZdvBxdktz8+6hP7kt+rJYv9et2Vbc3Jw+XJttsktKEjBoy1C5zxGlCEtvX1jASm5C6BrVB/g8=",
|
|
342
|
-
"brillig_names": [
|
|
343
|
-
"_check_block_number"
|
|
344
|
-
]
|
|
345
|
-
},
|
|
346
6
|
{
|
|
347
7
|
"name": "check_block_number",
|
|
348
8
|
"is_unconstrained": false,
|
|
@@ -1961,16 +1621,184 @@
|
|
|
1961
1621
|
"kind": "struct",
|
|
1962
1622
|
"path": "aztec::protocol_types::abis::private_circuit_public_inputs::PrivateCircuitPublicInputs"
|
|
1963
1623
|
},
|
|
1964
|
-
"visibility": "databus"
|
|
1624
|
+
"visibility": "databus"
|
|
1625
|
+
}
|
|
1626
|
+
},
|
|
1627
|
+
"bytecode": "H4sIAAAAAAAA/+XdBXRT99/H8dSA4lYYE2yCQ9IkbYK7uztUUnQwbGPeubs7U+buynxj7r6xDTbcXZ/PdyTjNoSd8/x7s//zPs89533apunN63ebpGly87spnv1L7TSPZ0/q/s9TVFr0o51UP+602Efn5xkJzlchwWmVEpxWJcFp1RKcVkt1jDutXoLz1U9wWoMEpzVMcFqjBKc1VuU8JZeU6MeO0Y9+b04gEMnNjvj8vjxvdjg/FPQGgvk5IV/IFwwFC7NDfn8kFAjlhvPDud6wL+CP+IqCYX+Rd/9SJe3AurylWrILkums+p87/fEnmK26SndYbTvsdWz32OdNHJ9XjZ4n9nPV9HV1VUPVTDtwemxJjdsG3tItvkYubs+sNPdczuusrbe+Yxuleg69uHT52SkJLifF5W3f2L11eZNlbJIEY4nF7Su080pY2it0rSRdoWs5rtCxPzieJF/ZUjzJ/UWWdt254UihT7+ZZG6DamnJ2QZuO7PS/m//rmLOFMc67UFXiSX+hl3aG6Ob8Kae5Gxgt8fs4o3W1wwy5lQXx9wcMuY0F8fc4l8as7d0i6+li9uPcsfeysNweiFOH8SZDXH6Ic4AxBmEOHMgzlyIMwRxhiHO1hBnG4izLcTZDuJsD3F2gDg7QpydIM7OEGcXiLMrxNkN4uwOcfaAOHtCnL0gzt4QZx+Isy/E2Q/i7A9xDoA4B0KcgyDOwRDnEIhzKMQ5DOIcDnGOgDhHQpyjIM7REOcYiHMsxDkO4hwPcU6AOCdCnHkQZz7EWQBxFkKcEYizCOKcBHFOhjinQJxTIc5pEOd0iPN4iHMGxDkT4jwB4pwFcc6GOOdAnHMhznkQ54kQ50kQ53yI82SI8xSI81SI8zSI83SI8wyI80yIsxjiPAviPBviPAfiPBfiPA/iPB/ivADivBDivAjivBjivATivBTivAzivBzivALivBLivArivBrivAbivBbivA7ivB7ivAHivBHivAnivBnivAXivBXivA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yjBVQnltBQRDeknB5WRbMKbfzEnKhpGf1zJ8=",
|
|
1629
|
+
"brillig_names": [
|
|
1630
|
+
"store_in_execution_cache_oracle_wrapper",
|
|
1631
|
+
"enqueue_public_function_call_internal"
|
|
1632
|
+
],
|
|
1633
|
+
"verification_key": "AAAAAAAQAAAAAAAAAAAAFAAAAAAAAAAQAAAAAAADKLEBAAAAAAAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAAAAAAAAAABzK2NvY9tuTVnnt4Jo9EJ3XlNU9FzhpFlgm9/PkRXUdFqA5oJZ0gYycCfDZhPcPBQWUbHSpMlGIzzxqUOGyxPYb4xy/bffIXhU35FXxWJ+rEf2nko/YCtcYXbi1AVF2PwU9zOPcMIfd5VS2jjE8/TwSFvfN14Qbi3haVrMogSiYA/OsRVQNI2491hd4w+dfGdae28CyvNLoYg3saTfKrK4QpOIBkAeX02dBPBHPGHVThW+n+JN5YiR1WhfmKdZeAyc1DC4nZ4P0Yngu2OefuyKN2X2YbTmJoy+tY8kylMWSDj6sId390rdZrwaFPZVxmsJN4l2+J/WDAtbyBtKTVHEXQOy6PJYUVS9nl18WZlYFn3657yQE+zDARTTYo/3iug7rx6bI+JhCXYdcM6+D+TU/GPlKg6dCfa6X7LhoX36QMCAWfReiqFCGf1sLqEwg7kso34PfwYFIdzSCfP/n+qcp01y4RfGv1neVJCkRhLeaQM1/cSIoV7OnToE3F/b7qgRWu3AbWwtGO7zwxP5xkFUjk9CVM+GyAEvYTp+KU6iPA4D05rswR3a/1Psi4gmHdBVkgemj+PCR0w2xADptqrQpjDMR/JFw+S3pQLBCqrmQ1TxqOyYznNprc9+SCDFBWQewX0CKYShHJZAWuSBK5L83U36xlrBcHZj6UQFqm6y7AgJ5uDGE6e12fv/eVTd2mYfJFM3LNPFCqslkYgTweY8TtZLO3uDL1JuKPblswCShKdCMVXTnmQekNmPfBUN5vBBk5OGP7+7IRgR9o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f4fnTVpmM0yrpg5OYfVnkulIMK3InEjXW1cWNvW760qAb29FliAjAbauTrDrvq3SAzQAZvKBNXSPEZYxw/4H+p1wADTj4nRU75krS/hLl7qnRxLiV4NVHfUMAE7HzR9N2LO2SmbyrEl5tl5WVoxaMbFO0Y92zwzuzLR5jedBrom2ToJY+ER3wbYlZaVZunuziDLi0pn7aGeNAVC8xbFtyCUjU9Q/pw6ZI5wcHGficaDurFFdOsWhmau3STOk78mMWbKBTt580n2u0AwzwShgvEsEYtONbUuh5HY6dOzbEcofNGloDCcOVRUVNEWS9ZGI+nZRLbOeiSgmsyYQ7gglHgBfzpF8DV3KAZR3xS9gdTMrYSAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAiz1doGZ2WH0DPjaOIjG+BV4Y10TSaSfbnCmOq3SkSAiCkYC3Pqk2HCCxL1v2ukS9e02v7zL1S+MObPoc8RzFTIPy7+dPPQCuqPu2l8Knkm1werJWyZMMC3IVObyLXMw3yg+39qJyUgFl/CzRC6XUt751Y/Ckgg2GUJh97Fj/vuvHViqYcZK1SIEPXnEgCIZ5Vuhl1Gt/mw2Mk0/tsLaCYktfBipPD2uWICfqu7GqGp49LO8YfGdbnBpNZu/R+f5Bw=="
|
|
1634
|
+
},
|
|
1635
|
+
{
|
|
1636
|
+
"name": "sync_notes",
|
|
1637
|
+
"is_unconstrained": true,
|
|
1638
|
+
"custom_attributes": [],
|
|
1639
|
+
"abi": {
|
|
1640
|
+
"error_types": {
|
|
1641
|
+
"17843811134343075018": {
|
|
1642
|
+
"error_kind": "string",
|
|
1643
|
+
"string": "Stack too deep"
|
|
1644
|
+
}
|
|
1645
|
+
},
|
|
1646
|
+
"parameters": [],
|
|
1647
|
+
"return_type": null
|
|
1648
|
+
},
|
|
1649
|
+
"bytecode": "H4sIAAAAAAAA/7WTyw7CIBBFqcUo0sTEx39MU0y7dOHafyCtLHVRN+766dZkJkyI0QVwEzJMgMNcHoXwKjBKESGCHDEqjAs2Xs7tjDnEqVbBvin5HRijvvhLWH+jkFnk4QPxM50/rJBzmTyfe6F913PTrF8J/z5y+af7y+l//8OzRq9bzCvh/8P4uvfXx/M2ij/SbJGc0ptoOwAqvkT+EvmhJBvn8w+Yb4Svj6KMqNO1tnaNdfZkh8H0dhfwP+KH/QbzqHp4zgQAAA==",
|
|
1650
|
+
"debug_symbols": "bY9dCoQwDITvkuc+NHUV9CqySNUohdJKrQuLePdNF5Huz0uYCV+GzA4j9dvcGTf5FZp2B+sHHY137PZDQB+MtWbu8jXINLB48+uiXbJr1CFCU5SFAHIjqwr5fjKWoKnUIX5QlCjVCbNW9YXjDf/zNV68QvnB3w+2Dx2M7i2dz0+bG7Iu8bnQV60l+IHGLVAqmHXj2WIplORYjn4B",
|
|
1651
|
+
"brillig_names": [
|
|
1652
|
+
"sync_notes"
|
|
1653
|
+
]
|
|
1654
|
+
},
|
|
1655
|
+
{
|
|
1656
|
+
"name": "compute_note_hash_and_optionally_a_nullifier",
|
|
1657
|
+
"is_unconstrained": true,
|
|
1658
|
+
"custom_attributes": [],
|
|
1659
|
+
"abi": {
|
|
1660
|
+
"error_types": {
|
|
1661
|
+
"16541607464495309456": {
|
|
1662
|
+
"error_kind": "fmtstring",
|
|
1663
|
+
"item_types": [],
|
|
1664
|
+
"length": 16
|
|
1665
|
+
},
|
|
1666
|
+
"17843811134343075018": {
|
|
1667
|
+
"error_kind": "string",
|
|
1668
|
+
"string": "Stack too deep"
|
|
1669
|
+
}
|
|
1670
|
+
},
|
|
1671
|
+
"parameters": [
|
|
1672
|
+
{
|
|
1673
|
+
"name": "contract_address",
|
|
1674
|
+
"type": {
|
|
1675
|
+
"fields": [
|
|
1676
|
+
{
|
|
1677
|
+
"name": "inner",
|
|
1678
|
+
"type": {
|
|
1679
|
+
"kind": "field"
|
|
1680
|
+
}
|
|
1681
|
+
}
|
|
1682
|
+
],
|
|
1683
|
+
"kind": "struct",
|
|
1684
|
+
"path": "aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
1685
|
+
},
|
|
1686
|
+
"visibility": "private"
|
|
1687
|
+
},
|
|
1688
|
+
{
|
|
1689
|
+
"name": "nonce",
|
|
1690
|
+
"type": {
|
|
1691
|
+
"kind": "field"
|
|
1692
|
+
},
|
|
1693
|
+
"visibility": "private"
|
|
1694
|
+
},
|
|
1695
|
+
{
|
|
1696
|
+
"name": "storage_slot",
|
|
1697
|
+
"type": {
|
|
1698
|
+
"kind": "field"
|
|
1699
|
+
},
|
|
1700
|
+
"visibility": "private"
|
|
1701
|
+
},
|
|
1702
|
+
{
|
|
1703
|
+
"name": "note_type_id",
|
|
1704
|
+
"type": {
|
|
1705
|
+
"kind": "field"
|
|
1706
|
+
},
|
|
1707
|
+
"visibility": "private"
|
|
1708
|
+
},
|
|
1709
|
+
{
|
|
1710
|
+
"name": "compute_nullifier",
|
|
1711
|
+
"type": {
|
|
1712
|
+
"kind": "boolean"
|
|
1713
|
+
},
|
|
1714
|
+
"visibility": "private"
|
|
1715
|
+
},
|
|
1716
|
+
{
|
|
1717
|
+
"name": "packed_note_content",
|
|
1718
|
+
"type": {
|
|
1719
|
+
"kind": "array",
|
|
1720
|
+
"length": 0,
|
|
1721
|
+
"type": {
|
|
1722
|
+
"kind": "field"
|
|
1723
|
+
}
|
|
1724
|
+
},
|
|
1725
|
+
"visibility": "private"
|
|
1726
|
+
}
|
|
1727
|
+
],
|
|
1728
|
+
"return_type": {
|
|
1729
|
+
"abi_type": {
|
|
1730
|
+
"kind": "array",
|
|
1731
|
+
"length": 4,
|
|
1732
|
+
"type": {
|
|
1733
|
+
"kind": "field"
|
|
1734
|
+
}
|
|
1735
|
+
},
|
|
1736
|
+
"visibility": "public"
|
|
1965
1737
|
}
|
|
1966
1738
|
},
|
|
1967
|
-
"bytecode": "H4sIAAAAAAAA
|
|
1968
|
-
"debug_symbols": "
|
|
1739
|
+
"bytecode": "H4sIAAAAAAAA/9VZy67aQAw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ZAiBJ1YBDffWLptKVdlrMpjVw/N/7g3Vjv2/VyDmkYZ9Z8bSyOnVvCmMpp2zlrc4gxXM7Pl1l1/Fh1nZ8nl47jvLi8sEYqyZlPffmnqdw/hOhZo8XO30aNuE0acx9UYv/mzGocbXD0CUdbGE1VBbQJaAugLYF2DbQV0NZA2wDtE9AGdknALgnYJQG7JGCXBOySgF0SsEsCdkmfdmn/J8tr8YZbIC4qJE5IXCBxicRrJK6QuEbiBokjCxXIQiWyUAkrdC+nH5eDa6O/7V/DmrqndWz5nfzLZjblsfP9mv2xoz3WsyNGqXitrt8p5UCy5iRteUh50B8=",
|
|
1969
1741
|
"brillig_names": [
|
|
1970
|
-
"
|
|
1971
|
-
|
|
1742
|
+
"compute_note_hash_and_optionally_a_nullifier"
|
|
1743
|
+
]
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
"name": "_check_block_number",
|
|
1747
|
+
"is_unconstrained": true,
|
|
1748
|
+
"custom_attributes": [
|
|
1749
|
+
"public",
|
|
1750
|
+
"internal",
|
|
1751
|
+
"view"
|
|
1972
1752
|
],
|
|
1973
|
-
"
|
|
1753
|
+
"abi": {
|
|
1754
|
+
"error_types": {
|
|
1755
|
+
"10421965853029650238": {
|
|
1756
|
+
"error_kind": "string",
|
|
1757
|
+
"string": "Function _check_block_number can only be called statically"
|
|
1758
|
+
},
|
|
1759
|
+
"1433889167918961673": {
|
|
1760
|
+
"error_kind": "fmtstring",
|
|
1761
|
+
"item_types": [],
|
|
1762
|
+
"length": 17
|
|
1763
|
+
},
|
|
1764
|
+
"17843811134343075018": {
|
|
1765
|
+
"error_kind": "string",
|
|
1766
|
+
"string": "Stack too deep"
|
|
1767
|
+
},
|
|
1768
|
+
"2242946026394210301": {
|
|
1769
|
+
"error_kind": "string",
|
|
1770
|
+
"string": "Block number mismatch."
|
|
1771
|
+
},
|
|
1772
|
+
"8209322232883590150": {
|
|
1773
|
+
"error_kind": "string",
|
|
1774
|
+
"string": "Function _check_block_number can only be called internally"
|
|
1775
|
+
}
|
|
1776
|
+
},
|
|
1777
|
+
"parameters": [
|
|
1778
|
+
{
|
|
1779
|
+
"name": "operation",
|
|
1780
|
+
"type": {
|
|
1781
|
+
"kind": "integer",
|
|
1782
|
+
"sign": "unsigned",
|
|
1783
|
+
"width": 8
|
|
1784
|
+
},
|
|
1785
|
+
"visibility": "private"
|
|
1786
|
+
},
|
|
1787
|
+
{
|
|
1788
|
+
"name": "value",
|
|
1789
|
+
"type": {
|
|
1790
|
+
"kind": "field"
|
|
1791
|
+
},
|
|
1792
|
+
"visibility": "private"
|
|
1793
|
+
}
|
|
1794
|
+
],
|
|
1795
|
+
"return_type": null
|
|
1796
|
+
},
|
|
1797
|
+
"bytecode": "JgACBAEnAAABBIBLJgAABAMmAgMEAiYCBAQAHxgABAADgEkdAIBJgEkCLQiASQABLQiASgACJAAAAFIkAAAAfScCAAEEgEsmAgIEADoNAAEAAicAgEMCAAQnAIBEAgAGJwCARQIAAScAgEYCAAInAIBHAgAFJwCASAIAAyUkAAADQR4CAAQBHgIABQAKOAQFBiMCAAYAAACeJAAAA2oeAgAECSYCBQABCjgEBQYjAgAGAAAAuiQAAAN8HgIABAUKOAQCBQw4BAIGCygAAYBFAAImAgQBASMCAAIAAAMqIgAAAOMLKAABgEYABxYMBQgjAgAHAAADGCIAAAD8CygAAYBIAAkjAgAJAAADBiIAAAERCygAAYBDAAojAgAKAAAC7yIAAAEmCygAAYBHAAoWDAYLIwIACgAAAtgiAAABPwsoAAGARAAIIwIACAAAAsYiAAABVCYCAQJ2JgIIAm8mAgoCaSYCCwJlJgIMAiAmAg0CbCYCDgJuJgIPAnQmAhACcCYCEQJkJgISAmEmAhMCSSYCFAJyLAgBFSYCFgQSABABFgEmAxUEAQAoFQIWLAwWFywOExcAKBcCFywODhcAKBcCFywOARcAKBcCFywOEhcAKBcCFywODRcAKBcCFywOChcAKBcCFywOERcAKBcCFywODBcAKBcCFywOCBcAKBcCFywOEBcAKBcCFywOCxcAKBc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30uB6AOyHK9AMIK4PcCn0NwAcYivSB0gRa1Fwwy1SzbPaXOgBUAIDXFoQxwNgMACjFTBagaAVCFqBohUoWoGhFRhaQUIrSGAF0Tk0AFwBuFxHimgAtAKPVuDRCkJAAygYIHo0gIABmNAA6FKBXvSjoIMm6KApOmhqYABDB83QpSKhg5bApYLRuwpG7yoYvatg9K6CCRw09gENAA4aB48GQActEhoAHTT0UQIzOmiMLhWCDpqgS4Wig6boUmHDg2Yxn5ua/jzWPEMmf07RwyE0+28mUgqTVIwnqRRPxMVimKRSmFAohomVwsQX48kIu6yRmIzwXWQsJlwKEy7GEy7GEyll3REpJjtaTD3RYmqsFeOJFeNJ8sUwKSU76kf49yd2w/fvROgIJ+fS8W8m0ymA3fwFqe1088L/+Nm8/Z2uZtPneb2/Ffm2XbwcXZLc/PuoT+5LfqyWL/XrdlW3NycPlybbbJLShIwaMtQuc8RpQhLb19YwEpuQuga1Qf4P",
|
|
1799
|
+
"brillig_names": [
|
|
1800
|
+
"_check_block_number"
|
|
1801
|
+
]
|
|
1974
1802
|
},
|
|
1975
1803
|
{
|
|
1976
1804
|
"name": "check_timestamp",
|
|
@@ -3596,13 +3424,185 @@
|
|
|
3596
3424
|
}
|
|
3597
3425
|
},
|
|
3598
3426
|
"bytecode": "H4sIAAAAAAAA/+XdBXRT99/H8dSA4lYYE2yCQ7RNcHd3h0qKDoZtzDt3d2fK3F2Zb8zdN7bBFHfn+XxHMm5D2DnPvzf7P+/z3HPep22S3rx+N9I0uZLm2TvVzfB4dqfv/T5NZcS+2kkNE06Lf3V+n5XkcpWSnFYlyWnVkpxWI8lpdVTnhNMaJLlcwySnNUpyWuMkpzVJclpTVSHhtGYxi3NKi32Nnx7w5gaD0Tx/1Bfw5Xv9kYJwyBsMFeSGfWFfKBwq8ocDgWg4GM6LFETyvBFfMBD1FYcigWLv3qlaxr55ecs0+QtT6az+nzsDiSeYrabKdFhtOex23Ba7HbdB/PvqscvEf6+Gfq6paqnaGftOj0/pCcvAW7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yTvvB1jiV+fvw+3KNk37LsUVLaFL9ML8dleh3gMr0dl+ntuIxN//QCOvGPt9OR7MVgz4TzMj372+LnOZ+Y4yZ7Aq/t2fd9jsNoU5+Sffa//2B4UvoiP5Lif7Z8tTwHfoEU/6NWL/ZzZcf30VlzFkQXRAcvKJg5rbDnglmFe5/9Z85MfPJ33sGcU1bC5RJ/L9kTvfPnzISfs5LM90C/n3jage6MTj/hD0r92M//7T8o/wMgWDyPjBsCAA==",
|
|
3599
|
-
"debug_symbols": "7ZXdisIwEIXfJde9yExm8uOrLCJVqxRKK7UuLOK7byImXdcoFNkFwZvSab6ZOZxM0qNYV8vDdlG3m24vZh9H0XSrcqi71kdHAXz+tt+
|
|
3427
|
+
"debug_symbols": "7ZXdisIwEIXfJde9yExm8uOrLCJVqxRKK7UuLOK7byImXdcoFNkFwZvSab6ZOZxM0qNYV8vDdlG3m24vZh9H0XSrcqi71kdHAXz+tt+VbQj3Q9kPYgZaYyGqdh1eDZ4KsambSsy0f72BEbW5wIjWJdjaHOzIXmAlER7DoElx0kE01kYtc8UBdVQCxCNtTK660ioWJ5BX9LwQoN/O3HHGvJ2544x92hmSLsIEaBPs80ID98cNUOYamOSRlfZxeUBCGcUgsRpxzuAqzQEBJRSUPIuB58WM+4Us9WMx4Fi5iDtm/dOc3BBb59IUu1sv8bXlq/+VjxJsOopSObjS44NlXzdNvV1c/cBkeBDlpDLE7sz4e7aIp6fo6SlmeoqdmOIjCGR+3DiddsPjXRgO/vzkw8+yr8tlUwUvw+qhXUVrfTh87eJKNH/Xd6tqfeirsA3jDoRZUVAQhEsq3CEsC+ak7fwJuVDSd/WdvwE=",
|
|
3600
3428
|
"brillig_names": [
|
|
3601
3429
|
"store_in_execution_cache_oracle_wrapper",
|
|
3602
3430
|
"enqueue_public_function_call_internal"
|
|
3603
3431
|
],
|
|
3604
3432
|
"verification_key": "AAAAAAAQAAAAAAAAAAAAFAAAAAAAAAAQAAAAAAADKLEBAAAAAAAAAAEAAAACAAAAA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GficaDurFFdOsWhmau3STOk78mMWbKBTt580n2u0AwzwShgvEsEYtONbUuh5HY6dOzbEcofNGloDCcOVRUVNEWS9ZGI+nZRLbOeiSgmsyYQ7gglHgBfzpF8DV3KAZR3xS9gdTMrYSAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAiz1doGZ2WH0DPjaOIjG+BV4Y10TSaSfbnCmOq3SkSAiCkYC3Pqk2HCCxL1v2ukS9e02v7zL1S+MObPoc8RzFTIPy7+dPPQCuqPu2l8Knkm1werJWyZMMC3IVObyLXMw3yg+39qJyUgFl/CzRC6XUt751Y/Ckgg2GUJh97Fj/vuvHViqYcZK1SIEPXnEgCIZ5Vuhl1Gt/mw2Mk0/tsLaCYktfBipPD2uWICfqu7GqGp49LO8YfGdbnBpNZu/R+f5Bw=="
|
|
3605
3433
|
},
|
|
3434
|
+
{
|
|
3435
|
+
"name": "_check_timestamp",
|
|
3436
|
+
"is_unconstrained": true,
|
|
3437
|
+
"custom_attributes": [
|
|
3438
|
+
"public",
|
|
3439
|
+
"internal",
|
|
3440
|
+
"view"
|
|
3441
|
+
],
|
|
3442
|
+
"abi": {
|
|
3443
|
+
"error_types": {
|
|
3444
|
+
"11405868724477732285": {
|
|
3445
|
+
"error_kind": "string",
|
|
3446
|
+
"string": "Function _check_timestamp can only be called internally"
|
|
3447
|
+
},
|
|
3448
|
+
"13418685691864489983": {
|
|
3449
|
+
"error_kind": "string",
|
|
3450
|
+
"string": "Function _check_timestamp can only be called statically"
|
|
3451
|
+
},
|
|
3452
|
+
"1433889167918961673": {
|
|
3453
|
+
"error_kind": "fmtstring",
|
|
3454
|
+
"item_types": [],
|
|
3455
|
+
"length": 17
|
|
3456
|
+
},
|
|
3457
|
+
"17843811134343075018": {
|
|
3458
|
+
"error_kind": "string",
|
|
3459
|
+
"string": "Stack too deep"
|
|
3460
|
+
},
|
|
3461
|
+
"8443716675528357851": {
|
|
3462
|
+
"error_kind": "string",
|
|
3463
|
+
"string": "Timestamp mismatch."
|
|
3464
|
+
}
|
|
3465
|
+
},
|
|
3466
|
+
"parameters": [
|
|
3467
|
+
{
|
|
3468
|
+
"name": "operation",
|
|
3469
|
+
"type": {
|
|
3470
|
+
"kind": "integer",
|
|
3471
|
+
"sign": "unsigned",
|
|
3472
|
+
"width": 8
|
|
3473
|
+
},
|
|
3474
|
+
"visibility": "private"
|
|
3475
|
+
},
|
|
3476
|
+
{
|
|
3477
|
+
"name": "value",
|
|
3478
|
+
"type": {
|
|
3479
|
+
"kind": "integer",
|
|
3480
|
+
"sign": "unsigned",
|
|
3481
|
+
"width": 64
|
|
3482
|
+
},
|
|
3483
|
+
"visibility": "private"
|
|
3484
|
+
}
|
|
3485
|
+
],
|
|
3486
|
+
"return_type": null
|
|
3487
|
+
},
|
|
3488
|
+
"bytecode": "JgACBAEnAAABBIBLJgAABAMmAgMEAiYCBAQAHxgABAADgEkdAIBJgEkCHQCASoBKBS0IgEkAAS0IgEoAAiQAAABZJAAAAIQnAgABBIBLJgICBAA6DQABAAInAIBDAgAEJwCARAIABicAgEUCAAEnAIBGAgACJwCARwIABScAgEgCAAMlJAAAA1IeAgAEAR4CAAUACjgEBQYjAgAGAAAApSQAAAN7HgIABAkmAgUAAQo4BAUGIwIABgAAAMEkAAADjR4CAAQGHAwEBQAcDAIEAAo4BQQCDDgFBAYLKAABgEUABCYCBQEBIwIABAAAAzsiAAAA9AsoAAGARgAHFgwCCCMCAAcAAAMpIgAAAQ0LKAABgEgACSMCAAkAAAMXIgAAASILKAABgEMACiMCAAoAAAMAIgAAATcLKAABgEcAChYMBgsjAgAKAAAC6SIAAAFQCygAAYBEAAgjAgAIAAAC1yIAAAFlJgIBAkkmAggCZCYCCgJhJgILAnImAgwCbyYCDQJpJgIOAnYmAg8CZSYCEAIgJgIRAmwmAhICbiYCEwJ0JgIUAnAsCAEVJgIWBBIAEAEWASYDFQQBACgVAhYsDBYXLA4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jGYJBaDKegvt6OSlNtRnTs1ONl5MkzEJwIcjQpgctoXybBo3CoK1hclO6/bpzJW6DiU1Q4A7CcDiCu+inffAEZuXG/F1yR0/CdwGmMe+57gIx8jwWMze06FRu4fen4wM2mZmr8pzEQOtkz3XaT3XWXgu8hkgMD0OTZ4HQD80PwuAThmQD0NAGKarkClT+QQINFkgOhLImMcAHhmrEX5lpwOoOWuNvIDAB/BAEHBANGhAdAKFK1A0QoMrcDQChJaQQIrEHJoALQCRitgtAKHVuDA7Vo8owHQCgStQNAKAqEBBA0AXrZI9GgAAwOgH/qCfuiLoYNm6KAldNBSQAOAgxZI0ADgoAX2aABw0AJ6VRHQq4qAXlUEDw5aEEIDoIMm6FYR0EEL6FaB3koI6K2EoOigKbpVGDpohm4Vhg5aQreKND1oJmXfNL8I+Ti/pd+/RtTjJnQ4vL2I5KthUo0nXI0njqthEmth4qkaJqEWJlKNJzOssmZiMsN7kZmYzLDqmYtJNZ5oNZ5oNc8dqyY7qZp+kmrpsUq1eKJUjyepFiZcS3ZUZvj6I/30wzMROsPOeez5RxscOLKL3yB1RRc/+G8/8tXf5W61vF+3n4cvn942D1/OYu7/vbQnxzJfdtuH9vFt13YHNI9nM7sVO6ss2CST4S6qHN2Co3aX3SqaLeS/akbNyP8B",
|
|
3490
|
+
"brillig_names": [
|
|
3491
|
+
"_check_timestamp"
|
|
3492
|
+
]
|
|
3493
|
+
},
|
|
3494
|
+
{
|
|
3495
|
+
"name": "process_log",
|
|
3496
|
+
"is_unconstrained": true,
|
|
3497
|
+
"custom_attributes": [],
|
|
3498
|
+
"abi": {
|
|
3499
|
+
"error_types": {
|
|
3500
|
+
"16541607464495309456": {
|
|
3501
|
+
"error_kind": "fmtstring",
|
|
3502
|
+
"item_types": [],
|
|
3503
|
+
"length": 16
|
|
3504
|
+
},
|
|
3505
|
+
"17843811134343075018": {
|
|
3506
|
+
"error_kind": "string",
|
|
3507
|
+
"string": "Stack too deep"
|
|
3508
|
+
}
|
|
3509
|
+
},
|
|
3510
|
+
"parameters": [
|
|
3511
|
+
{
|
|
3512
|
+
"name": "log_plaintext",
|
|
3513
|
+
"type": {
|
|
3514
|
+
"fields": [
|
|
3515
|
+
{
|
|
3516
|
+
"name": "storage",
|
|
3517
|
+
"type": {
|
|
3518
|
+
"kind": "array",
|
|
3519
|
+
"length": 18,
|
|
3520
|
+
"type": {
|
|
3521
|
+
"kind": "field"
|
|
3522
|
+
}
|
|
3523
|
+
}
|
|
3524
|
+
},
|
|
3525
|
+
{
|
|
3526
|
+
"name": "len",
|
|
3527
|
+
"type": {
|
|
3528
|
+
"kind": "integer",
|
|
3529
|
+
"sign": "unsigned",
|
|
3530
|
+
"width": 32
|
|
3531
|
+
}
|
|
3532
|
+
}
|
|
3533
|
+
],
|
|
3534
|
+
"kind": "struct",
|
|
3535
|
+
"path": "std::collections::bounded_vec::BoundedVec"
|
|
3536
|
+
},
|
|
3537
|
+
"visibility": "private"
|
|
3538
|
+
},
|
|
3539
|
+
{
|
|
3540
|
+
"name": "tx_hash",
|
|
3541
|
+
"type": {
|
|
3542
|
+
"kind": "field"
|
|
3543
|
+
},
|
|
3544
|
+
"visibility": "private"
|
|
3545
|
+
},
|
|
3546
|
+
{
|
|
3547
|
+
"name": "unique_note_hashes_in_tx",
|
|
3548
|
+
"type": {
|
|
3549
|
+
"fields": [
|
|
3550
|
+
{
|
|
3551
|
+
"name": "storage",
|
|
3552
|
+
"type": {
|
|
3553
|
+
"kind": "array",
|
|
3554
|
+
"length": 64,
|
|
3555
|
+
"type": {
|
|
3556
|
+
"kind": "field"
|
|
3557
|
+
}
|
|
3558
|
+
}
|
|
3559
|
+
},
|
|
3560
|
+
{
|
|
3561
|
+
"name": "len",
|
|
3562
|
+
"type": {
|
|
3563
|
+
"kind": "integer",
|
|
3564
|
+
"sign": "unsigned",
|
|
3565
|
+
"width": 32
|
|
3566
|
+
}
|
|
3567
|
+
}
|
|
3568
|
+
],
|
|
3569
|
+
"kind": "struct",
|
|
3570
|
+
"path": "std::collections::bounded_vec::BoundedVec"
|
|
3571
|
+
},
|
|
3572
|
+
"visibility": "private"
|
|
3573
|
+
},
|
|
3574
|
+
{
|
|
3575
|
+
"name": "first_nullifier_in_tx",
|
|
3576
|
+
"type": {
|
|
3577
|
+
"kind": "field"
|
|
3578
|
+
},
|
|
3579
|
+
"visibility": "private"
|
|
3580
|
+
},
|
|
3581
|
+
{
|
|
3582
|
+
"name": "recipient",
|
|
3583
|
+
"type": {
|
|
3584
|
+
"fields": [
|
|
3585
|
+
{
|
|
3586
|
+
"name": "inner",
|
|
3587
|
+
"type": {
|
|
3588
|
+
"kind": "field"
|
|
3589
|
+
}
|
|
3590
|
+
}
|
|
3591
|
+
],
|
|
3592
|
+
"kind": "struct",
|
|
3593
|
+
"path": "aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
3594
|
+
},
|
|
3595
|
+
"visibility": "private"
|
|
3596
|
+
}
|
|
3597
|
+
],
|
|
3598
|
+
"return_type": null
|
|
3599
|
+
},
|
|
3600
|
+
"bytecode": "H4sIAAAAAAAA/92c927bMBDG5URKIieOndG9927leHeme+/W/dsdfosWAtqHSPu09Zfw7DPDAilCovkqQJCto+9+PFHUiTy6EG1s3cFeMJ9jc5w2R5xfjMY3Kbtqjtn2tqpHXVkoxgIB4wQB4yQBY0zAmBAwThEwThMwzhAwpgSMRQLGWQLGOQLGEgHjPAFjmYCxQsC4EIAxBOciCeeSR04d24fiXY52fhvdRcC4m4BxDwHjXgLGfQSM+wkYDxAwHiRgPETAeJiA8QgB41ECxmMEjMcJGE8QMJ4kYDxFwHiagPEMAeNZAsZzBIznCRgvEDBeJGC8RMB4mYDxCgFjRsBYJWBcIWCsETDWCRgbBIxNAsYWAWObgLFDwHiVgPEaAeN1AsYbBIw3CRhvETCuEjDeJmC8Q8B4l4DxHgHjfQLGBwSMDwkYHxEwPiZgfELA+JSA8RkB43MCxhcEjC8JGF8RML4mYHxDwPg2AGMIzncknO9JOLuBOKMPFvTEYMfCLSyMwsIjLO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rt3iP9Vq/ar/X6vUbv8+f6p96ipV/7EH76DXVGL3ipUwAA",
|
|
3601
|
+
"debug_symbols": "tZZBCoMwEEXvknUWzli19SqlSNQogRAlaqGId28i0kq7/puQCZM3ZPHIX0Wr66WvjOuGSZT3VdihUbMZXKjWTYraG2tNX52PRRIXSni/MI3KxXqalZ9FmWapFNq1YZdTAHTGalHmvMm/1oKPzqL4NGa8PWRgp0D2BcjOgOwcyC6A7CuQfcOxKQGyCcgGeklALwnoJQG9JKCXBPSSgF4S0EsGeslALxnoJQO9ZJSXW6ieyhtVW33EjW5xzSl9zK9R/wSR0Q+NbhevYyT5ppH4/gvLjPdfIRTEuaSUwpAw6A0=",
|
|
3602
|
+
"brillig_names": [
|
|
3603
|
+
"process_log"
|
|
3604
|
+
]
|
|
3605
|
+
},
|
|
3606
3606
|
{
|
|
3607
3607
|
"name": "public_dispatch",
|
|
3608
3608
|
"is_unconstrained": true,
|
|
@@ -3669,8 +3669,8 @@
|
|
|
3669
3669
|
],
|
|
3670
3670
|
"return_type": null
|
|
3671
3671
|
},
|
|
3672
|
-
"bytecode": "
|
|
3673
|
-
"debug_symbols": "zV3bbhs5DP0XP+
|
|
3672
|
+
"bytecode": "JgACBAEnAAABBIBKJgAABAMmAgIEASYCAwQAHxgAAwACgEktCIBJAAEkAAAARSQAAABwJwIAAQSASiYCAgQAOg0AAQACJwCAQwIABCcAgEQCAAYnAIBFAgABJwCARgIAAicAgEcCAAUnAIBIAgADJSQAAAT0KAIAAgBYryrgCjgBAgMmAgQEACYCBgQDADgEBgUsCAECABABBQEmAwIEAQAoAgIFLA4EBQAoBQIFLA4EBSYCBQQDADgCBQQmAgQEAiYCBQEBJgIGAAEmAgcEASYCCAQAIwIAAwAAAOIiAAACQCwIAQMmAgkEAwAQAQkBJgMDBAEAKAMCCR88AAcABAAJLA0DCQAoCQIJLA4JAywIAQkAAAECASwOAwksCAEDAAABAgEsDggDJgILBAwsCAAMLAwJDSwMAw4AEAALACQAAAUdLAQAACw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FTsZyCoJ+klKZh1gGdyaFTUVukA+pvGs2Y11/wqI4esoKnoP6Avgw6cxlkBtR/q86BIkoYUcKIEkWUKKLEESWOKElESSJKGlHSiJJFlCwyNPpv1TlQQOnMNYM5UESpf/prDkQRUCCFnTkQPweyACiSWDSSWJQizqWIczni3P4cfw4Uca5EwkgiztVIGEWykUaykUaykUaykbaAc62UCIgioEAYWcUIKBBGFpnmWGSaY1gjoEAYGUWcS5EwoohzORJG/Y0wo3FeblpmllUXNqusvzWxGnuq7Zpqu6ba3s+Sa7H30+lq7JzIfuYw4Wrsuba3TPZ+xl6NXTPZMdV2TLWdMJU9NWY4Nd4ldaxKqu2aanv/0Ptq7IkxA+XMMpomyOlOIJR+AVYmHbGjLeNfw9d/b5/ubj/eb19/XubLj4dPB7828/zft+3RD898e3r8tP3842m7+wma/a/P7LSH7eUbItj1z85+GHa4Qeru6+5lSCTDv9qgOij/Dw==",
|
|
3674
3674
|
"brillig_names": [
|
|
3675
3675
|
"public_dispatch"
|
|
3676
3676
|
]
|
|
@@ -3702,12 +3702,12 @@
|
|
|
3702
3702
|
}
|
|
3703
3703
|
],
|
|
3704
3704
|
"kind": "struct",
|
|
3705
|
-
"path": "Router::
|
|
3705
|
+
"path": "Router::_check_block_number_parameters"
|
|
3706
3706
|
}
|
|
3707
3707
|
}
|
|
3708
3708
|
],
|
|
3709
3709
|
"kind": "struct",
|
|
3710
|
-
"path": "Router::
|
|
3710
|
+
"path": "Router::_check_block_number_abi"
|
|
3711
3711
|
},
|
|
3712
3712
|
{
|
|
3713
3713
|
"fields": [
|
|
@@ -3793,12 +3793,12 @@
|
|
|
3793
3793
|
}
|
|
3794
3794
|
],
|
|
3795
3795
|
"kind": "struct",
|
|
3796
|
-
"path": "Router::
|
|
3796
|
+
"path": "Router::check_block_number_parameters"
|
|
3797
3797
|
}
|
|
3798
3798
|
}
|
|
3799
3799
|
],
|
|
3800
3800
|
"kind": "struct",
|
|
3801
|
-
"path": "Router::
|
|
3801
|
+
"path": "Router::check_block_number_abi"
|
|
3802
3802
|
}
|
|
3803
3803
|
]
|
|
3804
3804
|
}
|
|
@@ -3822,25 +3822,25 @@
|
|
|
3822
3822
|
},
|
|
3823
3823
|
"18": {
|
|
3824
3824
|
"path": "std/field/bn254.nr",
|
|
3825
|
-
"source": "use crate::field::field_less_than;\nuse crate::runtime::is_unconstrained;\n\n// The low and high decomposition of the field modulus\nglobal PLO: Field = 53438638232309528389504892708671455233;\nglobal PHI: Field = 64323764613183177041862057485226039389;\n\npub(crate) global TWO_POW_128: Field = 0x100000000000000000000000000000000;\nglobal TWO_POW_64: Field = 0x10000000000000000;\n\n// Decomposes a single field into two 16 byte fields.\nfn compute_decomposition(mut x: Field) -> (Field, Field) {\n // Here's we're taking advantage of truncating 64 bit limbs from the input field\n // and then subtracting them from the input such the field division is equivalent to integer division.\n let low_lower_64 = (x as u64) as Field;\n x = (x - low_lower_64) / TWO_POW_64;\n let low_upper_64 = (x as u64) as Field;\n\n let high = (x - low_upper_64) / TWO_POW_64;\n let low = low_upper_64 * TWO_POW_64 + low_lower_64;\n\n (low, high)\n}\n\npub(crate) unconstrained fn decompose_hint(x: Field) -> (Field, Field) {\n compute_decomposition(x)\n}\n\nunconstrained fn lte_hint(x: Field, y: Field) -> bool {\n if x == y {\n true\n } else {\n field_less_than(x, y)\n }\n}\n\n// Assert that (alo > blo && ahi >= bhi) || (alo <= blo && ahi > bhi)\nfn assert_gt_limbs(a: (Field, Field), b: (Field, Field)) {\n let (alo, ahi) = a;\n let (blo, bhi) = b;\n /// Safety: borrow is enforced to be boolean due to its type.\n /// if borrow is 0, it asserts that (alo > blo && ahi >= bhi)\n /// if borrow is 1, it asserts that (alo <= blo && ahi > bhi)\n unsafe {\n
|
|
3825
|
+
"source": "use crate::field::field_less_than;\nuse crate::runtime::is_unconstrained;\n\n// The low and high decomposition of the field modulus\nglobal PLO: Field = 53438638232309528389504892708671455233;\nglobal PHI: Field = 64323764613183177041862057485226039389;\n\npub(crate) global TWO_POW_128: Field = 0x100000000000000000000000000000000;\nglobal TWO_POW_64: Field = 0x10000000000000000;\n\n// Decomposes a single field into two 16 byte fields.\nfn compute_decomposition(mut x: Field) -> (Field, Field) {\n // Here's we're taking advantage of truncating 64 bit limbs from the input field\n // and then subtracting them from the input such the field division is equivalent to integer division.\n let low_lower_64 = (x as u64) as Field;\n x = (x - low_lower_64) / TWO_POW_64;\n let low_upper_64 = (x as u64) as Field;\n\n let high = (x - low_upper_64) / TWO_POW_64;\n let low = low_upper_64 * TWO_POW_64 + low_lower_64;\n\n (low, high)\n}\n\npub(crate) unconstrained fn decompose_hint(x: Field) -> (Field, Field) {\n compute_decomposition(x)\n}\n\nunconstrained fn lte_hint(x: Field, y: Field) -> bool {\n if x == y {\n true\n } else {\n field_less_than(x, y)\n }\n}\n\n// Assert that (alo > blo && ahi >= bhi) || (alo <= blo && ahi > bhi)\nfn assert_gt_limbs(a: (Field, Field), b: (Field, Field)) {\n let (alo, ahi) = a;\n let (blo, bhi) = b;\n /// Safety: borrow is enforced to be boolean due to its type.\n /// if borrow is 0, it asserts that (alo > blo && ahi >= bhi)\n /// if borrow is 1, it asserts that (alo <= blo && ahi > bhi)\n unsafe {\n let borrow = lte_hint(alo, blo);\n\n let rlo = alo - blo - 1 + (borrow as Field) * TWO_POW_128;\n let rhi = ahi - bhi - (borrow as Field);\n\n rlo.assert_max_bit_size::<128>();\n rhi.assert_max_bit_size::<128>();\n }\n}\n\n/// Decompose a single field into two 16 byte fields.\npub fn decompose(x: Field) -> (Field, Field) {\n if is_unconstrained() {\n compute_decomposition(x)\n } else {\n /// Safety: decomposition is properly checked below\n unsafe {\n // Take hints of the decomposition\n let (xlo, xhi) = decompose_hint(x);\n\n // Range check the limbs\n xlo.assert_max_bit_size::<128>();\n xhi.assert_max_bit_size::<128>();\n\n // Check that the decomposition is correct\n assert_eq(x, xlo + TWO_POW_128 * xhi);\n\n // Assert that the decomposition of P is greater than the decomposition of x\n assert_gt_limbs((PLO, PHI), (xlo, xhi));\n (xlo, xhi)\n }\n }\n}\n\npub fn assert_gt(a: Field, b: Field) {\n if is_unconstrained() {\n assert(\n /// Safety: already unconstrained\n unsafe { field_less_than(b, a) },\n );\n } else {\n // Decompose a and b\n let a_limbs = decompose(a);\n let b_limbs = decompose(b);\n\n // Assert that a_limbs is greater than b_limbs\n assert_gt_limbs(a_limbs, b_limbs)\n }\n}\n\npub fn assert_lt(a: Field, b: Field) {\n assert_gt(b, a);\n}\n\npub fn gt(a: Field, b: Field) -> bool {\n if is_unconstrained() {\n /// Safety: unsafe in unconstrained\n unsafe {\n field_less_than(b, a)\n }\n } else if a == b {\n false\n } else {\n /// Safety: Take a hint of the comparison and verify it\n unsafe {\n if field_less_than(a, b) {\n assert_gt(b, a);\n false\n } else {\n assert_gt(a, b);\n true\n }\n }\n }\n}\n\npub fn lt(a: Field, b: Field) -> bool {\n gt(b, a)\n}\n\nmod tests {\n // TODO: Allow imports from \"super\"\n use crate::field::bn254::{assert_gt, decompose, gt, lte_hint, PHI, PLO, TWO_POW_128};\n\n #[test]\n fn check_decompose() {\n assert_eq(decompose(TWO_POW_128), (0, 1));\n assert_eq(decompose(TWO_POW_128 + 0x1234567890), (0x1234567890, 1));\n assert_eq(decompose(0x1234567890), (0x1234567890, 0));\n }\n\n #[test]\n unconstrained fn check_decompose_unconstrained() {\n assert_eq(decompose(TWO_POW_128), (0, 1));\n assert_eq(decompose(TWO_POW_128 + 0x1234567890), (0x1234567890, 1));\n assert_eq(decompose(0x1234567890), (0x1234567890, 0));\n }\n\n #[test]\n unconstrained fn check_lte_hint() {\n assert(lte_hint(0, 1));\n assert(lte_hint(0, 0x100));\n assert(lte_hint(0x100, TWO_POW_128 - 1));\n assert(!lte_hint(0 - 1, 0));\n\n assert(lte_hint(0, 0));\n assert(lte_hint(0x100, 0x100));\n assert(lte_hint(0 - 1, 0 - 1));\n }\n\n #[test]\n fn check_assert_gt() {\n assert_gt(1, 0);\n assert_gt(0x100, 0);\n assert_gt((0 - 1), (0 - 2));\n assert_gt(TWO_POW_128, 0);\n assert_gt(0 - 1, 0);\n }\n\n #[test]\n unconstrained fn check_assert_gt_unconstrained() {\n assert_gt(1, 0);\n assert_gt(0x100, 0);\n assert_gt((0 - 1), (0 - 2));\n assert_gt(TWO_POW_128, 0);\n assert_gt(0 - 1, 0);\n }\n\n #[test]\n fn check_gt() {\n assert(gt(1, 0));\n assert(gt(0x100, 0));\n assert(gt((0 - 1), (0 - 2)));\n assert(gt(TWO_POW_128, 0));\n assert(!gt(0, 0));\n assert(!gt(0, 0x100));\n assert(gt(0 - 1, 0 - 2));\n assert(!gt(0 - 2, 0 - 1));\n }\n\n #[test]\n unconstrained fn check_gt_unconstrained() {\n assert(gt(1, 0));\n assert(gt(0x100, 0));\n assert(gt((0 - 1), (0 - 2)));\n assert(gt(TWO_POW_128, 0));\n assert(!gt(0, 0));\n assert(!gt(0, 0x100));\n assert(gt(0 - 1, 0 - 2));\n assert(!gt(0 - 2, 0 - 1));\n }\n\n #[test]\n fn check_plo_phi() {\n assert_eq(PLO + PHI * TWO_POW_128, 0);\n let p_bytes = crate::field::modulus_le_bytes();\n let mut p_low: Field = 0;\n let mut p_high: Field = 0;\n\n let mut offset = 1;\n for i in 0..16 {\n p_low += (p_bytes[i] as Field) * offset;\n p_high += (p_bytes[i + 16] as Field) * offset;\n offset *= 256;\n }\n assert_eq(p_low, PLO);\n assert_eq(p_high, PHI);\n }\n}\n"
|
|
3826
3826
|
},
|
|
3827
3827
|
"19": {
|
|
3828
3828
|
"path": "std/field/mod.nr",
|
|
3829
|
-
"source": "pub mod bn254;\nuse crate::{runtime::is_unconstrained, static_assert};\nuse bn254::lt as bn254_lt;\n\nimpl Field {\n /// Asserts that `self` can be represented in `bit_size` bits.\n ///\n /// # Failures\n /// Causes a constraint failure for `Field` values exceeding `2^{bit_size}`.\n // docs:start:assert_max_bit_size\n pub fn assert_max_bit_size<let BIT_SIZE: u32>(self) {\n // docs:end:assert_max_bit_size\n static_assert(\n BIT_SIZE < modulus_num_bits() as u32,\n \"BIT_SIZE must be less than modulus_num_bits\",\n );\n self.__assert_max_bit_size(BIT_SIZE);\n }\n\n #[builtin(apply_range_constraint)]\n fn __assert_max_bit_size(self, bit_size: u32) {}\n\n /// Decomposes `self` into its little endian bit decomposition as a `[u1; N]` array.\n /// This slice will be zero padded should not all bits be necessary to represent `self`.\n ///\n /// # Failures\n /// Causes a constraint failure for `Field` values exceeding `2^N` as the resulting slice will not\n /// be able to represent the original `Field`.\n ///\n /// # Safety\n /// Values of `N` equal to or greater than the number of bits necessary to represent the `Field` modulus\n /// (e.g. 254 for the BN254 field) allow for multiple bit decompositions. This is due to how the `Field` will\n /// wrap around due to overflow when verifying the decomposition.\n #[builtin(to_le_bits)]\n fn _to_le_bits<let N: u32>(self: Self) -> [u1; N] {}\n\n /// Decomposes `self` into its big endian bit decomposition as a `[u1; N]` array.\n /// This array will be zero padded should not all bits be necessary to represent `self`.\n ///\n /// # Failures\n /// Causes a constraint failure for `Field` values exceeding `2^N` as the resulting slice will not\n /// be able to represent the original `Field`.\n ///\n /// # Safety\n /// Values of `N` equal to or greater than the number of bits necessary to represent the `Field` modulus\n /// (e.g. 254 for the BN254 field) allow for multiple bit decompositions. This is due to how the `Field` will\n /// wrap around due to overflow when verifying the decomposition.\n #[builtin(to_be_bits)]\n fn _to_be_bits<let N: u32>(self: Self) -> [u1; N] {}\n\n /// Decomposes `self` into its little endian bit decomposition as a `[u1; N]` array.\n /// This slice will be zero padded should not all bits be necessary to represent `self`.\n ///\n /// # Failures\n /// Causes a constraint failure for `Field` values exceeding `2^N` as the resulting slice will not\n /// be able to represent the original `Field`.\n ///\n /// # Safety\n /// The bit decomposition returned is canonical and is guaranteed to not overflow the modulus.\n // docs:start:to_le_bits\n pub fn to_le_bits<let N: u32>(self: Self) -> [u1; N] {\n // docs:end:to_le_bits\n let bits = self._to_le_bits();\n\n if !is_unconstrained() {\n // Ensure that the byte decomposition does not overflow the modulus\n let p = modulus_le_bits();\n assert(bits.len() <= p.len());\n let mut ok = bits.len() != p.len();\n for i in 0..N {\n if !ok {\n if (bits[N - 1 - i] != p[N - 1 - i]) {\n assert(p[N - 1 - i] == 1);\n ok = true;\n }\n }\n }\n assert(ok);\n }\n bits\n }\n\n /// Decomposes `self` into its big endian bit decomposition as a `[u1; N]` array.\n /// This array will be zero padded should not all bits be necessary to represent `self`.\n ///\n /// # Failures\n /// Causes a constraint failure for `Field` values exceeding `2^N` as the resulting slice will not\n /// be able to represent the original `Field`.\n ///\n /// # Safety\n /// The bit decomposition returned is canonical and is guaranteed to not overflow the modulus.\n // docs:start:to_be_bits\n pub fn to_be_bits<let N: u32>(self: Self) -> [u1; N] {\n // docs:end:to_be_bits\n let bits = self._to_be_bits();\n\n if !is_unconstrained() {\n // Ensure that the decomposition does not overflow the modulus\n let p = modulus_be_bits();\n assert(bits.len() <= p.len());\n let mut ok = bits.len() != p.len();\n for i in 0..N {\n if !ok {\n if (bits[i] != p[i]) {\n assert(p[i] == 1);\n ok = true;\n }\n }\n }\n assert(ok);\n }\n bits\n }\n\n /// Decomposes `self` into its little endian byte decomposition as a `[u8;N]` array\n /// This array will be zero padded should not all bytes be necessary to represent `self`.\n ///\n /// # Failures\n /// The length N of the array must be big enough to contain all the bytes of the 'self',\n /// and no more than the number of bytes required to represent the field modulus\n ///\n /// # Safety\n /// The result is ensured to be the canonical decomposition of the field element\n // docs:start:to_le_bytes\n pub fn to_le_bytes<let N: u32>(self: Self) -> [u8; N] {\n // docs:end:to_le_bytes\n static_assert(\n N <= modulus_le_bytes().len(),\n \"N must be less than or equal to modulus_le_bytes().len()\",\n );\n // Compute the byte decomposition\n let bytes = self.to_le_radix(256);\n\n if !is_unconstrained() {\n // Ensure that the byte decomposition does not overflow the modulus\n let p = modulus_le_bytes();\n assert(bytes.len() <= p.len());\n let mut ok = bytes.len() != p.len();\n for i in 0..N {\n if !ok {\n if (bytes[N - 1 - i] != p[N - 1 - i]) {\n assert(bytes[N - 1 - i] < p[N - 1 - i]);\n ok = true;\n }\n }\n }\n assert(ok);\n }\n bytes\n }\n\n /// Decomposes `self` into its big endian byte decomposition as a `[u8;N]` array of length required to represent the field modulus\n /// This array will be zero padded should not all bytes be necessary to represent `self`.\n ///\n /// # Failures\n /// The length N of the array must be big enough to contain all the bytes of the 'self',\n /// and no more than the number of bytes required to represent the field modulus\n ///\n /// # Safety\n /// The result is ensured to be the canonical decomposition of the field element\n // docs:start:to_be_bytes\n pub fn to_be_bytes<let N: u32>(self: Self) -> [u8; N] {\n // docs:end:to_be_bytes\n static_assert(\n N <= modulus_le_bytes().len(),\n \"N must be less than or equal to modulus_le_bytes().len()\",\n );\n // Compute the byte decomposition\n let bytes = self.to_be_radix(256);\n\n if !is_unconstrained() {\n // Ensure that the byte decomposition does not overflow the modulus\n let p = modulus_be_bytes();\n assert(bytes.len() <= p.len());\n let mut ok = bytes.len() != p.len();\n for i in 0..N {\n if !ok {\n if (bytes[i] != p[i]) {\n assert(bytes[i] < p[i]);\n ok = true;\n }\n }\n }\n assert(ok);\n }\n bytes\n }\n\n // docs:start:to_le_radix\n pub fn to_le_radix<let N: u32>(self: Self, radix: u32) -> [u8; N] {\n // Brillig does not need an immediate radix\n if !crate::runtime::is_unconstrained() {\n static_assert(1 < radix, \"radix must be greater than 1\");\n static_assert(radix <= 256, \"radix must be less than or equal to 256\");\n static_assert(radix & (radix - 1) == 0, \"radix must be a power of 2\");\n }\n self.__to_le_radix(radix)\n }\n // docs:end:to_le_radix\n\n // docs:start:to_be_radix\n pub fn to_be_radix<let N: u32>(self: Self, radix: u32) -> [u8; N] {\n // Brillig does not need an immediate radix\n if !crate::runtime::is_unconstrained() {\n crate::assert_constant(radix);\n }\n self.__to_be_radix(radix)\n }\n // docs:end:to_be_radix\n\n // `_radix` must be less than 256\n #[builtin(to_le_radix)]\n fn __to_le_radix<let N: u32>(self, radix: u32) -> [u8; N] {}\n\n // `_radix` must be less than 256\n #[builtin(to_be_radix)]\n fn __to_be_radix<let N: u32>(self, radix: u32) -> [u8; N] {}\n\n // Returns self to the power of the given exponent value.\n // Caution: we assume the exponent fits into 32 bits\n // using a bigger bit size impacts negatively the performance and should be done only if the exponent does not fit in 32 bits\n pub fn pow_32(self, exponent: Field) -> Field {\n let mut r: Field = 1;\n let b: [u1; 32] = exponent.to_le_bits();\n\n for i in 1..33 {\n r *= r;\n r = (b[32 - i] as Field) * (r * self) + (1 - b[32 - i] as Field) * r;\n }\n r\n }\n\n // Parity of (prime) Field element, i.e. sgn0(x mod p) = 0 if x `elem` {0, ..., p-1} is even, otherwise sgn0(x mod p) = 1.\n pub fn sgn0(self) -> u1 {\n self as u1\n }\n\n pub fn lt(self, another: Field) -> bool {\n if crate::compat::is_bn254() {\n bn254_lt(self, another)\n } else {\n lt_fallback(self, another)\n }\n }\n\n /// Convert a little endian byte array to a field element.\n /// If the provided byte array overflows the field modulus then the Field will silently wrap around.\n pub fn from_le_bytes<let N: u32>(bytes: [u8; N]) -> Field {\n static_assert(\n N <= modulus_le_bytes().len(),\n \"N must be less than or equal to modulus_le_bytes().len()\",\n );\n let mut v = 1;\n let mut result = 0;\n\n for i in 0..N {\n result += (bytes[i] as Field) * v;\n v = v * 256;\n }\n result\n }\n\n /// Convert a big endian byte array to a field element.\n /// If the provided byte array overflows the field modulus then the Field will silently wrap around.\n pub fn from_be_bytes<let N: u32>(bytes: [u8; N]) -> Field {\n let mut v = 1;\n let mut result = 0;\n\n for i in 0..N {\n result += (bytes[N - 1 - i] as Field) * v;\n v = v * 256;\n }\n result\n }\n}\n\n#[builtin(modulus_num_bits)]\npub comptime fn modulus_num_bits() -> u64 {}\n\n#[builtin(modulus_be_bits)]\npub comptime fn modulus_be_bits() -> [u1] {}\n\n#[builtin(modulus_le_bits)]\npub comptime fn modulus_le_bits() -> [u1] {}\n\n#[builtin(modulus_be_bytes)]\npub comptime fn modulus_be_bytes() -> [u8] {}\n\n#[builtin(modulus_le_bytes)]\npub comptime fn modulus_le_bytes() -> [u8] {}\n\n/// An unconstrained only built in to efficiently compare fields.\n#[builtin(field_less_than)]\nunconstrained fn __field_less_than(x: Field, y: Field) -> bool {}\n\npub(crate) unconstrained fn field_less_than(x: Field, y: Field) -> bool {\n __field_less_than(x, y)\n}\n\n// Convert a 32 byte array to a field element by modding\npub fn bytes32_to_field(bytes32: [u8; 32]) -> Field {\n // Convert it to a field element\n let mut v = 1;\n let mut high = 0 as Field;\n let mut low = 0 as Field;\n\n for i in 0..16 {\n high = high + (bytes32[15 - i] as Field) * v;\n low = low + (bytes32[16 + 15 - i] as Field) * v;\n v = v * 256;\n }\n // Abuse that a % p + b % p = (a + b) % p and that low < p\n low + high * v\n}\n\nfn lt_fallback(x: Field, y: Field) -> bool {\n if is_unconstrained() {\n /// Safety: unconstrained context\n unsafe {\n //@safety : unconstrained context\n field_less_than(x, y)\n }\n } else {\n let x_bytes: [u8; 32] = x.to_le_bytes();\n let y_bytes: [u8; 32] = y.to_le_bytes();\n let mut x_is_lt = false;\n let mut done = false;\n for i in 0..32 {\n if (!done) {\n let x_byte = x_bytes[32 - 1 - i] as u8;\n let y_byte = y_bytes[32 - 1 - i] as u8;\n let bytes_match = x_byte == y_byte;\n if !bytes_match {\n x_is_lt = x_byte < y_byte;\n done = true;\n }\n }\n }\n x_is_lt\n }\n}\n\nmod tests {\n use crate::{panic::panic, runtime};\n use super::field_less_than;\n\n #[test]\n // docs:start:to_be_bits_example\n fn test_to_be_bits() {\n let field = 2;\n let bits: [u1; 8] = field.to_be_bits();\n assert_eq(bits, [0, 0, 0, 0, 0, 0, 1, 0]);\n }\n // docs:end:to_be_bits_example\n\n #[test]\n // docs:start:to_le_bits_example\n fn test_to_le_bits() {\n let field = 2;\n let bits: [u1; 8] = field.to_le_bits();\n assert_eq(bits, [0, 1, 0, 0, 0, 0, 0, 0]);\n }\n // docs:end:to_le_bits_example\n\n #[test]\n // docs:start:to_be_bytes_example\n fn test_to_be_bytes() {\n let field = 2;\n let bytes: [u8; 8] = field.to_be_bytes();\n assert_eq(bytes, [0, 0, 0, 0, 0, 0, 0, 2]);\n assert_eq(Field::from_be_bytes::<8>(bytes), field);\n }\n // docs:end:to_be_bytes_example\n\n #[test]\n // docs:start:to_le_bytes_example\n fn test_to_le_bytes() {\n let field = 2;\n let bytes: [u8; 8] = field.to_le_bytes();\n assert_eq(bytes, [2, 0, 0, 0, 0, 0, 0, 0]);\n assert_eq(Field::from_le_bytes::<8>(bytes), field);\n }\n // docs:end:to_le_bytes_example\n\n #[test]\n // docs:start:to_be_radix_example\n fn test_to_be_radix() {\n let field = 2;\n let bytes: [u8; 8] = field.to_be_radix(256);\n assert_eq(bytes, [0, 0, 0, 0, 0, 0, 0, 2]);\n assert_eq(Field::from_be_bytes::<8>(bytes), field);\n }\n // docs:end:to_be_radix_example\n\n #[test]\n // docs:start:to_le_radix_example\n fn test_to_le_radix() {\n let field = 2;\n let bytes: [u8; 8] = field.to_le_radix(256);\n assert_eq(bytes, [2, 0, 0, 0, 0, 0, 0, 0]);\n assert_eq(Field::from_le_bytes::<8>(bytes), field);\n }\n // docs:end:to_le_radix_example\n\n #[test(should_fail_with = \"radix must be greater than 1\")]\n fn test_to_le_radix_1() {\n // this test should only fail in constrained mode\n if !runtime::is_unconstrained() {\n let field = 2;\n let _: [u8; 8] = field.to_le_radix(1);\n } else {\n panic(f\"radix must be greater than 1\");\n }\n }\n\n // TODO: Update this test to account for the Brillig restriction that the radix must be greater than 2\n // #[test]\n // fn test_to_le_radix_brillig_1() {\n // // this test should only fail in constrained mode\n // if runtime::is_unconstrained() {\n // let field = 1;\n // let out: [u8; 8] = field.to_le_radix(1);\n // crate::println(out);\n // let expected = [0; 8];\n // assert(out == expected, \"unexpected result\");\n // }\n // }\n\n #[test(should_fail_with = \"radix must be a power of 2\")]\n fn test_to_le_radix_3() {\n // this test should only fail in constrained mode\n if !runtime::is_unconstrained() {\n let field = 2;\n let _: [u8; 8] = field.to_le_radix(3);\n } else {\n panic(f\"radix must be a power of 2\");\n }\n }\n\n #[test]\n fn test_to_le_radix_brillig_3() {\n // this test should only fail in constrained mode\n if runtime::is_unconstrained() {\n let field = 1;\n let out: [u8; 8] = field.to_le_radix(3);\n let mut expected = [0; 8];\n expected[0] = 1;\n assert(out == expected, \"unexpected result\");\n }\n }\n\n #[test(should_fail_with = \"radix must be less than or equal to 256\")]\n fn test_to_le_radix_512() {\n // this test should only fail in constrained mode\n if !runtime::is_unconstrained() {\n let field = 2;\n let _: [u8; 8] = field.to_le_radix(512);\n } else {\n panic(f\"radix must be less than or equal to 256\")\n }\n }\n\n // TODO: Update this test to account for the Brillig restriction that the radix must be less than 512\n // #[test]\n // fn test_to_le_radix_brillig_512() {\n // // this test should only fail in constrained mode\n // if runtime::is_unconstrained() {\n // let field = 1;\n // let out: [u8; 8] = field.to_le_radix(512);\n // let mut expected = [0; 8];\n // expected[0] = 1;\n // assert(out == expected, \"unexpected result\");\n // }\n // }\n\n #[test]\n unconstrained fn test_field_less_than() {\n assert(field_less_than(0, 1));\n assert(field_less_than(0, 0x100));\n assert(field_less_than(0x100, 0 - 1));\n assert(!field_less_than(0 - 1, 0));\n }\n}\n"
|
|
3829
|
+
"source": "pub mod bn254;\nuse crate::{runtime::is_unconstrained, static_assert};\nuse bn254::lt as bn254_lt;\n\nimpl Field {\n /// Asserts that `self` can be represented in `bit_size` bits.\n ///\n /// # Failures\n /// Causes a constraint failure for `Field` values exceeding `2^{bit_size}`.\n // docs:start:assert_max_bit_size\n pub fn assert_max_bit_size<let BIT_SIZE: u32>(self) {\n // docs:end:assert_max_bit_size\n static_assert(\n BIT_SIZE < modulus_num_bits() as u32,\n \"BIT_SIZE must be less than modulus_num_bits\",\n );\n self.__assert_max_bit_size(BIT_SIZE);\n }\n\n #[builtin(apply_range_constraint)]\n fn __assert_max_bit_size(self, bit_size: u32) {}\n\n /// Decomposes `self` into its little endian bit decomposition as a `[u1; N]` array.\n /// This slice will be zero padded should not all bits be necessary to represent `self`.\n ///\n /// # Failures\n /// Causes a constraint failure for `Field` values exceeding `2^N` as the resulting slice will not\n /// be able to represent the original `Field`.\n ///\n /// # Safety\n /// Values of `N` equal to or greater than the number of bits necessary to represent the `Field` modulus\n /// (e.g. 254 for the BN254 field) allow for multiple bit decompositions. This is due to how the `Field` will\n /// wrap around due to overflow when verifying the decomposition.\n #[builtin(to_le_bits)]\n fn _to_le_bits<let N: u32>(self: Self) -> [u1; N] {}\n\n /// Decomposes `self` into its big endian bit decomposition as a `[u1; N]` array.\n /// This array will be zero padded should not all bits be necessary to represent `self`.\n ///\n /// # Failures\n /// Causes a constraint failure for `Field` values exceeding `2^N` as the resulting slice will not\n /// be able to represent the original `Field`.\n ///\n /// # Safety\n /// Values of `N` equal to or greater than the number of bits necessary to represent the `Field` modulus\n /// (e.g. 254 for the BN254 field) allow for multiple bit decompositions. This is due to how the `Field` will\n /// wrap around due to overflow when verifying the decomposition.\n #[builtin(to_be_bits)]\n fn _to_be_bits<let N: u32>(self: Self) -> [u1; N] {}\n\n /// Decomposes `self` into its little endian bit decomposition as a `[u1; N]` array.\n /// This slice will be zero padded should not all bits be necessary to represent `self`.\n ///\n /// # Failures\n /// Causes a constraint failure for `Field` values exceeding `2^N` as the resulting slice will not\n /// be able to represent the original `Field`.\n ///\n /// # Safety\n /// The bit decomposition returned is canonical and is guaranteed to not overflow the modulus.\n // docs:start:to_le_bits\n pub fn to_le_bits<let N: u32>(self: Self) -> [u1; N] {\n // docs:end:to_le_bits\n let bits = self._to_le_bits();\n\n if !is_unconstrained() {\n // Ensure that the byte decomposition does not overflow the modulus\n let p = modulus_le_bits();\n assert(bits.len() <= p.len());\n let mut ok = bits.len() != p.len();\n for i in 0..N {\n if !ok {\n if (bits[N - 1 - i] != p[N - 1 - i]) {\n assert(p[N - 1 - i] == 1);\n ok = true;\n }\n }\n }\n assert(ok);\n }\n bits\n }\n\n /// Decomposes `self` into its big endian bit decomposition as a `[u1; N]` array.\n /// This array will be zero padded should not all bits be necessary to represent `self`.\n ///\n /// # Failures\n /// Causes a constraint failure for `Field` values exceeding `2^N` as the resulting slice will not\n /// be able to represent the original `Field`.\n ///\n /// # Safety\n /// The bit decomposition returned is canonical and is guaranteed to not overflow the modulus.\n // docs:start:to_be_bits\n pub fn to_be_bits<let N: u32>(self: Self) -> [u1; N] {\n // docs:end:to_be_bits\n let bits = self._to_be_bits();\n\n if !is_unconstrained() {\n // Ensure that the decomposition does not overflow the modulus\n let p = modulus_be_bits();\n assert(bits.len() <= p.len());\n let mut ok = bits.len() != p.len();\n for i in 0..N {\n if !ok {\n if (bits[i] != p[i]) {\n assert(p[i] == 1);\n ok = true;\n }\n }\n }\n assert(ok);\n }\n bits\n }\n\n /// Decomposes `self` into its little endian byte decomposition as a `[u8;N]` array\n /// This array will be zero padded should not all bytes be necessary to represent `self`.\n ///\n /// # Failures\n /// The length N of the array must be big enough to contain all the bytes of the 'self',\n /// and no more than the number of bytes required to represent the field modulus\n ///\n /// # Safety\n /// The result is ensured to be the canonical decomposition of the field element\n // docs:start:to_le_bytes\n pub fn to_le_bytes<let N: u32>(self: Self) -> [u8; N] {\n // docs:end:to_le_bytes\n static_assert(\n N <= modulus_le_bytes().len(),\n \"N must be less than or equal to modulus_le_bytes().len()\",\n );\n // Compute the byte decomposition\n let bytes = self.to_le_radix(256);\n\n if !is_unconstrained() {\n // Ensure that the byte decomposition does not overflow the modulus\n let p = modulus_le_bytes();\n assert(bytes.len() <= p.len());\n let mut ok = bytes.len() != p.len();\n for i in 0..N {\n if !ok {\n if (bytes[N - 1 - i] != p[N - 1 - i]) {\n assert(bytes[N - 1 - i] < p[N - 1 - i]);\n ok = true;\n }\n }\n }\n assert(ok);\n }\n bytes\n }\n\n /// Decomposes `self` into its big endian byte decomposition as a `[u8;N]` array of length required to represent the field modulus\n /// This array will be zero padded should not all bytes be necessary to represent `self`.\n ///\n /// # Failures\n /// The length N of the array must be big enough to contain all the bytes of the 'self',\n /// and no more than the number of bytes required to represent the field modulus\n ///\n /// # Safety\n /// The result is ensured to be the canonical decomposition of the field element\n // docs:start:to_be_bytes\n pub fn to_be_bytes<let N: u32>(self: Self) -> [u8; N] {\n // docs:end:to_be_bytes\n static_assert(\n N <= modulus_le_bytes().len(),\n \"N must be less than or equal to modulus_le_bytes().len()\",\n );\n // Compute the byte decomposition\n let bytes = self.to_be_radix(256);\n\n if !is_unconstrained() {\n // Ensure that the byte decomposition does not overflow the modulus\n let p = modulus_be_bytes();\n assert(bytes.len() <= p.len());\n let mut ok = bytes.len() != p.len();\n for i in 0..N {\n if !ok {\n if (bytes[i] != p[i]) {\n assert(bytes[i] < p[i]);\n ok = true;\n }\n }\n }\n assert(ok);\n }\n bytes\n }\n\n // docs:start:to_le_radix\n pub fn to_le_radix<let N: u32>(self: Self, radix: u32) -> [u8; N] {\n // Brillig does not need an immediate radix\n if !crate::runtime::is_unconstrained() {\n static_assert(1 < radix, \"radix must be greater than 1\");\n static_assert(radix <= 256, \"radix must be less than or equal to 256\");\n static_assert(radix & (radix - 1) == 0, \"radix must be a power of 2\");\n }\n self.__to_le_radix(radix)\n }\n // docs:end:to_le_radix\n\n // docs:start:to_be_radix\n pub fn to_be_radix<let N: u32>(self: Self, radix: u32) -> [u8; N] {\n // Brillig does not need an immediate radix\n if !crate::runtime::is_unconstrained() {\n crate::assert_constant(radix);\n }\n self.__to_be_radix(radix)\n }\n // docs:end:to_be_radix\n\n // `_radix` must be less than 256\n #[builtin(to_le_radix)]\n fn __to_le_radix<let N: u32>(self, radix: u32) -> [u8; N] {}\n\n // `_radix` must be less than 256\n #[builtin(to_be_radix)]\n fn __to_be_radix<let N: u32>(self, radix: u32) -> [u8; N] {}\n\n // Returns self to the power of the given exponent value.\n // Caution: we assume the exponent fits into 32 bits\n // using a bigger bit size impacts negatively the performance and should be done only if the exponent does not fit in 32 bits\n pub fn pow_32(self, exponent: Field) -> Field {\n let mut r: Field = 1;\n let b: [u1; 32] = exponent.to_le_bits();\n\n for i in 1..33 {\n r *= r;\n r = (b[32 - i] as Field) * (r * self) + (1 - b[32 - i] as Field) * r;\n }\n r\n }\n\n // Parity of (prime) Field element, i.e. sgn0(x mod p) = 0 if x `elem` {0, ..., p-1} is even, otherwise sgn0(x mod p) = 1.\n pub fn sgn0(self) -> u1 {\n self as u1\n }\n\n pub fn lt(self, another: Field) -> bool {\n if crate::compat::is_bn254() {\n bn254_lt(self, another)\n } else {\n lt_fallback(self, another)\n }\n }\n\n /// Convert a little endian byte array to a field element.\n /// If the provided byte array overflows the field modulus then the Field will silently wrap around.\n pub fn from_le_bytes<let N: u32>(bytes: [u8; N]) -> Field {\n static_assert(\n N <= modulus_le_bytes().len(),\n \"N must be less than or equal to modulus_le_bytes().len()\",\n );\n let mut v = 1;\n let mut result = 0;\n\n for i in 0..N {\n result += (bytes[i] as Field) * v;\n v = v * 256;\n }\n result\n }\n\n /// Convert a big endian byte array to a field element.\n /// If the provided byte array overflows the field modulus then the Field will silently wrap around.\n pub fn from_be_bytes<let N: u32>(bytes: [u8; N]) -> Field {\n let mut v = 1;\n let mut result = 0;\n\n for i in 0..N {\n result += (bytes[N - 1 - i] as Field) * v;\n v = v * 256;\n }\n result\n }\n}\n\n#[builtin(modulus_num_bits)]\npub comptime fn modulus_num_bits() -> u64 {}\n\n#[builtin(modulus_be_bits)]\npub comptime fn modulus_be_bits() -> [u1] {}\n\n#[builtin(modulus_le_bits)]\npub comptime fn modulus_le_bits() -> [u1] {}\n\n#[builtin(modulus_be_bytes)]\npub comptime fn modulus_be_bytes() -> [u8] {}\n\n#[builtin(modulus_le_bytes)]\npub comptime fn modulus_le_bytes() -> [u8] {}\n\n/// An unconstrained only built in to efficiently compare fields.\n#[builtin(field_less_than)]\nunconstrained fn __field_less_than(x: Field, y: Field) -> bool {}\n\npub(crate) unconstrained fn field_less_than(x: Field, y: Field) -> bool {\n __field_less_than(x, y)\n}\n\n// Convert a 32 byte array to a field element by modding\npub fn bytes32_to_field(bytes32: [u8; 32]) -> Field {\n // Convert it to a field element\n let mut v = 1;\n let mut high = 0 as Field;\n let mut low = 0 as Field;\n\n for i in 0..16 {\n high = high + (bytes32[15 - i] as Field) * v;\n low = low + (bytes32[16 + 15 - i] as Field) * v;\n v = v * 256;\n }\n // Abuse that a % p + b % p = (a + b) % p and that low < p\n low + high * v\n}\n\nfn lt_fallback(x: Field, y: Field) -> bool {\n if is_unconstrained() {\n /// Safety: unconstrained context\n unsafe {\n field_less_than(x, y)\n }\n } else {\n let x_bytes: [u8; 32] = x.to_le_bytes();\n let y_bytes: [u8; 32] = y.to_le_bytes();\n let mut x_is_lt = false;\n let mut done = false;\n for i in 0..32 {\n if (!done) {\n let x_byte = x_bytes[32 - 1 - i] as u8;\n let y_byte = y_bytes[32 - 1 - i] as u8;\n let bytes_match = x_byte == y_byte;\n if !bytes_match {\n x_is_lt = x_byte < y_byte;\n done = true;\n }\n }\n }\n x_is_lt\n }\n}\n\nmod tests {\n use crate::{panic::panic, runtime};\n use super::field_less_than;\n\n #[test]\n // docs:start:to_be_bits_example\n fn test_to_be_bits() {\n let field = 2;\n let bits: [u1; 8] = field.to_be_bits();\n assert_eq(bits, [0, 0, 0, 0, 0, 0, 1, 0]);\n }\n // docs:end:to_be_bits_example\n\n #[test]\n // docs:start:to_le_bits_example\n fn test_to_le_bits() {\n let field = 2;\n let bits: [u1; 8] = field.to_le_bits();\n assert_eq(bits, [0, 1, 0, 0, 0, 0, 0, 0]);\n }\n // docs:end:to_le_bits_example\n\n #[test]\n // docs:start:to_be_bytes_example\n fn test_to_be_bytes() {\n let field = 2;\n let bytes: [u8; 8] = field.to_be_bytes();\n assert_eq(bytes, [0, 0, 0, 0, 0, 0, 0, 2]);\n assert_eq(Field::from_be_bytes::<8>(bytes), field);\n }\n // docs:end:to_be_bytes_example\n\n #[test]\n // docs:start:to_le_bytes_example\n fn test_to_le_bytes() {\n let field = 2;\n let bytes: [u8; 8] = field.to_le_bytes();\n assert_eq(bytes, [2, 0, 0, 0, 0, 0, 0, 0]);\n assert_eq(Field::from_le_bytes::<8>(bytes), field);\n }\n // docs:end:to_le_bytes_example\n\n #[test]\n // docs:start:to_be_radix_example\n fn test_to_be_radix() {\n // 259, in base 256, big endian, is [1, 3].\n // i.e. 3 * 256^0 + 1 * 256^1\n let field = 259;\n\n // The radix (in this example, 256) must be a power of 2.\n // The length of the returned byte array can be specified to be\n // >= the amount of space needed.\n let bytes: [u8; 8] = field.to_be_radix(256);\n assert_eq(bytes, [0, 0, 0, 0, 0, 0, 1, 3]);\n assert_eq(Field::from_be_bytes::<8>(bytes), field);\n }\n // docs:end:to_be_radix_example\n\n #[test]\n // docs:start:to_le_radix_example\n fn test_to_le_radix() {\n // 259, in base 256, little endian, is [3, 1].\n // i.e. 3 * 256^0 + 1 * 256^1\n let field = 259;\n\n // The radix (in this example, 256) must be a power of 2.\n // The length of the returned byte array can be specified to be\n // >= the amount of space needed.\n let bytes: [u8; 8] = field.to_le_radix(256);\n assert_eq(bytes, [3, 1, 0, 0, 0, 0, 0, 0]);\n assert_eq(Field::from_le_bytes::<8>(bytes), field);\n }\n // docs:end:to_le_radix_example\n\n #[test(should_fail_with = \"radix must be greater than 1\")]\n fn test_to_le_radix_1() {\n // this test should only fail in constrained mode\n if !runtime::is_unconstrained() {\n let field = 2;\n let _: [u8; 8] = field.to_le_radix(1);\n } else {\n panic(f\"radix must be greater than 1\");\n }\n }\n\n // TODO: Update this test to account for the Brillig restriction that the radix must be greater than 2\n //#[test]\n //fn test_to_le_radix_brillig_1() {\n // // this test should only fail in constrained mode\n // if runtime::is_unconstrained() {\n // let field = 1;\n // let out: [u8; 8] = field.to_le_radix(1);\n // crate::println(out);\n // let expected = [0; 8];\n // assert(out == expected, \"unexpected result\");\n // }\n //}\n\n #[test(should_fail_with = \"radix must be a power of 2\")]\n fn test_to_le_radix_3() {\n // this test should only fail in constrained mode\n if !runtime::is_unconstrained() {\n let field = 2;\n let _: [u8; 8] = field.to_le_radix(3);\n } else {\n panic(f\"radix must be a power of 2\");\n }\n }\n\n #[test]\n fn test_to_le_radix_brillig_3() {\n // this test should only fail in constrained mode\n if runtime::is_unconstrained() {\n let field = 1;\n let out: [u8; 8] = field.to_le_radix(3);\n let mut expected = [0; 8];\n expected[0] = 1;\n assert(out == expected, \"unexpected result\");\n }\n }\n\n #[test(should_fail_with = \"radix must be less than or equal to 256\")]\n fn test_to_le_radix_512() {\n // this test should only fail in constrained mode\n if !runtime::is_unconstrained() {\n let field = 2;\n let _: [u8; 8] = field.to_le_radix(512);\n } else {\n panic(f\"radix must be less than or equal to 256\")\n }\n }\n\n // TODO: Update this test to account for the Brillig restriction that the radix must be less than 512\n //#[test]\n //fn test_to_le_radix_brillig_512() {\n // // this test should only fail in constrained mode\n // if runtime::is_unconstrained() {\n // let field = 1;\n // let out: [u8; 8] = field.to_le_radix(512);\n // let mut expected = [0; 8];\n // expected[0] = 1;\n // assert(out == expected, \"unexpected result\");\n // }\n //}\n\n #[test]\n unconstrained fn test_field_less_than() {\n assert(field_less_than(0, 1));\n assert(field_less_than(0, 0x100));\n assert(field_less_than(0x100, 0 - 1));\n assert(!field_less_than(0 - 1, 0));\n }\n}\n"
|
|
3830
3830
|
},
|
|
3831
|
-
"
|
|
3831
|
+
"260": {
|
|
3832
3832
|
"path": "/build-volume/noir-projects/noir-protocol-circuits/crates/types/src/hash.nr",
|
|
3833
3833
|
"source": "use crate::{\n abis::{\n contract_class_function_leaf_preimage::ContractClassFunctionLeafPreimage,\n function_selector::FunctionSelector,\n log_hash::{LogHash, ScopedLogHash},\n note_hash::ScopedNoteHash,\n nullifier::ScopedNullifier,\n private_log::{PrivateLog, PrivateLogData},\n side_effect::{OrderedValue, scoped::Scoped},\n },\n address::{AztecAddress, EthAddress},\n constants::{\n FUNCTION_TREE_HEIGHT, GENERATOR_INDEX__NOTE_HASH_NONCE, GENERATOR_INDEX__OUTER_NULLIFIER,\n GENERATOR_INDEX__SILOED_NOTE_HASH, GENERATOR_INDEX__UNIQUE_NOTE_HASH,\n },\n merkle_tree::root::root_from_sibling_path,\n messaging::l2_to_l1_message::{L2ToL1Message, ScopedL2ToL1Message},\n poseidon2::Poseidon2Sponge,\n traits::{FromField, Hash, is_empty, ToField},\n utils::field::field_from_bytes_32_trunc,\n};\nuse super::{constants::TWO_POW_64, utils::{arrays::array_concat, field::field_from_bytes}};\n\npub fn sha256_to_field<let N: u32>(bytes_to_hash: [u8; N]) -> Field {\n let sha256_hashed = sha256::digest(bytes_to_hash);\n let hash_in_a_field = field_from_bytes_32_trunc(sha256_hashed);\n\n hash_in_a_field\n}\n\npub fn private_functions_root_from_siblings(\n selector: FunctionSelector,\n vk_hash: Field,\n function_leaf_index: Field,\n function_leaf_sibling_path: [Field; FUNCTION_TREE_HEIGHT],\n) -> Field {\n let function_leaf_preimage = ContractClassFunctionLeafPreimage { selector, vk_hash };\n let function_leaf = function_leaf_preimage.hash();\n root_from_sibling_path(\n function_leaf,\n function_leaf_index,\n function_leaf_sibling_path,\n )\n}\n\npub fn compute_note_hash_nonce(first_nullifier_in_tx: Field, note_index_in_tx: u32) -> Field {\n // Hashing the first nullifier with note index in tx is guaranteed to be unique (because all nullifiers are also\n // unique).\n poseidon2_hash_with_separator(\n [first_nullifier_in_tx, note_index_in_tx as Field],\n GENERATOR_INDEX__NOTE_HASH_NONCE,\n )\n}\n\npub fn compute_unique_note_hash(nonce: Field, siloed_note_hash: Field) -> Field {\n let inputs = [nonce, siloed_note_hash];\n poseidon2_hash_with_separator(inputs, GENERATOR_INDEX__UNIQUE_NOTE_HASH)\n}\n\npub fn compute_siloed_note_hash(app: AztecAddress, note_hash: Field) -> Field {\n poseidon2_hash_with_separator(\n [app.to_field(), note_hash],\n GENERATOR_INDEX__SILOED_NOTE_HASH,\n )\n}\n\n/// Computes unique note hashes from siloed note hashes\npub fn compute_unique_siloed_note_hash(\n siloed_note_hash: Field,\n first_nullifier: Field,\n note_index_in_tx: u32,\n) -> Field {\n if siloed_note_hash == 0 {\n 0\n } else {\n let nonce = compute_note_hash_nonce(first_nullifier, note_index_in_tx);\n compute_unique_note_hash(nonce, siloed_note_hash)\n }\n}\n\n/// Siloing in the context of Aztec refers to the process of hashing a note hash with a contract address (this way\n/// the note hash is scoped to a specific contract). This is used to prevent intermingling of notes between contracts.\npub fn silo_note_hash(note_hash: ScopedNoteHash) -> Field {\n if note_hash.contract_address.is_zero() {\n 0\n } else {\n compute_siloed_note_hash(note_hash.contract_address, note_hash.value())\n }\n}\n\npub fn compute_siloed_nullifier(app: AztecAddress, nullifier: Field) -> Field {\n poseidon2_hash_with_separator(\n [app.to_field(), nullifier],\n GENERATOR_INDEX__OUTER_NULLIFIER,\n )\n}\n\npub fn silo_nullifier(nullifier: ScopedNullifier) -> Field {\n if nullifier.contract_address.is_zero() {\n nullifier.value() // Return value instead of 0 because the first nullifier's contract address is zero.\n } else {\n compute_siloed_nullifier(nullifier.contract_address, nullifier.value())\n }\n}\n\npub fn compute_siloed_private_log_field(contract_address: AztecAddress, field: Field) -> Field {\n poseidon2_hash([contract_address.to_field(), field])\n}\n\npub fn silo_private_log(private_log: Scoped<PrivateLogData>) -> PrivateLog {\n if private_log.contract_address.is_zero() {\n private_log.inner.log\n } else {\n let mut fields = private_log.inner.log.fields;\n fields[0] = compute_siloed_private_log_field(private_log.contract_address, fields[0]);\n PrivateLog { fields }\n }\n}\n\nfn compute_siloed_contract_class_log_hash(address: AztecAddress, log_hash: Field) -> Field {\n accumulate_sha256([address.to_field(), log_hash])\n}\n\npub fn silo_contract_class_log_hash(log_hash: ScopedLogHash) -> Field {\n if log_hash.contract_address.is_zero() {\n 0\n } else {\n compute_siloed_contract_class_log_hash(log_hash.contract_address, log_hash.value())\n }\n}\n\npub fn merkle_hash(left: Field, right: Field) -> Field {\n poseidon2_hash([left, right])\n}\n\npub fn compute_l2_to_l1_hash(\n contract_address: AztecAddress,\n recipient: EthAddress,\n content: Field,\n rollup_version_id: Field,\n chain_id: Field,\n) -> Field {\n let mut bytes: [u8; 160] = std::mem::zeroed();\n\n let inputs =\n [contract_address.to_field(), rollup_version_id, recipient.to_field(), chain_id, content];\n for i in 0..5 {\n // TODO are bytes be in fr.to_buffer() ?\n let item_bytes: [u8; 32] = inputs[i].to_be_bytes();\n for j in 0..32 {\n bytes[32 * i + j] = item_bytes[j];\n }\n }\n\n sha256_to_field(bytes)\n}\n\npub fn silo_l2_to_l1_message(\n msg: ScopedL2ToL1Message,\n rollup_version_id: Field,\n chain_id: Field,\n) -> Field {\n if msg.contract_address.is_zero() {\n 0\n } else {\n compute_l2_to_l1_hash(\n msg.contract_address,\n msg.message.recipient,\n msg.message.content,\n rollup_version_id,\n chain_id,\n )\n }\n}\n\n// Computes sha256 hash of 2 input hashes.\n//\n// NB: This method now takes in two 31 byte fields - it assumes that any input\n// is the result of a sha_to_field hash and => is truncated\n//\n// TODO(Jan and David): This is used for the encrypted_log hashes.\n// Can we check to see if we can just use hash_to_field or pedersen_compress here?\n//\npub fn accumulate_sha256(input: [Field; 2]) -> Field {\n // This is a note about the cpp code, since it takes an array of Fields\n // instead of a U128.\n // 4 Field elements when converted to bytes will usually\n // occupy 4 * 32 = 128 bytes.\n // However, this function is making the assumption that each Field\n // only occupies 128 bits.\n //\n // TODO(David): This does not seem to be getting guaranteed anywhere in the code?\n // Concatentate two fields into 32x2 = 64 bytes\n // accumulate_sha256 assumes that the inputs are pre-truncated 31 byte numbers\n let mut hash_input_flattened = [0; 64];\n for offset in 0..input.len() {\n let input_as_bytes: [u8; 32] = input[offset].to_be_bytes();\n for byte_index in 0..32 {\n hash_input_flattened[offset * 32 + byte_index] = input_as_bytes[byte_index];\n }\n }\n\n sha256_to_field(hash_input_flattened)\n}\n\n// Computes the final logs hash for a tx.\npub fn compute_tx_logs_hash<let N: u32>(logs: [LogHash; N]) -> Field {\n // Convert each field element into a byte array and append the bytes to `hash_input_flattened`\n let mut hash_input_flattened = [0; N * 32];\n for offset in 0..N {\n // TODO: This is not checking that the decomposition is smaller than P\n let input_as_bytes: [u8; 32] = logs[offset].value.to_be_radix(256);\n for byte_index in 0..32 {\n hash_input_flattened[offset * 32 + byte_index] = input_as_bytes[byte_index];\n }\n }\n // Ideally we would push to a slice then hash, but there is no sha_slice\n // Hardcode to 256 bytes for now\n let mut hash = sha256_to_field(hash_input_flattened);\n // Not having a 0 value hash for empty logs causes issues with empty txs\n // used for padding. Returning early is currently unsupported.\n // We always provide sorted logs here, so 0 being empty means all are empty.\n if is_empty(logs[0]) {\n hash = 0;\n }\n hash\n}\n\npub fn verification_key_hash<let N: u32>(key: [Field; N]) -> Field {\n crate::hash::poseidon2_hash(key)\n}\n\n#[inline_always]\npub fn pedersen_hash<let N: u32>(inputs: [Field; N], hash_index: u32) -> Field {\n std::hash::pedersen_hash_with_separator(inputs, hash_index)\n}\n\npub fn poseidon2_hash<let N: u32>(inputs: [Field; N]) -> Field {\n std::hash::poseidon2::Poseidon2::hash(inputs, N)\n}\n\n#[no_predicates]\npub fn poseidon2_hash_with_separator<let N: u32, T>(inputs: [Field; N], separator: T) -> Field\nwhere\n T: ToField,\n{\n let inputs_with_separator = array_concat([separator.to_field()], inputs);\n poseidon2_hash(inputs_with_separator)\n}\n\n// Performs a fixed length hash with a subarray of the given input.\n// Useful for SpongeBlob in which we aborb M things and want to check it vs a hash of M elts of an N-len array.\n// Using stdlib poseidon, this will always absorb an extra 1 as a 'variable' hash, and not match spongeblob.squeeze()\n// or any ts implementation. Also checks that any remaining elts not hashed are empty.\n#[no_predicates]\npub fn poseidon2_hash_subarray<let N: u32>(input: [Field; N], in_len: u32) -> Field {\n let mut sponge = poseidon2_absorb_chunks(input, in_len, false);\n sponge.squeeze()\n}\n\n// NB the below is the same as std::hash::poseidon2::Poseidon2::hash(), but replacing a range check with a bit check,\n// and absorbing in chunks of 3 below.\n#[no_predicates]\npub fn poseidon2_cheaper_variable_hash<let N: u32>(input: [Field; N], in_len: u32) -> Field {\n let mut sponge = poseidon2_absorb_chunks(input, in_len, true);\n // In the case where the hash preimage is variable-length, we append `1` to the end of the input, to distinguish\n // from fixed-length hashes. (the combination of this additional field element + the hash IV ensures\n // fixed-length and variable-length hashes do not collide)\n if in_len != N {\n sponge.absorb(1);\n }\n sponge.squeeze()\n}\n\n// The below fn reduces gates of a conditional poseidon2 hash by approx 3x (thank you ~* Giant Brain Dev @IlyasRidhuan *~ for the idea)\n// Why? Because when we call stdlib poseidon, we call absorb for each item. When absorbing is conditional, it seems the compiler does not know\n// what cache_size will be when calling absorb, so it assigns the permutation gates for /each i/ rather than /every 3rd i/, which is actually required.\n// The below code forces the compiler to:\n// - absorb normally up to 2 times to set cache_size to 1\n// - absorb in chunks of 3 to ensure perm. only happens every 3rd absorb\n// - absorb normally up to 2 times to add any remaining values to the hash\n// In fixed len hashes, the compiler is able to tell that it will only need to perform the permutation every 3 absorbs.\n// NB: it also replaces unnecessary range checks (i < thing) with a bit check (&= i != thing), which alone reduces the gates of a var. hash by half.\n\n#[no_predicates]\nfn poseidon2_absorb_chunks<let N: u32>(\n input: [Field; N],\n in_len: u32,\n variable: bool,\n) -> Poseidon2Sponge {\n let iv: Field = (in_len as Field) * TWO_POW_64;\n let mut sponge = Poseidon2Sponge::new(iv);\n // Even though shift is always 1 here, if we input in_len = 0 we get an underflow\n // since we cannot isolate computation branches. The below is just to avoid that.\n let shift = if in_len == 0 { 0 } else { 1 };\n if in_len != 0 {\n // cache_size = 0, init absorb\n sponge.cache[0] = input[0];\n sponge.cache_size = 1;\n // shift = num elts already added to make cache_size 1 = 1 for a fresh sponge\n // M = max_chunks = (N - 1 - (N - 1) % 3) / 3: (must be written as a fn of N to compile)\n // max_remainder = (N - 1) % 3;\n // max_chunks = (N - 1 - max_remainder) / 3;\n sponge = poseidon2_absorb_chunks_loop::<N, (N - 1 - (N - 1) % 3) / 3>(\n sponge,\n input,\n in_len,\n variable,\n shift,\n );\n }\n sponge\n}\n\n// NB: If it's not required to check that the non-absorbed elts of 'input' are 0s, set skip_0_check=true\n#[no_predicates]\npub fn poseidon2_absorb_chunks_existing_sponge<let N: u32>(\n in_sponge: Poseidon2Sponge,\n input: [Field; N],\n in_len: u32,\n skip_0_check: bool,\n) -> Poseidon2Sponge {\n let mut sponge = in_sponge;\n // 'shift' is to account for already added inputs\n let mut shift = 0;\n // 'stop' is to avoid an underflow when inputting in_len = 0\n let mut stop = false;\n for i in 0..3 {\n if shift == in_len {\n stop = true;\n }\n if (sponge.cache_size != 1) & (!stop) {\n sponge.absorb(input[i]);\n shift += 1;\n }\n }\n sponge = if stop {\n sponge\n } else {\n // max_chunks = (N - (N % 3)) / 3;\n poseidon2_absorb_chunks_loop::<N, (N - (N % 3)) / 3>(\n sponge,\n input,\n in_len,\n skip_0_check,\n shift,\n )\n };\n sponge\n}\n\n// The below is the loop to absorb elts into a poseidon sponge in chunks of 3\n// shift - the num of elts already absorbed to ensure the sponge's cache_size = 1\n// M - the max number of chunks required to absorb N things (must be comptime to compile)\n// NB: The 0 checks ('Found non-zero field...') are messy, but having a separate loop over N to check\n// for 0s costs 3N gates. Current approach is approx 2N gates.\n#[no_predicates]\nfn poseidon2_absorb_chunks_loop<let N: u32, let M: u32>(\n in_sponge: Poseidon2Sponge,\n input: [Field; N],\n in_len: u32,\n variable: bool,\n shift: u32,\n) -> Poseidon2Sponge {\n assert(in_len <= N, \"Given in_len to absorb is larger than the input array len\");\n // When we have an existing sponge, we may have a shift of 0, and the final 'k+2' below = N\n // The below avoids an overflow\n let skip_last = 3 * M == N;\n // Writing in_sponge: &mut does not compile\n let mut sponge = in_sponge;\n let mut should_add = true;\n // The num of things left over after absorbing in 3s\n let remainder = (in_len - shift) % 3;\n // The num of chunks of 3 to absorb (maximum M)\n let chunks = (in_len - shift - remainder) / 3;\n for i in 0..M {\n // Now we loop through cache size = 1 -> 3\n should_add &= i != chunks;\n // This is the index at the start of the chunk (for readability)\n let k = 3 * i + shift;\n if should_add {\n // cache_size = 1, 2 => just assign\n sponge.cache[1] = input[k];\n sponge.cache[2] = input[k + 1];\n // cache_size = 3 => duplex + perm\n for j in 0..3 {\n sponge.state[j] += sponge.cache[j];\n }\n sponge.state = std::hash::poseidon2_permutation(sponge.state, 4);\n sponge.cache[0] = input[k + 2];\n // cache_size is now 1 again, repeat loop\n } else if (!variable) & (i != chunks) {\n // if we are hashing a fixed len array which is a subarray, we check the remaining elts are 0\n // NB: we don't check at i == chunks, because that chunk contains elts to be absorbed or checked below\n let last_0 = if (i == M - 1) & (skip_last) {\n 0\n } else {\n input[k + 2]\n };\n let all_0 = (input[k] == 0) & (input[k + 1] == 0) & (last_0 == 0);\n assert(all_0, \"Found non-zero field after breakpoint\");\n }\n }\n // we have 'remainder' num of items left to absorb\n should_add = true;\n // below is to avoid overflows (i.e. if inlen is close to N)\n let mut should_check = !variable;\n for i in 0..3 {\n should_add &= i != remainder;\n should_check &= in_len - remainder + i != N;\n if should_add {\n // we want to absorb the final 'remainder' items\n sponge.absorb(input[in_len - remainder + i]);\n } else if should_check {\n assert(input[in_len - remainder + i] == 0, \"Found non-zero field after breakpoint\");\n }\n }\n sponge\n}\n\npub fn poseidon2_hash_with_separator_slice<T>(inputs: [Field], separator: T) -> Field\nwhere\n T: ToField,\n{\n let in_len = inputs.len() + 1;\n let iv: Field = (in_len as Field) * TWO_POW_64;\n let mut sponge = Poseidon2Sponge::new(iv);\n sponge.absorb(separator.to_field());\n\n for i in 0..inputs.len() {\n sponge.absorb(inputs[i]);\n }\n\n sponge.squeeze()\n}\n\n#[no_predicates]\npub fn poseidon2_hash_bytes<let N: u32>(inputs: [u8; N]) -> Field {\n let mut fields = [0; (N + 30) / 31];\n let mut field_index = 0;\n let mut current_field = [0; 31];\n for i in 0..inputs.len() {\n let index = i % 31;\n current_field[index] = inputs[i];\n if index == 30 {\n fields[field_index] = field_from_bytes(current_field, false);\n current_field = [0; 31];\n field_index += 1;\n }\n }\n if field_index != fields.len() {\n fields[field_index] = field_from_bytes(current_field, false);\n }\n poseidon2_hash(fields)\n}\n\n#[test]\nfn poseidon_chunks_matches_fixed() {\n let in_len = 501;\n let mut input: [Field; 4096] = [0; 4096];\n let mut fixed_input = [3; 501];\n assert(in_len == fixed_input.len()); // sanity check\n for i in 0..in_len {\n input[i] = 3;\n }\n let sub_chunk_hash = poseidon2_hash_subarray(input, in_len);\n let fixed_len_hash = std::hash::poseidon2::Poseidon2::hash(fixed_input, fixed_input.len());\n assert(sub_chunk_hash == fixed_len_hash);\n}\n\n#[test]\nfn poseidon_chunks_matches_variable() {\n let in_len = 501;\n let mut input: [Field; 4096] = [0; 4096];\n for i in 0..in_len {\n input[i] = 3;\n }\n let variable_chunk_hash = poseidon2_cheaper_variable_hash(input, in_len);\n let variable_len_hash = std::hash::poseidon2::Poseidon2::hash(input, in_len);\n assert(variable_chunk_hash == variable_len_hash);\n}\n\n#[test]\nfn existing_sponge_poseidon_chunks_matches_fixed() {\n let in_len = 501;\n let mut input: [Field; 4096] = [0; 4096];\n let mut fixed_input = [3; 501];\n assert(in_len == fixed_input.len()); // sanity check\n for i in 0..in_len {\n input[i] = 3;\n }\n // absorb 250 of the 501 things\n let empty_sponge = Poseidon2Sponge::new((in_len as Field) * TWO_POW_64);\n let first_sponge = poseidon2_absorb_chunks_existing_sponge(empty_sponge, input, 250, true);\n // now absorb the final 251 (since they are all 3s, im being lazy and not making a new array)\n let mut final_sponge = poseidon2_absorb_chunks_existing_sponge(first_sponge, input, 251, true);\n let fixed_len_hash = Poseidon2Sponge::hash(fixed_input, fixed_input.len());\n assert(final_sponge.squeeze() == fixed_len_hash);\n}\n\n#[test]\nfn poseidon_chunks_empty_inputs() {\n let in_len = 0;\n let mut input: [Field; 4096] = [0; 4096];\n let mut constructed_empty_sponge = poseidon2_absorb_chunks(input, in_len, true);\n let mut first_sponge =\n poseidon2_absorb_chunks_existing_sponge(constructed_empty_sponge, input, in_len, true);\n assert(first_sponge.squeeze() == constructed_empty_sponge.squeeze());\n}\n\n#[test]\nfn smoke_sha256_to_field() {\n let full_buffer = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,\n 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,\n 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,\n 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,\n 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,\n 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,\n 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,\n 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,\n ];\n let result = sha256_to_field(full_buffer);\n\n assert(result == 0x448ebbc9e1a31220a2f3830c18eef61b9bd070e5084b7fa2a359fe729184c7);\n\n // to show correctness of the current ver (truncate one byte) vs old ver (mod full bytes):\n let result_bytes = sha256::digest(full_buffer);\n let truncated_field = crate::utils::field::field_from_bytes_32_trunc(result_bytes);\n assert(truncated_field == result);\n let mod_res = result + (result_bytes[31] as Field);\n assert(mod_res == 0x448ebbc9e1a31220a2f3830c18eef61b9bd070e5084b7fa2a359fe729184e0);\n}\n\n#[test]\nfn compute_l2_l1_hash() {\n // All zeroes\n let hash_result =\n compute_l2_to_l1_hash(AztecAddress::from_field(0), EthAddress::zero(), 0, 0, 0);\n assert(hash_result == 0xb393978842a0fa3d3e1470196f098f473f9678e72463cb65ec4ab5581856c2);\n\n // Non-zero case\n let hash_result = compute_l2_to_l1_hash(\n AztecAddress::from_field(1),\n EthAddress::from_field(3),\n 5,\n 2,\n 4,\n );\n assert(hash_result == 0x3f88c1044a05e5340ed20466276500f6d45ca5603913b9091e957161734e16);\n}\n\n#[test]\nfn silo_l2_to_l1_message_matches_typescript() {\n let version = 4;\n let chainId = 5;\n\n let hash = silo_l2_to_l1_message(\n ScopedL2ToL1Message {\n message: L2ToL1Message { recipient: EthAddress::from_field(1), content: 2, counter: 0 },\n contract_address: AztecAddress::from_field(3),\n },\n version,\n chainId,\n );\n\n // The following value was generated by `l2_to_l1_message.test.ts`\n let hash_from_typescript = 0x00c6155d69febb9d5039b374dd4f77bf57b7c881709aa524a18acaa0bd57476a;\n\n assert_eq(hash, hash_from_typescript);\n}\n"
|
|
3834
3834
|
},
|
|
3835
|
-
"
|
|
3835
|
+
"277": {
|
|
3836
3836
|
"path": "/build-volume/noir-projects/noir-protocol-circuits/crates/types/src/poseidon2.nr",
|
|
3837
3837
|
"source": "use crate::constants::TWO_POW_64;\n\n// NB: This is a clone of noir/noir-repo/noir_stdlib/src/hash/poseidon2.nr\n// It exists as we sometimes need to perform custom absorption, but the stdlib version\n// has a private absorb() method (it's also designed to just be a hasher)\n// Can be removed when standalone noir poseidon lib exists: See noir#6679\n\ncomptime global RATE: u32 = 3;\n\npub struct Poseidon2Sponge {\n pub cache: [Field; 3],\n pub state: [Field; 4],\n pub cache_size: u32,\n pub squeeze_mode: bool, // 0 => absorb, 1 => squeeze\n}\n\nimpl Poseidon2Sponge {\n #[no_predicates]\n pub fn hash<let N: u32>(input: [Field; N], message_size: u32) -> Field {\n Poseidon2Sponge::hash_internal(input, message_size, message_size != N)\n }\n\n pub(crate) fn new(iv: Field) -> Poseidon2Sponge {\n let mut result =\n Poseidon2Sponge { cache: [0; 3], state: [0; 4], cache_size: 0, squeeze_mode: false };\n result.state[RATE] = iv;\n result\n }\n\n fn perform_duplex(&mut self) {\n // add the cache into sponge state\n for i in 0..RATE {\n // We effectively zero-pad the cache by only adding to the state\n // cache that is less than the specified `cache_size`\n if i < self.cache_size {\n self.state[i] += self.cache[i];\n }\n }\n self.state = std::hash::poseidon2_permutation(self.state, 4);\n }\n\n pub fn absorb(&mut self, input: Field) {\n assert(!self.squeeze_mode);\n if self.cache_size == RATE {\n // If we're absorbing, and the cache is full, apply the sponge permutation to compress the cache\n self.perform_duplex();\n self.cache[0] = input;\n self.cache_size = 1;\n } else {\n // If we're absorbing, and the cache is not full, add the input into the cache\n self.cache[self.cache_size] = input;\n self.cache_size += 1;\n }\n }\n\n pub fn squeeze(&mut self) -> Field {\n assert(!self.squeeze_mode);\n // If we're in absorb mode, apply sponge permutation to compress the cache.\n self.perform_duplex();\n self.squeeze_mode = true;\n\n // Pop one item off the top of the permutation and return it.\n self.state[0]\n }\n\n fn hash_internal<let N: u32>(\n input: [Field; N],\n in_len: u32,\n is_variable_length: bool,\n ) -> Field {\n let iv: Field = (in_len as Field) * TWO_POW_64;\n let mut sponge = Poseidon2Sponge::new(iv);\n for i in 0..input.len() {\n if i < in_len {\n sponge.absorb(input[i]);\n }\n }\n\n // In the case where the hash preimage is variable-length, we append `1` to the end of the input, to distinguish\n // from fixed-length hashes. (the combination of this additional field element + the hash IV ensures\n // fixed-length and variable-length hashes do not collide)\n if is_variable_length {\n sponge.absorb(1);\n }\n sponge.squeeze()\n }\n}\n"
|
|
3838
3838
|
},
|
|
3839
|
-
"
|
|
3839
|
+
"307": {
|
|
3840
3840
|
"path": "/build-volume/noir-projects/noir-protocol-circuits/crates/types/src/type_serialization.nr",
|
|
3841
3841
|
"source": "use crate::traits::{Deserialize, Serialize};\n\nglobal BOOL_SERIALIZED_LEN: u32 = 1;\nglobal U8_SERIALIZED_LEN: u32 = 1;\nglobal U16_SERIALIZED_LEN: u32 = 1;\nglobal U32_SERIALIZED_LEN: u32 = 1;\nglobal U64_SERIALIZED_LEN: u32 = 1;\nglobal U128_SERIALIZED_LEN: u32 = 2;\nglobal FIELD_SERIALIZED_LEN: u32 = 1;\nglobal I8_SERIALIZED_LEN: u32 = 1;\nglobal I16_SERIALIZED_LEN: u32 = 1;\nglobal I32_SERIALIZED_LEN: u32 = 1;\nglobal I64_SERIALIZED_LEN: u32 = 1;\n\nimpl Serialize<BOOL_SERIALIZED_LEN> for bool {\n fn serialize(self) -> [Field; BOOL_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<BOOL_SERIALIZED_LEN> for bool {\n fn deserialize(fields: [Field; BOOL_SERIALIZED_LEN]) -> bool {\n fields[0] as bool\n }\n}\n\nimpl Serialize<U8_SERIALIZED_LEN> for u8 {\n fn serialize(self) -> [Field; U8_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<U8_SERIALIZED_LEN> for u8 {\n fn deserialize(fields: [Field; U8_SERIALIZED_LEN]) -> Self {\n fields[0] as u8\n }\n}\n\nimpl Serialize<U16_SERIALIZED_LEN> for u16 {\n fn serialize(self) -> [Field; U16_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<U16_SERIALIZED_LEN> for u16 {\n fn deserialize(fields: [Field; U16_SERIALIZED_LEN]) -> Self {\n fields[0] as u16\n }\n}\n\nimpl Serialize<U32_SERIALIZED_LEN> for u32 {\n fn serialize(self) -> [Field; U32_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<U32_SERIALIZED_LEN> for u32 {\n fn deserialize(fields: [Field; U32_SERIALIZED_LEN]) -> Self {\n fields[0] as u32\n }\n}\n\nimpl Serialize<U64_SERIALIZED_LEN> for u64 {\n fn serialize(self) -> [Field; U64_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<U64_SERIALIZED_LEN> for u64 {\n fn deserialize(fields: [Field; U64_SERIALIZED_LEN]) -> Self {\n fields[0] as u64\n }\n}\n\nimpl Serialize<U128_SERIALIZED_LEN> for U128 {\n fn serialize(self) -> [Field; U128_SERIALIZED_LEN] {\n // We use little-endian ordering to match the order in which U128 defines its limbs.\n // This is necessary because of how Noir handles serialization:\n // - When calling a contract function from TypeScript, the serialization in encoder.ts gets used and then Noir\n // deserializes using its intrinsic serialization logic (based on the limb order in the struct).\n // - When calling a contract function from another function, the `serialize` method is invoked on the type\n // first.\n // For this reason if we didn't use the ordering of U128 limbs here and in encoder.ts we would get an arguments\n // hash mismatch.\n [self.lo, self.hi]\n }\n}\n\nimpl Deserialize<U128_SERIALIZED_LEN> for U128 {\n fn deserialize(fields: [Field; U128_SERIALIZED_LEN]) -> Self {\n U128::from_u64s_le(fields[0] as u64, fields[1] as u64)\n }\n}\n\nimpl Serialize<FIELD_SERIALIZED_LEN> for Field {\n fn serialize(self) -> [Field; FIELD_SERIALIZED_LEN] {\n [self]\n }\n}\n\nimpl Deserialize<FIELD_SERIALIZED_LEN> for Field {\n fn deserialize(fields: [Field; FIELD_SERIALIZED_LEN]) -> Self {\n fields[0]\n }\n}\n\nimpl Serialize<I8_SERIALIZED_LEN> for i8 {\n fn serialize(self) -> [Field; I8_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<I8_SERIALIZED_LEN> for i8 {\n fn deserialize(fields: [Field; I8_SERIALIZED_LEN]) -> Self {\n fields[0] as i8\n }\n}\n\nimpl Serialize<I16_SERIALIZED_LEN> for i16 {\n fn serialize(self) -> [Field; I16_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<I16_SERIALIZED_LEN> for i16 {\n fn deserialize(fields: [Field; I16_SERIALIZED_LEN]) -> Self {\n fields[0] as i16\n }\n}\n\nimpl Serialize<I32_SERIALIZED_LEN> for i32 {\n fn serialize(self) -> [Field; I32_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<I32_SERIALIZED_LEN> for i32 {\n fn deserialize(fields: [Field; I32_SERIALIZED_LEN]) -> Self {\n fields[0] as i32\n }\n}\n\nimpl Serialize<I64_SERIALIZED_LEN> for i64 {\n fn serialize(self) -> [Field; I64_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<I64_SERIALIZED_LEN> for i64 {\n fn deserialize(fields: [Field; I64_SERIALIZED_LEN]) -> Self {\n fields[0] as i64\n }\n}\n\nimpl<T, let N: u32, let M: u32> Serialize<N * M> for [T; N]\nwhere\n T: Serialize<M>,\n{\n fn serialize(self) -> [Field; N * M] {\n let mut result: [Field; N * M] = std::mem::zeroed();\n let mut serialized: [Field; M] = std::mem::zeroed();\n for i in 0..N {\n serialized = self[i].serialize();\n for j in 0..M {\n result[i * M + j] = serialized[j];\n }\n }\n result\n }\n}\n\nimpl<T, let N: u32, let M: u32> Deserialize<N * M> for [T; N]\nwhere\n T: Deserialize<M>,\n{\n fn deserialize(fields: [Field; N * M]) -> Self {\n let mut reader = crate::utils::reader::Reader::new(fields);\n let mut result: [T; N] = std::mem::zeroed();\n reader.read_struct_array::<T, M, N>(Deserialize::deserialize, result)\n }\n}\n\n#[test]\nfn test_u16_serialization() {\n let a: u16 = 10;\n assert_eq(a, u16::deserialize(a.serialize()));\n}\n\n#[test]\nfn test_i8_serialization() {\n let a: i8 = -10;\n assert_eq(a, i8::deserialize(a.serialize()));\n}\n\n#[test]\nfn test_i16_serialization() {\n let a: i16 = -10;\n assert_eq(a, i16::deserialize(a.serialize()));\n}\n\n#[test]\nfn test_i32_serialization() {\n let a: i32 = -10;\n assert_eq(a, i32::deserialize(a.serialize()));\n}\n\n#[test]\nfn test_i64_serialization() {\n let a: i64 = -10;\n assert_eq(a, i64::deserialize(a.serialize()));\n}\n"
|
|
3842
3842
|
},
|
|
3843
|
-
"
|
|
3843
|
+
"326": {
|
|
3844
3844
|
"path": "/build-volume/noir-projects/noir-protocol-circuits/crates/types/src/utils/reader.nr",
|
|
3845
3845
|
"source": "pub struct Reader<let N: u32> {\n data: [Field; N],\n offset: u32,\n}\n\nimpl<let N: u32> Reader<N> {\n pub fn new(data: [Field; N]) -> Self {\n Self { data, offset: 0 }\n }\n\n pub fn read(&mut self) -> Field {\n let result = self.data[self.offset];\n self.offset += 1;\n result\n }\n\n pub fn read_u32(&mut self) -> u32 {\n self.read() as u32\n }\n\n pub fn read_bool(&mut self) -> bool {\n self.read() as bool\n }\n\n pub fn read_array<let K: u32>(&mut self) -> [Field; K] {\n let mut result = [0; K];\n for i in 0..K {\n result[i] = self.data[self.offset + i];\n }\n self.offset += K;\n result\n }\n\n pub fn read_struct<T, let K: u32>(&mut self, deserialise: fn([Field; K]) -> T) -> T {\n let result = deserialise(self.read_array());\n result\n }\n\n pub fn read_struct_array<T, let K: u32, let C: u32>(\n &mut self,\n deserialise: fn([Field; K]) -> T,\n mut result: [T; C],\n ) -> [T; C] {\n for i in 0..C {\n result[i] = self.read_struct(deserialise);\n }\n result\n }\n\n pub fn finish(self) {\n assert(self.offset == self.data.len(), \"Reader did not read all data\");\n }\n}\n"
|
|
3846
3846
|
},
|