@aztec/protocol-contracts 0.65.2 → 0.67.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 +546 -574
- package/artifacts/ContractClassRegisterer.json +419 -494
- package/artifacts/ContractInstanceDeployer.json +157 -221
- package/artifacts/FeeJuice.json +685 -753
- package/artifacts/MultiCallEntrypoint.json +89 -121
- package/artifacts/Router.json +595 -659
- package/dest/class-registerer/contract_class_registered_event.d.ts +17 -0
- package/dest/class-registerer/contract_class_registered_event.d.ts.map +1 -0
- package/dest/class-registerer/contract_class_registered_event.js +60 -0
- package/dest/class-registerer/index.d.ts +3 -0
- package/dest/class-registerer/index.d.ts.map +1 -1
- package/dest/class-registerer/index.js +4 -1
- package/dest/class-registerer/private_function_broadcasted_event.d.ts +43 -0
- package/dest/class-registerer/private_function_broadcasted_event.d.ts.map +1 -0
- package/dest/class-registerer/private_function_broadcasted_event.js +87 -0
- package/dest/class-registerer/unconstrained_function_broadcasted_event.d.ts +37 -0
- package/dest/class-registerer/unconstrained_function_broadcasted_event.d.ts.map +1 -0
- package/dest/class-registerer/unconstrained_function_broadcasted_event.js +83 -0
- package/dest/index.d.ts +5 -0
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +6 -1
- package/dest/instance-deployer/contract_instance_deployed_event.d.ts +18 -0
- package/dest/instance-deployer/contract_instance_deployed_event.d.ts.map +1 -0
- package/dest/instance-deployer/contract_instance_deployed_event.js +47 -0
- package/dest/instance-deployer/index.d.ts +1 -0
- package/dest/instance-deployer/index.d.ts.map +1 -1
- package/dest/instance-deployer/index.js +2 -1
- package/dest/protocol_contract_data.d.ts +4 -0
- package/dest/protocol_contract_data.d.ts.map +1 -1
- package/dest/protocol_contract_data.js +12 -8
- package/dest/scripts/generate_data.js +20 -6
- package/dest/tests/fixtures.d.ts +8 -0
- package/dest/tests/fixtures.d.ts.map +1 -0
- package/dest/tests/fixtures.js +27 -0
- package/package.json +10 -4
- package/src/class-registerer/contract_class_registered_event.ts +86 -0
- package/src/class-registerer/index.ts +4 -0
- package/src/class-registerer/private_function_broadcasted_event.ts +115 -0
- package/src/class-registerer/unconstrained_function_broadcasted_event.ts +109 -0
- package/src/index.ts +5 -0
- package/src/instance-deployer/contract_instance_deployed_event.ts +61 -0
- package/src/instance-deployer/index.ts +2 -0
- package/src/protocol_contract_data.ts +21 -8
- package/src/scripts/generate_data.ts +23 -4
- package/src/tests/fixtures.ts +31 -0
package/artifacts/Router.json
CHANGED
|
@@ -1,10 +1,82 @@
|
|
|
1
1
|
{
|
|
2
2
|
"transpiled": true,
|
|
3
|
-
"noir_version": "1.0.0-beta.0+
|
|
3
|
+
"noir_version": "1.0.0-beta.0+b3f4ad661c8c6f88544d714fd5b7b6f58a8ce4ad-x8664",
|
|
4
4
|
"name": "Router",
|
|
5
5
|
"functions": [
|
|
6
6
|
{
|
|
7
|
-
"name": "
|
|
7
|
+
"name": "public_dispatch",
|
|
8
|
+
"is_unconstrained": true,
|
|
9
|
+
"custom_attributes": [
|
|
10
|
+
"public"
|
|
11
|
+
],
|
|
12
|
+
"abi": {
|
|
13
|
+
"error_types": {
|
|
14
|
+
"10421965853029650238": {
|
|
15
|
+
"error_kind": "string",
|
|
16
|
+
"string": "Function _check_block_number can only be called statically"
|
|
17
|
+
},
|
|
18
|
+
"11405868724477732285": {
|
|
19
|
+
"error_kind": "string",
|
|
20
|
+
"string": "Function _check_timestamp can only be called internally"
|
|
21
|
+
},
|
|
22
|
+
"13418685691864489983": {
|
|
23
|
+
"error_kind": "string",
|
|
24
|
+
"string": "Function _check_timestamp can only be called statically"
|
|
25
|
+
},
|
|
26
|
+
"1433889167918961673": {
|
|
27
|
+
"error_kind": "fmtstring",
|
|
28
|
+
"item_types": [],
|
|
29
|
+
"length": 17
|
|
30
|
+
},
|
|
31
|
+
"16541607464495309456": {
|
|
32
|
+
"error_kind": "fmtstring",
|
|
33
|
+
"item_types": [],
|
|
34
|
+
"length": 16
|
|
35
|
+
},
|
|
36
|
+
"16761564377371454734": {
|
|
37
|
+
"error_kind": "string",
|
|
38
|
+
"string": "Array index out of bounds"
|
|
39
|
+
},
|
|
40
|
+
"17843811134343075018": {
|
|
41
|
+
"error_kind": "string",
|
|
42
|
+
"string": "Stack too deep"
|
|
43
|
+
},
|
|
44
|
+
"2242946026394210301": {
|
|
45
|
+
"error_kind": "string",
|
|
46
|
+
"string": "Block number mismatch."
|
|
47
|
+
},
|
|
48
|
+
"5019202896831570965": {
|
|
49
|
+
"error_kind": "string",
|
|
50
|
+
"string": "attempt to add with overflow"
|
|
51
|
+
},
|
|
52
|
+
"8209322232883590150": {
|
|
53
|
+
"error_kind": "string",
|
|
54
|
+
"string": "Function _check_block_number can only be called internally"
|
|
55
|
+
},
|
|
56
|
+
"8443716675528357851": {
|
|
57
|
+
"error_kind": "string",
|
|
58
|
+
"string": "Timestamp mismatch."
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"parameters": [
|
|
62
|
+
{
|
|
63
|
+
"name": "selector",
|
|
64
|
+
"type": {
|
|
65
|
+
"kind": "field"
|
|
66
|
+
},
|
|
67
|
+
"visibility": "private"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"return_type": null
|
|
71
|
+
},
|
|
72
|
+
"bytecode": "JgACBAEnAAABBIBEJgAABAMmAgIEASYCAwQAHxgAAwACgEMtCIBDAAEkAAAAQCcCAAEEgEQmAgIEADoNAAEAAiQAAAT4KAIAAgBYryrgCjgBAgMmAgQEACYCBgQDADgEBgUsCAECABABBQEmAwIEAQAoAgIFLA4EBQAoBQIFLA4EBSYCBQQDADgCBQQmAgQEAiYCBQEBJgIGBAEmAgcAASYCCAQAIwIAAwAAALIiAAACKiwIAQMmAgkEAwAQAQkBJgMDBAEAKAMCCR88AAYABAAJLA0DCQAoCQIJLA4JAywNAwkAKAkCCSwOCQMsDQMJACgJAgksDgkDLAgBCQAAAQIBLA4DCSwIAQMAAAECASwOCAMmAgsEDCw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BirtTZw9EKIUEaV2juiA2hsMeyADQB9szZn8VIJPoOFW/xnUDqNhtXsE5fQG1KisS5giQfJrDo610XhImWORNqeD9yxEb+1w8alxGgq2xxt7kDEHeLB8aMZzR5ujU8o0Olbmo9N+0dZxkLRjS6YUJQdbe15BAoDaN5gWxuN9lsMc1L73EivTdG6A2sX8DqhdH9Y8XrFVWyABQO2ns85AtB+6OqD2s5SZTrGXZyBtR0QPJAAoI+a1V2E6oIIoFURJECVBlBRRUkTJECVDlBxRckQJmhoVULL28m4PZAAoIkoRUUqIUvtZogPKAQEJAqoAqP0A0gMhYYQkFhPEuYo4VxHntotNPRDiXEfCyBHnOhJGSDYyJBs5ko0cyUYeIwICwshTQECCgADnei4ICHEucpvzwfbRDkiQMBLEuYqEkSLONSSM2mWiwRMjyN7ely9a6PN2mWgrdqfa7lTbK9P22s6Sm7Ebk72ddzdjVyZ7otreTvlbsbcz9lbs7dS+GTvVdqHaLsw8U5UaM0aNd6POVafa7lTb2y8f2oydGDPpgz2bVibIfM0xhQ9qXpPOsIjyFvQ4fPzn/Pby/NvVxd3u6XfBfv65/n7wM2H3//6+ePeLYb9vb75f/Phze7H/7bDXnw3bT/8y2Fck7cdnP/ZJw1lS2X/ch1EZigVFfFAdlP8D",
|
|
74
|
+
"brillig_names": [
|
|
75
|
+
"public_dispatch"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "check_block_number",
|
|
8
80
|
"is_unconstrained": false,
|
|
9
81
|
"custom_attributes": [
|
|
10
82
|
"private"
|
|
@@ -363,7 +435,7 @@
|
|
|
363
435
|
}
|
|
364
436
|
],
|
|
365
437
|
"kind": "struct",
|
|
366
|
-
"path": "aztec::protocol_types::
|
|
438
|
+
"path": "aztec::protocol_types::block_header::BlockHeader"
|
|
367
439
|
}
|
|
368
440
|
},
|
|
369
441
|
{
|
|
@@ -493,9 +565,7 @@
|
|
|
493
565
|
{
|
|
494
566
|
"name": "value",
|
|
495
567
|
"type": {
|
|
496
|
-
"kind": "
|
|
497
|
-
"sign": "unsigned",
|
|
498
|
-
"width": 64
|
|
568
|
+
"kind": "field"
|
|
499
569
|
},
|
|
500
570
|
"visibility": "private"
|
|
501
571
|
}
|
|
@@ -802,7 +872,7 @@
|
|
|
802
872
|
"name": "private_call_requests",
|
|
803
873
|
"type": {
|
|
804
874
|
"kind": "array",
|
|
805
|
-
"length":
|
|
875
|
+
"length": 5,
|
|
806
876
|
"type": {
|
|
807
877
|
"fields": [
|
|
808
878
|
{
|
|
@@ -986,7 +1056,7 @@
|
|
|
986
1056
|
}
|
|
987
1057
|
],
|
|
988
1058
|
"kind": "struct",
|
|
989
|
-
"path": "aztec::protocol_types::abis::side_effect::Counted"
|
|
1059
|
+
"path": "aztec::protocol_types::abis::side_effect::counted::Counted"
|
|
990
1060
|
}
|
|
991
1061
|
}
|
|
992
1062
|
},
|
|
@@ -1101,46 +1171,29 @@
|
|
|
1101
1171
|
}
|
|
1102
1172
|
},
|
|
1103
1173
|
{
|
|
1104
|
-
"name": "
|
|
1105
|
-
"type": {
|
|
1106
|
-
"kind": "integer",
|
|
1107
|
-
"sign": "unsigned",
|
|
1108
|
-
"width": 32
|
|
1109
|
-
}
|
|
1110
|
-
},
|
|
1111
|
-
{
|
|
1112
|
-
"name": "end_side_effect_counter",
|
|
1113
|
-
"type": {
|
|
1114
|
-
"kind": "integer",
|
|
1115
|
-
"sign": "unsigned",
|
|
1116
|
-
"width": 32
|
|
1117
|
-
}
|
|
1118
|
-
},
|
|
1119
|
-
{
|
|
1120
|
-
"name": "note_encrypted_logs_hashes",
|
|
1174
|
+
"name": "private_logs",
|
|
1121
1175
|
"type": {
|
|
1122
1176
|
"kind": "array",
|
|
1123
1177
|
"length": 16,
|
|
1124
1178
|
"type": {
|
|
1125
1179
|
"fields": [
|
|
1126
1180
|
{
|
|
1127
|
-
"name": "
|
|
1128
|
-
"type": {
|
|
1129
|
-
"kind": "field"
|
|
1130
|
-
}
|
|
1131
|
-
},
|
|
1132
|
-
{
|
|
1133
|
-
"name": "counter",
|
|
1134
|
-
"type": {
|
|
1135
|
-
"kind": "integer",
|
|
1136
|
-
"sign": "unsigned",
|
|
1137
|
-
"width": 32
|
|
1138
|
-
}
|
|
1139
|
-
},
|
|
1140
|
-
{
|
|
1141
|
-
"name": "length",
|
|
1181
|
+
"name": "log",
|
|
1142
1182
|
"type": {
|
|
1143
|
-
"
|
|
1183
|
+
"fields": [
|
|
1184
|
+
{
|
|
1185
|
+
"name": "fields",
|
|
1186
|
+
"type": {
|
|
1187
|
+
"kind": "array",
|
|
1188
|
+
"length": 18,
|
|
1189
|
+
"type": {
|
|
1190
|
+
"kind": "field"
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
],
|
|
1195
|
+
"kind": "struct",
|
|
1196
|
+
"path": "aztec::protocol_types::abis::log::Log"
|
|
1144
1197
|
}
|
|
1145
1198
|
},
|
|
1146
1199
|
{
|
|
@@ -1150,25 +1203,6 @@
|
|
|
1150
1203
|
"sign": "unsigned",
|
|
1151
1204
|
"width": 32
|
|
1152
1205
|
}
|
|
1153
|
-
}
|
|
1154
|
-
],
|
|
1155
|
-
"kind": "struct",
|
|
1156
|
-
"path": "aztec::protocol_types::abis::log_hash::NoteLogHash"
|
|
1157
|
-
}
|
|
1158
|
-
}
|
|
1159
|
-
},
|
|
1160
|
-
{
|
|
1161
|
-
"name": "encrypted_logs_hashes",
|
|
1162
|
-
"type": {
|
|
1163
|
-
"kind": "array",
|
|
1164
|
-
"length": 4,
|
|
1165
|
-
"type": {
|
|
1166
|
-
"fields": [
|
|
1167
|
-
{
|
|
1168
|
-
"name": "value",
|
|
1169
|
-
"type": {
|
|
1170
|
-
"kind": "field"
|
|
1171
|
-
}
|
|
1172
1206
|
},
|
|
1173
1207
|
{
|
|
1174
1208
|
"name": "counter",
|
|
@@ -1177,22 +1211,10 @@
|
|
|
1177
1211
|
"sign": "unsigned",
|
|
1178
1212
|
"width": 32
|
|
1179
1213
|
}
|
|
1180
|
-
},
|
|
1181
|
-
{
|
|
1182
|
-
"name": "length",
|
|
1183
|
-
"type": {
|
|
1184
|
-
"kind": "field"
|
|
1185
|
-
}
|
|
1186
|
-
},
|
|
1187
|
-
{
|
|
1188
|
-
"name": "randomness",
|
|
1189
|
-
"type": {
|
|
1190
|
-
"kind": "field"
|
|
1191
|
-
}
|
|
1192
1214
|
}
|
|
1193
1215
|
],
|
|
1194
1216
|
"kind": "struct",
|
|
1195
|
-
"path": "aztec::protocol_types::abis::
|
|
1217
|
+
"path": "aztec::protocol_types::abis::private_log::PrivateLogData"
|
|
1196
1218
|
}
|
|
1197
1219
|
}
|
|
1198
1220
|
},
|
|
@@ -1229,6 +1251,22 @@
|
|
|
1229
1251
|
}
|
|
1230
1252
|
}
|
|
1231
1253
|
},
|
|
1254
|
+
{
|
|
1255
|
+
"name": "start_side_effect_counter",
|
|
1256
|
+
"type": {
|
|
1257
|
+
"kind": "integer",
|
|
1258
|
+
"sign": "unsigned",
|
|
1259
|
+
"width": 32
|
|
1260
|
+
}
|
|
1261
|
+
},
|
|
1262
|
+
{
|
|
1263
|
+
"name": "end_side_effect_counter",
|
|
1264
|
+
"type": {
|
|
1265
|
+
"kind": "integer",
|
|
1266
|
+
"sign": "unsigned",
|
|
1267
|
+
"width": 32
|
|
1268
|
+
}
|
|
1269
|
+
},
|
|
1232
1270
|
{
|
|
1233
1271
|
"name": "historical_header",
|
|
1234
1272
|
"type": {
|
|
@@ -1505,7 +1543,7 @@
|
|
|
1505
1543
|
}
|
|
1506
1544
|
],
|
|
1507
1545
|
"kind": "struct",
|
|
1508
|
-
"path": "aztec::protocol_types::
|
|
1546
|
+
"path": "aztec::protocol_types::block_header::BlockHeader"
|
|
1509
1547
|
}
|
|
1510
1548
|
},
|
|
1511
1549
|
{
|
|
@@ -1616,116 +1654,344 @@
|
|
|
1616
1654
|
"visibility": "databus"
|
|
1617
1655
|
}
|
|
1618
1656
|
},
|
|
1619
|
-
"bytecode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iQuw7btltdr3VViKtAohUAUFQThSgg/iQqvJ2umRVIVkr+qVPwA=",
|
|
1621
1659
|
"brillig_names": [
|
|
1622
1660
|
"pack_arguments_oracle_wrapper",
|
|
1623
1661
|
"enqueue_public_function_call_internal"
|
|
1624
1662
|
],
|
|
1625
|
-
"verification_key": "
|
|
1626
|
-
"artifact_hash": "
|
|
1663
|
+
"verification_key": "AAAAAAAQAAAAAAAAAAAAFAAAAAAAAAAQAAAAAAAABAEBAAAAAAAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAAAAAAAAAACwUoGrQSeSMwPr+aGXrBju2NC0wnTt+dAi0eUyqVvzmBzmo4wcRFGPMqaJv1BEJ5rmfsgEHopSAHm93ELJR3iQQGZrenAj6JLT0J+IMDQHzfvcPAEINnYItLX7xQSPdHRv3Nol9tnLEu6OdnFnbV40I/sLtDulWXVq1jJNLUfvuKUby1CyY5WuHpY9qmP5MGZYG9CJoeOHJE/kT/QODa7gA8TsYZIGodFBmXc3aH/FGZOnDTcGv2zQjF+H8JeBUfBSCYybnZeMPuSV21vor+nwqq846Pv8Dasg52DvjZKh3KnXGIYQt6RGINjhkIE5/3kkkwuzgR7pf/VJ9Gvglef4Ej1qDuNjY/kKhb6J2L1tqEdg8rfdQo71nnlh79S8jPiO4QBtQ33d38EGU1sj9bb3IePviXlE5IvqW7lnJEXM6MCrC9vkV84evbT5yIRT6j39Efp7cKUd1712vr1HZ1doDcNiGH9xQNgRcF6QukMMdtFncVoZ0URled7q9d4ZlISqHEK2Ho8Be1crPjUEI0RcDAhlQKym3fWCHWE9j4fULFkcUI7/Z7Gm2oKkCJbDBGMqfNvl0/qkF4/N+keqIqvUqBRBmjjBFHUJCXO1yIWHaCZcY5kVLBdJXKrwFD7kEHS1Fyhz4YjMW5xiM51vQDUFe0uH9OsXLG0voXNxF1IrYAmJximA41FWMDE7ngCYlh6s4d9ovu69nKidMaRjzYewYD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yW4e5o2mQk/DfsOume877waD0ngpNyQxppWeSrtTKJS8UCNQizpCF4iz2mZauRxBWvK57PDjLw6zG3vQWTYeLVuWy/iv6UhmQdcwsPJ4web7IZ2SqXP0COWI4OcUb5v/oPHfIC4+UrVDF3W4p6skHbML1mV/PJ8jIi0hSmJGb9xZEQJQtb2xa0J/Fb1ohItHtk1OGC6aKtbesQ2+IiZmkj3nvIS5kg/FAiDSZwiZljYO00Mx7CMFdrOTiO/QbVeMJi9joLnSxweHyaMCUW96klPv8UuhYHBXANz2LKGv3JzAVcaVOFjbncBuS+SBCriVW4xz3LMOZDGt+dwweYuJQTOmG8hMk/5OTA4/+YoThdERaDrEaY+C3AHIgwsAvTsLBxfrakFa4w3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAijZgVPiaqE5xfmVoS1rgoNE5801i7AI+iWU9C4gWKTaCru9sEL+XedxRom0sZjL672Za6gt1ILAzZ+T26XJSPEPy7+dPPQCuqPu2l8Knkm1werJWyZMMC3IVObyLXMw3yg+39qJyUgFl/CzRC6XUt751Y/Ckgg2GUJh97Fj/vuvJ8qczwFCmSOmHYcsfCJMQmRoHJE2ov3nE3M173Fv7N4ZKxptOxTf5amtY5UdLXZt9e5ME1hEP1oUCGtRluE+Rg==",
|
|
1664
|
+
"artifact_hash": "ff6671ddb572df3d961df43ed4c3adf75a7d3763-7910244512f567b2c80618688fdf51d9-client-ivc-true"
|
|
1627
1665
|
},
|
|
1628
1666
|
{
|
|
1629
|
-
"name": "
|
|
1630
|
-
"is_unconstrained":
|
|
1631
|
-
"custom_attributes": [
|
|
1632
|
-
"private"
|
|
1633
|
-
],
|
|
1667
|
+
"name": "compute_note_hash_and_optionally_a_nullifier",
|
|
1668
|
+
"is_unconstrained": true,
|
|
1669
|
+
"custom_attributes": [],
|
|
1634
1670
|
"abi": {
|
|
1635
1671
|
"error_types": {
|
|
1672
|
+
"16541607464495309456": {
|
|
1673
|
+
"error_kind": "fmtstring",
|
|
1674
|
+
"item_types": [],
|
|
1675
|
+
"length": 16
|
|
1676
|
+
},
|
|
1636
1677
|
"17843811134343075018": {
|
|
1637
1678
|
"error_kind": "string",
|
|
1638
1679
|
"string": "Stack too deep"
|
|
1639
|
-
},
|
|
1640
|
-
"5019202896831570965": {
|
|
1641
|
-
"error_kind": "string",
|
|
1642
|
-
"string": "attempt to add with overflow"
|
|
1643
1680
|
}
|
|
1644
1681
|
},
|
|
1645
1682
|
"parameters": [
|
|
1646
1683
|
{
|
|
1647
|
-
"name": "
|
|
1684
|
+
"name": "contract_address",
|
|
1648
1685
|
"type": {
|
|
1649
1686
|
"fields": [
|
|
1650
1687
|
{
|
|
1651
|
-
"name": "
|
|
1688
|
+
"name": "inner",
|
|
1652
1689
|
"type": {
|
|
1653
|
-
"
|
|
1654
|
-
{
|
|
1655
|
-
"name": "msg_sender",
|
|
1656
|
-
"type": {
|
|
1657
|
-
"fields": [
|
|
1658
|
-
{
|
|
1659
|
-
"name": "inner",
|
|
1660
|
-
"type": {
|
|
1661
|
-
"kind": "field"
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
],
|
|
1665
|
-
"kind": "struct",
|
|
1666
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
1667
|
-
}
|
|
1668
|
-
},
|
|
1669
|
-
{
|
|
1670
|
-
"name": "contract_address",
|
|
1671
|
-
"type": {
|
|
1672
|
-
"fields": [
|
|
1673
|
-
{
|
|
1674
|
-
"name": "inner",
|
|
1675
|
-
"type": {
|
|
1676
|
-
"kind": "field"
|
|
1677
|
-
}
|
|
1678
|
-
}
|
|
1679
|
-
],
|
|
1680
|
-
"kind": "struct",
|
|
1681
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
1682
|
-
}
|
|
1683
|
-
},
|
|
1684
|
-
{
|
|
1685
|
-
"name": "function_selector",
|
|
1686
|
-
"type": {
|
|
1687
|
-
"fields": [
|
|
1688
|
-
{
|
|
1689
|
-
"name": "inner",
|
|
1690
|
-
"type": {
|
|
1691
|
-
"kind": "integer",
|
|
1692
|
-
"sign": "unsigned",
|
|
1693
|
-
"width": 32
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
],
|
|
1697
|
-
"kind": "struct",
|
|
1698
|
-
"path": "aztec::protocol_types::abis::function_selector::FunctionSelector"
|
|
1699
|
-
}
|
|
1700
|
-
},
|
|
1701
|
-
{
|
|
1702
|
-
"name": "is_static_call",
|
|
1703
|
-
"type": {
|
|
1704
|
-
"kind": "boolean"
|
|
1705
|
-
}
|
|
1706
|
-
}
|
|
1707
|
-
],
|
|
1708
|
-
"kind": "struct",
|
|
1709
|
-
"path": "aztec::protocol_types::abis::call_context::CallContext"
|
|
1690
|
+
"kind": "field"
|
|
1710
1691
|
}
|
|
1711
|
-
}
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1692
|
+
}
|
|
1693
|
+
],
|
|
1694
|
+
"kind": "struct",
|
|
1695
|
+
"path": "aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
1696
|
+
},
|
|
1697
|
+
"visibility": "private"
|
|
1698
|
+
},
|
|
1699
|
+
{
|
|
1700
|
+
"name": "nonce",
|
|
1701
|
+
"type": {
|
|
1702
|
+
"kind": "field"
|
|
1703
|
+
},
|
|
1704
|
+
"visibility": "private"
|
|
1705
|
+
},
|
|
1706
|
+
{
|
|
1707
|
+
"name": "storage_slot",
|
|
1708
|
+
"type": {
|
|
1709
|
+
"kind": "field"
|
|
1710
|
+
},
|
|
1711
|
+
"visibility": "private"
|
|
1712
|
+
},
|
|
1713
|
+
{
|
|
1714
|
+
"name": "note_type_id",
|
|
1715
|
+
"type": {
|
|
1716
|
+
"kind": "field"
|
|
1717
|
+
},
|
|
1718
|
+
"visibility": "private"
|
|
1719
|
+
},
|
|
1720
|
+
{
|
|
1721
|
+
"name": "compute_nullifier",
|
|
1722
|
+
"type": {
|
|
1723
|
+
"kind": "boolean"
|
|
1724
|
+
},
|
|
1725
|
+
"visibility": "private"
|
|
1726
|
+
},
|
|
1727
|
+
{
|
|
1728
|
+
"name": "serialized_note",
|
|
1729
|
+
"type": {
|
|
1730
|
+
"kind": "array",
|
|
1731
|
+
"length": 0,
|
|
1732
|
+
"type": {
|
|
1733
|
+
"kind": "field"
|
|
1734
|
+
}
|
|
1735
|
+
},
|
|
1736
|
+
"visibility": "private"
|
|
1737
|
+
}
|
|
1738
|
+
],
|
|
1739
|
+
"return_type": {
|
|
1740
|
+
"abi_type": {
|
|
1741
|
+
"kind": "array",
|
|
1742
|
+
"length": 4,
|
|
1743
|
+
"type": {
|
|
1744
|
+
"kind": "field"
|
|
1745
|
+
}
|
|
1746
|
+
},
|
|
1747
|
+
"visibility": "public"
|
|
1748
|
+
}
|
|
1749
|
+
},
|
|
1750
|
+
"bytecode": "H4sIAAAAAAAA/9VZ227aQBBdsI2xiQmFP4jUt1ayCdc3pF7yHSiBL+gH+KEv7VeXFTv2YTypkJipykjRGs/6zNkz4931pufONjz99cJ1HNqB6xr12YW2vM0qRazSkmfvTnj274RndCc8Y0WePYGnb+l9S9z5nUvd+X3sOPFhn+gI/O5vQCzo79Bmoe2DXzExVSYMVgt/Uy5eM3dpyvyfs4CZ2uAvCX9og18S7y91i49jobhRaF/qVssXeMZbEa6xiAmXfH3wfWW+CHzfmA9r+DvzYd0TJ9JtAGNRrKuNdV5obCmMrfdO61yrHd4jrXNnWqMV5TxjfDh/4lNQn7rlM2C+GHwZ8yXgI/19+wT9eO5T6PcZ7vOajFy3hslPOUetLWoqNsA/2ULSneckri9jow91j0HPJ6aPxVqB+ljo7/WZvcOfr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
+
]
|
|
1755
|
+
},
|
|
1756
|
+
{
|
|
1757
|
+
"name": "sync_notes",
|
|
1758
|
+
"is_unconstrained": true,
|
|
1759
|
+
"custom_attributes": [],
|
|
1760
|
+
"abi": {
|
|
1761
|
+
"error_types": {
|
|
1762
|
+
"17843811134343075018": {
|
|
1763
|
+
"error_kind": "string",
|
|
1764
|
+
"string": "Stack too deep"
|
|
1765
|
+
}
|
|
1766
|
+
},
|
|
1767
|
+
"parameters": [],
|
|
1768
|
+
"return_type": null
|
|
1769
|
+
},
|
|
1770
|
+
"bytecode": "H4sIAAAAAAAA/9VUyw6CMBBseURBOaiJ3kz8gyIYOJJ49x8akKMe8OKNT5eabbqpVRKlJkzSbEs3szNlW0oUKESPvAH9tGnIFdhBDCA6aN/tRgFr9hviQKs7JH/O0iQw+BtQ/5OfWtIvIPktnT+bAM+xVfzYi6w77UaIesKWZ/nPbHpe9fhc/MFnh32k1caghm+uIYci3RuYR4Y8iRlRd9prh/eV5YzJei7w++RVO67va/lrWIeafvmOFV/qrDMe1wmv+YFXVVrypcYv4KBzGnMvbGHe1wvY45yo3mjul/J0vZ0b0gNB8gCVxsvQjgYAAA==",
|
|
1771
|
+
"debug_symbols": "ndJLCoMwEAbgu8zahXmp8SpSJGqUQEgkxkIR794ottjiJm6GzJBvZvMv0MlmHmplejtBWS2gbSu8siZ0y5pA45TWaqjPY0i3gtD+fxqF2drJC+ehJIwkIE0XXhkKvlda7tP1kQDC8YTEExpPWDTBl1c44dlhOMXkizjaDbthshsmv2GKeEMuI8BpwT6GpfTHrKF7CqdEo+WRsH427Slw/jXKv+yNzraym53cUngKYKgVyhOMw9qw+g0=",
|
|
1772
|
+
"brillig_names": [
|
|
1773
|
+
"sync_notes"
|
|
1774
|
+
]
|
|
1775
|
+
},
|
|
1776
|
+
{
|
|
1777
|
+
"name": "_check_timestamp",
|
|
1778
|
+
"is_unconstrained": true,
|
|
1779
|
+
"custom_attributes": [
|
|
1780
|
+
"public",
|
|
1781
|
+
"internal",
|
|
1782
|
+
"view"
|
|
1783
|
+
],
|
|
1784
|
+
"abi": {
|
|
1785
|
+
"error_types": {
|
|
1786
|
+
"11405868724477732285": {
|
|
1787
|
+
"error_kind": "string",
|
|
1788
|
+
"string": "Function _check_timestamp can only be called internally"
|
|
1789
|
+
},
|
|
1790
|
+
"13418685691864489983": {
|
|
1791
|
+
"error_kind": "string",
|
|
1792
|
+
"string": "Function _check_timestamp can only be called statically"
|
|
1793
|
+
},
|
|
1794
|
+
"1433889167918961673": {
|
|
1795
|
+
"error_kind": "fmtstring",
|
|
1796
|
+
"item_types": [],
|
|
1797
|
+
"length": 17
|
|
1798
|
+
},
|
|
1799
|
+
"17843811134343075018": {
|
|
1800
|
+
"error_kind": "string",
|
|
1801
|
+
"string": "Stack too deep"
|
|
1802
|
+
},
|
|
1803
|
+
"8443716675528357851": {
|
|
1804
|
+
"error_kind": "string",
|
|
1805
|
+
"string": "Timestamp mismatch."
|
|
1806
|
+
}
|
|
1807
|
+
},
|
|
1808
|
+
"parameters": [
|
|
1809
|
+
{
|
|
1810
|
+
"name": "operation",
|
|
1811
|
+
"type": {
|
|
1812
|
+
"kind": "integer",
|
|
1813
|
+
"sign": "unsigned",
|
|
1814
|
+
"width": 8
|
|
1815
|
+
},
|
|
1816
|
+
"visibility": "private"
|
|
1817
|
+
},
|
|
1818
|
+
{
|
|
1819
|
+
"name": "value",
|
|
1820
|
+
"type": {
|
|
1821
|
+
"kind": "integer",
|
|
1822
|
+
"sign": "unsigned",
|
|
1823
|
+
"width": 64
|
|
1824
|
+
},
|
|
1825
|
+
"visibility": "private"
|
|
1826
|
+
}
|
|
1827
|
+
],
|
|
1828
|
+
"return_type": null
|
|
1829
|
+
},
|
|
1830
|
+
"bytecode": "JgACBAEnAAABBIBFJgAABAMmAgMEAiYCBAQAHxgABAADgEMdAIBDgEMCHQCARIBEBS0IgEMAAS0IgEQAAiQAAABUJwIAAQSARSYCAgQAOg0AAQACJAAAAy4eAgAEAR4CAAUACjgEB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LdPCwe37aL7i3x8RlxtxqppUUp3nYvYLuhhRmZdkPaD/OMnFrUFvkv",
|
|
1832
|
+
"brillig_names": [
|
|
1833
|
+
"_check_timestamp"
|
|
1834
|
+
]
|
|
1835
|
+
},
|
|
1836
|
+
{
|
|
1837
|
+
"name": "_check_block_number",
|
|
1838
|
+
"is_unconstrained": true,
|
|
1839
|
+
"custom_attributes": [
|
|
1840
|
+
"public",
|
|
1841
|
+
"internal",
|
|
1842
|
+
"view"
|
|
1843
|
+
],
|
|
1844
|
+
"abi": {
|
|
1845
|
+
"error_types": {
|
|
1846
|
+
"10421965853029650238": {
|
|
1847
|
+
"error_kind": "string",
|
|
1848
|
+
"string": "Function _check_block_number can only be called statically"
|
|
1849
|
+
},
|
|
1850
|
+
"1433889167918961673": {
|
|
1851
|
+
"error_kind": "fmtstring",
|
|
1852
|
+
"item_types": [],
|
|
1853
|
+
"length": 17
|
|
1854
|
+
},
|
|
1855
|
+
"17843811134343075018": {
|
|
1856
|
+
"error_kind": "string",
|
|
1857
|
+
"string": "Stack too deep"
|
|
1858
|
+
},
|
|
1859
|
+
"2242946026394210301": {
|
|
1860
|
+
"error_kind": "string",
|
|
1861
|
+
"string": "Block number mismatch."
|
|
1862
|
+
},
|
|
1863
|
+
"8209322232883590150": {
|
|
1864
|
+
"error_kind": "string",
|
|
1865
|
+
"string": "Function _check_block_number can only be called internally"
|
|
1866
|
+
}
|
|
1867
|
+
},
|
|
1868
|
+
"parameters": [
|
|
1869
|
+
{
|
|
1870
|
+
"name": "operation",
|
|
1871
|
+
"type": {
|
|
1872
|
+
"kind": "integer",
|
|
1873
|
+
"sign": "unsigned",
|
|
1874
|
+
"width": 8
|
|
1875
|
+
},
|
|
1876
|
+
"visibility": "private"
|
|
1877
|
+
},
|
|
1878
|
+
{
|
|
1879
|
+
"name": "value",
|
|
1880
|
+
"type": {
|
|
1881
|
+
"kind": "field"
|
|
1882
|
+
},
|
|
1883
|
+
"visibility": "private"
|
|
1884
|
+
}
|
|
1885
|
+
],
|
|
1886
|
+
"return_type": null
|
|
1887
|
+
},
|
|
1888
|
+
"bytecode": "JgACBAEnAAABBIBFJgAABAMmAgMEAiYCBAQAHxgABAADgEMdAIBDgEMCLQiAQwABLQiARAACJAAAAE0nAgABBIBFJgICBAA6DQABAAIkAAADHR4CAAQBHgIABQAKOAQFBiMCAAYAAABuJAAAA0YeAgAECSYCBQABCjgEBQYjAgAGAAAAiiQAAANYHgIABAUKOAQCBQw4BAIGJgICAgEKOAECBCYCAgEBIwIABAAAAwYiAAAAtSYCBwICCjgBBwgWDAUHIwIACAAAAvQiAAAA0CYCCQIDCjgBCQojAgAKAAAC4iIAAADnJgIKAgQKOAEKCyMCAAsAAALLIgAAAP4mAgoCBQo4AQoLFgwGCiMCAAsAAAK0IgAAARkmAgcCBgo4AQcLIwIACwAAAqIiAAABMCYCAQJ0JgIHAnAmAgoCZCYCCwJhJgIMAkkmAg0CciYCDgJvJgIPAmkmAhACdiYCEQJlJgISAiAmAhMCbCYCFAJuLAgBFSYCFgQSABABFgEmAxUEAQAoFQIWLAwWFywODBcAKBcCFywOFBcAKBcCFywOEBcAKBcCFywOCxcAKBcCFywOExcAKBcCFywODxcAKBcCFywOChcAKBcCFywOEhcAKBcCFywODhcAKBcCFywOBxcAKBcCFywOERcAKBcCFywODRcAKBcCFywOCxcAKBcCFywOARcAKBcCFywODxcAKBcCFywODhcAKBcCFywOFBcmAgEEACYCBwEACjgHAgojAgAKAAACmSYCCwQTLAgBDCYCDQQTABABDQEsDAwNKQMADQUT5jKZ5RcUCQAoDQINACgVAg4mAg8EES0EAA6AAy0EAA2ABC0EAA+ABSQAAANqJgIOBBEAOA0ODSwOAQ0AKA0CDTsNDAssDAcGIgAAAqssDAoGIgAAAqssDAYFIgAAAsIEOAoHASwMAQUiAAACwiwMBQkiAAAC2RI4BgUBLAwBCSIAAALZLAwJCCIAAALrLAwGCCIAAALrLAwIBCIAAAL9LAwHBCIAAAL9LAwEAyIAAAMPLAwFAyIAAAM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rOYeZFxPBnE1dcWkmmprUo8rWo8ratVQsXoyKJf4XyTD749PiaQSu+02KDAfnYdLP3/61M36eSNw+9EOf8+3y/n9arE/vvv0tn44Os27+/OyODnY+7LdPCwe37aL7ojv4XRvx5kszyjl2+6MaTfUNGvxuyF9fsvtUFvUFvkv",
|
|
1890
|
+
"brillig_names": [
|
|
1891
|
+
"_check_block_number"
|
|
1892
|
+
]
|
|
1893
|
+
},
|
|
1894
|
+
{
|
|
1895
|
+
"name": "check_timestamp",
|
|
1896
|
+
"is_unconstrained": false,
|
|
1897
|
+
"custom_attributes": [
|
|
1898
|
+
"private"
|
|
1899
|
+
],
|
|
1900
|
+
"abi": {
|
|
1901
|
+
"error_types": {
|
|
1902
|
+
"17843811134343075018": {
|
|
1903
|
+
"error_kind": "string",
|
|
1904
|
+
"string": "Stack too deep"
|
|
1905
|
+
},
|
|
1906
|
+
"5019202896831570965": {
|
|
1907
|
+
"error_kind": "string",
|
|
1908
|
+
"string": "attempt to add with overflow"
|
|
1909
|
+
}
|
|
1910
|
+
},
|
|
1911
|
+
"parameters": [
|
|
1912
|
+
{
|
|
1913
|
+
"name": "inputs",
|
|
1914
|
+
"type": {
|
|
1915
|
+
"fields": [
|
|
1916
|
+
{
|
|
1917
|
+
"name": "call_context",
|
|
1918
|
+
"type": {
|
|
1919
|
+
"fields": [
|
|
1920
|
+
{
|
|
1921
|
+
"name": "msg_sender",
|
|
1922
|
+
"type": {
|
|
1923
|
+
"fields": [
|
|
1924
|
+
{
|
|
1925
|
+
"name": "inner",
|
|
1926
|
+
"type": {
|
|
1927
|
+
"kind": "field"
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
],
|
|
1931
|
+
"kind": "struct",
|
|
1932
|
+
"path": "aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
1933
|
+
}
|
|
1934
|
+
},
|
|
1935
|
+
{
|
|
1936
|
+
"name": "contract_address",
|
|
1937
|
+
"type": {
|
|
1938
|
+
"fields": [
|
|
1939
|
+
{
|
|
1940
|
+
"name": "inner",
|
|
1941
|
+
"type": {
|
|
1942
|
+
"kind": "field"
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
],
|
|
1946
|
+
"kind": "struct",
|
|
1947
|
+
"path": "aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
1948
|
+
}
|
|
1949
|
+
},
|
|
1950
|
+
{
|
|
1951
|
+
"name": "function_selector",
|
|
1952
|
+
"type": {
|
|
1953
|
+
"fields": [
|
|
1954
|
+
{
|
|
1955
|
+
"name": "inner",
|
|
1956
|
+
"type": {
|
|
1957
|
+
"kind": "integer",
|
|
1958
|
+
"sign": "unsigned",
|
|
1959
|
+
"width": 32
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
],
|
|
1963
|
+
"kind": "struct",
|
|
1964
|
+
"path": "aztec::protocol_types::abis::function_selector::FunctionSelector"
|
|
1965
|
+
}
|
|
1966
|
+
},
|
|
1967
|
+
{
|
|
1968
|
+
"name": "is_static_call",
|
|
1969
|
+
"type": {
|
|
1970
|
+
"kind": "boolean"
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
],
|
|
1974
|
+
"kind": "struct",
|
|
1975
|
+
"path": "aztec::protocol_types::abis::call_context::CallContext"
|
|
1976
|
+
}
|
|
1977
|
+
},
|
|
1978
|
+
{
|
|
1979
|
+
"name": "historical_header",
|
|
1980
|
+
"type": {
|
|
1981
|
+
"fields": [
|
|
1982
|
+
{
|
|
1983
|
+
"name": "last_archive",
|
|
1984
|
+
"type": {
|
|
1985
|
+
"fields": [
|
|
1986
|
+
{
|
|
1987
|
+
"name": "root",
|
|
1988
|
+
"type": {
|
|
1989
|
+
"kind": "field"
|
|
1990
|
+
}
|
|
1991
|
+
},
|
|
1992
|
+
{
|
|
1993
|
+
"name": "next_available_leaf_index",
|
|
1994
|
+
"type": {
|
|
1729
1995
|
"kind": "integer",
|
|
1730
1996
|
"sign": "unsigned",
|
|
1731
1997
|
"width": 32
|
|
@@ -1985,7 +2251,7 @@
|
|
|
1985
2251
|
}
|
|
1986
2252
|
],
|
|
1987
2253
|
"kind": "struct",
|
|
1988
|
-
"path": "aztec::protocol_types::
|
|
2254
|
+
"path": "aztec::protocol_types::block_header::BlockHeader"
|
|
1989
2255
|
}
|
|
1990
2256
|
},
|
|
1991
2257
|
{
|
|
@@ -2115,7 +2381,9 @@
|
|
|
2115
2381
|
{
|
|
2116
2382
|
"name": "value",
|
|
2117
2383
|
"type": {
|
|
2118
|
-
"kind": "
|
|
2384
|
+
"kind": "integer",
|
|
2385
|
+
"sign": "unsigned",
|
|
2386
|
+
"width": 64
|
|
2119
2387
|
},
|
|
2120
2388
|
"visibility": "private"
|
|
2121
2389
|
}
|
|
@@ -2422,7 +2690,7 @@
|
|
|
2422
2690
|
"name": "private_call_requests",
|
|
2423
2691
|
"type": {
|
|
2424
2692
|
"kind": "array",
|
|
2425
|
-
"length":
|
|
2693
|
+
"length": 5,
|
|
2426
2694
|
"type": {
|
|
2427
2695
|
"fields": [
|
|
2428
2696
|
{
|
|
@@ -2606,7 +2874,7 @@
|
|
|
2606
2874
|
}
|
|
2607
2875
|
],
|
|
2608
2876
|
"kind": "struct",
|
|
2609
|
-
"path": "aztec::protocol_types::abis::side_effect::Counted"
|
|
2877
|
+
"path": "aztec::protocol_types::abis::side_effect::counted::Counted"
|
|
2610
2878
|
}
|
|
2611
2879
|
}
|
|
2612
2880
|
},
|
|
@@ -2665,106 +2933,49 @@
|
|
|
2665
2933
|
"name": "is_static_call",
|
|
2666
2934
|
"type": {
|
|
2667
2935
|
"kind": "boolean"
|
|
2668
|
-
}
|
|
2669
|
-
},
|
|
2670
|
-
{
|
|
2671
|
-
"name": "args_hash",
|
|
2672
|
-
"type": {
|
|
2673
|
-
"kind": "field"
|
|
2674
|
-
}
|
|
2675
|
-
}
|
|
2676
|
-
],
|
|
2677
|
-
"kind": "struct",
|
|
2678
|
-
"path": "aztec::protocol_types::abis::public_call_request::PublicCallRequest"
|
|
2679
|
-
}
|
|
2680
|
-
},
|
|
2681
|
-
{
|
|
2682
|
-
"name": "l2_to_l1_msgs",
|
|
2683
|
-
"type": {
|
|
2684
|
-
"kind": "array",
|
|
2685
|
-
"length": 2,
|
|
2686
|
-
"type": {
|
|
2687
|
-
"fields": [
|
|
2688
|
-
{
|
|
2689
|
-
"name": "recipient",
|
|
2690
|
-
"type": {
|
|
2691
|
-
"fields": [
|
|
2692
|
-
{
|
|
2693
|
-
"name": "inner",
|
|
2694
|
-
"type": {
|
|
2695
|
-
"kind": "field"
|
|
2696
|
-
}
|
|
2697
|
-
}
|
|
2698
|
-
],
|
|
2699
|
-
"kind": "struct",
|
|
2700
|
-
"path": "aztec::protocol_types::address::eth_address::EthAddress"
|
|
2701
|
-
}
|
|
2702
|
-
},
|
|
2703
|
-
{
|
|
2704
|
-
"name": "content",
|
|
2705
|
-
"type": {
|
|
2706
|
-
"kind": "field"
|
|
2707
|
-
}
|
|
2708
|
-
},
|
|
2709
|
-
{
|
|
2710
|
-
"name": "counter",
|
|
2711
|
-
"type": {
|
|
2712
|
-
"kind": "integer",
|
|
2713
|
-
"sign": "unsigned",
|
|
2714
|
-
"width": 32
|
|
2715
|
-
}
|
|
2716
|
-
}
|
|
2717
|
-
],
|
|
2718
|
-
"kind": "struct",
|
|
2719
|
-
"path": "aztec::protocol_types::messaging::l2_to_l1_message::L2ToL1Message"
|
|
2720
|
-
}
|
|
2721
|
-
}
|
|
2722
|
-
},
|
|
2723
|
-
{
|
|
2724
|
-
"name": "start_side_effect_counter",
|
|
2725
|
-
"type": {
|
|
2726
|
-
"kind": "integer",
|
|
2727
|
-
"sign": "unsigned",
|
|
2728
|
-
"width": 32
|
|
2729
|
-
}
|
|
2730
|
-
},
|
|
2731
|
-
{
|
|
2732
|
-
"name": "end_side_effect_counter",
|
|
2733
|
-
"type": {
|
|
2734
|
-
"kind": "integer",
|
|
2735
|
-
"sign": "unsigned",
|
|
2736
|
-
"width": 32
|
|
2936
|
+
}
|
|
2937
|
+
},
|
|
2938
|
+
{
|
|
2939
|
+
"name": "args_hash",
|
|
2940
|
+
"type": {
|
|
2941
|
+
"kind": "field"
|
|
2942
|
+
}
|
|
2943
|
+
}
|
|
2944
|
+
],
|
|
2945
|
+
"kind": "struct",
|
|
2946
|
+
"path": "aztec::protocol_types::abis::public_call_request::PublicCallRequest"
|
|
2737
2947
|
}
|
|
2738
2948
|
},
|
|
2739
2949
|
{
|
|
2740
|
-
"name": "
|
|
2950
|
+
"name": "l2_to_l1_msgs",
|
|
2741
2951
|
"type": {
|
|
2742
2952
|
"kind": "array",
|
|
2743
|
-
"length":
|
|
2953
|
+
"length": 2,
|
|
2744
2954
|
"type": {
|
|
2745
2955
|
"fields": [
|
|
2746
2956
|
{
|
|
2747
|
-
"name": "
|
|
2748
|
-
"type": {
|
|
2749
|
-
"kind": "field"
|
|
2750
|
-
}
|
|
2751
|
-
},
|
|
2752
|
-
{
|
|
2753
|
-
"name": "counter",
|
|
2957
|
+
"name": "recipient",
|
|
2754
2958
|
"type": {
|
|
2755
|
-
"
|
|
2756
|
-
|
|
2757
|
-
|
|
2959
|
+
"fields": [
|
|
2960
|
+
{
|
|
2961
|
+
"name": "inner",
|
|
2962
|
+
"type": {
|
|
2963
|
+
"kind": "field"
|
|
2964
|
+
}
|
|
2965
|
+
}
|
|
2966
|
+
],
|
|
2967
|
+
"kind": "struct",
|
|
2968
|
+
"path": "aztec::protocol_types::address::eth_address::EthAddress"
|
|
2758
2969
|
}
|
|
2759
2970
|
},
|
|
2760
2971
|
{
|
|
2761
|
-
"name": "
|
|
2972
|
+
"name": "content",
|
|
2762
2973
|
"type": {
|
|
2763
2974
|
"kind": "field"
|
|
2764
2975
|
}
|
|
2765
2976
|
},
|
|
2766
2977
|
{
|
|
2767
|
-
"name": "
|
|
2978
|
+
"name": "counter",
|
|
2768
2979
|
"type": {
|
|
2769
2980
|
"kind": "integer",
|
|
2770
2981
|
"sign": "unsigned",
|
|
@@ -2773,25 +2984,38 @@
|
|
|
2773
2984
|
}
|
|
2774
2985
|
],
|
|
2775
2986
|
"kind": "struct",
|
|
2776
|
-
"path": "aztec::protocol_types::
|
|
2987
|
+
"path": "aztec::protocol_types::messaging::l2_to_l1_message::L2ToL1Message"
|
|
2777
2988
|
}
|
|
2778
2989
|
}
|
|
2779
2990
|
},
|
|
2780
2991
|
{
|
|
2781
|
-
"name": "
|
|
2992
|
+
"name": "private_logs",
|
|
2782
2993
|
"type": {
|
|
2783
2994
|
"kind": "array",
|
|
2784
|
-
"length":
|
|
2995
|
+
"length": 16,
|
|
2785
2996
|
"type": {
|
|
2786
2997
|
"fields": [
|
|
2787
2998
|
{
|
|
2788
|
-
"name": "
|
|
2999
|
+
"name": "log",
|
|
2789
3000
|
"type": {
|
|
2790
|
-
"
|
|
3001
|
+
"fields": [
|
|
3002
|
+
{
|
|
3003
|
+
"name": "fields",
|
|
3004
|
+
"type": {
|
|
3005
|
+
"kind": "array",
|
|
3006
|
+
"length": 18,
|
|
3007
|
+
"type": {
|
|
3008
|
+
"kind": "field"
|
|
3009
|
+
}
|
|
3010
|
+
}
|
|
3011
|
+
}
|
|
3012
|
+
],
|
|
3013
|
+
"kind": "struct",
|
|
3014
|
+
"path": "aztec::protocol_types::abis::log::Log"
|
|
2791
3015
|
}
|
|
2792
3016
|
},
|
|
2793
3017
|
{
|
|
2794
|
-
"name": "
|
|
3018
|
+
"name": "note_hash_counter",
|
|
2795
3019
|
"type": {
|
|
2796
3020
|
"kind": "integer",
|
|
2797
3021
|
"sign": "unsigned",
|
|
@@ -2799,20 +3023,16 @@
|
|
|
2799
3023
|
}
|
|
2800
3024
|
},
|
|
2801
3025
|
{
|
|
2802
|
-
"name": "
|
|
2803
|
-
"type": {
|
|
2804
|
-
"kind": "field"
|
|
2805
|
-
}
|
|
2806
|
-
},
|
|
2807
|
-
{
|
|
2808
|
-
"name": "randomness",
|
|
3026
|
+
"name": "counter",
|
|
2809
3027
|
"type": {
|
|
2810
|
-
"kind": "
|
|
3028
|
+
"kind": "integer",
|
|
3029
|
+
"sign": "unsigned",
|
|
3030
|
+
"width": 32
|
|
2811
3031
|
}
|
|
2812
3032
|
}
|
|
2813
3033
|
],
|
|
2814
3034
|
"kind": "struct",
|
|
2815
|
-
"path": "aztec::protocol_types::abis::
|
|
3035
|
+
"path": "aztec::protocol_types::abis::private_log::PrivateLogData"
|
|
2816
3036
|
}
|
|
2817
3037
|
}
|
|
2818
3038
|
},
|
|
@@ -2849,6 +3069,22 @@
|
|
|
2849
3069
|
}
|
|
2850
3070
|
}
|
|
2851
3071
|
},
|
|
3072
|
+
{
|
|
3073
|
+
"name": "start_side_effect_counter",
|
|
3074
|
+
"type": {
|
|
3075
|
+
"kind": "integer",
|
|
3076
|
+
"sign": "unsigned",
|
|
3077
|
+
"width": 32
|
|
3078
|
+
}
|
|
3079
|
+
},
|
|
3080
|
+
{
|
|
3081
|
+
"name": "end_side_effect_counter",
|
|
3082
|
+
"type": {
|
|
3083
|
+
"kind": "integer",
|
|
3084
|
+
"sign": "unsigned",
|
|
3085
|
+
"width": 32
|
|
3086
|
+
}
|
|
3087
|
+
},
|
|
2852
3088
|
{
|
|
2853
3089
|
"name": "historical_header",
|
|
2854
3090
|
"type": {
|
|
@@ -3125,7 +3361,7 @@
|
|
|
3125
3361
|
}
|
|
3126
3362
|
],
|
|
3127
3363
|
"kind": "struct",
|
|
3128
|
-
"path": "aztec::protocol_types::
|
|
3364
|
+
"path": "aztec::protocol_types::block_header::BlockHeader"
|
|
3129
3365
|
}
|
|
3130
3366
|
},
|
|
3131
3367
|
{
|
|
@@ -3189,361 +3425,61 @@
|
|
|
3189
3425
|
"name": "l2_gas",
|
|
3190
3426
|
"type": {
|
|
3191
3427
|
"kind": "integer",
|
|
3192
|
-
"sign": "unsigned",
|
|
3193
|
-
"width": 32
|
|
3194
|
-
}
|
|
3195
|
-
}
|
|
3196
|
-
],
|
|
3197
|
-
"kind": "struct",
|
|
3198
|
-
"path": "aztec::protocol_types::abis::gas::Gas"
|
|
3199
|
-
}
|
|
3200
|
-
},
|
|
3201
|
-
{
|
|
3202
|
-
"name": "max_fees_per_gas",
|
|
3203
|
-
"type": {
|
|
3204
|
-
"fields": [
|
|
3205
|
-
{
|
|
3206
|
-
"name": "fee_per_da_gas",
|
|
3207
|
-
"type": {
|
|
3208
|
-
"kind": "field"
|
|
3209
|
-
}
|
|
3210
|
-
},
|
|
3211
|
-
{
|
|
3212
|
-
"name": "fee_per_l2_gas",
|
|
3213
|
-
"type": {
|
|
3214
|
-
"kind": "field"
|
|
3215
|
-
}
|
|
3216
|
-
}
|
|
3217
|
-
],
|
|
3218
|
-
"kind": "struct",
|
|
3219
|
-
"path": "aztec::protocol_types::abis::gas_fees::GasFees"
|
|
3220
|
-
}
|
|
3221
|
-
}
|
|
3222
|
-
],
|
|
3223
|
-
"kind": "struct",
|
|
3224
|
-
"path": "aztec::protocol_types::abis::gas_settings::GasSettings"
|
|
3225
|
-
}
|
|
3226
|
-
}
|
|
3227
|
-
],
|
|
3228
|
-
"kind": "struct",
|
|
3229
|
-
"path": "aztec::protocol_types::transaction::tx_context::TxContext"
|
|
3230
|
-
}
|
|
3231
|
-
}
|
|
3232
|
-
],
|
|
3233
|
-
"kind": "struct",
|
|
3234
|
-
"path": "aztec::protocol_types::abis::private_circuit_public_inputs::PrivateCircuitPublicInputs"
|
|
3235
|
-
},
|
|
3236
|
-
"visibility": "databus"
|
|
3237
|
-
}
|
|
3238
|
-
},
|
|
3239
|
-
"bytecode": "H4sIAAAAAAAA/+WdBZQTVxuGJ9ldYKEUhwIt1uKWbJLdLO7u7rCSBYpbXbbu7k6VurtSb6m7O1XqrvR/v5KU2SFwzt+d0P85/z3nOUkmk5nnu5mZTGbu/W7A2VSaBh0nK7jpeUBkJR9tUgvPtNSj+3lOmvlqpJlWM820Wmmm1UkzraHo45nWPM18LdJMa5lmWqs001qnmdZGVHMqlkDysU/yMRLKj0YTBXmJcCRcFMorLI7HQtFYcX48HA/H4rHSvHgkkohH4wWFxYU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8wZHi29445N+i1MLkFwURPAjgtxoEeC8SFYQsqWRZ6vchUuZeSZvXBpoCiN17Srhf9gE/f0mCEipJAo06ktRIVp2VV1X27eL3xrEh87rDWXHQ0z+ety0eiRJP5JkHkmyX04KEUY2f5DChTpkOsOzRA6JIXwvuqpY1mV0Na4emlUyOYT9xy6tpDbsunZVrg9dGRsy9SK6qkBqiFdMFKK9NGrUdv5ESpIPVUPlTw==",
|
|
3241
|
-
"brillig_names": [
|
|
3242
|
-
"pack_arguments_oracle_wrapper",
|
|
3243
|
-
"enqueue_public_function_call_internal"
|
|
3244
|
-
],
|
|
3245
|
-
"verification_key": "AAAAAAAAIAAAAAAAAAAADQAAAAAAAAAAAAAAAAAAAAUAvPb0jRI4Ytf1JK0hKPvJbnj47pCL1k+3yKQY2ytCRVM43W9hHtxwvUERUUnqVu4fNyhAKUrAUujouaaX5sG5pAAAAAAAAAAAABEBFZTuybWlsElnbZbOQ8EkgV0xeAa/ANNU4kVq6iUNKf4ip23Vi9gRQJJ+5H0RB6hvQ6d61c6Q1cFcgnFIpwgZgvOWyRqoLPg6bsz6I4vQPZGA8eC+y38md6HfmQygqCgurBsglewU56erpUkVhbY9c5R6JQVAjS6GGTUX9WNiFk1U5esbyu8y6hlOOUP36IE9a67EDxT277mGmxJU21Qr0WR6R8aNXK/TRaYyhXd9BfFkKdyY70L+WXB1V5SQzQFpGGVvyBFlaV3f5dO+a3iizNJ9TWO/3vo5OLgcmTZWCxN5x/t0ZKSBKN1kVKAfrK64xxjL70Wrxf7yqf1PPH0QQSQI3RQX3Q4rl7YoN2EHnPhU69fFRHpTNRKWW4R6jwxFPEoYLaYqmVzTD8RfIk4YdPKOaieicCqhe6NJTymkGUEcSZKV58YTRfnUiDJ+EvDMUNpmfZn3DaX8Q1rZ9iUZ2cDL95LZPEcTQxdlKnBXSck8AaSBXLkvWthPR+kAMhDe70ykHLHorwEk7Vt7LL1FQKEgBE0bOOUhXLons8aEJDdrAFeveIQkYoKrr09Bmwkt3S71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CbYCu+gECzj3lzbWXPsquQ3cJXZZm7JpHg5w6JW76kHL4R7/9pDlBWcOgYCY6p4/MUT4c29t4AV3/MZkbJrNFYkzUmznRj30TdARp8XnZE/pEcr8E/f8zwyU4qSduS1VyEEoKtbcD9tjFZn+cBqx3VIaFy2EAqTONL2deuDTj/BHl8Oph1kU4MCWGKXNOzTMith1jIH2k4gdh05wnabnToQavXflCxhvEyiJ3LOcIdHPYUyLXCBgHos7sn1zyXZPCMRmtGn+fy/ULQ1oiscNqnPe18/xglNgnyQ/WnFQuRmA645tKuK6yTjpYo0CT2n2jvI+5Wl8iwIU7qw7gx9DjsPlkprougN4PPF2Vs+ZorzhEdV+FaH4i7jlyNZbe89jxqEOK25+fpM8t7vqvhw+NvMiTDJHD3RB9KfRPGlDrwEHcg2BBrM/gVLfGXwxDGAIrOGTv0eGIOwzBXGvrL1t88kWQ2KOKQCDCZuOZvEf0aB31fEkpmTtoOVGcDxcwfdIC7pmHPZZvPB9BKR4uLVkmf7Lm1F7rGNAiwOjPePaO21AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAiZ62PHAWk/C1D7r8tf/5m+adLYqpdt987cMOA8jO+apD6YCJ+M15cwGN7ihgJj3QEwQrR25n3Kipwh6u7pbrb8Py7+dPPQCuqPu2l8Knkm1werJWyZMMC3IVObyLXMw3yg+39qJyUgFl/CzRC6XUt751Y/Ckgg2GUJh97Fj/vuvATgwXZNKpmayZy8htuiA1AuYunSoxl7i+D2PbC6ohGQYj8a+zx02yPQI5Rd6FkK2tUtzEwRFJMUf6M6rFylnBQ==",
|
|
3246
|
-
"artifact_hash": "74acc0382b362be946a173c5740463f2803bc3a9-41cc63ef7d8366c7073a9fa8d0d0fccd-mega-honk-true"
|
|
3247
|
-
},
|
|
3248
|
-
{
|
|
3249
|
-
"name": "_check_block_number",
|
|
3250
|
-
"is_unconstrained": true,
|
|
3251
|
-
"custom_attributes": [
|
|
3252
|
-
"public",
|
|
3253
|
-
"internal",
|
|
3254
|
-
"view"
|
|
3255
|
-
],
|
|
3256
|
-
"abi": {
|
|
3257
|
-
"error_types": {
|
|
3258
|
-
"10421965853029650238": {
|
|
3259
|
-
"error_kind": "string",
|
|
3260
|
-
"string": "Function _check_block_number can only be called statically"
|
|
3261
|
-
},
|
|
3262
|
-
"1433889167918961673": {
|
|
3263
|
-
"error_kind": "fmtstring",
|
|
3264
|
-
"item_types": [],
|
|
3265
|
-
"length": 17
|
|
3266
|
-
},
|
|
3267
|
-
"17843811134343075018": {
|
|
3268
|
-
"error_kind": "string",
|
|
3269
|
-
"string": "Stack too deep"
|
|
3270
|
-
},
|
|
3271
|
-
"2242946026394210301": {
|
|
3272
|
-
"error_kind": "string",
|
|
3273
|
-
"string": "Block number mismatch."
|
|
3274
|
-
},
|
|
3275
|
-
"8209322232883590150": {
|
|
3276
|
-
"error_kind": "string",
|
|
3277
|
-
"string": "Function _check_block_number can only be called internally"
|
|
3278
|
-
}
|
|
3279
|
-
},
|
|
3280
|
-
"parameters": [
|
|
3281
|
-
{
|
|
3282
|
-
"name": "operation",
|
|
3283
|
-
"type": {
|
|
3284
|
-
"kind": "integer",
|
|
3285
|
-
"sign": "unsigned",
|
|
3286
|
-
"width": 8
|
|
3287
|
-
},
|
|
3288
|
-
"visibility": "private"
|
|
3289
|
-
},
|
|
3290
|
-
{
|
|
3291
|
-
"name": "value",
|
|
3292
|
-
"type": {
|
|
3293
|
-
"kind": "field"
|
|
3294
|
-
},
|
|
3295
|
-
"visibility": "private"
|
|
3296
|
-
}
|
|
3297
|
-
],
|
|
3298
|
-
"return_type": null
|
|
3299
|
-
},
|
|
3300
|
-
"bytecode": "JgACBAEnAAABBIBFJgAABAMmAgMEAiYCBAQAHxgABAADgEMdAIBDgEMCLQiAQwABLQiARAACJAAAAE0nAgABBIBFJgICBAA6DQABAAIkAAADJR4CAAQBHgIABQAKOAQFBiMCAAYAAABuJAAAA04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
3302
|
-
"brillig_names": [
|
|
3303
|
-
"_check_block_number"
|
|
3304
|
-
]
|
|
3305
|
-
},
|
|
3306
|
-
{
|
|
3307
|
-
"name": "compute_note_hash_and_optionally_a_nullifier",
|
|
3308
|
-
"is_unconstrained": true,
|
|
3309
|
-
"custom_attributes": [],
|
|
3310
|
-
"abi": {
|
|
3311
|
-
"error_types": {
|
|
3312
|
-
"16541607464495309456": {
|
|
3313
|
-
"error_kind": "fmtstring",
|
|
3314
|
-
"item_types": [],
|
|
3315
|
-
"length": 16
|
|
3316
|
-
},
|
|
3317
|
-
"17843811134343075018": {
|
|
3318
|
-
"error_kind": "string",
|
|
3319
|
-
"string": "Stack too deep"
|
|
3320
|
-
}
|
|
3321
|
-
},
|
|
3322
|
-
"parameters": [
|
|
3323
|
-
{
|
|
3324
|
-
"name": "contract_address",
|
|
3325
|
-
"type": {
|
|
3326
|
-
"fields": [
|
|
3327
|
-
{
|
|
3328
|
-
"name": "inner",
|
|
3329
|
-
"type": {
|
|
3330
|
-
"kind": "field"
|
|
3331
|
-
}
|
|
3332
|
-
}
|
|
3333
|
-
],
|
|
3334
|
-
"kind": "struct",
|
|
3335
|
-
"path": "aztec::protocol_types::address::aztec_address::AztecAddress"
|
|
3336
|
-
},
|
|
3337
|
-
"visibility": "private"
|
|
3338
|
-
},
|
|
3339
|
-
{
|
|
3340
|
-
"name": "nonce",
|
|
3341
|
-
"type": {
|
|
3342
|
-
"kind": "field"
|
|
3343
|
-
},
|
|
3344
|
-
"visibility": "private"
|
|
3345
|
-
},
|
|
3346
|
-
{
|
|
3347
|
-
"name": "storage_slot",
|
|
3348
|
-
"type": {
|
|
3349
|
-
"kind": "field"
|
|
3350
|
-
},
|
|
3351
|
-
"visibility": "private"
|
|
3352
|
-
},
|
|
3353
|
-
{
|
|
3354
|
-
"name": "note_type_id",
|
|
3355
|
-
"type": {
|
|
3356
|
-
"kind": "field"
|
|
3357
|
-
},
|
|
3358
|
-
"visibility": "private"
|
|
3359
|
-
},
|
|
3360
|
-
{
|
|
3361
|
-
"name": "compute_nullifier",
|
|
3362
|
-
"type": {
|
|
3363
|
-
"kind": "boolean"
|
|
3364
|
-
},
|
|
3365
|
-
"visibility": "private"
|
|
3366
|
-
},
|
|
3367
|
-
{
|
|
3368
|
-
"name": "serialized_note",
|
|
3369
|
-
"type": {
|
|
3370
|
-
"kind": "array",
|
|
3371
|
-
"length": 0,
|
|
3372
|
-
"type": {
|
|
3373
|
-
"kind": "field"
|
|
3428
|
+
"sign": "unsigned",
|
|
3429
|
+
"width": 32
|
|
3430
|
+
}
|
|
3431
|
+
}
|
|
3432
|
+
],
|
|
3433
|
+
"kind": "struct",
|
|
3434
|
+
"path": "aztec::protocol_types::abis::gas::Gas"
|
|
3435
|
+
}
|
|
3436
|
+
},
|
|
3437
|
+
{
|
|
3438
|
+
"name": "max_fees_per_gas",
|
|
3439
|
+
"type": {
|
|
3440
|
+
"fields": [
|
|
3441
|
+
{
|
|
3442
|
+
"name": "fee_per_da_gas",
|
|
3443
|
+
"type": {
|
|
3444
|
+
"kind": "field"
|
|
3445
|
+
}
|
|
3446
|
+
},
|
|
3447
|
+
{
|
|
3448
|
+
"name": "fee_per_l2_gas",
|
|
3449
|
+
"type": {
|
|
3450
|
+
"kind": "field"
|
|
3451
|
+
}
|
|
3452
|
+
}
|
|
3453
|
+
],
|
|
3454
|
+
"kind": "struct",
|
|
3455
|
+
"path": "aztec::protocol_types::abis::gas_fees::GasFees"
|
|
3456
|
+
}
|
|
3457
|
+
}
|
|
3458
|
+
],
|
|
3459
|
+
"kind": "struct",
|
|
3460
|
+
"path": "aztec::protocol_types::abis::gas_settings::GasSettings"
|
|
3461
|
+
}
|
|
3462
|
+
}
|
|
3463
|
+
],
|
|
3464
|
+
"kind": "struct",
|
|
3465
|
+
"path": "aztec::protocol_types::transaction::tx_context::TxContext"
|
|
3466
|
+
}
|
|
3374
3467
|
}
|
|
3375
|
-
|
|
3376
|
-
"
|
|
3377
|
-
|
|
3378
|
-
],
|
|
3379
|
-
"return_type": {
|
|
3380
|
-
"abi_type": {
|
|
3381
|
-
"kind": "array",
|
|
3382
|
-
"length": 4,
|
|
3383
|
-
"type": {
|
|
3384
|
-
"kind": "field"
|
|
3385
|
-
}
|
|
3468
|
+
],
|
|
3469
|
+
"kind": "struct",
|
|
3470
|
+
"path": "aztec::protocol_types::abis::private_circuit_public_inputs::PrivateCircuitPublicInputs"
|
|
3386
3471
|
},
|
|
3387
|
-
"visibility": "
|
|
3472
|
+
"visibility": "databus"
|
|
3388
3473
|
}
|
|
3389
3474
|
},
|
|
3390
|
-
"bytecode": "H4sIAAAAAAAA/
|
|
3391
|
-
"debug_symbols": "
|
|
3392
|
-
"brillig_names": [
|
|
3393
|
-
"compute_note_hash_and_optionally_a_nullifier"
|
|
3394
|
-
]
|
|
3395
|
-
},
|
|
3396
|
-
{
|
|
3397
|
-
"name": "sync_notes",
|
|
3398
|
-
"is_unconstrained": true,
|
|
3399
|
-
"custom_attributes": [],
|
|
3400
|
-
"abi": {
|
|
3401
|
-
"error_types": {
|
|
3402
|
-
"17843811134343075018": {
|
|
3403
|
-
"error_kind": "string",
|
|
3404
|
-
"string": "Stack too deep"
|
|
3405
|
-
}
|
|
3406
|
-
},
|
|
3407
|
-
"parameters": [],
|
|
3408
|
-
"return_type": null
|
|
3409
|
-
},
|
|
3410
|
-
"bytecode": "H4sIAAAAAAAA/9VUyw6CMBBseURBOaiJ3kz8gyIYOJJ49x8akKMe8OKNT5eabbqpVRKlJkzSbEs3szNlW0oUKESPvAH9tGnIFdhBDCA6aN/tRgFr9hviQKs7JH/O0iQw+BtQ/5OfWtIvIPktnT+bAM+xVfzYi6w77UaIesKWZ/nPbHpe9fhc/MFnh32k1caghm+uIYci3RuYR4Y8iRlRd9prh/eV5YzJei7w++RVO67va/lrWIeafvmOFV/qrDMe1wmv+YFXVVrypcYv4KBzGnMvbGHe1wvY45yo3mjul/J0vZ0b0gNB8gCVxsvQjgYAAA==",
|
|
3411
|
-
"debug_symbols": "ndLNCoMwDAfwd8nZw9qu9eNVZEjVKoVSpdbBEN99Udxww0t7CUnpL7n8F2hVPfeVtt0wQVEuYIZGej1YnJY1gdppY3RfnZ/hthVC9v/TKO02Tl46DwXjLAFlW+wEQd9po7Cn9/WRAKHhhIWTezjhwYReXsk5zQ6Tc86/iFCyIx6DRAxKY1AWgdhlDnJB0g8STPyiFcendFrWRh0562bbnGLnX6P6S+Dohka1s1NbFk8xxFriLUpxLa5+Aw==",
|
|
3412
|
-
"brillig_names": [
|
|
3413
|
-
"sync_notes"
|
|
3414
|
-
]
|
|
3415
|
-
},
|
|
3416
|
-
{
|
|
3417
|
-
"name": "_check_timestamp",
|
|
3418
|
-
"is_unconstrained": true,
|
|
3419
|
-
"custom_attributes": [
|
|
3420
|
-
"public",
|
|
3421
|
-
"internal",
|
|
3422
|
-
"view"
|
|
3423
|
-
],
|
|
3424
|
-
"abi": {
|
|
3425
|
-
"error_types": {
|
|
3426
|
-
"11405868724477732285": {
|
|
3427
|
-
"error_kind": "string",
|
|
3428
|
-
"string": "Function _check_timestamp can only be called internally"
|
|
3429
|
-
},
|
|
3430
|
-
"13418685691864489983": {
|
|
3431
|
-
"error_kind": "string",
|
|
3432
|
-
"string": "Function _check_timestamp can only be called statically"
|
|
3433
|
-
},
|
|
3434
|
-
"1433889167918961673": {
|
|
3435
|
-
"error_kind": "fmtstring",
|
|
3436
|
-
"item_types": [],
|
|
3437
|
-
"length": 17
|
|
3438
|
-
},
|
|
3439
|
-
"17843811134343075018": {
|
|
3440
|
-
"error_kind": "string",
|
|
3441
|
-
"string": "Stack too deep"
|
|
3442
|
-
},
|
|
3443
|
-
"8443716675528357851": {
|
|
3444
|
-
"error_kind": "string",
|
|
3445
|
-
"string": "Timestamp mismatch."
|
|
3446
|
-
}
|
|
3447
|
-
},
|
|
3448
|
-
"parameters": [
|
|
3449
|
-
{
|
|
3450
|
-
"name": "operation",
|
|
3451
|
-
"type": {
|
|
3452
|
-
"kind": "integer",
|
|
3453
|
-
"sign": "unsigned",
|
|
3454
|
-
"width": 8
|
|
3455
|
-
},
|
|
3456
|
-
"visibility": "private"
|
|
3457
|
-
},
|
|
3458
|
-
{
|
|
3459
|
-
"name": "value",
|
|
3460
|
-
"type": {
|
|
3461
|
-
"kind": "integer",
|
|
3462
|
-
"sign": "unsigned",
|
|
3463
|
-
"width": 64
|
|
3464
|
-
},
|
|
3465
|
-
"visibility": "private"
|
|
3466
|
-
}
|
|
3467
|
-
],
|
|
3468
|
-
"return_type": null
|
|
3469
|
-
},
|
|
3470
|
-
"bytecode": "JgACBAEnAAABBIBFJgAABAMmAgMEAiYCBAQAHxgABAADgEMdAIBDgEMCHQCARIBEBS0IgEMAAS0IgEQAAiQAAABUJwIAAQSARSYCAgQAOg0AAQACJAAAAzYeAgAEAR4CAAUACjgEBQYjAgAGAAAAdSQAAANfHgIABAomAgUAAQo4BAUGIwIABgAAAJEkAAADcR4CAAQHHAwEBQAcDAIEAAo4BQQCDDgFBAYmAgQCAQo4AQQFJgIEAQEjAgAFAAADHyIAAADGJgIHAgIKOAEHCCMCAAgAAAMJIgAAAN0mAggCAwo4AQgJIwIACQAAAvciAAAA9CYCCQIECjgBCQojAgAKAAAC4CIAAAELJgIKAgUKOAEKCyMCAAsAAALBIgAAASImAgoCBgo4AQoLIwIACwAAAqsiAAABOSYCAQJlJgIGAiAmAgoCbCYCCwJuJgIMAnQmAg0CcCYCDgJkJgIPAkkmAhACYSYCEQJyJgISAm8mAhMCaSYCFAJ2LAgBFSYCFgQSABABFgEmAxUEAQAoFQIWLAwWFywODxcAKBcCFywOCxcAKBcCFywOFBcAKBcCFywOEBcAKBcCFywOChcAKBcCFywOExcAKBcCFywODhcAKBcCFywOBhcAKBcCFywOEhcAKBcCFywODRcAKBcCFywOARcAKBcCFywOERcAKBcCFywOEBcAKBcCFywODBcAKBcCFywOExcAKBcCFywOEhcAKBcCFywOCxcmAgEEACYCBgEACjgGBAojAgAKAAACoiYCCwQTLAgBDCYCDQQTABABDQEs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7KskjVKoXSSq0Li/jum7hNo25A1j2A4E3pJN9kfv6Zpgexqhb7zbxu191OzF4OoumW5VB3rY8OAvVpbbct2xDuhrIfxAyNg0JU7cq/WoBjIdZ1U4mZ1PJYfKGJJY80sUk0Wp2hpUY30lI7ukGzs3qk2bFLShAzNFqWUTdDOptMDgYyEYZQPMGvhUDzNCZvjH0akzeGf26MAh3FK3A40eazgvvrCgS5CpYoOgrqxvkIIPVkEpw117gMrjlqN5gMZTqJwV8QYydvAM8qZMWgQ2Uj7tCoc3cyU0ySVRxjUiivzaQH1y//Xb81E+6cupxOHyz6umnqzfziFwbhobJeoy8az0Piq/lS8o4cdUeOviPHfDfHBxjQ/Cfs780x0ep0J7L1eT56K/u6XDRV8DNs7ttltNeHw/s27sQGbPtuWa32fRVakboQDJVQKAiXVdChuNByknZaIlkQ+6q+8gc=",
|
|
3472
3477
|
"brillig_names": [
|
|
3473
|
-
"
|
|
3474
|
-
|
|
3475
|
-
},
|
|
3476
|
-
{
|
|
3477
|
-
"name": "public_dispatch",
|
|
3478
|
-
"is_unconstrained": true,
|
|
3479
|
-
"custom_attributes": [
|
|
3480
|
-
"public"
|
|
3478
|
+
"pack_arguments_oracle_wrapper",
|
|
3479
|
+
"enqueue_public_function_call_internal"
|
|
3481
3480
|
],
|
|
3482
|
-
"
|
|
3483
|
-
|
|
3484
|
-
"10421965853029650238": {
|
|
3485
|
-
"error_kind": "string",
|
|
3486
|
-
"string": "Function _check_block_number can only be called statically"
|
|
3487
|
-
},
|
|
3488
|
-
"11405868724477732285": {
|
|
3489
|
-
"error_kind": "string",
|
|
3490
|
-
"string": "Function _check_timestamp can only be called internally"
|
|
3491
|
-
},
|
|
3492
|
-
"13418685691864489983": {
|
|
3493
|
-
"error_kind": "string",
|
|
3494
|
-
"string": "Function _check_timestamp can only be called statically"
|
|
3495
|
-
},
|
|
3496
|
-
"1433889167918961673": {
|
|
3497
|
-
"error_kind": "fmtstring",
|
|
3498
|
-
"item_types": [],
|
|
3499
|
-
"length": 17
|
|
3500
|
-
},
|
|
3501
|
-
"16541607464495309456": {
|
|
3502
|
-
"error_kind": "fmtstring",
|
|
3503
|
-
"item_types": [],
|
|
3504
|
-
"length": 16
|
|
3505
|
-
},
|
|
3506
|
-
"16761564377371454734": {
|
|
3507
|
-
"error_kind": "string",
|
|
3508
|
-
"string": "Array index out of bounds"
|
|
3509
|
-
},
|
|
3510
|
-
"17843811134343075018": {
|
|
3511
|
-
"error_kind": "string",
|
|
3512
|
-
"string": "Stack too deep"
|
|
3513
|
-
},
|
|
3514
|
-
"2242946026394210301": {
|
|
3515
|
-
"error_kind": "string",
|
|
3516
|
-
"string": "Block number mismatch."
|
|
3517
|
-
},
|
|
3518
|
-
"5019202896831570965": {
|
|
3519
|
-
"error_kind": "string",
|
|
3520
|
-
"string": "attempt to add with overflow"
|
|
3521
|
-
},
|
|
3522
|
-
"8209322232883590150": {
|
|
3523
|
-
"error_kind": "string",
|
|
3524
|
-
"string": "Function _check_block_number can only be called internally"
|
|
3525
|
-
},
|
|
3526
|
-
"8443716675528357851": {
|
|
3527
|
-
"error_kind": "string",
|
|
3528
|
-
"string": "Timestamp mismatch."
|
|
3529
|
-
}
|
|
3530
|
-
},
|
|
3531
|
-
"parameters": [
|
|
3532
|
-
{
|
|
3533
|
-
"name": "selector",
|
|
3534
|
-
"type": {
|
|
3535
|
-
"kind": "field"
|
|
3536
|
-
},
|
|
3537
|
-
"visibility": "private"
|
|
3538
|
-
}
|
|
3539
|
-
],
|
|
3540
|
-
"return_type": null
|
|
3541
|
-
},
|
|
3542
|
-
"bytecode": "JgACBAEnAAABBIBEJgAABAMmAgIEASYCAwQAHxgAAwACgEMtCIBDAAEkAAAAQCcCAAEEgEQmAgIEADoNAAEAAiQAAATDKAIAAgBYryrgCjgBAgMmAgIABCYCBAQCJgIFAQEmAgYEASYCBwABJgIIBAAjAgADAAAAfiIAAAHvLAgBAyYCCQQDABABCQEmAwMEAQAoAwIJHzwABgAEAAksDQMJACgJAgksDgkD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S+SBCriVW4xz3LMOZDGt+dwweYuJQTOmG8hMk/5OTA4/+YoThdERaDrEaY+C3AHIgwsAvTsLBxfrakFa4w3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAijZgVPiaqE5xfmVoS1rgoNE5801i7AI+iWU9C4gWKTaCru9sEL+XedxRom0sZjL672Za6gt1ILAzZ+T26XJSPEPy7+dPPQCuqPu2l8Knkm1werJWyZMMC3IVObyLXMw3yg+39qJyUgFl/CzRC6XUt751Y/Ckgg2GUJh97Fj/vuvJ8qczwFCmSOmHYcsfCJMQmRoHJE2ov3nE3M173Fv7N4ZKxptOxTf5amtY5UdLXZt9e5ME1hEP1oUCGtRluE+Rg==",
|
|
3482
|
+
"artifact_hash": "ff6671ddb572df3d961df43ed4c3adf75a7d3763-fad3e9d196065cb9425cd182d29ccab4-client-ivc-true"
|
|
3547
3483
|
}
|
|
3548
3484
|
],
|
|
3549
3485
|
"outputs": {
|
|
@@ -3567,19 +3503,17 @@
|
|
|
3567
3503
|
{
|
|
3568
3504
|
"name": "value",
|
|
3569
3505
|
"type": {
|
|
3570
|
-
"kind": "
|
|
3571
|
-
"sign": "unsigned",
|
|
3572
|
-
"width": 64
|
|
3506
|
+
"kind": "field"
|
|
3573
3507
|
}
|
|
3574
3508
|
}
|
|
3575
3509
|
],
|
|
3576
3510
|
"kind": "struct",
|
|
3577
|
-
"path": "Router::
|
|
3511
|
+
"path": "Router::check_block_number_parameters"
|
|
3578
3512
|
}
|
|
3579
3513
|
}
|
|
3580
3514
|
],
|
|
3581
3515
|
"kind": "struct",
|
|
3582
|
-
"path": "Router::
|
|
3516
|
+
"path": "Router::check_block_number_abi"
|
|
3583
3517
|
},
|
|
3584
3518
|
{
|
|
3585
3519
|
"fields": [
|
|
@@ -3598,17 +3532,19 @@
|
|
|
3598
3532
|
{
|
|
3599
3533
|
"name": "value",
|
|
3600
3534
|
"type": {
|
|
3601
|
-
"kind": "
|
|
3535
|
+
"kind": "integer",
|
|
3536
|
+
"sign": "unsigned",
|
|
3537
|
+
"width": 64
|
|
3602
3538
|
}
|
|
3603
3539
|
}
|
|
3604
3540
|
],
|
|
3605
3541
|
"kind": "struct",
|
|
3606
|
-
"path": "Router::
|
|
3542
|
+
"path": "Router::_check_timestamp_parameters"
|
|
3607
3543
|
}
|
|
3608
3544
|
}
|
|
3609
3545
|
],
|
|
3610
3546
|
"kind": "struct",
|
|
3611
|
-
"path": "Router::
|
|
3547
|
+
"path": "Router::_check_timestamp_abi"
|
|
3612
3548
|
},
|
|
3613
3549
|
{
|
|
3614
3550
|
"fields": [
|
|
@@ -3627,17 +3563,19 @@
|
|
|
3627
3563
|
{
|
|
3628
3564
|
"name": "value",
|
|
3629
3565
|
"type": {
|
|
3630
|
-
"kind": "
|
|
3566
|
+
"kind": "integer",
|
|
3567
|
+
"sign": "unsigned",
|
|
3568
|
+
"width": 64
|
|
3631
3569
|
}
|
|
3632
3570
|
}
|
|
3633
3571
|
],
|
|
3634
3572
|
"kind": "struct",
|
|
3635
|
-
"path": "Router::
|
|
3573
|
+
"path": "Router::check_timestamp_parameters"
|
|
3636
3574
|
}
|
|
3637
3575
|
}
|
|
3638
3576
|
],
|
|
3639
3577
|
"kind": "struct",
|
|
3640
|
-
"path": "Router::
|
|
3578
|
+
"path": "Router::check_timestamp_abi"
|
|
3641
3579
|
},
|
|
3642
3580
|
{
|
|
3643
3581
|
"fields": [
|
|
@@ -3656,19 +3594,17 @@
|
|
|
3656
3594
|
{
|
|
3657
3595
|
"name": "value",
|
|
3658
3596
|
"type": {
|
|
3659
|
-
"kind": "
|
|
3660
|
-
"sign": "unsigned",
|
|
3661
|
-
"width": 64
|
|
3597
|
+
"kind": "field"
|
|
3662
3598
|
}
|
|
3663
3599
|
}
|
|
3664
3600
|
],
|
|
3665
3601
|
"kind": "struct",
|
|
3666
|
-
"path": "Router::
|
|
3602
|
+
"path": "Router::_check_block_number_parameters"
|
|
3667
3603
|
}
|
|
3668
3604
|
}
|
|
3669
3605
|
],
|
|
3670
3606
|
"kind": "struct",
|
|
3671
|
-
"path": "Router::
|
|
3607
|
+
"path": "Router::_check_block_number_abi"
|
|
3672
3608
|
}
|
|
3673
3609
|
]
|
|
3674
3610
|
}
|
|
@@ -3684,57 +3620,57 @@
|
|
|
3684
3620
|
},
|
|
3685
3621
|
"26": {
|
|
3686
3622
|
"path": "std/hash/poseidon2.nr",
|
|
3687
|
-
"source": "use crate::default::Default;\nuse crate::hash::Hasher;\n\ncomptime global RATE: u32 = 3;\n\npub struct Poseidon2 {\n cache: [Field; 3],\n state: [Field; 4],\n cache_size: u32,\n squeeze_mode: bool, // 0 => absorb, 1 => squeeze\n}\n\nimpl Poseidon2 {\n #[no_predicates]\n pub fn hash<let N: u32>(input: [Field; N], message_size: u32) -> Field {\n
|
|
3623
|
+
"source": "use crate::default::Default;\nuse crate::hash::Hasher;\n\ncomptime global RATE: u32 = 3;\n\npub struct Poseidon2 {\n cache: [Field; 3],\n state: [Field; 4],\n cache_size: u32,\n squeeze_mode: bool, // 0 => absorb, 1 => squeeze\n}\n\nimpl Poseidon2 {\n #[no_predicates]\n pub fn hash<let N: u32>(input: [Field; N], message_size: u32) -> Field {\n Poseidon2::hash_internal(input, message_size, message_size != N)\n }\n\n pub(crate) fn new(iv: Field) -> Poseidon2 {\n let mut result =\n Poseidon2 { cache: [0; 3], state: [0; 4], cache_size: 0, squeeze_mode: false };\n result.state[RATE] = iv;\n result\n }\n\n fn perform_duplex(&mut self) {\n // add the cache into sponge state\n for i in 0..RATE {\n // We effectively zero-pad the cache by only adding to the state\n // cache that is less than the specified `cache_size`\n if i < self.cache_size {\n self.state[i] += self.cache[i];\n }\n }\n self.state = crate::hash::poseidon2_permutation(self.state, 4);\n }\n\n fn absorb(&mut self, input: Field) {\n assert(!self.squeeze_mode);\n if self.cache_size == RATE {\n // If we're absorbing, and the cache is full, apply the sponge permutation to compress the cache\n self.perform_duplex();\n self.cache[0] = input;\n self.cache_size = 1;\n } else {\n // If we're absorbing, and the cache is not full, add the input into the cache\n self.cache[self.cache_size] = input;\n self.cache_size += 1;\n }\n }\n\n fn squeeze(&mut self) -> Field {\n assert(!self.squeeze_mode);\n // If we're in absorb mode, apply sponge permutation to compress the cache.\n self.perform_duplex();\n self.squeeze_mode = true;\n\n // Pop one item off the top of the permutation and return it.\n self.state[0]\n }\n\n fn hash_internal<let N: u32>(\n input: [Field; N],\n in_len: u32,\n is_variable_length: bool,\n ) -> Field {\n let two_pow_64 = 18446744073709551616;\n let iv: Field = (in_len as Field) * two_pow_64;\n let mut sponge = Poseidon2::new(iv);\n for i in 0..input.len() {\n if i < in_len {\n sponge.absorb(input[i]);\n }\n }\n\n // In the case where the hash preimage is variable-length, we append `1` to the end of the input, to distinguish\n // from fixed-length hashes. (the combination of this additional field element + the hash IV ensures\n // fixed-length and variable-length hashes do not collide)\n if is_variable_length {\n sponge.absorb(1);\n }\n sponge.squeeze()\n }\n}\n\npub struct Poseidon2Hasher {\n _state: [Field],\n}\n\nimpl Hasher for Poseidon2Hasher {\n fn finish(self) -> Field {\n let iv: Field = (self._state.len() as Field) * 18446744073709551616; // iv = (self._state.len() << 64)\n let mut sponge = Poseidon2::new(iv);\n for i in 0..self._state.len() {\n sponge.absorb(self._state[i]);\n }\n sponge.squeeze()\n }\n\n fn write(&mut self, input: Field) {\n self._state = self._state.push_back(input);\n }\n}\n\nimpl Default for Poseidon2Hasher {\n fn default() -> Self {\n Poseidon2Hasher { _state: &[] }\n }\n}\n"
|
|
3688
3624
|
},
|
|
3689
|
-
"
|
|
3625
|
+
"52": {
|
|
3690
3626
|
"path": "std/panic.nr",
|
|
3691
3627
|
"source": "pub fn panic<T, U, let N: u32>(message: fmtstr<N, T>) -> U {\n assert(false, message);\n crate::mem::zeroed()\n}\n"
|
|
3692
3628
|
},
|
|
3693
|
-
"
|
|
3694
|
-
"path": "/usr/src/noir-projects/aztec-nr/aztec/src/context/private_context.nr",
|
|
3695
|
-
"source": "use crate::{\n context::{inputs::PrivateContextInputs, packed_returns::PackedReturns},\n hash::{ArgsHasher, hash_args_array},\n keys::constants::{NULLIFIER_INDEX, NUM_KEY_TYPES, OUTGOING_INDEX, sk_generators},\n messaging::process_l1_to_l2_message,\n oracle::{\n arguments,\n call_private_function::call_private_function_internal,\n enqueue_public_function_call::{\n enqueue_public_function_call_internal, notify_set_min_revertible_side_effect_counter,\n set_public_teardown_function_call_internal,\n },\n header::get_header_at,\n key_validation_request::get_key_validation_request,\n logs::{emit_encrypted_event_log, emit_encrypted_note_log},\n returns::pack_returns,\n },\n};\nuse dep::protocol_types::{\n abis::{\n call_context::CallContext,\n function_selector::FunctionSelector,\n log_hash::{EncryptedLogHash, LogHash, NoteLogHash},\n max_block_number::MaxBlockNumber,\n note_hash::NoteHash,\n nullifier::Nullifier,\n private_call_request::PrivateCallRequest,\n private_circuit_public_inputs::PrivateCircuitPublicInputs,\n public_call_request::PublicCallRequest,\n read_request::ReadRequest,\n side_effect::Counted,\n validation_requests::{KeyValidationRequest, KeyValidationRequestAndGenerator},\n },\n address::{AztecAddress, EthAddress},\n constants::{\n MAX_CONTRACT_CLASS_LOGS_PER_CALL, MAX_ENCRYPTED_LOGS_PER_CALL, MAX_ENQUEUED_CALLS_PER_CALL,\n MAX_KEY_VALIDATION_REQUESTS_PER_CALL, MAX_L2_TO_L1_MSGS_PER_CALL,\n MAX_NOTE_ENCRYPTED_LOGS_PER_CALL, MAX_NOTE_HASH_READ_REQUESTS_PER_CALL,\n MAX_NOTE_HASHES_PER_CALL, MAX_NULLIFIER_READ_REQUESTS_PER_CALL, MAX_NULLIFIERS_PER_CALL,\n MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL, PUBLIC_DISPATCH_SELECTOR,\n },\n header::Header,\n messaging::l2_to_l1_message::L2ToL1Message,\n traits::Empty,\n};\n\n// When finished, one can call .finish() to convert back to the abi\npub struct PrivateContext {\n // docs:start:private-context\n pub inputs: PrivateContextInputs,\n pub side_effect_counter: u32,\n\n pub min_revertible_side_effect_counter: u32,\n pub is_fee_payer: bool,\n\n pub args_hash: Field,\n pub return_hash: Field,\n\n pub max_block_number: MaxBlockNumber,\n\n pub note_hash_read_requests: BoundedVec<ReadRequest, MAX_NOTE_HASH_READ_REQUESTS_PER_CALL>,\n pub nullifier_read_requests: BoundedVec<ReadRequest, MAX_NULLIFIER_READ_REQUESTS_PER_CALL>,\n key_validation_requests_and_generators: BoundedVec<KeyValidationRequestAndGenerator, MAX_KEY_VALIDATION_REQUESTS_PER_CALL>,\n\n pub note_hashes: BoundedVec<NoteHash, MAX_NOTE_HASHES_PER_CALL>,\n pub nullifiers: BoundedVec<Nullifier, MAX_NULLIFIERS_PER_CALL>,\n\n pub private_call_requests: BoundedVec<PrivateCallRequest, MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL>,\n pub public_call_requests: BoundedVec<Counted<PublicCallRequest>, MAX_ENQUEUED_CALLS_PER_CALL>,\n pub public_teardown_call_request: PublicCallRequest,\n pub l2_to_l1_msgs: BoundedVec<L2ToL1Message, MAX_L2_TO_L1_MSGS_PER_CALL>,\n // docs:end:private-context\n\n // Header of a block whose state is used during private execution (not the block the transaction is included in).\n pub historical_header: Header,\n\n pub note_encrypted_logs_hashes: BoundedVec<NoteLogHash, MAX_NOTE_ENCRYPTED_LOGS_PER_CALL>,\n pub encrypted_logs_hashes: BoundedVec<EncryptedLogHash, MAX_ENCRYPTED_LOGS_PER_CALL>,\n pub contract_class_logs_hashes: BoundedVec<LogHash, MAX_CONTRACT_CLASS_LOGS_PER_CALL>,\n\n // Contains the last key validation request for each key type. This is used to cache the last request and avoid\n // fetching the same request multiple times.\n // The index of the array corresponds to the key type (0 nullifier, 1 incoming, 2 outgoing, 3 tagging).\n pub last_key_validation_requests: [Option<KeyValidationRequest>; NUM_KEY_TYPES],\n}\n\nimpl PrivateContext {\n pub fn new(inputs: PrivateContextInputs, args_hash: Field) -> PrivateContext {\n PrivateContext {\n inputs,\n side_effect_counter: inputs.start_side_effect_counter + 1,\n min_revertible_side_effect_counter: 0,\n is_fee_payer: false,\n args_hash,\n return_hash: 0,\n max_block_number: MaxBlockNumber::empty(),\n note_hash_read_requests: BoundedVec::new(),\n nullifier_read_requests: BoundedVec::new(),\n key_validation_requests_and_generators: BoundedVec::new(),\n note_hashes: BoundedVec::new(),\n nullifiers: BoundedVec::new(),\n historical_header: inputs.historical_header,\n private_call_requests: BoundedVec::new(),\n public_call_requests: BoundedVec::new(),\n public_teardown_call_request: PublicCallRequest::empty(),\n l2_to_l1_msgs: BoundedVec::new(),\n note_encrypted_logs_hashes: BoundedVec::new(),\n encrypted_logs_hashes: BoundedVec::new(),\n contract_class_logs_hashes: BoundedVec::new(),\n last_key_validation_requests: [Option::none(); NUM_KEY_TYPES],\n }\n }\n\n pub fn msg_sender(self) -> AztecAddress {\n self.inputs.call_context.msg_sender\n }\n\n pub fn this_address(self) -> AztecAddress {\n self.inputs.call_context.contract_address\n }\n\n pub fn chain_id(self) -> Field {\n self.inputs.tx_context.chain_id\n }\n\n pub fn version(self) -> Field {\n self.inputs.tx_context.version\n }\n\n pub fn selector(self) -> FunctionSelector {\n self.inputs.call_context.function_selector\n }\n\n pub fn get_args_hash(self) -> Field {\n self.args_hash\n }\n\n pub fn push_note_hash(&mut self, note_hash: Field) {\n self.note_hashes.push(NoteHash { value: note_hash, counter: self.next_counter() });\n }\n\n pub fn push_nullifier(&mut self, nullifier: Field) {\n self.nullifiers.push(\n Nullifier { value: nullifier, note_hash: 0, counter: self.next_counter() },\n );\n }\n\n pub fn push_nullifier_for_note_hash(&mut self, nullifier: Field, nullified_note_hash: Field) {\n self.nullifiers.push(\n Nullifier {\n value: nullifier,\n note_hash: nullified_note_hash,\n counter: self.next_counter(),\n },\n );\n }\n\n // Returns the header of a block whose state is used during private execution (not the block the transaction is\n // included in).\n pub fn get_header(self) -> Header {\n self.historical_header\n }\n\n // Returns the header of an arbitrary block whose block number is less than or equal to the block number\n // of historical header.\n pub fn get_header_at(self, block_number: u32) -> Header {\n get_header_at(block_number, self)\n }\n\n pub fn set_return_hash(&mut self, returns_hasher: ArgsHasher) {\n pack_returns(returns_hasher.fields);\n self.return_hash = returns_hasher.hash();\n }\n\n pub fn finish(self) -> PrivateCircuitPublicInputs {\n PrivateCircuitPublicInputs {\n call_context: self.inputs.call_context,\n args_hash: self.args_hash,\n returns_hash: self.return_hash,\n min_revertible_side_effect_counter: self.min_revertible_side_effect_counter,\n is_fee_payer: self.is_fee_payer,\n max_block_number: self.max_block_number,\n note_hash_read_requests: self.note_hash_read_requests.storage(),\n nullifier_read_requests: self.nullifier_read_requests.storage(),\n key_validation_requests_and_generators: self\n .key_validation_requests_and_generators\n .storage(),\n note_hashes: self.note_hashes.storage(),\n nullifiers: self.nullifiers.storage(),\n private_call_requests: self.private_call_requests.storage(),\n public_call_requests: self.public_call_requests.storage(),\n public_teardown_call_request: self.public_teardown_call_request,\n l2_to_l1_msgs: self.l2_to_l1_msgs.storage(),\n start_side_effect_counter: self.inputs.start_side_effect_counter,\n end_side_effect_counter: self.side_effect_counter,\n note_encrypted_logs_hashes: self.note_encrypted_logs_hashes.storage(),\n encrypted_logs_hashes: self.encrypted_logs_hashes.storage(),\n contract_class_logs_hashes: self.contract_class_logs_hashes.storage(),\n historical_header: self.historical_header,\n tx_context: self.inputs.tx_context,\n }\n }\n\n pub fn set_as_fee_payer(&mut self) {\n dep::protocol_types::debug_log::debug_log_format(\n \"Setting {0} as fee payer\",\n [self.this_address().to_field()],\n );\n self.is_fee_payer = true;\n }\n\n pub fn end_setup(&mut self) {\n // dep::protocol_types::debug_log::debug_log_format(\n // \"Ending setup at counter {0}\",\n // [self.side_effect_counter as Field]\n // );\n self.min_revertible_side_effect_counter = self.side_effect_counter;\n notify_set_min_revertible_side_effect_counter(self.min_revertible_side_effect_counter);\n }\n\n // docs:start:max-block-number\n pub fn set_tx_max_block_number(&mut self, max_block_number: u32) {\n // docs:end:max-block-number\n self.max_block_number =\n MaxBlockNumber::min_with_u32(self.max_block_number, max_block_number);\n }\n\n pub fn push_note_hash_read_request(&mut self, note_hash: Field) {\n let side_effect = ReadRequest { value: note_hash, counter: self.next_counter() };\n self.note_hash_read_requests.push(side_effect);\n }\n\n pub fn push_nullifier_read_request(&mut self, nullifier: Field) {\n let request = ReadRequest { value: nullifier, counter: self.next_counter() };\n self.nullifier_read_requests.push(request);\n }\n\n pub fn request_nsk_app(&mut self, npk_m_hash: Field) -> Field {\n self.request_sk_app(npk_m_hash, NULLIFIER_INDEX)\n }\n\n pub fn request_ovsk_app(&mut self, ovpk_m_hash: Field) -> Field {\n self.request_sk_app(ovpk_m_hash, OUTGOING_INDEX)\n }\n\n fn request_sk_app(&mut self, pk_m_hash: Field, key_index: Field) -> Field {\n let cached_request =\n self.last_key_validation_requests[key_index].unwrap_or(KeyValidationRequest::empty());\n\n if cached_request.pk_m.hash() == pk_m_hash {\n // We get a match so the cached request is the latest one\n cached_request.sk_app\n } else {\n // We didn't get a match meaning the cached result is stale\n // Typically we'd validate keys by showing that they are the preimage of `pk_m_hash`, but that'd require\n // the oracle returning the master secret keys, which could cause malicious contracts to leak it or learn\n // about secrets from other contracts. We therefore silo secret keys, and rely on the private kernel to\n // validate that we siloed secret key corresponds to correct siloing of the master secret key that hashes\n // to `pk_m_hash`.\n let request = unsafe { get_key_validation_request(pk_m_hash, key_index) };\n assert(request.pk_m.hash() == pk_m_hash);\n\n self.key_validation_requests_and_generators.push(\n KeyValidationRequestAndGenerator {\n request,\n sk_app_generator: sk_generators[key_index],\n },\n );\n self.last_key_validation_requests[key_index] = Option::some(request);\n request.sk_app\n }\n }\n\n // docs:start:context_message_portal\n pub fn message_portal(&mut self, recipient: EthAddress, content: Field) {\n // docs:end:context_message_portal\n let message = L2ToL1Message { recipient, content, counter: self.next_counter() };\n self.l2_to_l1_msgs.push(message);\n }\n\n // docs:start:context_consume_l1_to_l2_message\n // docs:start:consume_l1_to_l2_message\n pub fn consume_l1_to_l2_message(\n &mut self,\n content: Field,\n secret: Field,\n sender: EthAddress,\n leaf_index: Field,\n ) {\n // docs:end:context_consume_l1_to_l2_message\n let nullifier = process_l1_to_l2_message(\n self.historical_header.state.l1_to_l2_message_tree.root,\n self.this_address(),\n sender,\n self.chain_id(),\n self.version(),\n content,\n secret,\n leaf_index,\n );\n\n // Push nullifier (and the \"commitment\" corresponding to this can be \"empty\")\n self.push_nullifier(nullifier)\n }\n // docs:end:consume_l1_to_l2_message\n\n // NB: A randomness value of 0 signals that the kernels should not mask the contract address\n // used in siloing later on e.g. 'handshaking' contract w/ known address.\n pub fn emit_raw_event_log_with_masked_address<let M: u32>(\n &mut self,\n randomness: Field,\n log: [u8; M],\n log_hash: Field,\n ) {\n let counter = self.next_counter();\n let contract_address = self.this_address();\n let len = log.len() as Field + 4;\n let side_effect = EncryptedLogHash { value: log_hash, counter, length: len, randomness };\n self.encrypted_logs_hashes.push(side_effect);\n\n emit_encrypted_event_log(contract_address, randomness, log, counter);\n }\n\n pub fn emit_raw_note_log<let M: u32>(\n &mut self,\n note_hash_counter: u32,\n log: [u8; M],\n log_hash: Field,\n ) {\n let counter = self.next_counter();\n let len = log.len() as Field + 4;\n let side_effect = NoteLogHash { value: log_hash, counter, length: len, note_hash_counter };\n self.note_encrypted_logs_hashes.push(side_effect);\n\n emit_encrypted_note_log(note_hash_counter, log, counter);\n }\n\n pub fn call_private_function<let ARGS_COUNT: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) -> PackedReturns {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.call_private_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n false,\n )\n }\n\n pub fn static_call_private_function<let ARGS_COUNT: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) -> PackedReturns {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.call_private_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n true,\n )\n }\n\n pub fn call_private_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) -> PackedReturns {\n self.call_private_function_with_packed_args(contract_address, function_selector, 0, false)\n }\n\n pub fn static_call_private_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) -> PackedReturns {\n self.call_private_function_with_packed_args(contract_address, function_selector, 0, true)\n }\n\n pub fn call_private_function_with_packed_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n is_static_call: bool,\n ) -> PackedReturns {\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n let start_side_effect_counter = self.side_effect_counter;\n\n // The oracle simulates the private call and returns the value of the side effects counter after execution of\n // the call (which means that end_side_effect_counter - start_side_effect_counter is the number of side effects\n // that took place), along with the hash of the return values. We validate these by requesting a private kernel\n // iteration in which the return values are constrained to hash to `returns_hash` and the side effects counter\n // to increment from start to end.\n let (end_side_effect_counter, returns_hash) = unsafe {\n call_private_function_internal(\n contract_address,\n function_selector,\n args_hash,\n start_side_effect_counter,\n is_static_call,\n )\n };\n\n self.private_call_requests.push(\n PrivateCallRequest {\n call_context: CallContext {\n msg_sender: self.this_address(),\n contract_address,\n function_selector,\n is_static_call,\n },\n args_hash,\n returns_hash,\n start_side_effect_counter,\n end_side_effect_counter,\n },\n );\n\n // TODO (fees) figure out why this crashes the prover and enable it\n // we need this in order to pay fees inside child call contexts\n // assert(\n // (item.public_inputs.min_revertible_side_effect_counter == 0 as u32)\n // | (item.public_inputs.min_revertible_side_effect_counter\n // > self.min_revertible_side_effect_counter)\n // );\n // if item.public_inputs.min_revertible_side_effect_counter\n // > self.min_revertible_side_effect_counter {\n // self.min_revertible_side_effect_counter = item.public_inputs.min_revertible_side_effect_counter;\n // }\n self.side_effect_counter = end_side_effect_counter + 1;\n PackedReturns::new(returns_hash)\n }\n\n pub fn call_public_function<let ARGS_COUNT: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.call_public_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n false,\n )\n }\n\n pub fn static_call_public_function<let ARGS_COUNT: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.call_public_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n true,\n )\n }\n\n pub fn call_public_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) {\n self.call_public_function_with_packed_args(contract_address, function_selector, 0, false)\n }\n\n pub fn static_call_public_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) {\n self.call_public_function_with_packed_args(contract_address, function_selector, 0, true)\n }\n\n pub fn call_public_function_with_packed_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n is_static_call: bool,\n ) {\n let counter = self.next_counter();\n\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n // TODO(https://github.com/AztecProtocol/aztec-packages/issues/8985): Fix this.\n // WARNING: This is insecure and should be temporary!\n // The oracle repacks the arguments and returns a new args_hash.\n // new_args = [selector, ...old_args], so as to make it suitable to call the public dispatch function.\n // We don't validate or compute it in the circuit because a) it's harder to do with slices, and\n // b) this is only temporary.\n let args_hash = enqueue_public_function_call_internal(\n contract_address,\n function_selector,\n args_hash,\n counter,\n is_static_call,\n );\n\n // Public calls are rerouted through the dispatch function.\n let function_selector = comptime { FunctionSelector::from_field(PUBLIC_DISPATCH_SELECTOR) };\n\n let call_request = PublicCallRequest {\n msg_sender: self.this_address(),\n contract_address,\n function_selector,\n is_static_call,\n args_hash,\n };\n\n self.public_call_requests.push(Counted::new(call_request, counter));\n }\n\n pub fn set_public_teardown_function<let ARGS_COUNT: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.set_public_teardown_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n false,\n )\n }\n\n pub fn set_public_teardown_function_with_packed_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n is_static_call: bool,\n ) {\n let counter = self.next_counter();\n\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n // TODO(https://github.com/AztecProtocol/aztec-packages/issues/8985): Fix this.\n // WARNING: This is insecure and should be temporary!\n // The oracle repacks the arguments and returns a new args_hash.\n // new_args = [selector, ...old_args], so as to make it suitable to call the public dispatch function.\n // We don't validate or compute it in the circuit because a) it's harder to do with slices, and\n // b) this is only temporary.\n let args_hash = set_public_teardown_function_call_internal(\n contract_address,\n function_selector,\n args_hash,\n counter,\n is_static_call,\n );\n\n let function_selector = comptime { FunctionSelector::from_field(PUBLIC_DISPATCH_SELECTOR) };\n\n self.public_teardown_call_request = PublicCallRequest {\n msg_sender: self.this_address(),\n contract_address,\n function_selector,\n is_static_call,\n args_hash,\n };\n }\n\n fn next_counter(&mut self) -> u32 {\n let counter = self.side_effect_counter;\n self.side_effect_counter += 1;\n counter\n }\n}\n\nimpl Empty for PrivateContext {\n fn empty() -> Self {\n PrivateContext {\n inputs: PrivateContextInputs::empty(),\n side_effect_counter: 0 as u32,\n min_revertible_side_effect_counter: 0 as u32,\n is_fee_payer: false,\n args_hash: 0,\n return_hash: 0,\n max_block_number: MaxBlockNumber::empty(),\n note_hash_read_requests: BoundedVec::new(),\n nullifier_read_requests: BoundedVec::new(),\n key_validation_requests_and_generators: BoundedVec::new(),\n note_hashes: BoundedVec::new(),\n nullifiers: BoundedVec::new(),\n private_call_requests: BoundedVec::new(),\n public_call_requests: BoundedVec::new(),\n public_teardown_call_request: PublicCallRequest::empty(),\n l2_to_l1_msgs: BoundedVec::new(),\n historical_header: Header::empty(),\n note_encrypted_logs_hashes: BoundedVec::new(),\n encrypted_logs_hashes: BoundedVec::new(),\n contract_class_logs_hashes: BoundedVec::new(),\n last_key_validation_requests: [Option::none(); NUM_KEY_TYPES],\n }\n }\n}\n"
|
|
3696
|
-
},
|
|
3697
|
-
"103": {
|
|
3629
|
+
"65": {
|
|
3698
3630
|
"path": "/usr/src/noir-projects/aztec-nr/aztec/src/context/public_context.nr",
|
|
3699
|
-
"source": "use crate::context::gas::GasOpts;\nuse crate::hash::{\n compute_l1_to_l2_message_hash, compute_l1_to_l2_message_nullifier, compute_secret_hash,\n};\nuse dep::protocol_types::abis::function_selector::FunctionSelector;\nuse dep::protocol_types::address::{AztecAddress, EthAddress};\nuse dep::protocol_types::constants::MAX_FIELD_VALUE;\nuse dep::protocol_types::traits::{Deserialize, Empty, Serialize};\n\npub struct PublicContext {\n pub args_hash: Option<Field>,\n pub compute_args_hash: fn() -> Field,\n}\n\nimpl PublicContext {\n pub fn new(compute_args_hash: fn() -> Field) -> Self {\n PublicContext { args_hash: Option::none(), compute_args_hash }\n }\n\n pub fn emit_unencrypted_log<T, let N: u32>(_self: &mut Self, log: T)\n where\n T: Serialize<N>,\n {\n // AVM opcodes are constrained by the AVM itself\n unsafe { emit_unencrypted_log(Serialize::serialize(log).as_slice()) };\n }\n\n pub fn note_hash_exists(_self: Self, note_hash: Field, leaf_index: Field) -> bool {\n // AVM opcodes are constrained by the AVM itself\n unsafe { note_hash_exists(note_hash, leaf_index) } == 1\n }\n\n pub fn l1_to_l2_msg_exists(_self: Self, msg_hash: Field, msg_leaf_index: Field) -> bool {\n // AVM opcodes are constrained by the AVM itself\n unsafe { l1_to_l2_msg_exists(msg_hash, msg_leaf_index) } == 1\n }\n\n pub fn nullifier_exists(_self: Self, unsiloed_nullifier: Field, address: AztecAddress) -> bool {\n // AVM opcodes are constrained by the AVM itself\n unsafe { nullifier_exists(unsiloed_nullifier, address.to_field()) } == 1\n }\n\n pub fn consume_l1_to_l2_message(\n &mut self,\n content: Field,\n secret: Field,\n sender: EthAddress,\n leaf_index: Field,\n ) {\n let secret_hash = compute_secret_hash(secret);\n let message_hash = compute_l1_to_l2_message_hash(\n sender,\n self.chain_id(),\n /*recipient=*/\n self.this_address(),\n self.version(),\n content,\n secret_hash,\n leaf_index,\n );\n let nullifier = compute_l1_to_l2_message_nullifier(message_hash, secret);\n\n assert(\n !self.nullifier_exists(nullifier, self.this_address()),\n \"L1-to-L2 message is already nullified\",\n );\n assert(\n self.l1_to_l2_msg_exists(message_hash, leaf_index),\n \"Tried to consume nonexistent L1-to-L2 message\",\n );\n\n self.push_nullifier(nullifier);\n }\n\n pub fn message_portal(_self: &mut Self, recipient: EthAddress, content: Field) {\n // AVM opcodes are constrained by the AVM itself\n unsafe { send_l2_to_l1_msg(recipient, content) };\n }\n\n pub unconstrained fn call_public_function(\n _self: &mut Self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field],\n gas_opts: GasOpts,\n ) -> [Field] {\n let args = args.push_front(function_selector.to_field());\n let success = call(gas_for_call(gas_opts), contract_address, args);\n\n let result_data = returndata_copy(0, returndata_size());\n if !success {\n // Rethrow the revert data.\n avm_revert(result_data);\n }\n result_data\n }\n\n pub unconstrained fn static_call_public_function(\n _self: &mut Self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field],\n gas_opts: GasOpts,\n ) -> [Field] {\n let args = args.push_front(function_selector.to_field());\n let success = call_static(gas_for_call(gas_opts), contract_address, args);\n\n let result_data = returndata_copy(0, returndata_size());\n if !success {\n // Rethrow the revert data.\n avm_revert(result_data);\n }\n result_data\n }\n\n pub fn push_note_hash(_self: &mut Self, note_hash: Field) {\n // AVM opcodes are constrained by the AVM itself\n unsafe { emit_note_hash(note_hash) };\n }\n pub fn push_nullifier(_self: &mut Self, nullifier: Field) {\n // AVM opcodes are constrained by the AVM itself\n unsafe { emit_nullifier(nullifier) };\n }\n\n pub fn this_address(_self: Self) -> AztecAddress {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n address()\n }\n }\n pub fn msg_sender(_self: Self) -> AztecAddress {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n sender()\n }\n }\n pub fn selector(_self: Self) -> FunctionSelector {\n // The selector is the first element of the calldata when calling a public function through dispatch.\n // AVM opcodes are constrained by the AVM itself.\n let raw_selector: [Field; 1] = unsafe { calldata_copy(0, 1) };\n FunctionSelector::from_field(raw_selector[0])\n }\n pub fn get_args_hash(mut self) -> Field {\n if !self.args_hash.is_some() {\n self.args_hash = Option::some((self.compute_args_hash)());\n }\n\n self.args_hash.unwrap_unchecked()\n }\n pub fn transaction_fee(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n transaction_fee()\n }\n }\n\n pub fn chain_id(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n chain_id()\n }\n }\n pub fn version(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n version()\n }\n }\n pub fn block_number(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n block_number()\n }\n }\n pub fn timestamp(_self: Self) -> u64 {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n timestamp()\n }\n }\n pub fn fee_per_l2_gas(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n fee_per_l2_gas()\n }\n }\n pub fn fee_per_da_gas(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n fee_per_da_gas()\n }\n }\n\n pub fn l2_gas_left(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n l2_gas_left()\n }\n }\n pub fn da_gas_left(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n da_gas_left()\n }\n }\n pub fn is_static_call(_self: Self) -> bool {\n // AVM opcodes are constrained by the AVM itself\n unsafe { is_static_call() } == 1\n }\n\n pub fn raw_storage_read<let N: u32>(_self: Self, storage_slot: Field) -> [Field; N] {\n let mut out = [0; N];\n for i in 0..N {\n // AVM opcodes are constrained by the AVM itself\n out[i] = unsafe { storage_read(storage_slot + i as Field) };\n }\n out\n }\n\n pub fn storage_read<T, let N: u32>(self, storage_slot: Field) -> T\n where\n T: Deserialize<N>,\n {\n T::deserialize(self.raw_storage_read(storage_slot))\n }\n\n pub fn raw_storage_write<let N: u32>(_self: Self, storage_slot: Field, values: [Field; N]) {\n for i in 0..N {\n // AVM opcodes are constrained by the AVM itself\n unsafe { storage_write(storage_slot + i as Field, values[i]) };\n }\n }\n\n pub fn storage_write<T, let N: u32>(self, storage_slot: Field, value: T)\n where\n T: Serialize<N>,\n {\n self.raw_storage_write(storage_slot, value.serialize());\n }\n}\n\n// Helper functions\nfn gas_for_call(user_gas: GasOpts) -> [Field; 2] {\n // It's ok to use the max possible gas here, because the gas will be\n // capped by the gas left in the (STATIC)CALL instruction.\n [user_gas.l2_gas.unwrap_or(MAX_FIELD_VALUE), user_gas.da_gas.unwrap_or(MAX_FIELD_VALUE)]\n}\n\n// Unconstrained opcode wrappers (do not use directly).\nunconstrained fn address() -> AztecAddress {\n address_opcode()\n}\nunconstrained fn sender() -> AztecAddress {\n sender_opcode()\n}\n// TODO(9396): Remove.\nunconstrained fn portal() -> EthAddress {\n portal_opcode()\n}\n// TODO(9396): Remove.\n//unconstrained fn function_selector() -> u32 {\n// function_selector_opcode()\n//}\nunconstrained fn transaction_fee() -> Field {\n transaction_fee_opcode()\n}\nunconstrained fn chain_id() -> Field {\n chain_id_opcode()\n}\nunconstrained fn version() -> Field {\n version_opcode()\n}\nunconstrained fn block_number() -> Field {\n block_number_opcode()\n}\nunconstrained fn timestamp() -> u64 {\n timestamp_opcode()\n}\nunconstrained fn fee_per_l2_gas() -> Field {\n fee_per_l2_gas_opcode()\n}\nunconstrained fn fee_per_da_gas() -> Field {\n fee_per_da_gas_opcode()\n}\nunconstrained fn l2_gas_left() -> Field {\n l2_gas_left_opcode()\n}\nunconstrained fn da_gas_left() -> Field {\n da_gas_left_opcode()\n}\nunconstrained fn is_static_call() -> Field {\n is_static_call_opcode()\n}\nunconstrained fn note_hash_exists(note_hash: Field, leaf_index: Field) -> u1 {\n note_hash_exists_opcode(note_hash, leaf_index)\n}\nunconstrained fn emit_note_hash(note_hash: Field) {\n emit_note_hash_opcode(note_hash)\n}\nunconstrained fn nullifier_exists(nullifier: Field, address: Field) -> u1 {\n nullifier_exists_opcode(nullifier, address)\n}\nunconstrained fn emit_nullifier(nullifier: Field) {\n emit_nullifier_opcode(nullifier)\n}\nunconstrained fn emit_unencrypted_log(message: [Field]) {\n emit_unencrypted_log_opcode(message)\n}\nunconstrained fn l1_to_l2_msg_exists(msg_hash: Field, msg_leaf_index: Field) -> u1 {\n l1_to_l2_msg_exists_opcode(msg_hash, msg_leaf_index)\n}\nunconstrained fn send_l2_to_l1_msg(recipient: EthAddress, content: Field) {\n send_l2_to_l1_msg_opcode(recipient, content)\n}\nunconstrained fn call(gas: [Field; 2], address: AztecAddress, args: [Field]) -> bool {\n call_opcode(gas, address, args)\n}\nunconstrained fn call_static(gas: [Field; 2], address: AztecAddress, args: [Field]) -> bool {\n call_static_opcode(gas, address, args)\n}\n\npub unconstrained fn calldata_copy<let N: u32>(cdoffset: u32, copy_size: u32) -> [Field; N] {\n calldata_copy_opcode(cdoffset, copy_size)\n}\n\nunconstrained fn returndata_size() -> u32 {\n returndata_size_opcode()\n}\n\nunconstrained fn returndata_copy(rdoffset: u32, copy_size: u32) -> [Field] {\n returndata_copy_opcode(rdoffset, copy_size)\n}\n\npub unconstrained fn avm_return(returndata: [Field]) {\n return_opcode(returndata)\n}\n\n// This opcode reverts using the exact data given. In general it should only be used\n// to do rethrows, where the revert data is the same as the original revert data.\n// For normal reverts, use Noir's `assert` which, on top of reverting, will also add\n// an error selector to the revert data.\nunconstrained fn avm_revert(revertdata: [Field]) {\n revert_opcode(revertdata)\n}\n\nunconstrained fn storage_read(storage_slot: Field) -> Field {\n storage_read_opcode(storage_slot)\n}\n\nunconstrained fn storage_write(storage_slot: Field, value: Field) {\n storage_write_opcode(storage_slot, value);\n}\n\nimpl Empty for PublicContext {\n fn empty() -> Self {\n PublicContext::new(|| 0)\n }\n}\n\n// AVM oracles (opcodes) follow, do not use directly.\n#[oracle(avmOpcodeAddress)]\nunconstrained fn address_opcode() -> AztecAddress {}\n\n#[oracle(avmOpcodeSender)]\nunconstrained fn sender_opcode() -> AztecAddress {}\n\n#[oracle(avmOpcodePortal)]\nunconstrained fn portal_opcode() -> EthAddress {}\n\n// TODO(9396): Remove.\n//#[oracle(avmOpcodeFunctionSelector)]\n//unconstrained fn function_selector_opcode() -> u32 {}\n\n#[oracle(avmOpcodeTransactionFee)]\nunconstrained fn transaction_fee_opcode() -> Field {}\n\n#[oracle(avmOpcodeChainId)]\nunconstrained fn chain_id_opcode() -> Field {}\n\n#[oracle(avmOpcodeVersion)]\nunconstrained fn version_opcode() -> Field {}\n\n#[oracle(avmOpcodeBlockNumber)]\nunconstrained fn block_number_opcode() -> Field {}\n\n#[oracle(avmOpcodeTimestamp)]\nunconstrained fn timestamp_opcode() -> u64 {}\n\n#[oracle(avmOpcodeFeePerL2Gas)]\nunconstrained fn fee_per_l2_gas_opcode() -> Field {}\n\n#[oracle(avmOpcodeFeePerDaGas)]\nunconstrained fn fee_per_da_gas_opcode() -> Field {}\n\n#[oracle(avmOpcodeL2GasLeft)]\nunconstrained fn l2_gas_left_opcode() -> Field {}\n\n#[oracle(avmOpcodeDaGasLeft)]\nunconstrained fn da_gas_left_opcode() -> Field {}\n\n#[oracle(avmOpcodeIsStaticCall)]\nunconstrained fn is_static_call_opcode() -> Field {}\n\n#[oracle(avmOpcodeNoteHashExists)]\nunconstrained fn note_hash_exists_opcode(note_hash: Field, leaf_index: Field) -> u1 {}\n\n#[oracle(avmOpcodeEmitNoteHash)]\nunconstrained fn emit_note_hash_opcode(note_hash: Field) {}\n\n#[oracle(avmOpcodeNullifierExists)]\nunconstrained fn nullifier_exists_opcode(nullifier: Field, address: Field) -> u1 {}\n\n#[oracle(avmOpcodeEmitNullifier)]\nunconstrained fn emit_nullifier_opcode(nullifier: Field) {}\n\n#[oracle(avmOpcodeEmitUnencryptedLog)]\nunconstrained fn emit_unencrypted_log_opcode(message: [Field]) {}\n\n#[oracle(avmOpcodeL1ToL2MsgExists)]\nunconstrained fn l1_to_l2_msg_exists_opcode(msg_hash: Field, msg_leaf_index: Field) -> u1 {}\n\n#[oracle(avmOpcodeSendL2ToL1Msg)]\nunconstrained fn send_l2_to_l1_msg_opcode(recipient: EthAddress, content: Field) {}\n\n#[oracle(avmOpcodeCalldataCopy)]\nunconstrained fn calldata_copy_opcode<let N: u32>(cdoffset: u32, copy_size: u32) -> [Field; N] {}\n\n#[oracle(avmOpcodeReturndataSize)]\nunconstrained fn returndata_size_opcode() -> u32 {}\n\n#[oracle(avmOpcodeReturndataCopy)]\nunconstrained fn returndata_copy_opcode(rdoffset: u32, copy_size: u32) -> [Field] {}\n\n#[oracle(avmOpcodeReturn)]\nunconstrained fn return_opcode(returndata: [Field]) {}\n\n// This opcode reverts using the exact data given. In general it should only be used\n// to do rethrows, where the revert data is the same as the original revert data.\n// For normal reverts, use Noir's `assert` which, on top of reverting, will also add\n// an error selector to the revert data.\n#[oracle(avmOpcodeRevert)]\nunconstrained fn revert_opcode(revertdata: [Field]) {}\n\n#[oracle(avmOpcodeCall)]\nunconstrained fn call_opcode(\n gas: [Field; 2], // gas allocation: [l2_gas, da_gas]\n address: AztecAddress,\n args: [Field],\n) -> bool {}\n\n#[oracle(avmOpcodeStaticCall)]\nunconstrained fn call_static_opcode(\n gas: [Field; 2], // gas allocation: [l2_gas, da_gas]\n address: AztecAddress,\n args: [Field],\n) -> bool {}\n\n#[oracle(avmOpcodeStorageRead)]\nunconstrained fn storage_read_opcode(storage_slot: Field) -> Field {}\n\n#[oracle(avmOpcodeStorageWrite)]\nunconstrained fn storage_write_opcode(storage_slot: Field, value: Field) {}\n"
|
|
3631
|
+
"source": "use crate::context::gas::GasOpts;\nuse crate::hash::{\n compute_l1_to_l2_message_hash, compute_l1_to_l2_message_nullifier, compute_secret_hash,\n};\nuse dep::protocol_types::abis::function_selector::FunctionSelector;\nuse dep::protocol_types::address::{AztecAddress, EthAddress};\nuse dep::protocol_types::constants::MAX_FIELD_VALUE;\nuse dep::protocol_types::traits::{Deserialize, Empty, Serialize};\n\npub struct PublicContext {\n pub args_hash: Option<Field>,\n pub compute_args_hash: fn() -> Field,\n}\n\nimpl PublicContext {\n pub fn new(compute_args_hash: fn() -> Field) -> Self {\n PublicContext { args_hash: Option::none(), compute_args_hash }\n }\n\n pub fn emit_unencrypted_log<T, let N: u32>(_self: &mut Self, log: T)\n where\n T: Serialize<N>,\n {\n // AVM opcodes are constrained by the AVM itself\n unsafe { emit_unencrypted_log(Serialize::serialize(log).as_slice()) };\n }\n\n pub fn note_hash_exists(_self: Self, note_hash: Field, leaf_index: Field) -> bool {\n // AVM opcodes are constrained by the AVM itself\n unsafe { note_hash_exists(note_hash, leaf_index) } == 1\n }\n\n pub fn l1_to_l2_msg_exists(_self: Self, msg_hash: Field, msg_leaf_index: Field) -> bool {\n // AVM opcodes are constrained by the AVM itself\n unsafe { l1_to_l2_msg_exists(msg_hash, msg_leaf_index) } == 1\n }\n\n pub fn nullifier_exists(_self: Self, unsiloed_nullifier: Field, address: AztecAddress) -> bool {\n // AVM opcodes are constrained by the AVM itself\n unsafe { nullifier_exists(unsiloed_nullifier, address.to_field()) } == 1\n }\n\n pub fn consume_l1_to_l2_message(\n &mut self,\n content: Field,\n secret: Field,\n sender: EthAddress,\n leaf_index: Field,\n ) {\n let secret_hash = compute_secret_hash(secret);\n let message_hash = compute_l1_to_l2_message_hash(\n sender,\n self.chain_id(),\n /*recipient=*/\n self.this_address(),\n self.version(),\n content,\n secret_hash,\n leaf_index,\n );\n let nullifier = compute_l1_to_l2_message_nullifier(message_hash, secret);\n\n assert(\n !self.nullifier_exists(nullifier, self.this_address()),\n \"L1-to-L2 message is already nullified\",\n );\n assert(\n self.l1_to_l2_msg_exists(message_hash, leaf_index),\n \"Tried to consume nonexistent L1-to-L2 message\",\n );\n\n self.push_nullifier(nullifier);\n }\n\n pub fn message_portal(_self: &mut Self, recipient: EthAddress, content: Field) {\n // AVM opcodes are constrained by the AVM itself\n unsafe { send_l2_to_l1_msg(recipient, content) };\n }\n\n pub unconstrained fn call_public_function(\n _self: &mut Self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field],\n gas_opts: GasOpts,\n ) -> [Field] {\n let args = args.push_front(function_selector.to_field());\n let success = call(gas_for_call(gas_opts), contract_address, args);\n\n let result_data = returndata_copy(0, returndata_size());\n if !success {\n // Rethrow the revert data.\n avm_revert(result_data);\n }\n result_data\n }\n\n pub unconstrained fn static_call_public_function(\n _self: &mut Self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field],\n gas_opts: GasOpts,\n ) -> [Field] {\n let args = args.push_front(function_selector.to_field());\n let success = call_static(gas_for_call(gas_opts), contract_address, args);\n\n let result_data = returndata_copy(0, returndata_size());\n if !success {\n // Rethrow the revert data.\n avm_revert(result_data);\n }\n result_data\n }\n\n pub fn push_note_hash(_self: &mut Self, note_hash: Field) {\n // AVM opcodes are constrained by the AVM itself\n unsafe { emit_note_hash(note_hash) };\n }\n pub fn push_nullifier(_self: &mut Self, nullifier: Field) {\n // AVM opcodes are constrained by the AVM itself\n unsafe { emit_nullifier(nullifier) };\n }\n\n pub fn this_address(_self: Self) -> AztecAddress {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n address()\n }\n }\n pub fn msg_sender(_self: Self) -> AztecAddress {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n sender()\n }\n }\n pub fn selector(_self: Self) -> FunctionSelector {\n // The selector is the first element of the calldata when calling a public function through dispatch.\n // AVM opcodes are constrained by the AVM itself.\n let raw_selector: [Field; 1] = unsafe { calldata_copy(0, 1) };\n FunctionSelector::from_field(raw_selector[0])\n }\n pub fn get_args_hash(mut self) -> Field {\n if !self.args_hash.is_some() {\n self.args_hash = Option::some((self.compute_args_hash)());\n }\n\n self.args_hash.unwrap_unchecked()\n }\n pub fn transaction_fee(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n transaction_fee()\n }\n }\n\n pub fn chain_id(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n chain_id()\n }\n }\n pub fn version(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n version()\n }\n }\n pub fn block_number(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n block_number()\n }\n }\n pub fn timestamp(_self: Self) -> u64 {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n timestamp()\n }\n }\n pub fn fee_per_l2_gas(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n fee_per_l2_gas()\n }\n }\n pub fn fee_per_da_gas(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n fee_per_da_gas()\n }\n }\n\n pub fn l2_gas_left(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n l2_gas_left()\n }\n }\n pub fn da_gas_left(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n da_gas_left()\n }\n }\n pub fn is_static_call(_self: Self) -> bool {\n // AVM opcodes are constrained by the AVM itself\n unsafe { is_static_call() } == 1\n }\n\n pub fn raw_storage_read<let N: u32>(_self: Self, storage_slot: Field) -> [Field; N] {\n let mut out = [0; N];\n for i in 0..N {\n // AVM opcodes are constrained by the AVM itself\n out[i] = unsafe { storage_read(storage_slot + i as Field) };\n }\n out\n }\n\n pub fn storage_read<T, let N: u32>(self, storage_slot: Field) -> T\n where\n T: Deserialize<N>,\n {\n T::deserialize(self.raw_storage_read(storage_slot))\n }\n\n pub fn raw_storage_write<let N: u32>(_self: Self, storage_slot: Field, values: [Field; N]) {\n for i in 0..N {\n // AVM opcodes are constrained by the AVM itself\n unsafe { storage_write(storage_slot + i as Field, values[i]) };\n }\n }\n\n pub fn storage_write<T, let N: u32>(self, storage_slot: Field, value: T)\n where\n T: Serialize<N>,\n {\n self.raw_storage_write(storage_slot, value.serialize());\n }\n}\n\n// Helper functions\nfn gas_for_call(user_gas: GasOpts) -> [Field; 2] {\n // It's ok to use the max possible gas here, because the gas will be\n // capped by the gas left in the (STATIC)CALL instruction.\n [user_gas.l2_gas.unwrap_or(MAX_FIELD_VALUE), user_gas.da_gas.unwrap_or(MAX_FIELD_VALUE)]\n}\n\n// Unconstrained opcode wrappers (do not use directly).\nunconstrained fn address() -> AztecAddress {\n address_opcode()\n}\nunconstrained fn sender() -> AztecAddress {\n sender_opcode()\n}\nunconstrained fn transaction_fee() -> Field {\n transaction_fee_opcode()\n}\nunconstrained fn chain_id() -> Field {\n chain_id_opcode()\n}\nunconstrained fn version() -> Field {\n version_opcode()\n}\nunconstrained fn block_number() -> Field {\n block_number_opcode()\n}\nunconstrained fn timestamp() -> u64 {\n timestamp_opcode()\n}\nunconstrained fn fee_per_l2_gas() -> Field {\n fee_per_l2_gas_opcode()\n}\nunconstrained fn fee_per_da_gas() -> Field {\n fee_per_da_gas_opcode()\n}\nunconstrained fn l2_gas_left() -> Field {\n l2_gas_left_opcode()\n}\nunconstrained fn da_gas_left() -> Field {\n da_gas_left_opcode()\n}\nunconstrained fn is_static_call() -> Field {\n is_static_call_opcode()\n}\nunconstrained fn note_hash_exists(note_hash: Field, leaf_index: Field) -> u1 {\n note_hash_exists_opcode(note_hash, leaf_index)\n}\nunconstrained fn emit_note_hash(note_hash: Field) {\n emit_note_hash_opcode(note_hash)\n}\nunconstrained fn nullifier_exists(nullifier: Field, address: Field) -> u1 {\n nullifier_exists_opcode(nullifier, address)\n}\nunconstrained fn emit_nullifier(nullifier: Field) {\n emit_nullifier_opcode(nullifier)\n}\nunconstrained fn emit_unencrypted_log(message: [Field]) {\n emit_unencrypted_log_opcode(message)\n}\nunconstrained fn l1_to_l2_msg_exists(msg_hash: Field, msg_leaf_index: Field) -> u1 {\n l1_to_l2_msg_exists_opcode(msg_hash, msg_leaf_index)\n}\nunconstrained fn send_l2_to_l1_msg(recipient: EthAddress, content: Field) {\n send_l2_to_l1_msg_opcode(recipient, content)\n}\nunconstrained fn call(gas: [Field; 2], address: AztecAddress, args: [Field]) -> bool {\n call_opcode(gas, address, args)\n}\nunconstrained fn call_static(gas: [Field; 2], address: AztecAddress, args: [Field]) -> bool {\n call_static_opcode(gas, address, args)\n}\n\npub unconstrained fn calldata_copy<let N: u32>(cdoffset: u32, copy_size: u32) -> [Field; N] {\n calldata_copy_opcode(cdoffset, copy_size)\n}\n\nunconstrained fn returndata_size() -> u32 {\n returndata_size_opcode()\n}\n\nunconstrained fn returndata_copy(rdoffset: u32, copy_size: u32) -> [Field] {\n returndata_copy_opcode(rdoffset, copy_size)\n}\n\npub unconstrained fn avm_return(returndata: [Field]) {\n return_opcode(returndata)\n}\n\n// This opcode reverts using the exact data given. In general it should only be used\n// to do rethrows, where the revert data is the same as the original revert data.\n// For normal reverts, use Noir's `assert` which, on top of reverting, will also add\n// an error selector to the revert data.\nunconstrained fn avm_revert(revertdata: [Field]) {\n revert_opcode(revertdata)\n}\n\nunconstrained fn storage_read(storage_slot: Field) -> Field {\n storage_read_opcode(storage_slot)\n}\n\nunconstrained fn storage_write(storage_slot: Field, value: Field) {\n storage_write_opcode(storage_slot, value);\n}\n\nimpl Empty for PublicContext {\n fn empty() -> Self {\n PublicContext::new(|| 0)\n }\n}\n\n// AVM oracles (opcodes) follow, do not use directly.\n#[oracle(avmOpcodeAddress)]\nunconstrained fn address_opcode() -> AztecAddress {}\n\n#[oracle(avmOpcodeSender)]\nunconstrained fn sender_opcode() -> AztecAddress {}\n\n#[oracle(avmOpcodeTransactionFee)]\nunconstrained fn transaction_fee_opcode() -> Field {}\n\n#[oracle(avmOpcodeChainId)]\nunconstrained fn chain_id_opcode() -> Field {}\n\n#[oracle(avmOpcodeVersion)]\nunconstrained fn version_opcode() -> Field {}\n\n#[oracle(avmOpcodeBlockNumber)]\nunconstrained fn block_number_opcode() -> Field {}\n\n#[oracle(avmOpcodeTimestamp)]\nunconstrained fn timestamp_opcode() -> u64 {}\n\n#[oracle(avmOpcodeFeePerL2Gas)]\nunconstrained fn fee_per_l2_gas_opcode() -> Field {}\n\n#[oracle(avmOpcodeFeePerDaGas)]\nunconstrained fn fee_per_da_gas_opcode() -> Field {}\n\n#[oracle(avmOpcodeL2GasLeft)]\nunconstrained fn l2_gas_left_opcode() -> Field {}\n\n#[oracle(avmOpcodeDaGasLeft)]\nunconstrained fn da_gas_left_opcode() -> Field {}\n\n#[oracle(avmOpcodeIsStaticCall)]\nunconstrained fn is_static_call_opcode() -> Field {}\n\n#[oracle(avmOpcodeNoteHashExists)]\nunconstrained fn note_hash_exists_opcode(note_hash: Field, leaf_index: Field) -> u1 {}\n\n#[oracle(avmOpcodeEmitNoteHash)]\nunconstrained fn emit_note_hash_opcode(note_hash: Field) {}\n\n#[oracle(avmOpcodeNullifierExists)]\nunconstrained fn nullifier_exists_opcode(nullifier: Field, address: Field) -> u1 {}\n\n#[oracle(avmOpcodeEmitNullifier)]\nunconstrained fn emit_nullifier_opcode(nullifier: Field) {}\n\n#[oracle(avmOpcodeEmitUnencryptedLog)]\nunconstrained fn emit_unencrypted_log_opcode(message: [Field]) {}\n\n#[oracle(avmOpcodeL1ToL2MsgExists)]\nunconstrained fn l1_to_l2_msg_exists_opcode(msg_hash: Field, msg_leaf_index: Field) -> u1 {}\n\n#[oracle(avmOpcodeSendL2ToL1Msg)]\nunconstrained fn send_l2_to_l1_msg_opcode(recipient: EthAddress, content: Field) {}\n\n#[oracle(avmOpcodeCalldataCopy)]\nunconstrained fn calldata_copy_opcode<let N: u32>(cdoffset: u32, copy_size: u32) -> [Field; N] {}\n\n#[oracle(avmOpcodeReturndataSize)]\nunconstrained fn returndata_size_opcode() -> u32 {}\n\n#[oracle(avmOpcodeReturndataCopy)]\nunconstrained fn returndata_copy_opcode(rdoffset: u32, copy_size: u32) -> [Field] {}\n\n#[oracle(avmOpcodeReturn)]\nunconstrained fn return_opcode(returndata: [Field]) {}\n\n// This opcode reverts using the exact data given. In general it should only be used\n// to do rethrows, where the revert data is the same as the original revert data.\n// For normal reverts, use Noir's `assert` which, on top of reverting, will also add\n// an error selector to the revert data.\n#[oracle(avmOpcodeRevert)]\nunconstrained fn revert_opcode(revertdata: [Field]) {}\n\n#[oracle(avmOpcodeCall)]\nunconstrained fn call_opcode(\n gas: [Field; 2], // gas allocation: [l2_gas, da_gas]\n address: AztecAddress,\n args: [Field],\n) -> bool {}\n\n#[oracle(avmOpcodeStaticCall)]\nunconstrained fn call_static_opcode(\n gas: [Field; 2], // gas allocation: [l2_gas, da_gas]\n address: AztecAddress,\n args: [Field],\n) -> bool {}\n\n#[oracle(avmOpcodeStorageRead)]\nunconstrained fn storage_read_opcode(storage_slot: Field) -> Field {}\n\n#[oracle(avmOpcodeStorageWrite)]\nunconstrained fn storage_write_opcode(storage_slot: Field, value: Field) {}\n"
|
|
3700
3632
|
},
|
|
3701
|
-
"
|
|
3633
|
+
"66": {
|
|
3634
|
+
"path": "/usr/src/noir-projects/aztec-nr/aztec/src/context/private_context.nr",
|
|
3635
|
+
"source": "use dep::protocol_types::debug_log::debug_log_format;\n\nuse crate::{\n context::{inputs::PrivateContextInputs, packed_returns::PackedReturns},\n hash::{ArgsHasher, hash_args_array},\n keys::constants::{NULLIFIER_INDEX, NUM_KEY_TYPES, OUTGOING_INDEX, sk_generators},\n messaging::process_l1_to_l2_message,\n oracle::{\n arguments,\n block_header::get_block_header_at,\n call_private_function::call_private_function_internal,\n enqueue_public_function_call::{\n enqueue_public_function_call_internal, notify_set_min_revertible_side_effect_counter,\n set_public_teardown_function_call_internal,\n },\n key_validation_request::get_key_validation_request,\n returns::pack_returns,\n },\n};\nuse dep::protocol_types::{\n abis::{\n call_context::CallContext,\n function_selector::FunctionSelector,\n log::Log,\n log_hash::LogHash,\n max_block_number::MaxBlockNumber,\n note_hash::NoteHash,\n nullifier::Nullifier,\n private_call_request::PrivateCallRequest,\n private_circuit_public_inputs::PrivateCircuitPublicInputs,\n private_log::PrivateLogData,\n public_call_request::PublicCallRequest,\n read_request::ReadRequest,\n side_effect::Counted,\n validation_requests::{KeyValidationRequest, KeyValidationRequestAndGenerator},\n },\n address::{AztecAddress, EthAddress},\n block_header::BlockHeader,\n constants::{\n MAX_CONTRACT_CLASS_LOGS_PER_CALL, MAX_ENQUEUED_CALLS_PER_CALL,\n MAX_KEY_VALIDATION_REQUESTS_PER_CALL, MAX_L2_TO_L1_MSGS_PER_CALL,\n MAX_NOTE_HASH_READ_REQUESTS_PER_CALL, MAX_NOTE_HASHES_PER_CALL,\n MAX_NULLIFIER_READ_REQUESTS_PER_CALL, MAX_NULLIFIERS_PER_CALL,\n MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL, MAX_PRIVATE_LOGS_PER_CALL,\n PRIVATE_LOG_SIZE_IN_FIELDS, PUBLIC_DISPATCH_SELECTOR,\n },\n messaging::l2_to_l1_message::L2ToL1Message,\n traits::Empty,\n};\n\n// When finished, one can call .finish() to convert back to the abi\npub struct PrivateContext {\n // docs:start:private-context\n pub inputs: PrivateContextInputs,\n pub side_effect_counter: u32,\n\n pub min_revertible_side_effect_counter: u32,\n pub is_fee_payer: bool,\n\n pub args_hash: Field,\n pub return_hash: Field,\n\n pub max_block_number: MaxBlockNumber,\n\n pub note_hash_read_requests: BoundedVec<ReadRequest, MAX_NOTE_HASH_READ_REQUESTS_PER_CALL>,\n pub nullifier_read_requests: BoundedVec<ReadRequest, MAX_NULLIFIER_READ_REQUESTS_PER_CALL>,\n key_validation_requests_and_generators: BoundedVec<KeyValidationRequestAndGenerator, MAX_KEY_VALIDATION_REQUESTS_PER_CALL>,\n\n pub note_hashes: BoundedVec<NoteHash, MAX_NOTE_HASHES_PER_CALL>,\n pub nullifiers: BoundedVec<Nullifier, MAX_NULLIFIERS_PER_CALL>,\n\n pub private_call_requests: BoundedVec<PrivateCallRequest, MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL>,\n pub public_call_requests: BoundedVec<Counted<PublicCallRequest>, MAX_ENQUEUED_CALLS_PER_CALL>,\n pub public_teardown_call_request: PublicCallRequest,\n pub l2_to_l1_msgs: BoundedVec<L2ToL1Message, MAX_L2_TO_L1_MSGS_PER_CALL>,\n // docs:end:private-context\n\n // Header of a block whose state is used during private execution (not the block the transaction is included in).\n pub historical_header: BlockHeader,\n\n pub private_logs: BoundedVec<PrivateLogData, MAX_PRIVATE_LOGS_PER_CALL>,\n pub contract_class_logs_hashes: BoundedVec<LogHash, MAX_CONTRACT_CLASS_LOGS_PER_CALL>,\n\n // Contains the last key validation request for each key type. This is used to cache the last request and avoid\n // fetching the same request multiple times.\n // The index of the array corresponds to the key type (0 nullifier, 1 incoming, 2 outgoing, 3 tagging).\n pub last_key_validation_requests: [Option<KeyValidationRequest>; NUM_KEY_TYPES],\n}\n\nimpl PrivateContext {\n pub fn new(inputs: PrivateContextInputs, args_hash: Field) -> PrivateContext {\n PrivateContext {\n inputs,\n side_effect_counter: inputs.start_side_effect_counter + 1,\n min_revertible_side_effect_counter: 0,\n is_fee_payer: false,\n args_hash,\n return_hash: 0,\n max_block_number: MaxBlockNumber::empty(),\n note_hash_read_requests: BoundedVec::new(),\n nullifier_read_requests: BoundedVec::new(),\n key_validation_requests_and_generators: BoundedVec::new(),\n note_hashes: BoundedVec::new(),\n nullifiers: BoundedVec::new(),\n historical_header: inputs.historical_header,\n private_call_requests: BoundedVec::new(),\n public_call_requests: BoundedVec::new(),\n public_teardown_call_request: PublicCallRequest::empty(),\n l2_to_l1_msgs: BoundedVec::new(),\n private_logs: BoundedVec::new(),\n contract_class_logs_hashes: BoundedVec::new(),\n last_key_validation_requests: [Option::none(); NUM_KEY_TYPES],\n }\n }\n\n pub fn msg_sender(self) -> AztecAddress {\n self.inputs.call_context.msg_sender\n }\n\n pub fn this_address(self) -> AztecAddress {\n self.inputs.call_context.contract_address\n }\n\n pub fn chain_id(self) -> Field {\n self.inputs.tx_context.chain_id\n }\n\n pub fn version(self) -> Field {\n self.inputs.tx_context.version\n }\n\n pub fn selector(self) -> FunctionSelector {\n self.inputs.call_context.function_selector\n }\n\n pub fn get_args_hash(self) -> Field {\n self.args_hash\n }\n\n pub fn push_note_hash(&mut self, note_hash: Field) {\n self.note_hashes.push(NoteHash { value: note_hash, counter: self.next_counter() });\n\n // WARNING(https://github.com/AztecProtocol/aztec-packages/issues/10558): if you delete this debug_log_format line, some tests fail.\n debug_log_format(\n \"Context.note_hashes, after pushing new note hash: {0}\",\n self.note_hashes.storage().map(|nh: NoteHash| nh.value),\n );\n }\n\n pub fn push_nullifier(&mut self, nullifier: Field) {\n self.nullifiers.push(\n Nullifier { value: nullifier, note_hash: 0, counter: self.next_counter() },\n );\n }\n\n pub fn push_nullifier_for_note_hash(&mut self, nullifier: Field, nullified_note_hash: Field) {\n self.nullifiers.push(\n Nullifier {\n value: nullifier,\n note_hash: nullified_note_hash,\n counter: self.next_counter(),\n },\n );\n }\n\n // Returns the header of a block whose state is used during private execution (not the block the transaction is\n // included in).\n pub fn get_block_header(self) -> BlockHeader {\n self.historical_header\n }\n\n // Returns the header of an arbitrary block whose block number is less than or equal to the block number\n // of historical header.\n pub fn get_block_header_at(self, block_number: u32) -> BlockHeader {\n get_block_header_at(block_number, self)\n }\n\n pub fn set_return_hash(&mut self, returns_hasher: ArgsHasher) {\n pack_returns(returns_hasher.fields);\n self.return_hash = returns_hasher.hash();\n }\n\n pub fn finish(self) -> PrivateCircuitPublicInputs {\n PrivateCircuitPublicInputs {\n call_context: self.inputs.call_context,\n args_hash: self.args_hash,\n returns_hash: self.return_hash,\n min_revertible_side_effect_counter: self.min_revertible_side_effect_counter,\n is_fee_payer: self.is_fee_payer,\n max_block_number: self.max_block_number,\n note_hash_read_requests: self.note_hash_read_requests.storage(),\n nullifier_read_requests: self.nullifier_read_requests.storage(),\n key_validation_requests_and_generators: self\n .key_validation_requests_and_generators\n .storage(),\n note_hashes: self.note_hashes.storage(),\n nullifiers: self.nullifiers.storage(),\n private_call_requests: self.private_call_requests.storage(),\n public_call_requests: self.public_call_requests.storage(),\n public_teardown_call_request: self.public_teardown_call_request,\n l2_to_l1_msgs: self.l2_to_l1_msgs.storage(),\n start_side_effect_counter: self.inputs.start_side_effect_counter,\n end_side_effect_counter: self.side_effect_counter,\n private_logs: self.private_logs.storage(),\n contract_class_logs_hashes: self.contract_class_logs_hashes.storage(),\n historical_header: self.historical_header,\n tx_context: self.inputs.tx_context,\n }\n }\n\n pub fn set_as_fee_payer(&mut self) {\n dep::protocol_types::debug_log::debug_log_format(\n \"Setting {0} as fee payer\",\n [self.this_address().to_field()],\n );\n self.is_fee_payer = true;\n }\n\n pub fn end_setup(&mut self) {\n // dep::protocol_types::debug_log::debug_log_format(\n // \"Ending setup at counter {0}\",\n // [self.side_effect_counter as Field]\n // );\n self.min_revertible_side_effect_counter = self.side_effect_counter;\n notify_set_min_revertible_side_effect_counter(self.min_revertible_side_effect_counter);\n }\n\n // docs:start:max-block-number\n pub fn set_tx_max_block_number(&mut self, max_block_number: u32) {\n // docs:end:max-block-number\n self.max_block_number =\n MaxBlockNumber::min_with_u32(self.max_block_number, max_block_number);\n }\n\n pub fn push_note_hash_read_request(&mut self, note_hash: Field) {\n let side_effect = ReadRequest { value: note_hash, counter: self.next_counter() };\n self.note_hash_read_requests.push(side_effect);\n }\n\n pub fn push_nullifier_read_request(&mut self, nullifier: Field) {\n let request = ReadRequest { value: nullifier, counter: self.next_counter() };\n self.nullifier_read_requests.push(request);\n }\n\n pub fn request_nsk_app(&mut self, npk_m_hash: Field) -> Field {\n self.request_sk_app(npk_m_hash, NULLIFIER_INDEX)\n }\n\n pub fn request_ovsk_app(&mut self, ovpk_m_hash: Field) -> Field {\n self.request_sk_app(ovpk_m_hash, OUTGOING_INDEX)\n }\n\n fn request_sk_app(&mut self, pk_m_hash: Field, key_index: Field) -> Field {\n let cached_request =\n self.last_key_validation_requests[key_index].unwrap_or(KeyValidationRequest::empty());\n\n if cached_request.pk_m.hash() == pk_m_hash {\n // We get a match so the cached request is the latest one\n cached_request.sk_app\n } else {\n // We didn't get a match meaning the cached result is stale\n // Typically we'd validate keys by showing that they are the preimage of `pk_m_hash`, but that'd require\n // the oracle returning the master secret keys, which could cause malicious contracts to leak it or learn\n // about secrets from other contracts. We therefore silo secret keys, and rely on the private kernel to\n // validate that we siloed secret key corresponds to correct siloing of the master secret key that hashes\n // to `pk_m_hash`.\n let request = unsafe { get_key_validation_request(pk_m_hash, key_index) };\n assert(request.pk_m.hash() == pk_m_hash);\n\n self.key_validation_requests_and_generators.push(\n KeyValidationRequestAndGenerator {\n request,\n sk_app_generator: sk_generators[key_index],\n },\n );\n self.last_key_validation_requests[key_index] = Option::some(request);\n request.sk_app\n }\n }\n\n // docs:start:context_message_portal\n pub fn message_portal(&mut self, recipient: EthAddress, content: Field) {\n // docs:end:context_message_portal\n let message = L2ToL1Message { recipient, content, counter: self.next_counter() };\n self.l2_to_l1_msgs.push(message);\n }\n\n // docs:start:context_consume_l1_to_l2_message\n // docs:start:consume_l1_to_l2_message\n pub fn consume_l1_to_l2_message(\n &mut self,\n content: Field,\n secret: Field,\n sender: EthAddress,\n leaf_index: Field,\n ) {\n // docs:end:context_consume_l1_to_l2_message\n let nullifier = process_l1_to_l2_message(\n self.historical_header.state.l1_to_l2_message_tree.root,\n self.this_address(),\n sender,\n self.chain_id(),\n self.version(),\n content,\n secret,\n leaf_index,\n );\n\n // Push nullifier (and the \"commitment\" corresponding to this can be \"empty\")\n self.push_nullifier(nullifier)\n }\n // docs:end:consume_l1_to_l2_message\n\n pub fn emit_private_log(&mut self, log: [Field; PRIVATE_LOG_SIZE_IN_FIELDS]) {\n let counter = self.next_counter();\n let private_log = PrivateLogData { log: Log::new(log), note_hash_counter: 0, counter };\n self.private_logs.push(private_log);\n }\n\n pub fn emit_raw_note_log(\n &mut self,\n log: [Field; PRIVATE_LOG_SIZE_IN_FIELDS],\n note_hash_counter: u32,\n ) {\n let counter = self.next_counter();\n let private_log = PrivateLogData { log: Log::new(log), note_hash_counter, counter };\n self.private_logs.push(private_log);\n }\n\n pub fn call_private_function<let ARGS_COUNT: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) -> PackedReturns {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.call_private_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n false,\n )\n }\n\n pub fn static_call_private_function<let ARGS_COUNT: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) -> PackedReturns {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.call_private_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n true,\n )\n }\n\n pub fn call_private_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) -> PackedReturns {\n self.call_private_function_with_packed_args(contract_address, function_selector, 0, false)\n }\n\n pub fn static_call_private_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) -> PackedReturns {\n self.call_private_function_with_packed_args(contract_address, function_selector, 0, true)\n }\n\n pub fn call_private_function_with_packed_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n is_static_call: bool,\n ) -> PackedReturns {\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n let start_side_effect_counter = self.side_effect_counter;\n\n // The oracle simulates the private call and returns the value of the side effects counter after execution of\n // the call (which means that end_side_effect_counter - start_side_effect_counter is the number of side effects\n // that took place), along with the hash of the return values. We validate these by requesting a private kernel\n // iteration in which the return values are constrained to hash to `returns_hash` and the side effects counter\n // to increment from start to end.\n let (end_side_effect_counter, returns_hash) = unsafe {\n call_private_function_internal(\n contract_address,\n function_selector,\n args_hash,\n start_side_effect_counter,\n is_static_call,\n )\n };\n\n self.private_call_requests.push(\n PrivateCallRequest {\n call_context: CallContext {\n msg_sender: self.this_address(),\n contract_address,\n function_selector,\n is_static_call,\n },\n args_hash,\n returns_hash,\n start_side_effect_counter,\n end_side_effect_counter,\n },\n );\n\n // TODO (fees) figure out why this crashes the prover and enable it\n // we need this in order to pay fees inside child call contexts\n // assert(\n // (item.public_inputs.min_revertible_side_effect_counter == 0 as u32)\n // | (item.public_inputs.min_revertible_side_effect_counter\n // > self.min_revertible_side_effect_counter)\n // );\n // if item.public_inputs.min_revertible_side_effect_counter\n // > self.min_revertible_side_effect_counter {\n // self.min_revertible_side_effect_counter = item.public_inputs.min_revertible_side_effect_counter;\n // }\n self.side_effect_counter = end_side_effect_counter + 1;\n PackedReturns::new(returns_hash)\n }\n\n pub fn call_public_function<let ARGS_COUNT: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.call_public_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n false,\n )\n }\n\n pub fn static_call_public_function<let ARGS_COUNT: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.call_public_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n true,\n )\n }\n\n pub fn call_public_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) {\n self.call_public_function_with_packed_args(contract_address, function_selector, 0, false)\n }\n\n pub fn static_call_public_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) {\n self.call_public_function_with_packed_args(contract_address, function_selector, 0, true)\n }\n\n pub fn call_public_function_with_packed_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n is_static_call: bool,\n ) {\n let counter = self.next_counter();\n\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n // TODO(https://github.com/AztecProtocol/aztec-packages/issues/8985): Fix this.\n // WARNING: This is insecure and should be temporary!\n // The oracle repacks the arguments and returns a new args_hash.\n // new_args = [selector, ...old_args], so as to make it suitable to call the public dispatch function.\n // We don't validate or compute it in the circuit because a) it's harder to do with slices, and\n // b) this is only temporary.\n let args_hash = enqueue_public_function_call_internal(\n contract_address,\n function_selector,\n args_hash,\n counter,\n is_static_call,\n );\n\n // Public calls are rerouted through the dispatch function.\n let function_selector = comptime { FunctionSelector::from_field(PUBLIC_DISPATCH_SELECTOR) };\n\n let call_request = PublicCallRequest {\n msg_sender: self.this_address(),\n contract_address,\n function_selector,\n is_static_call,\n args_hash,\n };\n\n self.public_call_requests.push(Counted::new(call_request, counter));\n }\n\n pub fn set_public_teardown_function<let ARGS_COUNT: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.set_public_teardown_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n false,\n )\n }\n\n pub fn set_public_teardown_function_with_packed_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n is_static_call: bool,\n ) {\n let counter = self.next_counter();\n\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n // TODO(https://github.com/AztecProtocol/aztec-packages/issues/8985): Fix this.\n // WARNING: This is insecure and should be temporary!\n // The oracle repacks the arguments and returns a new args_hash.\n // new_args = [selector, ...old_args], so as to make it suitable to call the public dispatch function.\n // We don't validate or compute it in the circuit because a) it's harder to do with slices, and\n // b) this is only temporary.\n let args_hash = set_public_teardown_function_call_internal(\n contract_address,\n function_selector,\n args_hash,\n counter,\n is_static_call,\n );\n\n let function_selector = comptime { FunctionSelector::from_field(PUBLIC_DISPATCH_SELECTOR) };\n\n self.public_teardown_call_request = PublicCallRequest {\n msg_sender: self.this_address(),\n contract_address,\n function_selector,\n is_static_call,\n args_hash,\n };\n }\n\n fn next_counter(&mut self) -> u32 {\n let counter = self.side_effect_counter;\n self.side_effect_counter += 1;\n counter\n }\n}\n\nimpl Empty for PrivateContext {\n fn empty() -> Self {\n PrivateContext {\n inputs: PrivateContextInputs::empty(),\n side_effect_counter: 0 as u32,\n min_revertible_side_effect_counter: 0 as u32,\n is_fee_payer: false,\n args_hash: 0,\n return_hash: 0,\n max_block_number: MaxBlockNumber::empty(),\n note_hash_read_requests: BoundedVec::new(),\n nullifier_read_requests: BoundedVec::new(),\n key_validation_requests_and_generators: BoundedVec::new(),\n note_hashes: BoundedVec::new(),\n nullifiers: BoundedVec::new(),\n private_call_requests: BoundedVec::new(),\n public_call_requests: BoundedVec::new(),\n public_teardown_call_request: PublicCallRequest::empty(),\n l2_to_l1_msgs: BoundedVec::new(),\n historical_header: BlockHeader::empty(),\n private_logs: BoundedVec::new(),\n contract_class_logs_hashes: BoundedVec::new(),\n last_key_validation_requests: [Option::none(); NUM_KEY_TYPES],\n }\n }\n}\n"
|
|
3636
|
+
},
|
|
3637
|
+
"69": {
|
|
3702
3638
|
"path": "/usr/src/noir-projects/aztec-nr/aztec/src/context/call_interfaces.nr",
|
|
3703
3639
|
"source": "use dep::protocol_types::{\n abis::function_selector::FunctionSelector, address::AztecAddress, traits::Deserialize,\n};\n\nuse crate::context::{gas::GasOpts, private_context::PrivateContext, public_context::PublicContext};\n\nuse crate::hash::hash_args;\nuse crate::oracle::arguments::pack_arguments;\n\npub trait CallInterface<let N: u32> {\n fn get_args(self) -> [Field] {\n self.args\n }\n\n fn get_selector(self) -> FunctionSelector {\n self.selector\n }\n\n fn get_name(self) -> str<N> {\n self.name\n }\n\n fn get_contract_address(self) -> AztecAddress {\n self.target_contract\n }\n\n fn get_is_static(self) -> bool {\n self.is_static\n }\n}\n\npub struct PrivateCallInterface<let N: u32, T> {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str<N>,\n pub args_hash: Field,\n pub args: [Field],\n pub return_type: T,\n pub is_static: bool,\n}\n\nimpl<let N: u32, T> PrivateCallInterface<N, T> {\n pub fn call<let M: u32>(self, context: &mut PrivateContext) -> T\n where\n T: Deserialize<M>,\n {\n pack_arguments(self.args);\n let returns = context.call_private_function_with_packed_args(\n self.target_contract,\n self.selector,\n self.args_hash,\n false,\n );\n let unpacked: T = returns.unpack_into();\n unpacked\n }\n\n pub fn view<let M: u32>(self, context: &mut PrivateContext) -> T\n where\n T: Deserialize<M>,\n {\n pack_arguments(self.args);\n let returns = context.call_private_function_with_packed_args(\n self.target_contract,\n self.selector,\n self.args_hash,\n true,\n );\n returns.unpack_into()\n }\n}\n\nimpl<let N: u32> CallInterface<N> for PrivateVoidCallInterface<N> {}\n\npub struct PrivateVoidCallInterface<let N: u32> {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str<N>,\n pub args_hash: Field,\n pub args: [Field],\n pub return_type: (),\n pub is_static: bool,\n}\n\nimpl<let N: u32> PrivateVoidCallInterface<N> {\n pub fn call(self, context: &mut PrivateContext) {\n pack_arguments(self.args);\n context\n .call_private_function_with_packed_args(\n self.target_contract,\n self.selector,\n self.args_hash,\n false,\n )\n .assert_empty();\n }\n\n pub fn view(self, context: &mut PrivateContext) {\n pack_arguments(self.args);\n context\n .call_private_function_with_packed_args(\n self.target_contract,\n self.selector,\n self.args_hash,\n true,\n )\n .assert_empty();\n }\n}\n\nimpl<let N: u32, T> CallInterface<N> for PrivateStaticCallInterface<N, T> {}\n\npub struct PrivateStaticCallInterface<let N: u32, T> {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str<N>,\n pub args_hash: Field,\n pub args: [Field],\n pub return_type: T,\n pub is_static: bool,\n}\n\nimpl<let N: u32, T> PrivateStaticCallInterface<N, T> {\n pub fn view<let M: u32>(self, context: &mut PrivateContext) -> T\n where\n T: Deserialize<M>,\n {\n pack_arguments(self.args);\n let returns = context.call_private_function_with_packed_args(\n self.target_contract,\n self.selector,\n self.args_hash,\n true,\n );\n returns.unpack_into()\n }\n}\n\nimpl<let N: u32> CallInterface<N> for PrivateStaticVoidCallInterface<N> {}\n\npub struct PrivateStaticVoidCallInterface<let N: u32> {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str<N>,\n pub args_hash: Field,\n pub args: [Field],\n pub return_type: (),\n pub is_static: bool,\n}\n\nimpl<let N: u32> PrivateStaticVoidCallInterface<N> {\n pub fn view(self, context: &mut PrivateContext) {\n pack_arguments(self.args);\n context\n .call_private_function_with_packed_args(\n self.target_contract,\n self.selector,\n self.args_hash,\n true,\n )\n .assert_empty();\n }\n}\n\nimpl<let N: u32, T> CallInterface<N> for PublicCallInterface<N, T> {}\n\npub struct PublicCallInterface<let N: u32, T> {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str<N>,\n pub args: [Field],\n pub gas_opts: GasOpts,\n pub return_type: T,\n pub is_static: bool,\n}\n\nimpl<let N: u32, T> PublicCallInterface<N, T> {\n pub fn with_gas(self: &mut Self, gas_opts: GasOpts) -> &mut Self {\n self.gas_opts = gas_opts;\n self\n }\n\n pub unconstrained fn call<let M: u32>(self, context: &mut PublicContext) -> T\n where\n T: Deserialize<M>,\n {\n let returns = context.call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n Deserialize::deserialize(returns.as_array::<M>())\n }\n\n pub unconstrained fn view<let M: u32>(self, context: &mut PublicContext) -> T\n where\n T: Deserialize<M>,\n {\n let returns = context.static_call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n Deserialize::deserialize(returns.as_array::<M>())\n }\n\n pub fn enqueue(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n pack_arguments(self.args);\n context.call_public_function_with_packed_args(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n false,\n )\n }\n\n pub fn enqueue_view(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n pack_arguments(self.args);\n context.call_public_function_with_packed_args(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n true,\n )\n }\n}\n\nimpl<let N: u32> CallInterface<N> for PublicVoidCallInterface<N> {}\n\npub struct PublicVoidCallInterface<let N: u32> {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str<N>,\n pub args: [Field],\n pub return_type: (),\n pub is_static: bool,\n pub gas_opts: GasOpts,\n}\n\nimpl<let N: u32> PublicVoidCallInterface<N> {\n pub fn with_gas(self: &mut Self, gas_opts: GasOpts) -> &mut Self {\n self.gas_opts = gas_opts;\n self\n }\n\n pub unconstrained fn call(self, context: &mut PublicContext) {\n let returns = context.call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n assert(returns.len() == 0);\n }\n\n pub unconstrained fn view(self, context: &mut PublicContext) {\n let returns = context.static_call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n assert(returns.len() == 0);\n }\n\n pub fn enqueue(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n pack_arguments(self.args);\n context.call_public_function_with_packed_args(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n false,\n )\n }\n\n pub fn enqueue_view(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n pack_arguments(self.args);\n context.call_public_function_with_packed_args(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n true,\n )\n }\n}\n\nimpl<let N: u32, T> CallInterface<N> for PublicStaticCallInterface<N, T> {}\n\npub struct PublicStaticCallInterface<let N: u32, T> {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str<N>,\n pub args: [Field],\n pub return_type: T,\n pub is_static: bool,\n pub gas_opts: GasOpts,\n}\n\nimpl<let N: u32, T> PublicStaticCallInterface<N, T> {\n pub fn with_gas(self: &mut Self, gas_opts: GasOpts) -> &mut Self {\n self.gas_opts = gas_opts;\n self\n }\n\n pub unconstrained fn view<let M: u32>(self, context: &mut PublicContext) -> T\n where\n T: Deserialize<M>,\n {\n let returns = context.static_call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n Deserialize::deserialize(returns.as_array::<M>())\n }\n\n pub fn enqueue_view(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n pack_arguments(self.args);\n context.call_public_function_with_packed_args(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n true,\n )\n }\n}\n\nimpl<let N: u32> CallInterface<N> for PublicStaticVoidCallInterface<N> {}\n\npub struct PublicStaticVoidCallInterface<let N: u32> {\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<N>,\n args: [Field],\n return_type: (),\n is_static: bool,\n gas_opts: GasOpts,\n}\n\nimpl<let N: u32> PublicStaticVoidCallInterface<N> {\n pub fn with_gas(self: &mut Self, gas_opts: GasOpts) -> &mut Self {\n self.gas_opts = gas_opts;\n self\n }\n\n pub unconstrained fn view(self, context: &mut PublicContext) {\n let returns = context.static_call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n assert(returns.len() == 0);\n }\n\n pub fn enqueue_view(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n pack_arguments(self.args);\n context.call_public_function_with_packed_args(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n true,\n )\n }\n}\n"
|
|
3704
3640
|
},
|
|
3705
|
-
"
|
|
3706
|
-
"path": "/usr/src/noir-projects/aztec-nr/aztec/src/oracle/notes.nr",
|
|
3707
|
-
"source": "use crate::note::{note_header::NoteHeader, note_interface::NoteInterface};\n\nuse dep::protocol_types::{\n address::AztecAddress,\n indexed_tagging_secret::{INDEXED_TAGGING_SECRET_LENGTH, IndexedTaggingSecret},\n utils::arr_copy_slice,\n};\n\n/// Notifies the simulator that a note has been created, so that it can be returned in future read requests in the same\n/// transaction. This note should only be added to the non-volatile database if found in an actual block.\npub fn notify_created_note<let N: u32>(\n storage_slot: Field,\n note_type_id: Field,\n serialized_note: [Field; N],\n note_hash: Field,\n counter: u32,\n) {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call.\n unsafe {\n notify_created_note_oracle_wrapper(\n storage_slot,\n note_type_id,\n serialized_note,\n note_hash,\n counter,\n )\n };\n}\n\n/// Notifies the simulator that a note has been nullified, so that it is no longer returned in future read requests in\n/// the same transaction. This note should only be removed to the non-volatile database if its nullifier is found in an\n/// actual block.\npub fn notify_nullified_note(nullifier: Field, note_hash: Field, counter: u32) {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call.\n unsafe { notify_nullified_note_oracle_wrapper(nullifier, note_hash, counter) };\n}\n\nunconstrained fn notify_created_note_oracle_wrapper<let N: u32>(\n storage_slot: Field,\n note_type_id: Field,\n serialized_note: [Field; N],\n note_hash: Field,\n counter: u32,\n) {\n let _ = notify_created_note_oracle(\n storage_slot,\n note_type_id,\n serialized_note,\n note_hash,\n counter,\n );\n}\n\n#[oracle(notifyCreatedNote)]\nunconstrained fn notify_created_note_oracle<let N: u32>(\n _storage_slot: Field,\n _note_type_id: Field,\n _serialized_note: [Field; N],\n _note_hash: Field,\n _counter: u32,\n) -> Field {}\n\nunconstrained fn notify_nullified_note_oracle_wrapper(\n nullifier: Field,\n note_hash: Field,\n counter: u32,\n) {\n let _ = notify_nullified_note_oracle(nullifier, note_hash, counter);\n}\n\n#[oracle(notifyNullifiedNote)]\nunconstrained fn notify_nullified_note_oracle(\n _nullifier: Field,\n _note_hash: Field,\n _counter: u32,\n) -> Field {}\n\n#[oracle(getNotes)]\nunconstrained fn get_notes_oracle<let N: u32, let S: u32>(\n _storage_slot: Field,\n _num_selects: u8,\n _select_by_indexes: [u8; N],\n _select_by_offsets: [u8; N],\n _select_by_lengths: [u8; N],\n _select_values: [Field; N],\n _select_comparators: [u8; N],\n _sort_by_indexes: [u8; N],\n _sort_by_offsets: [u8; N],\n _sort_by_lengths: [u8; N],\n _sort_order: [u8; N],\n _limit: u32,\n _offset: u32,\n _status: u8,\n _return_size: u32,\n _placeholder_fields: [Field; S],\n) -> [Field; S] {}\n\nunconstrained fn get_notes_oracle_wrapper<let N: u32, let S: u32>(\n storage_slot: Field,\n num_selects: u8,\n select_by_indexes: [u8; N],\n select_by_offsets: [u8; N],\n select_by_lengths: [u8; N],\n select_values: [Field; N],\n select_comparators: [u8; N],\n sort_by_indexes: [u8; N],\n sort_by_offsets: [u8; N],\n sort_by_lengths: [u8; N],\n sort_order: [u8; N],\n limit: u32,\n offset: u32,\n status: u8,\n mut placeholder_fields: [Field; S],\n) -> [Field; S] {\n let return_size = placeholder_fields.len() as u32;\n get_notes_oracle(\n storage_slot,\n num_selects,\n select_by_indexes,\n select_by_offsets,\n select_by_lengths,\n select_values,\n select_comparators,\n sort_by_indexes,\n sort_by_offsets,\n sort_by_lengths,\n sort_order,\n limit,\n offset,\n status,\n return_size,\n placeholder_fields,\n )\n}\n\npub unconstrained fn get_notes<Note, let N: u32, let M: u32, let S: u32, let NS: u32>(\n storage_slot: Field,\n num_selects: u8,\n select_by_indexes: [u8; M],\n select_by_offsets: [u8; M],\n select_by_lengths: [u8; M],\n select_values: [Field; M],\n select_comparators: [u8; M],\n sort_by_indexes: [u8; M],\n sort_by_offsets: [u8; M],\n sort_by_lengths: [u8; M],\n sort_order: [u8; M],\n limit: u32,\n offset: u32,\n status: u8,\n mut placeholder_opt_notes: [Option<Note>; S], // TODO: Remove it and use `limit` to initialize the note array.\n placeholder_fields: [Field; NS], // TODO: Remove it and use `limit` to initialize the note array.\n _placeholder_note_length: [Field; N], // Turbofish hack? Compiler breaks calculating read_offset unless we add this parameter\n) -> [Option<Note>; S]\nwhere\n Note: NoteInterface<N>,\n{\n sync_notes_oracle_wrapper();\n let fields = get_notes_oracle_wrapper(\n storage_slot,\n num_selects,\n select_by_indexes,\n select_by_offsets,\n select_by_lengths,\n select_values,\n select_comparators,\n sort_by_indexes,\n sort_by_offsets,\n sort_by_lengths,\n sort_order,\n limit,\n offset,\n status,\n placeholder_fields,\n );\n let num_notes = fields[0] as u32;\n let contract_address = AztecAddress::from_field(fields[1]);\n for i in 0..placeholder_opt_notes.len() {\n if i < num_notes {\n // lengths named as per typescript.\n let return_header_length: u32 = 2; // num_notes & contract_address.\n let extra_preimage_length: u32 = 2; // nonce & note_hash_counter.\n let read_offset: u32 = return_header_length + i * (N + extra_preimage_length);\n let nonce = fields[read_offset];\n let note_hash_counter = fields[read_offset + 1] as u32;\n let header = NoteHeader { contract_address, nonce, storage_slot, note_hash_counter };\n let serialized_note = arr_copy_slice(fields, [0; N], read_offset + 2);\n let mut note = Note::deserialize_content(serialized_note);\n note.set_header(header);\n placeholder_opt_notes[i] = Option::some(note);\n };\n }\n placeholder_opt_notes\n}\n\n/// Returns true if the nullifier exists. Note that a `true` value can be constrained by proving existence of the\n/// nullifier, but a `false` value should not be relied upon since other transactions may emit this nullifier before the\n/// current transaction is included in a block. While this might seem of little use at first, certain design patterns\n/// benefit from this abstraction (see e.g. `PrivateMutable`).\npub unconstrained fn check_nullifier_exists(inner_nullifier: Field) -> bool {\n check_nullifier_exists_oracle(inner_nullifier) == 1\n}\n\n#[oracle(checkNullifierExists)]\nunconstrained fn check_nullifier_exists_oracle(_inner_nullifier: Field) -> Field {}\n\n/// Same as `get_app_tagging_secret_as_sender`, except it returns the derived tag as an array of bytes, ready to be included in a\n/// log.\npub unconstrained fn get_app_tag_bytes_as_sender(\n sender: AztecAddress,\n recipient: AztecAddress,\n) -> [u8; 32] {\n let tag = get_app_tagging_secret_as_sender(sender, recipient).compute_tag(recipient);\n tag.to_be_bytes()\n}\n\n/// Returns the tagging secret for a given sender and recipient pair, siloed for the current contract address.\n/// Includes the last known index used to send a note tagged with this secret.\n/// For this to work, PXE must know the ivpsk_m of the sender.\n/// For the recipient's side, only the address is needed.\npub unconstrained fn get_app_tagging_secret_as_sender(\n sender: AztecAddress,\n recipient: AztecAddress,\n) -> IndexedTaggingSecret {\n let result = get_app_tagging_secret_as_sender_oracle(sender, recipient);\n IndexedTaggingSecret::deserialize(result)\n}\n\n#[oracle(getAppTaggingSecretAsSender)]\nunconstrained fn get_app_tagging_secret_as_sender_oracle(\n _sender: AztecAddress,\n _recipient: AztecAddress,\n) -> [Field; INDEXED_TAGGING_SECRET_LENGTH] {}\n\n/// Notifies the simulator that a tag has been used in a note, and to therefore increment the associated index so that\n/// future notes get a different tag and can be discovered by the recipient.\n/// This change should only be persisted in a non-volatile database if the tagged log is found in an actual block -\n/// otherwise e.g. a reverting transaction can cause the sender to accidentally skip indices and later produce notes\n/// that are not found by the recipient.\npub fn increment_app_tagging_secret_index_as_sender(sender: AztecAddress, recipient: AztecAddress) {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call.\n unsafe {\n increment_app_tagging_secret_index_as_sender_wrapper(sender, recipient);\n }\n}\n\nunconstrained fn increment_app_tagging_secret_index_as_sender_wrapper(\n sender: AztecAddress,\n recipient: AztecAddress,\n) {\n increment_app_tagging_secret_index_as_sender_oracle(sender, recipient);\n}\n\n#[oracle(incrementAppTaggingSecretIndexAsSender)]\nunconstrained fn increment_app_tagging_secret_index_as_sender_oracle(\n _sender: AztecAddress,\n _recipient: AztecAddress,\n) {}\n\n/// Finds new notes that may have been sent to all registered accounts in PXE in the current contract and makes them available\n/// for later querying via the `get_notes` oracle.\npub fn sync_notes() {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call.\n unsafe {\n sync_notes_oracle_wrapper();\n }\n}\n\nunconstrained fn sync_notes_oracle_wrapper() {\n sync_notes_oracle();\n}\n\n#[oracle(syncNotes)]\nunconstrained fn sync_notes_oracle() {}\n"
|
|
3708
|
-
},
|
|
3709
|
-
"127": {
|
|
3641
|
+
"82": {
|
|
3710
3642
|
"path": "/usr/src/noir-projects/aztec-nr/aztec/src/oracle/arguments.nr",
|
|
3711
3643
|
"source": "/// Notifies the simulator that `args` will later be used at some point during execution, referenced by their hash. This\n/// allows the simulator to know how to respond to this future request.\n///\n/// This is only used during private execution, since in public it is the VM itself that keeps track of arguments.\npub fn pack_arguments(args: [Field]) {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call. When\n // unpacking however the caller must check that the returned value is indeed the preimage.\n unsafe { pack_arguments_oracle_wrapper(args) };\n}\n\n/// Same as `pack_arguments`, but using arrays instead of slices.\npub fn pack_arguments_array<let N: u32>(args: [Field; N]) {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call. When\n // unpacking however the caller must check that the returned value is indeed the preimage.\n unsafe { pack_arguments_array_oracle_wrapper(args) };\n}\n\nunconstrained fn pack_arguments_oracle_wrapper(args: [Field]) {\n let _ = pack_arguments_oracle(args);\n}\n\nunconstrained fn pack_arguments_array_oracle_wrapper<let N: u32>(args: [Field; N]) {\n let _ = pack_arguments_array_oracle(args);\n}\n\n#[oracle(packArguments)]\nunconstrained fn pack_arguments_oracle(_args: [Field]) -> Field {}\n\n#[oracle(packArgumentsArray)]\nunconstrained fn pack_arguments_array_oracle<let N: u32>(_args: [Field; N]) -> Field {}\n"
|
|
3712
3644
|
},
|
|
3713
|
-
"
|
|
3645
|
+
"87": {
|
|
3714
3646
|
"path": "/usr/src/noir-projects/aztec-nr/aztec/src/oracle/enqueue_public_function_call.nr",
|
|
3715
3647
|
"source": "use dep::protocol_types::{abis::function_selector::FunctionSelector, address::AztecAddress};\n\n#[oracle(enqueuePublicFunctionCall)]\nunconstrained fn enqueue_public_function_call_oracle(\n _contract_address: AztecAddress,\n _function_selector: FunctionSelector,\n _args_hash: Field,\n _side_effect_counter: u32,\n _is_static_call: bool,\n) -> Field {}\n\npub unconstrained fn enqueue_public_function_call_internal(\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n side_effect_counter: u32,\n is_static_call: bool,\n) -> Field {\n enqueue_public_function_call_oracle(\n contract_address,\n function_selector,\n args_hash,\n side_effect_counter,\n is_static_call,\n )\n}\n\n#[oracle(setPublicTeardownFunctionCall)]\nunconstrained fn set_public_teardown_function_call_oracle(\n _contract_address: AztecAddress,\n _function_selector: FunctionSelector,\n _args_hash: Field,\n _side_effect_counter: u32,\n _is_static_call: bool,\n) -> Field {}\n\npub unconstrained fn set_public_teardown_function_call_internal(\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n side_effect_counter: u32,\n is_static_call: bool,\n) -> Field {\n set_public_teardown_function_call_oracle(\n contract_address,\n function_selector,\n args_hash,\n side_effect_counter,\n is_static_call,\n )\n}\n\npub fn notify_set_min_revertible_side_effect_counter(counter: u32) {\n unsafe { notify_set_min_revertible_side_effect_counter_oracle_wrapper(counter) };\n}\n\npub unconstrained fn notify_set_min_revertible_side_effect_counter_oracle_wrapper(counter: u32) {\n notify_set_min_revertible_side_effect_counter_oracle(counter);\n}\n\n#[oracle(notifySetMinRevertibleSideEffectCounter)]\nunconstrained fn notify_set_min_revertible_side_effect_counter_oracle(_counter: u32) {}\n"
|
|
3716
3648
|
},
|
|
3717
|
-
"
|
|
3718
|
-
"path": "/usr/src/noir-projects/aztec-nr/aztec/src/
|
|
3719
|
-
"source": "use crate::
|
|
3649
|
+
"91": {
|
|
3650
|
+
"path": "/usr/src/noir-projects/aztec-nr/aztec/src/oracle/notes.nr",
|
|
3651
|
+
"source": "use crate::{note::{note_header::NoteHeader, note_interface::NoteInterface}, utils::array};\n\nuse dep::protocol_types::{\n address::AztecAddress,\n indexed_tagging_secret::{INDEXED_TAGGING_SECRET_LENGTH, IndexedTaggingSecret},\n};\n\n/// Notifies the simulator that a note has been created, so that it can be returned in future read requests in the same\n/// transaction. This note should only be added to the non-volatile database if found in an actual block.\npub fn notify_created_note<let N: u32>(\n storage_slot: Field,\n note_type_id: Field,\n serialized_note: [Field; N],\n note_hash: Field,\n counter: u32,\n) {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call.\n unsafe {\n notify_created_note_oracle_wrapper(\n storage_slot,\n note_type_id,\n serialized_note,\n note_hash,\n counter,\n )\n };\n}\n\n/// Notifies the simulator that a note has been nullified, so that it is no longer returned in future read requests in\n/// the same transaction. This note should only be removed to the non-volatile database if its nullifier is found in an\n/// actual block.\npub fn notify_nullified_note(nullifier: Field, note_hash: Field, counter: u32) {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call.\n unsafe { notify_nullified_note_oracle_wrapper(nullifier, note_hash, counter) };\n}\n\nunconstrained fn notify_created_note_oracle_wrapper<let N: u32>(\n storage_slot: Field,\n note_type_id: Field,\n serialized_note: [Field; N],\n note_hash: Field,\n counter: u32,\n) {\n let _ = notify_created_note_oracle(\n storage_slot,\n note_type_id,\n serialized_note,\n note_hash,\n counter,\n );\n}\n\n#[oracle(notifyCreatedNote)]\nunconstrained fn notify_created_note_oracle<let N: u32>(\n _storage_slot: Field,\n _note_type_id: Field,\n _serialized_note: [Field; N],\n _note_hash: Field,\n _counter: u32,\n) -> Field {}\n\nunconstrained fn notify_nullified_note_oracle_wrapper(\n nullifier: Field,\n note_hash: Field,\n counter: u32,\n) {\n let _ = notify_nullified_note_oracle(nullifier, note_hash, counter);\n}\n\n#[oracle(notifyNullifiedNote)]\nunconstrained fn notify_nullified_note_oracle(\n _nullifier: Field,\n _note_hash: Field,\n _counter: u32,\n) -> Field {}\n\n#[oracle(getNotes)]\nunconstrained fn get_notes_oracle<let N: u32, let S: u32>(\n _storage_slot: Field,\n _num_selects: u8,\n _select_by_indexes: [u8; N],\n _select_by_offsets: [u8; N],\n _select_by_lengths: [u8; N],\n _select_values: [Field; N],\n _select_comparators: [u8; N],\n _sort_by_indexes: [u8; N],\n _sort_by_offsets: [u8; N],\n _sort_by_lengths: [u8; N],\n _sort_order: [u8; N],\n _limit: u32,\n _offset: u32,\n _status: u8,\n _return_size: u32,\n _placeholder_fields: [Field; S],\n) -> [Field; S] {}\n\nunconstrained fn get_notes_oracle_wrapper<let N: u32, let S: u32>(\n storage_slot: Field,\n num_selects: u8,\n select_by_indexes: [u8; N],\n select_by_offsets: [u8; N],\n select_by_lengths: [u8; N],\n select_values: [Field; N],\n select_comparators: [u8; N],\n sort_by_indexes: [u8; N],\n sort_by_offsets: [u8; N],\n sort_by_lengths: [u8; N],\n sort_order: [u8; N],\n limit: u32,\n offset: u32,\n status: u8,\n mut placeholder_fields: [Field; S],\n) -> [Field; S] {\n let return_size = placeholder_fields.len() as u32;\n get_notes_oracle(\n storage_slot,\n num_selects,\n select_by_indexes,\n select_by_offsets,\n select_by_lengths,\n select_values,\n select_comparators,\n sort_by_indexes,\n sort_by_offsets,\n sort_by_lengths,\n sort_order,\n limit,\n offset,\n status,\n return_size,\n placeholder_fields,\n )\n}\n\npub unconstrained fn get_notes<Note, let N: u32, let M: u32, let S: u32, let NS: u32>(\n storage_slot: Field,\n num_selects: u8,\n select_by_indexes: [u8; M],\n select_by_offsets: [u8; M],\n select_by_lengths: [u8; M],\n select_values: [Field; M],\n select_comparators: [u8; M],\n sort_by_indexes: [u8; M],\n sort_by_offsets: [u8; M],\n sort_by_lengths: [u8; M],\n sort_order: [u8; M],\n limit: u32,\n offset: u32,\n status: u8,\n mut placeholder_opt_notes: [Option<Note>; S], // TODO: Remove it and use `limit` to initialize the note array.\n placeholder_fields: [Field; NS], // TODO: Remove it and use `limit` to initialize the note array.\n _placeholder_note_length: [Field; N], // Turbofish hack? Compiler breaks calculating read_offset unless we add this parameter\n) -> [Option<Note>; S]\nwhere\n Note: NoteInterface<N>,\n{\n sync_notes_oracle_wrapper();\n let fields = get_notes_oracle_wrapper(\n storage_slot,\n num_selects,\n select_by_indexes,\n select_by_offsets,\n select_by_lengths,\n select_values,\n select_comparators,\n sort_by_indexes,\n sort_by_offsets,\n sort_by_lengths,\n sort_order,\n limit,\n offset,\n status,\n placeholder_fields,\n );\n let num_notes = fields[0] as u32;\n let contract_address = AztecAddress::from_field(fields[1]);\n for i in 0..placeholder_opt_notes.len() {\n if i < num_notes {\n // lengths named as per typescript.\n let return_header_length: u32 = 2; // num_notes & contract_address.\n let extra_preimage_length: u32 = 2; // nonce & note_hash_counter.\n let read_offset: u32 = return_header_length + i * (N + extra_preimage_length);\n\n let nonce = fields[read_offset];\n let note_hash_counter = fields[read_offset + 1] as u32;\n let note_content = array::subarray(fields, read_offset + 2);\n\n let mut note = Note::deserialize_content(note_content);\n note.set_header(NoteHeader { contract_address, nonce, storage_slot, note_hash_counter });\n\n placeholder_opt_notes[i] = Option::some(note);\n };\n }\n placeholder_opt_notes\n}\n\n/// Returns true if the nullifier exists. Note that a `true` value can be constrained by proving existence of the\n/// nullifier, but a `false` value should not be relied upon since other transactions may emit this nullifier before the\n/// current transaction is included in a block. While this might seem of little use at first, certain design patterns\n/// benefit from this abstraction (see e.g. `PrivateMutable`).\npub unconstrained fn check_nullifier_exists(inner_nullifier: Field) -> bool {\n check_nullifier_exists_oracle(inner_nullifier) == 1\n}\n\n#[oracle(checkNullifierExists)]\nunconstrained fn check_nullifier_exists_oracle(_inner_nullifier: Field) -> Field {}\n\n/// Same as `get_app_tagging_secret_as_sender`, except it returns the derived tag, ready to be included in a log.\npub unconstrained fn get_app_tag_as_sender(sender: AztecAddress, recipient: AztecAddress) -> Field {\n get_app_tagging_secret_as_sender(sender, recipient).compute_tag(recipient)\n}\n\n/// Returns the tagging secret for a given sender and recipient pair, siloed for the current contract address.\n/// Includes the last known index used to send a note tagged with this secret.\n/// For this to work, PXE must know the ivpsk_m of the sender.\n/// For the recipient's side, only the address is needed.\npub unconstrained fn get_app_tagging_secret_as_sender(\n sender: AztecAddress,\n recipient: AztecAddress,\n) -> IndexedTaggingSecret {\n let result = get_app_tagging_secret_as_sender_oracle(sender, recipient);\n IndexedTaggingSecret::deserialize(result)\n}\n\n#[oracle(getAppTaggingSecretAsSender)]\nunconstrained fn get_app_tagging_secret_as_sender_oracle(\n _sender: AztecAddress,\n _recipient: AztecAddress,\n) -> [Field; INDEXED_TAGGING_SECRET_LENGTH] {}\n\n/// Notifies the simulator that a tag has been used in a note, and to therefore increment the associated index so that\n/// future notes get a different tag and can be discovered by the recipient.\n/// This change should only be persisted in a non-volatile database if the tagged log is found in an actual block -\n/// otherwise e.g. a reverting transaction can cause the sender to accidentally skip indices and later produce notes\n/// that are not found by the recipient.\npub fn increment_app_tagging_secret_index_as_sender(sender: AztecAddress, recipient: AztecAddress) {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call.\n unsafe {\n increment_app_tagging_secret_index_as_sender_wrapper(sender, recipient);\n }\n}\n\nunconstrained fn increment_app_tagging_secret_index_as_sender_wrapper(\n sender: AztecAddress,\n recipient: AztecAddress,\n) {\n increment_app_tagging_secret_index_as_sender_oracle(sender, recipient);\n}\n\n#[oracle(incrementAppTaggingSecretIndexAsSender)]\nunconstrained fn increment_app_tagging_secret_index_as_sender_oracle(\n _sender: AztecAddress,\n _recipient: AztecAddress,\n) {}\n\n/// Finds new notes that may have been sent to all registered accounts in PXE in the current contract and makes them available\n/// for later querying via the `get_notes` oracle.\npub fn sync_notes() {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call.\n unsafe {\n sync_notes_oracle_wrapper();\n }\n}\n\nunconstrained fn sync_notes_oracle_wrapper() {\n sync_notes_oracle();\n}\n\n#[oracle(syncNotes)]\nunconstrained fn sync_notes_oracle() {}\n"
|
|
3720
3652
|
},
|
|
3721
|
-
"
|
|
3653
|
+
"116": {
|
|
3722
3654
|
"path": "/usr/src/noir-projects/aztec-nr/aztec/src/utils/comparison.nr",
|
|
3723
3655
|
"source": "struct ComparatorEnum {\n pub EQ: u8,\n pub NEQ: u8,\n pub LT: u8,\n pub LTE: u8,\n pub GT: u8,\n pub GTE: u8,\n}\n\npub global Comparator: ComparatorEnum =\n ComparatorEnum { EQ: 1, NEQ: 2, LT: 3, LTE: 4, GT: 5, GTE: 6 };\n\npub fn compare(lhs: Field, operation: u8, rhs: Field) -> bool {\n // Values are computed ahead of time because circuits evaluate all branches\n let is_equal = lhs == rhs;\n let is_lt = lhs.lt(rhs);\n\n if (operation == Comparator.EQ) {\n is_equal\n } else if (operation == Comparator.NEQ) {\n !is_equal\n } else if (operation == Comparator.LT) {\n is_lt\n } else if (operation == Comparator.LTE) {\n is_lt | is_equal\n } else if (operation == Comparator.GT) {\n !is_lt & !is_equal\n } else if (operation == Comparator.GTE) {\n !is_lt\n } else {\n panic(f\"Invalid operation\")\n }\n}\n\nmod test {\n use super::Comparator;\n use super::compare;\n\n #[test]\n unconstrained fn test_compare() {\n let lhs = 10;\n let rhs = 10;\n assert(compare(lhs, Comparator.EQ, rhs), \"Expected lhs to be equal to rhs\");\n\n let lhs = 10;\n let rhs = 11;\n assert(compare(lhs, Comparator.NEQ, rhs), \"Expected lhs to be not equal to rhs\");\n\n let lhs = 10;\n let rhs = 11;\n assert(compare(lhs, Comparator.LT, rhs), \"Expected lhs to be less than rhs\");\n\n let lhs = 10;\n let rhs = 10;\n assert(compare(lhs, Comparator.LTE, rhs), \"Expected lhs to be less than or equal to rhs\");\n\n let lhs = 11;\n let rhs = 10;\n assert(compare(lhs, Comparator.GT, rhs), \"Expected lhs to be greater than rhs\");\n\n let lhs = 10;\n let rhs = 10;\n assert(\n compare(lhs, Comparator.GTE, rhs),\n \"Expected lhs to be greater than or equal to rhs\",\n );\n\n let lhs = 11;\n let rhs = 10;\n assert(\n compare(lhs, Comparator.GTE, rhs),\n \"Expected lhs to be greater than or equal to rhs\",\n );\n\n let lhs = 10;\n let rhs = 11;\n assert(!compare(lhs, Comparator.EQ, rhs), \"Expected lhs to be not equal to rhs\");\n\n let lhs = 10;\n let rhs = 10;\n assert(!compare(lhs, Comparator.NEQ, rhs), \"Expected lhs to not be not equal to rhs\");\n\n let lhs = 11;\n let rhs = 10;\n assert(!compare(lhs, Comparator.LT, rhs), \"Expected lhs to not be less than rhs\");\n\n let lhs = 11;\n let rhs = 10;\n assert(\n !compare(lhs, Comparator.LTE, rhs),\n \"Expected lhs to not be less than or equal to rhs\",\n );\n\n let lhs = 10;\n let rhs = 10;\n assert(!compare(lhs, Comparator.GT, rhs), \"Expected lhs to not be greater than rhs\");\n\n let lhs = 10;\n let rhs = 11;\n assert(\n !compare(lhs, Comparator.GTE, rhs),\n \"Expected lhs to not be greater than or equal to rhs\",\n );\n\n let lhs = 10;\n let rhs = 11;\n assert(\n !compare(lhs, Comparator.GTE, rhs),\n \"Expected lhs to not be greater than or equal to rhs\",\n );\n }\n}\n"
|
|
3724
3656
|
},
|
|
3725
|
-
"
|
|
3657
|
+
"175": {
|
|
3658
|
+
"path": "/usr/src/noir-projects/aztec-nr/aztec/src/hash.nr",
|
|
3659
|
+
"source": "use crate::utils::to_bytes::{arr_to_be_bytes_arr, str_to_be_bytes_arr};\nuse dep::protocol_types::{\n address::{AztecAddress, EthAddress},\n constants::{\n GENERATOR_INDEX__FUNCTION_ARGS, GENERATOR_INDEX__MESSAGE_NULLIFIER,\n GENERATOR_INDEX__SECRET_HASH,\n },\n hash::{poseidon2_hash_with_separator, poseidon2_hash_with_separator_slice, sha256_to_field},\n point::Point,\n traits::Hash,\n};\n\npub use dep::protocol_types::hash::{compute_siloed_nullifier, pedersen_hash};\n\npub fn pedersen_commitment<let N: u32>(inputs: [Field; N], hash_index: u32) -> Point {\n std::hash::pedersen_commitment_with_separator(inputs, hash_index)\n}\n\npub fn compute_secret_hash(secret: Field) -> Field {\n poseidon2_hash_with_separator([secret], GENERATOR_INDEX__SECRET_HASH)\n}\n\npub fn compute_unencrypted_log_hash<let N: u32>(\n contract_address: AztecAddress,\n log: [u8; N],\n) -> Field {\n let mut hash_bytes = [0; N + 36];\n // Address is converted to 32 bytes in ts\n let address_bytes: [u8; 32] = contract_address.to_field().to_be_bytes();\n for i in 0..32 {\n hash_bytes[i] = address_bytes[i];\n }\n let len_bytes: [u8; 4] = (N as Field).to_be_bytes();\n for i in 0..4 {\n hash_bytes[32 + i] = len_bytes[i];\n }\n for i in 0..N {\n hash_bytes[36 + i] = log[i];\n }\n\n sha256_to_field(hash_bytes)\n}\n\npub fn compute_l1_to_l2_message_hash(\n sender: EthAddress,\n chain_id: Field,\n recipient: AztecAddress,\n version: Field,\n content: Field,\n secret_hash: Field,\n leaf_index: Field,\n) -> Field {\n let mut hash_bytes = [0 as u8; 224];\n let sender_bytes: [u8; 32] = sender.to_field().to_be_bytes();\n let chain_id_bytes: [u8; 32] = chain_id.to_be_bytes();\n let recipient_bytes: [u8; 32] = recipient.to_field().to_be_bytes();\n let version_bytes: [u8; 32] = version.to_be_bytes();\n let content_bytes: [u8; 32] = content.to_be_bytes();\n let secret_hash_bytes: [u8; 32] = secret_hash.to_be_bytes();\n let leaf_index_bytes: [u8; 32] = leaf_index.to_be_bytes();\n\n for i in 0..32 {\n hash_bytes[i] = sender_bytes[i];\n hash_bytes[i + 32] = chain_id_bytes[i];\n hash_bytes[i + 64] = recipient_bytes[i];\n hash_bytes[i + 96] = version_bytes[i];\n hash_bytes[i + 128] = content_bytes[i];\n hash_bytes[i + 160] = secret_hash_bytes[i];\n hash_bytes[i + 192] = leaf_index_bytes[i];\n }\n\n sha256_to_field(hash_bytes)\n}\n\n// The nullifier of a l1 to l2 message is the hash of the message salted with the secret\npub fn compute_l1_to_l2_message_nullifier(message_hash: Field, secret: Field) -> Field {\n poseidon2_hash_with_separator([message_hash, secret], GENERATOR_INDEX__MESSAGE_NULLIFIER)\n}\n\npub struct ArgsHasher {\n pub fields: [Field],\n}\n\nimpl Hash for ArgsHasher {\n fn hash(self) -> Field {\n hash_args(self.fields)\n }\n}\n\nimpl ArgsHasher {\n pub fn new() -> Self {\n Self { fields: [] }\n }\n\n pub fn add(&mut self, field: Field) {\n self.fields = self.fields.push_back(field);\n }\n\n pub fn add_multiple<let N: u32>(&mut self, fields: [Field; N]) {\n for i in 0..N {\n self.fields = self.fields.push_back(fields[i]);\n }\n }\n}\n\npub fn hash_args_array<let N: u32>(args: [Field; N]) -> Field {\n if args.len() == 0 {\n 0\n } else {\n poseidon2_hash_with_separator(args, GENERATOR_INDEX__FUNCTION_ARGS)\n }\n}\n\npub fn hash_args(args: [Field]) -> Field {\n if args.len() == 0 {\n 0\n } else {\n poseidon2_hash_with_separator_slice(args, GENERATOR_INDEX__FUNCTION_ARGS)\n }\n}\n\n#[test]\nunconstrained fn compute_var_args_hash() {\n let mut input = ArgsHasher::new();\n for i in 0..100 {\n input.add(i as Field);\n }\n let hash = input.hash();\n dep::std::println(hash);\n assert(hash == 0x19b0d74feb06ebde19edd85a28986c97063e84b3b351a8b666c7cac963ce655f);\n}\n\n#[test]\nunconstrained fn compute_unenc_log_hash_array() {\n let contract_address = AztecAddress::from_field(\n 0x233a3e0df23b2b15b324194cb4a151f26c0b7333250781d34cc269d85dc334c6,\n );\n let log = [\n 0x20660de09f35f876e3e69d227b2a35166ad05f09d82d06366ec9b6f65a51fec2,\n 0x1b52bfe3b8689761916f76dc3d38aa8810860db325cd39ca611eed980091f01c,\n 0x2e559c4045c378a56ad13b9edb1e8de4e7ad3b3aa35cc7ba9ec77f7a68fa43a4,\n 0x25d0f689c4a4178a29d59306f2675824d19be6d25e44fa03b03f49c263053dd2,\n 0x2d513a722d6f352dc0961f156afdc5e31495b9f0e35cb069261a8e55e2df67fd,\n ];\n let serialized_log = arr_to_be_bytes_arr(log);\n let hash = compute_unencrypted_log_hash(contract_address, serialized_log);\n assert(hash == 0x0095b2d17ab72f4b27a341f7ac63e49ec73935ae8c9181a0ac02023eb12f3284);\n}\n\n#[test]\nunconstrained fn compute_unenc_log_hash_addr() {\n let contract_address = AztecAddress::from_field(\n 0x233a3e0df23b2b15b324194cb4a151f26c0b7333250781d34cc269d85dc334c6,\n );\n let log = AztecAddress::from_field(\n 0x26aa302d4715fd8a687453cb26d616b0768027bd54bcae56b09d908ecd9f8303,\n );\n let serialized_log: [u8; 32] = log.to_field().to_be_bytes();\n let hash = compute_unencrypted_log_hash(contract_address, serialized_log);\n assert(hash == 0x0083ab647dfb26e7ddee90a0f4209d049d4660cab42000c544b986aaa84c55a3);\n}\n\n#[test]\nunconstrained fn compute_unenc_log_hash_str() {\n let contract_address = AztecAddress::from_field(\n 0x1b401e1146c5c507962287065c81f0ef7590adae3802c533d7549d6bf0a41bd8,\n );\n let log = \"dummy\";\n let serialized_log = str_to_be_bytes_arr(log);\n let hash = compute_unencrypted_log_hash(contract_address, serialized_log);\n assert(hash == 0x00629e88ebd6374f44aa6cfe07e251ecf07213ebc7267e8f6b578ae57ffd6c20);\n}\n\n#[test]\nunconstrained fn compute_unenc_log_hash_longer_str() {\n let contract_address = AztecAddress::from_field(\n 0x1b401e1146c5c507962287065c81f0ef7590adae3802c533d7549d6bf0a41bd8,\n );\n let log = \"Hello this is a string\";\n let serialized_log = str_to_be_bytes_arr(log);\n let hash = compute_unencrypted_log_hash(contract_address, serialized_log);\n assert(hash == 0x0098637962f7d34fa202b7ffad8a07a238c5d1fd897b82a108f7f467fa73b841);\n}\n"
|
|
3660
|
+
},
|
|
3661
|
+
"241": {
|
|
3662
|
+
"path": "/usr/src/noir-projects/noir-protocol-circuits/crates/types/src/utils/reader.nr",
|
|
3663
|
+
"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"
|
|
3664
|
+
},
|
|
3665
|
+
"291": {
|
|
3726
3666
|
"path": "/usr/src/noir-projects/noir-protocol-circuits/crates/types/src/type_serialization.nr",
|
|
3727
3667
|
"source": "use crate::traits::{Deserialize, Serialize};\n\nglobal BOOL_SERIALIZED_LEN: u32 = 1;\nglobal U8_SERIALIZED_LEN: u32 = 1;\nglobal U16_SERIALIZED_LEN: u32 = 1;\nglobal U32_SERIALIZED_LEN: u32 = 1;\nglobal U64_SERIALIZED_LEN: u32 = 1;\nglobal U128_SERIALIZED_LEN: u32 = 1;\nglobal FIELD_SERIALIZED_LEN: u32 = 1;\nglobal I8_SERIALIZED_LEN: u32 = 1;\nglobal I16_SERIALIZED_LEN: u32 = 1;\nglobal I32_SERIALIZED_LEN: u32 = 1;\nglobal I64_SERIALIZED_LEN: u32 = 1;\n\nimpl Serialize<BOOL_SERIALIZED_LEN> for bool {\n fn serialize(self) -> [Field; BOOL_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<BOOL_SERIALIZED_LEN> for bool {\n fn deserialize(fields: [Field; BOOL_SERIALIZED_LEN]) -> bool {\n fields[0] as bool\n }\n}\n\nimpl Serialize<U8_SERIALIZED_LEN> for u8 {\n fn serialize(self) -> [Field; U8_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<U8_SERIALIZED_LEN> for u8 {\n fn deserialize(fields: [Field; U8_SERIALIZED_LEN]) -> Self {\n fields[0] as u8\n }\n}\n\nimpl Serialize<U16_SERIALIZED_LEN> for u16 {\n fn serialize(self) -> [Field; U16_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<U16_SERIALIZED_LEN> for u16 {\n fn deserialize(fields: [Field; U16_SERIALIZED_LEN]) -> Self {\n fields[0] as u16\n }\n}\n\nimpl Serialize<U32_SERIALIZED_LEN> for u32 {\n fn serialize(self) -> [Field; U32_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<U32_SERIALIZED_LEN> for u32 {\n fn deserialize(fields: [Field; U32_SERIALIZED_LEN]) -> Self {\n fields[0] as u32\n }\n}\n\nimpl Serialize<U64_SERIALIZED_LEN> for u64 {\n fn serialize(self) -> [Field; U64_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize<U64_SERIALIZED_LEN> for u64 {\n fn deserialize(fields: [Field; U64_SERIALIZED_LEN]) -> Self {\n fields[0] as u64\n }\n}\n\nimpl Serialize<U128_SERIALIZED_LEN> for U128 {\n fn serialize(self) -> [Field; U128_SERIALIZED_LEN] {\n [self.to_integer()]\n }\n}\n\nimpl Deserialize<U128_SERIALIZED_LEN> for U128 {\n fn deserialize(fields: [Field; U128_SERIALIZED_LEN]) -> Self {\n U128::from_integer(fields[0])\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"
|
|
3728
3668
|
},
|
|
3729
|
-
"
|
|
3669
|
+
"311": {
|
|
3730
3670
|
"path": "/usr/src/noir-projects/noir-protocol-circuits/crates/types/src/hash.nr",
|
|
3731
|
-
"source": "use crate::{\n abis::{\n contract_class_function_leaf_preimage::ContractClassFunctionLeafPreimage,\n function_selector::FunctionSelector,\n log_hash::{LogHash, ScopedEncryptedLogHash, ScopedLogHash},\n note_hash::ScopedNoteHash,\n nullifier::ScopedNullifier,\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 traits::{is_empty, ToField},\n utils::field::field_from_bytes_32_trunc,\n};\nuse super::utils::field::field_from_bytes;\n\npub fn sha256_to_field<let N: u32>(bytes_to_hash: [u8; N]) -> Field {\n let sha256_hashed = std::hash::sha256(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\nfn compute_note_hash_nonce(tx_hash: Field, note_index_in_tx: u32) -> Field {\n // Hashing tx hash with note index in tx is guaranteed to be unique\n poseidon2_hash_with_separator(\n [tx_hash, note_index_in_tx as Field],\n GENERATOR_INDEX__NOTE_HASH_NONCE,\n )\n}\n\npub fn compute_unique_note_hash(nonce: Field, note_hash: Field) -> Field {\n let inputs = [nonce, note_hash];\n poseidon2_hash_with_separator(inputs, GENERATOR_INDEX__UNIQUE_NOTE_HASH)\n}\n\npub fn compute_siloed_note_hash(app: AztecAddress, unique_note_hash: Field) -> Field {\n poseidon2_hash_with_separator(\n [app.to_field(), unique_note_hash],\n GENERATOR_INDEX__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, tx_hash: Field, note_index_in_tx: u32) -> Field {\n if note_hash.contract_address.is_zero() {\n 0\n } else {\n let nonce = compute_note_hash_nonce(tx_hash, note_index_in_tx);\n let unique_note_hash = compute_unique_note_hash(nonce, note_hash.value());\n compute_siloed_note_hash(note_hash.contract_address, unique_note_hash)\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 silo_encrypted_log_hash(log_hash: ScopedLogHash) -> Field {\n // We assume contract address has already been masked\n if log_hash.contract_address.is_zero() {\n 0\n } else {\n accumulate_sha256(\n [log_hash.contract_address.to_field(), log_hash.log_hash.value],\n )\n }\n}\n\npub fn mask_encrypted_log_hash(scoped_log: ScopedEncryptedLogHash) -> AztecAddress {\n if scoped_log.contract_address.is_zero() {\n AztecAddress::from_field(0)\n } else if (scoped_log.log_hash.randomness == 0) {\n scoped_log.contract_address\n } else {\n AztecAddress::from_field(poseidon2_hash_with_separator(\n [scoped_log.contract_address.to_field(), scoped_log.log_hash.randomness],\n 0,\n ))\n }\n}\n\nfn compute_siloed_unencrypted_log_hash(address: AztecAddress, log_hash: Field) -> Field {\n accumulate_sha256([address.to_field(), log_hash])\n}\n\npub fn silo_unencrypted_log_hash(log_hash: ScopedLogHash) -> Field {\n if log_hash.contract_address.is_zero() {\n 0\n } else {\n compute_siloed_unencrypted_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: BoundedVec<u8, 160> = BoundedVec::new();\n\n let inputs =\n [contract_address.to_field(), rollup_version_id, recipient.to_field(), chain_id, content];\n for i in 0..inputs.len() {\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.push(item_bytes[j]);\n }\n }\n\n sha256_to_field(bytes.storage())\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 // We manually hash the inputs here, since we cannot express with the type system a constant size inputs array of N + 1\n let in_len = N + 1;\n let two_pow_64 = 18446744073709551616;\n let iv: Field = (in_len as Field) * two_pow_64;\n let mut sponge = std::hash::poseidon2::Poseidon2::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\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 two_pow_64 = 18446744073709551616;\n let iv: Field = (in_len as Field) * two_pow_64;\n let mut sponge = std::hash::poseidon2::Poseidon2::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 // We manually hash the inputs here, since we cannot express with the type system a constant size inputs array of Math.ceil(N/31)\n let mut in_len = N / 31;\n let mut has_padding = false;\n if N % 31 != 0 {\n in_len += 1;\n has_padding = true;\n }\n\n let two_pow_64 = 18446744073709551616;\n let iv: Field = (in_len as Field) * two_pow_64;\n let mut sponge = std::hash::poseidon2::Poseidon2::new(iv);\n\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 sponge.absorb(field_from_bytes(current_field, false));\n current_field = [0; 31];\n }\n }\n if has_padding {\n sponge.absorb(field_from_bytes(current_field, false));\n }\n\n 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 = std::hash::sha256(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"
|
|
3732
|
-
},
|
|
3733
|
-
"313": {
|
|
3734
|
-
"path": "/usr/src/noir-projects/noir-protocol-circuits/crates/types/src/utils/reader.nr",
|
|
3735
|
-
"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"
|
|
3671
|
+
"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::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 traits::{is_empty, ToField},\n utils::field::field_from_bytes_32_trunc,\n};\nuse super::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 = std::hash::sha256(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\nfn compute_note_hash_nonce(tx_hash: Field, note_index_in_tx: u32) -> Field {\n // Hashing tx hash with note index in tx is guaranteed to be unique\n poseidon2_hash_with_separator(\n [tx_hash, 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 tx_hash: 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(tx_hash, 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_unencrypted_log_hash(address: AztecAddress, log_hash: Field) -> Field {\n accumulate_sha256([address.to_field(), log_hash])\n}\n\npub fn silo_unencrypted_log_hash(log_hash: ScopedLogHash) -> Field {\n if log_hash.contract_address.is_zero() {\n 0\n } else {\n compute_siloed_unencrypted_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: BoundedVec<u8, 160> = BoundedVec::new();\n\n let inputs =\n [contract_address.to_field(), rollup_version_id, recipient.to_field(), chain_id, content];\n for i in 0..inputs.len() {\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.push(item_bytes[j]);\n }\n }\n\n sha256_to_field(bytes.storage())\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\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 two_pow_64 = 18446744073709551616;\n let iv: Field = (in_len as Field) * two_pow_64;\n let mut sponge = std::hash::poseidon2::Poseidon2::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 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 = std::hash::sha256(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"
|
|
3736
3672
|
},
|
|
3737
|
-
"
|
|
3673
|
+
"353": {
|
|
3738
3674
|
"path": "/usr/src/noir-projects/noir-contracts/contracts/router_contract/src/main.nr",
|
|
3739
3675
|
"source": "mod test;\nmod utils;\n\nuse dep::aztec::macros::aztec;\n\n/// The purpose of this contract is to perform a check in public without revealing what contract enqued the public\n/// call. This is achieved by having a private function on this contract that enques the public call and hence\n/// the `msg_sender` in the public call is the address of this contract.\n#[aztec]\ncontract Router {\n use aztec::{macros::functions::{internal, private, public, view}, utils::comparison::compare};\n\n // docs:start:check_timestamp\n /// Asserts that the current timestamp in the enqueued public call satisfies the `operation` with respect\n /// to the `value.\n #[private]\n fn check_timestamp(operation: u8, value: u64) {\n Router::at(context.this_address())._check_timestamp(operation, value).enqueue_view(\n &mut context,\n );\n }\n\n #[public]\n #[internal]\n #[view]\n fn _check_timestamp(operation: u8, value: u64) {\n let lhs_field = context.timestamp() as Field;\n let rhs_field = value as Field;\n assert(compare(lhs_field, operation, rhs_field), \"Timestamp mismatch.\");\n }\n // docs:end:check_timestamp\n\n /// Asserts that the current block number in the enqueued public call satisfies the `operation` with respect\n /// to the `value.\n #[private]\n fn check_block_number(operation: u8, value: Field) {\n Router::at(context.this_address())._check_block_number(operation, value).enqueue_view(\n &mut context,\n );\n }\n\n #[public]\n #[internal]\n #[view]\n fn _check_block_number(operation: u8, value: Field) {\n assert(compare(context.block_number(), operation, value), \"Block number mismatch.\");\n }\n}\n"
|
|
3740
3676
|
}
|