@aztec/protocol-contracts 3.0.0-nightly.20251213 → 3.0.0-nightly.20251216
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 +10 -14
- package/artifacts/ContractClassRegistry.json +1 -1
- package/artifacts/ContractInstanceRegistry.json +5 -5
- package/artifacts/FeeJuice.json +10 -14
- package/artifacts/Router.json +4 -4
- package/dest/protocol_contract_data.js +5 -5
- package/package.json +4 -4
- package/src/protocol_contract_data.ts +5 -5
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
"bytecode": "JwACBAEoAAABBIBOJwAABE4nAgQEAycCBQQAHwoABAAFAEscAE1NAS0ISwEtCEwCLQhNAyUAAABOJQAAAJcnAgEETicCAgQAOw4AAgABLAAAQwAwZE5y4TGgKbhQRbaBgVhdKDPoSHm5cJFD4fWT8AAAACcARAQDJwBFAQAnAEYEACcARwAAJwBIAQEnAEkEAScASgQCJiUAAAHFHgIABAAeAgAFAB4CAAYBCiIGQwcWCgcIHAoICQAEKgkGCAoiB0UGJAIABgAAANQnAgkEADwGCQEKKggFBiQCAAYAAADmJQAAAesnAgUAAi0IAQYnAgcEAwAIAQcBJwMGBAEAIgYCBy0KBwgtDgUIACIIAggtDgEIJwIFBActCAAHLQoGCC0ISgktCEUKAAgABQAlAAAB/S0CAAAtCggBCiIBRwUKIgVFBiQCAAYAAAFSJQAAA+QtCAEFJwIGBAMACAEGAScDBQQBACIFAgYtCgYHLQ4BBwAiBwIHLQ4CBycCAgQGLQgABi0KBQctCEoILQhFCQAIAAIAJQAAAf0tAgAALQoHAQoiAUcCCiICRQUkAgAFAAABuSUAAAPkHAoDAgAwCgACAAEmKAAABAR4TgwAAAQDJAAAAwAAAeoqAQABBdrF9da0SjJtPAQCASYqAQABBcFQNKwlSLxRPAQCASYlAAABxRwKAgUAKwIABgAAAAAAAAAAAQAAAAAAAAAABCoFBgctCA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Esqm1bIrM5EbYlgqWEBG1KRIpfEH1dvEWgxZNVo21JpHhE1FeWy55g+pvmbrHRabCtDuHsJvTBQv4q8Ek/Hh5P17vf295M6no6fDkfx8dvr5fHm6Mv/z37Ef+97vn69Hj8+no9mtL8o53++Ud/kdojlk/28lc/Vtk3sA/ZjqEdk09vNpX/AQ=="
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
"name": "consume",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
138
|
"bytecode": "JwACBAEoAAABBIBPJwAABE8nAgMEAicCBAQAHwoAAwAEAEwtCEwBLQhNAiUAAABJJQAAAHstAgFOJwICBE4nAgMEATsOAAMAAikAAEMAR9rNcycARAQDJwBFAQAnAEYEACcARwAAJwBIAQEnAEkEAScASgABJwBLBAImJQAABVkeAgAEAB4CAAUALQgBBgAAAQIBJwIHAAItDgcGLQgBBycCCAQDAAgBCAEnAwcEAQAiBwIILQoICS0MSgkAIgkCCS0OAQknAgkECi0IAAotCgcLLQhLDC0IRQ0ACAAJACUAAAV/LQIAAC0KCwgKIghHBwoiB0UJJAIACQAAAQMlAAAHJi8KAAgABxwKBwkBHAoJCAAcCggHAQoiB0UIJAIACAAAASolAAAHOB4CAAcBHgIACAMeAgAJBC0IAQonAgsEBQAIAQsBJwMKBAEAIgoCCy0KCwwtDgcMACIMAgwtDggMACIMAgwtDgkMACIMAgwtDgIMLQgBAgAAAQIBJwIHAC4tCAEIJwIJBAYACAEJAScDCAQBACIIAgktCgkLLQ4HCwAiCwILLQxHCwAiCwILLQxHCwAiCwILLQxHCwAiCwILLQxHCy0OCAInAgcEBCcCCAQFLQhGAyMAAAHdDCoDBwQkAgAEAAAFAyMAAAHvLQsCBC0IAQInAgUEBAAIAQUBJwMCBAEAIgICBS0KBQctDEcHACIHAgctDEcHACIHAgctDEcHKwIABQAAAAAAAAAABQAAAAAAAAAALQgBBycCCQQFAAgBCQEnAwcEAQAiBwIJLQoJCi0MR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ZsFzObkvPaC166ke1E0Bh2L4R5tcS3b5TRttIEuwsBL89HVGx9bV/Elz2R5bEgBwtJjvHg8WRzCxD2jyfrY2tBP7YeOzrbRX1bWveOzqsLkZhVoH2beeiEJN+YmsTGhz+SuO7M2n89ce7Qupa46tQazh9aVxJY7aoMOR+SOH/sTcnuDVOiYxJXzrJwfpItJEqNmuClwraQX6sgv5HTMh5LPeJE+/Y9mUQ9lFkxW242POYFJOsIFDomgWwSlY91xHZL8ru3YxK2D2/l61hH0PJbfip1SILIlnfiQ8kZ2WPB6ZAEFc0sKnhEgIvOD4ZjcQh2LR8D7id3/+nF+01TDjo/OB0LhM1RJjgZydcCH9rbu88Pzy/+PuW3SD0/3H16vJ9vv/58+rz59Md/v+sn+vct35+/fb7/8vP5XpT8j1zaP3+Vdl4rnD/cXOSXZ3/JzjFxkrdRPo35pkT48Fuc+R8="
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
142
|
"name": "is_consumable",
|
|
@@ -201,7 +201,7 @@
|
|
|
201
201
|
}
|
|
202
202
|
},
|
|
203
203
|
"bytecode": "JwACBAEoAAABBIBNJwAABE0nAgMEAicCBAQAHwoAAwAEAEotCEoBLQhLAiUAAABJJQAAAG0tAgFMJwICBEwnAgMEATsOAAMAAicAQwQDJwBEAQAnAEUEACcARgAAJwBHAQEnAEgEAScASQQCJiUAAAF7HgIAAwAeAgAEAB4CAAUJJAIABQAAAI4lAAABoScCBQACLQgBBicCBwQDAAgBBwEnAwYEAQAiBgIHLQoHCC0OBQgAIggCCC0OAQgnAgUEBy0IAActCgYILQhJCS0IRAoACAAFACUAAAGzLQIAAC0KCAEKIgFGBQoiBUQGJAIABgAAAPolAAADmi0IAQUnAgYEAwAIAQYBJwMFBAEAIgUCBi0KBgctDgEHACIHAgctDgIHJwICBAYtCAAGLQoFBy0ISQgtCEQJAAgAAgAlAAABsy0CAAAtCgcBCiIBRgIKIgJEBSQCAAUAAAFhJQAAA5ovCgABAAIcCgIFARwKBQEAHAoBAg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mtx8+lrV+9BVEhViIrW0dRIUzpJnjusmcjYnwrqJYCkhUVdNpBU/Ia3QGgEubiuu6yaRIDyRaN4T9KXm5uSuYlhXh3C2PDH8ZCE/CnyXj9uH/enqn513lTrttz8PO/v4+Hp8uPj25d9n/8b/GXo+PT3sfr2edqp0/ntIXr6hFED+k/iujwjlY+O7XvRD1u9Av+Pv75rKfw=="
|
|
205
205
|
},
|
|
206
206
|
{
|
|
207
207
|
"name": "is_reject_all",
|
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
}
|
|
252
252
|
},
|
|
253
253
|
"bytecode": "JwACBAEoAAABBIBGJwAABEYnAgIEAScCAwQAHwoAAgADAEQtCEQBJQAAAEUlAAAASy0CAUUnAgIERScCAwQBOw4AAwACJwBDBAMmJQAAAm0eAgADAB4CAAQAHgIABQknAgYBASQCAAUAAABxJQAAApMnAgUAACsCAAcAAAAAAAAAAAIAAAAAAAAAAC0IAQgnAgkEBQAIAQkBJwMIBAEAIggCCS0KCQotDgUKACIKAgotDgUKACIKAgotDgUKACIKAgotDgcKLQgBBwAAAQIBLQgBCQAAAQIBLQgBCgAAAQIBLQgBCwAAAQIBJwIMAAEtCAENJwIOBAQACAEOAScDDQQBACINAg4tCg4PLQ4MDwAiDwIPLQ4BDwAiDwIPLQ4FDy0ODQctDggJJwIBBAItDgEKJwIBAQAtDgELJwIIBAAnAgwEAS0KCAIjAAABTgwiAkMDJAIAAwAAAecjAAABYC0LCQItCwIDACIDAgMtDgMCLQgBAycCBAQFAAgBBAEnAwMEAQAiAgIEJwIIBAQAIgMCDT8PAAQADS0LBwItCwoELQ4CBy0OAwktDgQKLQ4GCwAqAwwELQsEAgoqAgUDCioDAQQkAgAEAAAB0SUAAAKlLwoAAgABHAoBAwEcCgMCABwKAgEBJi0LCgMMKgIDBCQCAAQAAAH9IwAAAl8tCwkEACIEAg0AKg0CDi0LDggtCwcNACINAg8AKg8CEC0LEA4AKggODy0LCwgtAgQDJwAEBAUlAAACty0IBQ4AIg4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q2RG/mUXCV4EcdveQHz5oWLfP6kIa0VAS/xSCnfqcEyaRS5L5Ycp9LIGDY1oFGhMWd0P7Js5wMaFZqT10ZOfJeCJN+6hMpdCjGAOxEDb9cGNPKp3w7uRioEi2799XRKmJZVoFFerU0jMk2bRobNTQNa5cU8LSuXRWmEdNf2h7y1/WFsNRvMLb8sjR+8wNZrPuhbxHfyIERbLwPEloh+mk8iUDZfsJhaWyDPnhDztkg7HFiEk8OmSKNQOU7bIC5eCYV+veGCKwjc2bLs/SaZ/rTpf1R41OH+5XBenT5vJnU+7J+PfR2+XU8vi6uX/z/8ip9eP87vL/3r9dyb0nyE1Z8vUb/cI8mjnVRtqIePiGjDaEM9Q+gx9fFmznwH"
|
|
255
255
|
},
|
|
256
256
|
{
|
|
257
257
|
"name": "set_authorized",
|
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
}
|
|
298
298
|
},
|
|
299
299
|
"bytecode": "JwACBAEoAAABBIBMJwAABEwnAgMEAicCBAQAHwoAAwAEAEocAEtLAS0ISgEtCEsCJQAAAEolAAAAbicCAQRMJwICBAA7DgACAAEnAEMEAycARAEAJwBFBAAnAEYAACcARwEBJwBIBAEnAEkEAiYlAAABYR4CAAMAHgIABAAeAgAFAScCBgACLQgBBycCCAQDAAgBCAEnAwcEAQAiBwIILQoICS0OBgkAIgkCCS0OBQknAgYECC0IAAgtCgcJLQhJCi0IRAsACAAGACUAAAGHLQIAAC0KCQUKIgVGBgoiBkQHJAIABwAAAO4lAAADbi0IAQYnAgcEAwAIAQcBJwMGBAEAIgYCBy0KBwgtDgUIACIIAggtDgEIJwIFBActCAAHLQoGCC0ISQktCEQKAAgABQAlAAABhy0CAAAtCggBCiIBRgUKIgVEBiQCAAYAAAFVJQAAA24cCgIFADAKAAUAASYoAAAEBHhMDAAABAMkAAADAAABhioBAAEF2sX11rRKMm08BAIBJiUAAAFhHAoCBQArAgAGAAAAAAAAAAABAAAAAAAAAAAEKgUGBy0IAQUnAgYEBAAIAQYBJwM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S/c9LKWbRW70DdGP1CPqgj555u58h8="
|
|
301
301
|
},
|
|
302
302
|
{
|
|
303
303
|
"name": "set_authorized_private",
|
|
@@ -2128,7 +2128,7 @@
|
|
|
2128
2128
|
}
|
|
2129
2129
|
},
|
|
2130
2130
|
"bytecode": "H4sIAAAAAAAA/+2dB3zVVBvG39vbQsuU7aYKKCjIck8UChQUEBwoYi3lApXSQgfLBW7ciOJW3HsLCjhxiwuVISqIoDJEBRmKgN/zQgKHQ9omN+2D+JHf79+kuTn5v0lOTvY5EdncNXX6GRmZIwtjWRm5+RnZuYWx/NzMnIKMjIJYYUZmUeGAvPzskbG+GYPzs4dmFsYSEkWWRDeni4Co008AqdY4t28O1/CYrhZoY42rC0ZZ4+p5jNvbY377eIzb12NcfY9xqR6O/TzG7e8xroHHuIYejgOdfqL46CJOP9Xpt+jbJX9BywlNXumWNmn06J69G7de3HHE5MFj2y5YPe53/P5MdOu0pXRNw3ieLd2TaM67ijEi4sSp/UbO/wc4fZ2vO91zGH4evABejG4786gVbyld5MAA0z4X9b8eXvK/vj3Xw0vOenje6b/g9F801sNEDE8CL4NXrPWQ4PRTxV8ItcT/sk32u2yRU0eZGVzTtZFwcTYU/3FO8b8NImacbrpE2VpQbZcgYNxTAuYHt5tql5pTo1tLiRTZscG9Gg0hfDUaPN1rAfbAeON6zdiTUsV/F9Q11XHZJVZpyzU1wDoIsr5eD7C3bPkTMG6v5fWznvxOG2R534iW7/bVvDQ1Gnw9vRkgrrIsBIJMa/reircQcBMHPQS8FSBDTCvnAkP/TIujIJu2k23kt8Ns5LfjWEFvB9xw2wjFf9p3/G+IZvHMX7tpcWTyII53Q55rvuNsn3ejWy/a7HPu9zD8PvgAfBjynHtigB34vQD54KOQ6+EjZ/nfd/ofOP0PjfUwHcMfg0/Ap874BPG+aAua54NsxzCeBOF4JpKWZ3qcnmKFpWW0z8powUrzfF66J8Gcd3EX09Od/mdO/3MjQ8/A8BfgS/CVMz5qzNjrAoi1gYJ6ZsTjSXRI8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ak0UuPq0JDEo0MlaFZTKD/30XPDUXCLouDKqTvL4kFAlaJhLyrRcQB3VBbF443xRQ6vRGYbCgcS6smKTFmwbmW41BdWJbDin1puDp09wapjNDGxiL+fmLxmCAymZUJXgRxx954ecpjot8/qKBoxXxto+AbLN3anBuGinfF0uEVhoRXV9jUKEQo3WJvJ4O8jGo0BisNmLguxRymxaZ0l0K4NrcA8f92sBBPkOCNrQS+UW3/n46cxud0uP9dA6HBjC1oRF9d2jgqLy4DT/gtCgNF+4af4l64w9pVKDZvJBXjtz1AocbPDK3HQ372yLGUUrnjM71hYn+xA2fZzeo+56BoyEqZ8IWixwLu7tzGG3x8vpuWRVOofsSOWo4Z4M0+ztblq3fcqS/bfrPCg9yuXneHW+O6xeVOu42T/ttvXw9H54Xd08/3u2OHfffj2/P25fzcatK85lfPr7IYX4FDA9yHC+X0k5y0NdLKJd5BQEeLurMTw=="
|
|
2164
2164
|
},
|
|
2165
2165
|
{
|
|
2166
2166
|
"name": "utility_is_consumable",
|
|
@@ -2670,7 +2670,7 @@
|
|
|
2670
2670
|
}
|
|
2671
2671
|
},
|
|
2672
2672
|
"bytecode": "JwACBAEoAAABBIBOJwAABE4nAgIEAScCAwQAHwoAAgADAE0tCE0BJQAAAEElAAAAmCcCAQROJwICBAA7DgACAAEpAABDAEfazXMsAABEADBkTnLhMaApuFBFtoGBWF0oM+hIeblwkUPh9ZPwAAAAJwBFBAMnAEYBACcARwQAJwBIAAAnAEkBAScASgQBJwBLAAEnAEwEAiYlAAARYCkCAAIAuDnekQoqAQIDJwIEBAAnAgYEAwAqBAYFLQgBAgAIAQUBJwMCBAEAIgICBS0OBAUAIgUCBS0OBAUnAgUEAwAqAgUEJwIEAAIkAgADAAAA9iMAAAKoLQgBAycCBQQDAAgBBQEnAwMEAQAiAwIFHzAATABKAAUtCAEFAAABAgEtDgMFLQgBAwAAAQIBLQxHAycCBwQILQgACC0KBQktCgMKAAgABwAlAAARhi0CAAAtCgkGACIGSggtCwgHJwIIBA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NpuY8s6vJksSeY7o21sz28tMwTZXOcavN17xONyqCrsrHtsrQHaFmSrdeBHJvgQ7jOPsItLueBbni7Mh48ThtCF7FZZTjYc6vEjFtcs/qWxvqly5/LNXcenyz/a0+9rVn52K2m1fWA+/QuAlKi7eHdo2xO5iDsd/m4qLEy3cP812PqdbBuNZvi7yVQ0x2kY9xtJvqUT0A5B4vIj1EhXZbHPgbbUgc7/jMK3dpsLOgyJ1vq0hFkrGnG5rSLZLC8N93daQavYda7utFq35Lw/gm4wzsvcFp5tUtGLrYam3KGA7+2G6rR+CnWPFUM+NO+1OoO6fpmx5V063dYTNUW50Z0/epqDadatKh7WcLwdY1ZbRdrjp/RIF3RW0mxSYfzjOqhcoaKmZPefnCn4ZH9/+/v7Tsz8c+1VUfXr/9rcP7/Tjn18+/n746ef//b1+sv7w7N+f/vr93R9fPr0TTf7XZ8c/P0f5DeVxhEK/vHnK+DzqI38GcHyW39v085imbzjhY5Sfh9Hl45/8y1ep4P8B"
|
|
2674
2674
|
},
|
|
2675
2675
|
{
|
|
2676
2676
|
"name": "sync_private_state",
|
|
@@ -3313,7 +3313,7 @@
|
|
|
3313
3313
|
},
|
|
3314
3314
|
"102": {
|
|
3315
3315
|
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/macros/calls_generation/external_functions_stubs.nr",
|
|
3316
|
-
"source": "//! Stubs are auto-generated wrapper functions that provide an ergonomic interface for cross-contract calls.\n//! Instead of manually serializing arguments and creating call interfaces, stubs allow natural syntax, e.g. for\n//! enqueuing calls to public functions:\n//!\n//! ExternalContract.at(address).some_method(arg1, arg2).enqueue()\n\nuse crate::macros::utils::{AsStrQuote, compute_fn_selector};\nuse protocol_types::meta::utils::derive_serialization_quotes;\nuse std::meta::unquote;\n\ncomptime global FROM_FIELD: TypedExpr = {\n let from_field_trait = quote { protocol_types::traits::FromField }.as_trait_constraint();\n let function_selector_typ =\n quote { protocol_types::abis::function_selector::FunctionSelector }.as_type();\n function_selector_typ.get_trait_impl(from_field_trait).unwrap().methods().filter(|m| {\n m.name() == quote { from_field }\n })[0]\n .as_typed_expr()\n};\n\n/// Utility function creating stubs used by all the stub functions in this file.\ncomptime fn create_stub_base(\n f: FunctionDefinition,\n) -> (Quoted, Quoted, Quoted, Quoted, u32, Quoted, u32, Field) {\n // Dear privacy adventurer,\n // Chances are, you've command+clicked on the name of an external function\n // call -- seeking to view that function -- only to end up here.\n // Here's an explanation:\n // The external contract that you're calling was likely annotated with the `#[aztec]`\n // annotation -- as all good aztec contracts are. This triggers a macro which generates\n // a \"contract interface\" for that contract, which is effectively a pretty interface\n // that gives natural contract calling semantics:\n //\n // `MyImportedContract.at(some_address).my_method(arg1, arg2).enqueue();\n //\n // Unfortunately, the usage of macros makes it a bit of a black box.\n // To actually view the target function, you could instead command+click on\n // `MyImportedContract`, or you can just manually search it.\n // If you want to view the noir code that gets generated by this macro, you can\n // use `nargo expand` on your contract.\n let fn_name = f.name();\n let fn_parameters = f.parameters();\n let fn_parameters_list =\n fn_parameters.map(|(name, typ): (Quoted, Type)| quote { $name: $typ }).join(quote {,});\n\n let (serialized_args_array_construction, serialized_args_array_len_quote, serialized_args_array_name) =\n derive_serialization_quotes(fn_parameters, false);\n let serialized_args_array_len: u32 =\n unquote!(quote { ($serialized_args_array_len_quote) as u32 });\n\n let (fn_name_str, _) = fn_name.as_str_quote();\n let fn_name_len: u32 = unquote!(quote { $fn_name_str.as_bytes().len()});\n let fn_selector: Field = compute_fn_selector(f);\n\n (\n fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name,\n serialized_args_array_len, fn_name_str, fn_name_len, fn_selector,\n )\n}\n\npub(crate) comptime fn create_private_stub(f: FunctionDefinition) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, serialized_args_array_len, fn_name_str, fn_name_len, fn_selector) =\n create_stub_base(f);\n let fn_return_type = f.return_type();\n\n quote {\n pub fn $fn_name(self, $fn_parameters_list) -> dep::aztec::context::calls::PrivateCall<$fn_name_len, $serialized_args_array_len, $fn_return_type> {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n dep::aztec::context::calls::PrivateCall::new(\n self.target_contract,\n selector,\n $fn_name_str,\n $serialized_args_array_name,\n )\n }\n }\n}\n\npub(crate) comptime fn create_private_static_stub(f: FunctionDefinition) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, serialized_args_array_len, fn_name_str, fn_name_len, fn_selector) =\n create_stub_base(f);\n let fn_return_type = f.return_type();\n\n quote {\n pub fn $fn_name(self, $fn_parameters_list) -> dep::aztec::context::calls::PrivateStaticCall<$fn_name_len, $serialized_args_array_len, $fn_return_type> {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n dep::aztec::context::calls::PrivateStaticCall::new(\n self.target_contract,\n selector,\n $fn_name_str,\n $serialized_args_array_name,\n )\n }\n }\n}\n\npub(crate) comptime fn create_public_stub(f: FunctionDefinition) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, serialized_args_array_len, fn_name_str, fn_name_len, fn_selector) =\n create_stub_base(f);\n let fn_return_type = f.return_type();\n\n quote {\n pub fn $fn_name(self, $fn_parameters_list) -> dep::aztec::context::calls::PublicCall<$fn_name_len, $serialized_args_array_len, $fn_return_type> {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n dep::aztec::context::calls::PublicCall::new(\n self.target_contract,\n selector,\n $fn_name_str,\n $serialized_args_array_name,\n )\n }\n }\n}\n\npub(crate) comptime fn create_public_static_stub(f: FunctionDefinition) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, serialized_args_array_len, fn_name_str, fn_name_len, fn_selector) =\n create_stub_base(f);\n let fn_return_type = f.return_type();\n\n quote {\n pub fn $fn_name(self, $fn_parameters_list) -> dep::aztec::context::calls::PublicStaticCall<$fn_name_len, $serialized_args_array_len, $fn_return_type> {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n dep::aztec::context::calls::PublicStaticCall::new(\n self.target_contract,\n selector,\n $fn_name_str,\n $serialized_args_array_name,\n )\n }\n }\n}\n\npub(crate) comptime fn create_utility_stub(f: FunctionDefinition) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, serialized_args_array_len, fn_name_str, fn_name_len, fn_selector) =\n create_stub_base(f);\n let fn_return_type = f.return_type();\n\n quote {\n pub fn $fn_name(self, $fn_parameters_list) -> dep::aztec::context::calls::UtilityCall<$fn_name_len, $serialized_args_array_len, $fn_return_type> {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n dep::aztec::context::calls::UtilityCall::new(\n self.target_contract,\n selector,\n $fn_name_str,\n $serialized_args_array_name,\n )\n }\n }\n}\n\n// Self-call stub generation functions for CallSelf, CallSelfStatic, EnqueueSelf and EnqueueSelfStatic structs\n\n// Note: Unlike for the call registry, the self-call registry stubs directly perform the call instead of returning a\n// call interface struct.\n// TODO(F-131): This ^ is confusing and should be reflected in the naming.\n\n/// Creates a stub for calling a private function (or static private function if `is_static` is true) from private\n/// context (for CallSelf<&mut PrivateContext> and CallSelfStatic<&mut PrivateContext>).\npub comptime fn create_private_self_call_stub(f: FunctionDefinition, is_static: bool) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, _, _, _, fn_selector) =\n create_stub_base(f);\n let fn_return_type = f.return_type();\n\n quote {\n pub fn $fn_name(self, $fn_parameters_list) -> $fn_return_type {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n let args_hash = aztec::hash::hash_args($serialized_args_array_name);\n aztec::oracle::execution_cache::store($serialized_args_array_name, args_hash);\n let returns_hash = self.context.call_private_function_with_args_hash(\n self.address,\n selector,\n args_hash,\n $is_static\n );\n returns_hash.get_preimage()\n }\n }\n}\n\n// TODO(F-131): Drop the use of the Call in the following 4 functions - it doesn't make sense to not not\n// perform the call directly using the context. I tried doing this already but it became a lot of pain due to the use of\n// slices and them being illegal to return from unconstrained functions. Makes sense to tackle this when cleaning up the\n// call interface code.\n// Note: Once we get rid of the structs we will be able to merge some of the static and non-static stub functions.\n\n/// Creates a stub for calling a public function from public context (for CallSelf<PublicContext>)\npub comptime fn create_public_self_call_stub(f: FunctionDefinition) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, _, fn_name_str, _, fn_selector) =\n create_stub_base(f);\n let fn_return_type = f.return_type();\n\n quote {\n pub fn $fn_name(self, $fn_parameters_list) -> $fn_return_type {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n unsafe {\n aztec::context::calls::PublicCall::new(\n self.address,\n selector,\n $fn_name_str,\n $serialized_args_array_name,\n ).call(self.context)\n }\n }\n }\n}\n\n/// Creates a static stub for calling a public view function from public context (for CallSelfStatic<PublicContext>)\npub comptime fn create_public_self_call_static_stub(f: FunctionDefinition) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, _, fn_name_str, _, fn_selector) =\n create_stub_base(f);\n let fn_return_type = f.return_type();\n\n quote {\n pub fn $fn_name(self, $fn_parameters_list) -> $fn_return_type {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n unsafe {\n aztec::context::calls::PublicStaticCall::new(\n self.address,\n selector,\n $fn_name_str,\n $serialized_args_array_name,\n ).view(self.context)\n }\n }\n }\n}\n\n/// Creates a static stub for enqueuing a public view function from private context (for EnqueueSelfStatic<&mut PrivateContext>)\npub comptime fn create_public_self_enqueue_static_stub(f: FunctionDefinition) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, serialized_args_array_len, fn_name_str, fn_name_len, fn_selector) =\n create_stub_base(f);\n\n quote {\n pub fn $fn_name(self, $fn_parameters_list) {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n let interface: aztec::context::calls::PublicStaticCall<$fn_name_len, $serialized_args_array_len, ()> = aztec::context::calls::PublicStaticCall::new(\n self.address,\n selector,\n $fn_name_str,\n $serialized_args_array_name,\n );\n interface.enqueue_view(self.context);\n }\n }\n}\n\n/// Creates a stub for enqueuing a public function from private context (for EnqueueSelf<&mut PrivateContext>)\npub comptime fn create_public_self_enqueue_stub(f: FunctionDefinition) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, serialized_args_array_len, fn_name_str, fn_name_len, fn_selector) =\n create_stub_base(f);\n\n quote {\n pub fn $fn_name(self, $fn_parameters_list) {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n let interface: aztec::context::calls::PublicCall<$fn_name_len, $serialized_args_array_len, ()> = aztec::context::calls::PublicCall::new(\n self.address,\n selector,\n $fn_name_str,\n $serialized_args_array_name,\n );\n interface.enqueue(self.context);\n }\n }\n}\n"
|
|
3316
|
+
"source": "//! Stubs are auto-generated wrapper functions that provide an ergonomic interface for cross-contract calls.\n//! Instead of manually serializing arguments and creating call interfaces, stubs allow natural syntax, e.g. for\n//! enqueuing calls to public functions:\n//!\n//! ExternalContract.at(address).some_method(arg1, arg2).enqueue()\n\nuse crate::macros::utils::{AsStrQuote, compute_fn_selector};\nuse protocol_types::meta::utils::derive_serialization_quotes;\nuse std::meta::unquote;\n\ncomptime global FROM_FIELD: TypedExpr = {\n let from_field_trait = quote { protocol_types::traits::FromField }.as_trait_constraint();\n let function_selector_typ =\n quote { protocol_types::abis::function_selector::FunctionSelector }.as_type();\n function_selector_typ.get_trait_impl(from_field_trait).unwrap().methods().filter(|m| {\n m.name() == quote { from_field }\n })[0]\n .as_typed_expr()\n};\n\n/// Utility function creating stubs used by all the stub functions in this file.\ncomptime fn create_stub_base(\n f: FunctionDefinition,\n) -> (Quoted, Quoted, Quoted, Quoted, u32, Quoted, u32, Field) {\n // Dear privacy adventurer,\n // Chances are, you've command+clicked on the name of an external function\n // call -- seeking to view that function -- only to end up here.\n // Here's an explanation:\n // The external contract that you're calling was likely annotated with the `#[aztec]`\n // annotation -- as all good aztec contracts are. This triggers a macro which generates\n // a \"contract interface\" for that contract, which is effectively a pretty interface\n // that gives natural contract calling semantics:\n //\n // `MyImportedContract.at(some_address).my_method(arg1, arg2).enqueue();\n //\n // Unfortunately, the usage of macros makes it a bit of a black box.\n // To actually view the target function, you could instead command+click on\n // `MyImportedContract`, or you can just manually search it.\n // If you want to view the noir code that gets generated by this macro, you can\n // use `nargo expand` on your contract.\n let fn_name = f.name();\n let fn_parameters = f.parameters();\n let fn_parameters_list =\n fn_parameters.map(|(name, typ): (Quoted, Type)| quote { $name: $typ }).join(quote {,});\n\n let (serialized_args_array_construction, serialized_args_array_len_quote, serialized_args_array_name) =\n derive_serialization_quotes(fn_parameters, false);\n let serialized_args_array_len: u32 =\n unquote!(quote { ($serialized_args_array_len_quote) as u32 });\n\n let (fn_name_str, _) = fn_name.as_str_quote();\n let fn_name_len: u32 = unquote!(quote { $fn_name_str.as_bytes().len()});\n let fn_selector: Field = compute_fn_selector(f);\n\n (\n fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name,\n serialized_args_array_len, fn_name_str, fn_name_len, fn_selector,\n )\n}\n\npub(crate) comptime fn create_private_stub(f: FunctionDefinition) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, serialized_args_array_len, fn_name_str, fn_name_len, fn_selector) =\n create_stub_base(f);\n let fn_return_type = f.return_type();\n\n quote {\n pub fn $fn_name(self, $fn_parameters_list) -> dep::aztec::context::calls::PrivateCall<$fn_name_len, $serialized_args_array_len, $fn_return_type> {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n dep::aztec::context::calls::PrivateCall::new(\n self.target_contract,\n selector,\n $fn_name_str,\n $serialized_args_array_name,\n )\n }\n }\n}\n\npub(crate) comptime fn create_private_static_stub(f: FunctionDefinition) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, serialized_args_array_len, fn_name_str, fn_name_len, fn_selector) =\n create_stub_base(f);\n let fn_return_type = f.return_type();\n\n quote {\n pub fn $fn_name(self, $fn_parameters_list) -> dep::aztec::context::calls::PrivateStaticCall<$fn_name_len, $serialized_args_array_len, $fn_return_type> {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n dep::aztec::context::calls::PrivateStaticCall::new(\n self.target_contract,\n selector,\n $fn_name_str,\n $serialized_args_array_name,\n )\n }\n }\n}\n\npub(crate) comptime fn create_public_stub(f: FunctionDefinition) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, serialized_args_array_len, fn_name_str, fn_name_len, fn_selector) =\n create_stub_base(f);\n let fn_return_type = f.return_type();\n\n quote {\n pub fn $fn_name(self, $fn_parameters_list) -> dep::aztec::context::calls::PublicCall<$fn_name_len, $serialized_args_array_len, $fn_return_type> {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n dep::aztec::context::calls::PublicCall::new(\n self.target_contract,\n selector,\n $fn_name_str,\n $serialized_args_array_name,\n )\n }\n }\n}\n\npub(crate) comptime fn create_public_static_stub(f: FunctionDefinition) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, serialized_args_array_len, fn_name_str, fn_name_len, fn_selector) =\n create_stub_base(f);\n let fn_return_type = f.return_type();\n\n quote {\n pub fn $fn_name(self, $fn_parameters_list) -> dep::aztec::context::calls::PublicStaticCall<$fn_name_len, $serialized_args_array_len, $fn_return_type> {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n dep::aztec::context::calls::PublicStaticCall::new(\n self.target_contract,\n selector,\n $fn_name_str,\n $serialized_args_array_name,\n )\n }\n }\n}\n\npub(crate) comptime fn create_utility_stub(f: FunctionDefinition) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, serialized_args_array_len, fn_name_str, fn_name_len, fn_selector) =\n create_stub_base(f);\n let fn_return_type = f.return_type();\n\n quote {\n pub fn $fn_name(self, $fn_parameters_list) -> dep::aztec::context::calls::UtilityCall<$fn_name_len, $serialized_args_array_len, $fn_return_type> {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n dep::aztec::context::calls::UtilityCall::new(\n self.target_contract,\n selector,\n $fn_name_str,\n $serialized_args_array_name,\n )\n }\n }\n}\n\n// Self-call stub generation functions for CallSelf, CallSelfStatic, EnqueueSelf, and EnqueueSelfStatic structs.\n// Unlike the stubs above, the self-call stubs directly perform the call instead of returning a struct that can\n// be later used to perform the call.\n\n/// Creates a stub for calling a private function (or static private function if `is_static` is true) from private\n/// context (for CallSelf<&mut PrivateContext> and CallSelfStatic<&mut PrivateContext>).\npub comptime fn create_private_self_call_stub(f: FunctionDefinition, is_static: bool) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, _, _, _, fn_selector) =\n create_stub_base(f);\n let fn_return_type = f.return_type();\n\n quote {\n pub fn $fn_name(self, $fn_parameters_list) -> $fn_return_type {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n let args_hash = aztec::hash::hash_args($serialized_args_array_name);\n aztec::oracle::execution_cache::store($serialized_args_array_name, args_hash);\n let returns_hash = self.context.call_private_function_with_args_hash(\n self.address,\n selector,\n args_hash,\n $is_static\n );\n returns_hash.get_preimage()\n }\n }\n}\n\n/// Creates a stub for calling a public function from public context (for CallSelf<PublicContext>)\npub comptime fn create_public_self_call_stub(f: FunctionDefinition) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, _, fn_name_str, _, fn_selector) =\n create_stub_base(f);\n let fn_return_type = f.return_type();\n\n // TODO: It makes sense to drop the use of PublicStaticCall struct here and just perform the call directly but\n // before doing that we need to drop the use of slices from return values because we cannot return slices from\n // an unconstrained function. This is not a priority right now.\n quote {\n pub fn $fn_name(self, $fn_parameters_list) -> $fn_return_type {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n unsafe {\n aztec::context::calls::PublicCall::new(\n self.address,\n selector,\n $fn_name_str,\n $serialized_args_array_name,\n ).call(self.context)\n }\n }\n }\n}\n\n/// Creates a static stub for calling a public view function from public context (for CallSelfStatic<PublicContext>)\npub comptime fn create_public_self_call_static_stub(f: FunctionDefinition) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, _, fn_name_str, _, fn_selector) =\n create_stub_base(f);\n let fn_return_type = f.return_type();\n\n // TODO: It makes sense to drop the use of PublicStaticCall struct here and just perform the call directly but\n // before doing that we need to drop the use of slices from return values because we cannot return slices from\n // an unconstrained function. This is not a priority right now.\n quote {\n pub fn $fn_name(self, $fn_parameters_list) -> $fn_return_type {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n unsafe {\n aztec::context::calls::PublicStaticCall::new(\n self.address,\n selector,\n $fn_name_str,\n $serialized_args_array_name,\n ).view(self.context)\n }\n }\n }\n}\n\n/// Creates a static stub for enqueuing a public view function from private context (for EnqueueSelfStatic<&mut PrivateContext>)\npub comptime fn create_public_self_enqueue_static_stub(f: FunctionDefinition) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, _serialized_args_array_len, _fn_name_str, _fn_name_len, fn_selector) =\n create_stub_base(f);\n\n quote {\n pub fn $fn_name(self, $fn_parameters_list) {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n let calldata = [aztec::protocol_types::traits::ToField::to_field(selector)].concat($serialized_args_array_name);\n let calldata_hash = aztec::hash::hash_calldata_array(calldata);\n aztec::oracle::execution_cache::store(calldata, calldata_hash);\n self.context.call_public_function_with_calldata_hash(\n self.address,\n calldata_hash,\n /*is_static_call=*/ true,\n /*hide_msg_sender=*/ false,\n );\n }\n }\n}\n\n/// Creates a stub for enqueuing a public function from private context (for EnqueueSelf<&mut PrivateContext>)\npub comptime fn create_public_self_enqueue_stub(f: FunctionDefinition) -> Quoted {\n let (fn_name, fn_parameters_list, serialized_args_array_construction, serialized_args_array_name, _serialized_args_array_len, _fn_name_str, _fn_name_len, fn_selector) =\n create_stub_base(f);\n\n quote {\n pub fn $fn_name(self, $fn_parameters_list) {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n let calldata = [aztec::protocol_types::traits::ToField::to_field(selector)].concat($serialized_args_array_name);\n let calldata_hash = aztec::hash::hash_calldata_array(calldata);\n aztec::oracle::execution_cache::store(calldata, calldata_hash);\n self.context.call_public_function_with_calldata_hash(\n self.address,\n calldata_hash,\n /*is_static_call=*/ false,\n /*hide_msg_sender=*/ false,\n );\n }\n }\n}\n"
|
|
3317
3317
|
},
|
|
3318
3318
|
"105": {
|
|
3319
3319
|
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/macros/dispatch.nr",
|
|
@@ -3539,10 +3539,6 @@
|
|
|
3539
3539
|
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/capsules/mod.nr",
|
|
3540
3540
|
"source": "use crate::oracle::capsules;\nuse protocol_types::{address::AztecAddress, traits::{Deserialize, Serialize}};\n\n/// A dynamically sized array backed by PXE's non-volatile database (called capsules). Values are persisted until\n/// deleted, so they can be e.g. stored during simulation of a transaction and later retrieved during witness\n/// generation. All values are scoped per contract address, so external contracts cannot access them.\npub struct CapsuleArray<T> {\n contract_address: AztecAddress,\n /// The base slot is where the array length is stored in capsules. Array elements are stored in consecutive slots\n /// after the base slot. For example, with base slot 5: the length is at slot 5, the first element (index 0) is at\n /// slot 6, the second element (index 1) is at slot 7, and so on.\n base_slot: Field,\n}\n\nimpl<T> CapsuleArray<T> {\n /// Returns a CapsuleArray connected to a contract's capsules at a base slot. Array elements are stored in\n /// contiguous slots following the base slot, so there should be sufficient space between array base slots to\n /// accommodate elements. A reasonable strategy is to make the base slot a hash of a unique value.\n pub unconstrained fn at(contract_address: AztecAddress, base_slot: Field) -> Self {\n Self { contract_address, base_slot }\n }\n\n /// Returns the number of elements stored in the array.\n pub unconstrained fn len(self) -> u32 {\n // An uninitialized array defaults to a length of 0.\n capsules::load(self.contract_address, self.base_slot).unwrap_or(0) as u32\n }\n\n /// Stores a value at the end of the array.\n pub unconstrained fn push(self, value: T)\n where\n T: Serialize,\n {\n let current_length = self.len();\n\n // The slot corresponding to the index `current_length` is the first slot immediately after the end of the\n // array, which is where we want to place the new value.\n capsules::store(self.contract_address, self.slot_at(current_length), value);\n\n // Then we simply update the length.\n let new_length = current_length + 1;\n capsules::store(self.contract_address, self.base_slot, new_length);\n }\n\n /// Retrieves the value stored in the array at `index`. Throws if the index is out of bounds.\n pub unconstrained fn get(self, index: u32) -> T\n where\n T: Deserialize,\n {\n assert(index < self.len(), \"Attempted to read past the length of a CapsuleArray\");\n\n capsules::load(self.contract_address, self.slot_at(index)).unwrap()\n }\n\n /// Deletes the value stored in the array at `index`. Throws if the index is out of bounds.\n pub unconstrained fn remove(self, index: u32) {\n let current_length = self.len();\n assert(index < current_length, \"Attempted to delete past the length of a CapsuleArray\");\n\n // In order to be able to remove elements at arbitrary indices, we need to shift the entire contents of the\n // array past the removed element one slot backward so that we don't end up with a gap and preserve the\n // contiguous slots. We can skip this when deleting the last element however.\n if index != current_length - 1 {\n // The source and destination regions overlap, but `copy` supports this.\n capsules::copy(\n self.contract_address,\n self.slot_at(index + 1),\n self.slot_at(index),\n current_length - index - 1,\n );\n }\n\n // We can now delete the last element (which has either been copied to the slot immediately before it, or was\n // the element we meant to delete in the first place) and update the length.\n capsules::delete(self.contract_address, self.slot_at(current_length - 1));\n capsules::store(self.contract_address, self.base_slot, current_length - 1);\n }\n\n /// Iterates over the entire array, calling the callback with all values and their array index. The order in which\n /// values are processed is arbitrary.\n ///\n /// It is safe to delete the current element (and only the current element) from inside the callback via `remove`:\n /// ```noir\n /// array.for_each(|index, value| {\n /// if some_condition(value) {\n /// array.remove(index); // safe only for this index\n /// }\n /// }\n /// ```\n ///\n /// If all elements in the array need to iterated over and then removed, then using `for_each` results in optimal\n /// efficiency.\n ///\n /// It is **not** safe to push new elements into the array from inside the callback.\n pub unconstrained fn for_each<Env>(self, f: unconstrained fn[Env](u32, T) -> ())\n where\n T: Deserialize,\n {\n // Iterating over all elements is simple, but we want to do it in such a way that a) deleting the current\n // element is safe to do, and b) deleting *all* elements is optimally efficient. This is because CapsuleArrays\n // are typically used to hold pending tasks, so iterating them while clearing completed tasks (sometimes\n // unconditionally, resulting in a full clear) is a very common access pattern.\n //\n // The way we achieve this is by iterating backwards: each element can always be deleted since it won't change\n // any preceding (lower) indices, and if every element is deleted then every element will (in turn) be the last\n // element. This results in an optimal full clear since `remove` will be able to skip the `capsules::copy` call\n // to shift any elements past the deleted one (because there will be none).\n let mut i = self.len();\n while i > 0 {\n i -= 1;\n f(i, self.get(i));\n }\n }\n\n unconstrained fn slot_at(self, index: u32) -> Field {\n // Elements are stored immediately after the base slot, so we add 1 to it to compute the slot for the first\n // element.\n self.base_slot + 1 + index as Field\n }\n}\n\nmod test {\n use crate::test::helpers::test_environment::TestEnvironment;\n use super::CapsuleArray;\n\n global SLOT: Field = 1230;\n\n #[test]\n unconstrained fn empty_array() {\n let env = TestEnvironment::new();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let array: CapsuleArray<Field> = CapsuleArray::at(contract_address, SLOT);\n assert_eq(array.len(), 0);\n });\n }\n\n #[test(should_fail_with = \"Attempted to read past the length of a CapsuleArray\")]\n unconstrained fn empty_array_read() {\n let env = TestEnvironment::new();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let array = CapsuleArray::at(contract_address, SLOT);\n let _: Field = array.get(0);\n });\n }\n\n #[test]\n unconstrained fn array_push() {\n let env = TestEnvironment::new();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let array = CapsuleArray::at(contract_address, SLOT);\n array.push(5);\n\n assert_eq(array.len(), 1);\n assert_eq(array.get(0), 5);\n });\n }\n\n #[test(should_fail_with = \"Attempted to read past the length of a CapsuleArray\")]\n unconstrained fn read_past_len() {\n let env = TestEnvironment::new();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let array = CapsuleArray::at(contract_address, SLOT);\n array.push(5);\n\n let _ = array.get(1);\n });\n }\n\n #[test]\n unconstrained fn array_remove_last() {\n let env = TestEnvironment::new();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let array = CapsuleArray::at(contract_address, SLOT);\n\n array.push(5);\n array.remove(0);\n\n assert_eq(array.len(), 0);\n });\n }\n\n #[test]\n unconstrained fn array_remove_some() {\n let env = TestEnvironment::new();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let array = CapsuleArray::at(contract_address, SLOT);\n\n array.push(7);\n array.push(8);\n array.push(9);\n\n assert_eq(array.len(), 3);\n assert_eq(array.get(0), 7);\n assert_eq(array.get(1), 8);\n assert_eq(array.get(2), 9);\n\n array.remove(1);\n\n assert_eq(array.len(), 2);\n assert_eq(array.get(0), 7);\n assert_eq(array.get(1), 9);\n });\n }\n\n #[test]\n unconstrained fn array_remove_all() {\n let env = TestEnvironment::new();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let array = CapsuleArray::at(contract_address, SLOT);\n\n array.push(7);\n array.push(8);\n array.push(9);\n\n array.remove(1);\n array.remove(1);\n array.remove(0);\n\n assert_eq(array.len(), 0);\n });\n }\n\n #[test]\n unconstrained fn for_each_called_with_all_elements() {\n let env = TestEnvironment::new();\n env.private_context(|context| {\n let contract_address = context.this_address();\n let array = CapsuleArray::at(contract_address, SLOT);\n\n array.push(4);\n array.push(5);\n array.push(6);\n\n // We store all values that we were called with and check that all (value, index) tuples are present. Note that\n // we do not care about the order in which each tuple was passed to the closure.\n let called_with = &mut BoundedVec::<(u32, Field), 3>::new();\n array.for_each(|index, value| { called_with.push((index, value)); });\n\n assert_eq(called_with.len(), 3);\n assert(called_with.any(|(index, value)| (index == 0) & (value == 4)));\n assert(called_with.any(|(index, value)| (index == 1) & (value == 5)));\n assert(called_with.any(|(index, value)| (index == 2) & (value == 6)));\n });\n }\n\n #[test]\n unconstrained fn for_each_remove_some() {\n let env = TestEnvironment::new();\n env.private_context(|context| {\n let contract_address = context.this_address();\n let array = CapsuleArray::at(contract_address, SLOT);\n\n array.push(4);\n array.push(5);\n array.push(6);\n\n array.for_each(|index, _| {\n if index == 1 {\n array.remove(index);\n }\n });\n\n assert_eq(array.len(), 2);\n assert_eq(array.get(0), 4);\n assert_eq(array.get(1), 6);\n });\n }\n\n #[test]\n unconstrained fn for_each_remove_all() {\n let env = TestEnvironment::new();\n env.private_context(|context| {\n let contract_address = context.this_address();\n let array = CapsuleArray::at(contract_address, SLOT);\n\n array.push(4);\n array.push(5);\n array.push(6);\n\n array.for_each(|index, _| { array.remove(index); });\n\n assert_eq(array.len(), 0);\n });\n }\n\n #[test]\n unconstrained fn for_each_remove_all_no_copy() {\n let env = TestEnvironment::new();\n env.private_context(|context| {\n let contract_address = context.this_address();\n let array = CapsuleArray::at(contract_address, SLOT);\n\n array.push(4);\n array.push(5);\n array.push(6);\n\n // We test that the utilityCopyCapsule was never called, which is the expensive operation we want to avoid.\n let mock = std::test::OracleMock::mock(\"utilityCopyCapsule\");\n\n array.for_each(|index, _| { array.remove(index); });\n\n assert_eq(mock.times_called(), 0);\n });\n }\n}\n"
|
|
3541
3541
|
},
|
|
3542
|
-
"61": {
|
|
3543
|
-
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/context/calls.nr",
|
|
3544
|
-
"source": "use dep::protocol_types::{\n abis::function_selector::FunctionSelector,\n address::AztecAddress,\n traits::{Deserialize, ToField},\n};\n\nuse crate::context::{gas::GasOpts, private_context::PrivateContext, public_context::PublicContext};\nuse crate::hash::{hash_args, hash_calldata_array};\nuse crate::oracle::execution_cache;\n\n// PrivateCall\n\n#[must_use = \"Your private call needs to be passed into the `self.call(...)` method to be executed (e.g. `self.call(MyContract::at(address).my_private_function(...args))`\"]\npub struct PrivateCall<let M: u32, let N: u32, T> {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str<M>,\n args_hash: Field,\n pub args: [Field; N],\n return_type: T,\n}\n\nimpl<let M: u32, let N: u32, T> PrivateCall<M, N, T> {\n pub fn new(\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<M>,\n args: [Field; N],\n ) -> Self {\n let args_hash = hash_args(args);\n Self { target_contract, selector, name, args_hash, args, return_type: std::mem::zeroed() }\n }\n}\n\nimpl<let M: u32, let N: u32, T> PrivateCall<M, N, T>\nwhere\n T: Deserialize,\n{\n /// **[DEPRECATED]**\n /// This function is deprecated. Please use the new contract API:\n /// `self.call(MyContract::at(address).my_private_function(...args))`\n /// instead of manually constructing and calling `PrivateCall`.\n pub fn call(self, context: &mut PrivateContext) -> T {\n execution_cache::store(self.args, self.args_hash);\n let returns_hash = context.call_private_function_with_args_hash(\n self.target_contract,\n self.selector,\n self.args_hash,\n false,\n );\n\n // If T is () (i.e. if the function does not return anything) then `get_preimage` will constrain that the\n // returns hash is empty as per the protocol rules.\n returns_hash.get_preimage()\n }\n}\n\n// PrivateStaticCall\n\n#[must_use = \"Your private static call needs to be passed into the `self.view(...)` method to be executed (e.g. `self.view(MyContract::at(address).my_private_static_function(...args))`\"]\npub struct PrivateStaticCall<let M: u32, let N: u32, T> {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str<M>,\n args_hash: Field,\n pub args: [Field; N],\n return_type: T,\n}\n\nimpl<let M: u32, let N: u32, T> PrivateStaticCall<M, N, T> {\n pub fn new(\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<M>,\n args: [Field; N],\n ) -> Self {\n let args_hash = hash_args(args);\n Self { target_contract, selector, name, args_hash, args, return_type: std::mem::zeroed() }\n }\n\n /// **[DEPRECATED]**\n /// This function is deprecated. Please use the new contract API:\n /// `self.view(MyContract::at(address).my_private_static_function(...args))`\n /// instead of manually constructing and calling `PrivateCall`.\n pub fn view(self, context: &mut PrivateContext) -> T\n where\n T: Deserialize,\n {\n execution_cache::store(self.args, self.args_hash);\n let returns = context.call_private_function_with_args_hash(\n self.target_contract,\n self.selector,\n self.args_hash,\n true,\n );\n returns.get_preimage()\n }\n}\n\n// PublicCall\n\n#[must_use = \"Your public call needs to be passed into the `self.call(...)`, `self.enqueue(...)` or `self.enqueue_incognito(...)` method to be executed (e.g. `self.call(MyContract::at(address).my_public_function(...args))`\"]\npub struct PublicCall<let M: u32, let N: u32, T> {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str<M>,\n pub args: [Field; N],\n gas_opts: GasOpts,\n return_type: T,\n}\n\nimpl<let M: u32, let N: u32, T> PublicCall<M, N, T> {\n pub fn new(\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<M>,\n args: [Field; N],\n ) -> Self {\n Self {\n target_contract,\n selector,\n name,\n args,\n gas_opts: GasOpts::default(),\n return_type: std::mem::zeroed(),\n }\n }\n\n pub fn with_gas(mut self, gas_opts: GasOpts) -> Self {\n self.gas_opts = gas_opts;\n self\n }\n\n /// **[DEPRECATED]**\n /// This function is deprecated. Please use the new contract API:\n /// `self.call(MyContract::at(address).my_public_function(...args))`\n /// instead of manually constructing and calling `PublicCall`.\n pub unconstrained fn call(self, context: PublicContext) -> T\n where\n T: Deserialize,\n {\n let returns = context.call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n // If T is () (i.e. if the function does not return anything) then `as_array` will constrain that `returns` has\n // a length of 0 (since that is ()'s deserialization length).\n Deserialize::deserialize(returns.as_array())\n }\n\n /// **[DEPRECATED]**\n /// This function is deprecated. Please use the new contract API:\n /// `self.enqueue(MyContract::at(address).my_public_function(...args))`\n /// instead of manually constructing and calling `PublicCall`.\n pub fn enqueue(self, context: &mut PrivateContext) {\n self.enqueue_impl(context, false, false)\n }\n\n /// **[DEPRECATED]**\n /// This function is deprecated. Please use the new contract API:\n /// `self.enqueue_incognito(MyContract::at(address).my_public_function(...args))`\n /// instead of manually constructing and calling `PublicCall`.\n pub fn enqueue_incognito(self, context: &mut PrivateContext) {\n self.enqueue_impl(context, false, true)\n }\n\n fn enqueue_impl(\n self,\n context: &mut PrivateContext,\n is_static_call: bool,\n hide_msg_sender: bool,\n ) {\n let calldata = [self.selector.to_field()].concat(self.args);\n let calldata_hash = hash_calldata_array(calldata);\n execution_cache::store(calldata, calldata_hash);\n context.call_public_function_with_calldata_hash(\n self.target_contract,\n calldata_hash,\n is_static_call,\n hide_msg_sender,\n )\n }\n\n /// **[DEPRECATED]**\n /// This function is deprecated. Please use the new contract API:\n /// `self.set_as_teardown(MyContract::at(address).my_public_function(...args))`\n /// instead of manually constructing and setting the teardown function `PublicCall`.\n pub fn set_as_teardown(self, context: &mut PrivateContext) {\n self.set_as_teardown_impl(context, false);\n }\n\n /// **[DEPRECATED]**\n /// This function is deprecated. Please use the new contract API:\n /// `self.set_as_teardown_incognito(MyContract::at(address).my_public_function(...args))`\n /// instead of manually constructing and setting the teardown function `PublicCall`.\n pub fn set_as_teardown_incognito(self, context: &mut PrivateContext) {\n self.set_as_teardown_impl(context, true);\n }\n\n fn set_as_teardown_impl(self, context: &mut PrivateContext, hide_msg_sender: bool) {\n let calldata = [self.selector.to_field()].concat(self.args);\n let calldata_hash = hash_calldata_array(calldata);\n execution_cache::store(calldata, calldata_hash);\n context.set_public_teardown_function_with_calldata_hash(\n self.target_contract,\n calldata_hash,\n false,\n hide_msg_sender,\n )\n }\n}\n\n// PublicStaticCall\n\n#[must_use = \"Your public static call needs to be passed into the `self.view(...)`, `self.enqueue_view(...)` or `self.enqueue_view_incognito(...)` method to be executed (e.g. `self.view(MyContract::at(address).my_public_static_function(...args))`\"]\npub struct PublicStaticCall<let M: u32, let N: u32, T> {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str<M>,\n pub args: [Field; N],\n return_type: T,\n gas_opts: GasOpts,\n}\n\nimpl<let M: u32, let N: u32, T> PublicStaticCall<M, N, T> {\n pub fn new(\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<M>,\n args: [Field; N],\n ) -> Self {\n Self {\n target_contract,\n selector,\n name,\n args,\n return_type: std::mem::zeroed(),\n gas_opts: GasOpts::default(),\n }\n }\n\n pub fn with_gas(mut self, gas_opts: GasOpts) -> Self {\n self.gas_opts = gas_opts;\n self\n }\n\n /// **[DEPRECATED]**\n /// This function is deprecated. Please use the new contract API:\n /// `self.view(MyContract::at(address).my_public_static_function(...args))`\n /// instead of manually constructing and calling `PublicStaticCall`.\n pub unconstrained fn view(self, context: PublicContext) -> T\n where\n T: Deserialize,\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())\n }\n\n /// **[DEPRECATED]**\n /// This function is deprecated. Please use the new contract API:\n /// `self.enqueue_view(MyContract::at(address).my_public_static_function(...args))`\n /// instead of manually constructing and calling `PublicStaticCall`.\n pub fn enqueue_view(self, context: &mut PrivateContext) {\n let calldata = [self.selector.to_field()].concat(self.args);\n let calldata_hash = hash_calldata_array(calldata);\n execution_cache::store(calldata, calldata_hash);\n context.call_public_function_with_calldata_hash(\n self.target_contract,\n calldata_hash,\n /*static=*/\n true,\n false,\n )\n }\n\n /// **[DEPRECATED]**\n /// This function is deprecated. Please use the new contract API:\n /// `self.enqueue_view_incognito(MyContract::at(address).my_public_static_function(...args))`\n /// instead of manually constructing and calling `PublicStaticCall`.\n pub fn enqueue_view_incognito(self, context: &mut PrivateContext) {\n let calldata = [self.selector.to_field()].concat(self.args);\n let calldata_hash = hash_calldata_array(calldata);\n execution_cache::store(calldata, calldata_hash);\n context.call_public_function_with_calldata_hash(\n self.target_contract,\n calldata_hash,\n /*static=*/\n true,\n true,\n )\n }\n}\n\n// UtilityCall\n\npub struct UtilityCall<let M: u32, let N: u32, T> {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str<M>,\n args_hash: Field,\n pub args: [Field; N],\n return_type: T,\n}\n\nimpl<let M: u32, let N: u32, T> UtilityCall<M, N, T> {\n pub fn new(\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str<M>,\n args: [Field; N],\n ) -> Self {\n let args_hash = hash_args(args);\n Self { target_contract, selector, name, args_hash, args, return_type: std::mem::zeroed() }\n }\n}\n"
|
|
3545
|
-
},
|
|
3546
3542
|
"69": {
|
|
3547
3543
|
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/context/private_context.nr",
|
|
3548
3544
|
"source": "use crate::{\n context::{\n inputs::PrivateContextInputs, note_hash_read::NoteHashRead, returns_hash::ReturnsHash,\n },\n hash::{hash_args, hash_calldata_array},\n keys::constants::{NULLIFIER_INDEX, NUM_KEY_TYPES, OUTGOING_INDEX, sk_generators},\n messaging::process_l1_to_l2_message,\n oracle::{\n block_header::get_block_header_at,\n call_private_function::call_private_function_internal,\n enqueue_public_function_call::{\n is_side_effect_counter_revertible_oracle_wrapper, notify_enqueued_public_function_call,\n notify_set_min_revertible_side_effect_counter, notify_set_public_teardown_function_call,\n },\n execution_cache,\n key_validation_request::get_key_validation_request,\n logs::notify_created_contract_class_log,\n notes::{notify_created_nullifier, notify_nullified_note},\n },\n};\nuse dep::protocol_types::{\n abis::{\n block_header::BlockHeader,\n call_context::CallContext,\n function_selector::FunctionSelector,\n gas_settings::GasSettings,\n log_hash::LogHash,\n note_hash::NoteHash,\n nullifier::Nullifier,\n private_call_request::PrivateCallRequest,\n private_circuit_public_inputs::PrivateCircuitPublicInputs,\n private_log::{PrivateLog, PrivateLogData},\n public_call_request::PublicCallRequest,\n validation_requests::{KeyValidationRequest, KeyValidationRequestAndGenerator},\n },\n address::{AztecAddress, EthAddress},\n constants::{\n CONTRACT_CLASS_LOG_SIZE_IN_FIELDS, MAX_CONTRACT_CLASS_LOGS_PER_CALL,\n MAX_ENQUEUED_CALLS_PER_CALL, MAX_INCLUDE_BY_TIMESTAMP_DURATION,\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 NULL_MSG_SENDER_CONTRACT_ADDRESS, PRIVATE_LOG_SIZE_IN_FIELDS,\n },\n hash::poseidon2_hash,\n messaging::l2_to_l1_message::L2ToL1Message,\n side_effect::{Counted, scoped::Scoped},\n traits::{Empty, Hash, ToField},\n utils::arrays::{ClaimedLengthArray, find_first_index, trimmed_array_length_hint},\n};\n\n/// # PrivateContext\n///\n/// The **main interface** between an #[external(\"private\")] function and the Aztec blockchain.\n///\n/// An instance of the PrivateContext is initialized automatically at the outset\n/// of every private function, within the #[external(\"private\")] macro, so you'll never\n/// need to consciously instantiate this yourself.\n///\n/// The instance is always named `context`, and it is always be available within\n/// the body of every #[external(\"private\")] function in your smart contract.\n///\n/// > For those used to \"vanilla\" Noir, it might be jarring to have access to\n/// > `context` without seeing a declaration `let context = PrivateContext::new(...)`\n/// > within the body of your function. This is just a consequence of using\n/// > macros to tidy-up verbose boilerplate. You can use `nargo expand` to\n/// > expand all macros, if you dare.\n///\n/// Typical usage for a smart contract developer will be to call getter\n/// methods of the PrivateContext.\n///\n/// _Pushing_ data and requests to the context is mostly handled within\n/// aztec-nr's own functions, so typically a smart contract developer won't\n/// need to call any setter methods directly.\n///\n/// > Advanced users might occasionally wish to push data to the context\n/// > directly for lower-level control. If you find yourself doing this, please\n/// > open an issue on GitHub to describe your use case: it might be that\n/// > new functionality should be added to aztec-nr.\n///\n/// ## Responsibilities\n/// - Exposes contextual data to a private function:\n/// - Data relating to how this private function was called.\n/// - msg_sender\n/// - this_address - (the contract address of the private function being\n/// executed)\n/// - See `CallContext` for more data.\n/// - Data relating to the transaction in which this private function is\n/// being executed.\n/// - chain_id\n/// - version\n/// - gas_settings\n/// - Provides state access:\n/// - Access to the \"Anchor block\" header.\n/// Recall, a private function cannot read from the \"current\" block header,\n/// but must read from some historical block header, because as soon as\n/// private function execution begins (asynchronously, on a user's device),\n/// the public state of the chain (the \"current state\") will have progressed\n/// forward. We call this reference the \"Anchor block\".\n/// See `BlockHeader`.\n/// - Enables consumption of L1->L2 messages.\n/// - Enables calls to functions of other smart contracts:\n/// - Private function calls\n/// - Enqueueing of public function call requests\n/// (Since public functions are executed at a later time, by a block\n/// proposer, we say they are \"enqueued\").\n/// - Writes data to the blockchain:\n/// - New notes\n/// - New nullifiers\n/// - Private logs (for sending encrypted note contents or encrypted events)\n/// - New L2->L1 messages.\n/// - Provides args to the private function (handled by the #[external(\"private\")] macro).\n/// - Returns the return values of this private function (handled by the\n/// #[external(\"private\")] macro).\n/// - Makes Key Validation Requests.\n/// - Private functions are not allowed to see master secret keys, because we\n/// do not trust them. They are instead given \"app-siloed\" secret keys with\n/// a claim that they relate to a master public key. They can then request\n/// validation of this claim, by making a \"key validation request\" to the\n/// protocol's kernel circuits (which _are_ allowed to see certain master\n/// secret keys).\n///\n/// ## Advanced Responsibilities\n///\n/// - Ultimately, the PrivateContext is responsible for constructing the\n/// PrivateCircuitPublicInputs of the private function being executed.\n/// All private functions on Aztec must have public inputs which adhere\n/// to the rigid layout of the PrivateCircuitPublicInputs, in order to be\n/// compatible with the protocol's kernel circuits.\n/// A well-known misnomer:\n/// - \"public inputs\" contain both inputs and outputs of this function.\n/// - By \"outputs\" we mean a lot more side-effects than just the\n/// \"return values\" of the function.\n/// - Most of the so-called \"public inputs\" are kept _private_, and never leak\n/// to the outside world, because they are 'swallowed' by the protocol's\n/// kernel circuits before the tx is sent to the network. Only the\n/// following are exposed to the outside world:\n/// - New note_hashes\n/// - New nullifiers\n/// - New private logs\n/// - New L2->L1 messages\n/// - New enqueued public function call requests\n/// All the above-listed arrays of side-effects can be padded by the\n/// user's wallet (through instructions to the kernel circuits, via the\n/// PXE) to obscure their true lengths.\n///\n/// ## Syntax Justification\n///\n/// Both user-defined functions _and_ most functions in aztec-nr need access to\n/// the PrivateContext instance to read/write data. This is why you'll see the\n/// arguably-ugly pervasiveness of the \"context\" throughout your smart contract\n/// and the aztec-nr library.\n/// For example, `&mut context` is prevalent. In some languages, you can access\n/// and mutate a global variable (such as a PrivateContext instance) from a\n/// function without polluting the function's parameters. With Noir, a function\n/// must explicitly pass control of a mutable variable to another function, by\n/// reference. Since many functions in aztec-nr need to be able to push new data\n/// to the PrivateContext, they need to be handed a mutable reference _to_ the\n/// context as a parameter.\n/// For example, `Context` is prevalent as a generic parameter, to give better\n/// type safety at compile time. Many `aztec-nr` functions don't make sense if\n/// they're called in a particular runtime (private, public or utility), and so\n/// are intentionally only implemented over certain\n/// [Private|Public|Utility]Context structs. This gives smart contract\n/// developers a much faster feedback loop if they're making a mistake, as an\n/// error will be thrown by the LSP or when they compile their contract.\n///\n#[derive(Eq)]\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 include_by_timestamp: u64,\n\n pub note_hash_read_requests: BoundedVec<Scoped<Counted<Field>>, MAX_NOTE_HASH_READ_REQUESTS_PER_CALL>,\n pub nullifier_read_requests: BoundedVec<Scoped<Counted<Field>>, 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<Counted<NoteHash>, MAX_NOTE_HASHES_PER_CALL>,\n pub nullifiers: BoundedVec<Counted<Nullifier>, MAX_NULLIFIERS_PER_CALL>,\n\n pub private_call_requests: BoundedVec<PrivateCallRequest, MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL>,\n pub public_call_requests: BoundedVec<Counted<PublicCallRequest>, MAX_ENQUEUED_CALLS_PER_CALL>,\n pub public_teardown_call_request: PublicCallRequest,\n pub l2_to_l1_msgs: BoundedVec<Counted<L2ToL1Message>, MAX_L2_TO_L1_MSGS_PER_CALL>,\n // 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 anchor_block_header: BlockHeader,\n\n pub private_logs: BoundedVec<Counted<PrivateLogData>, MAX_PRIVATE_LOGS_PER_CALL>,\n pub contract_class_logs_hashes: BoundedVec<Counted<LogHash>, MAX_CONTRACT_CLASS_LOGS_PER_CALL>,\n\n // 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 pub expected_non_revertible_side_effect_counter: u32,\n pub expected_revertible_side_effect_counter: u32,\n}\n\nimpl PrivateContext {\n pub fn new(inputs: PrivateContextInputs, args_hash: Field) -> PrivateContext {\n let max_allowed_include_by_timestamp = inputs.anchor_block_header.global_variables.timestamp\n + MAX_INCLUDE_BY_TIMESTAMP_DURATION;\n PrivateContext {\n inputs,\n side_effect_counter: inputs.start_side_effect_counter + 1,\n min_revertible_side_effect_counter: 0,\n is_fee_payer: false,\n args_hash,\n return_hash: 0,\n include_by_timestamp: max_allowed_include_by_timestamp,\n 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 anchor_block_header: inputs.anchor_block_header,\n private_call_requests: BoundedVec::new(),\n public_call_requests: BoundedVec::new(),\n public_teardown_call_request: PublicCallRequest::empty(),\n l2_to_l1_msgs: BoundedVec::new(),\n private_logs: BoundedVec::new(),\n contract_class_logs_hashes: BoundedVec::new(),\n last_key_validation_requests: [Option::none(); NUM_KEY_TYPES],\n expected_non_revertible_side_effect_counter: 0,\n expected_revertible_side_effect_counter: 0,\n }\n }\n\n /// Returns the contract address that initiated this function call.\n ///\n /// This is similar to `msg.sender` in Solidity (hence the name).\n ///\n /// Important Note: Since Aztec doesn't have a concept of an EoA (\n /// Externally-owned Account), the msg_sender is \"null\" for the first\n /// function call of every transaction.\n /// The first function call of a tx is likely to be a call to the user's\n /// account contract, so this quirk will most often be handled by account\n /// contract developers.\n ///\n /// # Returns\n /// * `Option<AztecAddress>` - The address of the smart contract that called\n /// this function (be it an app contract or a user's account contract).\n /// Returns `Option<AztecAddress>::none` for the first function call of\n /// the tx. No other _private_ function calls in the tx will have a `none`\n /// msg_sender, but _public_ function calls might (see the PublicContext).\n ///\n pub fn msg_sender(self) -> Option<AztecAddress> {\n let maybe_msg_sender = self.inputs.call_context.msg_sender;\n if maybe_msg_sender == NULL_MSG_SENDER_CONTRACT_ADDRESS {\n Option::none()\n } else {\n Option::some(maybe_msg_sender)\n }\n }\n\n /// \"Unsafe\" versus calling `context.msg_sender()`, because it doesn't\n /// translate `NULL_MSG_SENDER_CONTRACT_ADDRESS` as\n /// `Option<AztecAddress>::none`.\n /// Used by some internal aztecnr functions.\n pub fn msg_sender_unsafe(self) -> AztecAddress {\n self.inputs.call_context.msg_sender\n }\n\n /// Returns the contract address of the current function being executed.\n ///\n /// This is equivalent to `address(this)` in Solidity (hence the name).\n /// Use this to identify the current contract's address, commonly needed for\n /// access control or when interacting with other contracts.\n ///\n /// # Returns\n /// * `AztecAddress` - The contract address of the current function being\n /// executed.\n ///\n pub fn this_address(self) -> AztecAddress {\n self.inputs.call_context.contract_address\n }\n\n /// Returns the chain ID of the current network.\n ///\n /// This is similar to `block.chainid` in Solidity. Returns the unique\n /// identifier for the blockchain network this transaction is executing on.\n ///\n /// Helps prevent cross-chain replay attacks. Useful if implementing\n /// multi-chain contract logic.\n ///\n /// # Returns\n /// * `Field` - The chain ID as a field element\n ///\n pub fn chain_id(self) -> Field {\n self.inputs.tx_context.chain_id\n }\n\n /// Returns the Aztec protocol version that this transaction is executing\n /// under. Different versions may have different rules, opcodes, or\n /// cryptographic primitives.\n ///\n /// This is similar to how Ethereum has different EVM versions.\n ///\n /// Useful for forward/backward compatibility checks\n ///\n /// Not to be confused with contract versions; this is the protocol version.\n ///\n /// # Returns\n /// * `Field` - The protocol version as a field element\n ///\n pub fn version(self) -> Field {\n self.inputs.tx_context.version\n }\n\n /// Returns the gas settings for the current transaction.\n ///\n /// This provides information about gas limits and pricing for the\n /// transaction, similar to `tx.gasprice` and gas limits in Ethereum.\n /// However, Aztec has a more sophisticated gas model with separate\n /// accounting for L2 computation and data availability (DA) costs.\n ///\n /// # Returns\n /// * `GasSettings` - Struct containing gas limits and fee information\n ///\n pub fn gas_settings(self) -> GasSettings {\n self.inputs.tx_context.gas_settings\n }\n\n /// Returns the function selector of the currently executing function.\n ///\n /// Low-level function: Ordinarily, smart contract developers will not need\n /// to access this.\n ///\n /// This is similar to `msg.sig` in Solidity, which returns the first 4\n /// bytes of the function signature. In Aztec, the selector uniquely\n /// identifies which function within the contract is being called.\n ///\n /// # Returns\n /// * `FunctionSelector` - The 4-byte function identifier\n ///\n /// # Advanced\n /// Only #[external(\"private\")] functions have a function selector as a protocol-\n /// enshrined concept. The function selectors of private functions are\n /// baked into the preimage of the contract address, and are used by the\n /// protocol's kernel circuits to identify each private function and ensure\n /// the correct one is being executed.\n ///\n /// Used internally for function dispatch and call verification.\n ///\n pub fn selector(self) -> FunctionSelector {\n self.inputs.call_context.function_selector\n }\n\n /// Returns the hash of the arguments passed to the current function.\n ///\n /// Very low-level function: You shouldn't need to call this. The #[external(\"private\")]\n /// macro calls this, and it makes the arguments neatly available to the\n /// body of your private function.\n ///\n /// # Returns\n /// * `Field` - Hash of the function arguments\n ///\n /// # Advanced\n /// * Arguments are hashed to reduce proof size and verification time\n /// * Enables efficient argument passing in recursive function calls\n /// * The hash can be used to retrieve the original arguments from the PXE.\n ///\n pub fn get_args_hash(self) -> Field {\n self.args_hash\n }\n\n /// Pushes a new note_hash to the Aztec blockchain's global Note Hash Tree\n /// (a state tree).\n ///\n /// A note_hash is a commitment to a piece of private state.\n ///\n /// Low-level function: Ordinarily, smart contract developers will not need\n /// to manually call this. Aztec-nr's state variables (see `../state_vars/`)\n /// are designed to understand when to create and push new note hashes.\n ///\n /// # Arguments\n /// * `note_hash` - The new note_hash.\n ///\n /// # Advanced\n /// From here, the protocol's kernel circuits will take over and insert the\n /// note_hash into the protocol's \"note hash tree\" (in the Base Rollup\n /// circuit).\n /// Before insertion, the protocol will:\n /// - \"Silo\" the `note_hash` with the contract address of this function,\n /// to yield a `siloed_note_hash`. This prevents state collisions\n /// between different smart contracts.\n /// - Ensure uniqueness of the `siloed_note_hash`, to prevent Faerie-Gold\n /// attacks, by hashing the `siloed_note_hash` with a unique value, to\n /// yield a `unique_siloed_note_hash` (see the protocol spec for more).\n ///\n /// In addition to calling this function, aztec-nr provides the contents\n /// of the newly-created note to the PXE, via the `notify_created_note`\n /// oracle.\n ///\n /// > Advanced users might occasionally wish to push data to the context\n /// > directly for lower-level control. If you find yourself doing this,\n /// > please open an issue on GitHub to describe your use case: it might be\n /// > that new functionality should be added to aztec-nr.\n ///\n pub fn push_note_hash(&mut self, note_hash: Field) {\n self.note_hashes.push(Counted::new(note_hash, self.next_counter()));\n }\n\n /// Pushes a new nullifier to the Aztec blockchain's global Nullifier Tree\n /// (a state tree).\n ///\n /// See also: `push_nullifier_for_note_hash`.\n ///\n /// Low-level function: Ordinarily, smart contract developers will not need\n /// to manually call this. Aztec-nr's state variables (see `../state_vars/`)\n /// are designed to understand when to create and push new nullifiers.\n ///\n /// A nullifier can only be emitted once. Duplicate nullifier insertions are\n /// rejected by the protocol.\n ///\n /// Generally, a nullifier is emitted to prevent an action from happening\n /// more than once, in such a way that the action cannot be linked (by an\n /// observer of the blockchain) to any earlier transactions.\n ///\n /// I.e. a nullifier is a random-looking, but deterministic record of a\n /// private, one-time action, which does not leak what action has been\n /// taken, and which preserves the property of \"tx unlinkability\".\n ///\n /// Usually, a nullifier will be emitted to \"spend\" a note (a piece of\n /// private state), without revealing which specific note is being spent.\n ///\n /// (Important: in such cases, use the below `push_nullifier_for_note_hash`).\n ///\n /// Sometimes, a nullifier might be emitted completely unrelated to any\n /// notes. Examples include initialization of a new contract; initialization\n /// of a PrivateMutable, or signalling in Semaphore-like applications.\n /// This `push_nullifier` function serves such use cases.\n ///\n /// # Arguments\n /// * `nullifier`\n ///\n /// # Advanced\n /// From here, the protocol's kernel circuits will take over and insert the\n /// nullifier into the protocol's \"nullifier tree\" (in the Base Rollup\n /// circuit).\n /// Before insertion, the protocol will:\n /// - \"Silo\" the `nullifier` with the contract address of this function,\n /// to yield a `siloed_nullifier`. This prevents state collisions\n /// between different smart contracts.\n /// - Ensure the `siloed_nullifier` is unique (the nullifier tree is an\n /// indexed merkle tree which supports efficient non-membership proofs).\n ///\n pub fn push_nullifier(&mut self, nullifier: Field) {\n notify_created_nullifier(nullifier);\n self.nullifiers.push(Nullifier { value: nullifier, note_hash: 0 }.count(self.next_counter()));\n }\n\n /// Pushes a nullifier that corresponds to a specific note hash.\n ///\n /// Low-level function: Ordinarily, smart contract developers will not need\n /// to manually call this. Aztec-nr's state variables (see `../state_vars/`)\n /// are designed to understand when to create and push new nullifiers.\n ///\n /// This is a specialized version of `push_nullifier` that links a nullifier\n /// to the specific note hash it's nullifying. This is the most common\n /// usage pattern for nullifiers.\n /// See `push_nullifier` for more explanation on nullifiers.\n ///\n /// # Arguments\n /// * `nullifier`\n /// * `nullified_note_hash` - The note hash of the note being nullified\n ///\n /// # Advanced\n /// Important: usage of this function doesn't mean that the world will _see_\n /// that this nullifier relates to the given nullified_note_hash (as that\n /// would violate \"tx unlinkability\"); it simply informs the user's PXE\n /// about the relationship (via `notify_nullified_note`). The PXE can then\n /// use this information to feed hints to the kernel circuits for\n /// \"squashing\" purposes: If a note is nullified during the same tx which\n /// created it, we can \"squash\" (delete) the note and nullifier (and any\n /// private logs associated with the note), to save on data emission costs.\n ///\n pub fn push_nullifier_for_note_hash(&mut self, nullifier: Field, nullified_note_hash: Field) {\n let nullifier_counter = self.next_counter();\n notify_nullified_note(nullifier, nullified_note_hash, nullifier_counter);\n self.nullifiers.push(Nullifier { value: nullifier, note_hash: nullified_note_hash }.count(\n nullifier_counter,\n ));\n }\n\n /// Returns the anchor block header - the historical block header that this\n /// private function is reading from.\n ///\n /// A private function CANNOT read from the \"current\" block header,\n /// but must read from some older block header, because as soon as\n /// private function execution begins (asynchronously, on a user's device),\n /// the public state of the chain (the \"current state\") will have progressed\n /// forward.\n ///\n /// # Returns\n /// * `BlockHeader` - The anchor block header.\n ///\n /// # Advanced\n /// * All private functions of a tx read from the same anchor block header.\n /// * The protocol asserts that the `include_by_timestamp` of every tx\n /// is at most 24 hours beyond the timestamp of the tx's chosen anchor\n /// block header. This enables the network's nodes to safely prune old txs\n /// from the mempool. Therefore, the chosen block header _must_ be one\n /// from within the last 24 hours.\n ///\n pub fn get_anchor_block_header(self) -> BlockHeader {\n self.anchor_block_header\n }\n\n /// Returns the header of any historical block at or before the anchor\n /// block.\n ///\n /// This enables private contracts to access information from even older\n /// blocks than the anchor block header.\n ///\n /// Useful for time-based contract logic that needs to compare against\n /// multiple historical points.\n ///\n /// # Arguments\n /// * `block_number` - The block number to retrieve (must be <= anchor\n /// block number)\n ///\n /// # Returns\n /// * `BlockHeader` - The header of the requested historical block\n ///\n /// # Advanced\n /// This function uses an oracle to fetch block header data from the user's\n /// PXE. Depending on how much blockchain data the user's PXE has been set\n /// up to store, this might require a query from the PXE to another Aztec\n /// node to get the data.\n /// > This is generally true of all oracle getters (see `../oracle`).\n ///\n /// Each block header gets hashed and stored as a leaf in the protocol's\n /// Archive Tree. In fact, the i-th block header gets stored at the i-th\n /// leaf index of the Archive Tree. Behind the scenes, this\n /// `get_block_header_at` function will add Archive Tree merkle-membership\n /// constraints (~3k) to your smart contract function's circuit, to prove\n /// existence of the block header in the Archive Tree.\n ///\n /// Note: we don't do any caching, so avoid making duplicate calls for the\n /// same block header, because each call will add duplicate constraints.\n ///\n /// Calling this function is more expensive (constraint-wise) than getting\n /// the anchor block header (via `get_block_header`). This is because the\n /// anchor block's merkle membership proof is handled by Aztec's protocol\n /// circuits, and is only performed once for the entire tx because all\n /// private functions of a tx share a common anchor block header. Therefore,\n /// the cost (constraint-wise) of calling `get_block_header` is effectively\n /// free.\n ///\n pub fn get_block_header_at(self, block_number: u32) -> BlockHeader {\n get_block_header_at(block_number, self)\n }\n\n /// Sets the hash of the return values for this private function.\n ///\n /// Very low-level function: this is called by the #[external(\"private\")] macro.\n ///\n /// # Arguments\n /// * `serialized_return_values` - The serialized return values as a field array\n ///\n pub fn set_return_hash<let N: u32>(&mut self, serialized_return_values: [Field; N]) {\n let return_hash = hash_args(serialized_return_values);\n self.return_hash = return_hash;\n execution_cache::store(serialized_return_values, return_hash);\n }\n\n /// Builds the PrivateCircuitPublicInputs for this private function, to\n /// ensure compatibility with the protocol's kernel circuits.\n ///\n /// Very low-level function: This function is automatically called by the\n /// #[external(\"private\")] macro.\n pub fn finish(self) -> PrivateCircuitPublicInputs {\n PrivateCircuitPublicInputs {\n call_context: self.inputs.call_context,\n args_hash: self.args_hash,\n returns_hash: self.return_hash,\n min_revertible_side_effect_counter: self.min_revertible_side_effect_counter,\n is_fee_payer: self.is_fee_payer,\n include_by_timestamp: self.include_by_timestamp,\n note_hash_read_requests: ClaimedLengthArray::from_bounded_vec(\n self.note_hash_read_requests,\n ),\n nullifier_read_requests: ClaimedLengthArray::from_bounded_vec(\n self.nullifier_read_requests,\n ),\n key_validation_requests_and_generators: ClaimedLengthArray::from_bounded_vec(\n self.key_validation_requests_and_generators,\n ),\n note_hashes: ClaimedLengthArray::from_bounded_vec(self.note_hashes),\n nullifiers: ClaimedLengthArray::from_bounded_vec(self.nullifiers),\n private_call_requests: ClaimedLengthArray::from_bounded_vec(self.private_call_requests),\n public_call_requests: ClaimedLengthArray::from_bounded_vec(self.public_call_requests),\n public_teardown_call_request: self.public_teardown_call_request,\n l2_to_l1_msgs: ClaimedLengthArray::from_bounded_vec(self.l2_to_l1_msgs),\n start_side_effect_counter: self.inputs.start_side_effect_counter,\n end_side_effect_counter: self.side_effect_counter,\n private_logs: ClaimedLengthArray::from_bounded_vec(self.private_logs),\n contract_class_logs_hashes: ClaimedLengthArray::from_bounded_vec(\n self.contract_class_logs_hashes,\n ),\n anchor_block_header: self.anchor_block_header,\n tx_context: self.inputs.tx_context,\n expected_non_revertible_side_effect_counter: self\n .expected_non_revertible_side_effect_counter,\n expected_revertible_side_effect_counter: self.expected_revertible_side_effect_counter,\n }\n }\n\n /// Designates this contract as the fee payer for the transaction.\n ///\n /// Unlike Ethereum, where the transaction sender always pays fees, Aztec\n /// allows any contract to voluntarily pay transaction fees. This enables\n /// patterns like sponsored transactions or fee abstraction where users\n /// don't need to hold fee-juice themselves. (Fee juice is a fee-paying\n /// asset for Aztec).\n ///\n /// Only one contract per transaction can declare itself as the fee payer,\n /// and it must have sufficient fee-juice balance (>= the gas limits\n /// specified in the TxContext) by the time we reach the public setup phase\n /// of the tx.\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 in_revertible_phase(&mut self) -> bool {\n let current_counter = self.side_effect_counter;\n\n // Safety: Kernel will validate that the claim is correct by validating the expected counters.\n let is_revertible =\n unsafe { is_side_effect_counter_revertible_oracle_wrapper(current_counter) };\n\n if is_revertible {\n if (self.expected_revertible_side_effect_counter == 0)\n | (current_counter < self.expected_revertible_side_effect_counter) {\n self.expected_revertible_side_effect_counter = current_counter;\n }\n } else if current_counter > self.expected_non_revertible_side_effect_counter {\n self.expected_non_revertible_side_effect_counter = current_counter;\n }\n\n is_revertible\n }\n\n /// Declares the end of the \"setup phase\" of this tx.\n ///\n /// Only one function per tx can declare the end of the setup phase.\n ///\n /// Niche function: Only wallet developers and paymaster contract developers\n /// (aka Fee-payment contracts) will need to make use of this function.\n ///\n /// Aztec supports a three-phase execution model: setup, app logic, teardown.\n /// The phases exist to enable a fee payer to take on the risk of paying\n /// a transaction fee, safe in the knowledge that their payment (in whatever\n /// token or method the user chooses) will succeed, regardless of whether\n /// the app logic will succeed. The \"setup\" phase enables such a payment to\n /// be made, because the setup phase _cannot revert_: a reverting function\n /// within the setup phase would result in an invalid block which cannot\n /// be proven. Any side-effects generated during that phase are guaranteed\n /// to be inserted into Aztec's state trees (except for squashed notes &\n /// nullifiers, of course).\n ///\n /// Even though the end of the setup phase is declared within a private\n /// function, you might have noticed that _public_ functions can also\n /// execute within the setup phase. This is because any public function\n /// calls which were enqueued _within the setup phase_ by a private\n /// function are considered part of the setup phase.\n ///\n /// # Advanced\n /// * Sets the minimum revertible side effect counter of this tx to be the\n /// PrivateContext's _current_ side effect counter.\n ///\n pub fn end_setup(&mut self) {\n // Incrementing the side effect counter when ending setup ensures non\n // ambiguity for the counter where we change phases.\n self.side_effect_counter += 1;\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.next_counter();\n notify_set_min_revertible_side_effect_counter(self.min_revertible_side_effect_counter);\n }\n\n /// Sets a deadline (an \"include-by timestamp\") for when this transaction\n /// must be included in a block.\n ///\n /// Other functions in this tx might call this setter with differing\n /// values for the include-by timestamp. To ensure that all functions'\n /// deadlines are met, the _minimum_ of all these include-by timestamps will\n /// be exposed when this tx is submitted to the network.\n ///\n /// If the transaction is not included in a block by its include-by\n /// timestamp, it becomes invalid and it will never be included.\n ///\n /// This expiry timestamp is publicly visible. See the \"Advanced\" section\n /// for privacy concerns.\n ///\n /// # Arguments\n /// * `include_by_timestamp` - Unix timestamp (seconds) deadline for inclusion.\n /// The include-by timestamp of this tx will be\n /// _at most_ the timestamp specified.\n ///\n /// # Advanced\n /// * If multiple functions set differing `include_by_timestamp`s, the\n /// kernel circuits will set it to be the _minimum_ of the two. This\n /// ensures the tx expiry requirements of all functions in the tx are met.\n /// * Rollup circuits will reject expired txs.\n /// * The protocol enforces that all transactions must be included within\n /// 24 hours of their chosen anchor block's timestamp, to enable safe\n /// mempool pruning.\n /// * The DelayedPublicMutable design makes heavy use of this functionality,\n /// to enable private functions to read public state.\n /// * A sophisticated Wallet should cleverly set an include-by timestamp\n /// to improve the privacy of the user and the network as a whole.\n /// For example, if a contract interaction sets include-by to some\n /// publicly-known value (e.g. the time when a contract upgrades), then\n /// the wallet might wish to set an even lower one to avoid revealing that\n /// this tx is interacting with said contract.\n /// Ideally, all wallets should standardize on an approach in order to\n /// provide users with a large anonymity set -- although the exact approach\n /// will need to be discussed. Wallets that deviate from a standard might\n /// accidentally reveal which wallet each transaction originates from.\n ///\n // docs:start:include-by-timestamp\n pub fn set_include_by_timestamp(&mut self, include_by_timestamp: u64) {\n // docs:end:include-by-timestamp\n self.include_by_timestamp = std::cmp::min(self.include_by_timestamp, include_by_timestamp);\n }\n\n /// Makes a request to the protocol's kernel circuit to ensure a note_hash\n /// actually exists.\n ///\n /// \"Read requests\" are used to prove that a note hash exists without\n /// revealing which specific note was read.\n ///\n /// This can be used to prove existence of both settled notes (created in\n /// prior transactions) and transient notes (created in the current\n /// transaction).\n /// If you need to prove existence of a settled note _at a specific block\n /// number_, use `note_inclusion::prove_note_inclusion`.\n ///\n /// Low-level function. Ordinarily, smart contract developers will not need\n /// to call this directly. Aztec-nr's state variables (see `../state_vars/`)\n /// are designed to understand when to create and push new note_hash read\n /// requests.\n ///\n /// # Arguments\n /// * `note_hash_read` - The note hash to read and verify\n ///\n /// # Advanced\n /// In \"traditional\" circuits for non-Aztec privacy applications, the merkle\n /// membership proofs to check existence of a note are performed _within_\n /// the application circuit.\n ///\n /// All Aztec private functions have access to the following constraint\n /// optimisation:\n /// In cases where the note being read was created earlier in the same tx,\n /// the note wouldn't yet exist in the Note Hash Tree, so a hard-coded\n /// merkle membership check which then gets ignored would be a waste of\n /// constraints.\n /// Instead, we can send read requests for all notes to the protocol's\n /// kernel circuits, where we can conditionally assess which notes actually\n /// need merkle membership proofs, and select an appropriately-sized\n /// kernel circuit.\n ///\n /// For \"settled notes\" (which already existed in the Note Hash Tree of the\n /// anchor block (i.e. before the tx began)), the kernel does a merkle\n /// membership check.\n ///\n /// For \"pending notes\" (which were created earlier in _this_ tx), the\n /// kernel will check that the note existed _before_ this read request was\n /// made, by checking the side-effect counters of the note_hash and this\n /// read request.\n ///\n /// This approach improves latency between writes and reads:\n /// a function can read a note which was created earlier in the tx (rather\n /// than performing the read in a later tx, after waiting for the earlier tx\n /// to be included, to ensure the note is included in the tree).\n ///\n pub fn push_note_hash_read_request(&mut self, note_hash_read: NoteHashRead) {\n let note_hash = note_hash_read.note_hash();\n let contract_address = note_hash_read.contract_address().unwrap_or(AztecAddress::zero());\n let side_effect = Scoped::new(\n Counted::new(note_hash, self.next_counter()),\n contract_address,\n );\n self.note_hash_read_requests.push(side_effect);\n }\n\n /// Asserts that a NoteHashRead has been requested to the kernel by this context.\n /// Asserts instead of returning a boolean to save on gates.\n ///\n /// # Arguments\n /// * `note_hash_read` - The note hash read to assert that has been requested.\n ///\n pub fn assert_has_been_requested(self, note_hash_read: NoteHashRead) {\n let note_hash = note_hash_read.note_hash();\n let contract_address = note_hash_read.contract_address().unwrap_or(AztecAddress::zero());\n\n // Safety: The index is constrained by the checks below.\n let hinted_index = unsafe {\n find_first_index(\n self.note_hash_read_requests.storage(),\n |r| (r.contract_address == contract_address) & (r.innermost() == note_hash),\n )\n };\n // This assertion is not necessary, since the .get would fail. But it enables us to have a more explicit error message.\n assert(\n hinted_index != self.note_hash_read_requests.max_len(),\n \"Note hash read has not been requested\",\n );\n\n let request = self.note_hash_read_requests.get(hinted_index);\n assert_eq(request.contract_address, contract_address);\n assert_eq(request.innermost(), note_hash);\n }\n\n /// Requests to read a specific nullifier from the nullifier tree.\n ///\n /// Nullifier read requests are used to prove that a nullifier exists without\n /// revealing which specific nullifier preimage was read.\n ///\n /// This can be used to prove existence of both settled nullifiers (created in\n /// prior transactions) and transient nullifiers (created in the current\n /// transaction).\n /// If you need to prove existence of a settled nullifier _at a specific block\n /// number_, use `nullifier_inclusion::prove_nullifier_inclusion`.\n ///\n /// Low-level function. Ordinarily, smart contract developers will not need\n /// to call this directly. Aztec-nr's state variables (see `../state_vars/`)\n /// are designed to understand when to create and push new nullifier read\n /// requests.\n ///\n /// # Arguments\n /// * `nullifier` - The nullifier to read and verify\n /// * `contract_address` - The contract address that emitted the nullifier\n ///\n /// # Advanced\n /// This approach improves latency between writes and reads:\n /// a function can read a nullifier which was created earlier in the tx\n /// (rather than performing the read in a later tx, after waiting for the\n /// earlier tx to be included, to ensure the nullifier is included in the tree).\n ///\n pub fn push_nullifier_read_request(\n &mut self,\n nullifier: Field,\n contract_address: AztecAddress,\n ) {\n let request = Scoped::new(\n Counted::new(nullifier, self.next_counter()),\n contract_address,\n );\n self.nullifier_read_requests.push(request);\n }\n\n /// Requests the app-siloed nullifier secret key (nsk_app) for the given\n /// (hashed) master nullifier public key (npk_m), from the user's PXE.\n ///\n /// Advanced function: Only needed if you're designing your own notes and/or\n /// nullifiers.\n ///\n /// Contracts are not allowed to compute nullifiers for other contracts, as\n /// that would let them read parts of their private state. Because of this,\n /// a contract is only given an \"app-siloed secret key\", which is\n /// constructed by hashing the user's master nullifier secret key with the\n /// contract's address.\n /// However, because contracts cannot be trusted with a user's master\n /// nullifier secret key (because we don't know which contracts are honest\n /// or malicious), the PXE refuses to provide any master secret keys to\n /// any app smart contract function. This means app functions are unable to\n /// prove that the derivation of an app-siloed nullifier secret key has been\n /// computed correctly. Instead, an app function can request to the kernel\n /// (via `request_nsk_app`) that it validates the siloed derivation, since\n /// the kernel has been vetted to not leak any master secret keys.\n ///\n /// A common nullification scheme is to inject a nullifier secret key into\n /// the preimage of a nullifier, to make the nullifier deterministic but\n /// random-looking. This function enables that flow.\n ///\n /// # Arguments\n /// * `npk_m_hash` - A hash of the master nullifier public key of the user\n /// whose PXE is executing this function.\n ///\n /// # Returns\n /// * The app-siloed nullifier secret key that corresponds to the given\n /// `npk_m_hash`.\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 /// Requests the app-siloed nullifier secret key (nsk_app) for the given\n /// (hashed) master nullifier public key (npk_m), from the user's PXE.\n ///\n /// See `request_nsk_app` and `request_sk_app` for more info.\n ///\n /// The intention of the \"outgoing\" keypair is to provide a second secret\n /// key for all of a user's outgoing activity (i.e. for notes that a user\n /// creates, as opposed to notes that a user receives from others). The\n /// separation of incoming and outgoing data was a distinction made by\n /// zcash, with the intention of enabling a user to optionally share with a\n /// 3rd party a controlled view of only incoming or outgoing notes.\n /// Similar functionality of sharing select data can be achieved with\n /// offchain zero-knowledge proofs. It is up to an app developer whether\n /// they choose to make use of a user's outgoing keypair within their\n /// application logic, or instead simply use the same keypair (the address\n /// keypair (which is effectively the same as the \"incoming\" keypair)) for\n /// all incoming & outgoing messages to a user.\n ///\n /// Currently, all of the exposed encryption functions in aztec-nr ignore\n /// the outgoing viewing keys, and instead encrypt all note logs and event\n /// logs to a user's address public key.\n ///\n /// # Arguments\n /// * `ovpk_m_hash` - Hash of the outgoing viewing public key master\n ///\n /// # Returns\n /// * The application-specific outgoing viewing secret key\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 /// Pushes a Key Validation Request to the kernel.\n ///\n /// Private functions are not allowed to see a user's master secret keys,\n /// because we do not trust them. They are instead given \"app-siloed\" secret\n /// keys with a claim that they relate to a master public key.\n /// They can then request validation of this claim, by making a \"key\n /// validation request\" to the protocol's kernel circuits (which _are_\n /// allowed to see certain master secret keys).\n ///\n /// When a Key Validation Request tuple of (sk_app, Pk_m, app_address) is\n /// submitted to the kernel, it will perform the following derivations\n /// to validate the relationship between the claimed sk_app and the user's\n /// Pk_m:\n ///\n /// (sk_m) ----> * G ----> Pk_m\n /// | |\n /// v We use the kernel to prove this\n /// h(sk_m, app_address) | sk_app-Pk_m relationship, because app\n /// | circuits must not be trusted to see sk_m.\n /// v |\n /// sk_app - - - - - - - - -\n ///\n /// The function is named \"request_\" instead of \"get_\" to remind the user\n /// that a Key Validation Request will be emitted to the kernel.\n ///\n fn request_sk_app(&mut self, pk_m_hash: Field, key_index: Field) -> Field {\n let cached_request = self.last_key_validation_requests[key_index as u32].unwrap_or(\n KeyValidationRequest::empty(),\n );\n\n if cached_request.pk_m.hash() == pk_m_hash {\n // We get a match so the cached request is the latest one\n cached_request.sk_app\n } else {\n // We didn't get a match meaning the cached result is stale\n // Typically we'd validate keys by showing that they are the preimage of `pk_m_hash`, but that'd require\n // the oracle returning the master secret keys, which could cause malicious contracts to leak it or learn\n // about secrets from other contracts. We therefore silo secret keys, and rely on the private kernel to\n // validate that we siloed secret key corresponds to correct siloing of the master secret key that hashes\n // to `pk_m_hash`.\n\n // Safety: Kernels verify that the key validation request is valid and below we verify that a request\n // for the correct public key has been received.\n let request = unsafe { get_key_validation_request(pk_m_hash, key_index) };\n assert_eq(request.pk_m.hash(), pk_m_hash, \"Obtained invalid key validation request\");\n\n self.key_validation_requests_and_generators.push(\n KeyValidationRequestAndGenerator {\n request,\n sk_app_generator: sk_generators[key_index as u32],\n },\n );\n self.last_key_validation_requests[key_index as u32] = Option::some(request);\n request.sk_app\n }\n }\n\n /// Sends an \"L2 -> L1 message\" from this function (Aztec, L2) to a smart\n /// contract on Ethereum (L1). L1 contracts which are designed to\n /// send/receive messages to/from Aztec are called \"Portal Contracts\".\n ///\n /// Common use cases include withdrawals, cross-chain asset transfers, and\n /// triggering L1 actions based on L2 state changes.\n ///\n /// The message will be inserted into an Aztec \"Outbox\" contract on L1,\n /// when this transaction's block is proposed to L1.\n /// Sending the message will not result in any immediate state changes in\n /// the target portal contract. The message will need to be manually\n /// consumed from the Outbox through a separate Ethereum transaction: a user\n /// will need to call a function of the portal contract -- a function\n /// specifically designed to make a call to the Outbox to consume the\n /// message.\n /// The message will only be available for consumption once the _epoch_\n /// proof has been submitted. Given that there are multiple Aztec blocks\n /// within an epoch, it might take some time for this epoch proof to be\n /// submitted -- especially if the block was near the start of an epoch.\n ///\n /// # Arguments\n /// * `recipient` - Ethereum address that will receive the message\n /// * `content` - Message content (32 bytes as a Field element).\n /// This content has a very specific layout.\n /// docs:start:context_message_portal\n pub fn message_portal(&mut self, recipient: EthAddress, content: Field) {\n let message = L2ToL1Message { recipient, content };\n self.l2_to_l1_msgs.push(message.count(self.next_counter()));\n }\n\n /// Consumes a message sent from Ethereum (L1) to Aztec (L2).\n ///\n /// Common use cases include token bridging, cross-chain governance, and\n /// triggering L2 actions based on L1 events.\n ///\n /// Use this function if you only want the message to ever be \"referred to\"\n /// once. Once consumed using this method, the message cannot be consumed\n /// again, because a nullifier is emitted.\n /// If your use case wants for the message to be read unlimited times, then\n /// you can always read any historic message from the L1-to-L2 messages tree;\n /// messages never technically get deleted from that tree.\n ///\n /// The message will first be inserted into an Aztec \"Inbox\" smart contract\n /// on L1.\n /// Sending the message will not result in any immediate state changes in\n /// the target L2 contract. The message will need to be manually\n /// consumed by the target contract through a separate Aztec transaction.\n /// The message will not be available for consumption immediately. Messages\n /// get copied over from the L1 Inbox to L2 by the next Proposer in batches.\n /// So you will need to wait until the messages are copied before you can\n /// consume them.\n ///\n /// # Arguments\n /// * `content` - The message content that was sent from L1\n /// * `secret` - Secret value used for message privacy (if needed)\n /// * `sender` - Ethereum address that sent the message\n /// * `leaf_index` - Index of the message in the L1-to-L2 message tree\n ///\n /// # Advanced\n /// Validates message existence in the L1-to-L2 message tree and nullifies\n /// the message to prevent double-consumption.\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 nullifier = process_l1_to_l2_message(\n self.anchor_block_header.state.l1_to_l2_message_tree.root,\n self.this_address(),\n sender,\n self.chain_id(),\n self.version(),\n content,\n secret,\n leaf_index,\n );\n\n // Push nullifier (and the \"commitment\" corresponding to this can be \"empty\")\n self.push_nullifier(nullifier)\n }\n\n /// Emits a private log (an array of Fields) that will be published to an\n /// Ethereum blob.\n ///\n /// Private logs are intended for the broadcasting of ciphertexts: that is,\n /// encrypted events or encrypted note contents.\n /// Since the data in the logs is meant to be _encrypted_, private_logs are\n /// broadcast to publicly-visible Ethereum blobs.\n /// The intended recipients of such encrypted messages can then discover and\n /// decrypt these encrypted logs using their viewing secret key.\n /// (See `../messages/discovery` for more details).\n ///\n /// Important note: This function DOES NOT _do_ any encryption of the input\n /// `log` fields. This function blindly publishes whatever input `log` data\n /// is fed into it, so the caller of this function should have already\n /// performed the encryption, and the `log` should be the result of that\n /// encryption.\n ///\n /// The protocol does not dictate what encryption scheme should be used:\n /// a smart contract developer can choose whatever encryption scheme they\n /// like.\n /// Aztec-nr includes some off-the-shelf encryption libraries that\n /// developers might wish to use, for convenience. These libraries not only\n /// encrypt a plaintext (to produce a ciphertext); they also prepend the\n /// ciphertext with a `tag` and `ephemeral public key` for easier message\n /// discovery. This is a very dense topic, and we will be writing more\n /// libraries and docs soon.\n ///\n /// > Currently, AES128 CBC encryption is the main scheme included in\n /// > aztec.nr.\n /// > We are currently making significant changes to the interfaces of the\n /// > encryption library.\n ///\n /// In some niche use cases, an app might be tempted to publish\n /// _un-encrypted_ data via a private log, because _public logs_ are not\n /// available to private functions. Be warned that emitting public data via\n /// private logs is strongly discouraged, and is considered a \"privacy\n /// anti-pattern\", because it reveals identifiable information about _which_\n /// function has been executed. A tx which leaks such information does not\n /// contribute to the privacy set of the network.\n ///\n /// * Unlike `emit_raw_note_log`, this log is not tied to any specific note\n ///\n /// # Arguments\n /// * `log` - The log data that will be publicly broadcast (so make sure\n /// it's already been encrypted before you call this function).\n /// Private logs are bounded in size (PRIVATE_LOG_SIZE_IN_FIELDS), to\n /// encourage all logs from all smart contracts look identical.\n /// * `length` - The actual length of the `log` (measured in number of\n /// Fields). Although the input log has a max size of\n /// PRIVATE_LOG_SIZE_IN_FIELDS, the latter values of the array might all\n /// be 0's for small logs. This `length` should reflect the trimmed length\n /// of the array. The protocol's kernel circuits can then append random\n /// fields as \"padding\" after the `length`, so that the logs of this\n /// smart contract look indistinguishable from (the same length as) the\n /// logs of all other applications. It's up to wallets how much padding\n /// to apply, so ideally all wallets should agree on standards for this.\n ///\n /// # Advanced\n ///\n pub fn emit_private_log(&mut self, log: [Field; PRIVATE_LOG_SIZE_IN_FIELDS], length: u32) {\n let counter = self.next_counter();\n let private_log = PrivateLogData { log: PrivateLog::new(log, length), note_hash_counter: 0 }\n .count(counter);\n self.private_logs.push(private_log);\n }\n\n // TODO: rename.\n /// Emits a private log that is explicitly tied to a newly-emitted note_hash,\n /// to convey to the kernel: \"this log relates to this note\".\n ///\n /// This linkage is important in case the note gets squashed (due to being\n /// read later in this same tx), since we can then squash the log as well.\n ///\n /// See `emit_private_log` for more info about private log emission.\n ///\n /// # Arguments\n /// * `log` - The log data as an array of Field elements\n /// * `length` - The actual length of the `log` (measured in number of\n /// Fields).\n /// * `note_hash_counter` - The side-effect counter that was assigned to the\n /// new note_hash when it was pushed to this\n // `PrivateContext`.\n ///\n /// Important: If your application logic requires the log to always be\n /// emitted regardless of note squashing, consider using `emit_private_log`\n /// instead, or emitting additional events.\n ///\n pub fn emit_raw_note_log(\n &mut self,\n log: [Field; PRIVATE_LOG_SIZE_IN_FIELDS],\n length: u32,\n note_hash_counter: u32,\n ) {\n let counter = self.next_counter();\n let private_log = PrivateLogData { log: PrivateLog::new(log, length), note_hash_counter };\n self.private_logs.push(private_log.count(counter));\n }\n\n pub fn emit_contract_class_log<let N: u32>(&mut self, log: [Field; N]) {\n let contract_address = self.this_address();\n let counter = self.next_counter();\n\n let log_to_emit: [Field; CONTRACT_CLASS_LOG_SIZE_IN_FIELDS] =\n log.concat([0; CONTRACT_CLASS_LOG_SIZE_IN_FIELDS - N]);\n // Note: the length is not always N, it is the number of fields we want to broadcast, omitting trailing zeros to save blob space.\n // Safety: The below length is constrained in the base rollup, which will make sure that all the fields beyond length are zero.\n // However, it won't be able to check that we didn't add extra padding (trailing zeroes) or that we cut trailing zeroes from the end.\n let length = unsafe { trimmed_array_length_hint(log_to_emit) };\n // We hash the entire padded log to ensure a user cannot pass a shorter length and so emit incorrect shorter bytecode.\n let log_hash = poseidon2_hash(log_to_emit);\n // Safety: the below only exists to broadcast the raw log, so we can provide it to the base rollup later to be constrained.\n unsafe {\n notify_created_contract_class_log(contract_address, log_to_emit, length, counter);\n }\n\n self.contract_class_logs_hashes.push(LogHash { value: log_hash, length: length }.count(\n counter,\n ));\n }\n\n /// Calls a private function on another contract (or the same contract).\n ///\n /// Very low-level function.\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract containing the function\n /// * `function_selector` - 4-byte identifier of the function to call\n /// * `args` - Array of arguments to pass to the called function\n ///\n /// # Returns\n /// * `ReturnsHash` - Hash of the called function's return values. Use\n /// `.get_preimage()` to extract the actual return values.\n ///\n /// This enables contracts to interact with each other while maintaining\n /// privacy. This \"composability\" of private contract functions is a key\n /// feature of the Aztec network.\n ///\n /// If a user's transaction includes multiple private function calls, then\n /// by the design of Aztec, the following information will remain private[1]:\n /// - The function selectors and contract addresses of all private function\n /// calls will remain private, so an observer of the public mempool will\n /// not be able to look at a tx and deduce which private functions have\n /// been executed.\n /// - The arguments and return values of all private function calls will\n /// remain private.\n /// - The person who initiated the tx will remain private.\n /// - The notes and nullifiers and private logs that are emitted by all\n /// private function calls will (if designed well) not leak any user\n /// secrets, nor leak which functions have been executed.\n ///\n /// [1] Caveats: Some of these privacy guarantees depend on how app\n /// developers design their smart contracts. Some actions _can_ leak\n /// information, such as:\n /// - Calling an internal public function.\n /// - Calling a public function and not setting msg_sender to Option::none\n /// (feature not built yet - see github).\n /// - Calling any public function will always leak details about the nature\n /// of the transaction, so devs should be careful in their contract\n /// designs. If it can be done in a private function, then that will give\n /// the best privacy.\n /// - Not padding the side-effects of a tx to some standardized, uniform\n /// size. The kernel circuits can take hints to pad side-effects, so a\n /// wallet should be able to request for a particular amount of padding.\n /// Wallets should ideally agree on some standard.\n /// - Padding should include:\n /// - Padding the lengths of note & nullifier arrays\n /// - Padding private logs with random fields, up to some standardized\n /// size.\n /// See also: https://docs.aztec.network/developers/resources/considerations/privacy_considerations\n ///\n /// # Advanced\n /// * The call is added to the private call stack and executed by kernel\n /// circuits after this function completes\n /// * The called function can modify its own contract's private state\n /// * Side effects from the called function are included in this transaction\n /// * The call inherits the current transaction's context and gas limits\n ///\n pub fn call_private_function<let ArgsCount: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ArgsCount],\n ) -> ReturnsHash {\n let args_hash = hash_args(args);\n execution_cache::store(args, args_hash);\n self.call_private_function_with_args_hash(\n contract_address,\n function_selector,\n args_hash,\n false,\n )\n }\n\n /// Makes a read-only call to a private function on another contract.\n ///\n /// This is similar to Solidity's `staticcall`. The called function\n /// cannot modify state, emit L2->L2 messages, nor emit events. Any nested\n /// calls are constrained to also be staticcalls.\n ///\n /// See `call_private_function` for more general info on private function\n /// calls.\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract to call\n /// * `function_selector` - 4-byte identifier of the function to call\n /// * `args` - Array of arguments to pass to the called function\n ///\n /// # Returns\n /// * `ReturnsHash` - Hash of the called function's return values. Use\n /// `.get_preimage()` to extract the actual return values.\n ///\n pub fn static_call_private_function<let ArgsCount: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ArgsCount],\n ) -> ReturnsHash {\n let args_hash = hash_args(args);\n execution_cache::store(args, args_hash);\n self.call_private_function_with_args_hash(\n contract_address,\n function_selector,\n args_hash,\n true,\n )\n }\n\n /// Calls a private function that takes no arguments.\n ///\n /// This is a convenience function for calling private functions that don't\n /// require any input parameters. It's equivalent to `call_private_function`\n /// but slightly more efficient to use when no arguments are needed.\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract containing the function\n /// * `function_selector` - 4-byte identifier of the function to call\n ///\n /// # Returns\n /// * `ReturnsHash` - Hash of the called function's return values. Use\n /// `.get_preimage()` to extract the actual return values.\n ///\n pub fn call_private_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) -> ReturnsHash {\n self.call_private_function_with_args_hash(contract_address, function_selector, 0, false)\n }\n\n /// Makes a read-only call to a private function which takes no arguments.\n ///\n /// This combines the optimisation of `call_private_function_no_args` with\n /// the safety of `static_call_private_function`.\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract containing the function\n /// * `function_selector` - 4-byte identifier of the function to call\n ///\n /// # Returns\n /// * `ReturnsHash` - Hash of the called function's return values. Use\n /// `.get_preimage()` to extract the actual return values.\n ///\n pub fn static_call_private_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) -> ReturnsHash {\n self.call_private_function_with_args_hash(contract_address, function_selector, 0, true)\n }\n\n /// Low-level private function call.\n ///\n /// This is the underlying implementation used by all other private function\n /// call methods. Instead of taking raw arguments, it accepts a\n /// hash of the arguments.\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract containing the function\n /// * `function_selector` - 4-byte identifier of the function to call\n /// * `args_hash` - Pre-computed hash of the function arguments\n /// * `is_static_call` - Whether this should be a read-only call\n ///\n /// # Returns\n /// * `ReturnsHash` - Hash of the called function's return values\n ///\n pub fn call_private_function_with_args_hash(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n is_static_call: bool,\n ) -> ReturnsHash {\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n let start_side_effect_counter = self.side_effect_counter;\n\n // Safety: The oracle simulates the private call and returns the value of the side effects counter after\n // execution of the call (which means that end_side_effect_counter - start_side_effect_counter is\n // the number of side effects that took place), along with the hash of the return values. We validate these\n // by requesting a private kernel iteration in which the return values are constrained to hash\n // to `returns_hash` and the side effects counter to increment from start to end.\n let (end_side_effect_counter, returns_hash) = unsafe {\n call_private_function_internal(\n contract_address,\n function_selector,\n args_hash,\n start_side_effect_counter,\n is_static_call,\n )\n };\n\n self.private_call_requests.push(\n PrivateCallRequest {\n call_context: CallContext {\n msg_sender: self.this_address(),\n contract_address,\n function_selector,\n is_static_call,\n },\n args_hash,\n returns_hash,\n start_side_effect_counter,\n end_side_effect_counter,\n },\n );\n\n // TODO (fees) figure out why this crashes the prover and enable it\n // we need this in order to pay fees inside child call contexts\n // assert(\n // (item.public_inputs.min_revertible_side_effect_counter == 0 as u32)\n // | (item.public_inputs.min_revertible_side_effect_counter\n // > self.min_revertible_side_effect_counter)\n // );\n // if item.public_inputs.min_revertible_side_effect_counter\n // > self.min_revertible_side_effect_counter {\n // self.min_revertible_side_effect_counter = item.public_inputs.min_revertible_side_effect_counter;\n // }\n self.side_effect_counter = end_side_effect_counter + 1; // TODO: call `next_counter` instead, for consistency\n ReturnsHash::new(returns_hash)\n }\n\n /// Enqueues a call to a public function to be executed later.\n ///\n /// Unlike private functions which execute immediately on the user's device,\n /// public function calls are \"enqueued\" and executed some time later by a\n /// block proposer.\n ///\n /// This means a public function cannot return any values back to a private\n /// function, because by the time the public function is being executed,\n /// the private function which called it has already completed execution.\n /// (In fact, the private function has been executed and proven, along with\n /// all other private function calls of the user's tx. A single proof of the\n /// tx has been submitted to the Aztec network, and some time later a\n /// proposer has picked the tx up from the mempool and begun executing all\n /// of the enqueued public functions).\n ///\n /// # Privacy warning\n /// Enqueueing a public function call is an inherently leaky action.\n /// Many interesting applications will require some interaction with public\n /// state, but smart contract developers should try to use public function\n /// calls sparingly, and carefully.\n /// _Internal_ public function calls are especially leaky, because they\n /// completely leak which private contract made the call.\n /// See also: https://docs.aztec.network/developers/resources/considerations/privacy_considerations\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract containing the function\n /// * `function_selector` - 4-byte identifier of the function to call\n /// * `args` - Array of arguments to pass to the public function\n /// * `hide_msg_sender` - the called function will see a \"null\" value for\n /// `msg_sender` if set to `true`\n ///\n pub fn call_public_function<let ArgsCount: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ArgsCount],\n hide_msg_sender: bool,\n ) {\n let calldata = [function_selector.to_field()].concat(args);\n let calldata_hash = hash_calldata_array(calldata);\n execution_cache::store(calldata, calldata_hash);\n self.call_public_function_with_calldata_hash(\n contract_address,\n calldata_hash,\n false,\n hide_msg_sender,\n )\n }\n\n /// Enqueues a read-only call to a public function.\n ///\n /// This is similar to Solidity's `staticcall`. The called function\n /// cannot modify state or emit events. Any nested calls are constrained to\n /// also be staticcalls.\n ///\n /// See also `call_public_function` for more important information about\n /// making private -> public function calls.\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract containing the function\n /// * `function_selector` - 4-byte identifier of the function to call\n /// * `args` - Array of arguments to pass to the public function\n /// * `hide_msg_sender` - the called function will see a \"null\" value for\n /// `msg_sender` if set to `true`\n ///\n pub fn static_call_public_function<let ArgsCount: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ArgsCount],\n hide_msg_sender: bool,\n ) {\n let calldata = [function_selector.to_field()].concat(args);\n let calldata_hash = hash_calldata_array(calldata);\n execution_cache::store(calldata, calldata_hash);\n self.call_public_function_with_calldata_hash(\n contract_address,\n calldata_hash,\n true,\n hide_msg_sender,\n )\n }\n\n /// Enqueues a call to a public function that takes no arguments.\n ///\n /// This is an optimisation for calling public functions that don't\n /// take any input parameters. It's otherwise equivalent to\n /// `call_public_function`.\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract containing the function\n /// * `function_selector` - 4-byte identifier of the function to call\n /// * `hide_msg_sender` - the called function will see a \"null\" value for\n /// `msg_sender` if set to `true`\n ///\n pub fn call_public_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n hide_msg_sender: bool,\n ) {\n let calldata_hash = hash_calldata_array([function_selector.to_field()]);\n self.call_public_function_with_calldata_hash(\n contract_address,\n calldata_hash,\n false,\n hide_msg_sender,\n )\n }\n\n /// Enqueues a read-only call to a public function with no arguments.\n ///\n /// This combines the optimisation of `call_public_function_no_args` with\n /// the safety of `static_call_public_function`.\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract containing the function\n /// * `function_selector` - 4-byte identifier of the function to call\n /// * `hide_msg_sender` - the called function will see a \"null\" value for\n /// `msg_sender` if set to `true`\n ///\n pub fn static_call_public_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n hide_msg_sender: bool,\n ) {\n let calldata_hash = hash_calldata_array([function_selector.to_field()]);\n self.call_public_function_with_calldata_hash(\n contract_address,\n calldata_hash,\n true,\n hide_msg_sender,\n )\n }\n\n /// Low-level public function call.\n ///\n /// This is the underlying implementation used by all other public function\n /// call methods. Instead of taking raw arguments, it accepts a\n /// hash of the arguments.\n ///\n /// Advanced function: Most developers should use `call_public_function`\n /// or `static_call_public_function` instead. This function is exposed for\n /// performance optimization and advanced use cases.\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract containing the function\n /// * `calldata_hash` - Hash of the function calldata\n /// * `is_static_call` - Whether this should be a read-only call\n /// * `hide_msg_sender` - the called function will see a \"null\" value for\n /// `msg_sender` if set to `true`\n ///\n pub fn call_public_function_with_calldata_hash(\n &mut self,\n contract_address: AztecAddress,\n calldata_hash: Field,\n is_static_call: bool,\n hide_msg_sender: bool,\n ) {\n let counter = self.next_counter();\n\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n\n notify_enqueued_public_function_call(\n contract_address,\n calldata_hash,\n counter,\n is_static_call,\n );\n\n let msg_sender = if hide_msg_sender {\n NULL_MSG_SENDER_CONTRACT_ADDRESS\n } else {\n self.this_address()\n };\n\n let call_request =\n PublicCallRequest { msg_sender, contract_address, is_static_call, calldata_hash };\n\n self.public_call_requests.push(Counted::new(call_request, counter));\n }\n\n /// Enqueues a public function call, and designates it to be the teardown\n /// function for this tx. Only one teardown function call can be made by a\n /// tx.\n ///\n /// Niche function: Only wallet developers and paymaster contract developers\n /// (aka Fee-payment contracts) will need to make use of this function.\n ///\n /// Aztec supports a three-phase execution model: setup, app logic, teardown.\n /// The phases exist to enable a fee payer to take on the risk of paying\n /// a transaction fee, safe in the knowledge that their payment (in whatever\n /// token or method the user chooses) will succeed, regardless of whether\n /// the app logic will succeed. The \"setup\" phase ensures the fee payer\n /// has sufficient balance to pay the proposer their fees.\n /// The teardown phase is primarily intended to: calculate exactly\n /// how much the user owes, based on gas consumption, and refund the user\n /// any change.\n ///\n /// Note: in some cases, the cost of refunding the user (i.e. DA costs of\n /// tx side-effects) might exceed the refund amount. For app logic with\n /// fairly stable and predictable gas consumption, a material refund amount\n /// is unlikely. For app logic with unpredictable gas consumption, a\n /// refund might be important to the user (e.g. if a hefty function reverts\n /// very early). Wallet/FPC/Paymaster developers should be mindful of this.\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract containing the teardown\n /// function\n /// * `function_selector` - 4-byte identifier of the function to call\n /// * `args` - An array of fields to pass to the function.\n /// * `hide_msg_sender` - the called function will see a \"null\" value for\n /// `msg_sender` if set to `true`\n pub fn set_public_teardown_function<let ArgsCount: u32>(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ArgsCount],\n hide_msg_sender: bool,\n ) {\n let calldata = [function_selector.to_field()].concat(args);\n let calldata_hash = hash_calldata_array(calldata);\n execution_cache::store(calldata, calldata_hash);\n self.set_public_teardown_function_with_calldata_hash(\n contract_address,\n calldata_hash,\n false,\n hide_msg_sender,\n )\n }\n\n /// Low-level function to set the public teardown function.\n ///\n /// This is the underlying implementation for setting the teardown function\n /// call that will execute at the end of the transaction. Instead of taking\n /// raw arguments, it accepts a hash of the arguments.\n ///\n /// Advanced function: Most developers should use\n /// `set_public_teardown_function` instead.\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract containing the teardown\n /// function\n /// * `calldata_hash` - Hash of the function calldata\n /// * `is_static_call` - Whether this should be a read-only call\n /// * `hide_msg_sender` - the called function will see a \"null\" value for\n /// `msg_sender` if set to `true`\n ///\n pub fn set_public_teardown_function_with_calldata_hash(\n &mut self,\n contract_address: AztecAddress,\n calldata_hash: Field,\n is_static_call: bool,\n hide_msg_sender: bool,\n ) {\n let counter = self.next_counter();\n\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n\n notify_set_public_teardown_function_call(\n contract_address,\n calldata_hash,\n counter,\n is_static_call,\n );\n\n let msg_sender = if hide_msg_sender {\n NULL_MSG_SENDER_CONTRACT_ADDRESS\n } else {\n self.this_address()\n };\n\n self.public_teardown_call_request =\n PublicCallRequest { msg_sender, contract_address, is_static_call, calldata_hash };\n }\n\n /// Increments the side-effect counter.\n ///\n /// Very low-level function.\n ///\n /// # Advanced\n ///\n /// Every side-effect of a private function is given a \"side-effect counter\",\n /// based on when it is created. This PrivateContext is in charge of\n /// assigning the counters.\n ///\n /// The reason we have side-effect counters is complicated. Consider this\n /// illustrative pseudocode of inter-contract function calls:\n /// ```\n /// contract A {\n /// let x = 5; // pseudocode for storage var x.\n /// fn a1 {\n /// read x; // value: 5, counter: 1.\n /// x = x + 1;\n /// write x; // value: 6, counter: 2.\n ///\n /// B.b(); // start_counter: 2, end_counter: 4\n ///\n /// read x; // value: 36, counter: 5.\n /// x = x + 1;\n /// write x; // value: 37, counter: 6.\n /// }\n ///\n /// fn a2 {\n /// read x; // value: 6, counter: 3.\n /// x = x * x;\n /// write x; // value: 36, counter: 4.\n /// }\n /// }\n ///\n /// contract B {\n /// fn b() {\n /// A.a2();\n /// }\n /// }\n /// ```\n ///\n /// Suppose a1 is the first function called. The comments show the execution\n /// counter of each side-effect, and what the new value of `x` is.\n ///\n /// These (private) functions are processed by Aztec's kernel circuits in an\n /// order that is different from execution order:\n /// All of A.a1 is proven before B.b is proven, before A.a2 is proven.\n /// So when we're in the 2nd execution frame of A.a1 (after the call to\n /// B.b), the circuit needs to justify why x went from being `6` to `36`.\n /// But the circuit doesn't know why, and given the order of proving, the\n /// kernel hasn't _seen_ a value of 36 get written yet.\n /// The kernel needs to track big arrays of all side-effects of all\n /// private functions in a tx. Then, as it recurses and processes B.b(), it\n /// will eventually see a value of 36 get written.\n ///\n /// Suppose side-effect counters weren't exposed:\n /// The kernel would only see this ordering (in order of proof verification):\n /// [ A.a1.read, A.a1.write, A.a1.read, A.a1.write, A.a2.read, A.a2.write ]\n /// [ 5, 6, 36, 37, 6, 36 ]\n /// The kernel wouldn't know _when_ B.b() was called within A.a1(), because\n /// it can't see what's going on within an app circuit. So the kernel\n /// wouldn't know that the ordering of reads and writes should actually be:\n /// [ A.a1.read, A.a1.write, A.a2.read, A.a2.write, A.a1.read, A.a1.write ]\n /// [ 5, 6, 6, 36, 36, 37 ]\n ///\n /// And so, we introduced side-effect counters: every private function must\n /// assign side-effect counters alongside every side-effect that it emits,\n /// and also expose to the kernel the counters that it started and ended\n /// with.\n /// This gives the kernel enough information to arrange all side-effects in\n /// the correct order.\n /// It can then catch (for example) if a function tries to read state\n /// before it has been written (e.g. if A.a2() maliciously tried to read\n /// a value of x=37) (e.g. if A.a1() maliciously tried to read x=6).\n ///\n /// If a malicious app contract _lies_ and does not count correctly:\n /// - It cannot lie about its start and end counters because the kernel\n /// will catch this.\n /// - It _could_ lie about its intermediate counters:\n /// - 1. It could not increment its side-effects correctly\n /// - 2. It could label its side-effects with counters outside of its\n /// start and end counters' range.\n /// The kernel will catch 2.\n /// The kernel will not catch 1., but this would only cause corruption\n /// to the private state of the malicious contract, and not any other\n /// contracts (because a contract can only modify its own state). If\n /// a \"good\" contract is given _read access_ to a maliciously-counting\n /// contract (via an external getter function, or by reading historic\n /// state from the archive tree directly), and they then make state\n /// changes to their _own_ state accordingly, that could be dangerous.\n /// Developers should be mindful not to trust the claimed innards of\n /// external contracts unless they have audited/vetted the contracts\n /// including vetting the side-effect counter incrementation.\n /// This is a similar paradigm to Ethereum smart contract development:\n /// you must vet external contracts that your contract relies upon, and\n /// you must not make any presumptions about their claimed behaviour.\n /// (Hopefully if a contract imports a version of aztec-nr, we will get\n /// contract verification tooling that can validate the authenticity\n /// of the imported aztec-nr package, and hence infer that the side-\n /// effect counting will be correct, without having to re-audit such logic\n /// for every contract).\n ///\n fn next_counter(&mut self) -> u32 {\n let counter = self.side_effect_counter;\n self.side_effect_counter += 1;\n counter\n }\n}\n\nimpl Empty for PrivateContext {\n fn empty() -> Self {\n PrivateContext {\n inputs: PrivateContextInputs::empty(),\n side_effect_counter: 0 as u32,\n min_revertible_side_effect_counter: 0 as u32,\n is_fee_payer: false,\n args_hash: 0,\n return_hash: 0,\n include_by_timestamp: 0,\n 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 anchor_block_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 expected_non_revertible_side_effect_counter: 0,\n expected_revertible_side_effect_counter: 0,\n }\n }\n}\n"
|
|
@@ -3561,7 +3557,7 @@
|
|
|
3561
3557
|
},
|
|
3562
3558
|
"73": {
|
|
3563
3559
|
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/contract_self.nr",
|
|
3564
|
-
"source": "use crate::{\n context::{\n calls::{PrivateCall, PrivateStaticCall, PublicCall, PublicStaticCall},\n private_context::PrivateContext,\n public_context::PublicContext,\n utility_context::UtilityContext,\n },\n event::{\n event_emission::{emit_event_in_private, emit_event_in_public},\n event_interface::EventInterface,\n event_message::EventMessage,\n },\n};\nuse protocol_types::{\n address::AztecAddress,\n constants::NULL_MSG_SENDER_CONTRACT_ADDRESS,\n traits::{Deserialize, Serialize},\n};\n\n/// `ContractSelf` is the core interface for interacting with an Aztec contract's own state and context.\n///\n/// This struct is automatically injected into every #[external(...)] contract function by the Aztec macro system and is\n/// accessible through the `self` variable.\n///\n/// # Usage in Contract Functions\n///\n/// Once injected, you can use `self` to:\n/// - Access storage: `self.storage.balances.at(owner).read()`\n/// - Call contracts: `self.call(Token::at(address).transfer(recipient, amount))`\n/// - Emit events: `self.emit(event).deliver_to(recipient, delivery_mode)` (private) or `self.emit(event)` (public)\n/// - Get the contract address: `self.address`\n/// - Get the caller: `self.msg_sender()`\n/// - Access low-level Aztec.nr APIs through the context: `self.context`\n///\n/// # Example\n///\n/// ```noir\n/// #[external(\"private\")]\n/// fn withdraw(amount: u128, recipient: AztecAddress) {\n/// // Get the caller of this function\n/// let sender = self.msg_sender().unwrap();\n///\n/// // Access storage\n/// let token = self.storage.donation_token.get_note().get_address();\n///\n/// // Call contracts\n/// self.call(Token::at(token).transfer(recipient, amount));\n/// }\n/// ```\n///\n/// # Type Parameters\n///\n/// - `Context`: The execution context type - either `&mut PrivateContext`, `PublicContext`, or `UtilityContext`\n/// - `Storage`: The contract's storage struct (defined with `#[storage]`), or `()` if the contract has no storage\n/// - `CallSelf`: Macro-generated type for calling contract's own non-view functions\n/// - `EnqueueSelf`: Macro-generated type for enqueuing calls to the contract's own non-view functions\n/// - `CallSelfStatic`: Macro-generated type for calling contract's own view functions\n/// - `EnqueueSelfStatic`: Macro-generated type for enqueuing calls to the contract's own view functions\npub struct ContractSelf<Context, Storage, CallSelf, EnqueueSelf, CallSelfStatic, EnqueueSelfStatic, CallInternal> {\n /// The address of this contract\n pub address: AztecAddress,\n /// The contract's storage instance, representing the struct to which the `#[storage]` macro was applied in your\n /// contract. If the contract has no storage, the type of this will be `()`.\n ///\n /// This storage instance is specialized for the current execution context (private, public, or utility) and\n /// provides access to the contract's state variables. Each state variable accepts the context as a generic\n /// parameter, which determines its available functionality. For example, a PublicImmutable variable can be read\n /// from any context (public, private, or utility) but can only be written to from public contexts.\n ///\n /// # Developer Note\n /// If you've arrived here while trying to access your contract's storage while the `Storage` generic type is set to\n /// unit type `()`, it means you haven't yet defined a Storage struct using the #[storage] macro in your contract.\n /// For guidance on setting this up, please refer to our docs:\n /// https://docs.aztec.network/developers/docs/guides/smart_contracts/storage\n pub storage: Storage,\n /// The execution context whose type is determined by the #[external(...)] attribute of the contract function based\n /// on the external function type (private, public, or utility).\n pub context: Context,\n\n /// Provides type-safe methods for calling this contract's own non-view functions.\n ///\n /// In private and public contexts this will be a struct with appropriate methods;\n /// in utility context it will be the unit type `()`.\n ///\n /// Example API:\n /// ```noir\n /// self.call_self.some_private_function(args)\n /// ```\n pub call_self: CallSelf,\n /// Provides type-safe methods for enqueuing calls to this contract's own non-view functions.\n ///\n /// In private context this will be a struct with appropriate methods;\n /// in public and utility contexts it will be the unit type `()`.\n ///\n /// Example API:\n /// ```noir\n /// self.enqueue_self.some_public_function(args)\n /// ```\n pub enqueue_self: EnqueueSelf,\n /// Provides type-safe methods for calling this contract's own view functions.\n ///\n /// In private and public contexts this will be a struct with appropriate methods;\n /// in utility context it will be the unit type `()`.\n ///\n /// Example API:\n /// ```noir\n /// self.call_self_static.some_view_function(args)\n /// ```\n pub call_self_static: CallSelfStatic,\n /// Provides type-safe methods for enqueuing calls to this contract's own view functions.\n ///\n /// In private context this will be a struct with appropriate methods;\n /// in public and utility contexts it will be the unit type `()`.\n ///\n /// Example API:\n /// ```noir\n /// self.enqueue_self_static.some_public_view_function(args)\n /// ```\n pub enqueue_self_static: EnqueueSelfStatic,\n /// Provides type-safe methods for calling internal functions.\n ///\n /// In private and public contexts this will be a struct with appropriate methods;\n /// in utility context it will be the unit type `()`.\n ///\n /// Example API:\n /// ```noir\n /// self.internal.some_internal_function(args)\n /// ```\n pub internal: CallInternal,\n}\n\n/// Implementation for `ContractSelf` in private execution contexts.\n///\n/// This implementation is used when a contract function is marked with `#[external(\"private\")]`.\n/// Private functions execute client-side and generate zero-knowledge proofs of their execution.\nimpl<Storage, CallSelf, EnqueueSelf, CallSelfStatic, EnqueueSelfStatic, CallInternal> ContractSelf<&mut PrivateContext, Storage, CallSelf, EnqueueSelf, CallSelfStatic, EnqueueSelfStatic, CallInternal> {\n /// Creates a new `ContractSelf` instance for a private function.\n ///\n /// This constructor is called automatically by the macro system and should not be called directly.\n pub fn new_private(\n context: &mut PrivateContext,\n storage: Storage,\n call_self: CallSelf,\n enqueue_self: EnqueueSelf,\n call_self_static: CallSelfStatic,\n enqueue_self_static: EnqueueSelfStatic,\n internal: CallInternal,\n ) -> Self {\n Self {\n context,\n storage,\n address: context.this_address(),\n call_self,\n enqueue_self,\n call_self_static,\n enqueue_self_static,\n internal,\n }\n }\n\n /// Returns the contract address that initiated this function call. This is similar to `msg.sender` in Solidity.\n ///\n /// Important Note: Since Aztec doesn't have a concept of an EoA ( Externally-owned Account), the msg_sender is\n /// \"null\" for the first function call of every transaction. The first function call of a tx is likely to be a call\n /// to the user's account contract, so this quirk will most often be handled by account contract developers.\n ///\n /// # Returns\n /// * `Option<AztecAddress>` - The address of the smart contract that called this function (be it an app contract or\n /// a user's account contract). Returns `Option<AztecAddress>::none` for the first function call of the tx. No\n /// other _private_ function calls in the tx will have a `none` msg_sender, but _public_ function calls might (see\n /// the PublicContext).\n ///\n pub fn msg_sender(self) -> Option<AztecAddress> {\n let maybe_msg_sender = self.context.msg_sender_unsafe();\n if maybe_msg_sender == NULL_MSG_SENDER_CONTRACT_ADDRESS {\n Option::none()\n } else {\n Option::some(maybe_msg_sender)\n }\n }\n\n /// Emits an event privately.\n ///\n /// Unlike public events, private events do not reveal their contents publicly. They instead create an\n /// [EventMessage] containing the private event information, which **MUST** be delivered to a recipient via\n /// [EventMessage::deliver_to] in order for them to learn about the event. Multiple recipients can have the same\n /// message be delivered to them.\n ///\n /// # Example\n /// ```noir\n /// #[event]\n /// struct Transfer { from: AztecAddress, to: AztecAddress, amount: u128 }\n ///\n /// #[external(\"private\")]\n /// fn transfer(to: AztecAddress, amount: u128) {\n /// let from = self.msg_sender().unwrap();\n ///\n /// let message: EventMessage = self.emit(Transfer { from, to, amount });\n /// message.deliver_to(from, MessageDelivery.UNCONSTRAINED_OFFCHAIN);\n /// message.deliver_to(to, MessageDelivery.CONSTRAINED_ONCHAIN);\n /// }\n /// ```\n ///\n /// # Cost\n ///\n /// Private event emission always results in the creation of a nullifer, which acts as a commitment to the event and\n /// is used by third parties to verify its authenticity. See [EventMessage::deliver_to] for the costs associated to\n /// delivery.\n ///\n /// # Privacy\n ///\n /// The nullifier created when emitting a private event leaks nothing about the content of the event - it's a\n /// commitment that includes a random value, so even with full knowledge of the event preimage determining if an\n /// event was emitted or not requires brute-forcing the entire `Field` space.\n pub fn emit<Event>(&mut self, event: Event) -> EventMessage<Event>\n where\n Event: EventInterface + Serialize,\n {\n emit_event_in_private(self.context, event)\n }\n\n /// Makes a call to the private function defined by the `call` parameter.\n ///\n /// # Arguments\n /// * `call` - The object representing the private function to invoke.\n ///\n /// # Returns\n /// * `T` - Whatever data the called function has returned.\n ///\n /// # Example\n /// ```noir\n /// self.call(Token::at(address).transfer_in_private(recipient, amount));\n /// ```\n ///\n /// This enables contracts to interact with each other while maintaining\n /// privacy. This \"composability\" of private contract functions is a key\n /// feature of the Aztec network.\n ///\n /// If a user's transaction includes multiple private function calls, then\n /// by the design of Aztec, the following information will remain private[1]:\n /// - The function selectors and contract addresses of all private function\n /// calls will remain private, so an observer of the public mempool will\n /// not be able to look at a tx and deduce which private functions have\n /// been executed.\n /// - The arguments and return values of all private function calls will\n /// remain private.\n /// - The person who initiated the tx will remain private.\n /// - The notes and nullifiers and private logs that are emitted by all\n /// private function calls will (if designed well) not leak any user\n /// secrets, nor leak which functions have been executed.\n ///\n /// [1] Caveats: Some of these privacy guarantees depend on how app\n /// developers design their smart contracts. Some actions _can_ leak\n /// information, such as:\n /// - Calling an internal public function.\n /// - Calling a public function and not setting msg_sender to Option::none\n /// (see https://github.com/AztecProtocol/aztec-packages/pull/16433)\n /// - Calling any public function will always leak details about the nature\n /// of the transaction, so devs should be careful in their contract\n /// designs. If it can be done in a private function, then that will give\n /// the best privacy.\n /// - Not padding the side-effects of a tx to some standardized, uniform\n /// size. The kernel circuits can take hints to pad side-effects, so a\n /// wallet should be able to request for a particular amount of padding.\n /// Wallets should ideally agree on some standard.\n /// - Padding should include:\n /// - Padding the lengths of note & nullifier arrays\n /// - Padding private logs with random fields, up to some standardized\n /// size.\n /// See also: https://docs.aztec.network/developers/resources/considerations/privacy_considerations\n ///\n /// # Advanced\n /// * The call is added to the private call stack and executed by kernel\n /// circuits after this function completes\n /// * The called function can modify its own contract's private state\n /// * Side effects from the called function are included in this transaction\n /// * The call inherits the current transaction's context and gas limits\n ///\n pub fn call<let M: u32, let N: u32, T>(&mut self, call: PrivateCall<M, N, T>) -> T\n where\n T: Deserialize,\n {\n call.call(self.context)\n }\n\n /// Makes a read-only call to the private function defined by the `call` parameter.\n ///\n /// This is similar to Solidity's `staticcall`. The called function\n /// cannot modify state, emit L2->L1 messages, nor emit events. Any nested\n /// calls are constrained to also be static calls.\n ///\n /// # Arguments\n /// * `call` - The object representing the read-only private function to invoke.\n ///\n /// # Returns\n /// * `T` - Whatever data the called function has returned.\n ///\n /// # Example\n /// ```noir\n /// self.view(Token::at(address).balance_of_private(recipient));\n /// ```\n pub fn view<let M: u32, let N: u32, T>(&mut self, call: PrivateStaticCall<M, N, T>) -> T\n where\n T: Deserialize,\n {\n call.view(self.context)\n }\n\n /// Enqueues a call to the public function defined by the `call` parameter,\n /// to be executed later.\n ///\n /// Unlike private functions which execute immediately on the user's device,\n /// public function calls are \"enqueued\" and executed some time later by a\n /// block proposer.\n ///\n /// This means a public function cannot return any values back to a private\n /// function, because by the time the public function is being executed,\n /// the private function which called it has already completed execution.\n /// (In fact, the private function has been executed and proven, along with\n /// all other private function calls of the user's tx. A single proof of the\n /// tx has been submitted to the Aztec network, and some time later a\n /// proposer has picked the tx up from the mempool and begun executing all\n /// of the enqueued public functions).\n ///\n /// # Privacy warning\n /// Enqueueing a public function call is an inherently leaky action.\n /// Many interesting applications will require some interaction with public\n /// state, but smart contract developers should try to use public function\n /// calls sparingly, and carefully.\n /// _Internal_ public function calls are especially leaky, because they\n /// completely leak which private contract made the call.\n /// See also: https://docs.aztec.network/developers/resources/considerations/privacy_considerations\n ///\n /// # Arguments\n /// * `call` - The interface representing the public function to enqueue.\n ///\n /// TODO(F-131): We should drop T from here because it is strange as there\n /// is no return value. The PublicCall type seems to be defined\n /// incorrectly.\n pub fn enqueue<let M: u32, let N: u32, T>(&mut self, call: PublicCall<M, N, T>)\n where\n T: Deserialize,\n {\n call.enqueue(self.context)\n }\n\n /// Enqueues a read-only call to the public function defined by the `call` parameter.\n ///\n /// This is similar to Solidity's `staticcall`. The called function\n /// cannot modify state, emit L2->L1 messages, nor emit events. Any nested\n /// calls are constrained to also be static calls.\n ///\n /// # Arguments\n /// * `call` - The object representing the read-only public function to enqueue.\n ///\n /// # Example\n /// ```noir\n /// self.enqueue_view(MyContract::at(address).assert_timestamp_less_than(timestamp));\n /// ```\n ///\n /// TODO(F-131): We should drop T from here because it is strange as there\n /// is no return value. The PublicCall type seems to be defined\n /// incorrectly.\n pub fn enqueue_view<let M: u32, let N: u32, T>(&mut self, call: PublicStaticCall<M, N, T>)\n where\n T: Deserialize,\n {\n call.enqueue_view(self.context)\n }\n\n /// Enqueues a call to the public function defined by the `call` parameter,\n /// to be executed later.\n ///\n /// As per `enqueue`, but hides this calling contract's address from the\n /// target public function.\n /// This means the origin of the call (msg_sender) will not be publicly\n /// visible to any blockchain observers, nor to the target public function.\n /// When the target public function reads `context.msg_sender()` it will\n /// receive an `Option<AztecAddress>::none`.\n ///\n /// NOTES:\n /// - Not all public functions will accept a msg_sender of \"none\". Many\n /// public functions will require that msg_sender is \"some\" and will\n /// revert otherwise. Therefore, if using `enqueue_incognito`, you must\n /// understand whether the function you're calling will accept a\n /// msg_sender of \"none\".\n /// Lots of public bookkeeping patterns rely on knowing which address made\n /// the call, so as to ascribe state against the caller's address.\n /// (There are patterns whereby bookkeeping could instead be done in\n /// private-land).\n /// - If you are enqueueing a call to an _internal_ public function (i.e.\n /// a public function that will only accept calls from other functions\n /// of its own contract), then by definition a call to it cannot possibly\n /// be \"incognito\": the msg_sender must be its own address, and indeed the\n /// called public function will assert this. Tl;dr this is not usable for\n /// enqueued internal public calls.\n ///\n /// # Arguments\n /// * `call` - The object representing the public function to enqueue.\n ///\n /// # Example\n /// ```noir\n /// self.enqueue_incognito(Token::at(address).increase_total_supply_by(amount));\n /// ```\n ///\n /// Advanced:\n /// - The kernel circuits will permit _any_ private function to set the\n /// msg_sender field of any enqueued public function call to\n /// NULL_MSG_SENDER_CONTRACT_ADDRESS.\n /// - When the called public function calls `PublicContext::msg_sender()`,\n /// aztec-nr will translate NULL_MSG_SENDER_CONTRACT_ADDRESS into\n /// `Option<AztecAddress>::none` for familiarity to devs.\n ///\n /// TODO(F-131): We should drop T from here because it is strange as there\n /// is no return value. The PublicCall type seems to be defined\n /// incorrectly.\n pub fn enqueue_incognito<let M: u32, let N: u32, T>(&mut self, call: PublicCall<M, N, T>)\n where\n T: Deserialize,\n {\n call.enqueue_incognito(self.context)\n }\n\n /// Enqueues a read-only call to the public function defined by the `call` parameter.\n ///\n /// As per `enqueue_view`, but hides this calling contract's address from\n /// the target public function.\n ///\n /// See `enqueue_incognito` for more details relating to hiding msg_sender.\n ///\n /// # Arguments\n /// * `call` - The object representing the read-only public function to enqueue.\n ///\n /// # Example\n /// ```noir\n /// self.enqueue_view_incognito(MyContract::at(address).assert_timestamp_less_than(timestamp));\n /// ```\n ///\n /// TODO(F-131): We should drop T from here because it is strange as there\n /// is no return value. The PublicCall type seems to be defined\n /// incorrectly.\n pub fn enqueue_view_incognito<let M: u32, let N: u32, T>(\n &mut self,\n call: PublicStaticCall<M, N, T>,\n )\n where\n T: Deserialize,\n {\n call.enqueue_view_incognito(self.context)\n }\n\n /// Enqueues a call to the public function defined by the `call` parameter,\n /// and designates it to be the teardown function for this tx. Only one teardown\n /// function call can be made by a tx.\n ///\n /// Niche function: Only wallet developers and paymaster contract developers\n /// (aka Fee-payment contracts) will need to make use of this function.\n ///\n /// Aztec supports a three-phase execution model: setup, app logic, teardown.\n /// The phases exist to enable a fee payer to take on the risk of paying\n /// a transaction fee, safe in the knowledge that their payment (in whatever\n /// token or method the user chooses) will succeed, regardless of whether\n /// the app logic will succeed. The \"setup\" phase ensures the fee payer\n /// has sufficient balance to pay the proposer their fees.\n /// The teardown phase is primarily intended to: calculate exactly\n /// how much the user owes, based on gas consumption, and refund the user\n /// any change.\n ///\n /// Note: in some cases, the cost of refunding the user (i.e. DA costs of\n /// tx side-effects) might exceed the refund amount. For app logic with\n /// fairly stable and predictable gas consumption, a material refund amount\n /// is unlikely. For app logic with unpredictable gas consumption, a\n /// refund might be important to the user (e.g. if a hefty function reverts\n /// very early). Wallet/FPC/Paymaster developers should be mindful of this.\n ///\n /// See `enqueue` for more information about enqueuing public function calls.\n ///\n /// # Arguments\n /// * `call` - The object representing the public function to designate as teardown.\n ///\n /// TODO(F-131): We should drop T from here because it is strange as there\n /// is no return value. The PublicCall type seems to be defined\n /// incorrectly.\n pub fn set_as_teardown<let M: u32, let N: u32, T>(&mut self, call: PublicCall<M, N, T>)\n where\n T: Deserialize,\n {\n call.set_as_teardown(self.context)\n }\n\n /// Enqueues a call to the public function defined by the `call` parameter,\n /// and designates it to be the teardown function for this tx. Only one teardown\n /// function call can be made by a tx.\n ///\n /// As per `set_as_teardown`, but hides this calling contract's address from\n /// the target public function.\n ///\n /// See `enqueue_incognito` for more details relating to hiding msg_sender.\n ///\n /// TODO(F-131): We should drop T from here because it is strange as there\n /// is no return value. The PublicCall type seems to be defined\n /// incorrectly.\n pub fn set_as_teardown_incognito<let M: u32, let N: u32, T>(\n &mut self,\n call: PublicCall<M, N, T>,\n )\n where\n T: Deserialize,\n {\n call.set_as_teardown_incognito(self.context)\n }\n}\n\n/// Implementation for `ContractSelf` in public execution contexts.\n///\n/// This implementation is used when a contract function is marked with `#[external(\"public\")]`.\n/// Public functions are executed by the sequencer in the Aztec Virtual Machine (AVM) and can work only with public\n/// state.\nimpl<Storage, CallSelf, CallSelfStatic, CallInternal> ContractSelf<PublicContext, Storage, CallSelf, (), CallSelfStatic, (), CallInternal> {\n /// Creates a new `ContractSelf` instance for a public function.\n ///\n /// This constructor is called automatically by the macro system and should not be called directly.\n pub fn new_public(\n context: PublicContext,\n storage: Storage,\n call_self: CallSelf,\n call_self_static: CallSelfStatic,\n internal: CallInternal,\n ) -> Self {\n Self {\n context,\n storage,\n address: context.this_address(),\n call_self,\n enqueue_self: (),\n call_self_static,\n enqueue_self_static: (),\n internal,\n }\n }\n\n /// Returns the contract address that initiated this function call.\n ///\n /// This is similar to `msg.sender` in Solidity (hence the name).\n ///\n /// Important Note: If the calling function is a _private_ function, then it had the option of hiding its address\n /// when enqueuing this public function call. In such cases, this `context.msg_sender()` method will return\n /// `Option<AztecAddress>::none`. If the calling function is a _public_ function, it will always return an\n /// `Option<AztecAddress>::some` (i.e. a non-null value).\n ///\n /// # Returns\n /// * `Option<AztecAddress>` - The address of the smart contract that called this function (be it an app contract or\n /// a user's account contract).\n ///\n /// # Advanced\n /// * Value is provided by the AVM sender opcode\n /// * In nested calls, this is the immediate caller, not the original transaction sender\n ///\n pub fn msg_sender(self: Self) -> Option<AztecAddress> {\n // Safety: AVM opcodes are constrained by the AVM itself\n let maybe_msg_sender = self.context.msg_sender_unsafe();\n if maybe_msg_sender == NULL_MSG_SENDER_CONTRACT_ADDRESS {\n Option::none()\n } else {\n Option::some(maybe_msg_sender)\n }\n }\n\n /// Emits an event publicly.\n ///\n /// Public events are emitted as plaintext and are therefore visible to everyone. This is is the same as Solidity\n /// events on EVM chains.\n ///\n /// Unlike private events, they don't require delivery of an event message.\n ///\n /// # Example\n /// ```noir\n /// #[event]\n /// struct Update { value: Field }\n ///\n /// #[external(\"public\")]\n /// fn publish_update(value: Field) {\n /// self.emit(Update { value });\n /// }\n /// ```\n ///\n /// # Cost\n ///\n /// Public event emission is achieved by emitting public transaction logs. A total of `N+1` fields are emitted,\n /// where `N` is the serialization length of the event.\n pub fn emit<Event>(&mut self, event: Event)\n where\n Event: EventInterface + Serialize,\n {\n emit_event_in_public(self.context, event);\n }\n\n /// Makes the call to the public function defined by the `call` parameter.\n ///\n /// Will revert if the called function reverts or runs out of gas.\n ///\n /// # Arguments\n /// * `call` - The object representing the public function to invoke.\n ///\n /// # Returns\n /// * `T` - Whatever data the called function has returned.\n ///\n /// # Example\n /// ```noir\n /// self.call(Token::at(address).transfer_in_public(recipient, amount));\n /// ```\n ///\n pub unconstrained fn call<let M: u32, let N: u32, T>(self, call: PublicCall<M, N, T>) -> T\n where\n T: Deserialize,\n {\n call.call(self.context)\n }\n\n /// Makes the read-only call to the public function defined by the `call` parameter.\n ///\n /// This is similar to Solidity's `staticcall`. The called function\n /// cannot modify state or emit events. Any nested calls are constrained to\n /// also be static calls.\n ///\n /// Will revert if the called function reverts or runs out of gas.\n ///\n /// # Arguments\n /// * `call` - The object representing the read-only public function to invoke.\n ///\n /// # Returns\n /// * `T` - Whatever data the called function has returned.\n ///\n /// # Example\n /// ```noir\n /// self.view(Token::at(address).balance_of_public(recipient));\n /// ```\n ///\n pub unconstrained fn view<let M: u32, let N: u32, T>(self, call: PublicStaticCall<M, N, T>) -> T\n where\n T: Deserialize,\n {\n call.view(self.context)\n }\n}\n\n/// Implementation for `ContractSelf` in utility execution contexts.\n///\n/// This implementation is used when a contract function is marked with `#[external(\"utility\")]`.\n/// Utility functions are unconstrained functions that can read private state for offchain queries.\n/// They are typically used for view functions that need to access private notes (e.g. a Token's balance_of function).\nimpl<Storage> ContractSelf<UtilityContext, Storage, (), (), (), (), ()> {\n /// Creates a new `ContractSelf` instance for a utility function.\n ///\n /// This constructor is called automatically by the macro system and should not be called directly.\n pub fn new_utility(context: UtilityContext, storage: Storage) -> Self {\n Self {\n context,\n storage,\n address: context.this_address(),\n call_self: (),\n enqueue_self: (),\n call_self_static: (),\n enqueue_self_static: (),\n internal: (),\n }\n }\n}\n"
|
|
3560
|
+
"source": "use crate::{\n context::{\n calls::{PrivateCall, PrivateStaticCall, PublicCall, PublicStaticCall},\n private_context::PrivateContext,\n public_context::PublicContext,\n utility_context::UtilityContext,\n },\n event::{\n event_emission::{emit_event_in_private, emit_event_in_public},\n event_interface::EventInterface,\n event_message::EventMessage,\n },\n};\nuse protocol_types::{\n address::AztecAddress,\n constants::NULL_MSG_SENDER_CONTRACT_ADDRESS,\n traits::{Deserialize, Serialize},\n};\n\n/// `ContractSelf` is the core interface for interacting with an Aztec contract's own state and context.\n///\n/// This struct is automatically injected into every #[external(...)] contract function by the Aztec macro system and is\n/// accessible through the `self` variable.\n///\n/// # Usage in Contract Functions\n///\n/// Once injected, you can use `self` to:\n/// - Access storage: `self.storage.balances.at(owner).read()`\n/// - Call contracts: `self.call(Token::at(address).transfer(recipient, amount))`\n/// - Emit events: `self.emit(event).deliver_to(recipient, delivery_mode)` (private) or `self.emit(event)` (public)\n/// - Get the contract address: `self.address`\n/// - Get the caller: `self.msg_sender()`\n/// - Access low-level Aztec.nr APIs through the context: `self.context`\n///\n/// # Example\n///\n/// ```noir\n/// #[external(\"private\")]\n/// fn withdraw(amount: u128, recipient: AztecAddress) {\n/// // Get the caller of this function\n/// let sender = self.msg_sender().unwrap();\n///\n/// // Access storage\n/// let token = self.storage.donation_token.get_note().get_address();\n///\n/// // Call contracts\n/// self.call(Token::at(token).transfer(recipient, amount));\n/// }\n/// ```\n///\n/// # Type Parameters\n///\n/// - `Context`: The execution context type - either `&mut PrivateContext`, `PublicContext`, or `UtilityContext`\n/// - `Storage`: The contract's storage struct (defined with `#[storage]`), or `()` if the contract has no storage\n/// - `CallSelf`: Macro-generated type for calling contract's own non-view functions\n/// - `EnqueueSelf`: Macro-generated type for enqueuing calls to the contract's own non-view functions\n/// - `CallSelfStatic`: Macro-generated type for calling contract's own view functions\n/// - `EnqueueSelfStatic`: Macro-generated type for enqueuing calls to the contract's own view functions\npub struct ContractSelf<Context, Storage, CallSelf, EnqueueSelf, CallSelfStatic, EnqueueSelfStatic, CallInternal> {\n /// The address of this contract\n pub address: AztecAddress,\n /// The contract's storage instance, representing the struct to which the `#[storage]` macro was applied in your\n /// contract. If the contract has no storage, the type of this will be `()`.\n ///\n /// This storage instance is specialized for the current execution context (private, public, or utility) and\n /// provides access to the contract's state variables. Each state variable accepts the context as a generic\n /// parameter, which determines its available functionality. For example, a PublicImmutable variable can be read\n /// from any context (public, private, or utility) but can only be written to from public contexts.\n ///\n /// # Developer Note\n /// If you've arrived here while trying to access your contract's storage while the `Storage` generic type is set to\n /// unit type `()`, it means you haven't yet defined a Storage struct using the #[storage] macro in your contract.\n /// For guidance on setting this up, please refer to our docs:\n /// https://docs.aztec.network/developers/docs/guides/smart_contracts/storage\n pub storage: Storage,\n /// The execution context whose type is determined by the #[external(...)] attribute of the contract function based\n /// on the external function type (private, public, or utility).\n pub context: Context,\n\n /// Provides type-safe methods for calling this contract's own non-view functions.\n ///\n /// In private and public contexts this will be a struct with appropriate methods;\n /// in utility context it will be the unit type `()`.\n ///\n /// Example API:\n /// ```noir\n /// self.call_self.some_private_function(args)\n /// ```\n pub call_self: CallSelf,\n /// Provides type-safe methods for enqueuing calls to this contract's own non-view functions.\n ///\n /// In private context this will be a struct with appropriate methods;\n /// in public and utility contexts it will be the unit type `()`.\n ///\n /// Example API:\n /// ```noir\n /// self.enqueue_self.some_public_function(args)\n /// ```\n pub enqueue_self: EnqueueSelf,\n /// Provides type-safe methods for calling this contract's own view functions.\n ///\n /// In private and public contexts this will be a struct with appropriate methods;\n /// in utility context it will be the unit type `()`.\n ///\n /// Example API:\n /// ```noir\n /// self.call_self_static.some_view_function(args)\n /// ```\n pub call_self_static: CallSelfStatic,\n /// Provides type-safe methods for enqueuing calls to this contract's own view functions.\n ///\n /// In private context this will be a struct with appropriate methods;\n /// in public and utility contexts it will be the unit type `()`.\n ///\n /// Example API:\n /// ```noir\n /// self.enqueue_self_static.some_public_view_function(args)\n /// ```\n pub enqueue_self_static: EnqueueSelfStatic,\n /// Provides type-safe methods for calling internal functions.\n ///\n /// In private and public contexts this will be a struct with appropriate methods;\n /// in utility context it will be the unit type `()`.\n ///\n /// Example API:\n /// ```noir\n /// self.internal.some_internal_function(args)\n /// ```\n pub internal: CallInternal,\n}\n\n/// Implementation for `ContractSelf` in private execution contexts.\n///\n/// This implementation is used when a contract function is marked with `#[external(\"private\")]`.\n/// Private functions execute client-side and generate zero-knowledge proofs of their execution.\nimpl<Storage, CallSelf, EnqueueSelf, CallSelfStatic, EnqueueSelfStatic, CallInternal> ContractSelf<&mut PrivateContext, Storage, CallSelf, EnqueueSelf, CallSelfStatic, EnqueueSelfStatic, CallInternal> {\n /// Creates a new `ContractSelf` instance for a private function.\n ///\n /// This constructor is called automatically by the macro system and should not be called directly.\n pub fn new_private(\n context: &mut PrivateContext,\n storage: Storage,\n call_self: CallSelf,\n enqueue_self: EnqueueSelf,\n call_self_static: CallSelfStatic,\n enqueue_self_static: EnqueueSelfStatic,\n internal: CallInternal,\n ) -> Self {\n Self {\n context,\n storage,\n address: context.this_address(),\n call_self,\n enqueue_self,\n call_self_static,\n enqueue_self_static,\n internal,\n }\n }\n\n /// Returns the contract address that initiated this function call. This is similar to `msg.sender` in Solidity.\n ///\n /// Important Note: Since Aztec doesn't have a concept of an EoA ( Externally-owned Account), the msg_sender is\n /// \"null\" for the first function call of every transaction. The first function call of a tx is likely to be a call\n /// to the user's account contract, so this quirk will most often be handled by account contract developers.\n ///\n /// # Returns\n /// * `Option<AztecAddress>` - The address of the smart contract that called this function (be it an app contract or\n /// a user's account contract). Returns `Option<AztecAddress>::none` for the first function call of the tx. No\n /// other _private_ function calls in the tx will have a `none` msg_sender, but _public_ function calls might (see\n /// the PublicContext).\n ///\n pub fn msg_sender(self) -> Option<AztecAddress> {\n let maybe_msg_sender = self.context.msg_sender_unsafe();\n if maybe_msg_sender == NULL_MSG_SENDER_CONTRACT_ADDRESS {\n Option::none()\n } else {\n Option::some(maybe_msg_sender)\n }\n }\n\n /// Emits an event privately.\n ///\n /// Unlike public events, private events do not reveal their contents publicly. They instead create an\n /// [EventMessage] containing the private event information, which **MUST** be delivered to a recipient via\n /// [EventMessage::deliver_to] in order for them to learn about the event. Multiple recipients can have the same\n /// message be delivered to them.\n ///\n /// # Example\n /// ```noir\n /// #[event]\n /// struct Transfer { from: AztecAddress, to: AztecAddress, amount: u128 }\n ///\n /// #[external(\"private\")]\n /// fn transfer(to: AztecAddress, amount: u128) {\n /// let from = self.msg_sender().unwrap();\n ///\n /// let message: EventMessage = self.emit(Transfer { from, to, amount });\n /// message.deliver_to(from, MessageDelivery.UNCONSTRAINED_OFFCHAIN);\n /// message.deliver_to(to, MessageDelivery.CONSTRAINED_ONCHAIN);\n /// }\n /// ```\n ///\n /// # Cost\n ///\n /// Private event emission always results in the creation of a nullifer, which acts as a commitment to the event and\n /// is used by third parties to verify its authenticity. See [EventMessage::deliver_to] for the costs associated to\n /// delivery.\n ///\n /// # Privacy\n ///\n /// The nullifier created when emitting a private event leaks nothing about the content of the event - it's a\n /// commitment that includes a random value, so even with full knowledge of the event preimage determining if an\n /// event was emitted or not requires brute-forcing the entire `Field` space.\n pub fn emit<Event>(&mut self, event: Event) -> EventMessage<Event>\n where\n Event: EventInterface + Serialize,\n {\n emit_event_in_private(self.context, event)\n }\n\n /// Makes a call to the private function defined by the `call` parameter.\n ///\n /// # Arguments\n /// * `call` - The object representing the private function to invoke.\n ///\n /// # Returns\n /// * `T` - Whatever data the called function has returned.\n ///\n /// # Example\n /// ```noir\n /// self.call(Token::at(address).transfer_in_private(recipient, amount));\n /// ```\n ///\n /// This enables contracts to interact with each other while maintaining\n /// privacy. This \"composability\" of private contract functions is a key\n /// feature of the Aztec network.\n ///\n /// If a user's transaction includes multiple private function calls, then\n /// by the design of Aztec, the following information will remain private[1]:\n /// - The function selectors and contract addresses of all private function\n /// calls will remain private, so an observer of the public mempool will\n /// not be able to look at a tx and deduce which private functions have\n /// been executed.\n /// - The arguments and return values of all private function calls will\n /// remain private.\n /// - The person who initiated the tx will remain private.\n /// - The notes and nullifiers and private logs that are emitted by all\n /// private function calls will (if designed well) not leak any user\n /// secrets, nor leak which functions have been executed.\n ///\n /// [1] Caveats: Some of these privacy guarantees depend on how app\n /// developers design their smart contracts. Some actions _can_ leak\n /// information, such as:\n /// - Calling an internal public function.\n /// - Calling a public function and not setting msg_sender to Option::none\n /// (see https://github.com/AztecProtocol/aztec-packages/pull/16433)\n /// - Calling any public function will always leak details about the nature\n /// of the transaction, so devs should be careful in their contract\n /// designs. If it can be done in a private function, then that will give\n /// the best privacy.\n /// - Not padding the side-effects of a tx to some standardized, uniform\n /// size. The kernel circuits can take hints to pad side-effects, so a\n /// wallet should be able to request for a particular amount of padding.\n /// Wallets should ideally agree on some standard.\n /// - Padding should include:\n /// - Padding the lengths of note & nullifier arrays\n /// - Padding private logs with random fields, up to some standardized\n /// size.\n /// See also: https://docs.aztec.network/developers/resources/considerations/privacy_considerations\n ///\n /// # Advanced\n /// * The call is added to the private call stack and executed by kernel\n /// circuits after this function completes\n /// * The called function can modify its own contract's private state\n /// * Side effects from the called function are included in this transaction\n /// * The call inherits the current transaction's context and gas limits\n ///\n pub fn call<let M: u32, let N: u32, T>(&mut self, call: PrivateCall<M, N, T>) -> T\n where\n T: Deserialize,\n {\n call.call(self.context)\n }\n\n /// Makes a read-only call to the private function defined by the `call` parameter.\n ///\n /// This is similar to Solidity's `staticcall`. The called function\n /// cannot modify state, emit L2->L1 messages, nor emit events. Any nested\n /// calls are constrained to also be static calls.\n ///\n /// # Arguments\n /// * `call` - The object representing the read-only private function to invoke.\n ///\n /// # Returns\n /// * `T` - Whatever data the called function has returned.\n ///\n /// # Example\n /// ```noir\n /// self.view(Token::at(address).balance_of_private(recipient));\n /// ```\n pub fn view<let M: u32, let N: u32, T>(&mut self, call: PrivateStaticCall<M, N, T>) -> T\n where\n T: Deserialize,\n {\n call.view(self.context)\n }\n\n /// Enqueues a call to the public function defined by the `call` parameter,\n /// to be executed later.\n ///\n /// Unlike private functions which execute immediately on the user's device,\n /// public function calls are \"enqueued\" and executed some time later by a\n /// block proposer.\n ///\n /// This means a public function cannot return any values back to a private\n /// function, because by the time the public function is being executed,\n /// the private function which called it has already completed execution.\n /// (In fact, the private function has been executed and proven, along with\n /// all other private function calls of the user's tx. A single proof of the\n /// tx has been submitted to the Aztec network, and some time later a\n /// proposer has picked the tx up from the mempool and begun executing all\n /// of the enqueued public functions).\n ///\n /// # Privacy warning\n /// Enqueueing a public function call is an inherently leaky action.\n /// Many interesting applications will require some interaction with public\n /// state, but smart contract developers should try to use public function\n /// calls sparingly, and carefully.\n /// _Internal_ public function calls are especially leaky, because they\n /// completely leak which private contract made the call.\n /// See also: https://docs.aztec.network/developers/resources/considerations/privacy_considerations\n ///\n /// # Arguments\n /// * `call` - The interface representing the public function to enqueue.\n pub fn enqueue<let M: u32, let N: u32, T>(&mut self, call: PublicCall<M, N, T>) {\n call.enqueue(self.context)\n }\n\n /// Enqueues a read-only call to the public function defined by the `call` parameter.\n ///\n /// This is similar to Solidity's `staticcall`. The called function\n /// cannot modify state, emit L2->L1 messages, nor emit events. Any nested\n /// calls are constrained to also be static calls.\n ///\n /// # Arguments\n /// * `call` - The object representing the read-only public function to enqueue.\n ///\n /// # Example\n /// ```noir\n /// self.enqueue_view(MyContract::at(address).assert_timestamp_less_than(timestamp));\n /// ```\n pub fn enqueue_view<let M: u32, let N: u32, T>(&mut self, call: PublicStaticCall<M, N, T>) {\n call.enqueue_view(self.context)\n }\n\n /// Enqueues a call to the public function defined by the `call` parameter,\n /// to be executed later.\n ///\n /// As per `enqueue`, but hides this calling contract's address from the\n /// target public function.\n /// This means the origin of the call (msg_sender) will not be publicly\n /// visible to any blockchain observers, nor to the target public function.\n /// When the target public function reads `context.msg_sender()` it will\n /// receive an `Option<AztecAddress>::none`.\n ///\n /// NOTES:\n /// - Not all public functions will accept a msg_sender of \"none\". Many\n /// public functions will require that msg_sender is \"some\" and will\n /// revert otherwise. Therefore, if using `enqueue_incognito`, you must\n /// understand whether the function you're calling will accept a\n /// msg_sender of \"none\".\n /// Lots of public bookkeeping patterns rely on knowing which address made\n /// the call, so as to ascribe state against the caller's address.\n /// (There are patterns whereby bookkeeping could instead be done in\n /// private-land).\n /// - If you are enqueueing a call to an _internal_ public function (i.e.\n /// a public function that will only accept calls from other functions\n /// of its own contract), then by definition a call to it cannot possibly\n /// be \"incognito\": the msg_sender must be its own address, and indeed the\n /// called public function will assert this. Tl;dr this is not usable for\n /// enqueued internal public calls.\n ///\n /// # Arguments\n /// * `call` - The object representing the public function to enqueue.\n ///\n /// # Example\n /// ```noir\n /// self.enqueue_incognito(Token::at(address).increase_total_supply_by(amount));\n /// ```\n ///\n /// Advanced:\n /// - The kernel circuits will permit _any_ private function to set the\n /// msg_sender field of any enqueued public function call to\n /// NULL_MSG_SENDER_CONTRACT_ADDRESS.\n /// - When the called public function calls `PublicContext::msg_sender()`,\n /// aztec-nr will translate NULL_MSG_SENDER_CONTRACT_ADDRESS into\n /// `Option<AztecAddress>::none` for familiarity to devs.\n ///\n pub fn enqueue_incognito<let M: u32, let N: u32, T>(&mut self, call: PublicCall<M, N, T>) {\n call.enqueue_incognito(self.context)\n }\n\n /// Enqueues a read-only call to the public function defined by the `call` parameter.\n ///\n /// As per `enqueue_view`, but hides this calling contract's address from\n /// the target public function.\n ///\n /// See `enqueue_incognito` for more details relating to hiding msg_sender.\n ///\n /// # Arguments\n /// * `call` - The object representing the read-only public function to enqueue.\n ///\n /// # Example\n /// ```noir\n /// self.enqueue_view_incognito(MyContract::at(address).assert_timestamp_less_than(timestamp));\n /// ```\n ///\n pub fn enqueue_view_incognito<let M: u32, let N: u32, T>(\n &mut self,\n call: PublicStaticCall<M, N, T>,\n ) {\n call.enqueue_view_incognito(self.context)\n }\n\n /// Enqueues a call to the public function defined by the `call` parameter,\n /// and designates it to be the teardown function for this tx. Only one teardown\n /// function call can be made by a tx.\n ///\n /// Niche function: Only wallet developers and paymaster contract developers\n /// (aka Fee-payment contracts) will need to make use of this function.\n ///\n /// Aztec supports a three-phase execution model: setup, app logic, teardown.\n /// The phases exist to enable a fee payer to take on the risk of paying\n /// a transaction fee, safe in the knowledge that their payment (in whatever\n /// token or method the user chooses) will succeed, regardless of whether\n /// the app logic will succeed. The \"setup\" phase ensures the fee payer\n /// has sufficient balance to pay the proposer their fees.\n /// The teardown phase is primarily intended to: calculate exactly\n /// how much the user owes, based on gas consumption, and refund the user\n /// any change.\n ///\n /// Note: in some cases, the cost of refunding the user (i.e. DA costs of\n /// tx side-effects) might exceed the refund amount. For app logic with\n /// fairly stable and predictable gas consumption, a material refund amount\n /// is unlikely. For app logic with unpredictable gas consumption, a\n /// refund might be important to the user (e.g. if a hefty function reverts\n /// very early). Wallet/FPC/Paymaster developers should be mindful of this.\n ///\n /// See `enqueue` for more information about enqueuing public function calls.\n ///\n /// # Arguments\n /// * `call` - The object representing the public function to designate as teardown.\n ///\n pub fn set_as_teardown<let M: u32, let N: u32, T>(&mut self, call: PublicCall<M, N, T>) {\n call.set_as_teardown(self.context)\n }\n\n /// Enqueues a call to the public function defined by the `call` parameter,\n /// and designates it to be the teardown function for this tx. Only one teardown\n /// function call can be made by a tx.\n ///\n /// As per `set_as_teardown`, but hides this calling contract's address from\n /// the target public function.\n ///\n /// See `enqueue_incognito` for more details relating to hiding msg_sender.\n ///\n pub fn set_as_teardown_incognito<let M: u32, let N: u32, T>(\n &mut self,\n call: PublicCall<M, N, T>,\n ) {\n call.set_as_teardown_incognito(self.context)\n }\n}\n\n/// Implementation for `ContractSelf` in public execution contexts.\n///\n/// This implementation is used when a contract function is marked with `#[external(\"public\")]`.\n/// Public functions are executed by the sequencer in the Aztec Virtual Machine (AVM) and can work only with public\n/// state.\nimpl<Storage, CallSelf, CallSelfStatic, CallInternal> ContractSelf<PublicContext, Storage, CallSelf, (), CallSelfStatic, (), CallInternal> {\n /// Creates a new `ContractSelf` instance for a public function.\n ///\n /// This constructor is called automatically by the macro system and should not be called directly.\n pub fn new_public(\n context: PublicContext,\n storage: Storage,\n call_self: CallSelf,\n call_self_static: CallSelfStatic,\n internal: CallInternal,\n ) -> Self {\n Self {\n context,\n storage,\n address: context.this_address(),\n call_self,\n enqueue_self: (),\n call_self_static,\n enqueue_self_static: (),\n internal,\n }\n }\n\n /// Returns the contract address that initiated this function call.\n ///\n /// This is similar to `msg.sender` in Solidity (hence the name).\n ///\n /// Important Note: If the calling function is a _private_ function, then it had the option of hiding its address\n /// when enqueuing this public function call. In such cases, this `context.msg_sender()` method will return\n /// `Option<AztecAddress>::none`. If the calling function is a _public_ function, it will always return an\n /// `Option<AztecAddress>::some` (i.e. a non-null value).\n ///\n /// # Returns\n /// * `Option<AztecAddress>` - The address of the smart contract that called this function (be it an app contract or\n /// a user's account contract).\n ///\n /// # Advanced\n /// * Value is provided by the AVM sender opcode\n /// * In nested calls, this is the immediate caller, not the original transaction sender\n ///\n pub fn msg_sender(self: Self) -> Option<AztecAddress> {\n // Safety: AVM opcodes are constrained by the AVM itself\n let maybe_msg_sender = self.context.msg_sender_unsafe();\n if maybe_msg_sender == NULL_MSG_SENDER_CONTRACT_ADDRESS {\n Option::none()\n } else {\n Option::some(maybe_msg_sender)\n }\n }\n\n /// Emits an event publicly.\n ///\n /// Public events are emitted as plaintext and are therefore visible to everyone. This is is the same as Solidity\n /// events on EVM chains.\n ///\n /// Unlike private events, they don't require delivery of an event message.\n ///\n /// # Example\n /// ```noir\n /// #[event]\n /// struct Update { value: Field }\n ///\n /// #[external(\"public\")]\n /// fn publish_update(value: Field) {\n /// self.emit(Update { value });\n /// }\n /// ```\n ///\n /// # Cost\n ///\n /// Public event emission is achieved by emitting public transaction logs. A total of `N+1` fields are emitted,\n /// where `N` is the serialization length of the event.\n pub fn emit<Event>(&mut self, event: Event)\n where\n Event: EventInterface + Serialize,\n {\n emit_event_in_public(self.context, event);\n }\n\n /// Makes the call to the public function defined by the `call` parameter.\n ///\n /// Will revert if the called function reverts or runs out of gas.\n ///\n /// # Arguments\n /// * `call` - The object representing the public function to invoke.\n ///\n /// # Returns\n /// * `T` - Whatever data the called function has returned.\n ///\n /// # Example\n /// ```noir\n /// self.call(Token::at(address).transfer_in_public(recipient, amount));\n /// ```\n ///\n pub unconstrained fn call<let M: u32, let N: u32, T>(self, call: PublicCall<M, N, T>) -> T\n where\n T: Deserialize,\n {\n call.call(self.context)\n }\n\n /// Makes the read-only call to the public function defined by the `call` parameter.\n ///\n /// This is similar to Solidity's `staticcall`. The called function\n /// cannot modify state or emit events. Any nested calls are constrained to\n /// also be static calls.\n ///\n /// Will revert if the called function reverts or runs out of gas.\n ///\n /// # Arguments\n /// * `call` - The object representing the read-only public function to invoke.\n ///\n /// # Returns\n /// * `T` - Whatever data the called function has returned.\n ///\n /// # Example\n /// ```noir\n /// self.view(Token::at(address).balance_of_public(recipient));\n /// ```\n ///\n pub unconstrained fn view<let M: u32, let N: u32, T>(self, call: PublicStaticCall<M, N, T>) -> T\n where\n T: Deserialize,\n {\n call.view(self.context)\n }\n}\n\n/// Implementation for `ContractSelf` in utility execution contexts.\n///\n/// This implementation is used when a contract function is marked with `#[external(\"utility\")]`.\n/// Utility functions are unconstrained functions that can read private state for offchain queries.\n/// They are typically used for view functions that need to access private notes (e.g. a Token's balance_of function).\nimpl<Storage> ContractSelf<UtilityContext, Storage, (), (), (), (), ()> {\n /// Creates a new `ContractSelf` instance for a utility function.\n ///\n /// This constructor is called automatically by the macro system and should not be called directly.\n pub fn new_utility(context: UtilityContext, storage: Storage) -> Self {\n Self {\n context,\n storage,\n address: context.this_address(),\n call_self: (),\n enqueue_self: (),\n call_self_static: (),\n enqueue_self_static: (),\n internal: (),\n }\n }\n}\n"
|
|
3565
3561
|
},
|
|
3566
3562
|
"77": {
|
|
3567
3563
|
"path": "/home/aztec-dev/aztec-packages/noir-projects/aztec-nr/aztec/src/event/event_selector.nr",
|