@aztec/standard-contracts 5.0.0 → 5.0.1
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 +571 -202
- package/artifacts/HandshakeRegistry.json +294 -204
- package/artifacts/MultiCallEntrypoint.json +430 -151
- package/artifacts/PublicChecks.json +504 -135
- package/dest/standard_contract_data.js +15 -15
- package/package.json +3 -3
- package/src/standard_contract_data.ts +15 -15
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"start": 4151
|
|
86
86
|
}
|
|
87
87
|
],
|
|
88
|
-
"path": "/
|
|
88
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/logging.nr",
|
|
89
89
|
"source": "// Not all log levels are currently used, but we provide the full set so that new call sites can use any level. Because\n// of that we tag all with `#[allow(dead_code)]` to prevent warnings.\n//\n// All wrappers resolve function paths at comptime via `resolve_fn` so that the emitted `Quoted` code works both inside\n// aztec-nr (where `crate::` = aztec) and inside macro-generated contract code (where `crate::` = the contract).\n\nuse std::meta::ctstring::AsCtString;\n\ncomptime fn log_prefix<let N: u32>(msg: str<N>) -> CtString {\n \"[aztec-nr] \".as_ctstring().append_str(msg)\n}\n\n// --- No-args variants (direct call) ---\n\n#[allow(dead_code)]\npub(crate) comptime fn aztecnr_fatal_log<let N: u32>(msg: str<N>) -> Quoted {\n let msg = log_prefix(msg);\n let f = resolve_fn(quote { crate::protocol::logging::fatal_log });\n quote { $f($msg) }\n}\n\n#[allow(dead_code)]\npub(crate) comptime fn aztecnr_error_log<let N: u32>(msg: str<N>) -> Quoted {\n let msg = log_prefix(msg);\n let f = resolve_fn(quote { crate::protocol::logging::error_log });\n quote { $f($msg) }\n}\n\n#[allow(dead_code)]\npub(crate) comptime fn aztecnr_warn_log<let N: u32>(msg: str<N>) -> Quoted {\n let msg = log_prefix(msg);\n let f = resolve_fn(quote { crate::protocol::logging::warn_log });\n quote { $f($msg) }\n}\n\n#[allow(dead_code)]\npub(crate) comptime fn aztecnr_info_log<let N: u32>(msg: str<N>) -> Quoted {\n let msg = log_prefix(msg);\n let f = resolve_fn(quote { crate::protocol::logging::info_log });\n quote { $f($msg) }\n}\n\n#[allow(dead_code)]\npub(crate) comptime fn aztecnr_verbose_log<let N: u32>(msg: str<N>) -> Quoted {\n let msg = log_prefix(msg);\n let f = resolve_fn(quote { crate::protocol::logging::verbose_log });\n quote { $f($msg) }\n}\n\n#[allow(dead_code)]\npub(crate) comptime fn aztecnr_debug_log<let N: u32>(msg: str<N>) -> Quoted {\n let msg = log_prefix(msg);\n let f = resolve_fn(quote { crate::protocol::logging::debug_log });\n quote { $f($msg) }\n}\n\n#[allow(dead_code)]\npub(crate) comptime fn aztecnr_trace_log<let N: u32>(msg: str<N>) -> Quoted {\n let msg = log_prefix(msg);\n let f = resolve_fn(quote { crate::protocol::logging::trace_log });\n quote { $f($msg) }\n}\n\n// --- Format variants (return lambda for runtime args) ---\n\n#[allow(dead_code)]\npub(crate) comptime fn aztecnr_fatal_log_format<let N: u32>(msg: str<N>) -> Quoted {\n let msg = log_prefix(msg);\n let f = resolve_fn(quote { crate::protocol::logging::fatal_log_format });\n quote { (|args| $f($msg, args)) }\n}\n\n#[allow(dead_code)]\npub(crate) comptime fn aztecnr_error_log_format<let N: u32>(msg: str<N>) -> Quoted {\n let msg = log_prefix(msg);\n let f = resolve_fn(quote { crate::protocol::logging::error_log_format });\n quote { (|args| $f($msg, args)) }\n}\n\n#[allow(dead_code)]\npub(crate) comptime fn aztecnr_warn_log_format<let N: u32>(msg: str<N>) -> Quoted {\n let msg = log_prefix(msg);\n let f = resolve_fn(quote { crate::protocol::logging::warn_log_format });\n quote { (|args| $f($msg, args)) }\n}\n\n#[allow(dead_code)]\npub(crate) comptime fn aztecnr_info_log_format<let N: u32>(msg: str<N>) -> Quoted {\n let msg = log_prefix(msg);\n let f = resolve_fn(quote { crate::protocol::logging::info_log_format });\n quote { (|args| $f($msg, args)) }\n}\n\n#[allow(dead_code)]\npub(crate) comptime fn aztecnr_verbose_log_format<let N: u32>(msg: str<N>) -> Quoted {\n let msg = log_prefix(msg);\n let f = resolve_fn(quote { crate::protocol::logging::verbose_log_format });\n quote { (|args| $f($msg, args)) }\n}\n\n#[allow(dead_code)]\npub(crate) comptime fn aztecnr_debug_log_format<let N: u32>(msg: str<N>) -> Quoted {\n let msg = log_prefix(msg);\n let f = resolve_fn(quote { crate::protocol::logging::debug_log_format });\n quote { (|args| $f($msg, args)) }\n}\n\n#[allow(dead_code)]\npub(crate) comptime fn aztecnr_trace_log_format<let N: u32>(msg: str<N>) -> Quoted {\n let msg = log_prefix(msg);\n let f = resolve_fn(quote { crate::protocol::logging::trace_log_format });\n quote { (|args| $f($msg, args)) }\n}\n\n// See module-level comment for why this is needed.\ncomptime fn resolve_fn(path: Quoted) -> TypedExpr {\n path.as_expr().unwrap().resolve(Option::none())\n}\n"
|
|
90
90
|
},
|
|
91
91
|
"102": {
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"start": 7724
|
|
104
104
|
}
|
|
105
105
|
],
|
|
106
|
-
"path": "/
|
|
106
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/macros/aztec/compute_note_hash_and_nullifier.nr",
|
|
107
107
|
"source": "use crate::logging;\nuse crate::macros::{notes::NOTES, utils::get_trait_impl_method};\n\n/// Generates two contract library methods called `_compute_note_hash` and `_compute_note_nullifier`, plus a\n/// (deprecated) wrapper called `_compute_note_hash_and_nullifier`, which are used for note discovery (i.e. these are\n/// of the `aztec::messages::discovery::ComputeNoteHash` and `aztec::messages::discovery::ComputeNoteNullifier` types).\npub(crate) comptime fn generate_contract_library_methods_compute_note_hash_and_nullifier() -> Quoted {\n let compute_note_hash = generate_contract_library_method_compute_note_hash();\n let compute_note_nullifier = generate_contract_library_method_compute_note_nullifier();\n\n quote {\n $compute_note_hash\n $compute_note_nullifier\n\n /// Unpacks an array into a note corresponding to `note_type_id` and then computes its note hash (non-siloed) and inner nullifier (non-siloed) assuming the note has been inserted into the note hash tree with `note_nonce`.\n ///\n /// This function is automatically injected by the `#[aztec]` macro.\n #[contract_library_method]\n #[allow(dead_code)]\n unconstrained fn _compute_note_hash_and_nullifier(\n packed_note: BoundedVec<Field, aztec::messages::logs::note::MAX_NOTE_PACKED_LEN>,\n owner: aztec::protocol::address::AztecAddress,\n storage_slot: Field,\n note_type_id: Field,\n contract_address: aztec::protocol::address::AztecAddress,\n randomness: Field,\n note_nonce: Field,\n ) -> Option<aztec::messages::discovery::NoteHashAndNullifier> {\n _compute_note_hash(packed_note, owner, storage_slot, note_type_id, contract_address, randomness).map(|note_hash| {\n\n let siloed_note_hash = aztec::protocol::hash::compute_siloed_note_hash(contract_address, note_hash);\n let unique_note_hash = aztec::protocol::hash::compute_unique_note_hash(note_nonce, siloed_note_hash);\n \n let inner_nullifier = _compute_note_nullifier(unique_note_hash, packed_note, owner, storage_slot, note_type_id, contract_address, randomness);\n\n aztec::messages::discovery::NoteHashAndNullifier {\n note_hash,\n inner_nullifier,\n }\n })\n }\n }\n}\n\ncomptime fn generate_contract_library_method_compute_note_hash() -> Quoted {\n if NOTES.len() == 0 {\n // Contracts with no notes still implement this function to avoid having special-casing, the implementation\n // simply throws immediately.\n quote {\n /// This contract does not use private notes, so this function should never be called as it will unconditionally fail.\n ///\n /// This function is automatically injected by the `#[aztec]` macro.\n #[contract_library_method]\n unconstrained fn _compute_note_hash(\n _packed_note: BoundedVec<Field, aztec::messages::logs::note::MAX_NOTE_PACKED_LEN>,\n _owner: aztec::protocol::address::AztecAddress,\n _storage_slot: Field,\n _note_type_id: Field,\n _contract_address: aztec::protocol::address::AztecAddress,\n _randomness: Field,\n ) -> Option<Field> {\n panic(f\"This contract does not use private notes\")\n }\n }\n } else {\n // Contracts that do define notes produce an if-else chain where `note_type_id` is matched against the\n // `get_note_type_id()` function of each note type that we know of, in order to identify the note type. Once we\n // know it we call the correct `unpack` method from the `Packable` trait to obtain the underlying\n // note type, and compute the note hash (non-siloed).\n\n // We resolve the log format calls here so that the resulting Quoted values can be spliced into the quote\n // block below.\n let warn_length_mismatch = logging::aztecnr_warn_log_format(\n \"Packed note length mismatch for note type id {0}: expected {1} fields, got {2}. Skipping note.\",\n );\n let warn_unknown_note_type = logging::aztecnr_warn_log_format(\"Unknown note type id {0}. Skipping note.\");\n\n let mut if_note_type_id_match_statements_list = @[];\n for i in 0..NOTES.len() {\n let typ = NOTES.get(i);\n\n let get_note_type_id = get_trait_impl_method(\n typ,\n quote { crate::note::note_interface::NoteType },\n quote { get_id },\n );\n let unpack = get_trait_impl_method(\n typ,\n quote { crate::protocol::traits::Packable },\n quote { unpack },\n );\n\n let compute_note_hash = get_trait_impl_method(\n typ,\n quote { crate::note::note_interface::NoteHash },\n quote { compute_note_hash },\n );\n\n let if_or_else_if = if i == 0 {\n quote { if }\n } else {\n quote { else if }\n };\n\n if_note_type_id_match_statements_list = if_note_type_id_match_statements_list.push_back(\n quote {\n $if_or_else_if note_type_id == $get_note_type_id() {\n // As an extra safety check we make sure that the packed_note BoundedVec has the expected\n // length, since we're about to interpret its raw storage as a fixed-size array by calling the\n // unpack function on it.\n let expected_len = <$typ as $crate::protocol::traits::Packable>::N;\n let actual_len = packed_note.len();\n if actual_len != expected_len {\n $warn_length_mismatch([note_type_id, expected_len as Field, actual_len as Field]);\n Option::none()\n } else {\n let note = $unpack(aztec::utils::array::subarray(packed_note.storage(), 0));\n\n Option::some($compute_note_hash(note, owner, storage_slot, randomness))\n }\n }\n },\n );\n }\n\n let if_note_type_id_match_statements = if_note_type_id_match_statements_list.join(quote {});\n\n quote {\n /// Unpacks an array into a note corresponding to `note_type_id` and then computes its note hash\n /// (non-siloed).\n ///\n /// The signature of this function notably matches the `aztec::messages::discovery::ComputeNoteHash` type,\n /// and so it can be used to call functions from that module such as `do_sync_state` and\n /// `process_private_note_msg`.\n ///\n /// This function is automatically injected by the `#[aztec]` macro.\n #[contract_library_method]\n unconstrained fn _compute_note_hash(\n packed_note: BoundedVec<Field, aztec::messages::logs::note::MAX_NOTE_PACKED_LEN>,\n owner: aztec::protocol::address::AztecAddress,\n storage_slot: Field,\n note_type_id: Field,\n _contract_address: aztec::protocol::address::AztecAddress,\n randomness: Field,\n ) -> Option<Field> {\n $if_note_type_id_match_statements\n else {\n $warn_unknown_note_type([note_type_id]);\n Option::none()\n }\n }\n }\n }\n}\n\ncomptime fn generate_contract_library_method_compute_note_nullifier() -> Quoted {\n if NOTES.len() == 0 {\n // Contracts with no notes still implement this function to avoid having special-casing, the implementation\n // simply throws immediately.\n quote {\n /// This contract does not use private notes, so this function should never be called as it will unconditionally fail.\n ///\n /// This function is automatically injected by the `#[aztec]` macro.\n #[contract_library_method]\n unconstrained fn _compute_note_nullifier(\n _unique_note_hash: Field,\n _packed_note: BoundedVec<Field, aztec::messages::logs::note::MAX_NOTE_PACKED_LEN>,\n _owner: aztec::protocol::address::AztecAddress,\n _storage_slot: Field,\n _note_type_id: Field,\n _contract_address: aztec::protocol::address::AztecAddress,\n _randomness: Field,\n ) -> Option<Field> {\n panic(f\"This contract does not use private notes\")\n }\n }\n } else {\n // Contracts that do define notes produce an if-else chain where `note_type_id` is matched against the\n // `get_note_type_id()` function of each note type that we know of, in order to identify the note type. Once we\n // know it we call the correct `unpack` method from the `Packable` trait to obtain the underlying\n // note type, and compute the inner nullifier (non-siloed).\n\n // We resolve the log format calls here so that the resulting Quoted values can be spliced into the quote\n // block below.\n let warn_length_mismatch = logging::aztecnr_warn_log_format(\n \"Packed note length mismatch for note type id {0}: expected {1} fields, got {2}. Skipping note.\",\n );\n let warn_unknown_note_type = logging::aztecnr_warn_log_format(\"Unknown note type id {0}. Skipping note.\");\n\n let mut if_note_type_id_match_statements_list = @[];\n for i in 0..NOTES.len() {\n let typ = NOTES.get(i);\n\n let get_note_type_id = get_trait_impl_method(\n typ,\n quote { crate::note::note_interface::NoteType },\n quote { get_id },\n );\n let unpack = get_trait_impl_method(\n typ,\n quote { crate::protocol::traits::Packable },\n quote { unpack },\n );\n\n let compute_nullifier_unconstrained = get_trait_impl_method(\n typ,\n quote { crate::note::note_interface::NoteHash },\n quote { compute_nullifier_unconstrained },\n );\n\n let if_or_else_if = if i == 0 {\n quote { if }\n } else {\n quote { else if }\n };\n\n if_note_type_id_match_statements_list = if_note_type_id_match_statements_list.push_back(\n quote {\n $if_or_else_if note_type_id == $get_note_type_id() {\n // As an extra safety check we make sure that the packed_note BoundedVec has the expected\n // length, since we're about to interpret its raw storage as a fixed-size array by calling the\n // unpack function on it.\n let expected_len = <$typ as $crate::protocol::traits::Packable>::N;\n let actual_len = packed_note.len();\n if actual_len != expected_len {\n $warn_length_mismatch([note_type_id, expected_len as Field, actual_len as Field]);\n Option::none()\n } else {\n let note = $unpack(aztec::utils::array::subarray(packed_note.storage(), 0));\n\n // The message discovery process finds settled notes, that is, notes that were created in\n // prior transactions and are therefore already part of the note hash tree. The note hash\n // for nullification is hence the unique note hash.\n $compute_nullifier_unconstrained(note, owner, unique_note_hash)\n }\n }\n },\n );\n }\n\n let if_note_type_id_match_statements = if_note_type_id_match_statements_list.join(quote {});\n\n quote {\n /// Computes a note's inner nullifier (non-siloed) given its unique note hash, preimage and extra data.\n ///\n /// The signature of this function notably matches the `aztec::messages::discovery::ComputeNoteNullifier`\n /// type, and so it can be used to call functions from that module such as `do_sync_state` and\n /// `process_private_note_msg`.\n ///\n /// This function is automatically injected by the `#[aztec]` macro.\n #[contract_library_method]\n unconstrained fn _compute_note_nullifier(\n unique_note_hash: Field,\n packed_note: BoundedVec<Field, aztec::messages::logs::note::MAX_NOTE_PACKED_LEN>,\n owner: aztec::protocol::address::AztecAddress,\n _storage_slot: Field,\n note_type_id: Field,\n _contract_address: aztec::protocol::address::AztecAddress,\n _randomness: Field,\n ) -> Option<Field> {\n $if_note_type_id_match_statements\n else {\n $warn_unknown_note_type([note_type_id]);\n Option::none()\n }\n }\n }\n }\n}\n"
|
|
108
108
|
},
|
|
109
109
|
"103": {
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"start": 12880
|
|
142
142
|
}
|
|
143
143
|
],
|
|
144
|
-
"path": "/
|
|
144
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/macros/aztec.nr",
|
|
145
145
|
"source": "mod compute_note_hash_and_nullifier;\n\nuse crate::{\n macros::{\n calls_generation::{\n external_functions::{generate_external_function_calls, generate_external_function_self_calls_structs},\n internal_functions::generate_call_internal_struct,\n },\n dispatch::generate_public_dispatch,\n emit_public_init_nullifier::generate_emit_public_init_nullifier,\n internals_functions_generation::{create_fn_abi_exports, process_functions},\n offchain_receive::{\n OFFCHAIN_RECEIVE_FN_NAME, OFFCHAIN_RECEIVE_PARAM_NAME, offchain_receive_param_type,\n OFFCHAIN_RECEIVE_RETURN_TYPE,\n },\n storage::STORAGE_LAYOUT_NAME,\n utils::{is_fn_contract_library_method, is_fn_external, is_fn_internal, is_fn_test, module_has_storage},\n },\n messages::discovery::{CustomMessageHandler, CustomSyncHandler},\n};\n\nuse compute_note_hash_and_nullifier::generate_contract_library_methods_compute_note_hash_and_nullifier;\n\n/// Configuration for the [`aztec`] macro.\n///\n/// This type lets users override different parts of the default aztec-nr contract behavior, such\n/// as message handling and state synchronization. These are advanced features that require careful\n/// understanding of the behavior of these systems.\n///\n/// ## Examples\n///\n/// ```noir\n/// #[aztec(aztec::macros::AztecConfig::new().custom_message_handler(my_handler))]\n/// contract MyContract { ... }\n/// ```\npub struct AztecConfig {\n custom_message_handler: Option<CustomMessageHandler>,\n custom_sync_state: Option<CustomSyncHandler>,\n}\n\nimpl AztecConfig {\n /// Creates a new `AztecConfig` with default values.\n ///\n /// Calling `new` is equivalent to invoking the [`aztec`] macro with no parameters. The different methods\n /// (e.g. [`AztecConfig::custom_message_handler`]) can then be used to change the default behavior.\n pub comptime fn new() -> Self {\n Self { custom_message_handler: Option::none(), custom_sync_state: Option::none() }\n }\n\n /// Sets a handler for custom messages.\n ///\n /// This enables contracts to process non-standard messages (i.e. any with a message type that is not in\n /// [`crate::messages::msg_type`]).\n ///\n /// `handler` must be a function that conforms to the\n /// [`crate::messages::discovery::CustomMessageHandler`] type signature.\n pub comptime fn custom_message_handler(&mut self, handler: CustomMessageHandler) -> Self {\n self.custom_message_handler = Option::some(handler);\n *self\n }\n\n /// Overrides the default state synchronization logic.\n ///\n /// The generated `sync_state` function will call `handler` instead of\n /// [`crate::messages::discovery::do_sync_state`]. The handler receives all of the same parameters, so it can\n /// run custom logic (e.g. fetching and decrypting custom logs) before, after, or instead of calling\n /// `do_sync_state`.\n ///\n /// `handler` must be a function that conforms to the\n /// [`crate::messages::discovery::CustomSyncHandler`] type signature.\n pub comptime fn custom_sync_state(&mut self, handler: CustomSyncHandler) -> Self {\n self.custom_sync_state = Option::some(handler);\n *self\n }\n}\n\n/// Enables aztec-nr features on a `contract`.\n///\n/// All aztec-nr contracts should have this macro invoked on them, as it is the one that processes all contract\n/// functions, notes, storage, generates interfaces for external calls, and creates the message processing\n/// boilerplate.\n///\n/// ## Examples\n///\n/// Most contracts can simply invoke the macro with no parameters, resulting in default aztec-nr behavior:\n/// ```noir\n/// #[aztec]\n/// contract MyContract { ... }\n/// ```\n///\n/// Advanced contracts can use [`AztecConfig`] to customize parts of its behavior, such as message\n/// processing.\n/// ```noir\n/// #[aztec(aztec::macros::AztecConfig::new().custom_message_handler(my_handler))]\n/// contract MyAdvancedContract { ... }\n/// ```\n#[varargs]\npub comptime fn aztec(m: Module, args: [AztecConfig]) -> Quoted {\n let num_args = args.len();\n let config = if num_args == 0 {\n AztecConfig::new()\n } else if num_args == 1 {\n args[0]\n } else {\n panic(f\"#[aztec] expects 0 or 1 arguments, got {num_args}\")\n };\n\n // Functions that don't have #[external(...)], #[contract_library_method], or #[test] are not allowed in contracts.\n check_each_fn_macroified(m);\n\n // We generate new functions prefixed with `__aztec_nr_internals__` and we replace the original functions' bodies\n // with `static_assert(false, ...)` to prevent them from being called directly from within the contract.\n let functions = process_functions(m);\n\n // We generate structs and their implementations necessary for convenient functions calls.\n let interface = generate_contract_interface(m);\n let self_call_structs = generate_external_function_self_calls_structs(m);\n let call_internal_struct = generate_call_internal_struct(m);\n\n // We generate ABI exports for all the external functions in the contract.\n let fn_abi_exports = create_fn_abi_exports(m);\n\n // We generate `_compute_note_hash`, `_compute_note_nullifier` (and the deprecated\n // `_compute_note_hash_and_nullifier` wrapper) only if they are not already implemented.\n // If they are implemented we just insert empty quotes.\n let contract_library_method_compute_note_hash_and_nullifier = if !m.functions().any(|f| {\n // Note that we don't test for `_compute_note_hash` or `_compute_note_nullifier` in order to make this simpler\n // - users must either implement all three or none.\n // Down the line we'll remove this check and use `AztecConfig`.\n f.name() == quote { _compute_note_hash_and_nullifier }\n }) {\n generate_contract_library_methods_compute_note_hash_and_nullifier()\n } else {\n quote {}\n };\n let process_custom_message_option = if config.custom_message_handler.is_some() {\n let handler = config.custom_message_handler.unwrap();\n quote { Option::some($handler) }\n } else {\n quote { Option::<aztec::messages::discovery::CustomMessageHandler>::none() }\n };\n\n let offchain_inbox_sync_option = quote {\n Option::some(aztec::messages::processing::offchain::sync_inbox)\n };\n\n if m.functions().any(|f| f.name() == quote { sync_state }) {\n panic(\n \"User-defined 'sync_state' is not allowed. Use AztecConfig::custom_sync_state() to customize sync behavior.\",\n );\n }\n\n let custom_sync_handler = if config.custom_sync_state.is_some() {\n let handler = config.custom_sync_state.unwrap();\n Option::some(quote { $handler })\n } else {\n Option::none()\n };\n\n let sync_state_fn_and_abi_export = generate_sync_state(\n process_custom_message_option,\n offchain_inbox_sync_option,\n custom_sync_handler,\n );\n\n if m.functions().any(|f| f.name() == quote { offchain_receive }) {\n panic(\n \"User-defined 'offchain_receive' is not allowed. The function is auto-injected by the #[aztec] macro. See https://docs.aztec.network/errors/7\",\n );\n }\n let offchain_receive_fn_and_abi_export = generate_offchain_receive();\n\n let (has_public_init_nullifier_fn, emit_public_init_nullifier_fn_body) = generate_emit_public_init_nullifier(m);\n let public_dispatch = generate_public_dispatch(m, has_public_init_nullifier_fn);\n\n quote {\n $interface\n $self_call_structs\n $call_internal_struct\n $functions\n $fn_abi_exports\n $contract_library_method_compute_note_hash_and_nullifier\n $public_dispatch\n $sync_state_fn_and_abi_export\n $emit_public_init_nullifier_fn_body\n $offchain_receive_fn_and_abi_export\n }\n}\n\ncomptime fn generate_contract_interface(m: Module) -> Quoted {\n let calls = generate_external_function_calls(m);\n\n let module_name = m.name();\n\n let has_storage_layout = module_has_storage(m) & STORAGE_LAYOUT_NAME.get(m).is_some();\n let storage_layout_getter = if has_storage_layout {\n let storage_layout_name = STORAGE_LAYOUT_NAME.get(m).unwrap();\n quote {\n pub fn storage_layout() -> StorageLayoutFields {\n $storage_layout_name.fields\n }\n }\n } else {\n quote {}\n };\n\n let library_storage_layout_getter = if has_storage_layout {\n quote {\n #[contract_library_method]\n $storage_layout_getter\n }\n } else {\n quote {}\n };\n\n quote {\n pub struct $module_name {\n pub target_contract: aztec::protocol::address::AztecAddress\n }\n\n impl $module_name {\n $calls\n\n pub fn at(\n addr: aztec::protocol::address::AztecAddress\n ) -> Self {\n Self { target_contract: addr }\n }\n\n pub fn interface() -> Self {\n Self { target_contract: aztec::protocol::address::AztecAddress::zero() }\n }\n\n $storage_layout_getter\n }\n\n #[contract_library_method]\n pub fn at(\n addr: aztec::protocol::address::AztecAddress\n ) -> $module_name {\n $module_name { target_contract: addr }\n }\n\n #[contract_library_method]\n pub fn interface() -> $module_name {\n $module_name { target_contract: aztec::protocol::address::AztecAddress::zero() }\n }\n\n $library_storage_layout_getter\n\n }\n}\n\n/// Generates the `sync_state` utility function that performs message discovery.\ncomptime fn generate_sync_state(\n process_custom_message_option: Quoted,\n offchain_inbox_sync_option: Quoted,\n custom_sync_handler: Option<Quoted>,\n) -> Quoted {\n let body = if custom_sync_handler.is_some() {\n let handler = custom_sync_handler.unwrap();\n quote {\n $handler(\n address,\n _compute_note_hash,\n _compute_note_nullifier,\n $process_custom_message_option,\n $offchain_inbox_sync_option,\n scope,\n );\n }\n } else {\n quote {\n aztec::messages::discovery::do_sync_state(\n address,\n _compute_note_hash,\n _compute_note_nullifier,\n $process_custom_message_option,\n $offchain_inbox_sync_option,\n scope,\n );\n }\n };\n\n quote {\n pub struct sync_state_parameters {\n pub scope: aztec::protocol::address::AztecAddress,\n }\n\n #[abi(functions)]\n pub struct sync_state_abi {\n parameters: sync_state_parameters,\n }\n\n #[aztec::macros::internals_functions_generation::abi_attributes::abi_utility]\n unconstrained fn sync_state(scope: aztec::protocol::address::AztecAddress) {\n let address = aztec::context::UtilityContext::new().this_address();\n $body\n }\n }\n}\n\n/// Generates an `offchain_receive` utility function that lets callers add messages to the offchain message inbox.\n///\n/// For more details, see `aztec::messages::processing::offchain::receive`.\ncomptime fn generate_offchain_receive() -> Quoted {\n let param_type = offchain_receive_param_type(quote { aztec });\n let parameters_struct_name = f\"{OFFCHAIN_RECEIVE_FN_NAME}_parameters\".quoted_contents();\n let abi_struct_name = f\"{OFFCHAIN_RECEIVE_FN_NAME}_abi\".quoted_contents();\n\n quote {\n pub struct $parameters_struct_name {\n pub $OFFCHAIN_RECEIVE_PARAM_NAME: $param_type,\n }\n\n #[abi(functions)]\n pub struct $abi_struct_name {\n parameters: $parameters_struct_name,\n }\n\n /// Receives offchain messages into this contract's offchain inbox for subsequent processing.\n ///\n /// Each message is routed to the inbox scoped to its `recipient` field.\n ///\n /// For more details, see `aztec::messages::processing::offchain::receive`.\n ///\n /// This function is automatically injected by the `#[aztec]` macro.\n #[aztec::macros::internals_functions_generation::abi_attributes::abi_utility]\n unconstrained fn $OFFCHAIN_RECEIVE_FN_NAME($OFFCHAIN_RECEIVE_PARAM_NAME: $param_type) -> $OFFCHAIN_RECEIVE_RETURN_TYPE {\n let address = aztec::context::UtilityContext::new().this_address();\n aztec::messages::processing::offchain::receive(address, $OFFCHAIN_RECEIVE_PARAM_NAME);\n }\n }\n}\n\n/// Checks that all functions in the module have a context macro applied.\n///\n/// Non-macroified functions are not allowed in contracts. They must all be one of\n/// [`crate::macros::functions::external`], [`crate::macros::functions::internal`] or `test`.\ncomptime fn check_each_fn_macroified(m: Module) {\n for f in m.functions() {\n let name = f.name();\n if !is_fn_external(f) & !is_fn_contract_library_method(f) & !is_fn_internal(f) & !is_fn_test(f) {\n // We don't suggest that #[contract_library_method] is allowed because we don't want to introduce another\n // concept\n panic(\n f\"Function {name} must be marked as either #[external(...)], #[internal(...)], or #[test]\",\n );\n }\n }\n}\n"
|
|
146
146
|
},
|
|
147
147
|
"105": {
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
"start": 13610
|
|
204
204
|
}
|
|
205
205
|
],
|
|
206
|
-
"path": "/
|
|
206
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/macros/calls_generation/external_functions_stubs.nr",
|
|
207
207
|
"source": "//! Stubs are auto-generated wrapper functions that provide an ergonomic interface for cross-contract calls. ! Instead\n// of manually serializing arguments and creating call interfaces, stubs allow natural syntax, e.g. for ! enqueuing\n// calls to public functions: ! ! ExternalContract.at(address).some_method(arg1, arg2).enqueue()\n\nuse crate::macros::utils::compute_fn_selector;\nuse crate::protocol::meta::utils::derive_serialization_quotes;\nuse std::meta::unquote;\n\ncomptime global FROM_FIELD: TypedExpr = {\n let from_field_trait = quote { crate::protocol::traits::FromField }.as_trait_constraint();\n let function_selector_typ = quote { crate::protocol::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(f: FunctionDefinition) -> (Quoted, Quoted, Quoted, Quoted, u32, Quoted, u32, Field) {\n // Dear privacy adventurer, chances are, you've command+clicked on the name of an external function call -- seeking\n // to view that function -- only to end up here. Here's an explanation: The external contract that you're calling\n // was likely annotated with the `#[aztec]` annotation -- as all good aztec contracts are. This triggers a macro\n // which generates a \"contract interface\" for that contract, which is effectively a pretty interface that gives\n // 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. To actually view the target function, you\n // could instead command+click on `MyImportedContract`, or you can just manually search it. If you want to view the\n // noir code that gets generated by this macro, you can use `nargo expand` on your contract.\n create_stub_base_from_parts(f.name(), f.parameters())\n}\n\n/// Variant of `create_stub_base` that takes raw `(name, parameters)` instead of a `FunctionDefinition`.\n///\n/// This lets macro-injected functions (e.g. `offchain_receive`) reuse the stub-generation machinery without needing a\n/// `FunctionDefinition`.\npub(crate) comptime fn create_stub_base_from_parts(\n fn_name: Quoted,\n fn_parameters: [(Quoted, Type)],\n) -> (Quoted, Quoted, Quoted, Quoted, u32, Quoted, u32, Field) {\n let fn_parameters_list = 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 = unquote!(quote { ($serialized_args_array_len_quote) as u32 });\n\n let fn_name_str = f\"\\\"{fn_name}\\\"\".quoted_contents();\n let fn_name_len: u32 = unquote!(quote { $fn_name_str.as_bytes().len() });\n let fn_selector: Field = compute_fn_selector(fn_name, fn_parameters);\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) -> 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 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) -> 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 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) -> 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 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) -> 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 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 create_utility_stub_from_parts(f.name(), f.parameters(), f.return_type())\n}\n\n/// Variant of `create_utility_stub` that takes raw `(name, parameters, return_type)` instead of `FunctionDefinition`.\npub(crate) comptime fn create_utility_stub_from_parts(\n fn_name: Quoted,\n fn_parameters: [(Quoted, Type)],\n fn_return_type: Type,\n) -> 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_from_parts(fn_name, fn_parameters);\n\n quote {\n pub fn $fn_name(self, $fn_parameters_list) -> 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 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. Unlike\n// the stubs above, the self-call stubs directly perform the call instead of returning a struct that can be later used\n// 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 an\n // 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 an\n // 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\n/// 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::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 calling a utility function on the same contract (for CallSelfUtility).\npub comptime fn create_utility_self_call_stub(f: FunctionDefinition) -> 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 unconstrained fn $fn_name(self, $fn_parameters_list) -> $fn_return_type {\n $serialized_args_array_construction\n let selector = $FROM_FIELD($fn_selector);\n let returns = aztec::oracle::call_utility_function::call_utility_function(\n self.address, selector, $serialized_args_array_name,\n );\n aztec::protocol::traits::Deserialize::deserialize(returns)\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::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"
|
|
208
208
|
},
|
|
209
209
|
"108": {
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
"start": 12254
|
|
234
234
|
}
|
|
235
235
|
],
|
|
236
|
-
"path": "/
|
|
236
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/macros/dispatch.nr",
|
|
237
237
|
"source": "use crate::macros::internals_functions_generation::external_functions_registry::get_public_functions;\nuse crate::protocol::meta::utils::get_params_len_quote;\nuse crate::utils::cmap::CHashMap;\nuse super::functions::initialization_utils::EMIT_PUBLIC_INIT_NULLIFIER_FN_NAME;\nuse super::utils::compute_fn_selector;\nuse std::panic;\n\n/// Minimum number of public functions that must share a parameter-type signature before we extract a shared\n/// unpack helper. See [compute_unpack_prelude] for the rationale behind the chosen value.\nglobal EXTRACTION_THRESHOLD: u32 = 4;\n\n/// Generates a `public_dispatch` function for an Aztec contract module `m`.\n///\n/// The generated function dispatches public calls based on selector to the appropriate contract function. If\n/// `generate_emit_public_init_nullifier` is true, it also handles dispatch to the macro-generated\n/// `__emit_public_init_nullifier` function.\n///\n/// Alongside `public_dispatch`, this also emits one `__aztec_nr_internals__unpack_arguments_<N>` helper per\n/// parameter-type signature shared by enough public functions; see [compute_unpack_prelude] for the extraction\n/// criterion.\npub comptime fn generate_public_dispatch(m: Module, generate_emit_public_init_nullifier: bool) -> Quoted {\n let functions = get_public_functions(m);\n\n let unit = get_type::<()>();\n\n // Count how many public functions share each parameter-type signature, so we can decide which signatures are\n // worth extracting into helpers.\n let signature_counts = &mut CHashMap::<Quoted, u32>::new();\n for function in functions {\n let parameters = function.parameters();\n if parameters.len() != 0 {\n let key = signature_key(parameters);\n let prior = signature_counts.get(key).unwrap_or(0);\n signature_counts.insert(key, prior + 1);\n }\n }\n\n let seen_selectors = &mut CHashMap::<Field, Quoted>::new();\n let signature_to_helper_idx = &mut CHashMap::<Quoted, u32>::new();\n // The helper function definitions, in the order they were created.\n let unpack_helpers: &mut [Quoted] = &mut @[];\n\n let mut ifs = functions.map(|function: FunctionDefinition| {\n let parameters = function.parameters();\n let return_type = function.return_type();\n\n let fn_name = function.name();\n let selector: Field = compute_fn_selector(fn_name, parameters);\n\n // Since function selectors are computed as the first 4 bytes of the hash of the function signature, it's\n // possible to have collisions. With the following check, we ensure it doesn't happen within the same contract.\n let existing_fn = seen_selectors.get(selector);\n if existing_fn.is_some() {\n let existing_fn = existing_fn.unwrap();\n panic(\n f\"Public function selector collision detected between functions '{fn_name}' and '{existing_fn}'\",\n );\n }\n seen_selectors.insert(selector, fn_name);\n\n let (unpack_prelude, call_args) = compute_unpack_prelude(\n parameters,\n signature_counts,\n signature_to_helper_idx,\n unpack_helpers,\n );\n\n // We call a function whose name is prefixed with `__aztec_nr_internals__`. This is necessary because the\n // original function is intentionally made uncallable, preventing direct invocation within the contract.\n // Instead, a new function with the same name, but prefixed by `__aztec_nr_internals__`, has been generated to\n // be called here. For more details see the `process_functions` function.\n let name = f\"__aztec_nr_internals__{fn_name}\".quoted_contents();\n let call = quote { $name($call_args) };\n\n let return_code = if return_type == unit {\n quote {\n $call;\n // Force early return.\n aztec::oracle::avm::avm_return([]);\n }\n } else {\n quote {\n let return_value = aztec::protocol::traits::Serialize::serialize($call);\n aztec::oracle::avm::avm_return(return_value.as_vector());\n }\n };\n\n let if_ = quote {\n if selector == $selector {\n $unpack_prelude\n $return_code\n }\n };\n if_\n });\n\n // If we injected the auto-generated public function to emit the public initialization nullifier, then\n // we'll also need to handle its dispatch.\n if generate_emit_public_init_nullifier {\n let name = EMIT_PUBLIC_INIT_NULLIFIER_FN_NAME;\n let init_nullifier_selector: Field = compute_fn_selector(name, @[]);\n\n ifs = ifs.push_back(\n quote {\n if selector == $init_nullifier_selector {\n $name();\n aztec::oracle::avm::avm_return([]);\n }\n },\n );\n }\n\n if ifs.len() == 0 {\n // No dispatch function if there are no public functions\n quote {}\n } else {\n let ifs = ifs.push_back(quote { panic(f\"Unknown selector {selector}\") });\n let dispatch = ifs.join(quote { });\n\n let helpers = (*unpack_helpers).join(quote { });\n\n let body = quote {\n $helpers\n\n // We mark this as public because our whole system depends on public functions having this attribute.\n #[aztec::macros::internals_functions_generation::abi_attributes::abi_public]\n pub unconstrained fn public_dispatch(selector: Field) {\n $dispatch\n }\n };\n\n body\n }\n}\n\n/// Canonical Quoted representation of a parameter list's types, used as the deduplication key for unpack helpers.\ncomptime fn signature_key(parameters: [(Quoted, Type)]) -> Quoted {\n parameters\n .map(|param: (Quoted, Type)| {\n let param_type = param.1;\n quote { $param_type }\n })\n .join(quote { , })\n}\n\n/// Builds the dispatch-arm prelude for a public function and the comma-separated arg list to pass through to the call.\n///\n/// If the function's signature reaches `EXTRACTION_THRESHOLD`, the prelude reuses (or creates) a shared\n/// `__aztec_nr_internals__unpack_arguments_<N>` helper. Otherwise the calldata read is inlined, matching the\n/// pre-extraction shape; this avoids paying the helper-call overhead on signatures that would not benefit from the\n/// shared body.\n///\n/// The real break-even depends on the size of the inlined boilerplate at each call site (which scales with the\n/// parameter types' `stream_deserialize` cost), not just the share count: a signature with one `Field` arg inlines\n/// to a few opcodes per site, while a signature like `(AztecAddress, U128, PartialUintNote)` inlines into many. For\n/// now we approximate that with a single share-count threshold, which is the simplest knob that keeps the macro\n/// readable. If we ever want to be more precise we can size each helper against its per-site savings.\ncomptime fn compute_unpack_prelude(\n parameters: [(Quoted, Type)],\n signature_counts: &mut CHashMap<Quoted, u32>,\n signature_to_helper_idx: &mut CHashMap<Quoted, u32>,\n unpack_helpers: &mut [Quoted],\n) -> (Quoted, Quoted) {\n if parameters.len() == 0 {\n (quote {}, quote {})\n } else {\n let sig_key = signature_key(parameters);\n let count = signature_counts.get(sig_key).unwrap_or(0);\n let shared = count >= EXTRACTION_THRESHOLD;\n\n let mut arg_names: [Quoted] = @[];\n for parameter_index in 0..parameters.len() {\n let arg_name = f\"arg{parameter_index}\".quoted_contents();\n arg_names = arg_names.push_back(arg_name);\n }\n let args = arg_names.join(quote { , });\n\n let prelude = if shared {\n let existing_idx = signature_to_helper_idx.get(sig_key);\n let helper_idx = if existing_idx.is_some() {\n existing_idx.unwrap()\n } else {\n let new_idx = (*unpack_helpers).len();\n signature_to_helper_idx.insert(sig_key, new_idx);\n let helper_def = build_unpack_helper(new_idx, parameters);\n *unpack_helpers = (*unpack_helpers).push_back(helper_def);\n new_idx\n };\n let helper_name = f\"__aztec_nr_internals__unpack_arguments_{helper_idx}\".quoted_contents();\n if parameters.len() == 1 {\n quote { let arg0 = $helper_name(); }\n } else {\n quote { let ($args) = $helper_name(); }\n }\n } else {\n inline_unpack(parameters)\n };\n\n (prelude, args)\n }\n}\n\n/// Inlined calldata read + per-parameter `stream_deserialize` for signatures that are not worth extracting.\ncomptime fn inline_unpack(parameters: [(Quoted, Type)]) -> Quoted {\n let params_len_quote = get_params_len_quote(parameters);\n let initial_read = quote {\n let input_calldata: [Field; $params_len_quote] = aztec::oracle::avm::calldata_copy(1, $params_len_quote);\n let mut reader = aztec::protocol::utils::reader::Reader::new(input_calldata);\n };\n\n let mut read_quotes: [Quoted] = @[];\n for parameter_index in 0..parameters.len() {\n let arg_name = f\"arg{parameter_index}\".quoted_contents();\n let param_type = parameters[parameter_index].1;\n read_quotes = read_quotes.push_back(\n quote {\n let $arg_name: $param_type = aztec::protocol::traits::Deserialize::stream_deserialize(&mut reader);\n },\n );\n }\n let reads = read_quotes.join(quote { });\n\n quote {\n $initial_read\n $reads\n }\n}\n\n/// Emits the `#[inline_never]` helper that reads calldata for one specific parameter-type signature.\n///\n/// Returns a single value when there is only one parameter, and a tuple when there are several. Marked\n/// `#[inline_never]` (and therefore `unconstrained`) so each entry point can call into the same compiled body.\ncomptime fn build_unpack_helper(idx: u32, parameters: [(Quoted, Type)]) -> Quoted {\n let helper_name = f\"__aztec_nr_internals__unpack_arguments_{idx}\".quoted_contents();\n let params_len_quote = get_params_len_quote(parameters);\n\n // The initial calldata_copy offset is 1 to skip the Field selector. The expected calldata is the serialization\n // of:\n // - FunctionSelector: the selector of the function intended to dispatch\n // - Parameters: the parameters of the function intended to dispatch\n // That is, exactly what is expected for a call to the target function, but with a selector added at the\n // beginning.\n let initial_read = quote {\n let input_calldata: [Field; $params_len_quote] = aztec::oracle::avm::calldata_copy(1, $params_len_quote);\n let mut reader = aztec::protocol::utils::reader::Reader::new(input_calldata);\n };\n\n let mut read_quotes: [Quoted] = @[];\n let mut arg_quotes: [Quoted] = @[];\n let mut type_quotes: [Quoted] = @[];\n for parameter_index in 0..parameters.len() {\n let arg_name = f\"arg{parameter_index}\".quoted_contents();\n let param_type = parameters[parameter_index].1;\n read_quotes = read_quotes.push_back(\n quote {\n let $arg_name: $param_type = aztec::protocol::traits::Deserialize::stream_deserialize(&mut reader);\n },\n );\n arg_quotes = arg_quotes.push_back(arg_name);\n type_quotes = type_quotes.push_back(quote { $param_type });\n }\n let reads = read_quotes.join(quote { });\n let return_args = arg_quotes.join(quote { , });\n\n if parameters.len() == 1 {\n let only_type = parameters[0].1;\n quote {\n #[inline_never]\n #[contract_library_method]\n unconstrained fn $helper_name() -> $only_type {\n $initial_read\n $reads\n arg0\n }\n }\n } else {\n let return_types = type_quotes.join(quote { , });\n quote {\n #[inline_never]\n #[contract_library_method]\n unconstrained fn $helper_name() -> ($return_types) {\n $initial_read\n $reads\n ($return_args)\n }\n }\n }\n}\n\ncomptime fn get_type<T>() -> Type {\n let t: T = std::mem::zeroed();\n std::meta::type_of(t)\n}\n"
|
|
238
238
|
},
|
|
239
239
|
"118": {
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
"start": 579
|
|
244
244
|
}
|
|
245
245
|
],
|
|
246
|
-
"path": "/
|
|
246
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/macros/internals_functions_generation/external/private.nr",
|
|
247
247
|
"source": "use crate::macros::{\n functions::initialization_utils::has_public_init_checked_functions,\n internals_functions_generation::external::helpers::{create_authorize_once_check, get_abi_relevant_attributes},\n utils::{\n fn_has_allow_phase_change, fn_has_authorize_once, fn_has_noinitcheck, is_fn_initializer, is_fn_only_self,\n is_fn_view, module_has_initializer, module_has_storage,\n },\n};\nuse crate::protocol::meta::utils::derive_serialization_quotes;\nuse std::meta::type_of;\n\npub(crate) comptime fn generate_private_external(f: FunctionDefinition) -> Quoted {\n let module_has_initializer = module_has_initializer(f.module());\n let module_has_storage = module_has_storage(f.module());\n\n // Private functions undergo a lot of transformations from their Aztec.nr form into a circuit that can be fed to\n // the Private Kernel Circuit. First we change the function signature so that it also receives\n // `PrivateContextInputs`, which contain information about the execution context (e.g. the caller).\n let original_params = f.parameters();\n\n let original_params_quotes =\n original_params.map(|(param_name, param_type)| quote { $param_name: $param_type }).join(quote {, });\n\n let params = quote { inputs: aztec::context::inputs::PrivateContextInputs, $original_params_quotes };\n\n let mut body = f.body().as_block().unwrap();\n\n // The original params are hashed and passed to the `context` object, so that the kernel can verify we've received\n // the correct values.\n let (args_serialization, _, serialized_args_name) = derive_serialization_quotes(original_params, false);\n\n let storage_init = if module_has_storage {\n // Contract has Storage defined so we initialize it.\n quote {\n let storage = Storage::init(&mut context);\n }\n } else {\n // Contract does not have Storage defined, so we set storage to the unit type `()`. ContractSelfPrivate\n // requires a storage struct in its constructor. Using an Option type would lead to worse developer experience\n // and higher constraint counts so we use the unit type `()` instead.\n quote {\n let storage = ();\n }\n };\n\n let contract_self_creation = quote {\n #[allow(unused_variables)]\n let mut self = {\n $args_serialization\n let args_hash = aztec::hash::hash_args($serialized_args_name);\n let mut context = aztec::context::PrivateContext::new(inputs, args_hash);\n $storage_init\n let self_address = context.this_address();\n let call_self: CallSelf<&mut aztec::context::PrivateContext> = CallSelf { address: self_address, context: &mut context };\n let enqueue_self: EnqueueSelf<&mut aztec::context::PrivateContext> = EnqueueSelf { address: self_address, context: &mut context };\n let call_self_static: CallSelfStatic<&mut aztec::context::PrivateContext> = CallSelfStatic { address: self_address, context: &mut context };\n let enqueue_self_static: EnqueueSelfStatic<&mut aztec::context::PrivateContext> = EnqueueSelfStatic { address: self_address, context: &mut context };\n let internal: CallInternal<&mut aztec::context::PrivateContext> = CallInternal { context: &mut context };\n let call_self_utility = CallSelfUtility { address: self_address };\n let utility: aztec::contract_self::PrivateUtilityCalls<CallSelfUtility> = aztec::contract_self::PrivateUtilityCalls { call_self: call_self_utility };\n aztec::contract_self::ContractSelfPrivate::new(&mut context, storage, call_self, enqueue_self, call_self_static, enqueue_self_static, internal, utility)\n };\n };\n\n let original_function_name = f.name();\n\n // Modifications introduced by the different marker attributes.\n let internal_check = if is_fn_only_self(f) {\n let assertion_message = f\"Function {original_function_name} can only be called by the same contract\";\n quote { assert(self.msg_sender() == self.address, $assertion_message); }\n } else {\n quote {}\n };\n\n let view_check = if is_fn_view(f) {\n let assertion_message = f\"Function {original_function_name} can only be called statically\".as_quoted_str();\n quote { assert(self.context.is_static_call(), $assertion_message); }\n } else {\n quote {}\n };\n\n let (assert_initializer, mark_as_initialized) = if is_fn_initializer(f) {\n let has_public_fns_with_init_check = has_public_init_checked_functions(f.module());\n (\n quote {\n aztec::macros::functions::initialization_utils::assert_initialization_matches_address_preimage_private(*self.context);\n },\n quote { aztec::macros::functions::initialization_utils::mark_as_initialized_from_private_initializer(self.context, $has_public_fns_with_init_check); },\n )\n } else {\n (quote {}, quote {})\n };\n\n // Initialization checks are not included in contracts that don't have initializers.\n let init_check = if module_has_initializer & !is_fn_initializer(f) & !fn_has_noinitcheck(f) {\n quote { aztec::macros::functions::initialization_utils::assert_is_initialized_private(self.context); }\n } else {\n quote {}\n };\n\n // Phase checks are skipped in functions that request to manually handle phases\n let initial_phase_store = if fn_has_allow_phase_change(f) {\n quote {}\n } else {\n quote { let within_revertible_phase: bool = self.context.in_revertible_phase(); }\n };\n\n let no_phase_change_check = if fn_has_allow_phase_change(f) {\n quote {}\n } else {\n quote {\n assert_eq(\n within_revertible_phase,\n self.context.in_revertible_phase(),\n f\"Phase change detected on function with phase check. If this is expected, use #[allow_phase_change]\",\n );\n }\n };\n\n // Inject the authwit check if the function is marked with #[authorize_once].\n let authorize_once_check = if fn_has_authorize_once(f) {\n create_authorize_once_check(f, true)\n } else {\n quote {}\n };\n\n // Finally, we need to change the return type to be `PrivateCircuitPublicInputs`, which is what the Private Kernel\n // circuit expects.\n let return_value_var_name = quote { macro__returned__values };\n\n let return_value_type = f.return_type();\n let return_value = if body.len() == 0 {\n quote {}\n } else if return_value_type != type_of(()) {\n // The original return value is serialized and hashed before being passed to the context.\n let (body_without_return, last_body_expr) = body.pop_back();\n let return_value = last_body_expr.quoted();\n let return_value_assignment = quote { let $return_value_var_name: $return_value_type = $return_value; };\n\n let (return_serialization, _, serialized_return_name) =\n derive_serialization_quotes([(return_value_var_name, return_value_type)], false);\n\n body = body_without_return;\n\n quote {\n $return_value_assignment\n $return_serialization\n self.context.set_return_hash($serialized_return_name);\n }\n } else {\n let (body_without_return, last_body_expr) = body.pop_back();\n if !last_body_expr.has_semicolon()\n & last_body_expr.as_for().is_none()\n & last_body_expr.as_assert().is_none()\n & last_body_expr.as_for_range().is_none()\n & last_body_expr.as_assert_eq().is_none()\n & last_body_expr.as_let().is_none() {\n let unused_return_value_name = f\"_{return_value_var_name}\".quoted_contents();\n body = body_without_return.push_back(quote { let $unused_return_value_name = $last_body_expr; }\n .as_expr()\n .unwrap());\n }\n quote {}\n };\n\n let context_finish = quote { self.context.finish() };\n\n // Preserve all attributes that are relevant to the function's ABI.\n let abi_relevant_attributes = get_abi_relevant_attributes(f);\n\n let fn_name = f\"__aztec_nr_internals__{original_function_name}\".quoted_contents();\n\n let to_prepend = quote {\n aztec::oracle::version::assert_compatible_oracle_version();\n $contract_self_creation\n $initial_phase_store\n $assert_initializer\n $init_check\n $internal_check\n $view_check\n $authorize_once_check\n };\n\n let body_quote = body.map(|expr| expr.quoted()).join(quote { });\n\n // `mark_as_initialized` is placed after the user's function body. If it ran at the beginning, the contract\n // would appear initialized while the initializer is still running, allowing contracts called by the initializer\n // to re-enter into a half-initialized contract.\n let to_append = quote {\n $return_value\n $mark_as_initialized\n $no_phase_change_check\n $context_finish\n };\n\n quote {\n #[aztec::macros::internals_functions_generation::abi_attributes::abi_private]\n $abi_relevant_attributes\n fn $fn_name($params) -> return_data aztec::protocol::abis::private_circuit_public_inputs::PrivateCircuitPublicInputs {\n $to_prepend\n $body_quote\n $to_append\n }\n }\n}\n"
|
|
248
248
|
},
|
|
249
249
|
"119": {
|
|
@@ -261,7 +261,7 @@
|
|
|
261
261
|
"start": 4225
|
|
262
262
|
}
|
|
263
263
|
],
|
|
264
|
-
"path": "/
|
|
264
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/macros/internals_functions_generation/external/public.nr",
|
|
265
265
|
"source": "use crate::macros::{\n internals_functions_generation::external::helpers::{create_authorize_once_check, get_abi_relevant_attributes},\n utils::{\n fn_has_authorize_once, fn_has_noinitcheck, is_fn_initializer, is_fn_only_self, is_fn_view,\n module_has_initializer, module_has_storage,\n },\n};\n\n/// Emits a per-contract helper that creates the `self` value from a `PublicContext` already in scope.\n///\n/// This is the shared helper used by both:\n/// - public external functions, via [`generate_public_self_creator`], which constructs a fresh `PublicContext` from\n/// `calldata_copy` and then delegates to this helper; and\n/// - public internal functions and `#[contract_library_method]` bodies, which already receive `context` as a\n/// parameter and call this helper directly to skip the `calldata_copy` step.\npub(crate) comptime fn generate_public_self_creator_from_context(m: Module) -> Quoted {\n let (storage_type, storage_init) = if module_has_storage(m) {\n (quote { Storage<aztec::context::PublicContext> }, quote { let storage = Storage::init(context); })\n } else {\n // Contract does not have Storage defined, so we set storage to the unit type `()`. ContractSelfPublic requires\n // a storage struct in its constructor. Using an Option type would lead to worse developer experience and\n // higher constraint counts so we use the unit type `()` instead.\n (quote { () }, quote { let storage = (); })\n };\n\n quote {\n #[contract_library_method]\n unconstrained fn __aztec_nr_internals__create_public_self_from_context(context: aztec::context::PublicContext) -> aztec::contract_self::ContractSelfPublic<$storage_type, CallSelf<aztec::context::PublicContext>, CallSelfStatic<aztec::context::PublicContext>, CallInternal<aztec::context::PublicContext>> {\n $storage_init\n let self_address = context.this_address();\n let call_self: CallSelf<aztec::context::PublicContext> = CallSelf { address: self_address, context };\n let call_self_static: CallSelfStatic<aztec::context::PublicContext> = CallSelfStatic { address: self_address, context };\n let internal: CallInternal<aztec::context::PublicContext> = CallInternal { context };\n aztec::contract_self::ContractSelfPublic::new(context, storage, call_self, call_self_static, internal)\n }\n }\n}\n\n/// Generates the per-contract helper that builds public `self`.\n///\n/// Each public external function calls this helper instead of inlining the construction, so the same preamble does not\n/// appear duplicated in every public function body. We let Noir's inliner decide whether to inline the helper at each\n/// call site rather than forcing it via macro expansion.\n///\n/// The helper is generic over the calldata length `N` because `PublicContext::new` takes a closure that reads `N`\n/// fields from calldata. Noir monomorphizes one copy per distinct `N`, so public functions with the same number of\n/// serialized args reuse the same compiled code.\npub(crate) comptime fn generate_public_self_creator(m: Module) -> Quoted {\n let storage_type = if module_has_storage(m) {\n quote { Storage<aztec::context::PublicContext> }\n } else {\n quote { () }\n };\n\n quote {\n #[contract_library_method]\n unconstrained fn __aztec_nr_internals__create_public_self<let N: u32>() -> aztec::contract_self::ContractSelfPublic<$storage_type, CallSelf<aztec::context::PublicContext>, CallSelfStatic<aztec::context::PublicContext>, CallInternal<aztec::context::PublicContext>> {\n // Unlike in the private case, in public the `context` does not need to receive the hash of the original\n // params.\n let context = aztec::context::PublicContext::new(|| {\n // We start from 1 because we skip the selector for the dispatch function.\n let serialized_args : [Field; N] = aztec::oracle::avm::calldata_copy(1, N);\n aztec::hash::hash_args(serialized_args)\n });\n __aztec_nr_internals__create_public_self_from_context(context)\n }\n }\n}\n\npub(crate) comptime fn generate_public_external(f: FunctionDefinition) -> Quoted {\n let module_has_initializer = module_has_initializer(f.module());\n\n // Public functions undergo a lot of transformations from their Aztec.nr form.\n let original_params = f.parameters();\n\n let args_len_quote = if original_params.len() == 0 {\n // If the function has no parameters, we set the args_len to 0.\n quote { 0 }\n } else {\n // The following will give us <type_of_struct_member_1 as Serialize>::N + <type_of_struct_member_2 as\n // Serialize>::N + ...\n original_params\n .map(|(_, param_type): (Quoted, Type)| {\n quote {\n <$param_type as $crate::protocol::traits::Serialize>::N\n }\n })\n .join(quote {+})\n };\n\n let contract_self_creation = quote {\n #[allow(unused_variables)]\n let mut self = __aztec_nr_internals__create_public_self::<$args_len_quote>();\n };\n\n let original_function_name = f.name();\n\n // Modifications introduced by the different marker attributes.\n let internal_check = if is_fn_only_self(f) {\n let assertion_message = f\"Function {original_function_name} can only be called by the same contract\";\n quote { assert(self.msg_sender() == self.address, $assertion_message); }\n } else {\n quote {}\n };\n\n let view_check = if is_fn_view(f) {\n let assertion_message = f\"Function {original_function_name} can only be called statically\".as_quoted_str();\n quote { assert(self.context.is_static_call(), $assertion_message); }\n } else {\n quote {}\n };\n\n let (assert_initializer, mark_as_initialized) = if is_fn_initializer(f) {\n (\n quote {\n aztec::macros::functions::initialization_utils::assert_initialization_matches_address_preimage_public(self.context);\n },\n quote {\n aztec::macros::functions::initialization_utils::mark_as_initialized_from_public_initializer(self.context);\n },\n )\n } else {\n (quote {}, quote {})\n };\n\n // Initialization checks are not included in contracts that don't have initializers.\n let init_check = if module_has_initializer & !fn_has_noinitcheck(f) & !is_fn_initializer(f) {\n quote { aztec::macros::functions::initialization_utils::assert_is_initialized_public(self.context); }\n } else {\n quote {}\n };\n\n // Inject the authwit check if the function is marked with #[authorize_once].\n let authorize_once_check = if fn_has_authorize_once(f) {\n create_authorize_once_check(f, false)\n } else {\n quote {}\n };\n\n let to_prepend = quote {\n $contract_self_creation\n $assert_initializer\n $init_check\n $internal_check\n $view_check\n $authorize_once_check\n };\n\n // `mark_as_initialized` is placed after the user's function body. If it ran at the beginning, the contract\n // would appear initialized while the initializer is still running, allowing contracts called by the initializer\n // to re-enter into a half-initialized contract.\n let to_append = quote {\n $mark_as_initialized\n };\n\n let fn_name = f\"__aztec_nr_internals__{original_function_name}\".quoted_contents();\n let body = f.body();\n let return_type = f.return_type();\n\n // New function parameters are the same as the original function's ones.\n let params = original_params.map(|(param_name, param_type)| quote { $param_name: $param_type }).join(quote {, });\n\n // Preserve all attributes that are relevant to the function's ABI.\n let abi_relevant_attributes = get_abi_relevant_attributes(f);\n\n // All public functions are automatically made unconstrained, even if they were not marked as such. This is because\n // instead of compiling into a circuit, they will compile to bytecode that will be later transpiled into AVM\n // bytecode.\n quote {\n #[aztec::macros::internals_functions_generation::abi_attributes::abi_public]\n $abi_relevant_attributes\n unconstrained fn $fn_name($params) -> pub $return_type {\n $to_prepend\n $body\n $to_append\n }\n }\n}\n"
|
|
266
266
|
},
|
|
267
267
|
"120": {
|
|
@@ -275,50 +275,304 @@
|
|
|
275
275
|
"start": 1935
|
|
276
276
|
}
|
|
277
277
|
],
|
|
278
|
-
"path": "/
|
|
278
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/macros/internals_functions_generation/external/utility.nr",
|
|
279
279
|
"source": "use crate::macros::utils::{fn_has_noinitcheck, module_has_initializer, module_has_storage};\n\n/// Emits a per-contract helper that builds the `self` value used by every utility external function.\n///\n/// Each utility external function calls this helper instead of inlining the construction, so the\n/// `UtilityContext::new`/`Storage::init`/`CallSelfUtility`/`ContractSelfUtility::new` chain does not appear duplicated\n/// in every utility function body. We let Noir's inliner decide whether to inline the helper at each call site rather\n/// than forcing it via macro expansion.\n///\n/// Unlike the public counterpart, this helper takes no arguments because `UtilityContext::new` does not need calldata.\npub(crate) comptime fn generate_utility_self_creator(m: Module) -> Quoted {\n let (storage_type, storage_init) = if module_has_storage(m) {\n (quote { Storage<aztec::context::UtilityContext> }, quote { let storage = Storage::init(context); })\n } else {\n // Contract does not have Storage defined, so we set storage to the unit type `()`. ContractSelfUtility requires\n // a storage struct in its constructor. Using an Option type would lead to worse developer experience and higher\n // constraint counts so we use the unit type `()` instead.\n (quote { () }, quote { let storage = (); })\n };\n\n quote {\n #[contract_library_method]\n unconstrained fn __aztec_nr_internals__create_utility_self() -> aztec::contract_self::ContractSelfUtility<$storage_type, CallSelfUtility> {\n let context = aztec::context::UtilityContext::new();\n $storage_init\n let self_address = context.this_address();\n let call_self = CallSelfUtility { address: self_address };\n aztec::contract_self::ContractSelfUtility::new(context, storage, call_self)\n }\n }\n}\n\npub(crate) comptime fn generate_utility_external(f: FunctionDefinition) -> Quoted {\n let module_has_initializer = module_has_initializer(f.module());\n\n let contract_self_creation = quote {\n #[allow(unused_variables)]\n let mut self = __aztec_nr_internals__create_utility_self();\n };\n\n // Initialization checks are not included in contracts that don't have initializers.\n let init_check = if module_has_initializer & !fn_has_noinitcheck(f) {\n quote {\n aztec::macros::functions::initialization_utils::assert_is_initialized_utility(\n self.context,\n );\n }\n } else {\n quote {}\n };\n\n // A quote to be injected at the beginning of the function body.\n let to_prepend = quote {\n aztec::oracle::version::assert_compatible_oracle_version();\n $contract_self_creation\n $init_check\n };\n\n let original_function_name = f.name();\n let fn_name = f\"__aztec_nr_internals__{original_function_name}\".quoted_contents();\n let body = f.body();\n let params = f.parameters().map(|(param_name, param_type)| quote { $param_name: $param_type }).join(quote {, });\n let return_type = f.return_type();\n\n quote {\n #[aztec::macros::internals_functions_generation::abi_attributes::abi_utility]\n unconstrained fn $fn_name($params) -> pub $return_type {\n $to_prepend\n $body\n }\n }\n}\n"
|
|
280
280
|
},
|
|
281
281
|
"133": {
|
|
282
282
|
"function_locations": [
|
|
283
|
+
{
|
|
284
|
+
"name": "protect_from_forgery",
|
|
285
|
+
"start": 4924
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"name": "forgery_protected_eph_pk",
|
|
289
|
+
"start": 5936
|
|
290
|
+
},
|
|
283
291
|
{
|
|
284
292
|
"name": "get_existing_app_siloed_handshake_secrets",
|
|
285
|
-
"start":
|
|
293
|
+
"start": 6951
|
|
286
294
|
},
|
|
287
295
|
{
|
|
288
296
|
"name": "create_non_interactive_handshake",
|
|
289
|
-
"start":
|
|
297
|
+
"start": 7819
|
|
290
298
|
},
|
|
291
299
|
{
|
|
292
300
|
"name": "create_interactive_handshake",
|
|
293
|
-
"start":
|
|
301
|
+
"start": 8606
|
|
294
302
|
},
|
|
295
303
|
{
|
|
296
304
|
"name": "get_handshake_secrets",
|
|
297
|
-
"start":
|
|
305
|
+
"start": 9189
|
|
298
306
|
},
|
|
299
307
|
{
|
|
300
308
|
"name": "fetch_handshake_page",
|
|
301
|
-
"start":
|
|
309
|
+
"start": 10884
|
|
302
310
|
},
|
|
303
311
|
{
|
|
304
312
|
"name": "test::get_handshake_secrets_returns_secrets_from_single_page",
|
|
305
|
-
"start":
|
|
313
|
+
"start": 11734
|
|
306
314
|
},
|
|
307
315
|
{
|
|
308
316
|
"name": "test::get_handshake_secrets_fetches_multiple_pages",
|
|
309
|
-
"start":
|
|
317
|
+
"start": 13389
|
|
310
318
|
},
|
|
311
319
|
{
|
|
312
|
-
"name": "test::
|
|
313
|
-
"start":
|
|
320
|
+
"name": "test::get_handshake_secrets_returns_empty_when_recipient_keys_not_held",
|
|
321
|
+
"start": 15712
|
|
314
322
|
},
|
|
315
323
|
{
|
|
316
324
|
"name": "test::mock_get_shared_secrets",
|
|
325
|
+
"start": 16538
|
|
326
|
+
}
|
|
327
|
+
],
|
|
328
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/messages/delivery/handshake.nr",
|
|
329
|
+
"source": "use crate::protocol::point::EmbeddedCurvePoint;\nuse crate::protocol::traits::{Deserialize, Serialize};\nuse std::embedded_curve_ops::{EmbeddedCurveScalar, multi_scalar_mul};\n\nuse crate::{\n context::PrivateContext,\n ephemeral::EphemeralArray,\n messages::{delivery::OnchainDeliveryMode, processing::provided_secret::ProvidedSecret},\n oracle::{call_utility_function::call_utility_function, shared_secret::get_shared_secrets},\n protocol::{\n abis::function_selector::FunctionSelector,\n address::AztecAddress,\n constants::DOM_SEP__HANDSHAKE_FORGERY_PROTECTION,\n hash::{poseidon2_hash_with_separator, sha256_to_field},\n traits::ToField,\n },\n standard_addresses::STANDARD_HANDSHAKE_REGISTRY_ADDRESS,\n};\n\n/// Page size for handshake discovery pagination.\npub global MAX_HANDSHAKES_PER_PAGE: u32 = 32;\n\n/// A handshake discovered during sync: the sender's ephemeral public key.\n#[derive(Deserialize, Eq, Serialize)]\npub struct DiscoveredHandshake {\n pub eph_pk: EmbeddedCurvePoint,\n}\n\n/// A paginated response of discovered handshakes.\n#[derive(Deserialize, Serialize)]\npub struct HandshakePage {\n pub items: BoundedVec<DiscoveredHandshake, MAX_HANDSHAKES_PER_PAGE>,\n pub total_count: u32,\n}\n\n/// The app-siloed handshake secrets the registry returns for a `(sender, recipient)` pair.\n#[derive(Deserialize, Eq, Serialize)]\npub struct AppSiloedHandshakeSecrets {\n /// The app-siloed shared secret, used to derive the recipient's discovery tag. The recipient can reconstruct\n /// it from the handshake's public ephemeral key via ECDH.\n pub shared: Field,\n /// The app-siloed sender-only secret, folded into the constrained-delivery sequence nullifier so only the\n /// sender can advance a sequence. The recipient cannot reconstruct it: it derives from a random secret stored\n /// only in the sender's handshake note and never transmitted.\n pub sender_only: Field,\n}\n\npub(crate) global PROVIDED_SECRETS_ARRAY_BASE_SLOT: Field =\n sha256_to_field(\"AZTEC_NR::PROVIDED_SECRETS_ARRAY_BASE_SLOT\".as_bytes());\n\nglobal HANDSHAKE_EPH_PKS_SLOT: Field = sha256_to_field(\"AZTEC_NR::HANDSHAKE_EPH_PKS_SLOT\".as_bytes());\n\n// The helper cannot import the handshake registry interface because the registry contract depends on aztec-nr. These\n// selector constants pin the registry ABI surface this library calls. The registry's test suite compares them against\n// its macro-generated `HandshakeRegistry::at(...).method(...).selector` values so signature drift fails in tests.\npub global GET_APP_SILOED_SECRETS_SELECTOR: FunctionSelector =\n comptime { FunctionSelector::from_signature(\"get_app_siloed_secrets((Field),(Field))\") };\npub global NON_INTERACTIVE_HANDSHAKE_SELECTOR: FunctionSelector =\n comptime { FunctionSelector::from_signature(\"non_interactive_handshake((Field),(Field))\") };\npub global INTERACTIVE_HANDSHAKE_SELECTOR: FunctionSelector =\n comptime { FunctionSelector::from_signature(\"interactive_handshake((Field),(Field))\") };\npub global GET_NON_INTERACTIVE_HANDSHAKES_SELECTOR: FunctionSelector =\n comptime { FunctionSelector::from_signature(\"get_non_interactive_handshakes((Field),u32)\") };\n\n/// Protects a handshake's shared secret from recipient forgery.\n///\n/// The handshake's ECDH shared secret is symmetric: `S = eph_sk * recipient_pub`, where `(eph_sk, eph_pk)` is\n/// the sender's ephemeral key pair, also equals `recipient_priv * eph_pk`. The recipient recomputing `S` this\n/// way is normal: it is how they derive the handshake's tags when scanning. The attack is minting a second\n/// handshake with the same secret: the ephemeral key is unconstrained, so a malicious recipient can register\n/// its own handshake crafted to land on `S` again, with a different sender-only secret, and emit logs under\n/// the honest handshake's constrained-delivery tag. That breaks the invariant that a constrained-delivery log\n/// sequence is tied to a single sender: by colliding on the tag it blocks the honest sender, who can no longer\n/// emit the next note in their sequence.\n///\n/// The protection multiplies `S` by the scalar `k = hash(eph_pk, recipient_point)`: a forgery must announce a\n/// different `eph_pk`, so the protected secrets diverge. The result is still a point and silos like `S`.\n///\n/// The recipient point must be part of `k`: were `k` independent of it, an attacker choosing the fake\n/// recipient point as a multiple of the honest protected secret could solve for the multiplier that makes the\n/// forged secret land exactly on it.\n///\n/// Concretely, on the sender's side:\n/// S = eph_sk * recipient_point\n/// S' = protect_from_forgery(S, eph_pk, recipient_point) = k * S\n///\n/// See [`forgery_protected_eph_pk`] for how that arrives at the same `S'`.\npub fn protect_from_forgery(\n secret: EmbeddedCurvePoint,\n eph_pk: EmbeddedCurvePoint,\n recipient_point: EmbeddedCurvePoint,\n) -> EmbeddedCurvePoint {\n let scalar = poseidon2_hash_with_separator(\n [eph_pk.x, eph_pk.y, recipient_point.x, recipient_point.y],\n DOM_SEP__HANDSHAKE_FORGERY_PROTECTION,\n );\n multi_scalar_mul([secret], [EmbeddedCurveScalar::from_field(scalar)])\n}\n\n/// Applies the forgery protection to a discovered ephemeral key.\n///\n/// The recipient never holds the raw `S` (its side of the ECDH happens inside PXE), so it cannot call\n/// [`protect_from_forgery`] on the secret directly. The protection is a scalar multiplication and therefore\n/// commutes through ECDH: protecting the ephemeral key before the shared-secret derivation yields the same\n/// protected secret `S'` the sender stored:\n///\n/// protected_eph_pk = forgery_protected_eph_pk(eph_pk, recipient_point) = k * eph_pk\n/// recipient_priv * protected_eph_pk = recipient_priv * (k * eph_pk) = k * (recipient_priv * eph_pk) = k * S = S'\npub fn forgery_protected_eph_pk(eph_pk: EmbeddedCurvePoint, recipient_point: EmbeddedCurvePoint) -> EmbeddedCurvePoint {\n // Passing `eph_pk` twice is deliberate: it is both the point being multiplied and an input to the scalar\n // `k`, yielding `k * eph_pk` (see the algebra on [`protect_from_forgery`]).\n protect_from_forgery(eph_pk, eph_pk, recipient_point)\n}\n\n/// Reads the existing app-siloed handshake secrets for `(sender, recipient)` from the registry.\n///\n/// Returns `None` when no handshake has been registered for the pair yet, in which case the caller decides how to\n/// source a tagging secret (see [`super::tag::derive_log_tag`]).\n///\n/// ## Batching\n///\n/// This reads committed state, so within a single transaction multiple sends cannot see each other's pending\n/// handshake. A brand-new recipient therefore needs one landed transaction to establish the handshake before further\n/// sends can be batched onto it.\npub(crate) unconstrained fn get_existing_app_siloed_handshake_secrets(\n registry: AztecAddress,\n sender: AztecAddress,\n recipient: AztecAddress,\n) -> Option<AppSiloedHandshakeSecrets> {\n let returns = call_utility_function(\n registry,\n GET_APP_SILOED_SECRETS_SELECTOR,\n [sender.to_field(), recipient.to_field()],\n );\n Deserialize::deserialize(returns)\n}\n\n/// Establishes a non-interactive handshake for `(sender, recipient)` and returns its app-siloed secrets.\n///\n/// The registry inserts a fresh handshake note and returns the app-siloed secrets. The constrained return value is the\n/// source of truth for the secrets, so constrained delivery anchoring a freshly bootstrapped handshake needs no\n/// separate call to the registry's `validate_handshake`.\n///\n/// Any handshake already registered for the pair is overwritten.\npub(crate) fn create_non_interactive_handshake(\n context: &mut PrivateContext,\n registry: AztecAddress,\n sender: AztecAddress,\n recipient: AztecAddress,\n) -> AppSiloedHandshakeSecrets {\n context\n .call_private_function(registry, NON_INTERACTIVE_HANDSHAKE_SELECTOR, [sender.to_field(), recipient.to_field()])\n .get_preimage()\n}\n\n/// Establishes an interactive handshake for `(sender, recipient)` and returns its app-siloed secrets.\n///\n/// As with [`create_non_interactive_handshake`], the constrained return value is the source of truth for the\n/// secrets, so constrained delivery anchoring a freshly bootstrapped handshake needs no separate call to the\n/// registry's `validate_handshake`.\n///\n/// Any handshake already registered for the pair is overwritten.\npub(crate) fn create_interactive_handshake(\n context: &mut PrivateContext,\n registry: AztecAddress,\n sender: AztecAddress,\n recipient: AztecAddress,\n) -> AppSiloedHandshakeSecrets {\n context\n .call_private_function(registry, INTERACTIVE_HANDSHAKE_SELECTOR, [sender.to_field(), recipient.to_field()])\n .get_preimage()\n}\n\n/// Fetches discovered handshakes from the HandshakeRegistry and derives app-siloed tagging secrets for each,\n/// returning them so that [`get_pending_tagged_logs`](crate::oracle::message_processing::get_pending_tagged_logs)\n/// searches for logs tagged with these secrets.\npub(crate) unconstrained fn get_handshake_secrets(\n contract_address: AztecAddress,\n recipient: AztecAddress,\n) -> EphemeralArray<ProvidedSecret> {\n let provided_secrets = EphemeralArray::<ProvidedSecret>::empty_at(PROVIDED_SECRETS_ARRAY_BASE_SLOT);\n\n // Each ephemeral key gets the forgery protection applied (see [`forgery_protected_eph_pk`]) so the oracle's\n // ECDH yields the protected secret the sender stored.\n let protected_eph_pks: EphemeralArray<EmbeddedCurvePoint> = EphemeralArray::empty_at(HANDSHAKE_EPH_PKS_SLOT);\n let recipient_point = recipient.to_address_point().expect(f\"recipient address is not on the curve\").inner;\n\n let mut page_offset: u32 = 0;\n let mut has_more = true;\n while has_more {\n let page = fetch_handshake_page(recipient, page_offset);\n\n for j in 0..page.items.len() {\n protected_eph_pks.push(forgery_protected_eph_pk(page.items.get(j).eph_pk, recipient_point));\n }\n\n page_offset += page.items.len();\n has_more = page_offset < page.total_count;\n }\n\n if protected_eph_pks.len() > 0 {\n let secrets = get_shared_secrets(recipient, protected_eph_pks, contract_address);\n for j in 0..secrets.len() {\n let secret = secrets.get(j);\n // Handshakes are mode-agnostic; emit one entry per on-chain tag domain for PXE to scan.\n provided_secrets.push(ProvidedSecret { secret, mode: OnchainDeliveryMode::onchain_unconstrained() });\n provided_secrets.push(ProvidedSecret { secret, mode: OnchainDeliveryMode::onchain_constrained() });\n }\n }\n\n provided_secrets\n}\n\n/// Calls the HandshakeRegistry's `get_non_interactive_handshakes` utility function and deserializes the response.\nunconstrained fn fetch_handshake_page(recipient: AztecAddress, page_offset: u32) -> HandshakePage {\n let args: [Field; 2] = [recipient.to_field(), page_offset as Field];\n let response = call_utility_function(\n STANDARD_HANDSHAKE_REGISTRY_ADDRESS,\n GET_NON_INTERACTIVE_HANDSHAKES_SELECTOR,\n args,\n );\n HandshakePage::deserialize(response)\n}\n\nmod test {\n use crate::ephemeral::EphemeralArray;\n use crate::messages::delivery::handshake::{\n DiscoveredHandshake, get_handshake_secrets, HandshakePage, MAX_HANDSHAKES_PER_PAGE,\n };\n use crate::messages::delivery::OnchainDeliveryMode;\n use crate::protocol::{address::AztecAddress, traits::{FromField, Serialize}};\n use crate::test::helpers::test_environment::TestEnvironment;\n use crate::utils::point::point_from_x_coord;\n use std::test::OracleMock;\n\n #[test]\n unconstrained fn get_handshake_secrets_returns_secrets_from_single_page() {\n let env = TestEnvironment::new();\n let recipient = AztecAddress::from_field(1);\n let contract_address = AztecAddress { inner: 0xdeadbeef };\n\n env.utility_context_at(contract_address, |_| {\n let pk_a = point_from_x_coord(1).unwrap();\n let pk_b = point_from_x_coord(2).unwrap();\n\n let mut items: BoundedVec<DiscoveredHandshake, MAX_HANDSHAKES_PER_PAGE> = BoundedVec::new();\n items.push(DiscoveredHandshake { eph_pk: pk_a });\n items.push(DiscoveredHandshake { eph_pk: pk_b });\n let page = HandshakePage { items, total_count: 2 };\n let _ = OracleMock::mock(\"aztec_utl_callUtilityFunction\").returns(page.serialize());\n\n let secret_a: Field = 111;\n let secret_b: Field = 222;\n mock_get_shared_secrets([secret_a, secret_b]);\n\n let secrets = get_handshake_secrets(contract_address, recipient);\n\n assert_eq(secrets.len(), 4);\n assert_eq(secrets.get(0).secret, secret_a);\n assert(secrets.get(0).mode == OnchainDeliveryMode::onchain_unconstrained());\n assert_eq(secrets.get(1).secret, secret_a);\n assert(secrets.get(1).mode == OnchainDeliveryMode::onchain_constrained());\n assert_eq(secrets.get(2).secret, secret_b);\n assert(secrets.get(2).mode == OnchainDeliveryMode::onchain_unconstrained());\n assert_eq(secrets.get(3).secret, secret_b);\n assert(secrets.get(3).mode == OnchainDeliveryMode::onchain_constrained());\n });\n }\n\n #[test]\n unconstrained fn get_handshake_secrets_fetches_multiple_pages() {\n let env = TestEnvironment::new();\n let recipient = AztecAddress::from_field(1);\n let contract_address = AztecAddress { inner: 0xdeadbeef };\n\n env.utility_context_at(contract_address, |_| {\n let pk_a = point_from_x_coord(1).unwrap();\n let pk_b = point_from_x_coord(2).unwrap();\n let pk_c = point_from_x_coord(8).unwrap();\n\n let mut page_1_items: BoundedVec<DiscoveredHandshake, MAX_HANDSHAKES_PER_PAGE> = BoundedVec::new();\n page_1_items.push(DiscoveredHandshake { eph_pk: pk_a });\n page_1_items.push(DiscoveredHandshake { eph_pk: pk_b });\n let page_1 = HandshakePage { items: page_1_items, total_count: 3 };\n\n let mut page_2_items: BoundedVec<DiscoveredHandshake, MAX_HANDSHAKES_PER_PAGE> = BoundedVec::new();\n page_2_items.push(DiscoveredHandshake { eph_pk: pk_c });\n let page_2 = HandshakePage { items: page_2_items, total_count: 3 };\n\n let _ = OracleMock::mock(\"aztec_utl_callUtilityFunction\").returns(page_1.serialize()).times(1);\n let _ = OracleMock::mock(\"aztec_utl_callUtilityFunction\").returns(page_2.serialize()).times(1);\n\n mock_get_shared_secrets([111, 222, 333]);\n\n let secrets = get_handshake_secrets(contract_address, recipient);\n assert_eq(secrets.len(), 6);\n assert_eq(secrets.get(0).secret, 111);\n assert(secrets.get(0).mode == OnchainDeliveryMode::onchain_unconstrained());\n assert_eq(secrets.get(1).secret, 111);\n assert(secrets.get(1).mode == OnchainDeliveryMode::onchain_constrained());\n assert_eq(secrets.get(2).secret, 222);\n assert(secrets.get(2).mode == OnchainDeliveryMode::onchain_unconstrained());\n assert_eq(secrets.get(3).secret, 222);\n assert(secrets.get(3).mode == OnchainDeliveryMode::onchain_constrained());\n assert_eq(secrets.get(4).secret, 333);\n assert(secrets.get(4).mode == OnchainDeliveryMode::onchain_unconstrained());\n assert_eq(secrets.get(5).secret, 333);\n assert(secrets.get(5).mode == OnchainDeliveryMode::onchain_constrained());\n });\n }\n\n #[test]\n unconstrained fn get_handshake_secrets_returns_empty_when_recipient_keys_not_held() {\n let env = TestEnvironment::new();\n let recipient = AztecAddress::from_field(1);\n let contract_address = AztecAddress { inner: 0xdeadbeef };\n\n env.utility_context_at(contract_address, |_| {\n let mut items = BoundedVec::new();\n items.push(DiscoveredHandshake { eph_pk: point_from_x_coord(1).unwrap() });\n let page = HandshakePage { items, total_count: 1 };\n let _ = OracleMock::mock(\"aztec_utl_callUtilityFunction\").returns(page.serialize());\n\n let empty: [Field; 0] = [];\n mock_get_shared_secrets(empty);\n\n let secrets = get_handshake_secrets(contract_address, recipient);\n assert_eq(secrets.len(), 0);\n });\n }\n\n unconstrained fn mock_get_shared_secrets<let N: u32>(response_values: [Field; N]) {\n let response_slot: Field = 99;\n let response_array: EphemeralArray<Field> = EphemeralArray::at(response_slot);\n for value in response_values {\n response_array.push(value);\n }\n let _ = OracleMock::mock(\"aztec_utl_getSharedSecrets\").returns(response_slot);\n }\n}\n"
|
|
330
|
+
},
|
|
331
|
+
"14": {
|
|
332
|
+
"function_locations": [
|
|
333
|
+
{
|
|
334
|
+
"name": "EmbeddedCurvePoint::new",
|
|
335
|
+
"start": 510
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"name": "EmbeddedCurvePoint::double",
|
|
339
|
+
"start": 705
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"name": "EmbeddedCurvePoint::point_at_infinity",
|
|
343
|
+
"start": 877
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"name": "EmbeddedCurvePoint::generator",
|
|
347
|
+
"start": 1018
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"name": "EmbeddedCurvePoint::is_infinite",
|
|
351
|
+
"start": 1329
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"name": "<impl Add for EmbeddedCurvePoint>::add",
|
|
355
|
+
"start": 1576
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"name": "<impl Sub for EmbeddedCurvePoint>::sub",
|
|
359
|
+
"start": 1793
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"name": "<impl Neg for EmbeddedCurvePoint>::neg",
|
|
363
|
+
"start": 2051
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"name": "<impl Eq for EmbeddedCurvePoint>::eq",
|
|
367
|
+
"start": 2245
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"name": "<impl Hash for EmbeddedCurvePoint>::hash",
|
|
371
|
+
"start": 2415
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"name": "EmbeddedCurveScalar::new",
|
|
375
|
+
"start": 2969
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"name": "EmbeddedCurveScalar::from_field",
|
|
379
|
+
"start": 3154
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"name": "<impl Eq for EmbeddedCurveScalar>::eq",
|
|
383
|
+
"start": 3342
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"name": "<impl Hash for EmbeddedCurveScalar>::hash",
|
|
387
|
+
"start": 3525
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"name": "multi_scalar_mul",
|
|
391
|
+
"start": 4201
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"name": "fixed_base_scalar_mul",
|
|
395
|
+
"start": 4416
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"name": "multi_scalar_mul_array_return",
|
|
399
|
+
"start": 4699
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"name": "embedded_curve_add",
|
|
403
|
+
"start": 5154
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"name": "embedded_curve_add_array_return",
|
|
407
|
+
"start": 5439
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"name": "tests::hash_point",
|
|
411
|
+
"start": 5888
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"name": "tests::hash_scalar",
|
|
415
|
+
"start": 6064
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"name": "tests::point_new_sets_coordinates",
|
|
419
|
+
"start": 6236
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"name": "tests::point_at_infinity_is_origin",
|
|
423
|
+
"start": 6395
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
"name": "tests::generator_has_documented_coordinates",
|
|
427
|
+
"start": 6579
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"name": "tests::is_infinite_only_true_for_origin",
|
|
431
|
+
"start": 6803
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"name": "tests::points_with_same_coords_are_equal",
|
|
435
|
+
"start": 7126
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"name": "tests::points_with_different_coords_are_unequal",
|
|
439
|
+
"start": 7318
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"name": "tests::neg_negates_y_coordinate",
|
|
443
|
+
"start": 7580
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"name": "tests::neg_is_involution",
|
|
447
|
+
"start": 7768
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"name": "tests::add_with_point_at_infinity_is_identity",
|
|
451
|
+
"start": 7913
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"name": "tests::add_of_two_infinities_is_infinity",
|
|
455
|
+
"start": 8147
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"name": "tests::add_with_negation_is_point_at_infinity",
|
|
459
|
+
"start": 8318
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"name": "tests::add_is_commutative",
|
|
463
|
+
"start": 8458
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"name": "tests::add_is_associative",
|
|
467
|
+
"start": 8620
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"name": "tests::sub_of_a_point_with_itself_is_infinity",
|
|
471
|
+
"start": 8841
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"name": "tests::sub_with_point_at_infinity_is_identity",
|
|
475
|
+
"start": 8998
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"name": "tests::sub_inverts_add",
|
|
479
|
+
"start": 9183
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"name": "tests::double_equals_self_plus_self",
|
|
483
|
+
"start": 9394
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"name": "tests::double_of_point_at_infinity_is_infinity",
|
|
487
|
+
"start": 9551
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"name": "tests::embedded_curve_add_matches_add_operator",
|
|
491
|
+
"start": 9701
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
"name": "tests::point_hash_is_consistent_for_equal_points",
|
|
495
|
+
"start": 9905
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"name": "tests::point_hash_differs_for_distinct_points",
|
|
499
|
+
"start": 10117
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"name": "tests::scalar_new_sets_limbs",
|
|
503
|
+
"start": 10515
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
"name": "tests::scalars_with_same_limbs_are_equal",
|
|
507
|
+
"start": 10683
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"name": "tests::scalars_with_different_limbs_are_unequal",
|
|
511
|
+
"start": 10877
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
"name": "tests::scalar_from_field_decomposes_zero",
|
|
515
|
+
"start": 11098
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"name": "tests::scalar_from_field_decomposes_small_value",
|
|
519
|
+
"start": 11256
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
"name": "tests::scalar_from_field_decomposes_two_pow_128",
|
|
523
|
+
"start": 11455
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"name": "tests::scalar_hash_is_consistent_for_equal_scalars",
|
|
527
|
+
"start": 11645
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
"name": "tests::scalar_hash_differs_for_distinct_scalars",
|
|
531
|
+
"start": 11865
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
"name": "tests::msm_with_scalar_one_returns_point",
|
|
535
|
+
"start": 12288
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"name": "tests::msm_with_scalar_zero_returns_infinity",
|
|
539
|
+
"start": 12507
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"name": "tests::msm_with_scalar_two_doubles_point",
|
|
543
|
+
"start": 12732
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"name": "tests::msm_sums_terms",
|
|
317
547
|
"start": 12937
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
"name": "tests::msm_with_opposite_terms_cancels",
|
|
551
|
+
"start": 13167
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"name": "tests::msm_skips_point_at_infinity",
|
|
555
|
+
"start": 13393
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"name": "tests::msm_skips_zero_scalar",
|
|
559
|
+
"start": 13665
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"name": "tests::fixed_base_scalar_mul_with_one_returns_generator",
|
|
563
|
+
"start": 13955
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
"name": "tests::fixed_base_scalar_mul_with_zero_returns_infinity",
|
|
567
|
+
"start": 14164
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
"name": "tests::fixed_base_scalar_mul_matches_msm_on_generator",
|
|
571
|
+
"start": 14351
|
|
318
572
|
}
|
|
319
573
|
],
|
|
320
|
-
"path": "/
|
|
321
|
-
"source": "use crate::protocol::point::EmbeddedCurvePoint;\nuse crate::protocol::traits::{Deserialize, Serialize};\n\nuse crate::{\n context::PrivateContext,\n ephemeral::EphemeralArray,\n messages::{delivery::OnchainDeliveryMode, processing::provided_secret::ProvidedSecret},\n oracle::{call_utility_function::call_utility_function, shared_secret::get_shared_secrets},\n protocol::{\n abis::function_selector::FunctionSelector, address::AztecAddress, hash::sha256_to_field, traits::ToField,\n },\n standard_addresses::STANDARD_HANDSHAKE_REGISTRY_ADDRESS,\n};\n\n/// Page size for handshake discovery pagination.\npub global MAX_HANDSHAKES_PER_PAGE: u32 = 32;\n\n/// A handshake discovered during sync: the sender's ephemeral public key.\n#[derive(Deserialize, Eq, Serialize)]\npub struct DiscoveredHandshake {\n pub eph_pk: EmbeddedCurvePoint,\n}\n\n/// A paginated response of discovered handshakes.\n#[derive(Deserialize, Serialize)]\npub struct HandshakePage {\n pub items: BoundedVec<DiscoveredHandshake, MAX_HANDSHAKES_PER_PAGE>,\n pub total_count: u32,\n}\n\n/// The app-siloed handshake secrets the registry returns for a `(sender, recipient)` pair.\n#[derive(Deserialize, Eq, Serialize)]\npub struct AppSiloedHandshakeSecrets {\n /// The app-siloed shared secret, used to derive the recipient's discovery tag. The recipient can reconstruct\n /// it from the handshake's public ephemeral key via ECDH.\n pub shared: Field,\n /// The app-siloed sender-only secret, folded into the constrained-delivery sequence nullifier so only the\n /// sender can advance a sequence. The recipient cannot reconstruct it: it derives from a random secret stored\n /// only in the sender's handshake note and never transmitted.\n pub sender_only: Field,\n}\n\npub(crate) global PROVIDED_SECRETS_ARRAY_BASE_SLOT: Field =\n sha256_to_field(\"AZTEC_NR::PROVIDED_SECRETS_ARRAY_BASE_SLOT\".as_bytes());\n\nglobal HANDSHAKE_EPH_PKS_SLOT: Field = sha256_to_field(\"AZTEC_NR::HANDSHAKE_EPH_PKS_SLOT\".as_bytes());\n\n// The helper cannot import the handshake registry interface because the registry contract depends on aztec-nr. These\n// selector constants pin the registry ABI surface this library calls. The registry's test suite compares them against\n// its macro-generated `HandshakeRegistry::at(...).method(...).selector` values so signature drift fails in tests.\npub global GET_APP_SILOED_SECRETS_SELECTOR: FunctionSelector =\n comptime { FunctionSelector::from_signature(\"get_app_siloed_secrets((Field),(Field))\") };\npub global NON_INTERACTIVE_HANDSHAKE_SELECTOR: FunctionSelector =\n comptime { FunctionSelector::from_signature(\"non_interactive_handshake((Field),(Field))\") };\npub global INTERACTIVE_HANDSHAKE_SELECTOR: FunctionSelector =\n comptime { FunctionSelector::from_signature(\"interactive_handshake((Field),(Field))\") };\npub global GET_NON_INTERACTIVE_HANDSHAKES_SELECTOR: FunctionSelector =\n comptime { FunctionSelector::from_signature(\"get_non_interactive_handshakes((Field),u32)\") };\n\n/// Reads the existing app-siloed handshake secrets for `(sender, recipient)` from the registry.\n///\n/// Returns `None` when no handshake has been registered for the pair yet, in which case the caller decides how to\n/// source a tagging secret (see [`super::tag::derive_log_tag`]).\n///\n/// ## Batching\n///\n/// This reads committed state, so within a single transaction multiple sends cannot see each other's pending\n/// handshake. A brand-new recipient therefore needs one landed transaction to establish the handshake before further\n/// sends can be batched onto it.\npub(crate) unconstrained fn get_existing_app_siloed_handshake_secrets(\n registry: AztecAddress,\n sender: AztecAddress,\n recipient: AztecAddress,\n) -> Option<AppSiloedHandshakeSecrets> {\n let returns = call_utility_function(\n registry,\n GET_APP_SILOED_SECRETS_SELECTOR,\n [sender.to_field(), recipient.to_field()],\n );\n Deserialize::deserialize(returns)\n}\n\n/// Establishes a non-interactive handshake for `(sender, recipient)` and returns its app-siloed secrets.\n///\n/// The registry inserts a fresh handshake note and returns the app-siloed secrets. The constrained return value is the\n/// source of truth for the secrets, so constrained delivery anchoring a freshly bootstrapped handshake needs no\n/// separate call to the registry's `validate_handshake`.\n///\n/// Any handshake already registered for the pair is overwritten.\npub(crate) fn create_non_interactive_handshake(\n context: &mut PrivateContext,\n registry: AztecAddress,\n sender: AztecAddress,\n recipient: AztecAddress,\n) -> AppSiloedHandshakeSecrets {\n context\n .call_private_function(registry, NON_INTERACTIVE_HANDSHAKE_SELECTOR, [sender.to_field(), recipient.to_field()])\n .get_preimage()\n}\n\n/// Establishes an interactive handshake for `(sender, recipient)` and returns its app-siloed secrets.\n///\n/// As with [`create_non_interactive_handshake`], the constrained return value is the source of truth for the\n/// secrets, so constrained delivery anchoring a freshly bootstrapped handshake needs no separate call to the\n/// registry's `validate_handshake`.\n///\n/// Any handshake already registered for the pair is overwritten.\npub(crate) fn create_interactive_handshake(\n context: &mut PrivateContext,\n registry: AztecAddress,\n sender: AztecAddress,\n recipient: AztecAddress,\n) -> AppSiloedHandshakeSecrets {\n context\n .call_private_function(registry, INTERACTIVE_HANDSHAKE_SELECTOR, [sender.to_field(), recipient.to_field()])\n .get_preimage()\n}\n\n/// Fetches discovered handshakes from the HandshakeRegistry and derives app-siloed tagging secrets for each,\n/// returning them so that [`get_pending_tagged_logs`](crate::oracle::message_processing::get_pending_tagged_logs)\n/// searches for logs tagged with these secrets.\npub(crate) unconstrained fn get_handshake_secrets(\n contract_address: AztecAddress,\n scope: AztecAddress,\n) -> EphemeralArray<ProvidedSecret> {\n let provided_secrets = EphemeralArray::<ProvidedSecret>::empty_at(PROVIDED_SECRETS_ARRAY_BASE_SLOT);\n\n let eph_pks: EphemeralArray<EmbeddedCurvePoint> = EphemeralArray::empty_at(HANDSHAKE_EPH_PKS_SLOT);\n\n let mut page_offset: u32 = 0;\n let mut has_more = true;\n while has_more {\n let page = fetch_handshake_page(scope, page_offset);\n\n for j in 0..page.items.len() {\n eph_pks.push(page.items.get(j).eph_pk);\n }\n\n page_offset += page.items.len();\n has_more = page_offset < page.total_count;\n }\n\n if eph_pks.len() > 0 {\n let secrets = get_shared_secrets(scope, eph_pks, contract_address);\n for j in 0..secrets.len() {\n let secret = secrets.get(j);\n // Handshakes are mode-agnostic; emit one entry per on-chain tag domain for PXE to scan.\n provided_secrets.push(ProvidedSecret { secret, mode: OnchainDeliveryMode::onchain_unconstrained() });\n provided_secrets.push(ProvidedSecret { secret, mode: OnchainDeliveryMode::onchain_constrained() });\n }\n }\n\n provided_secrets\n}\n\n/// Calls the HandshakeRegistry's `get_non_interactive_handshakes` utility function and deserializes the response.\nunconstrained fn fetch_handshake_page(recipient: AztecAddress, page_offset: u32) -> HandshakePage {\n let args: [Field; 2] = [recipient.to_field(), page_offset as Field];\n let response = call_utility_function(\n STANDARD_HANDSHAKE_REGISTRY_ADDRESS,\n GET_NON_INTERACTIVE_HANDSHAKES_SELECTOR,\n args,\n );\n HandshakePage::deserialize(response)\n}\n\nmod test {\n use crate::ephemeral::EphemeralArray;\n use crate::messages::delivery::handshake::{\n DiscoveredHandshake, get_handshake_secrets, HandshakePage, MAX_HANDSHAKES_PER_PAGE,\n };\n use crate::messages::delivery::OnchainDeliveryMode;\n use crate::protocol::{address::AztecAddress, traits::{FromField, Serialize}};\n use crate::test::helpers::test_environment::TestEnvironment;\n use crate::utils::point::point_from_x_coord;\n use std::test::OracleMock;\n\n #[test]\n unconstrained fn get_handshake_secrets_returns_secrets_from_single_page() {\n let env = TestEnvironment::new();\n let scope = AztecAddress::from_field(1);\n let contract_address = AztecAddress { inner: 0xdeadbeef };\n\n env.utility_context_at(contract_address, |_| {\n let pk_a = point_from_x_coord(1).unwrap();\n let pk_b = point_from_x_coord(2).unwrap();\n\n let mut items: BoundedVec<DiscoveredHandshake, MAX_HANDSHAKES_PER_PAGE> = BoundedVec::new();\n items.push(DiscoveredHandshake { eph_pk: pk_a });\n items.push(DiscoveredHandshake { eph_pk: pk_b });\n let page = HandshakePage { items, total_count: 2 };\n let _ = OracleMock::mock(\"aztec_utl_callUtilityFunction\").returns(page.serialize());\n\n let secret_a: Field = 111;\n let secret_b: Field = 222;\n mock_get_shared_secrets([secret_a, secret_b]);\n\n let secrets = get_handshake_secrets(contract_address, scope);\n\n assert_eq(secrets.len(), 4);\n assert_eq(secrets.get(0).secret, secret_a);\n assert(secrets.get(0).mode == OnchainDeliveryMode::onchain_unconstrained());\n assert_eq(secrets.get(1).secret, secret_a);\n assert(secrets.get(1).mode == OnchainDeliveryMode::onchain_constrained());\n assert_eq(secrets.get(2).secret, secret_b);\n assert(secrets.get(2).mode == OnchainDeliveryMode::onchain_unconstrained());\n assert_eq(secrets.get(3).secret, secret_b);\n assert(secrets.get(3).mode == OnchainDeliveryMode::onchain_constrained());\n });\n }\n\n #[test]\n unconstrained fn get_handshake_secrets_fetches_multiple_pages() {\n let env = TestEnvironment::new();\n let scope = AztecAddress::from_field(1);\n let contract_address = AztecAddress { inner: 0xdeadbeef };\n\n env.utility_context_at(contract_address, |_| {\n let pk_a = point_from_x_coord(1).unwrap();\n let pk_b = point_from_x_coord(2).unwrap();\n let pk_c = point_from_x_coord(8).unwrap();\n\n let mut page_1_items: BoundedVec<DiscoveredHandshake, MAX_HANDSHAKES_PER_PAGE> = BoundedVec::new();\n page_1_items.push(DiscoveredHandshake { eph_pk: pk_a });\n page_1_items.push(DiscoveredHandshake { eph_pk: pk_b });\n let page_1 = HandshakePage { items: page_1_items, total_count: 3 };\n\n let mut page_2_items: BoundedVec<DiscoveredHandshake, MAX_HANDSHAKES_PER_PAGE> = BoundedVec::new();\n page_2_items.push(DiscoveredHandshake { eph_pk: pk_c });\n let page_2 = HandshakePage { items: page_2_items, total_count: 3 };\n\n let _ = OracleMock::mock(\"aztec_utl_callUtilityFunction\").returns(page_1.serialize()).times(1);\n let _ = OracleMock::mock(\"aztec_utl_callUtilityFunction\").returns(page_2.serialize()).times(1);\n\n mock_get_shared_secrets([111, 222, 333]);\n\n let secrets = get_handshake_secrets(contract_address, scope);\n assert_eq(secrets.len(), 6);\n assert_eq(secrets.get(0).secret, 111);\n assert(secrets.get(0).mode == OnchainDeliveryMode::onchain_unconstrained());\n assert_eq(secrets.get(1).secret, 111);\n assert(secrets.get(1).mode == OnchainDeliveryMode::onchain_constrained());\n assert_eq(secrets.get(2).secret, 222);\n assert(secrets.get(2).mode == OnchainDeliveryMode::onchain_unconstrained());\n assert_eq(secrets.get(3).secret, 222);\n assert(secrets.get(3).mode == OnchainDeliveryMode::onchain_constrained());\n assert_eq(secrets.get(4).secret, 333);\n assert(secrets.get(4).mode == OnchainDeliveryMode::onchain_unconstrained());\n assert_eq(secrets.get(5).secret, 333);\n assert(secrets.get(5).mode == OnchainDeliveryMode::onchain_constrained());\n });\n }\n\n #[test]\n unconstrained fn get_handshake_secrets_returns_empty_when_scope_keys_not_held() {\n let env = TestEnvironment::new();\n let scope = AztecAddress::from_field(1);\n let contract_address = AztecAddress { inner: 0xdeadbeef };\n\n env.utility_context_at(contract_address, |_| {\n let mut items = BoundedVec::new();\n items.push(DiscoveredHandshake { eph_pk: point_from_x_coord(1).unwrap() });\n let page = HandshakePage { items, total_count: 1 };\n let _ = OracleMock::mock(\"aztec_utl_callUtilityFunction\").returns(page.serialize());\n\n let empty: [Field; 0] = [];\n mock_get_shared_secrets(empty);\n\n let secrets = get_handshake_secrets(contract_address, scope);\n assert_eq(secrets.len(), 0);\n });\n }\n\n unconstrained fn mock_get_shared_secrets<let N: u32>(response_values: [Field; N]) {\n let response_slot: Field = 99;\n let response_array: EphemeralArray<Field> = EphemeralArray::at(response_slot);\n for value in response_values {\n response_array.push(value);\n }\n let _ = OracleMock::mock(\"aztec_utl_getSharedSecrets\").returns(response_slot);\n }\n}\n"
|
|
574
|
+
"path": "std/embedded_curve_ops.nr",
|
|
575
|
+
"source": "use crate::cmp::Eq;\nuse crate::hash::Hash;\nuse crate::ops::arith::{Add, Neg, Sub};\n\n/// A point on the embedded elliptic curve\n/// By definition, the base field of the embedded curve is the scalar field of the proof system curve, i.e the Noir Field.\n/// x and y denotes the Weierstrass coordinates of the point.\npub struct EmbeddedCurvePoint {\n pub x: Field,\n pub y: Field,\n}\n\nimpl EmbeddedCurvePoint {\n /// Create a new point using the provided (x, y) pair\n pub fn new(x: Field, y: Field) -> Self {\n EmbeddedCurvePoint { x, y }\n }\n\n /// Elliptic curve point doubling operation\n /// returns the doubled point of a point P, i.e P+P\n pub fn double(self) -> EmbeddedCurvePoint {\n embedded_curve_add(self, self)\n }\n\n /// Returns the null element of the curve; 'the point at infinity'\n pub fn point_at_infinity() -> EmbeddedCurvePoint {\n EmbeddedCurvePoint { x: 0, y: 0 }\n }\n\n /// Returns the curve's generator point.\n pub fn generator() -> EmbeddedCurvePoint {\n // Generator point for the grumpkin curve (y^2 = x^3 - 17)\n EmbeddedCurvePoint {\n x: 1,\n y: 17631683881184975370165255887551781615748388533673675138860, // sqrt(-16)\n }\n }\n\n /// True if this point is the point at infinity\n pub fn is_infinite(self) -> bool {\n (self.x == 0) & (self.y == 0)\n }\n}\n\nimpl Add for EmbeddedCurvePoint {\n /// Adds two points P+Q, using the curve addition formula, and also handles point at infinity\n fn add(self, other: EmbeddedCurvePoint) -> EmbeddedCurvePoint {\n embedded_curve_add(self, other)\n }\n}\n\nimpl Sub for EmbeddedCurvePoint {\n /// Points subtraction operation, using addition and negation\n fn sub(self, other: EmbeddedCurvePoint) -> EmbeddedCurvePoint {\n self + other.neg()\n }\n}\n\nimpl Neg for EmbeddedCurvePoint {\n /// Negates a point P, i.e returns -P, by negating the y coordinate.\n /// If the point is at infinity, then the result is also at infinity.\n fn neg(self) -> EmbeddedCurvePoint {\n EmbeddedCurvePoint { x: self.x, y: -self.y }\n }\n}\n\nimpl Eq for EmbeddedCurvePoint {\n /// Checks whether two points are equal\n fn eq(self: Self, b: EmbeddedCurvePoint) -> bool {\n (self.x == b.x) & (self.y == b.y)\n }\n}\n\nimpl Hash for EmbeddedCurvePoint {\n fn hash<H>(self, state: &mut H)\n where\n H: crate::hash::Hasher,\n {\n self.x.hash(state);\n self.y.hash(state);\n }\n}\n\n/// Scalar for the embedded curve represented as low and high limbs\n/// By definition, the scalar field of the embedded curve is base field of the proving system curve.\n/// It may not fit into a Field element, so it is represented with two Field elements; its low and high limbs.\npub struct EmbeddedCurveScalar {\n pub lo: Field,\n pub hi: Field,\n}\n\nimpl EmbeddedCurveScalar {\n /// Create a new scalar using the provided (lo, hi) pair\n pub fn new(lo: Field, hi: Field) -> Self {\n EmbeddedCurveScalar { lo, hi }\n }\n\n /// Create a scalar from the given bn254 field value\n #[field(bn254)]\n pub fn from_field(scalar: Field) -> EmbeddedCurveScalar {\n let (a, b) = crate::field::bn254::decompose(scalar);\n EmbeddedCurveScalar { lo: a, hi: b }\n }\n}\n\nimpl Eq for EmbeddedCurveScalar {\n fn eq(self, other: Self) -> bool {\n (other.hi == self.hi) & (other.lo == self.lo)\n }\n}\n\nimpl Hash for EmbeddedCurveScalar {\n fn hash<H>(self, state: &mut H)\n where\n H: crate::hash::Hasher,\n {\n self.hi.hash(state);\n self.lo.hash(state);\n }\n}\n\n/// Computes a multi scalar multiplication over the embedded curve.\n/// For bn254, We have Grumpkin.\n///\n/// The embedded curve being used is decided by the\n/// underlying proof system.\n///\n/// IMPORTANT: Prefer `multi_scalar_mul()` over repeated `embedded_curve_add()`\n/// for adding multiple points. This is significantly more efficient.\n/// For adding exactly 2 points, use `embedded_curve_add()` directly.\n// docs:start:multi_scalar_mul\npub fn multi_scalar_mul<let N: u32>(\n points: [EmbeddedCurvePoint; N],\n scalars: [EmbeddedCurveScalar; N],\n) -> EmbeddedCurvePoint\n// docs:end:multi_scalar_mul\n{\n multi_scalar_mul_array_return(points, scalars, true)[0]\n}\n\n// docs:start:fixed_base_scalar_mul\npub fn fixed_base_scalar_mul(scalar: EmbeddedCurveScalar) -> EmbeddedCurvePoint\n// docs:end:fixed_base_scalar_mul\n{\n multi_scalar_mul([EmbeddedCurvePoint::generator()], [scalar])\n}\n\n#[foreign(multi_scalar_mul)]\npub(crate) fn multi_scalar_mul_array_return<let N: u32>(\n points: [EmbeddedCurvePoint; N],\n scalars: [EmbeddedCurveScalar; N],\n predicate: bool,\n) -> [EmbeddedCurvePoint; 1] {}\n\n/// Elliptic curve addition\n/// IMPORTANT: this function is expected to perform a full addition in order to handle all corner cases:\n/// - points on the curve\n/// - point doubling\n/// - point at infinity\n/// As a result, you may not get optimal performance, depending on the assumptions of your inputs.\n// docs:start:embedded_curve_add\npub fn embedded_curve_add(\n point1: EmbeddedCurvePoint,\n point2: EmbeddedCurvePoint,\n) -> EmbeddedCurvePoint {\n // docs:end:embedded_curve_add\n embedded_curve_add_array_return(point1, point2, true)[0]\n}\n\n#[foreign(embedded_curve_add)]\nfn embedded_curve_add_array_return(\n _point1: EmbeddedCurvePoint,\n _point2: EmbeddedCurvePoint,\n _predicate: bool,\n) -> [EmbeddedCurvePoint; 1] {}\n\nmod tests {\n // TODO: Allow imports from \"super\"\n use crate::default::Default;\n use crate::embedded_curve_ops::{\n embedded_curve_add, EmbeddedCurvePoint, EmbeddedCurveScalar, fixed_base_scalar_mul,\n multi_scalar_mul,\n };\n use crate::field::bn254::TWO_POW_128;\n use crate::hash::Hash;\n use crate::hash::Hasher;\n use crate::hash::poseidon2::Poseidon2Hasher;\n\n fn hash_point(p: EmbeddedCurvePoint) -> Field {\n let mut hasher: Poseidon2Hasher = Default::default();\n p.hash(&mut hasher);\n hasher.finish()\n }\n\n fn hash_scalar(s: EmbeddedCurveScalar) -> Field {\n let mut hasher: Poseidon2Hasher = Default::default();\n s.hash(&mut hasher);\n hasher.finish()\n }\n\n #[test]\n fn point_new_sets_coordinates() {\n let p = EmbeddedCurvePoint::new(3, 5);\n assert_eq(p.x, 3);\n assert_eq(p.y, 5);\n }\n\n #[test]\n fn point_at_infinity_is_origin() {\n let inf = EmbeddedCurvePoint::point_at_infinity();\n assert_eq(inf.x, 0);\n assert_eq(inf.y, 0);\n }\n\n #[test]\n fn generator_has_documented_coordinates() {\n let g = EmbeddedCurvePoint::generator();\n assert_eq(g.x, 1);\n assert_eq(g.y, 17631683881184975370165255887551781615748388533673675138860);\n }\n\n #[test]\n fn is_infinite_only_true_for_origin() {\n assert(EmbeddedCurvePoint::point_at_infinity().is_infinite());\n assert(!EmbeddedCurvePoint::generator().is_infinite());\n assert(!EmbeddedCurvePoint::new(1, 0).is_infinite());\n assert(!EmbeddedCurvePoint::new(0, 1).is_infinite());\n }\n\n #[test]\n fn points_with_same_coords_are_equal() {\n let p = EmbeddedCurvePoint::new(7, 11);\n let q = EmbeddedCurvePoint::new(7, 11);\n assert_eq(p, q);\n }\n\n #[test]\n fn points_with_different_coords_are_unequal() {\n let p = EmbeddedCurvePoint::new(7, 11);\n assert(p != EmbeddedCurvePoint::new(7, 12));\n assert(p != EmbeddedCurvePoint::new(8, 11));\n assert(p != EmbeddedCurvePoint::new(8, 12));\n }\n\n #[test]\n fn neg_negates_y_coordinate() {\n let g = EmbeddedCurvePoint::generator();\n let neg_g = -g;\n assert_eq(neg_g.x, g.x);\n assert_eq(neg_g.y, -g.y);\n }\n\n #[test]\n fn neg_is_involution() {\n let g = EmbeddedCurvePoint::generator();\n assert_eq(--g, g);\n }\n\n #[test]\n fn add_with_point_at_infinity_is_identity() {\n let g = EmbeddedCurvePoint::generator();\n let inf = EmbeddedCurvePoint::point_at_infinity();\n assert_eq(g + inf, g);\n assert_eq(inf + g, g);\n }\n\n #[test]\n fn add_of_two_infinities_is_infinity() {\n let inf = EmbeddedCurvePoint::point_at_infinity();\n assert((inf + inf).is_infinite());\n }\n\n #[test]\n fn add_with_negation_is_point_at_infinity() {\n let g = EmbeddedCurvePoint::generator();\n assert((g + (-g)).is_infinite());\n }\n\n #[test]\n fn add_is_commutative() {\n let g = EmbeddedCurvePoint::generator();\n let g2 = g.double();\n assert_eq(g + g2, g2 + g);\n }\n\n #[test]\n fn add_is_associative() {\n let g = EmbeddedCurvePoint::generator();\n let g2 = g.double();\n let g3 = g + g2;\n assert_eq((g + g2) + g3, g + (g2 + g3));\n }\n\n #[test]\n fn sub_of_a_point_with_itself_is_infinity() {\n let g = EmbeddedCurvePoint::generator();\n assert((g - g).is_infinite());\n }\n\n #[test]\n fn sub_with_point_at_infinity_is_identity() {\n let g = EmbeddedCurvePoint::generator();\n let inf = EmbeddedCurvePoint::point_at_infinity();\n assert_eq(g - inf, g);\n }\n\n #[test]\n fn sub_inverts_add() {\n let g = EmbeddedCurvePoint::generator();\n let g2 = g.double();\n assert_eq((g + g2) - g2, g);\n assert_eq((g + g2) - g, g2);\n }\n\n #[test]\n fn double_equals_self_plus_self() {\n let g = EmbeddedCurvePoint::generator();\n assert_eq(g.double(), g + g);\n }\n\n #[test]\n fn double_of_point_at_infinity_is_infinity() {\n assert(EmbeddedCurvePoint::point_at_infinity().double().is_infinite());\n }\n\n #[test]\n fn embedded_curve_add_matches_add_operator() {\n let g = EmbeddedCurvePoint::generator();\n let g2 = g.double();\n assert_eq(embedded_curve_add(g, g2), g + g2);\n }\n\n #[test]\n fn point_hash_is_consistent_for_equal_points() {\n let p = EmbeddedCurvePoint::new(3, 5);\n let q = EmbeddedCurvePoint::new(3, 5);\n assert_eq(hash_point(p), hash_point(q));\n }\n\n #[test]\n fn point_hash_differs_for_distinct_points() {\n let p = EmbeddedCurvePoint::new(3, 5);\n assert(hash_point(p) != hash_point(EmbeddedCurvePoint::new(3, 7)));\n assert(hash_point(p) != hash_point(EmbeddedCurvePoint::new(4, 5)));\n // Distinguishes (x, y) from (y, x) - order of writes matters.\n assert(hash_point(p) != hash_point(EmbeddedCurvePoint::new(5, 3)));\n }\n\n #[test]\n fn scalar_new_sets_limbs() {\n let s = EmbeddedCurveScalar::new(3, 5);\n assert_eq(s.lo, 3);\n assert_eq(s.hi, 5);\n }\n\n #[test]\n fn scalars_with_same_limbs_are_equal() {\n let s = EmbeddedCurveScalar::new(7, 11);\n let t = EmbeddedCurveScalar::new(7, 11);\n assert_eq(s, t);\n }\n\n #[test]\n fn scalars_with_different_limbs_are_unequal() {\n let s = EmbeddedCurveScalar::new(7, 11);\n assert(s != EmbeddedCurveScalar::new(7, 12));\n assert(s != EmbeddedCurveScalar::new(8, 11));\n }\n\n #[test]\n fn scalar_from_field_decomposes_zero() {\n assert_eq(EmbeddedCurveScalar::from_field(0), EmbeddedCurveScalar::new(0, 0));\n }\n\n #[test]\n fn scalar_from_field_decomposes_small_value() {\n let s = EmbeddedCurveScalar::from_field(0x1234567890);\n assert_eq(s, EmbeddedCurveScalar::new(0x1234567890, 0));\n }\n\n #[test]\n fn scalar_from_field_decomposes_two_pow_128() {\n let s = EmbeddedCurveScalar::from_field(TWO_POW_128);\n assert_eq(s, EmbeddedCurveScalar::new(0, 1));\n }\n\n #[test]\n fn scalar_hash_is_consistent_for_equal_scalars() {\n let s = EmbeddedCurveScalar::new(7, 11);\n let t = EmbeddedCurveScalar::new(7, 11);\n assert_eq(hash_scalar(s), hash_scalar(t));\n }\n\n #[test]\n fn scalar_hash_differs_for_distinct_scalars() {\n let s = EmbeddedCurveScalar::new(7, 11);\n assert(hash_scalar(s) != hash_scalar(EmbeddedCurveScalar::new(7, 12)));\n assert(hash_scalar(s) != hash_scalar(EmbeddedCurveScalar::new(8, 11)));\n // Distinguishes (lo, hi) from (hi, lo) - limb order matters.\n assert(hash_scalar(s) != hash_scalar(EmbeddedCurveScalar::new(11, 7)));\n }\n\n #[test]\n fn msm_with_scalar_one_returns_point() {\n let g = EmbeddedCurvePoint::generator();\n let one = EmbeddedCurveScalar::new(1, 0);\n assert_eq(multi_scalar_mul([g], [one]), g);\n }\n\n #[test]\n fn msm_with_scalar_zero_returns_infinity() {\n let g = EmbeddedCurvePoint::generator();\n let zero = EmbeddedCurveScalar::new(0, 0);\n assert(multi_scalar_mul([g], [zero]).is_infinite());\n }\n\n #[test]\n fn msm_with_scalar_two_doubles_point() {\n let g = EmbeddedCurvePoint::generator();\n let two = EmbeddedCurveScalar::new(2, 0);\n assert_eq(multi_scalar_mul([g], [two]), g.double());\n }\n\n #[test]\n fn msm_sums_terms() {\n let g = EmbeddedCurvePoint::generator();\n let one = EmbeddedCurveScalar::new(1, 0);\n assert_eq(multi_scalar_mul([g, g], [one, one]), g.double());\n }\n\n #[test]\n fn msm_with_opposite_terms_cancels() {\n let g = EmbeddedCurvePoint::generator();\n let one = EmbeddedCurveScalar::new(1, 0);\n assert(multi_scalar_mul([g, -g], [one, one]).is_infinite());\n }\n\n #[test]\n fn msm_skips_point_at_infinity() {\n let g = EmbeddedCurvePoint::generator();\n let inf = EmbeddedCurvePoint::point_at_infinity();\n let one = EmbeddedCurveScalar::new(1, 0);\n assert_eq(multi_scalar_mul([inf, g], [one, one]), g);\n }\n\n #[test]\n fn msm_skips_zero_scalar() {\n let g = EmbeddedCurvePoint::generator();\n let one = EmbeddedCurveScalar::new(1, 0);\n let zero = EmbeddedCurveScalar::new(0, 0);\n assert_eq(multi_scalar_mul([g, g], [zero, one]), g);\n }\n\n #[test]\n fn fixed_base_scalar_mul_with_one_returns_generator() {\n let one = EmbeddedCurveScalar::new(1, 0);\n assert_eq(fixed_base_scalar_mul(one), EmbeddedCurvePoint::generator());\n }\n\n #[test]\n fn fixed_base_scalar_mul_with_zero_returns_infinity() {\n let zero = EmbeddedCurveScalar::new(0, 0);\n assert(fixed_base_scalar_mul(zero).is_infinite());\n }\n\n #[test]\n fn fixed_base_scalar_mul_matches_msm_on_generator() {\n let s = EmbeddedCurveScalar::new(2, 0);\n assert_eq(\n fixed_base_scalar_mul(s),\n multi_scalar_mul([EmbeddedCurvePoint::generator()], [s]),\n );\n }\n}\n"
|
|
322
576
|
},
|
|
323
577
|
"140": {
|
|
324
578
|
"function_locations": [
|
|
@@ -347,7 +601,7 @@
|
|
|
347
601
|
"start": 13875
|
|
348
602
|
}
|
|
349
603
|
],
|
|
350
|
-
"path": "/
|
|
604
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/messages/discovery/mod.nr",
|
|
351
605
|
"source": "use crate::ephemeral::EphemeralArray;\nuse crate::logging::{aztecnr_debug_log, aztecnr_debug_log_format, aztecnr_warn_log_format};\nuse crate::messages::{\n delivery::handshake::{get_handshake_secrets, PROVIDED_SECRETS_ARRAY_BASE_SLOT},\n processing::provided_secret::ProvidedSecret,\n};\nuse crate::partial_notes;\nuse crate::protocol::address::AztecAddress;\n\npub(crate) mod nonce_discovery;\npub(crate) mod private_events;\npub mod private_notes;\npub mod process_message;\n\nuse crate::{\n messages::{\n discovery::process_message::process_message_ciphertext,\n encoding::MAX_MESSAGE_CONTENT_LEN,\n logs::note::MAX_NOTE_PACKED_LEN,\n processing::{\n offchain::OffchainInboxSync, OffchainMessageWithTx, pending_tagged_log::PendingTaggedLog, ResolvedTx,\n validate_and_store_enqueued_notes_and_events,\n },\n },\n oracle::message_processing,\n utils::array,\n};\n\npub struct NoteHashAndNullifier {\n /// The result of [`crate::note::note_interface::NoteHash::compute_note_hash`].\n pub note_hash: Field,\n /// The result of [`crate::note::note_interface::NoteHash::compute_nullifier_unconstrained`].\n ///\n /// This value is unconstrained, as all of message discovery is unconstrained. It is `None` if the nullifier\n /// cannot be computed (e.g. because the nullifier hiding key is not available).\n pub inner_nullifier: Option<Field>,\n}\n\n/// A contract's way of computing note hashes.\n///\n/// Each contract in the network is free to compute their note's hash as they see fit - the hash function itself is not\n/// enshrined or standardized. Some aztec-nr functions however do need to know the details of this computation (e.g.\n/// when finding new notes), which is what this type represents.\n///\n/// This function takes a note's packed content, storage slot, note type ID, address of the emitting contract and\n/// randomness, and attempts to compute its inner note hash (not siloed by address nor uniqued by nonce).\n///\n/// ## Transient Notes\n///\n/// This function is meant to always be used on **settled** notes, i.e. those that have been inserted into the trees\n/// and for which the nonce is known. It is never invoked in the context of a transient note, as those are not involved\n/// in message processing.\n///\n/// ## Automatic Implementation\n///\n/// The [`[#aztec]`](crate::macros::aztec::aztec) macro automatically creates a correct implementation of this function\n/// for each contract by inspecting all note types in use and the storage layout. This injected function is a\n/// `#[contract_library_method]` called `_compute_note_hash`, and it looks something like this:\n///\n/// ```noir\n/// |packed_note, owner, storage_slot, note_type_id, _contract_address, randomness| {\n/// if note_type_id == MyNoteType::get_id() {\n/// if packed_note.len() != MY_NOTE_TYPE_SERIALIZATION_LENGTH {\n/// Option::none()\n/// } else {\n/// let note = MyNoteType::unpack(aztec::utils::array::subarray(packed_note.storage(), 0));\n/// Option::some(note.compute_note_hash(owner, storage_slot, randomness))\n/// }\n/// } else if note_type_id == MyOtherNoteType::get_id() {\n/// ... // Similar to above but calling MyOtherNoteType::unpack\n/// } else {\n/// Option::none() // Unknown note type ID\n/// };\n/// }\n/// ```\npub type ComputeNoteHash = unconstrained fn(/* packed_note */BoundedVec<Field, MAX_NOTE_PACKED_LEN>, /*\n owner */ AztecAddress, /* storage_slot */ Field, /* note_type_id */ Field, /* contract_address */ AztecAddress, /*\nrandomness */ Field) -> Option<Field>;\n\n/// A contract's way of computing note nullifiers.\n///\n/// Like [`ComputeNoteHash`], each contract is free to derive nullifiers as they see fit. This function takes the\n/// unique note hash (used as the note hash for nullification for settled notes), plus the note's packed content and\n/// metadata, and attempts to compute the inner nullifier (not siloed by address).\n///\n/// ## Automatic Implementation\n///\n/// The [`[#aztec]`](crate::macros::aztec::aztec) macro automatically creates a correct implementation of this function\n/// for each contract called `_compute_note_nullifier`. It dispatches on `note_type_id` similarly to\n/// [`ComputeNoteHash`], then calls the note's\n/// [`compute_nullifier_unconstrained`](crate::note::note_interface::NoteHash::compute_nullifier_unconstrained) method.\npub type ComputeNoteNullifier = unconstrained fn(/* unique_note_hash */Field, /* packed_note */ BoundedVec<Field, MAX_NOTE_PACKED_LEN>,\n/* owner */ AztecAddress, /* storage_slot */ Field, /* note_type_id */ Field, /* contract_address */ AztecAddress,\n/* randomness */ Field) -> Option<Field>;\n\n/// Deprecated: use [`ComputeNoteHash`] and [`ComputeNoteNullifier`] instead.\npub type ComputeNoteHashAndNullifier<Env> = unconstrained fn[Env](/* packed_note */BoundedVec<Field, MAX_NOTE_PACKED_LEN>,\n/* owner */ AztecAddress, /* storage_slot */ Field, /* note_type_id */ Field, /* contract_address */ AztecAddress,\n/*randomness */ Field, /* note nonce */ Field) -> Option<NoteHashAndNullifier>;\n\n/// A handler for custom messages.\n///\n/// Contracts that emit custom messages (i.e. any with a message type that is not in [`crate::messages::msg_type`])\n/// need to use [`crate::macros::AztecConfig::custom_message_handler`] with a function of this type in order to\n/// process them. They will otherwise be **silently ignored**.\npub type CustomMessageHandler = unconstrained fn(\n/* contract_address */AztecAddress,\n/* msg_type_id */ u64,\n/* msg_metadata */ u64,\n/* msg_content */ BoundedVec<Field, MAX_MESSAGE_CONTENT_LEN>,\n/* resolved_tx */ ResolvedTx,\n/* scope */ AztecAddress);\n\n/// Custom state synchronization handler.\n///\n/// When set via [`crate::macros::AztecConfig::custom_sync_state`], the generated `sync_state` function will call\n/// this handler instead of [`do_sync_state`]. It receives all of the same parameters, so it can run custom logic\n/// (e.g. fetching and decrypting custom logs) before, after, or instead of calling [`do_sync_state`].\npub type CustomSyncHandler = unconstrained fn(\n/* contract_address */AztecAddress,\n/* compute_note_hash */ ComputeNoteHash,\n/* compute_note_nullifier */ ComputeNoteNullifier,\n/* process_custom_message */ Option<CustomMessageHandler>,\n/* offchain_inbox_sync */ Option<OffchainInboxSync>,\n/* scope */ AztecAddress);\n\n/// Synchronizes the contract's private state with the network.\n///\n/// As blocks are mined, it is possible for a contract's private state to change (e.g. with new notes being created),\n/// but because these changes are private they will be invisible to most actors. This is the function that processes\n/// new transactions in order to discover new notes, events, and other kinds of private state changes.\n///\n/// The private state will be synchronized up to the block that will be used for private transactions (i.e. the anchor\n/// block. This will typically be close to the tip of the chain.\npub unconstrained fn do_sync_state(\n contract_address: AztecAddress,\n compute_note_hash: ComputeNoteHash,\n compute_note_nullifier: ComputeNoteNullifier,\n process_custom_message: Option<CustomMessageHandler>,\n offchain_inbox_sync: Option<OffchainInboxSync>,\n scope: AztecAddress,\n) {\n let provided_secrets = get_handshake_secrets(contract_address, scope);\n sync_state_with_secrets(\n contract_address,\n compute_note_hash,\n compute_note_nullifier,\n process_custom_message,\n offchain_inbox_sync,\n scope,\n provided_secrets,\n );\n}\n\n/// Variant of [`do_sync_state`] that skips handshake secret discovery. Used by the HandshakeRegistry to avoid\n/// infinite recursion (the registry discovers handshakes for other contracts, not for itself).\npub unconstrained fn do_sync_state_without_handshake_discovery(\n contract_address: AztecAddress,\n compute_note_hash: ComputeNoteHash,\n compute_note_nullifier: ComputeNoteNullifier,\n process_custom_message: Option<CustomMessageHandler>,\n offchain_inbox_sync: Option<OffchainInboxSync>,\n scope: AztecAddress,\n) {\n let provided_secrets = EphemeralArray::<ProvidedSecret>::empty_at(PROVIDED_SECRETS_ARRAY_BASE_SLOT);\n sync_state_with_secrets(\n contract_address,\n compute_note_hash,\n compute_note_nullifier,\n process_custom_message,\n offchain_inbox_sync,\n scope,\n provided_secrets,\n );\n}\n\nunconstrained fn sync_state_with_secrets(\n contract_address: AztecAddress,\n compute_note_hash: ComputeNoteHash,\n compute_note_nullifier: ComputeNoteNullifier,\n process_custom_message: Option<CustomMessageHandler>,\n offchain_inbox_sync: Option<OffchainInboxSync>,\n scope: AztecAddress,\n provided_secrets: EphemeralArray<ProvidedSecret>,\n) {\n aztecnr_debug_log!(\"Performing state synchronization\");\n\n let logs = message_processing::get_pending_tagged_logs(scope, provided_secrets);\n logs.for_each(|_i, pending_tagged_log: PendingTaggedLog| {\n if pending_tagged_log.log.len() == 0 {\n aztecnr_warn_log_format!(\"Skipping empty log from tx {0}\")([pending_tagged_log.context.tx_hash]);\n } else {\n aztecnr_debug_log_format!(\"Processing log with tag {0}\")([pending_tagged_log.log.get(0)]);\n\n // We remove the tag from the pending tagged log and process the message ciphertext contained in it.\n let message_ciphertext = array::subbvec(pending_tagged_log.log, 1);\n\n process_message_ciphertext(\n contract_address,\n compute_note_hash,\n compute_note_nullifier,\n process_custom_message,\n message_ciphertext,\n pending_tagged_log.context,\n scope,\n );\n }\n });\n\n if offchain_inbox_sync.is_some() {\n let msgs = offchain_inbox_sync.unwrap()(contract_address, scope);\n msgs.for_each(|_i, msg: OffchainMessageWithTx| {\n process_message_ciphertext(\n contract_address,\n compute_note_hash,\n compute_note_nullifier,\n process_custom_message,\n msg.message_ciphertext,\n msg.resolved_tx,\n scope,\n );\n });\n }\n\n // Then we process all pending partial notes, regardless of whether they were found in the current or previous\n // executions.\n partial_notes::sync(\n contract_address,\n compute_note_hash,\n compute_note_nullifier,\n scope,\n );\n\n // Finally we validate all notes and events that were found as part of the previous processes, resulting in them\n // being added to PXE's database and retrievable via oracles (get_notes) and our TS API (PXE::getPrivateEvents).\n validate_and_store_enqueued_notes_and_events(scope);\n}\n\nmod test {\n use crate::ephemeral::EphemeralArray;\n use crate::messages::{\n delivery::handshake::HandshakePage,\n discovery::{CustomMessageHandler, do_sync_state},\n logs::note::MAX_NOTE_PACKED_LEN,\n processing::{offchain::OffchainInboxSync, pending_tagged_log::PendingTaggedLog},\n };\n use crate::protocol::{address::AztecAddress, traits::Serialize};\n use crate::test::helpers::test_environment::TestEnvironment;\n use std::test::OracleMock;\n\n #[test]\n unconstrained fn do_sync_state_does_not_panic_on_empty_logs() {\n let mut env = TestEnvironment::new();\n let scope = env.create_light_account();\n\n let contract_address = AztecAddress { inner: 0xdeadbeef };\n\n env.utility_context_at(contract_address, |_| {\n // get_handshake_secrets calls the HandshakeRegistry during sync; return an empty page so\n // no tagging secrets are produced.\n let empty_page = HandshakePage { items: BoundedVec::new(), total_count: 0 };\n let _ = OracleMock::mock(\"aztec_utl_callUtilityFunction\").returns(empty_page.serialize());\n\n // Mock the oracle call to return a known base slot, then populate an ephemeral\n // array at that slot so do_sync_state processes a non-empty log list.\n let base_slot = 42;\n let mock = std::test::OracleMock::mock(\"aztec_utl_getPendingTaggedLogsV2\");\n let _ = mock.returns(base_slot);\n\n let logs: EphemeralArray<PendingTaggedLog> = EphemeralArray::at(base_slot);\n logs.push(PendingTaggedLog { log: BoundedVec::new(), context: std::mem::zeroed() });\n assert_eq(logs.len(), 1);\n\n let no_handler: Option<CustomMessageHandler> = Option::none();\n let no_inbox_sync: Option<OffchainInboxSync> = Option::none();\n do_sync_state(\n contract_address,\n dummy_compute_note_hash,\n dummy_compute_note_nullifier,\n no_handler,\n no_inbox_sync,\n scope,\n );\n\n // Guards against the mocked oracle name going stale: if sync stops calling it, the crafted empty log\n // above is never consumed and the test silently stops covering the empty-payload path.\n assert_eq(mock.times_called(), 1);\n });\n }\n\n unconstrained fn dummy_compute_note_hash(\n _packed_note: BoundedVec<Field, MAX_NOTE_PACKED_LEN>,\n _owner: AztecAddress,\n _storage_slot: Field,\n _note_type_id: Field,\n _contract_address: AztecAddress,\n _randomness: Field,\n ) -> Option<Field> {\n Option::none()\n }\n\n unconstrained fn dummy_compute_note_nullifier(\n _unique_note_hash: Field,\n _packed_note: BoundedVec<Field, MAX_NOTE_PACKED_LEN>,\n _owner: AztecAddress,\n _storage_slot: Field,\n _note_type_id: Field,\n _contract_address: AztecAddress,\n _randomness: Field,\n ) -> Option<Field> {\n Option::none()\n }\n}\n"
|
|
352
606
|
},
|
|
353
607
|
"141": {
|
|
@@ -405,7 +659,7 @@
|
|
|
405
659
|
"start": 18937
|
|
406
660
|
}
|
|
407
661
|
],
|
|
408
|
-
"path": "/
|
|
662
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/messages/discovery/nonce_discovery.nr",
|
|
409
663
|
"source": "use crate::messages::{discovery::{ComputeNoteHash, ComputeNoteNullifier}, logs::note::MAX_NOTE_PACKED_LEN};\n\nuse crate::logging::{aztecnr_debug_log_format, aztecnr_warn_log_format};\nuse crate::protocol::{\n address::AztecAddress,\n constants::MAX_NOTE_HASHES_PER_TX,\n hash::{compute_note_hash_nonce, compute_siloed_note_hash, compute_unique_note_hash},\n traits::ToField,\n};\n\n/// A struct with the discovered information of a complete note, required for delivery to PXE. Note that this is *not*\n/// the complete note information, since it does not include content, storage slot, etc.\npub(crate) struct DiscoveredNoteInfo {\n pub(crate) note_nonce: Field,\n pub(crate) note_hash: Field,\n pub(crate) inner_nullifier: Field,\n}\n\n/// Searches for note nonces that will result in a note that was emitted in a transaction. While rare, it is possible\n/// for multiple notes to have the exact same packed content and storage slot but different nonces, resulting in\n/// different unique note hashes. Because of this this function returns a *vector* of discovered notes, though in most\n/// cases it will contain a single element.\n///\n/// Due to how nonces are computed, this function requires knowledge of the transaction in which the note was created,\n/// more specifically the list of all unique note hashes in it plus the value of its first nullifier.\npub(crate) unconstrained fn attempt_note_nonce_discovery(\n unique_note_hashes_in_tx: BoundedVec<Field, MAX_NOTE_HASHES_PER_TX>,\n first_nullifier_in_tx: Field,\n compute_note_hash: ComputeNoteHash,\n compute_note_nullifier: ComputeNoteNullifier,\n contract_address: AztecAddress,\n owner: AztecAddress,\n storage_slot: Field,\n randomness: Field,\n note_type_id: Field,\n packed_note: BoundedVec<Field, MAX_NOTE_PACKED_LEN>,\n) -> BoundedVec<DiscoveredNoteInfo, MAX_NOTE_HASHES_PER_TX> {\n let discovered_notes = &mut BoundedVec::new();\n\n aztecnr_debug_log_format!(\n \"Attempting nonce discovery on {0} potential notes on contract {1} for storage slot {2}\",\n )(\n [unique_note_hashes_in_tx.len() as Field, contract_address.to_field(), storage_slot],\n );\n\n let maybe_note_hash = compute_note_hash(\n packed_note,\n owner,\n storage_slot,\n note_type_id,\n contract_address,\n randomness,\n );\n\n if maybe_note_hash.is_none() {\n aztecnr_warn_log_format!(\n \"Unable to compute note hash for note of id {0} with packed length {1}, skipping nonce discovery\",\n )(\n [note_type_id, packed_note.len() as Field],\n );\n } else {\n let note_hash = maybe_note_hash.unwrap();\n let siloed_note_hash = compute_siloed_note_hash(contract_address, note_hash);\n\n // We need to find nonces (typically just one) that result in the siloed note hash that being uniqued into one\n // of the transaction's effects.\n // The nonce is meant to be derived from the index of the note hash in the transaction effects array. However,\n // due to an issue in the kernels the nonce might actually use any of the possible note hash indices - not\n // necessarily the one that corresponds to the note hash. Hence, we need to try them all.\n for i in 0..MAX_NOTE_HASHES_PER_TX {\n let nonce_for_i = compute_note_hash_nonce(first_nullifier_in_tx, i);\n let unique_note_hash_for_i = compute_unique_note_hash(nonce_for_i, siloed_note_hash);\n\n let matching_notes = bvec_filter(\n unique_note_hashes_in_tx,\n |unique_note_hash_in_tx| unique_note_hash_in_tx == unique_note_hash_for_i,\n );\n if matching_notes.len() > 1 {\n let identical_note_hashes = matching_notes.len();\n // Note that we don't actually check that the note hashes array contains unique values, only that the\n // note we found is unique. We don't expect for this to ever happen (it'd indicate a malicious node or\n // PXE, which are both assumed to be cooperative) so testing for it just in case is unnecessary, but we\n // _do_ need to handle it if we find a duplicate.\n panic(\n f\"Received {identical_note_hashes} identical note hashes for a transaction - these should all be unique\",\n )\n } else if matching_notes.len() == 1 {\n let maybe_inner_nullifier_for_i = compute_note_nullifier(\n unique_note_hash_for_i,\n packed_note,\n owner,\n storage_slot,\n note_type_id,\n contract_address,\n randomness,\n );\n\n if maybe_inner_nullifier_for_i.is_none() {\n // TODO: down the line we want to be able to store notes for which we don't know their nullifier,\n // e.g. notes that belong to someone that is not us (and for which we therefore don't know their\n // associated app-siloed nullifer hiding secret key).\n // https://linear.app/aztec-labs/issue/F-265/store-external-notes\n aztecnr_warn_log_format!(\n \"Unable to compute nullifier of unique note {0} with note type id {1} and owner {2}, skipping PXE insertion\",\n )(\n [unique_note_hash_for_i, note_type_id, owner.to_field()],\n );\n } else {\n // Note that while we did check that the note hash is the preimage of a unique note hash, we\n // perform no validations on the nullifier - we fundamentally cannot, since only the application\n // knows how to compute nullifiers. We simply trust it to have provided the correct one: if it\n // hasn't, then PXE may fail to realize that a given note has been nullified already, and calls to\n // the application could result in invalid transactions (with duplicate nullifiers). This is not a\n // concern because an application already has more direct means of making a call to it fail the\n // transaction.\n discovered_notes.push(\n DiscoveredNoteInfo {\n note_nonce: nonce_for_i,\n note_hash,\n inner_nullifier: maybe_inner_nullifier_for_i.unwrap(),\n },\n );\n }\n // We don't exit the loop - it is possible (though rare) for the exact same note content to be present\n // multiple times in the same transaction with different nonces. This typically doesn't happen due to\n // notes containing random values in order to hide their contents.\n }\n }\n }\n\n *discovered_notes\n}\n\n// There is no BoundedVec::filter in the stdlib, so we use this until that is implemented.\nunconstrained fn bvec_filter<Env, T, let MAX_LEN: u32>(\n bvec: BoundedVec<T, MAX_LEN>,\n filter: fn[Env](T) -> bool,\n) -> BoundedVec<T, MAX_LEN> {\n let filtered = &mut BoundedVec::new();\n\n bvec.for_each(|value| {\n if filter(value) {\n filtered.push(value);\n }\n });\n\n *filtered\n}\n\nmod test {\n use crate::{\n messages::logs::note::MAX_NOTE_PACKED_LEN,\n note::{\n note_interface::{NoteHash, NoteType},\n note_metadata::SettledNoteMetadata,\n utils::compute_note_hash_for_nullification,\n },\n oracle::random::random,\n test::mocks::mock_note::MockNote,\n utils::array,\n };\n\n use crate::protocol::{\n address::AztecAddress,\n hash::{compute_note_hash_nonce, compute_siloed_note_hash, compute_unique_note_hash},\n traits::{FromField, Packable},\n };\n\n use super::attempt_note_nonce_discovery;\n\n // This implementation could be simpler, but this serves as a nice example of the expected flow in a real\n // implementation, and as a sanity check that the interface is sufficient.\n\n unconstrained fn compute_note_hash(\n packed_note: BoundedVec<Field, MAX_NOTE_PACKED_LEN>,\n owner: AztecAddress,\n storage_slot: Field,\n note_type_id: Field,\n _contract_address: AztecAddress,\n randomness: Field,\n ) -> Option<Field> {\n if (note_type_id == MockNote::get_id()) & (packed_note.len() == <MockNote as Packable>::N) {\n let note = MockNote::unpack(array::subarray(packed_note.storage(), 0));\n Option::some(note.compute_note_hash(owner, storage_slot, randomness))\n } else {\n Option::none()\n }\n }\n\n unconstrained fn compute_note_nullifier(\n unique_note_hash: Field,\n packed_note: BoundedVec<Field, MAX_NOTE_PACKED_LEN>,\n owner: AztecAddress,\n _storage_slot: Field,\n note_type_id: Field,\n _contract_address: AztecAddress,\n _randomness: Field,\n ) -> Option<Field> {\n if (note_type_id == MockNote::get_id()) & (packed_note.len() == <MockNote as Packable>::N) {\n let note = MockNote::unpack(array::subarray(packed_note.storage(), 0));\n note.compute_nullifier_unconstrained(owner, unique_note_hash)\n } else {\n Option::none()\n }\n }\n\n global VALUE: Field = 7;\n global FIRST_NULLIFIER_IN_TX: Field = 47;\n global CONTRACT_ADDRESS: AztecAddress = AztecAddress::from_field(13);\n global OWNER: AztecAddress = AztecAddress::from_field(14);\n global STORAGE_SLOT: Field = 99;\n global RANDOMNESS: Field = 99;\n\n #[test]\n unconstrained fn no_note_hashes() {\n let unique_note_hashes_in_tx = BoundedVec::new();\n let packed_note = BoundedVec::new();\n\n let discovered_notes = attempt_note_nonce_discovery(\n unique_note_hashes_in_tx,\n FIRST_NULLIFIER_IN_TX,\n compute_note_hash,\n compute_note_nullifier,\n CONTRACT_ADDRESS,\n OWNER,\n STORAGE_SLOT,\n RANDOMNESS,\n MockNote::get_id(),\n packed_note,\n );\n\n assert_eq(discovered_notes.len(), 0);\n }\n\n #[test]\n unconstrained fn failed_hash_computation_is_ignored() {\n let unique_note_hashes_in_tx = BoundedVec::from_array([random()]);\n\n let discovered_notes = attempt_note_nonce_discovery(\n unique_note_hashes_in_tx,\n FIRST_NULLIFIER_IN_TX,\n |_, _, _, _, _, _| Option::none(),\n compute_note_nullifier,\n CONTRACT_ADDRESS,\n OWNER,\n STORAGE_SLOT,\n RANDOMNESS,\n MockNote::get_id(),\n BoundedVec::new(),\n );\n\n assert_eq(discovered_notes.len(), 0);\n }\n\n #[test]\n unconstrained fn failed_nullifier_computation_is_ignored() {\n let note_index_in_tx = 2;\n let note_and_data = construct_note(VALUE, note_index_in_tx);\n\n let mut unique_note_hashes_in_tx = BoundedVec::from_array([\n random(), random(), random(), random(), random(), random(), random(),\n ]);\n unique_note_hashes_in_tx.set(note_index_in_tx, note_and_data.unique_note_hash);\n\n let discovered_notes = attempt_note_nonce_discovery(\n unique_note_hashes_in_tx,\n FIRST_NULLIFIER_IN_TX,\n compute_note_hash,\n |_, _, _, _, _, _, _| Option::none(),\n CONTRACT_ADDRESS,\n OWNER,\n STORAGE_SLOT,\n RANDOMNESS,\n MockNote::get_id(),\n BoundedVec::from_array(note_and_data.note.pack()),\n );\n\n assert_eq(discovered_notes.len(), 0);\n }\n\n struct NoteAndData {\n note: MockNote,\n note_nonce: Field,\n note_hash: Field,\n unique_note_hash: Field,\n inner_nullifier: Field,\n }\n\n unconstrained fn construct_note(value: Field, note_index_in_tx: u32) -> NoteAndData {\n let note_nonce = compute_note_hash_nonce(FIRST_NULLIFIER_IN_TX, note_index_in_tx);\n\n let hinted_note = MockNote::new(value)\n .contract_address(CONTRACT_ADDRESS)\n .owner(OWNER)\n .randomness(RANDOMNESS)\n .storage_slot(STORAGE_SLOT)\n .note_metadata(SettledNoteMetadata::new(note_nonce).into())\n .build_hinted_note();\n let note = hinted_note.note;\n\n let note_hash = note.compute_note_hash(OWNER, STORAGE_SLOT, RANDOMNESS);\n let unique_note_hash = compute_unique_note_hash(\n note_nonce,\n compute_siloed_note_hash(CONTRACT_ADDRESS, note_hash),\n );\n let inner_nullifier = note\n .compute_nullifier_unconstrained(OWNER, compute_note_hash_for_nullification(hinted_note))\n .expect(f\"Could not compute nullifier for note owned by {OWNER}\");\n\n NoteAndData { note, note_nonce, note_hash, unique_note_hash, inner_nullifier }\n }\n\n #[test]\n unconstrained fn single_note() {\n let note_index_in_tx = 2;\n let note_and_data = construct_note(VALUE, note_index_in_tx);\n\n let mut unique_note_hashes_in_tx = BoundedVec::from_array([\n random(), random(), random(), random(), random(), random(), random(),\n ]);\n unique_note_hashes_in_tx.set(note_index_in_tx, note_and_data.unique_note_hash);\n\n let discovered_notes = attempt_note_nonce_discovery(\n unique_note_hashes_in_tx,\n FIRST_NULLIFIER_IN_TX,\n compute_note_hash,\n compute_note_nullifier,\n CONTRACT_ADDRESS,\n OWNER,\n STORAGE_SLOT,\n RANDOMNESS,\n MockNote::get_id(),\n BoundedVec::from_array(note_and_data.note.pack()),\n );\n\n assert_eq(discovered_notes.len(), 1);\n let discovered_note = discovered_notes.get(0);\n\n assert_eq(discovered_note.note_nonce, note_and_data.note_nonce);\n assert_eq(discovered_note.note_hash, note_and_data.note_hash);\n assert_eq(discovered_note.inner_nullifier, note_and_data.inner_nullifier);\n }\n\n #[test]\n unconstrained fn multiple_notes_same_preimage() {\n let first_note_index_in_tx = 3;\n let first_note_and_data = construct_note(VALUE, first_note_index_in_tx);\n\n let second_note_index_in_tx = 5;\n let second_note_and_data = construct_note(VALUE, second_note_index_in_tx);\n\n // Both notes have the same preimage (and therefore packed representation), so both should be found in the same\n // call.\n assert_eq(first_note_and_data.note, second_note_and_data.note);\n let packed_note = first_note_and_data.note.pack();\n\n let mut unique_note_hashes_in_tx = BoundedVec::from_array([\n random(), random(), random(), random(), random(), random(), random(),\n ]);\n unique_note_hashes_in_tx.set(first_note_index_in_tx, first_note_and_data.unique_note_hash);\n unique_note_hashes_in_tx.set(second_note_index_in_tx, second_note_and_data.unique_note_hash);\n\n let discovered_notes = attempt_note_nonce_discovery(\n unique_note_hashes_in_tx,\n FIRST_NULLIFIER_IN_TX,\n compute_note_hash,\n compute_note_nullifier,\n CONTRACT_ADDRESS,\n OWNER,\n STORAGE_SLOT,\n RANDOMNESS,\n MockNote::get_id(),\n BoundedVec::from_array(packed_note),\n );\n\n assert_eq(discovered_notes.len(), 2);\n\n assert(discovered_notes.any(|discovered_note| {\n (discovered_note.note_nonce == first_note_and_data.note_nonce)\n & (discovered_note.note_hash == first_note_and_data.note_hash)\n & (discovered_note.inner_nullifier == first_note_and_data.inner_nullifier)\n }));\n\n assert(discovered_notes.any(|discovered_note| {\n (discovered_note.note_nonce == second_note_and_data.note_nonce)\n & (discovered_note.note_hash == second_note_and_data.note_hash)\n & (discovered_note.inner_nullifier == second_note_and_data.inner_nullifier)\n }));\n }\n\n #[test]\n unconstrained fn single_note_misaligned_nonce() {\n let note_index_in_tx = 2;\n let note_and_data = construct_note(VALUE, note_index_in_tx);\n\n let mut unique_note_hashes_in_tx = BoundedVec::from_array([\n random(), random(), random(), random(), random(), random(), random(),\n ]);\n\n // The note is not at the correct index\n unique_note_hashes_in_tx.set(note_index_in_tx + 1, note_and_data.unique_note_hash);\n\n let discovered_notes = attempt_note_nonce_discovery(\n unique_note_hashes_in_tx,\n FIRST_NULLIFIER_IN_TX,\n compute_note_hash,\n compute_note_nullifier,\n CONTRACT_ADDRESS,\n OWNER,\n STORAGE_SLOT,\n RANDOMNESS,\n MockNote::get_id(),\n BoundedVec::from_array(note_and_data.note.pack()),\n );\n\n assert_eq(discovered_notes.len(), 1);\n let discovered_note = discovered_notes.get(0);\n\n assert_eq(discovered_note.note_nonce, note_and_data.note_nonce);\n assert_eq(discovered_note.note_hash, note_and_data.note_hash);\n assert_eq(discovered_note.inner_nullifier, note_and_data.inner_nullifier);\n }\n\n #[test]\n unconstrained fn single_note_nonce_with_index_past_note_hashes_in_tx() {\n let mut unique_note_hashes_in_tx = BoundedVec::from_array([\n random(), random(), random(), random(), random(), random(), random(),\n ]);\n\n // The nonce is computed with an index that does not exist in the tx\n let note_index_in_tx = unique_note_hashes_in_tx.len() + 5;\n let note_and_data = construct_note(VALUE, note_index_in_tx);\n\n // The note is inserted at an arbitrary index - its true index is out of the array's bounds\n unique_note_hashes_in_tx.set(2, note_and_data.unique_note_hash);\n\n let discovered_notes = attempt_note_nonce_discovery(\n unique_note_hashes_in_tx,\n FIRST_NULLIFIER_IN_TX,\n compute_note_hash,\n compute_note_nullifier,\n CONTRACT_ADDRESS,\n OWNER,\n STORAGE_SLOT,\n RANDOMNESS,\n MockNote::get_id(),\n BoundedVec::from_array(note_and_data.note.pack()),\n );\n\n assert_eq(discovered_notes.len(), 1);\n let discovered_note = discovered_notes.get(0);\n\n assert_eq(discovered_note.note_nonce, note_and_data.note_nonce);\n assert_eq(discovered_note.note_hash, note_and_data.note_hash);\n assert_eq(discovered_note.inner_nullifier, note_and_data.inner_nullifier);\n }\n\n #[test(should_fail_with = \"identical note hashes for a transaction\")]\n unconstrained fn duplicate_unique_note_hashes() {\n let note_index_in_tx = 2;\n let note_and_data = construct_note(VALUE, note_index_in_tx);\n\n let mut unique_note_hashes_in_tx = BoundedVec::from_array([\n random(), random(), random(), random(), random(), random(), random(),\n ]);\n\n // The same unique note hash is present in two indices in the array, which is not allowed. Note that we don't\n // test all note hashes for uniqueness, only those that we actually find.\n unique_note_hashes_in_tx.set(note_index_in_tx, note_and_data.unique_note_hash);\n unique_note_hashes_in_tx.set(note_index_in_tx + 1, note_and_data.unique_note_hash);\n\n let _ = attempt_note_nonce_discovery(\n unique_note_hashes_in_tx,\n FIRST_NULLIFIER_IN_TX,\n compute_note_hash,\n compute_note_nullifier,\n CONTRACT_ADDRESS,\n OWNER,\n STORAGE_SLOT,\n RANDOMNESS,\n MockNote::get_id(),\n BoundedVec::from_array(note_and_data.note.pack()),\n );\n }\n}\n"
|
|
410
664
|
},
|
|
411
665
|
"142": {
|
|
@@ -415,7 +669,7 @@
|
|
|
415
669
|
"start": 547
|
|
416
670
|
}
|
|
417
671
|
],
|
|
418
|
-
"path": "/
|
|
672
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/messages/discovery/private_events.nr",
|
|
419
673
|
"source": "use crate::{\n event::event_interface::compute_private_serialized_event_commitment,\n logging::aztecnr_warn_log_format,\n messages::{\n encoding::MAX_MESSAGE_CONTENT_LEN, logs::event::decode_private_event_message,\n processing::enqueue_event_for_validation,\n },\n};\nuse crate::protocol::{address::AztecAddress, traits::ToField};\n\npub(crate) unconstrained fn process_private_event_msg(\n contract_address: AztecAddress,\n msg_metadata: u64,\n msg_content: BoundedVec<Field, MAX_MESSAGE_CONTENT_LEN>,\n tx_hash: Field,\n) {\n let decoded = decode_private_event_message(msg_metadata, msg_content);\n\n if decoded.is_some() {\n let (event_type_id, randomness, serialized_event) = decoded.unwrap();\n\n let event_commitment =\n compute_private_serialized_event_commitment(serialized_event, randomness, event_type_id.to_field());\n\n enqueue_event_for_validation(\n contract_address,\n event_type_id,\n randomness,\n serialized_event,\n event_commitment,\n tx_hash,\n );\n } else {\n aztecnr_warn_log_format!(\n \"Could not decode private event message from tx {0}, ignoring\",\n )(\n [tx_hash],\n );\n }\n}\n"
|
|
420
674
|
},
|
|
421
675
|
"143": {
|
|
@@ -429,7 +683,7 @@
|
|
|
429
683
|
"start": 3612
|
|
430
684
|
}
|
|
431
685
|
],
|
|
432
|
-
"path": "/
|
|
686
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/messages/discovery/private_notes.nr",
|
|
433
687
|
"source": "use crate::{\n logging::{aztecnr_debug_log_format, aztecnr_warn_log_format},\n messages::{\n discovery::{ComputeNoteHash, ComputeNoteNullifier, nonce_discovery::attempt_note_nonce_discovery},\n encoding::MAX_MESSAGE_CONTENT_LEN,\n logs::note::{decode_private_note_message, MAX_NOTE_PACKED_LEN},\n processing::enqueue_note_for_validation,\n },\n protocol::{address::AztecAddress, constants::MAX_NOTE_HASHES_PER_TX, traits::ToField},\n};\n\n/// Processes a private note message, attempting to discover and enqueue any notes it contains.\n///\n/// For each note recovered from the message whose computed note hash matches a unique note hash in the transaction,\n/// a [`NoteValidationRequest`](crate::messages::processing::NoteValidationRequest) is pushed onto the ephemeral array\n/// at `NOTE_VALIDATION_REQUESTS_ARRAY_BASE_SLOT` via\n/// [`enqueue_note_for_validation`](crate::messages::processing::enqueue_note_for_validation). PXE later drains this\n/// array during `validate_and_store_enqueued_notes_and_events`, after which the notes are retrievable via `get_notes`.\n///\n/// Messages that fail to decode, or whose computed note hash matches nothing in the transaction, are discarded\n/// (with a debug or warning log respectively) and produce no validation requests. Decode failures are not treated\n/// as errors since messages may originate from malicious senders and we don't want them to be able to brick message\n/// processing.\n///\n/// ## Use Cases\n///\n/// This function is invoked automatically by aztec-nr when handling messages with the built-in private note type id,\n/// so contracts do not normally need to call it directly. It is exposed for use by custom message handlers (see\n/// [`CustomMessageHandler`](crate::messages::discovery::CustomMessageHandler)) that might want to use the standard\n/// note message processing pipeline while extending it with custom logic.\npub unconstrained fn process_private_note_msg(\n contract_address: AztecAddress,\n tx_hash: Field,\n unique_note_hashes_in_tx: BoundedVec<Field, MAX_NOTE_HASHES_PER_TX>,\n first_nullifier_in_tx: Field,\n compute_note_hash: ComputeNoteHash,\n compute_note_nullifier: ComputeNoteNullifier,\n msg_metadata: u64,\n msg_content: BoundedVec<Field, MAX_MESSAGE_CONTENT_LEN>,\n) {\n let decoded = decode_private_note_message(msg_metadata, msg_content);\n\n if decoded.is_some() {\n let (note_type_id, owner, storage_slot, randomness, packed_note) = decoded.unwrap();\n\n attempt_note_discovery(\n contract_address,\n tx_hash,\n unique_note_hashes_in_tx,\n first_nullifier_in_tx,\n compute_note_hash,\n compute_note_nullifier,\n owner,\n storage_slot,\n randomness,\n note_type_id,\n packed_note,\n );\n } else {\n aztecnr_warn_log_format!(\n \"Could not decode private note message from tx {0}, ignoring\",\n )(\n [tx_hash],\n );\n }\n}\n\n/// Attempts discovery of a note given information about its contents and the transaction in which it is suspected the\n/// note was created.\nunconstrained fn attempt_note_discovery(\n contract_address: AztecAddress,\n tx_hash: Field,\n unique_note_hashes_in_tx: BoundedVec<Field, MAX_NOTE_HASHES_PER_TX>,\n first_nullifier_in_tx: Field,\n compute_note_hash: ComputeNoteHash,\n compute_note_nullifier: ComputeNoteNullifier,\n owner: AztecAddress,\n storage_slot: Field,\n randomness: Field,\n note_type_id: Field,\n packed_note: BoundedVec<Field, MAX_NOTE_PACKED_LEN>,\n) {\n let discovered_notes = attempt_note_nonce_discovery(\n unique_note_hashes_in_tx,\n first_nullifier_in_tx,\n compute_note_hash,\n compute_note_nullifier,\n contract_address,\n owner,\n storage_slot,\n randomness,\n note_type_id,\n packed_note,\n );\n\n if discovered_notes.len() == 0 {\n // A private note message that results in no discovered notes means none of the computed note hashes matched\n // any unique note hash in the transaction. This could indicate a malformed or malicious message (e.g. a sender\n // providing bogus note content).\n aztecnr_warn_log_format!(\n \"Discarding private note message from tx {0} for contract {1}: no matching note hash found in the tx\",\n )(\n [tx_hash, contract_address.to_field()],\n );\n } else {\n aztecnr_debug_log_format!(\n \"Discovered {0} notes from a private message for contract {1}\",\n )(\n [discovered_notes.len() as Field, contract_address.to_field()],\n );\n }\n\n discovered_notes.for_each(|discovered_note| {\n enqueue_note_for_validation(\n contract_address,\n owner,\n storage_slot,\n randomness,\n discovered_note.note_nonce,\n packed_note,\n discovered_note.note_hash,\n discovered_note.inner_nullifier,\n tx_hash,\n );\n });\n}\n"
|
|
434
688
|
},
|
|
435
689
|
"144": {
|
|
@@ -443,7 +697,7 @@
|
|
|
443
697
|
"start": 2851
|
|
444
698
|
}
|
|
445
699
|
],
|
|
446
|
-
"path": "/
|
|
700
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/messages/discovery/process_message.nr",
|
|
447
701
|
"source": "use crate::messages::{\n discovery::{\n ComputeNoteHash, ComputeNoteNullifier, CustomMessageHandler, private_events::process_private_event_msg,\n private_notes::process_private_note_msg,\n },\n encoding::{decode_message, MESSAGE_CIPHERTEXT_LEN, MESSAGE_PLAINTEXT_LEN},\n encryption::{aes128::AES128, message_encryption::MessageEncryption},\n msg_type::{\n MIN_CUSTOM_MSG_TYPE_ID, PARTIAL_NOTE_PRIVATE_MSG_TYPE_ID, PRIVATE_EVENT_MSG_TYPE_ID, PRIVATE_NOTE_MSG_TYPE_ID,\n },\n processing::ResolvedTx,\n};\n\nuse crate::logging::{aztecnr_debug_log, aztecnr_warn_log_format};\nuse crate::partial_notes::process_partial_note_private_msg;\nuse crate::protocol::address::AztecAddress;\n\n/// Processes a message that can contain notes, partial notes, or events.\n///\n/// Notes result in nonce discovery being performed prior to delivery, which requires knowledge of the transaction hash\n/// in which the notes would've been created (typically the same transaction in which the log was emitted), along with\n/// the list of unique note hashes in said transaction and the `compute_note_hash` and `compute_note_nullifier`\n/// functions. Once discovered, the notes are enqueued for validation.\n///\n/// Partial notes result in a pending partial note entry being stored in a PXE capsule, which will later be retrieved\n/// to search for the note's completion public log.\n///\n/// Events are processed by computing an event commitment from the serialized event data and its randomness field, then\n/// enqueueing the event data and commitment for validation.\npub unconstrained fn process_message_ciphertext(\n contract_address: AztecAddress,\n compute_note_hash: ComputeNoteHash,\n compute_note_nullifier: ComputeNoteNullifier,\n process_custom_message: Option<CustomMessageHandler>,\n message_ciphertext: BoundedVec<Field, MESSAGE_CIPHERTEXT_LEN>,\n resolved_tx: ResolvedTx,\n recipient: AztecAddress,\n) {\n let message_plaintext_option = AES128::decrypt(message_ciphertext, recipient, contract_address);\n\n if message_plaintext_option.is_some() {\n process_message_plaintext(\n contract_address,\n compute_note_hash,\n compute_note_nullifier,\n process_custom_message,\n message_plaintext_option.unwrap(),\n resolved_tx,\n recipient,\n );\n } else {\n aztecnr_warn_log_format!(\"Could not decrypt message ciphertext from tx {0}, ignoring\")([resolved_tx.tx_hash]);\n }\n}\n\npub(crate) unconstrained fn process_message_plaintext(\n contract_address: AztecAddress,\n compute_note_hash: ComputeNoteHash,\n compute_note_nullifier: ComputeNoteNullifier,\n process_custom_message: Option<CustomMessageHandler>,\n message_plaintext: BoundedVec<Field, MESSAGE_PLAINTEXT_LEN>,\n resolved_tx: ResolvedTx,\n recipient: AztecAddress,\n) {\n // The first thing to do after decrypting the message is to determine what type of message we're processing. We\n // have 3 message types: private notes, partial notes and events.\n\n // We decode the message to obtain the message type id, metadata and content.\n let decoded = decode_message(message_plaintext);\n\n if decoded.is_some() {\n let (msg_type_id, msg_metadata, msg_content) = decoded.unwrap();\n\n if msg_type_id == PRIVATE_NOTE_MSG_TYPE_ID {\n aztecnr_debug_log!(\"Processing private note msg\");\n\n process_private_note_msg(\n contract_address,\n resolved_tx.tx_hash,\n resolved_tx.unique_note_hashes_in_tx,\n resolved_tx.first_nullifier_in_tx,\n compute_note_hash,\n compute_note_nullifier,\n msg_metadata,\n msg_content,\n );\n } else if msg_type_id == PARTIAL_NOTE_PRIVATE_MSG_TYPE_ID {\n aztecnr_debug_log!(\"Processing partial note private msg\");\n\n process_partial_note_private_msg(\n contract_address,\n msg_metadata,\n msg_content,\n resolved_tx,\n recipient,\n );\n } else if msg_type_id == PRIVATE_EVENT_MSG_TYPE_ID {\n aztecnr_debug_log!(\"Processing private event msg\");\n\n process_private_event_msg(\n contract_address,\n msg_metadata,\n msg_content,\n resolved_tx.tx_hash,\n );\n } else if msg_type_id < MIN_CUSTOM_MSG_TYPE_ID {\n // The message type ID falls in the range reserved for aztec.nr built-in types but wasn't matched above.\n // This most likely means the message is malformed or a custom message was incorrectly assigned a reserved\n // ID. Custom message types must use IDs allocated via `custom_msg_type_id`.\n aztecnr_warn_log_format!(\n \"Message type ID {0} is in the reserved range but is not recognized, ignoring. See https://docs.aztec.network/errors/3\",\n )(\n [msg_type_id as Field],\n );\n } else if process_custom_message.is_some() {\n process_custom_message.unwrap()(\n contract_address,\n msg_type_id,\n msg_metadata,\n msg_content,\n resolved_tx,\n recipient,\n );\n } else {\n // A custom message was received but no handler is configured. This likely means the contract emits custom\n // messages but forgot to register a handler via `AztecConfig::custom_message_handler`.\n aztecnr_warn_log_format!(\n \"Received custom message with type id {0} but no handler is configured, ignoring. See https://docs.aztec.network/errors/2\",\n )(\n [msg_type_id as Field],\n );\n }\n } else {\n aztecnr_warn_log_format!(\"Could not decode message plaintext from tx {0}, ignoring\")([resolved_tx.tx_hash]);\n }\n}\n"
|
|
448
702
|
},
|
|
449
703
|
"145": {
|
|
@@ -505,7 +759,7 @@
|
|
|
505
759
|
"start": 13280
|
|
506
760
|
}
|
|
507
761
|
],
|
|
508
|
-
"path": "/
|
|
762
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/messages/encoding.nr",
|
|
509
763
|
"source": "// TODO(#12750): don't make these values assume we're using AES.\nuse crate::protocol::constants::PRIVATE_LOG_CIPHERTEXT_LEN;\nuse crate::utils::array;\n\n// We reassign to the constant here to communicate the distinction between a log and a message. In Aztec.nr, unlike in\n// protocol circuits, we have a concept of a message that can be emitted either as a private log or as an offchain\n// message. Message is a piece of data that is to be eventually delivered to a contract via the `process_message(...)`\n// utility function function that is injected by the #[aztec] macro. Note: PRIVATE_LOG_CIPHERTEXT_LEN is an amount of\n// fields, so MESSAGE_CIPHERTEXT_LEN is the size of the message in fields.\npub global MESSAGE_CIPHERTEXT_LEN: u32 = PRIVATE_LOG_CIPHERTEXT_LEN;\n\n// TODO(#12750): The global variables below should not be here as they are AES128 specific.\n// The header plaintext is 2 bytes (ciphertext length), padded to the 16-byte AES block size by PKCS#7.\npub(crate) global HEADER_CIPHERTEXT_SIZE_IN_BYTES: u32 = 16;\n// AES PKCS#7 always adds at least one byte of padding. Since each plaintext field is 32 bytes (a multiple of the\n// 16-byte AES block size), a full 16-byte padding block is always appended.\npub(crate) global AES128_PKCS7_EXPANSION_IN_BYTES: u32 = 16;\n\npub global EPH_PK_X_SIZE_IN_FIELDS: u32 = 1;\n\n// (15 - 1) * 31 - 16 - 16 = 402. Note: We multiply by 31 because ciphertext bytes are stored in fields using\n// encode_bytes_as_fields, which packs 31 bytes per field (since a Field is ~254 bits and can safely store 31 whole\n// bytes).\npub(crate) global MESSAGE_PLAINTEXT_SIZE_IN_BYTES: u32 = (MESSAGE_CIPHERTEXT_LEN - EPH_PK_X_SIZE_IN_FIELDS) * 31\n - HEADER_CIPHERTEXT_SIZE_IN_BYTES\n - AES128_PKCS7_EXPANSION_IN_BYTES;\n// The plaintext bytes represent Field values that were originally serialized using encode_fields_as_bytes, which\n// converts each Field to 32 bytes. To convert the plaintext bytes back to fields, we divide by 32. 402 / 32 = 12\npub global MESSAGE_PLAINTEXT_LEN: u32 = MESSAGE_PLAINTEXT_SIZE_IN_BYTES / 32;\n\npub global MESSAGE_EXPANDED_METADATA_LEN: u32 = 1;\n\n// The standard message layout is composed of:\n// - an initial field called the 'expanded metadata'\n// - an arbitrary number of fields following that called the 'message content'\n//\n// ```\n// message: [ msg_expanded_metadata, ...msg_content ]\n// ```\n//\n// The expanded metadata itself is interpreted as a u128, of which:\n// - the upper 64 bits are the message type id\n// - the lower 64 bits are called the 'message metadata'\n//\n// ```\n// msg_expanded_metadata: [ msg_type_id | msg_metadata ]\n// <--- 64 bits --->|<--- 64 bits --->\n// ```\n//\n// The meaning of the message metadata and message content depend on the value of the message type id. Note that there\n// is nothing special about the message metadata, it _can_ be considered part of the content. It just has a different\n// name to make it distinct from the message content given that it is not a full field.\n\n/// The maximum length of a message's content, i.e. not including the expanded message metadata.\npub global MAX_MESSAGE_CONTENT_LEN: u32 = MESSAGE_PLAINTEXT_LEN - MESSAGE_EXPANDED_METADATA_LEN;\n\n/// Encodes a message following aztec-nr's standard message encoding. This message can later be decoded with\n/// `decode_message` to retrieve the original values.\n///\n/// - The `msg_type` is an identifier that groups types of messages that are all processed the same way, e.g. private\n/// notes or events. Possible values are defined in `aztec::messages::msg_type`.\n/// - The `msg_metadata` and `msg_content` are the values stored in the message, whose meaning depends on the\n/// `msg_type`. The only special thing about `msg_metadata` that separates it from `msg_content` is that it is a u64\n/// instead of a full Field (due to details of how messages are encoded), allowing applications that can fit values\n/// into this smaller variable to achieve higher data efficiency.\npub fn encode_message<let N: u32>(\n msg_type: u64,\n msg_metadata: u64,\n msg_content: [Field; N],\n) -> [Field; (N + MESSAGE_EXPANDED_METADATA_LEN)] {\n std::static_assert(\n msg_content.len() <= MAX_MESSAGE_CONTENT_LEN,\n \"Invalid message content: it must have a length of at most MAX_MESSAGE_CONTENT_LEN\",\n );\n\n // If MESSAGE_EXPANDED_METADATA_LEN is changed, causing the assertion below to fail, then the destructuring of the\n // message encoding below must be updated as well.\n std::static_assert(\n MESSAGE_EXPANDED_METADATA_LEN == 1,\n \"unexpected value for MESSAGE_EXPANDED_METADATA_LEN\",\n );\n let mut message: [Field; (N + MESSAGE_EXPANDED_METADATA_LEN)] = std::mem::zeroed();\n\n message[0] = to_expanded_metadata(msg_type, msg_metadata);\n for i in 0..msg_content.len() {\n message[MESSAGE_EXPANDED_METADATA_LEN + i] = msg_content[i];\n }\n\n message\n}\n\n/// Decodes a standard aztec-nr message, i.e. one created via `encode_message`, returning the original encoded values.\n///\n/// Returns `None` if the message is empty or has invalid (>128 bit) expanded metadata.\n///\n/// Note that `encode_message` returns a fixed size array while this function takes a `BoundedVec`: this is because\n/// prior to decoding the message type is unknown, and consequentially not known at compile time. If working with\n/// fixed-size messages, consider using `BoundedVec::from_array` to convert them.\npub unconstrained fn decode_message(\n message: BoundedVec<Field, MESSAGE_PLAINTEXT_LEN>,\n) -> Option<(u64, u64, BoundedVec<Field, MAX_MESSAGE_CONTENT_LEN>)> {\n Option::some(message)\n .and_then(|message| {\n // If MESSAGE_EXPANDED_METADATA_LEN is changed, causing the assertion below to fail, then the destructuring\n // of the\n // message encoding below must be updated as well.\n std::static_assert(\n MESSAGE_EXPANDED_METADATA_LEN == 1,\n \"unexpected value for MESSAGE_EXPANDED_METADATA_LEN\",\n );\n if message.len() < MESSAGE_EXPANDED_METADATA_LEN {\n Option::none()\n } else {\n Option::some(message.get(0))\n }\n })\n .and_then(|msg_expanded_metadata| from_expanded_metadata(msg_expanded_metadata))\n .map(|(msg_type_id, msg_metadata)| {\n let msg_content = array::subbvec(message, MESSAGE_EXPANDED_METADATA_LEN);\n (msg_type_id, msg_metadata, msg_content)\n })\n}\n\nglobal U64_SHIFT_MULTIPLIER: Field = 2.pow_32(64);\n\nfn to_expanded_metadata(msg_type: u64, msg_metadata: u64) -> Field {\n // We use multiplication instead of bit shifting operations to shift the type bits as bit shift operations are\n // expensive in circuits.\n let type_field: Field = (msg_type as Field) * U64_SHIFT_MULTIPLIER;\n let msg_metadata_field = msg_metadata as Field;\n\n type_field + msg_metadata_field\n}\n\nglobal TWO_POW_128: Field = 2.pow_32(128);\n\n/// Unpacks expanded metadata into (msg_type, msg_metadata). Returns `None` if `input >= 2^128`.\nfn from_expanded_metadata(input: Field) -> Option<(u64, u64)> {\n if input.lt(TWO_POW_128) {\n let msg_metadata = (input as u64);\n let msg_type = ((input - (msg_metadata as Field)) / U64_SHIFT_MULTIPLIER) as u64;\n // Use division instead of bit shift since bit shifts are expensive in circuits\n Option::some((msg_type, msg_metadata))\n } else {\n Option::none()\n }\n}\n\nmod tests {\n use crate::utils::array::subarray::subarray;\n use super::{\n decode_message, encode_message, from_expanded_metadata, MAX_MESSAGE_CONTENT_LEN, to_expanded_metadata,\n TWO_POW_128,\n };\n\n global U64_MAX: u64 = (2.pow_32(64) - 1) as u64;\n global U128_MAX: Field = (2.pow_32(128) - 1);\n\n #[test]\n unconstrained fn encode_decode_empty_message(msg_type: u64, msg_metadata: u64) {\n let encoded = encode_message(msg_type, msg_metadata, []);\n let (decoded_msg_type, decoded_msg_metadata, decoded_msg_content) =\n decode_message(BoundedVec::from_array(encoded)).unwrap();\n\n assert_eq(decoded_msg_type, msg_type);\n assert_eq(decoded_msg_metadata, msg_metadata);\n assert_eq(decoded_msg_content.len(), 0);\n }\n\n #[test]\n unconstrained fn encode_decode_short_message(\n msg_type: u64,\n msg_metadata: u64,\n msg_content: [Field; MAX_MESSAGE_CONTENT_LEN / 2],\n ) {\n let encoded = encode_message(msg_type, msg_metadata, msg_content);\n let (decoded_msg_type, decoded_msg_metadata, decoded_msg_content) =\n decode_message(BoundedVec::from_array(encoded)).unwrap();\n\n assert_eq(decoded_msg_type, msg_type);\n assert_eq(decoded_msg_metadata, msg_metadata);\n assert_eq(decoded_msg_content.len(), msg_content.len());\n assert_eq(subarray(decoded_msg_content.storage(), 0), msg_content);\n }\n\n #[test]\n unconstrained fn encode_decode_full_message(\n msg_type: u64,\n msg_metadata: u64,\n msg_content: [Field; MAX_MESSAGE_CONTENT_LEN],\n ) {\n let encoded = encode_message(msg_type, msg_metadata, msg_content);\n let (decoded_msg_type, decoded_msg_metadata, decoded_msg_content) =\n decode_message(BoundedVec::from_array(encoded)).unwrap();\n\n assert_eq(decoded_msg_type, msg_type);\n assert_eq(decoded_msg_metadata, msg_metadata);\n assert_eq(decoded_msg_content.len(), msg_content.len());\n assert_eq(subarray(decoded_msg_content.storage(), 0), msg_content);\n }\n\n #[test]\n unconstrained fn to_expanded_metadata_packing() {\n // Test case 1: All bits set\n let packed = to_expanded_metadata(U64_MAX, U64_MAX);\n let (msg_type, msg_metadata) = from_expanded_metadata(packed).unwrap();\n assert_eq(msg_type, U64_MAX);\n assert_eq(msg_metadata, U64_MAX);\n\n // Test case 2: Only log type bits set\n let packed = to_expanded_metadata(U64_MAX, 0);\n let (msg_type, msg_metadata) = from_expanded_metadata(packed).unwrap();\n assert_eq(msg_type, U64_MAX);\n assert_eq(msg_metadata, 0);\n\n // Test case 3: Only msg_metadata bits set\n let packed = to_expanded_metadata(0, U64_MAX);\n let (msg_type, msg_metadata) = from_expanded_metadata(packed).unwrap();\n assert_eq(msg_type, 0);\n assert_eq(msg_metadata, U64_MAX);\n\n // Test case 4: No bits set\n let packed = to_expanded_metadata(0, 0);\n let (msg_type, msg_metadata) = from_expanded_metadata(packed).unwrap();\n assert_eq(msg_type, 0);\n assert_eq(msg_metadata, 0);\n }\n\n #[test]\n unconstrained fn from_expanded_metadata_packing() {\n // Test case 1: All bits set\n let input = U128_MAX as Field;\n let (msg_type, msg_metadata) = from_expanded_metadata(input).unwrap();\n assert_eq(msg_type, U64_MAX);\n assert_eq(msg_metadata, U64_MAX);\n\n // Test case 2: Only log type bits set\n let input = (U128_MAX - U64_MAX as Field);\n let (msg_type, msg_metadata) = from_expanded_metadata(input).unwrap();\n assert_eq(msg_type, U64_MAX);\n assert_eq(msg_metadata, 0);\n\n // Test case 3: Only msg_metadata bits set\n let input = U64_MAX as Field;\n let (msg_type, msg_metadata) = from_expanded_metadata(input).unwrap();\n assert_eq(msg_type, 0);\n assert_eq(msg_metadata, U64_MAX);\n\n // Test case 4: No bits set\n let input = 0;\n let (msg_type, msg_metadata) = from_expanded_metadata(input).unwrap();\n assert_eq(msg_type, 0);\n assert_eq(msg_metadata, 0);\n }\n\n #[test]\n unconstrained fn to_from_expanded_metadata(original_msg_type: u64, original_msg_metadata: u64) {\n let packed = to_expanded_metadata(original_msg_type, original_msg_metadata);\n let (unpacked_msg_type, unpacked_msg_metadata) = from_expanded_metadata(packed).unwrap();\n\n assert_eq(original_msg_type, unpacked_msg_type);\n assert_eq(original_msg_metadata, unpacked_msg_metadata);\n }\n\n #[test]\n unconstrained fn encode_decode_max_size_message() {\n let msg_type_id: u64 = 42;\n let msg_metadata: u64 = 99;\n let mut msg_content = [0; MAX_MESSAGE_CONTENT_LEN];\n for i in 0..MAX_MESSAGE_CONTENT_LEN {\n msg_content[i] = i as Field;\n }\n\n let encoded = encode_message(msg_type_id, msg_metadata, msg_content);\n let (decoded_type_id, decoded_metadata, decoded_content) =\n decode_message(BoundedVec::from_array(encoded)).unwrap();\n\n assert_eq(decoded_type_id, msg_type_id);\n assert_eq(decoded_metadata, msg_metadata);\n assert_eq(decoded_content, BoundedVec::from_array(msg_content));\n }\n\n #[test(should_fail_with = \"Invalid message content: it must have a length of at most MAX_MESSAGE_CONTENT_LEN\")]\n fn encode_oversized_message_fails() {\n let msg_content = [0; MAX_MESSAGE_CONTENT_LEN + 1];\n let _ = encode_message(0, 0, msg_content);\n }\n\n #[test]\n unconstrained fn decode_empty_message_returns_none() {\n assert(decode_message(BoundedVec::new()).is_none());\n }\n\n #[test]\n unconstrained fn decode_message_with_oversized_metadata_returns_none() {\n let message = BoundedVec::from_array([TWO_POW_128]);\n assert(decode_message(message).is_none());\n }\n}\n"
|
|
510
764
|
},
|
|
511
765
|
"146": {
|
|
@@ -591,7 +845,7 @@
|
|
|
591
845
|
"start": 33413
|
|
592
846
|
}
|
|
593
847
|
],
|
|
594
|
-
"path": "/
|
|
848
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/messages/encryption/aes128.nr",
|
|
595
849
|
"source": "use crate::protocol::{address::AztecAddress, public_keys::AddressPoint, traits::ToField};\n\nuse crate::{\n keys::{\n ecdh_shared_secret::{\n compute_app_siloed_shared_secret, derive_ecdh_shared_secret, derive_shared_secret_field_mask,\n derive_shared_secret_subkey,\n },\n ephemeral::generate_positive_ephemeral_key_pair,\n },\n logging::aztecnr_warn_log_format,\n messages::{\n encoding::{\n EPH_PK_X_SIZE_IN_FIELDS, HEADER_CIPHERTEXT_SIZE_IN_BYTES, MESSAGE_CIPHERTEXT_LEN, MESSAGE_PLAINTEXT_LEN,\n MESSAGE_PLAINTEXT_SIZE_IN_BYTES,\n },\n encryption::message_encryption::MessageEncryption,\n logs::arithmetic_generics_utils::{\n get_arr_of_size__message_bytes__from_PT, get_arr_of_size__message_bytes_padding__from_PT,\n },\n },\n oracle::{aes128_decrypt::try_aes128_decrypt, random::random, shared_secret::get_shared_secret},\n utils::{\n array,\n conversion::{\n bytes_as_fields::{decode_bytes_from_fields, encode_bytes_as_fields},\n fields_as_bytes::{encode_fields_as_bytes, try_decode_fields_from_bytes},\n },\n point::point_from_x_coord_and_sign,\n },\n};\n\nuse std::aes128::aes128_encrypt;\n\n/// Computes N close-to-uniformly-random 256 bits from a given app-siloed shared secret.\n///\n/// NEVER re-use the same iv and sym_key. DO NOT call this function more than once with the same s_app.\n///\n/// This function is only known to be safe if s_app is derived from combining a random ephemeral key with an\n/// address point and a contract address. See big comment within the body of the function.\nfn extract_many_close_to_uniformly_random_256_bits_using_poseidon2<let N: u32>(s_app: Field) -> [[u8; 32]; N] {\n /*\n * Unsafe because of https://eprint.iacr.org/2010/264.pdf Page 13, Lemma 2 (and the two paragraphs below it).\n *\n * If you call this function, you need to be careful and aware of how the arg `s_app` has been derived.\n *\n * The paper says that the way you derive aes keys and IVs should be fine with poseidon2 (modelled as a RO),\n * as long as you _don't_ use Poseidon2 as a PRG to generate the two exponents x & y which multiply to the\n * shared secret S:\n *\n * S = [x*y]*G.\n *\n * (Otherwise, you would have to \"key\" poseidon2, i.e. generate a uniformly string K which can be public and\n * compute Hash(x) as poseidon(K,x)).\n * In that lemma, k would be 2*254=508, and m would be the number of points on the grumpkin curve (which is\n * close to r according to the Hasse bound).\n *\n * Our shared secret S is [esk * address_sk] * G, and the question is: Can we compute hash(S) using poseidon2\n * instead of sha256?\n *\n * Well, esk is random and not generated with poseidon2, so that's good.\n * What about address_sk?\n * Well, address_sk = poseidon2(stuff) + ivsk, so there was some discussion about whether address_sk is\n * independent of poseidon2. Given that ivsk is random and independent of poseidon2, the address_sk is also\n * independent of poseidon2.\n *\n * Tl;dr: we believe it's safe to hash S = [esk * address_sk] * G using poseidon2, in order to derive a\n * symmetric key.\n *\n * If you're calling this function for a differently-derived `s_app`, be careful.\n */\n \n\n /* The output of this function needs to be 32 random bytes.\n * A single field won't give us 32 bytes of entropy. So we compute two \"random\" fields, by poseidon-hashing\n * with two different indices. We then extract the last 16 (big endian) bytes of each \"random\" field.\n * Note: we use to_be_bytes because it's slightly more efficient. But we have to be careful not to take bytes\n * from the \"big end\", because the \"big\" byte is not uniformly random over the byte: it only has < 6 bits of\n * randomness, because it's the big end of a 254-bit field element.\n */\n\n let mut all_bytes: [[u8; 32]; N] = std::mem::zeroed();\n std::static_assert(N < 256, \"N too large\");\n for k in 0..N {\n let rand1: Field = derive_shared_secret_subkey(s_app, 2 * k);\n let rand2: Field = derive_shared_secret_subkey(s_app, 2 * k + 1);\n\n let rand1_bytes: [u8; 32] = rand1.to_be_bytes();\n let rand2_bytes: [u8; 32] = rand2.to_be_bytes();\n\n let mut bytes: [u8; 32] = [0; 32];\n for i in 0..16 {\n // We take bytes from the \"little end\" of the be-bytes arrays:\n let j = 32 - i - 1;\n bytes[i] = rand1_bytes[j];\n bytes[16 + i] = rand2_bytes[j];\n }\n\n all_bytes[k] = bytes;\n }\n\n all_bytes\n}\n\nfn derive_aes_symmetric_key_and_iv_from_uniformly_random_256_bits<let N: u32>(\n many_random_256_bits: [[u8; 32]; N],\n) -> [([u8; 16], [u8; 16]); N] {\n // Many (sym_key, iv) pairs:\n let mut many_pairs: [([u8; 16], [u8; 16]); N] = std::mem::zeroed();\n for k in 0..N {\n let random_256_bits = many_random_256_bits[k];\n let mut sym_key = [0; 16];\n let mut iv = [0; 16];\n for i in 0..16 {\n sym_key[i] = random_256_bits[i];\n iv[i] = random_256_bits[i + 16];\n }\n many_pairs[k] = (sym_key, iv);\n }\n\n many_pairs\n}\n\npub fn derive_aes_symmetric_key_and_iv_from_shared_secret<let N: u32>(s_app: Field) -> [([u8; 16], [u8; 16]); N] {\n let many_random_256_bits: [[u8; 32]; N] = extract_many_close_to_uniformly_random_256_bits_using_poseidon2(s_app);\n\n derive_aes_symmetric_key_and_iv_from_uniformly_random_256_bits(many_random_256_bits)\n}\n\npub struct AES128 {}\n\nimpl MessageEncryption for AES128 {\n\n /// AES128-CBC encryption for Aztec protocol messages.\n ///\n /// ## Overview\n ///\n /// The plaintext is an array of up to `MESSAGE_PLAINTEXT_LEN` (12) fields. The output is always exactly\n /// `MESSAGE_CIPHERTEXT_LEN` (15) fields, regardless of plaintext size. All output fields except the\n /// ephemeral public key are uniformly random `Field` values to any observer without knowledge of the\n /// shared secret, making all encrypted messages indistinguishable by size or content.\n ///\n /// ## PKCS#7 Padding\n ///\n /// AES operates on 16-byte blocks, so the plaintext must be padded to a multiple of 16. PKCS#7 padding always\n /// adds at least 1 byte (so the receiver can always detect and strip it), which means:\n /// - 1 B plaintext -> 15 B padding -> 16 B total\n /// - 15 B plaintext -> 1 B padding -> 16 B total\n /// - 16 B plaintext -> 16 B padding -> 32 B total (full extra block)\n ///\n /// In general: if the plaintext is already a multiple of 16, a full 16-byte padding block is appended.\n ///\n /// ## Encryption Steps\n ///\n /// **1. Body encryption.** The plaintext fields are serialized to bytes (32 bytes per field) and AES-128-CBC\n /// encrypted. Since 32 is a multiple of 16, PKCS#7 always adds a full 16-byte padding block (see above):\n ///\n /// ```text\n /// +---------------------------------------------+\n /// | body ct |\n /// | PlaintextLen*32 + 16 B |\n /// +-------------------------------+--------------+\n /// | encrypted plaintext fields | PKCS#7 (16B) |\n /// | (serialized at 32 B each) | |\n /// +-------------------------------+--------------+\n /// ```\n ///\n /// **2. Header encryption.** The byte length of `body_ct` is stored as a 2-byte big-endian integer. This 2-byte\n /// header plaintext is then AES-encrypted; PKCS#7 pads the remaining 14 bytes to fill one 16-byte AES block,\n /// producing a 16-byte header ciphertext:\n ///\n /// ```text\n /// +---------------------------+\n /// | header ct |\n /// | 16 B |\n /// +--------+------------------+\n /// | body ct| PKCS#7 (14B) |\n /// | length | |\n /// | (2 B) | |\n /// +--------+------------------+\n /// ```\n ///\n /// ## Wire Format\n ///\n /// Messages are transmitted as fields, not bytes. A field is ~254 bits and can safely store 31 whole bytes, so\n /// we need to pack our byte data into 31-byte chunks. This packing drives the wire format.\n ///\n /// **Step 1 -- Assemble bytes.** The ciphertexts are laid out in a byte array, padded with zero bytes to a\n /// multiple of 31 so it divides evenly into fields:\n ///\n /// ```text\n /// +------------+-------------------------+---------+\n /// | header ct | body ct | byte pad|\n /// | 16 B | PlaintextLen*32 + 16 B | (zeros) |\n /// +------------+-------------------------+---------+\n /// |<-------- padded to a multiple of 31 B -------->|\n /// ```\n ///\n /// **Step 2 -- Pack and mask.** The byte array is split into 31-byte chunks, each stored in one field. A\n /// Poseidon2-derived mask (see `derive_shared_secret_field_mask`) is added to each so that the resulting\n /// fields appear as uniformly random `Field` values to any observer without knowledge of the shared secret,\n /// hiding the fact that the underlying ciphertext consists of 128-bit AES blocks.\n ///\n /// **Step 3 -- Assemble ciphertext.** The ephemeral public key x-coordinate is prepended and random field padding\n /// is appended to fill to 15 fields:\n ///\n /// ```text\n /// +----------+-------------------------+-------------------+\n /// | eph_pk.x | masked message fields | random field pad |\n /// | | (packed 31 B per field) | (fills to 15) |\n /// +----------+-------------------------+-------------------+\n /// |<---------- MESSAGE_CIPHERTEXT_LEN = 15 fields -------->|\n /// ```\n ///\n /// ## Key Derivation\n ///\n /// The raw ECDH shared secret point is first app-siloed into a scalar `s_app` by hashing with the contract\n /// address (see\n /// [`compute_app_siloed_shared_secret`](crate::keys::ecdh_shared_secret::compute_app_siloed_shared_secret)).\n /// Two (key, IV) pairs are then derived from `s_app` via indexed Poseidon2 hashing: one pair for the body\n /// ciphertext and one for the header ciphertext.\n fn encrypt<let PlaintextLen: u32>(\n plaintext: [Field; PlaintextLen],\n recipient: AztecAddress,\n contract_address: AztecAddress,\n ) -> [Field; MESSAGE_CIPHERTEXT_LEN] {\n std::static_assert(\n PlaintextLen <= MESSAGE_PLAINTEXT_LEN,\n \"Plaintext length exceeds MESSAGE_PLAINTEXT_LEN\",\n );\n\n // AES 128 operates on bytes, not fields, so we need to convert the fields to bytes. (This process is then\n // reversed when processing the message in `process_message_ciphertext`)\n let plaintext_bytes = encode_fields_as_bytes(plaintext);\n\n // Derive ECDH shared secret with recipient using a fresh ephemeral keypair.\n let (eph_sk, eph_pk) = generate_positive_ephemeral_key_pair();\n\n let raw_shared_secret = derive_ecdh_shared_secret(\n eph_sk,\n recipient\n .to_address_point()\n .unwrap_or_else(|| {\n aztecnr_warn_log_format!(\n \"Attempted to encrypt message for an invalid recipient ({0})\",\n )(\n [recipient.to_field()],\n );\n\n // Safety: if the recipient is an invalid address, then it is not possible to encrypt a message for\n // them because we cannot establish a shared secret. This is never expected to occur during normal\n // operation. However, it is technically possible for us to receive an invalid address, and we must\n // therefore handle it. We could simply fail, but that'd introduce a potential security issue in\n // which an attacker forces a contract to encrypt a message for an invalid address, resulting in an\n // impossible transaction - this is sometimes called a 'king of the hill' attack. We choose instead\n // to not fail and encrypt the plaintext regardless using the shared secret that results from a\n // random valid address. The sender is free to choose this address and hence shared secret, but\n // this has no security implications as they already know not only the full plaintext but also the\n // ephemeral private key anyway.\n unsafe {\n random_address_point()\n }\n })\n .inner,\n );\n\n let s_app = compute_app_siloed_shared_secret(raw_shared_secret, contract_address);\n\n // It is safe to derive AES keys from `s_app` using Poseidon2 because `s_app` was derived from an ECDH shared\n // secret using an AztecAddress (the recipient). See the block comment in\n // `extract_many_close_to_uniformly_random_256_bits_using_poseidon2` for more info.\n let pairs = derive_aes_symmetric_key_and_iv_from_shared_secret::<2>(s_app);\n let (body_sym_key, body_iv) = pairs[0];\n let (header_sym_key, header_iv) = pairs[1];\n\n let ciphertext_bytes = aes128_encrypt(plaintext_bytes, body_iv, body_sym_key);\n\n // Each plaintext field is 32 bytes (a multiple of the 16-byte AES block\n // size), so PKCS#7 always appends a full 16-byte padding block:\n // |ciphertext| = PlaintextLen*32 + 16 = 16 * (1 + PlaintextLen*32 / 16)\n std::static_assert(\n ciphertext_bytes.len() == 16 * (1 + (PlaintextLen * 32) / 16),\n \"unexpected ciphertext length\",\n );\n\n // Encrypt a 2-byte header containing the body ciphertext length.\n let header_plaintext = encode_header(ciphertext_bytes.len());\n\n // Note: the aes128_encrypt builtin fn automatically appends bytes to the input, according to pkcs#7; hence why\n // the output `header_ciphertext_bytes` is 16 bytes larger than the input in this case.\n let header_ciphertext_bytes = aes128_encrypt(header_plaintext, header_iv, header_sym_key);\n // Verify expected header ciphertext size at compile time.\n std::static_assert(\n header_ciphertext_bytes.len() == HEADER_CIPHERTEXT_SIZE_IN_BYTES,\n \"unexpected ciphertext header length\",\n );\n\n // Assemble the message byte array:\n // [header_ct (16B)] [body_ct] [padding to mult of 31]\n let message_bytes_padding_to_mult_31 = get_arr_of_size__message_bytes_padding__from_PT::<PlaintextLen * 32>();\n\n let mut message_bytes = get_arr_of_size__message_bytes__from_PT::<PlaintextLen * 32>();\n\n std::static_assert(\n message_bytes.len() % 31 == 0,\n \"Unexpected error: message_bytes.len() should be divisible by 31, by construction.\",\n );\n\n let mut offset = 0;\n for i in 0..header_ciphertext_bytes.len() {\n message_bytes[offset + i] = header_ciphertext_bytes[i];\n }\n offset += header_ciphertext_bytes.len();\n\n for i in 0..ciphertext_bytes.len() {\n message_bytes[offset + i] = ciphertext_bytes[i];\n }\n offset += ciphertext_bytes.len();\n\n for i in 0..message_bytes_padding_to_mult_31.len() {\n message_bytes[offset + i] = message_bytes_padding_to_mult_31[i];\n }\n offset += message_bytes_padding_to_mult_31.len();\n\n // Ideally we would be able to have a static assert where we check that the offset would be such that we've\n // written to the entire log_bytes array, but we cannot since Noir does not treat the offset as a comptime\n // value (despite the values that it goes through being known at each stage). We instead check that the\n // computation used to obtain the offset computes the expected value (which we _can_ do in a static check), and\n // then add a cheap runtime check to also validate that the offset matches this.\n std::static_assert(\n header_ciphertext_bytes.len() + ciphertext_bytes.len() + message_bytes_padding_to_mult_31.len()\n == message_bytes.len(),\n \"unexpected message length\",\n );\n assert(offset == message_bytes.len(), \"unexpected encrypted message length\");\n\n // Pack message bytes into fields (31 bytes per field) and prepend eph_pk.x.\n let message_bytes_as_fields = encode_bytes_as_fields(message_bytes);\n\n let mut ciphertext: [Field; MESSAGE_CIPHERTEXT_LEN] = [0; MESSAGE_CIPHERTEXT_LEN];\n\n ciphertext[0] = eph_pk.x;\n\n // Mask each content field with a Poseidon2-derived value, so that they appear as uniformly random `Field`\n // values\n let mut offset = 1;\n for i in 0..message_bytes_as_fields.len() {\n let mask = derive_shared_secret_field_mask(s_app, i as u32);\n ciphertext[offset + i] = message_bytes_as_fields[i] + mask;\n }\n offset += message_bytes_as_fields.len();\n\n // Pad with random fields so that padding is indistinguishable from masked data fields.\n for i in offset..MESSAGE_CIPHERTEXT_LEN {\n // Safety: we assume that the sender wants for the message to be private - a malicious one could simply\n // reveal its contents publicly. It is therefore fine to trust the sender to provide random padding.\n ciphertext[i] = unsafe { random() };\n }\n\n ciphertext\n }\n\n unconstrained fn decrypt(\n ciphertext: BoundedVec<Field, MESSAGE_CIPHERTEXT_LEN>,\n recipient: AztecAddress,\n contract_address: AztecAddress,\n ) -> Option<BoundedVec<Field, MESSAGE_PLAINTEXT_LEN>> {\n // Extract the ephemeral public key x-coordinate and masked fields, returning None for empty ciphertext.\n if ciphertext.len() > 0 {\n let masked_fields: BoundedVec<Field, MESSAGE_CIPHERTEXT_LEN - EPH_PK_X_SIZE_IN_FIELDS> =\n array::subbvec(ciphertext, EPH_PK_X_SIZE_IN_FIELDS);\n Option::some((ciphertext.get(0), masked_fields))\n } else {\n Option::none()\n }\n .and_then(|(eph_pk_x, masked_fields)| {\n // With the x-coordinate of the ephemeral public key we can reconstruct the point as we know that the\n // y-coordinate must be positive. This may fail however, as not all x-coordinates are on the curve. In\n // that case, we simply return `Option::none`. Secret derivation may also fail when the PXE does not\n // hold the recipient's keys (e.g. when syncing the scope of an address we don't control), in which\n // case the message is undecryptable and equally skipped.\n point_from_x_coord_and_sign(eph_pk_x, true)\n .and_then(|eph_pk| get_shared_secret(recipient, eph_pk, contract_address))\n .and_then(|s_app| {\n let unmasked_fields = masked_fields.mapi(|i, field| {\n let unmasked = unmask_field(s_app, i, field);\n // If we failed to unmask the field, we are dealing with the random padding. We'll ignore it\n // later, so we can simply set it to 0\n unmasked.unwrap_or(0)\n });\n let ciphertext_without_eph_pk_x = decode_bytes_from_fields(unmasked_fields);\n\n // Derive symmetric keys:\n let pairs = derive_aes_symmetric_key_and_iv_from_shared_secret::<2>(s_app);\n let (body_sym_key, body_iv) = pairs[0];\n let (header_sym_key, header_iv) = pairs[1];\n\n // Extract the header ciphertext\n let header_start = 0;\n let header_ciphertext: [u8; HEADER_CIPHERTEXT_SIZE_IN_BYTES] =\n array::subarray(ciphertext_without_eph_pk_x.storage(), header_start);\n // We need to convert the array to a BoundedVec because the oracle expects a BoundedVec as it's\n // designed to work with messages with unknown length at compile time. This would not be\n // necessary here as the header ciphertext length is fixed. But we do it anyway to not have to\n // have duplicate oracles.\n let header_ciphertext_bvec =\n BoundedVec::<u8, HEADER_CIPHERTEXT_SIZE_IN_BYTES>::from_array(header_ciphertext);\n\n try_aes128_decrypt(header_ciphertext_bvec, header_iv, header_sym_key)\n // Extract ciphertext length from header (2 bytes, big-endian)\n .and_then(|header_plaintext| extract_ciphertext_length(header_plaintext))\n .filter(|ciphertext_length| ciphertext_length <= MESSAGE_PLAINTEXT_SIZE_IN_BYTES)\n .map(|ciphertext_length| {\n // Extract and decrypt main ciphertext\n let ciphertext_start = header_start + HEADER_CIPHERTEXT_SIZE_IN_BYTES;\n let ciphertext_with_padding: [u8; MESSAGE_PLAINTEXT_SIZE_IN_BYTES] =\n array::subarray(ciphertext_without_eph_pk_x.storage(), ciphertext_start);\n BoundedVec::from_parts(ciphertext_with_padding, ciphertext_length)\n })\n // Decrypt main ciphertext and return it\n .and_then(|ciphertext| try_aes128_decrypt(ciphertext, body_iv, body_sym_key))\n // Convert bytes back to fields (32 bytes per field). Returns None if the actual bytes are\n // not valid.\n .and_then(|plaintext_bytes| try_decode_fields_from_bytes(plaintext_bytes))\n })\n })\n }\n}\n\n/// Encodes the body ciphertext length into a 2-byte big-endian header.\nfn encode_header(ciphertext_length: u32) -> [u8; 2] {\n [(ciphertext_length >> 8) as u8, ciphertext_length as u8]\n}\n\n/// Extracts the body ciphertext length from a decrypted header as a 2-byte big-endian integer.\n///\n/// Returns `Option::none()` if the header has fewer than 2 bytes.\nunconstrained fn extract_ciphertext_length<let N: u32>(header: BoundedVec<u8, N>) -> Option<u32> {\n if header.len() >= 2 {\n Option::some(((header.get(0) as u32) << 8) | (header.get(1) as u32))\n } else {\n Option::none()\n }\n}\n\n/// 2^248: upper bound for values that fit in 31 bytes\nglobal TWO_POW_248: Field = 2.pow_32(248);\n\n/// Removes the Poseidon2-derived mask from a ciphertext field. Returns the unmasked value if it fits in 31 bytes\n/// (a content field), or `None` if it doesn't (random padding). Unconstrained to prevent accidental use in\n/// constrained context.\nunconstrained fn unmask_field(s_app: Field, index: u32, masked: Field) -> Option<Field> {\n let unmasked = masked - derive_shared_secret_field_mask(s_app, index);\n if unmasked.lt(TWO_POW_248) {\n Option::some(unmasked)\n } else {\n Option::none()\n }\n}\n\n/// Produces a random valid address point, i.e. one that is on the curve. This is equivalent to calling\n/// [`AztecAddress::to_address_point`] on a random valid address.\nunconstrained fn random_address_point() -> AddressPoint {\n let mut result = std::mem::zeroed();\n\n loop {\n // We simply produce random x coordinates until we find one that is on the curve. About half of the x\n // coordinates fulfill this condition, so this should only take a few iterations at most.\n let x_coord = random();\n let point = point_from_x_coord_and_sign(x_coord, true);\n if point.is_some() {\n result = AddressPoint { inner: point.unwrap() };\n break;\n }\n }\n\n result\n}\n\nmod test {\n use crate::{\n ephemeral::EphemeralArray,\n keys::ecdh_shared_secret::{compute_app_siloed_shared_secret, derive_ecdh_shared_secret},\n messages::{\n encoding::{HEADER_CIPHERTEXT_SIZE_IN_BYTES, MESSAGE_PLAINTEXT_LEN, MESSAGE_PLAINTEXT_SIZE_IN_BYTES},\n encryption::message_encryption::MessageEncryption,\n },\n test::helpers::test_environment::TestEnvironment,\n };\n use crate::protocol::{address::AztecAddress, traits::FromField};\n use super::{AES128, encode_header, random_address_point};\n use std::{embedded_curve_ops::EmbeddedCurveScalar, test::OracleMock};\n\n #[test]\n unconstrained fn encrypt_decrypt_deterministic() {\n let env = TestEnvironment::new();\n\n // Message decryption requires oracles that are only available during private execution\n env.private_context(|context| {\n let contract_address = context.this_address();\n let plaintext = [1, 2, 3];\n\n let recipient = AztecAddress::from_field(\n 0x25afb798ea6d0b8c1618e50fdeafa463059415013d3b7c75d46abf5e242be70c,\n );\n\n // Mock random values for deterministic test\n let eph_sk = 0x1358d15019d4639393d62b97e1588c095957ce74a1c32d6ec7d62fe6705d9538;\n let _ = OracleMock::mock(\"aztec_misc_getRandomField\").returns(eph_sk).times(1);\n\n let randomness = 0x0101010101010101010101010101010101010101010101010101010101010101;\n let _ = OracleMock::mock(\"aztec_misc_getRandomField\").returns(randomness).times(1000000);\n\n // Encrypt the message\n let encrypted_message = BoundedVec::from_array(AES128::encrypt(plaintext, recipient, contract_address));\n\n // Compute the same app-siloed shared secret that the oracle would return\n let raw_shared_secret = derive_ecdh_shared_secret(\n EmbeddedCurveScalar::from_field(eph_sk),\n recipient.to_address_point().unwrap().inner,\n );\n let s_app = compute_app_siloed_shared_secret(raw_shared_secret, contract_address);\n\n // The shared-secrets oracle is batched: it returns a slot pointing at an EphemeralArray\n // populated with the per-key results. Set up that array with the single expected `s_app`\n // and mock the oracle to return its slot.\n let response_slot: Field = 99;\n let response_array: EphemeralArray<Field> = EphemeralArray::at(response_slot);\n response_array.push(s_app);\n let _ = OracleMock::mock(\"aztec_utl_getSharedSecrets\").returns(response_slot);\n\n // Decrypt the message\n let decrypted = AES128::decrypt(encrypted_message, recipient, contract_address).unwrap();\n\n // The decryption function spits out a BoundedVec because it's designed to work with messages with unknown\n // length at compile time. For this reason we need to convert the original input to a BoundedVec.\n let plaintext_bvec = BoundedVec::<Field, MESSAGE_PLAINTEXT_LEN>::from_array(plaintext);\n\n // Verify decryption matches original plaintext\n assert_eq(decrypted, plaintext_bvec, \"Decrypted bytes should match original plaintext\");\n\n // The following is a workaround of \"struct is never constructed\" Noir compilation error (we only ever use\n // static methods of the struct).\n let _ = AES128 {};\n });\n }\n\n #[test]\n unconstrained fn encrypt_decrypt_random() {\n // Same as `encrypt_decrypt_deterministic`, except we don't mock any of the oracles and rely on\n // `TestEnvironment` instead.\n let mut env = TestEnvironment::new();\n\n let recipient = env.create_light_account();\n\n env.private_context(|context| {\n let contract_address = context.this_address();\n let plaintext = [1, 2, 3];\n let ciphertext = AES128::encrypt(plaintext, recipient, contract_address);\n\n assert_eq(\n AES128::decrypt(\n BoundedVec::from_array(ciphertext),\n recipient,\n contract_address,\n )\n .unwrap(),\n BoundedVec::from_array(plaintext),\n );\n });\n }\n\n #[test]\n unconstrained fn encrypt_to_invalid_address() {\n // x = 3 is a non-residue for this curve, resulting in an invalid address\n let invalid_address = AztecAddress { inner: 3 };\n let contract_address = AztecAddress { inner: 42 };\n\n let _ = AES128::encrypt([1, 2, 3, 4], invalid_address, contract_address);\n }\n\n // Documents the PKCS#7 padding behavior that `encrypt` relies on (see its static_assert).\n #[test]\n fn pkcs7_padding_always_adds_at_least_one_byte() {\n let key = [0 as u8; 16];\n let iv = [0 as u8; 16];\n\n // 1 byte input + 15 bytes padding = 16 bytes\n assert_eq(std::aes128::aes128_encrypt([0; 1], iv, key).len(), 16);\n\n // 15 bytes input + 1 byte padding = 16 bytes\n assert_eq(std::aes128::aes128_encrypt([0; 15], iv, key).len(), 16);\n\n // 16 bytes input (block-aligned) + full 16-byte padding block = 32 bytes\n assert_eq(std::aes128::aes128_encrypt([0; 16], iv, key).len(), 32);\n }\n\n #[test]\n unconstrained fn encrypt_decrypt_max_size_plaintext() {\n let mut env = TestEnvironment::new();\n let recipient = env.create_light_account();\n\n env.private_context(|context| {\n let contract_address = context.this_address();\n let mut plaintext = [0; MESSAGE_PLAINTEXT_LEN];\n for i in 0..MESSAGE_PLAINTEXT_LEN {\n plaintext[i] = i as Field;\n }\n let ciphertext = AES128::encrypt(plaintext, recipient, contract_address);\n\n assert_eq(\n AES128::decrypt(\n BoundedVec::from_array(ciphertext),\n recipient,\n contract_address,\n )\n .unwrap(),\n BoundedVec::from_array(plaintext),\n );\n });\n }\n\n #[test(should_fail_with = \"Plaintext length exceeds MESSAGE_PLAINTEXT_LEN\")]\n unconstrained fn encrypt_oversized_plaintext() {\n let address = AztecAddress { inner: 3 };\n let contract_address = AztecAddress { inner: 42 };\n let plaintext: [Field; MESSAGE_PLAINTEXT_LEN + 1] = [0; MESSAGE_PLAINTEXT_LEN + 1];\n let _ = AES128::encrypt(plaintext, address, contract_address);\n }\n\n #[test]\n unconstrained fn random_address_point_produces_valid_points() {\n // About half of random addresses are invalid, so testing just a couple gives us high confidence that\n // `random_address_point` is indeed producing valid addresses.\n for _ in 0..10 {\n let random_address = AztecAddress { inner: random_address_point().inner.x };\n assert(random_address.to_address_point().is_some());\n }\n }\n\n #[test]\n unconstrained fn decrypt_invalid_ephemeral_public_key() {\n let mut env = TestEnvironment::new();\n\n let recipient = env.create_light_account();\n\n env.private_context(|context| {\n let contract_address = context.this_address();\n let plaintext = [1, 2, 3, 4];\n let ciphertext = AES128::encrypt(plaintext, recipient, contract_address);\n\n // The first field of the ciphertext is the x-coordinate of the ephemeral public key. We set it to a known\n // non-residue (3), causing `decrypt` to fail to produce a decryption shared secret.\n let mut bad_ciphertext = BoundedVec::from_array(ciphertext);\n bad_ciphertext.set(0, 3);\n\n assert(AES128::decrypt(bad_ciphertext, recipient, contract_address).is_none());\n });\n }\n\n #[test]\n unconstrained fn decrypt_returns_none_on_empty_ciphertext() {\n let mut env = TestEnvironment::new();\n let recipient = env.create_light_account();\n\n env.private_context(|context| {\n let contract_address = context.this_address();\n assert(AES128::decrypt(BoundedVec::new(), recipient, contract_address).is_none());\n });\n }\n\n // Mocks the header AES decrypt oracle to return an empty result. The TS oracle never throws on invalid\n // input: it decrypts to garbage bytes or returns empty\n #[test]\n unconstrained fn decrypt_returns_none_on_empty_header() {\n let mut env = TestEnvironment::new();\n let recipient = env.create_light_account();\n\n env.private_context(|context| {\n let contract_address = context.this_address();\n let plaintext = [1, 2, 3];\n let ciphertext = BoundedVec::from_array(AES128::encrypt(plaintext, recipient, contract_address));\n\n let empty_header = BoundedVec::<u8, HEADER_CIPHERTEXT_SIZE_IN_BYTES>::new();\n let _ = OracleMock::mock(\"aztec_utl_decryptAes128\").returns(Option::some(empty_header)).times(1);\n\n assert(AES128::decrypt(ciphertext, recipient, contract_address).is_none());\n });\n }\n\n // Mocks the header oracle to return a 2-byte header that decodes to a ciphertext_length one past the maximum\n // allowed value, verifying the edge case is handled correctly.\n #[test]\n unconstrained fn decrypt_returns_none_on_oversized_ciphertext_length() {\n let mut env = TestEnvironment::new();\n let recipient = env.create_light_account();\n\n env.private_context(|context| {\n let contract_address = context.this_address();\n let plaintext = [1, 2, 3];\n let ciphertext = BoundedVec::from_array(AES128::encrypt(plaintext, recipient, contract_address));\n\n let bad_header = BoundedVec::<u8, HEADER_CIPHERTEXT_SIZE_IN_BYTES>::from_array(encode_header(\n MESSAGE_PLAINTEXT_SIZE_IN_BYTES + 1,\n ));\n let _ = OracleMock::mock(\"aztec_utl_decryptAes128\").returns(Option::some(bad_header)).times(1);\n\n assert(AES128::decrypt(ciphertext, recipient, contract_address).is_none());\n });\n }\n\n}\n"
|
|
596
850
|
},
|
|
597
851
|
"15": {
|
|
@@ -695,7 +949,7 @@
|
|
|
695
949
|
"start": 6966
|
|
696
950
|
}
|
|
697
951
|
],
|
|
698
|
-
"path": "/
|
|
952
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/messages/logs/event.nr",
|
|
699
953
|
"source": "use crate::{\n event::{event_interface::EventInterface, EventSelector},\n messages::{\n encoding::{encode_message, MAX_MESSAGE_CONTENT_LEN, MESSAGE_EXPANDED_METADATA_LEN},\n msg_type::PRIVATE_EVENT_MSG_TYPE_ID,\n },\n utils::array,\n};\nuse crate::protocol::traits::{FromField, Serialize, ToField};\n\n/// The number of fields in a private event message content that are not the event's serialized representation (1 field\n/// for randomness).\npub(crate) global PRIVATE_EVENT_MSG_PLAINTEXT_RESERVED_FIELDS_LEN: u32 = 1;\npub(crate) global PRIVATE_EVENT_MSG_PLAINTEXT_RANDOMNESS_INDEX: u32 = 0;\n\n/// The maximum length of the packed representation of an event's contents. This is limited by private log size,\n/// encryption overhead and extra fields in the message (e.g. message type id, randomness, etc.).\npub global MAX_EVENT_SERIALIZED_LEN: u32 = MAX_MESSAGE_CONTENT_LEN - PRIVATE_EVENT_MSG_PLAINTEXT_RESERVED_FIELDS_LEN;\n\n/// Creates the plaintext for a private event message (i.e. one of type [`PRIVATE_EVENT_MSG_TYPE_ID`]).\n///\n/// This plaintext is meant to be decoded via [`decode_private_event_message`].\npub fn encode_private_event_message<Event>(\n event: Event,\n randomness: Field,\n) -> [Field; PRIVATE_EVENT_MSG_PLAINTEXT_RESERVED_FIELDS_LEN + <Event as Serialize>::N + MESSAGE_EXPANDED_METADATA_LEN]\nwhere\n Event: EventInterface + Serialize,\n{\n std::static_assert(\n <Event as Serialize>::N <= MAX_EVENT_SERIALIZED_LEN,\n \"event's serialized length exceeds the maximum allowed for private events\",\n );\n\n // We use `Serialize` because we want for events to be processable by off-chain actors, e.g. block explorers,\n // wallets and apps, without having to rely on contract invocation. If we used `Packable` we'd need to call utility\n // functions in order to unpack events, which would introduce a level of complexity we don't currently think is\n // worth the savings in DA (for public events) and proving time (when encrypting private event messages).\n let serialized_event = event.serialize();\n\n // If PRIVATE_EVENT_MSG_PLAINTEXT_RESERVED_FIELDS_LEN is changed, causing the assertion below to fail, then the\n // encoding below must be updated as well.\n std::static_assert(\n PRIVATE_EVENT_MSG_PLAINTEXT_RESERVED_FIELDS_LEN == 1,\n \"unexpected value for PRIVATE_EVENT_MSG_PLAINTEXT_RESERVED_FIELDS_LEN\",\n );\n\n let mut msg_plaintext = [0; PRIVATE_EVENT_MSG_PLAINTEXT_RESERVED_FIELDS_LEN + <Event as Serialize>::N];\n msg_plaintext[PRIVATE_EVENT_MSG_PLAINTEXT_RANDOMNESS_INDEX] = randomness;\n\n for i in 0..serialized_event.len() {\n msg_plaintext[PRIVATE_EVENT_MSG_PLAINTEXT_RESERVED_FIELDS_LEN + i] = serialized_event[i];\n }\n\n // The event type id is stored in the message metadata\n encode_message(\n PRIVATE_EVENT_MSG_TYPE_ID,\n Event::get_event_type_id().to_field() as u64,\n msg_plaintext,\n )\n}\n\n/// Decodes the plaintext from a private event message (i.e. one of type [`PRIVATE_EVENT_MSG_TYPE_ID`]).\n///\n/// Returns `None` if `msg_content` is too short to contain the reserved fields. This plaintext is meant to have\n/// originated from [`encode_private_event_message`].\n///\n/// Note that while [`encode_private_event_message`] returns a fixed-size array, this function takes a [`BoundedVec`]\n/// instead. This is because when decoding we're typically processing runtime-sized plaintexts, more specifically,\n/// those that originate from [`crate::messages::encryption::message_encryption::MessageEncryption::decrypt`].\npub(crate) unconstrained fn decode_private_event_message(\n msg_metadata: u64,\n msg_content: BoundedVec<Field, MAX_MESSAGE_CONTENT_LEN>,\n) -> Option<(EventSelector, Field, BoundedVec<Field, MAX_EVENT_SERIALIZED_LEN>)> {\n if msg_content.len() < PRIVATE_EVENT_MSG_PLAINTEXT_RESERVED_FIELDS_LEN {\n Option::none()\n } else {\n let event_type_id = EventSelector::from_field(msg_metadata as Field);\n\n // If PRIVATE_EVENT_MSG_PLAINTEXT_RESERVED_FIELDS_LEN is changed, causing the assertion below to fail, then the\n // destructuring of the private event message encoding below must be updated as well.\n std::static_assert(\n PRIVATE_EVENT_MSG_PLAINTEXT_RESERVED_FIELDS_LEN == 1,\n \"unexpected value for PRIVATE_EVENT_MSG_PLAINTEXT_RESERVED_FIELDS_LEN\",\n );\n\n let randomness = msg_content.get(PRIVATE_EVENT_MSG_PLAINTEXT_RANDOMNESS_INDEX);\n let serialized_event = array::subbvec(msg_content, PRIVATE_EVENT_MSG_PLAINTEXT_RESERVED_FIELDS_LEN);\n\n Option::some((event_type_id, randomness, serialized_event))\n }\n}\n\nmod test {\n use crate::{\n event::{event_interface::EventInterface, EventSelector},\n messages::{\n encoding::decode_message,\n logs::event::{decode_private_event_message, encode_private_event_message},\n msg_type::PRIVATE_EVENT_MSG_TYPE_ID,\n },\n };\n use crate::protocol::traits::{FromField, Serialize};\n use crate::test::mocks::mock_event::MockEvent;\n\n global VALUE: Field = 7;\n global RANDOMNESS: Field = 10;\n\n #[test]\n unconstrained fn encode_decode() {\n let event = MockEvent::new(VALUE).build_event();\n\n let message_plaintext = encode_private_event_message(event, RANDOMNESS);\n\n let (msg_type_id, msg_metadata, msg_content) =\n decode_message(BoundedVec::from_array(message_plaintext)).unwrap();\n\n assert_eq(msg_type_id, PRIVATE_EVENT_MSG_TYPE_ID);\n\n let (event_type_id, randomness, serialized_event) =\n decode_private_event_message(msg_metadata, msg_content).unwrap();\n\n assert_eq(event_type_id, MockEvent::get_event_type_id());\n assert_eq(randomness, RANDOMNESS);\n assert_eq(serialized_event, BoundedVec::from_array(event.serialize()));\n }\n\n #[derive(Serialize)]\n struct EmptyEvent {}\n\n impl EventInterface for EmptyEvent {\n fn get_event_type_id() -> EventSelector {\n EventSelector::from_field(90)\n }\n }\n\n #[test]\n unconstrained fn encode_decode_empty_event() {\n let message_plaintext = encode_private_event_message(EmptyEvent {}, RANDOMNESS);\n\n let (msg_type_id, msg_metadata, msg_content) =\n decode_message(BoundedVec::from_array(message_plaintext)).unwrap();\n\n assert_eq(msg_type_id, PRIVATE_EVENT_MSG_TYPE_ID);\n\n let (event_type_id, randomness, serialized_event) =\n decode_private_event_message(msg_metadata, msg_content).unwrap();\n\n assert_eq(event_type_id, EmptyEvent::get_event_type_id());\n assert_eq(randomness, RANDOMNESS);\n assert_eq(serialized_event.len(), 0);\n }\n\n #[test]\n unconstrained fn decode_empty_content_returns_none() {\n let empty = BoundedVec::new();\n assert(decode_private_event_message(0, empty).is_none());\n }\n\n #[test]\n unconstrained fn decode_succeeds_with_only_reserved_fields() {\n let content = BoundedVec::from_array([RANDOMNESS]);\n\n let (_, randomness, serialized_event) = decode_private_event_message(0, content).unwrap();\n\n assert_eq(randomness, RANDOMNESS);\n assert_eq(serialized_event.len(), 0);\n }\n}\n"
|
|
700
954
|
},
|
|
701
955
|
"153": {
|
|
@@ -753,7 +1007,7 @@
|
|
|
753
1007
|
"start": 9509
|
|
754
1008
|
}
|
|
755
1009
|
],
|
|
756
|
-
"path": "/
|
|
1010
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/messages/logs/note.nr",
|
|
757
1011
|
"source": "use crate::{\n messages::{\n encoding::{encode_message, MAX_MESSAGE_CONTENT_LEN, MESSAGE_EXPANDED_METADATA_LEN},\n msg_type::PRIVATE_NOTE_MSG_TYPE_ID,\n },\n note::note_interface::NoteType,\n utils::array,\n};\nuse crate::protocol::{address::AztecAddress, traits::{FromField, Packable, ToField}};\n\n/// The number of fields in a private note message content that are not the note's packed representation.\npub(crate) global PRIVATE_NOTE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN: u32 = 3;\n\npub(crate) global PRIVATE_NOTE_MSG_PLAINTEXT_OWNER_INDEX: u32 = 0;\npub(crate) global PRIVATE_NOTE_MSG_PLAINTEXT_STORAGE_SLOT_INDEX: u32 = 1;\npub(crate) global PRIVATE_NOTE_MSG_PLAINTEXT_RANDOMNESS_INDEX: u32 = 2;\n\n/// The maximum length of the packed representation of a note's contents. This is limited by private log size,\n/// encryption overhead and extra fields in the message (e.g. message type id, storage slot, randomness, etc.).\npub global MAX_NOTE_PACKED_LEN: u32 = MAX_MESSAGE_CONTENT_LEN - PRIVATE_NOTE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN;\n\n/// Creates the plaintext for a private note message with the given `msg_type_id`.\n///\n/// Shared encoder used by [`encode_private_note_message`] and by custom message handlers that use the same format as\n/// standard private note message but perform additional validation logic.\npub fn encode_private_note_message_with_msg_type_id<Note>(\n msg_type_id: u64,\n note: Note,\n owner: AztecAddress,\n storage_slot: Field,\n randomness: Field,\n) -> [Field; PRIVATE_NOTE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN + <Note as Packable>::N + MESSAGE_EXPANDED_METADATA_LEN]\nwhere\n Note: NoteType + Packable,\n{\n let packed_note = note.pack();\n\n // If PRIVATE_NOTE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN is changed, causing the assertion below to fail, then the\n // encoding below must be updated as well.\n std::static_assert(\n PRIVATE_NOTE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN == 3,\n \"unexpected value for PRIVATE_NOTE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN\",\n );\n\n let mut msg_content = [0; PRIVATE_NOTE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN + <Note as Packable>::N];\n msg_content[PRIVATE_NOTE_MSG_PLAINTEXT_OWNER_INDEX] = owner.to_field();\n msg_content[PRIVATE_NOTE_MSG_PLAINTEXT_STORAGE_SLOT_INDEX] = storage_slot;\n msg_content[PRIVATE_NOTE_MSG_PLAINTEXT_RANDOMNESS_INDEX] = randomness;\n for i in 0..packed_note.len() {\n msg_content[PRIVATE_NOTE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN + i] = packed_note[i];\n }\n\n // Notes use the note type id for metadata\n encode_message(msg_type_id, Note::get_id() as u64, msg_content)\n}\n\n/// Creates the plaintext for a private note message (i.e. one of type [`PRIVATE_NOTE_MSG_TYPE_ID`]).\n///\n/// This plaintext is meant to be decoded via [`decode_private_note_message`].\npub fn encode_private_note_message<Note>(\n note: Note,\n owner: AztecAddress,\n storage_slot: Field,\n randomness: Field,\n) -> [Field; PRIVATE_NOTE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN + <Note as Packable>::N + MESSAGE_EXPANDED_METADATA_LEN]\nwhere\n Note: NoteType + Packable,\n{\n encode_private_note_message_with_msg_type_id(\n PRIVATE_NOTE_MSG_TYPE_ID,\n note,\n owner,\n storage_slot,\n randomness,\n )\n}\n\n/// Decodes the plaintext from a private note message (i.e. one of type [`PRIVATE_NOTE_MSG_TYPE_ID`]).\n///\n/// Returns `None` if `msg_content` is too short to contain the reserved fields. This plaintext is meant to have\n/// originated from [`encode_private_note_message`].\n///\n/// Note that while [`encode_private_note_message`] returns a fixed-size array, this function takes a [`BoundedVec`]\n/// instead. This is because when decoding we're typically processing runtime-sized plaintexts, more specifically,\n/// those that originate from [`crate::messages::encryption::message_encryption::MessageEncryption::decrypt`].\npub(crate) unconstrained fn decode_private_note_message(\n msg_metadata: u64,\n msg_content: BoundedVec<Field, MAX_MESSAGE_CONTENT_LEN>,\n) -> Option<(Field, AztecAddress, Field, Field, BoundedVec<Field, MAX_NOTE_PACKED_LEN>)> {\n if msg_content.len() < PRIVATE_NOTE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN {\n Option::none()\n } else {\n let note_type_id = msg_metadata as Field; // TODO: make note type id not be a full field\n\n // If PRIVATE_NOTE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN is changed, causing the assertion below to fail, then the\n // decoding below must be updated as well.\n std::static_assert(\n PRIVATE_NOTE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN == 3,\n \"unexpected value for PRIVATE_NOTE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN\",\n );\n\n let owner = AztecAddress::from_field(msg_content.get(PRIVATE_NOTE_MSG_PLAINTEXT_OWNER_INDEX));\n let storage_slot = msg_content.get(PRIVATE_NOTE_MSG_PLAINTEXT_STORAGE_SLOT_INDEX);\n let randomness = msg_content.get(PRIVATE_NOTE_MSG_PLAINTEXT_RANDOMNESS_INDEX);\n let packed_note = array::subbvec(msg_content, PRIVATE_NOTE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN);\n\n Option::some((note_type_id, owner, storage_slot, randomness, packed_note))\n }\n}\n\nmod test {\n use crate::{\n messages::{\n encoding::decode_message,\n logs::note::{decode_private_note_message, encode_private_note_message, MAX_NOTE_PACKED_LEN},\n msg_type::PRIVATE_NOTE_MSG_TYPE_ID,\n },\n note::note_interface::NoteType,\n };\n use crate::protocol::{address::AztecAddress, traits::{FromField, Packable, ToField}};\n use crate::test::mocks::mock_note::MockNote;\n\n global VALUE: Field = 7;\n global OWNER: AztecAddress = AztecAddress::from_field(8);\n global STORAGE_SLOT: Field = 9;\n global RANDOMNESS: Field = 10;\n\n #[test]\n unconstrained fn encode_decode() {\n let note = MockNote::new(VALUE).build_note();\n\n let message_plaintext = encode_private_note_message(note, OWNER, STORAGE_SLOT, RANDOMNESS);\n\n let (msg_type_id, msg_metadata, msg_content) =\n decode_message(BoundedVec::from_array(message_plaintext)).unwrap();\n\n assert_eq(msg_type_id, PRIVATE_NOTE_MSG_TYPE_ID);\n\n let (note_type_id, owner, storage_slot, randomness, packed_note) =\n decode_private_note_message(msg_metadata, msg_content).unwrap();\n\n assert_eq(note_type_id, MockNote::get_id());\n assert_eq(owner, OWNER);\n assert_eq(storage_slot, STORAGE_SLOT);\n assert_eq(randomness, RANDOMNESS);\n assert_eq(packed_note, BoundedVec::from_array(note.pack()));\n }\n\n #[derive(Packable)]\n struct MaxSizeNote {\n data: [Field; MAX_NOTE_PACKED_LEN],\n }\n\n impl NoteType for MaxSizeNote {\n fn get_id() -> Field {\n 0\n }\n }\n\n #[test]\n unconstrained fn encode_decode_max_size_note() {\n let mut data = [0; MAX_NOTE_PACKED_LEN];\n for i in 0..MAX_NOTE_PACKED_LEN {\n data[i] = i as Field;\n }\n let note = MaxSizeNote { data };\n\n let encoded = encode_private_note_message(note, OWNER, STORAGE_SLOT, RANDOMNESS);\n let (msg_type_id, msg_metadata, msg_content) = decode_message(BoundedVec::from_array(encoded)).unwrap();\n\n assert_eq(msg_type_id, PRIVATE_NOTE_MSG_TYPE_ID);\n\n let (note_type_id, owner, storage_slot, randomness, packed_note) =\n decode_private_note_message(msg_metadata, msg_content).unwrap();\n\n assert_eq(note_type_id, MaxSizeNote::get_id());\n assert_eq(owner, OWNER);\n assert_eq(storage_slot, STORAGE_SLOT);\n assert_eq(randomness, RANDOMNESS);\n assert_eq(packed_note, BoundedVec::from_array(data));\n }\n\n #[derive(Packable)]\n struct OversizedNote {\n data: [Field; MAX_NOTE_PACKED_LEN + 1],\n }\n\n impl NoteType for OversizedNote {\n fn get_id() -> Field {\n 0\n }\n }\n\n #[test(should_fail_with = \"Invalid message content: it must have a length of at most MAX_MESSAGE_CONTENT_LEN\")]\n fn encode_oversized_note_fails() {\n let note = OversizedNote { data: [0; MAX_NOTE_PACKED_LEN + 1] };\n let _ = encode_private_note_message(note, OWNER, STORAGE_SLOT, RANDOMNESS);\n }\n\n #[derive(Packable)]\n struct EmptyNote {}\n\n impl NoteType for EmptyNote {\n fn get_id() -> Field {\n 0\n }\n }\n\n #[test]\n unconstrained fn encode_decode_empty_note() {\n let encoded = encode_private_note_message(EmptyNote {}, OWNER, STORAGE_SLOT, RANDOMNESS);\n let (msg_type_id, msg_metadata, msg_content) = decode_message(BoundedVec::from_array(encoded)).unwrap();\n\n assert_eq(msg_type_id, PRIVATE_NOTE_MSG_TYPE_ID);\n\n let (note_type_id, owner, storage_slot, randomness, packed_note) =\n decode_private_note_message(msg_metadata, msg_content).unwrap();\n\n assert_eq(note_type_id, EmptyNote::get_id());\n assert_eq(owner, OWNER);\n assert_eq(storage_slot, STORAGE_SLOT);\n assert_eq(randomness, RANDOMNESS);\n assert_eq(packed_note.len(), 0);\n }\n\n #[test]\n unconstrained fn decode_empty_content_returns_none() {\n let empty = BoundedVec::new();\n assert(decode_private_note_message(0, empty).is_none());\n }\n\n #[test]\n unconstrained fn decode_with_fewer_than_reserved_fields_returns_none() {\n let content = BoundedVec::from_array([0, 0]);\n assert(decode_private_note_message(0, content).is_none());\n }\n\n #[test]\n unconstrained fn decode_succeeds_with_only_reserved_fields() {\n let content = BoundedVec::from_array([OWNER.to_field(), STORAGE_SLOT, RANDOMNESS]);\n\n let (_, owner, storage_slot, randomness, packed_note) = decode_private_note_message(0, content).unwrap();\n\n assert_eq(owner, OWNER);\n assert_eq(storage_slot, STORAGE_SLOT);\n assert_eq(randomness, RANDOMNESS);\n assert_eq(packed_note.len(), 0);\n }\n}\n"
|
|
758
1012
|
},
|
|
759
1013
|
"154": {
|
|
@@ -779,7 +1033,7 @@
|
|
|
779
1033
|
"start": 7197
|
|
780
1034
|
}
|
|
781
1035
|
],
|
|
782
|
-
"path": "/
|
|
1036
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/messages/logs/partial_note.nr",
|
|
783
1037
|
"source": "use crate::{\n messages::{\n encoding::{encode_message, MAX_MESSAGE_CONTENT_LEN, MESSAGE_EXPANDED_METADATA_LEN},\n msg_type::PARTIAL_NOTE_PRIVATE_MSG_TYPE_ID,\n },\n note::note_interface::NoteType,\n utils::array,\n};\nuse crate::protocol::{address::AztecAddress, traits::{FromField, Packable, ToField}};\n\n/// The number of fields in a private note message content that are not the note's packed representation.\npub(crate) global PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN: u32 = 3;\npub(crate) global PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_OWNER_INDEX: u32 = 0;\npub(crate) global PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_RANDOMNESS_INDEX: u32 = 1;\npub(crate) global PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_NOTE_COMPLETION_LOG_TAG_INDEX: u32 = 2;\n\n/// Partial notes have a maximum packed length of their private fields bound by extra content in their private message\n/// (e.g. the storage slot, note completion log tag, etc.).\npub global MAX_PARTIAL_NOTE_PRIVATE_PACKED_LEN: u32 =\n MAX_MESSAGE_CONTENT_LEN - PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN;\n\n/// Creates the plaintext for a partial note private message (i.e. one of type [`PARTIAL_NOTE_PRIVATE_MSG_TYPE_ID`]).\n///\n/// This plaintext is meant to be decoded via [`decode_partial_note_private_message`].\npub fn encode_partial_note_private_message<PartialNotePrivateContent>(\n partial_note_private_content: PartialNotePrivateContent,\n owner: AztecAddress,\n randomness: Field,\n note_completion_log_tag: Field,\n ) -> [Field; PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN + <PartialNotePrivateContent as Packable>::N + MESSAGE_EXPANDED_METADATA_LEN]\nwhere\n PartialNotePrivateContent: NoteType + Packable,\n{\n let packed_private_content = partial_note_private_content.pack();\n\n // If PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_NON_NOTE_FIELDS_LEN is changed, causing the assertion below to fail, then\n // the encoding below must be updated as well.\n std::static_assert(\n PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN == 3,\n \"unexpected value for PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_NON_NOTE_FIELDS_LEN\",\n );\n\n let mut msg_content =\n [0; PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN + <PartialNotePrivateContent as Packable>::N];\n msg_content[PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_OWNER_INDEX] = owner.to_field();\n msg_content[PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_RANDOMNESS_INDEX] = randomness;\n msg_content[PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_NOTE_COMPLETION_LOG_TAG_INDEX] = note_completion_log_tag;\n\n for i in 0..packed_private_content.len() {\n msg_content[PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN + i] = packed_private_content[i];\n }\n\n encode_message(\n PARTIAL_NOTE_PRIVATE_MSG_TYPE_ID,\n // Notes use the note type id for metadata\n PartialNotePrivateContent::get_id() as u64,\n msg_content,\n )\n}\n\n/// Decodes the plaintext from a partial note private message (i.e. one of type\n/// [`PARTIAL_NOTE_PRIVATE_MSG_TYPE_ID`]).\n///\n/// Returns `None` if `msg_content` has too few fields. This plaintext is meant to have originated\n/// from [`encode_partial_note_private_message`].\n///\n/// Note that while [`encode_partial_note_private_message`] returns a fixed-size array, this function takes a\n/// [`BoundedVec`] instead. This is because when decoding we're typically processing runtime-sized plaintexts, more\n/// specifically, those that originate from\n/// [`crate::messages::encryption::message_encryption::MessageEncryption::decrypt`].\npub(crate) unconstrained fn decode_partial_note_private_message(\n msg_metadata: u64,\n msg_content: BoundedVec<Field, MAX_MESSAGE_CONTENT_LEN>,\n) -> Option<(AztecAddress, Field, Field, Field, BoundedVec<Field, MAX_PARTIAL_NOTE_PRIVATE_PACKED_LEN>)> {\n if msg_content.len() < PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN {\n Option::none()\n } else {\n let note_type_id: Field = msg_metadata as Field; // TODO: make note type id not be a full field\n\n // If PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_NON_NOTE_FIELDS_LEN is changed, causing the assertion below to fail,\n // then the destructuring of the partial note private message encoding below must be updated as well.\n std::static_assert(\n PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN == 3,\n \"unexpected value for PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_NON_NOTE_FIELDS_LEN\",\n );\n\n // We currently have three fields that are not the partial note's packed representation, which are the owner,\n // the randomness, and the note completion log tag.\n let owner = AztecAddress::from_field(\n msg_content.get(PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_OWNER_INDEX),\n );\n let randomness = msg_content.get(PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_RANDOMNESS_INDEX);\n let note_completion_log_tag = msg_content.get(PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_NOTE_COMPLETION_LOG_TAG_INDEX);\n\n let packed_private_note_content: BoundedVec<Field, MAX_PARTIAL_NOTE_PRIVATE_PACKED_LEN> = array::subbvec(\n msg_content,\n PARTIAL_NOTE_PRIVATE_MSG_PLAINTEXT_RESERVED_FIELDS_LEN,\n );\n\n Option::some(\n (owner, randomness, note_completion_log_tag, note_type_id, packed_private_note_content),\n )\n }\n}\n\nmod test {\n use crate::{\n messages::{\n encoding::decode_message,\n logs::partial_note::{decode_partial_note_private_message, encode_partial_note_private_message},\n msg_type::PARTIAL_NOTE_PRIVATE_MSG_TYPE_ID,\n },\n note::note_interface::NoteType,\n };\n use crate::protocol::{address::AztecAddress, traits::{FromField, Packable}};\n use crate::test::mocks::mock_note::MockNote;\n\n global VALUE: Field = 7;\n global OWNER: AztecAddress = AztecAddress::from_field(8);\n global RANDOMNESS: Field = 10;\n global NOTE_COMPLETION_LOG_TAG: Field = 11;\n\n #[test]\n unconstrained fn encode_decode() {\n // Note that here we use MockNote as the private fields of a partial note\n let note = MockNote::new(VALUE).build_note();\n\n let message_plaintext = encode_partial_note_private_message(note, OWNER, RANDOMNESS, NOTE_COMPLETION_LOG_TAG);\n\n let (msg_type_id, msg_metadata, msg_content) =\n decode_message(BoundedVec::from_array(message_plaintext)).unwrap();\n\n assert_eq(msg_type_id, PARTIAL_NOTE_PRIVATE_MSG_TYPE_ID);\n\n let (owner, randomness, note_completion_log_tag, note_type_id, packed_note) =\n decode_partial_note_private_message(msg_metadata, msg_content).unwrap();\n\n assert_eq(note_type_id, MockNote::get_id());\n assert_eq(owner, OWNER);\n assert_eq(randomness, RANDOMNESS);\n assert_eq(note_completion_log_tag, NOTE_COMPLETION_LOG_TAG);\n assert_eq(packed_note, BoundedVec::from_array(note.pack()));\n }\n\n #[test]\n unconstrained fn decode_empty_content_returns_none() {\n let empty = BoundedVec::new();\n assert(decode_partial_note_private_message(0, empty).is_none());\n }\n\n #[test]\n unconstrained fn decode_succeeds_with_only_reserved_fields() {\n let content = BoundedVec::from_array([0, 0, 0]);\n let (_, _, _, _, packed_note) = decode_partial_note_private_message(0, content).unwrap();\n assert_eq(packed_note.len(), 0);\n }\n}\n"
|
|
784
1038
|
},
|
|
785
1039
|
"16": {
|
|
@@ -1063,140 +1317,148 @@
|
|
|
1063
1317
|
"start": 7003
|
|
1064
1318
|
}
|
|
1065
1319
|
],
|
|
1066
|
-
"path": "/
|
|
1320
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/messages/processing/mod.nr",
|
|
1067
1321
|
"source": "pub(crate) mod event_validation_request;\npub mod offchain;\n\npub use crate::oracle::tx_resolution::ResolvedTx;\n\nmod note_validation_request;\npub use note_validation_request::NoteValidationRequest;\n\npub mod log_retrieval_request;\npub mod log_retrieval_response;\npub(crate) mod pending_tagged_log;\npub(crate) mod provided_secret;\n\nuse crate::{\n ephemeral::EphemeralArray,\n event::EventSelector,\n messages::{\n encoding::MESSAGE_CIPHERTEXT_LEN,\n logs::{event::MAX_EVENT_SERIALIZED_LEN, note::MAX_NOTE_PACKED_LEN},\n processing::{log_retrieval_request::LogRetrievalRequest, log_retrieval_response::LogRetrievalResponse},\n },\n oracle::message_processing,\n partial_notes::DeliveredPendingPartialNote,\n};\nuse crate::protocol::{\n address::AztecAddress,\n constants::DOM_SEP__NOTE_COMPLETION_LOG_TAG,\n hash::{compute_log_tag, sha256_to_field},\n traits::{Deserialize, Serialize},\n};\nuse event_validation_request::EventValidationRequest;\n\nglobal NOTE_VALIDATION_REQUESTS_ARRAY_BASE_SLOT: Field = sha256_to_field(\n \"AZTEC_NR::NOTE_VALIDATION_REQUESTS_ARRAY_BASE_SLOT\".as_bytes(),\n);\n\nglobal EVENT_VALIDATION_REQUESTS_ARRAY_BASE_SLOT: Field = sha256_to_field(\n \"AZTEC_NR::EVENT_VALIDATION_REQUESTS_ARRAY_BASE_SLOT\".as_bytes(),\n);\n\nglobal LOG_RETRIEVAL_REQUESTS_ARRAY_BASE_SLOT: Field = sha256_to_field(\n \"AZTEC_NR::LOG_RETRIEVAL_REQUESTS_ARRAY_BASE_SLOT\".as_bytes(),\n);\n\n/// An offchain-delivered message with resolved context, ready for processing during sync.\n#[derive(Serialize, Deserialize)]\npub struct OffchainMessageWithTx {\n pub message_ciphertext: BoundedVec<Field, MESSAGE_CIPHERTEXT_LEN>,\n pub resolved_tx: ResolvedTx,\n}\n\n/// Enqueues a note for validation and storage by PXE.\n///\n/// Once validated, the note becomes retrievable via the `get_notes` oracle. The note will be scoped to\n/// `contract_address`, meaning other contracts will not be able to access it unless authorized.\n///\n/// In order for the note validation and insertion to occur, `validate_and_store_enqueued_notes_and_events` must be\n/// later called. For optimal performance, accumulate as many note validation requests as possible and then validate\n/// them all at the end (which results in PXE minimizing the number of network round-trips).\n///\n/// The `packed_note` is what `getNotes` will later return. PXE indexes notes by `storage_slot`, so this value is\n/// typically used to filter notes that correspond to different state variables. `note_hash` and `nullifier` are the\n/// inner hashes, i.e. the raw hashes returned by `NoteHash::compute_note_hash` and `NoteHash::compute_nullifier`. PXE\n/// will verify that the siloed unique note hash was inserted into the tree at `tx_hash`, and will store the nullifier\n/// to later check for nullification.\n///\n/// `owner` is the address used in note hash and nullifier computation, often requiring knowledge of their nullifier\n/// secret key.\n///\n/// `scope` is the account to which the note message was delivered (i.e. the address the message was encrypted to).\n/// This determines which PXE account can see the note - other accounts will not be able to access it (e.g. other\n/// accounts will not be able to see one another's token balance notes, even in the same PXE) unless authorized. In\n/// most cases `recipient` equals `owner`, but they can differ in scenarios like delegated discovery.\npub unconstrained fn enqueue_note_for_validation(\n contract_address: AztecAddress,\n owner: AztecAddress,\n storage_slot: Field,\n randomness: Field,\n note_nonce: Field,\n packed_note: BoundedVec<Field, MAX_NOTE_PACKED_LEN>,\n note_hash: Field,\n nullifier: Field,\n tx_hash: Field,\n) {\n EphemeralArray::at(NOTE_VALIDATION_REQUESTS_ARRAY_BASE_SLOT).push(NoteValidationRequest::new(\n contract_address,\n owner,\n storage_slot,\n randomness,\n note_nonce,\n packed_note,\n note_hash,\n nullifier,\n tx_hash,\n ))\n}\n\n/// Enqueues an event for validation and storage by PXE.\n///\n/// This is the primary way for custom message handlers (registered via\n/// [`crate::macros::AztecConfig::custom_message_handler`]) to deliver reassembled events back to PXE after processing\n/// application-specific message formats.\n///\n/// In order for the event validation and insertion to occur, `validate_and_store_enqueued_notes_and_events` must be\n/// later called. For optimal performance, accumulate as many event validation requests as possible and then validate\n/// them all at the end (which results in PXE minimizing the number of network round-trips).\n///\n/// Note that `validate_and_store_enqueued_notes_and_events` is called by Aztec.nr after processing messages, so custom\n/// message processors do not need to be concerned with this.\npub unconstrained fn enqueue_event_for_validation(\n contract_address: AztecAddress,\n event_type_id: EventSelector,\n randomness: Field,\n serialized_event: BoundedVec<Field, MAX_EVENT_SERIALIZED_LEN>,\n event_commitment: Field,\n tx_hash: Field,\n) {\n EphemeralArray::at(EVENT_VALIDATION_REQUESTS_ARRAY_BASE_SLOT).push(EventValidationRequest::new(\n contract_address,\n event_type_id,\n randomness,\n serialized_event,\n event_commitment,\n tx_hash,\n ))\n}\n\n/// Validates and stores all enqueued notes and events.\n///\n/// Processes all requests enqueued via [`enqueue_note_for_validation`] and [`enqueue_event_for_validation`], inserting\n/// them into the note database and event store respectively, making them queryable via `get_notes` oracle and our TS\n/// API (PXE::getPrivateEvents).\npub unconstrained fn validate_and_store_enqueued_notes_and_events(scope: AztecAddress) {\n message_processing::validate_and_store_enqueued_notes_and_events(\n EphemeralArray::at(NOTE_VALIDATION_REQUESTS_ARRAY_BASE_SLOT),\n EphemeralArray::at(EVENT_VALIDATION_REQUESTS_ARRAY_BASE_SLOT),\n scope,\n );\n\n // Defensive clearing: purge the queues after processing to prevent double-processing if this function is called\n // more than once in the same call frame. It is currently defensive because we only call this once per sync run.\n let _ = EphemeralArray::<NoteValidationRequest>::at(NOTE_VALIDATION_REQUESTS_ARRAY_BASE_SLOT).clear();\n let _ = EphemeralArray::<EventValidationRequest>::at(EVENT_VALIDATION_REQUESTS_ARRAY_BASE_SLOT).clear();\n}\n\n/// Efficiently queries the node for logs that result in the completion of all `DeliveredPendingPartialNote`s in an\n/// `EphemeralArray` by performing all node communication concurrently. Returns a nested `EphemeralArray`, one inner\n/// array per pending partial note, each containing all matching `LogRetrievalResponse`s (which may be empty if no\n/// logs were found).\npub(crate) unconstrained fn get_pending_partial_notes_completion_logs(\n contract_address: AztecAddress,\n pending_partial_notes: EphemeralArray<DeliveredPendingPartialNote>,\n) -> EphemeralArray<EphemeralArray<LogRetrievalResponse>> {\n let log_retrieval_requests = EphemeralArray::at(LOG_RETRIEVAL_REQUESTS_ARRAY_BASE_SLOT);\n\n pending_partial_notes.for_each(|_i, pending_partial_note| {\n // Partial note completion logs are emitted with a domain-separated tag. To find matching logs, we apply the\n // same domain separation to the stored raw tag.\n let log_tag = compute_log_tag(\n pending_partial_note.note_completion_log_tag,\n DOM_SEP__NOTE_COMPLETION_LOG_TAG,\n );\n log_retrieval_requests.push(LogRetrievalRequest::new(contract_address, log_tag));\n });\n\n let responses = message_processing::get_logs_by_tag(log_retrieval_requests);\n\n // Defensive clearing: prevent stale requests if this function is called more than once in the same call frame.\n let _ = log_retrieval_requests.clear();\n\n responses\n}\n"
|
|
1068
1322
|
},
|
|
1069
1323
|
"163": {
|
|
1070
1324
|
"function_locations": [
|
|
1071
1325
|
{
|
|
1072
1326
|
"name": "receive",
|
|
1073
|
-
"start":
|
|
1327
|
+
"start": 2699
|
|
1074
1328
|
},
|
|
1075
1329
|
{
|
|
1076
1330
|
"name": "sync_inbox",
|
|
1077
|
-
"start":
|
|
1331
|
+
"start": 4202
|
|
1078
1332
|
},
|
|
1079
1333
|
{
|
|
1080
1334
|
"name": "test::setup",
|
|
1081
|
-
"start":
|
|
1335
|
+
"start": 6051
|
|
1082
1336
|
},
|
|
1083
1337
|
{
|
|
1084
1338
|
"name": "test::make_msg",
|
|
1085
|
-
"start":
|
|
1339
|
+
"start": 6381
|
|
1086
1340
|
},
|
|
1087
1341
|
{
|
|
1088
1342
|
"name": "test::advance_by",
|
|
1089
|
-
"start":
|
|
1343
|
+
"start": 6664
|
|
1090
1344
|
},
|
|
1091
1345
|
{
|
|
1092
1346
|
"name": "test::empty_inbox_returns_empty_result",
|
|
1093
|
-
"start":
|
|
1347
|
+
"start": 6855
|
|
1094
1348
|
},
|
|
1095
1349
|
{
|
|
1096
1350
|
"name": "test::multiple_messages_mixed_expiration",
|
|
1097
|
-
"start":
|
|
1351
|
+
"start": 7243
|
|
1352
|
+
},
|
|
1353
|
+
{
|
|
1354
|
+
"name": "test::accepts_messages_within_the_tolerated_future_skew",
|
|
1355
|
+
"start": 9172
|
|
1356
|
+
},
|
|
1357
|
+
{
|
|
1358
|
+
"name": "test::rejects_batch_with_implausible_future_anchor",
|
|
1359
|
+
"start": 10197
|
|
1098
1360
|
},
|
|
1099
1361
|
{
|
|
1100
1362
|
"name": "test::redelivery_is_idempotent",
|
|
1101
|
-
"start":
|
|
1363
|
+
"start": 10895
|
|
1102
1364
|
},
|
|
1103
1365
|
{
|
|
1104
1366
|
"name": "test::redelivery_after_processing_keeps_processed_guard",
|
|
1105
|
-
"start":
|
|
1367
|
+
"start": 11760
|
|
1106
1368
|
}
|
|
1107
1369
|
],
|
|
1108
|
-
"path": "/
|
|
1109
|
-
"source": "use crate::{\n context::UtilityContext,\n ephemeral::EphemeralArray,\n messages::{encoding::MESSAGE_CIPHERTEXT_LEN, processing::OffchainMessageWithTx},\n oracle::{contract_sync::set_contract_sync_cache_invalid, tx_resolution::get_resolved_txs},\n protocol::{address::AztecAddress, traits::{Deserialize, Serialize}},\n};\n\nmod reception;\nuse reception::OffchainReception;\n\n/// Maximum number of offchain messages accepted by `offchain_receive` in a single call.\npub global MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL: u32 = 16;\n\n/// A function that manages offchain-delivered messages for processing during sync.\n///\n/// Offchain messages are messages that are not broadcasted via onchain logs. They are instead delivered to the\n/// recipient by calling the `offchain_receive` utility function (injected by the `#[aztec]` macro). Message transport\n/// is the app's responsibility. Typical examples of transport methods are: messaging apps, email, QR codes, etc.\n///\n/// Once offchain messages are delivered to the recipient's private environment via `offchain_receive`, messages are\n/// locally stored in a persistent inbox.\n///\n/// This function determines when each message in said inbox is ready for processing, when it can be safely disposed\n/// of, etc.\n///\n/// The only current implementation of an [`OffchainInboxSync`] is [`sync_inbox`], which manages an inbox with\n/// expiration and finality-based eviction and automatic transaction context resolution.\npub type OffchainInboxSync = unconstrained fn(\n/* contract_address */AztecAddress, /* scope */ AztecAddress) -> EphemeralArray<OffchainMessageWithTx>;\n\n/// Delivers offchain messages to the given contract's offchain inbox for subsequent processing.\n///\n/// Offchain messages are transaction effects that are not broadcasted via onchain logs. Instead, the sender shares the\n/// message to the recipient through an external channel (e.g. a URL accessible by the recipient). The recipient then\n/// calls this function to hand the messages to the contract so they can be processed through the same mechanisms as\n/// onchain messages.\n///\n/// Messages are processed when their originating transaction is found onchain (providing the context needed to\n/// validate resulting notes and events).\n///\n/// Messages are eventually removed from the inbox: an unprocessed message once its TTL (`anchor_block_timestamp +\n/// MAX_MSG_TTL`) elapses, and a processed message once the block its transaction was found in finalizes.\n///\n/// Processing order is not guaranteed.\npub unconstrained fn receive(\n contract_address: AztecAddress,\n messages: BoundedVec<OffchainMessage, MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL>,\n) {\n // Offchain reception facts are scoped to the recipient. Note that because offchain messages have no integrity or\n // authenticity checks it is not possible to verify that this is indeed the intended recipient. In this case we're\n // assuming a cooperative environment, which is on par with other offchain delivery expectations.\n messages.for_each(|msg| OffchainReception::init(contract_address, msg));\n\n // Clear cache for message recipients so the next sync runs.\n set_contract_sync_cache_invalid(contract_address, messages.map(|msg| msg.recipient));\n}\n\n/// Returns offchain-delivered messages to process during sync.\npub unconstrained fn sync_inbox(\n contract_address: AztecAddress,\n scope: AztecAddress,\n) -> EphemeralArray<OffchainMessageWithTx> {\n let active_receptions = OffchainReception::load_all(contract_address, scope);\n\n // Ask PXE to resolve each message's originating tx. We pass the tx hashes in reception order, so the resolved txs\n // come back aligned with the reception indices and can be matched back positionally.\n let resolved_txs = get_resolved_txs(active_receptions.map(|reception: OffchainReception| {\n reception.read_message().tx_hash.unwrap_or(0)\n }));\n\n let processable_messages: EphemeralArray<OffchainMessageWithTx> = EphemeralArray::empty();\n let now = UtilityContext::new().timestamp();\n\n active_receptions.for_each(|i, reception| {\n let maybe_message = reception.step(resolved_txs.get(i), now);\n if maybe_message.is_some() {\n processable_messages.push(maybe_message.unwrap());\n }\n });\n\n processable_messages\n}\n\n/// A message delivered via the `offchain_receive` utility function.\n#[derive(Serialize, Deserialize)]\npub struct OffchainMessage {\n /// The encrypted message payload.\n pub ciphertext: BoundedVec<Field, MESSAGE_CIPHERTEXT_LEN>,\n /// The intended recipient of the message.\n pub recipient: AztecAddress,\n /// The hash of the transaction that produced this message. `Option::none` indicates a tx-less message.\n pub tx_hash: Option<Field>,\n /// Anchor block timestamp at message emission.\n pub anchor_block_timestamp: u64,\n}\n\nmod test {\n use crate::{\n oracle::random::random, protocol::address::AztecAddress, test::helpers::test_environment::TestEnvironment,\n };\n use super::{MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL, OffchainMessage, receive, sync_inbox};\n use super::reception::{MAX_MSG_TTL, OffchainReception};\n\n unconstrained fn setup() -> (TestEnvironment, AztecAddress) {\n let mut env = TestEnvironment::new();\n let scope = env.create_light_account();\n (env, scope)\n }\n\n /// Creates an `OffchainMessage` with dummy ciphertext and the given scope as recipient.\n fn make_msg(recipient: AztecAddress, tx_hash: Option<Field>, anchor_block_timestamp: u64) -> OffchainMessage {\n OffchainMessage { ciphertext: BoundedVec::new(), recipient, tx_hash, anchor_block_timestamp }\n }\n\n /// Advances the TXE block timestamp by `offset` seconds and returns the resulting timestamp.\n unconstrained fn advance_by(env: TestEnvironment, offset: u64) -> u64 {\n env.advance_next_block_timestamp_by(offset);\n env.mine_block();\n env.last_block_timestamp()\n }\n\n #[test]\n unconstrained fn empty_inbox_returns_empty_result() {\n let (env, scope) = setup();\n env.utility_context(|context| {\n let address = context.this_address();\n let result = sync_inbox(address, scope);\n\n assert_eq(result.len(), 0);\n assert_eq(OffchainReception::load_all(address, scope).len(), 0);\n });\n }\n\n #[test]\n unconstrained fn multiple_messages_mixed_expiration() {\n let (env, scope) = setup();\n let anchor_ts = advance_by(env, 10);\n\n let expired_a_tx_hash = random();\n let survivor_tx_hash = random();\n\n let expired_a = make_msg(scope, Option::some(expired_a_tx_hash), 0);\n let survivor = make_msg(scope, Option::some(survivor_tx_hash), anchor_ts);\n let expired_b = make_msg(scope, Option::none(), 0);\n\n env.utility_context(|context| {\n let address = context.this_address();\n let mut msgs: BoundedVec<OffchainMessage, MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL> = BoundedVec::new();\n // Message 0: tx-bound, anchor=0 so it expires quickly.\n msgs.push(expired_a);\n // Message 1: tx-bound, anchor_ts is recent so it survives.\n msgs.push(survivor);\n // Message 2: tx-less, anchor=0 so it also expires.\n msgs.push(expired_b);\n receive(address, msgs);\n });\n\n // Advance past MAX_MSG_TTL for anchor=0, but not for anchor_ts.\n let _now = advance_by(env, MAX_MSG_TTL);\n\n env.utility_context(|context| {\n let address = context.this_address();\n let result = sync_inbox(address, scope);\n\n assert_eq(result.len(), 0); // all contexts are None\n assert(\n !OffchainReception::is_active(address, scope, expired_a),\n \"expired tx-bound reception should be terminated\",\n );\n assert(\n !OffchainReception::is_active(address, scope, expired_b),\n \"expired tx-less reception should be terminated\",\n );\n assert(OffchainReception::is_active(address, scope, survivor), \"survivor reception should stay active\");\n assert_eq(OffchainReception::load_all(address, scope).len(), 1);\n });\n }\n\n // -- Idempotent re-delivery (first-write-wins fact recording) ---------\n\n #[test]\n unconstrained fn redelivery_is_idempotent() {\n let (env, scope) = setup();\n let anchor_ts = advance_by(env, 10);\n let msg = make_msg(scope, Option::some(random()), anchor_ts);\n\n // First delivery, committed as its own job.\n env.utility_context(|context| { receive(context.this_address(), BoundedVec::from_array([msg])); });\n\n // Re-delivering the same content-addressed message must not panic and must not create a second reception.\n env.utility_context(|context| {\n let address = context.this_address();\n receive(address, BoundedVec::from_array([msg]));\n\n assert(OffchainReception::is_active(address, scope, msg), \"reception should be active\");\n assert_eq(OffchainReception::load_all(address, scope).len(), 1);\n });\n }\n\n #[test]\n unconstrained fn redelivery_after_processing_keeps_processed_guard() {\n let (env, scope) = setup();\n let known_tx_hash: Field = 1;\n let anchor_ts = advance_by(env, 10);\n let msg = make_msg(scope, Option::some(known_tx_hash), anchor_ts);\n\n env.utility_context(|context| { receive(context.this_address(), BoundedVec::from_array([msg])); });\n\n let _now = advance_by(env, 100);\n\n // First sync resolves the message and marks it as processed.\n env.utility_context(|context| {\n let address = context.this_address();\n assert_eq(sync_inbox(address, scope).len(), 1);\n assert(OffchainReception::is_processed(address, scope, msg), \"should be processed\");\n });\n\n // Re-deliver the same message. The next sync recognizes it as already processed and does not re-push it.\n env.utility_context(|context| {\n let address = context.this_address();\n receive(address, BoundedVec::from_array([msg]));\n\n assert(\n OffchainReception::is_processed(address, scope, msg),\n \"re-delivery must preserve the processed guard\",\n );\n assert_eq(sync_inbox(address, scope).len(), 0);\n });\n }\n}\n"
|
|
1370
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/messages/processing/offchain/mod.nr",
|
|
1371
|
+
"source": "use crate::{\n context::UtilityContext,\n ephemeral::EphemeralArray,\n messages::{encoding::MESSAGE_CIPHERTEXT_LEN, processing::OffchainMessageWithTx},\n oracle::{contract_sync::set_contract_sync_cache_invalid, tx_resolution::get_resolved_txs},\n protocol::{address::AztecAddress, traits::{Deserialize, Serialize}},\n};\n\nmod reception;\nuse reception::{MAX_ANCHOR_FUTURE_SKEW, OffchainReception};\n\n/// Maximum number of offchain messages accepted by `offchain_receive` in a single call.\npub global MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL: u32 = 16;\n\n/// A function that manages offchain-delivered messages for processing during sync.\n///\n/// Offchain messages are messages that are not broadcasted via onchain logs. They are instead delivered to the\n/// recipient by calling the `offchain_receive` utility function (injected by the `#[aztec]` macro). Message transport\n/// is the app's responsibility. Typical examples of transport methods are: messaging apps, email, QR codes, etc.\n///\n/// Once offchain messages are delivered to the recipient's private environment via `offchain_receive`, messages are\n/// locally stored in a persistent inbox.\n///\n/// This function determines when each message in said inbox is ready for processing, when it can be safely disposed\n/// of, etc.\n///\n/// The only current implementation of an [`OffchainInboxSync`] is [`sync_inbox`], which manages an inbox with\n/// expiration and finality-based eviction and automatic transaction context resolution.\npub type OffchainInboxSync = unconstrained fn(\n/* contract_address */AztecAddress, /* scope */ AztecAddress) -> EphemeralArray<OffchainMessageWithTx>;\n\n/// Delivers offchain messages to the given contract's offchain inbox for subsequent processing.\n///\n/// Offchain messages are transaction effects that are not broadcasted via onchain logs. Instead, the sender shares the\n/// message to the recipient through an external channel (e.g. a URL accessible by the recipient). The recipient then\n/// calls this function to hand the messages to the contract so they can be processed through the same mechanisms as\n/// onchain messages.\n///\n/// Messages are processed when their originating transaction is found onchain (providing the context needed to\n/// validate resulting notes and events).\n///\n/// Messages are eventually removed from the inbox: an unprocessed message once its TTL (`anchor_block_timestamp +\n/// MAX_MSG_TTL`) elapses, and a processed message once the block its transaction was found in finalizes.\n///\n/// Processing order is not guaranteed.\npub unconstrained fn receive(\n contract_address: AztecAddress,\n messages: BoundedVec<OffchainMessage, MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL>,\n) {\n // Offchain reception facts are scoped to the recipient. Note that because offchain messages have no integrity or\n // authenticity checks it is not possible to verify that this is indeed the intended recipient. In this case we're\n // assuming a cooperative environment, which is on par with other offchain delivery expectations.\n //\n // The sender-supplied anchor timestamp is the one field we bound: a message claiming to originate implausibly far\n // in our future (see MAX_ANCHOR_FUTURE_SKEW) cannot be genuine, and accepting it would let a malicious anchor evade\n // the TTL-based inbox eviction. We reject such a batch by panicking instead of silently dropping the message, so\n // the calling wallet can react to it (e.g. surface the error or distrust the sender).\n let now = UtilityContext::new().timestamp();\n messages.for_each(|msg| {\n assert(\n msg.anchor_block_timestamp <= now + MAX_ANCHOR_FUTURE_SKEW,\n \"offchain message anchor timestamp is implausibly far in the future\",\n );\n });\n\n messages.for_each(|msg| OffchainReception::init(contract_address, msg));\n\n // Clear cache for message recipients so the next sync runs.\n set_contract_sync_cache_invalid(contract_address, messages.map(|msg| msg.recipient));\n}\n\n/// Returns offchain-delivered messages to process during sync.\npub unconstrained fn sync_inbox(\n contract_address: AztecAddress,\n scope: AztecAddress,\n) -> EphemeralArray<OffchainMessageWithTx> {\n let active_receptions = OffchainReception::load_all(contract_address, scope);\n\n // Ask PXE to resolve each message's originating tx. We pass the tx hashes in reception order, so the resolved txs\n // come back aligned with the reception indices and can be matched back positionally.\n let resolved_txs = get_resolved_txs(active_receptions.map(|reception: OffchainReception| {\n reception.read_message().tx_hash.unwrap_or(0)\n }));\n\n let processable_messages: EphemeralArray<OffchainMessageWithTx> = EphemeralArray::empty();\n let now = UtilityContext::new().timestamp();\n\n active_receptions.for_each(|i, reception| {\n let maybe_message = reception.step(resolved_txs.get(i), now);\n if maybe_message.is_some() {\n processable_messages.push(maybe_message.unwrap());\n }\n });\n\n processable_messages\n}\n\n/// A message delivered via the `offchain_receive` utility function.\n#[derive(Serialize, Deserialize)]\npub struct OffchainMessage {\n /// The encrypted message payload.\n pub ciphertext: BoundedVec<Field, MESSAGE_CIPHERTEXT_LEN>,\n /// The intended recipient of the message.\n pub recipient: AztecAddress,\n /// The hash of the transaction that produced this message. `Option::none` indicates a tx-less message.\n pub tx_hash: Option<Field>,\n /// Anchor block timestamp at message emission.\n pub anchor_block_timestamp: u64,\n}\n\nmod test {\n use crate::{\n oracle::random::random,\n protocol::{address::AztecAddress, constants::MAX_TX_LIFETIME},\n test::helpers::test_environment::TestEnvironment,\n };\n use super::{MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL, OffchainMessage, receive, sync_inbox};\n use super::reception::{MAX_ANCHOR_FUTURE_SKEW, MAX_MSG_TTL, OffchainReception};\n\n unconstrained fn setup() -> (TestEnvironment, AztecAddress) {\n let mut env = TestEnvironment::new();\n let scope = env.create_light_account();\n (env, scope)\n }\n\n /// Creates an `OffchainMessage` with dummy ciphertext and the given scope as recipient.\n fn make_msg(recipient: AztecAddress, tx_hash: Option<Field>, anchor_block_timestamp: u64) -> OffchainMessage {\n OffchainMessage { ciphertext: BoundedVec::new(), recipient, tx_hash, anchor_block_timestamp }\n }\n\n /// Advances the TXE block timestamp by `offset` seconds and returns the resulting timestamp.\n unconstrained fn advance_by(env: TestEnvironment, offset: u64) -> u64 {\n env.advance_next_block_timestamp_by(offset);\n env.mine_block();\n env.last_block_timestamp()\n }\n\n #[test]\n unconstrained fn empty_inbox_returns_empty_result() {\n let (env, scope) = setup();\n env.utility_context(|context| {\n let address = context.this_address();\n let result = sync_inbox(address, scope);\n\n assert_eq(result.len(), 0);\n assert_eq(OffchainReception::load_all(address, scope).len(), 0);\n });\n }\n\n #[test]\n unconstrained fn multiple_messages_mixed_expiration() {\n let (env, scope) = setup();\n let anchor_ts = advance_by(env, 10);\n\n let expired_a_tx_hash = random();\n let survivor_tx_hash = random();\n\n let expired_a = make_msg(scope, Option::some(expired_a_tx_hash), 0);\n let survivor = make_msg(scope, Option::some(survivor_tx_hash), anchor_ts);\n let expired_b = make_msg(scope, Option::none(), 0);\n\n env.utility_context(|context| {\n let address = context.this_address();\n let mut msgs: BoundedVec<OffchainMessage, MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL> = BoundedVec::new();\n // Message 0: tx-bound, anchor=0 so it expires quickly.\n msgs.push(expired_a);\n // Message 1: tx-bound, anchor_ts is recent so it survives.\n msgs.push(survivor);\n // Message 2: tx-less, anchor=0 so it also expires.\n msgs.push(expired_b);\n receive(address, msgs);\n });\n\n // Advance past MAX_MSG_TTL for anchor=0, but not for anchor_ts.\n let _now = advance_by(env, MAX_MSG_TTL);\n\n env.utility_context(|context| {\n let address = context.this_address();\n let result = sync_inbox(address, scope);\n\n assert_eq(result.len(), 0); // all contexts are None\n assert(\n !OffchainReception::is_active(address, scope, expired_a),\n \"expired tx-bound reception should be terminated\",\n );\n assert(\n !OffchainReception::is_active(address, scope, expired_b),\n \"expired tx-less reception should be terminated\",\n );\n assert(OffchainReception::is_active(address, scope, survivor), \"survivor reception should stay active\");\n assert_eq(OffchainReception::load_all(address, scope).len(), 1);\n });\n }\n\n #[test]\n unconstrained fn accepts_messages_within_the_tolerated_future_skew() {\n let (env, scope) = setup();\n let now = advance_by(env, 10);\n\n // A present-dated anchor and a 24h-future one both fall within the tolerated skew. The latter models a genuine\n // message whose sender anchored ahead of our lagging PXE, and must still be accepted.\n let present = make_msg(scope, Option::some(random()), now);\n let lagged = make_msg(scope, Option::some(random()), now + MAX_TX_LIFETIME);\n\n env.utility_context(|context| {\n let address = context.this_address();\n receive(address, BoundedVec::from_array([present, lagged]));\n\n assert(OffchainReception::is_active(address, scope, present));\n assert(OffchainReception::is_active(address, scope, lagged));\n assert_eq(OffchainReception::load_all(address, scope).len(), 2);\n });\n }\n\n #[test(should_fail_with = \"offchain message anchor timestamp is implausibly far in the future\")]\n unconstrained fn rejects_batch_with_implausible_future_anchor() {\n let (env, scope) = setup();\n let now = advance_by(env, 10);\n\n // Beyond `now + MAX_ANCHOR_FUTURE_SKEW`: our view would trail the tip by more than a tx lifetime, so this\n // cannot be genuine. Reception panics so the wallet can react rather than accept it.\n let too_future = make_msg(\n scope,\n Option::some(random()),\n now + MAX_ANCHOR_FUTURE_SKEW + 7200,\n );\n\n env.utility_context(|context| { receive(context.this_address(), BoundedVec::from_array([too_future])); });\n }\n\n // -- Idempotent re-delivery (first-write-wins fact recording) ---------\n\n #[test]\n unconstrained fn redelivery_is_idempotent() {\n let (env, scope) = setup();\n let anchor_ts = advance_by(env, 10);\n let msg = make_msg(scope, Option::some(random()), anchor_ts);\n\n // First delivery, committed as its own job.\n env.utility_context(|context| { receive(context.this_address(), BoundedVec::from_array([msg])); });\n\n // Re-delivering the same content-addressed message must not panic and must not create a second reception.\n env.utility_context(|context| {\n let address = context.this_address();\n receive(address, BoundedVec::from_array([msg]));\n\n assert(OffchainReception::is_active(address, scope, msg), \"reception should be active\");\n assert_eq(OffchainReception::load_all(address, scope).len(), 1);\n });\n }\n\n #[test]\n unconstrained fn redelivery_after_processing_keeps_processed_guard() {\n let (env, scope) = setup();\n let known_tx_hash: Field = 1;\n let anchor_ts = advance_by(env, 10);\n let msg = make_msg(scope, Option::some(known_tx_hash), anchor_ts);\n\n env.utility_context(|context| { receive(context.this_address(), BoundedVec::from_array([msg])); });\n\n let _now = advance_by(env, 100);\n\n // First sync resolves the message and marks it as processed.\n env.utility_context(|context| {\n let address = context.this_address();\n assert_eq(sync_inbox(address, scope).len(), 1);\n assert(OffchainReception::is_processed(address, scope, msg), \"should be processed\");\n });\n\n // Re-deliver the same message. The next sync recognizes it as already processed and does not re-push it.\n env.utility_context(|context| {\n let address = context.this_address();\n receive(address, BoundedVec::from_array([msg]));\n\n assert(\n OffchainReception::is_processed(address, scope, msg),\n \"re-delivery must preserve the processed guard\",\n );\n assert_eq(sync_inbox(address, scope).len(), 0);\n });\n }\n}\n"
|
|
1110
1372
|
},
|
|
1111
1373
|
"164": {
|
|
1112
1374
|
"function_locations": [
|
|
1113
1375
|
{
|
|
1114
1376
|
"name": "OffchainReception::init",
|
|
1115
|
-
"start":
|
|
1377
|
+
"start": 9679
|
|
1116
1378
|
},
|
|
1117
1379
|
{
|
|
1118
1380
|
"name": "OffchainReception::load_all",
|
|
1119
|
-
"start":
|
|
1381
|
+
"start": 10197
|
|
1120
1382
|
},
|
|
1121
1383
|
{
|
|
1122
1384
|
"name": "OffchainReception::read_message",
|
|
1123
|
-
"start":
|
|
1385
|
+
"start": 10546
|
|
1124
1386
|
},
|
|
1125
1387
|
{
|
|
1126
1388
|
"name": "OffchainReception::id_for",
|
|
1127
|
-
"start":
|
|
1389
|
+
"start": 11247
|
|
1128
1390
|
},
|
|
1129
1391
|
{
|
|
1130
1392
|
"name": "OffchainReception::is_active",
|
|
1131
|
-
"start":
|
|
1393
|
+
"start": 11566
|
|
1132
1394
|
},
|
|
1133
1395
|
{
|
|
1134
1396
|
"name": "OffchainReception::step",
|
|
1135
|
-
"start":
|
|
1397
|
+
"start": 12221
|
|
1136
1398
|
},
|
|
1137
1399
|
{
|
|
1138
1400
|
"name": "OffchainReception::is_processed",
|
|
1139
|
-
"start":
|
|
1401
|
+
"start": 13826
|
|
1140
1402
|
},
|
|
1141
1403
|
{
|
|
1142
1404
|
"name": "OffchainReception::mark_processed",
|
|
1143
|
-
"start":
|
|
1405
|
+
"start": 14394
|
|
1144
1406
|
},
|
|
1145
1407
|
{
|
|
1146
1408
|
"name": "OffchainReception::terminate",
|
|
1147
|
-
"start":
|
|
1409
|
+
"start": 14962
|
|
1148
1410
|
},
|
|
1149
1411
|
{
|
|
1150
1412
|
"name": "to_payload",
|
|
1151
|
-
"start":
|
|
1413
|
+
"start": 15336
|
|
1152
1414
|
},
|
|
1153
1415
|
{
|
|
1154
1416
|
"name": "test::setup",
|
|
1155
|
-
"start":
|
|
1417
|
+
"start": 15893
|
|
1156
1418
|
},
|
|
1157
1419
|
{
|
|
1158
1420
|
"name": "test::make_msg",
|
|
1159
|
-
"start":
|
|
1421
|
+
"start": 16223
|
|
1160
1422
|
},
|
|
1161
1423
|
{
|
|
1162
1424
|
"name": "test::resolved_tx_at_block",
|
|
1163
|
-
"start":
|
|
1425
|
+
"start": 16507
|
|
1164
1426
|
},
|
|
1165
1427
|
{
|
|
1166
1428
|
"name": "test::resolved_tx",
|
|
1167
|
-
"start":
|
|
1429
|
+
"start": 16898
|
|
1168
1430
|
},
|
|
1169
1431
|
{
|
|
1170
1432
|
"name": "test::expired_reception_is_terminated",
|
|
1171
|
-
"start":
|
|
1433
|
+
"start": 17015
|
|
1172
1434
|
},
|
|
1173
1435
|
{
|
|
1174
1436
|
"name": "test::unresolved_reception_stays_active",
|
|
1175
|
-
"start":
|
|
1437
|
+
"start": 17697
|
|
1176
1438
|
},
|
|
1177
1439
|
{
|
|
1178
1440
|
"name": "test::resolved_reception_is_ready_to_process",
|
|
1179
|
-
"start":
|
|
1441
|
+
"start": 18492
|
|
1180
1442
|
},
|
|
1181
1443
|
{
|
|
1182
1444
|
"name": "test::already_processed_reception_is_not_re_pushed",
|
|
1183
|
-
"start":
|
|
1445
|
+
"start": 19538
|
|
1184
1446
|
},
|
|
1185
1447
|
{
|
|
1186
1448
|
"name": "test::processed_reception_terminates_once_its_origin_block_finalizes",
|
|
1187
|
-
"start":
|
|
1449
|
+
"start": 20912
|
|
1188
1450
|
},
|
|
1189
1451
|
{
|
|
1190
1452
|
"name": "test::unfinalized_processed_reception_survives_past_the_ttl",
|
|
1191
|
-
"start":
|
|
1453
|
+
"start": 22137
|
|
1192
1454
|
},
|
|
1193
1455
|
{
|
|
1194
1456
|
"name": "test::expired_reception_is_still_processed_when_its_tx_resolves",
|
|
1195
|
-
"start":
|
|
1457
|
+
"start": 23527
|
|
1196
1458
|
}
|
|
1197
1459
|
],
|
|
1198
|
-
"path": "/
|
|
1199
|
-
"source": "//! The state machine of a single offchain message reception process.\n//!\n//! Offchain processing needs to handle some complexity, including the possibility of reorgs reverting message effects,\n//! and the need to reprocess messages in that case. The state chart below summarizes the current behavior.\n//!\n//! ```text\n//! offchain_receive() (process starts)\n//! |\n//! v\n//! +-----------+ tx found onchain +-----------+\n//! ---- | | --------------------------> | |\n//! tx not found | | | | | discover notes,\n//! |--> | RECEIVED | | PROCESSED | ~~> events, etc\n//! | | <-------------------------- | |\n//! | | tx block re-orged | |\n//! +-----------+ +-----------+\n//! | |\n//! | TTL expired | tx block finalized\n//! v v\n//! +---------------------------------------------------------+\n//! | TERMINATED (process ends) |\n//! +---------------------------------------------------------+\n//! ```\n//!\n//! ## States\n//!\n//! - **Received**: the message is stored but its originating transaction has not been found onchain yet (or the\n//! message is tx-less; see below). While the reception process is in this state, it keeps looking for the\n// transaction onchain.\n//! - **Processed**: the message has been handed off for processing. If there weren't reorgs, reaching this state would\n//! be equivalent to terminating the reception process. Since reorgs are a possibility, this state is not terminal\n//! until the block the originating transaction was found in finalizes.\n//! - **Terminated**: nothing else can be done with the message, either because its originating transaction never\n//! appeared within the TTL, or because the block it was processed in has finalized. This is the terminal state of\n//! this process.\n//!\n//! ## Transitions (each evaluated by [`OffchainReception::step`])\n//!\n//! - **Received -> Processed**: the originating transaction is found onchain. The message (packaged with its\n//! transaction context) is queued to have its actual contents processed (which can lead for example to the discovery\n//! of notes and events).\n//! - **Processed -> Received**: the block where the message transaction was originally found is re-orged out.\n//! - **Received -> Terminated**: the message TTL has elapsed (see below), so the originating transaction can no longer\n//! appear and the message is no longer processable.\n//! - **Processed -> Terminated**: the block the originating transaction was found in has finalized, so the effects of\n//! its processing are permanent and reorg-proof.\n//!\n//! # Message reception lifecycle and the TTL\n//!\n//! A reception expires once `now > anchor_block_timestamp + MAX_MSG_TTL`, where `MAX_MSG_TTL = MAX_TX_LIFETIME + 2h`.\n//! A transaction anchored at a given block can only be mined within\n//! [`MAX_TX_LIFETIME`](crate::protocol::constants::MAX_TX_LIFETIME) of that block, so once that\n//! window (plus a safety margin of 2 hours) has elapsed the originating transaction can no longer appear, and it is\n//! safe to stop looking for it.\n//!\n//! The TTL only matters for unprocessed messages. Already-processed message receptions complete when the block that\n//! included the originating transaction finalizes, which is exactly when the processing becomes reorg-proof.\n//!\n//! # Current limitations, future plans\n//!\n//! - Tx-less messages never reach `Processed` and are only ever removed by expiry. This will be supported in the\n//! future.\n//!\n//! # Implementation\n//!\n//! [`OffchainReception::init`] creates a [fact collection](crate::facts::FactCollection) of type\n//! `OFFCHAIN_RECEPTION_TYPE_ID`. The fact collection is identified by a hash of the `OffchainMessage` it tracks, which\n//! makes duplicate calls to `init` idempotent.\n//!\n//! Upon reception, an `OFFCHAIN_MESSAGE_RECEIVED` [non-retractable fact](crate::facts::record_non_retractable_fact) is\n//! recorded. The fact's payload is the `OffchainMessage` itself, which persists it to be subsequently processed.\n//! A fact collection with just an `OFFCHAIN_MESSAGE_RECEIVED` fact represents an active reception process in the\n//! RECEIVED state from our state chart above.\n//!\n//! The message reception state machine is driven externally, advancing one step at a time each time\n//! [`OffchainReception::step`] is invoked. [`OffchainReception::step`] implements the rest of the reception state\n//! machine described above.\n//!\n//! When stepping, if the transaction to the message is found onchain, an `OFFCHAIN_MESSAGE_PROCESSED`\n//! [retractable fact](crate::facts::record_retractable_fact) associated to the block where the transaction was found is\n//! recorded.\n//! Note that since this fact is retractable, a reorg dropping said block would result in the fact being automatically\n//! removed by PXE, effectively pushing the reception process back to `RECEIVED` state.\n//!\n//! To determine in which state of the reception process we are we just analyze the recorded facts:\n//!\n//! - If there is an `OFFCHAIN_MESSAGE_PROCESSED` fact we are in PROCESSED state. Once that fact's origin block has\n//! finalized the processing is reorg-proof, so the [fact collection](crate::facts::FactCollection) can (and should)\n//! be deleted; until then there is nothing to do.\n//! - If there is only an `OFFCHAIN_MESSAGE_RECEIVED` fact we are in RECEIVED state, so we check if the message\n//! transaction is now available onchain, and if so, exercise the RECEIVED->PROCESSED transition. Otherwise, once the\n//! TTL has elapsed the originating transaction can no longer appear and the collection can (and should) be deleted.\n//!\n//! The PROCESSED->RECEIVED transition is transparently handled by PXE: if a re-org caused the message transaction to\n//! fall off the chain, the `OFFCHAIN_MESSAGE_PROCESSED` fact disappears, taking us back to the RECEIVED state.\n\nuse crate::{\n ephemeral::EphemeralArray,\n facts::{\n delete_fact_collection, Fact, FactCollection, get_fact_collection, get_fact_collections_by_type, OriginBlock,\n record_non_retractable_fact, record_retractable_fact,\n },\n messages::processing::OffchainMessageWithTx,\n oracle::tx_resolution::ResolvedTx,\n protocol::{\n address::AztecAddress,\n constants::MAX_TX_LIFETIME,\n hash::{poseidon2_hash, sha256_to_field},\n traits::{Deserialize, Serialize},\n },\n};\nuse super::OffchainMessage;\n\n/// Maximum time-to-live for a tx-bound offchain message.\n///\n/// After `anchor_block_timestamp + MAX_MSG_TTL`, the message is evicted from the inbox.\n/// (7200 == 2 hours)\npub(crate) global MAX_MSG_TTL: u64 = MAX_TX_LIFETIME + 7200;\n\n/// Fact type id of the fact that stores the offchain message body inside a reception collection.\nglobal OFFCHAIN_MESSAGE_RECEIVED: Field = sha256_to_field(\"AZTEC_NR::OFFCHAIN_MESSAGE_RECEIVED\".as_bytes());\n\n/// Fact type id to mark an offchain message as processed.\n///\n/// A reception is in \"processed state\" exactly when its collection carries a fact of this type.\npub(crate) global OFFCHAIN_MESSAGE_PROCESSED: Field =\n sha256_to_field(\"AZTEC_NR::OFFCHAIN_MESSAGE_PROCESSED\".as_bytes());\n\n/// Fact-collection type id shared by every offchain message reception in the [fact store](crate::facts).\npub(crate) global OFFCHAIN_RECEPTION_TYPE_ID: Field =\n sha256_to_field(\"AZTEC_NR::OFFCHAIN_RECEPTION_TYPE_ID\".as_bytes());\n\n/// A single offchain message reception machine, backed by a [`FactCollection`](crate::facts::FactCollection).\n///\n/// Wraps the fact collection that tracks one message's progress through the reception state machine (see the\n/// [module documentation](super)); the [`OffchainMessage`] it carries is decoded on demand.\n#[derive(Deserialize, Serialize)]\npub(crate) struct OffchainReception {\n collection: FactCollection,\n}\n\nimpl OffchainReception {\n /// Initializes a new reception for a freshly received message, in the `Received` state.\n ///\n /// Re-initializing the same message is a no-op, which makes redelivery idempotent.\n pub(crate) unconstrained fn init(contract_address: AztecAddress, message: OffchainMessage) {\n record_non_retractable_fact(\n contract_address,\n message.recipient,\n OFFCHAIN_RECEPTION_TYPE_ID,\n Self::id_for(message),\n OFFCHAIN_MESSAGE_RECEIVED,\n to_payload(message),\n );\n }\n\n /// Loads every active reception for the given contract and scope, decoding each message body.\n pub(crate) unconstrained fn load_all(\n contract_address: AztecAddress,\n scope: AztecAddress,\n ) -> EphemeralArray<OffchainReception> {\n get_fact_collections_by_type(contract_address, scope, OFFCHAIN_RECEPTION_TYPE_ID)\n .map(|collection: FactCollection| OffchainReception { collection })\n }\n\n /// Reads and returns the message this reception carries, decoding it from its fact collection.\n pub(crate) unconstrained fn read_message(self) -> OffchainMessage {\n let message_fact = self.collection.facts.find(|f: Fact| f.fact_type_id == OFFCHAIN_MESSAGE_RECEIVED).unwrap();\n let n = <OffchainMessage as Deserialize>::N;\n let mut fields = [0; <OffchainMessage as Deserialize>::N];\n for i in 0..n {\n fields[i] = message_fact.payload.get(i);\n }\n Deserialize::deserialize(fields)\n }\n\n /// Computes the fact-collection id that identifies a message's reception machine in the [fact store](crate::facts).\n ///\n /// The id is a hash of the message, which makes duplicate receptions of the same message collapse onto a single\n /// reception.\n pub(crate) fn id_for(message: OffchainMessage) -> Field {\n poseidon2_hash(message.serialize())\n }\n\n /// Returns `true` if a reception for `message` is currently active for the given contract and scope.\n pub(crate) unconstrained fn is_active(\n contract_address: AztecAddress,\n scope: AztecAddress,\n message: OffchainMessage,\n ) -> bool {\n get_fact_collection(\n contract_address,\n scope,\n OFFCHAIN_RECEPTION_TYPE_ID,\n Self::id_for(message),\n )\n .is_some()\n }\n\n /// Advances this reception by one step of its state machine. See the [module documentation](super) for the\n /// states, transitions, and expiry rules.\n ///\n /// Returns `Some` with the message and its resolved context when this step determines the message is ready to be\n /// processed.\n pub(crate) unconstrained fn step(\n self,\n maybe_resolved_tx: Option<ResolvedTx>,\n now: u64,\n ) -> Option<OffchainMessageWithTx> {\n let message = self.read_message();\n let processed_fact = self.collection.facts.find(|f: Fact| f.fact_type_id == OFFCHAIN_MESSAGE_PROCESSED);\n\n if processed_fact.is_none() & maybe_resolved_tx.is_some() {\n // Received -> Processed: the originating tx is onchain.\n let resolved = maybe_resolved_tx.unwrap();\n self.mark_processed(resolved.block_number, resolved.block_hash);\n Option::some(\n OffchainMessageWithTx { message_ciphertext: message.ciphertext, resolved_tx: resolved },\n )\n } else if processed_fact.is_some() {\n if processed_fact.unwrap().origin_block.unwrap().block_state.is_finalized() {\n // Processed -> Terminated: once the marker's origin block finalizes, the processing is reorg-proof and\n // the reception is complete. Until then we wait: a reorg dropping that block removes the retractable\n // marker and PXE pushes us back to Received.\n self.terminate();\n }\n Option::none()\n } else {\n // Received -> Terminated: the TTL caps how long we keep looking for the originating tx.\n if now > message.anchor_block_timestamp + MAX_MSG_TTL {\n self.terminate();\n }\n Option::none()\n }\n }\n\n /// Returns `true` if the reception for `message` has been marked processed.\n pub(crate) unconstrained fn is_processed(\n contract_address: AztecAddress,\n scope: AztecAddress,\n message: OffchainMessage,\n ) -> bool {\n let maybe_collection = get_fact_collection(\n contract_address,\n scope,\n OFFCHAIN_RECEPTION_TYPE_ID,\n Self::id_for(message),\n );\n if maybe_collection.is_some() {\n maybe_collection.unwrap().facts.any(|f: Fact| f.fact_type_id == OFFCHAIN_MESSAGE_PROCESSED)\n } else {\n false\n }\n }\n\n /// Records the retractable processed marker for this reception, originated at the resolved block.\n unconstrained fn mark_processed(self, block_number: u32, block_hash: Field) {\n let empty_payload: EphemeralArray<Field> = EphemeralArray::empty();\n record_retractable_fact(\n self.collection.contract_address,\n self.collection.scope,\n self.collection.fact_collection_type_id,\n self.collection.fact_collection_id,\n OFFCHAIN_MESSAGE_PROCESSED,\n empty_payload,\n OriginBlock { block_number, block_hash },\n );\n }\n\n /// Terminates this reception by deleting its [fact collection](crate::facts::FactCollection).\n unconstrained fn terminate(self) {\n delete_fact_collection(\n self.collection.contract_address,\n self.collection.scope,\n self.collection.fact_collection_type_id,\n self.collection.fact_collection_id,\n );\n }\n}\n\n/// Serializes an [`OffchainMessage`] into a fact payload.\nunconstrained fn to_payload(message: OffchainMessage) -> EphemeralArray<Field> {\n let fields = message.serialize();\n let payload: EphemeralArray<Field> = EphemeralArray::empty();\n for i in 0..fields.len() {\n payload.push(fields[i]);\n }\n payload\n}\n\nmod test {\n use crate::{\n messages::processing::offchain::OffchainMessage,\n oracle::{random::random, tx_resolution::ResolvedTx},\n protocol::address::AztecAddress,\n test::helpers::test_environment::TestEnvironment,\n };\n use super::{MAX_MSG_TTL, OffchainReception};\n\n unconstrained fn setup() -> (TestEnvironment, AztecAddress) {\n let mut env = TestEnvironment::new();\n let scope = env.create_light_account();\n (env, scope)\n }\n\n /// Creates an `OffchainMessage` with dummy ciphertext and the given scope as recipient.\n fn make_msg(recipient: AztecAddress, tx_hash: Option<Field>, anchor_block_timestamp: u64) -> OffchainMessage {\n OffchainMessage { ciphertext: BoundedVec::new(), recipient, tx_hash, anchor_block_timestamp }\n }\n\n /// Builds the resolved-tx context PXE would return for `tx_hash`, found in `block_number`.\n fn resolved_tx_at_block(tx_hash: Field, block_number: u32) -> ResolvedTx {\n ResolvedTx {\n tx_hash,\n unique_note_hashes_in_tx: BoundedVec::new(),\n first_nullifier_in_tx: 0,\n block_number,\n block_hash: 0,\n }\n }\n\n /// Builds a resolved-tx context found in a low block, which TXE (proven == finalized == latest) reports as\n /// `Finalized`.\n fn resolved_tx(tx_hash: Field) -> ResolvedTx {\n resolved_tx_at_block(tx_hash, 1)\n }\n\n #[test]\n unconstrained fn expired_reception_is_terminated() {\n let (env, scope) = setup();\n let msg = make_msg(scope, Option::some(random()), 0);\n\n env.utility_context(|context| {\n let address = context.this_address();\n OffchainReception::init(address, msg);\n let reception = OffchainReception::load_all(address, scope).get(0);\n\n // Past the TTL with no resolved tx: the reception is terminated.\n assert(reception.step(Option::none(), MAX_MSG_TTL + 1).is_none());\n assert(!OffchainReception::is_active(address, scope, msg), \"expired reception should be terminated\");\n });\n }\n\n #[test]\n unconstrained fn unresolved_reception_stays_active() {\n let (env, scope) = setup();\n let msg = make_msg(scope, Option::some(random()), 0);\n\n env.utility_context(|context| {\n let address = context.this_address();\n OffchainReception::init(address, msg);\n let reception = OffchainReception::load_all(address, scope).get(0);\n\n // Within the TTL with no resolved tx: nothing to process, the reception stays.\n assert(reception.step(Option::none(), 100).is_none());\n assert(OffchainReception::is_active(address, scope, msg), \"unresolved reception should stay active\");\n assert(!OffchainReception::is_processed(address, scope, msg), \"should still be unprocessed\");\n });\n }\n\n #[test]\n unconstrained fn resolved_reception_is_ready_to_process() {\n let (env, scope) = setup();\n let tx_hash = random();\n let msg = make_msg(scope, Option::some(tx_hash), 0);\n\n env.utility_context(|context| {\n let address = context.this_address();\n OffchainReception::init(address, msg);\n let reception = OffchainReception::load_all(address, scope).get(0);\n\n // A resolved tx within the TTL: the message is handed off with its tx context attached.\n let processable = reception.step(Option::some(resolved_tx(tx_hash)), 100);\n assert(processable.is_some());\n assert_eq(processable.unwrap().resolved_tx.tx_hash, tx_hash);\n\n // It stays active for reorg safety and is now marked processed.\n assert(OffchainReception::is_active(address, scope, msg), \"processed reception should stay active\");\n assert(OffchainReception::is_processed(address, scope, msg), \"should be processed\");\n });\n }\n\n #[test]\n unconstrained fn already_processed_reception_is_not_re_pushed() {\n let (env, scope) = setup();\n let tx_hash = random();\n let msg = make_msg(scope, Option::some(tx_hash), 0);\n // A future origin block stays unfinalized, so the reception lingers in Processed across steps.\n let future_block = env.last_block_number() + 100;\n\n env.utility_context(|context| {\n let address = context.this_address();\n OffchainReception::init(address, msg);\n\n // First step processes the message.\n let reception = OffchainReception::load_all(address, scope).get(0);\n assert(reception.step(Option::some(resolved_tx_at_block(tx_hash, future_block)), 100).is_some());\n assert(OffchainReception::is_processed(address, scope, msg), \"should be processed\");\n\n // Second step (still resolved, not finalized) recognizes it as processed and does not re-push it.\n let reloaded = OffchainReception::load_all(address, scope).get(0);\n assert(\n reloaded.step(Option::some(resolved_tx_at_block(tx_hash, future_block)), 100).is_none(),\n \"already processed\",\n );\n assert(OffchainReception::is_active(address, scope, msg), \"processed reception should still be active\");\n });\n }\n\n #[test]\n unconstrained fn processed_reception_terminates_once_its_origin_block_finalizes() {\n let (env, scope) = setup();\n let tx_hash = random();\n let msg = make_msg(scope, Option::some(tx_hash), 0);\n\n env.utility_context(|context| {\n let address = context.this_address();\n OffchainReception::init(address, msg);\n\n // Process the message against a finalized block.\n let reception = OffchainReception::load_all(address, scope).get(0);\n assert(reception.step(Option::some(resolved_tx(tx_hash)), 100).is_some());\n assert(OffchainReception::is_processed(address, scope, msg), \"should be processed\");\n\n // Next step, still well within the TTL: a finalized origin block makes the processing reorg-proof, so the\n // reception terminates regardless of the TTL.\n let reloaded = OffchainReception::load_all(address, scope).get(0);\n assert(reloaded.step(Option::some(resolved_tx(tx_hash)), 100).is_none());\n assert(\n !OffchainReception::is_active(address, scope, msg),\n \"finalized processed reception should be terminated\",\n );\n });\n }\n\n #[test]\n unconstrained fn unfinalized_processed_reception_survives_past_the_ttl() {\n let (env, scope) = setup();\n let tx_hash = random();\n let msg = make_msg(scope, Option::some(tx_hash), 0);\n // A future origin block never finalizes here, so the reception must not be terminated by the TTL.\n let future_block = env.last_block_number() + 100;\n\n env.utility_context(|context| {\n let address = context.this_address();\n OffchainReception::init(address, msg);\n\n let reception = OffchainReception::load_all(address, scope).get(0);\n assert(reception.step(Option::some(resolved_tx_at_block(tx_hash, future_block)), 100).is_some());\n assert(OffchainReception::is_processed(address, scope, msg), \"should be processed\");\n\n // Past the TTL, but the origin block has not finalized: the reception stays active. The TTL no longer\n // governs an already-processed reception.\n let reloaded = OffchainReception::load_all(address, scope).get(0);\n assert(reloaded.step(Option::some(resolved_tx_at_block(tx_hash, future_block)), MAX_MSG_TTL + 1).is_none());\n assert(\n OffchainReception::is_active(address, scope, msg),\n \"unfinalized processed reception should survive past the TTL\",\n );\n });\n }\n\n #[test]\n unconstrained fn expired_reception_is_still_processed_when_its_tx_resolves() {\n let (env, scope) = setup();\n let tx_hash = random();\n let msg = make_msg(scope, Option::some(tx_hash), 0);\n\n env.utility_context(|context| {\n let address = context.this_address();\n OffchainReception::init(address, msg);\n\n // Even past the TTL, a freshly resolved tx is still handed off: expiry only caps the search for the\n // originating tx, it does not pre-empt processing once that tx is found.\n let reception = OffchainReception::load_all(address, scope).get(0);\n assert(reception.step(Option::some(resolved_tx(tx_hash)), MAX_MSG_TTL + 1).is_some());\n assert(OffchainReception::is_processed(address, scope, msg), \"should be processed\");\n assert(OffchainReception::is_active(address, scope, msg), \"just-processed reception should stay active\");\n });\n }\n}\n"
|
|
1460
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/messages/processing/offchain/reception.nr",
|
|
1461
|
+
"source": "//! The state machine of a single offchain message reception process.\n//!\n//! Offchain processing needs to handle some complexity, including the possibility of reorgs reverting message effects,\n//! and the need to reprocess messages in that case. The state chart below summarizes the current behavior.\n//!\n//! ```text\n//! offchain_receive() (process starts)\n//! |\n//! v\n//! +-----------+ tx found onchain +-----------+\n//! ---- | | --------------------------> | |\n//! tx not found | | | | | discover notes,\n//! |--> | RECEIVED | | PROCESSED | ~~> events, etc\n//! | | <-------------------------- | |\n//! | | tx block re-orged | |\n//! +-----------+ +-----------+\n//! | |\n//! | TTL expired | tx block finalized\n//! v v\n//! +---------------------------------------------------------+\n//! | TERMINATED (process ends) |\n//! +---------------------------------------------------------+\n//! ```\n//!\n//! ## States\n//!\n//! - **Received**: the message is stored but its originating transaction has not been found onchain yet (or the\n//! message is tx-less; see below). While the reception process is in this state, it keeps looking for the\n// transaction onchain.\n//! - **Processed**: the message has been handed off for processing. If there weren't reorgs, reaching this state would\n//! be equivalent to terminating the reception process. Since reorgs are a possibility, this state is not terminal\n//! until the block the originating transaction was found in finalizes.\n//! - **Terminated**: nothing else can be done with the message, either because its originating transaction never\n//! appeared within the TTL, or because the block it was processed in has finalized. This is the terminal state of\n//! this process.\n//!\n//! ## Transitions (each evaluated by [`OffchainReception::step`])\n//!\n//! - **Received -> Processed**: the originating transaction is found onchain. The message (packaged with its\n//! transaction context) is queued to have its actual contents processed (which can lead for example to the discovery\n//! of notes and events).\n//! - **Processed -> Received**: the block where the message transaction was originally found is re-orged out.\n//! - **Received -> Terminated**: the message TTL has elapsed (see below), so the originating transaction can no longer\n//! appear and the message is no longer processable.\n//! - **Processed -> Terminated**: the block the originating transaction was found in has finalized, so the effects of\n//! its processing are permanent and reorg-proof.\n//!\n//! # Message reception lifecycle and the TTL\n//!\n//! A reception expires once `now > anchor_block_timestamp + MAX_MSG_TTL`, where `MAX_MSG_TTL = MAX_TX_LIFETIME + 2h`.\n//! A transaction anchored at a given block can only be mined within\n//! [`MAX_TX_LIFETIME`](crate::protocol::constants::MAX_TX_LIFETIME) of that block, so once that\n//! window (plus a safety margin of 2 hours) has elapsed the originating transaction can no longer appear, and it is\n//! safe to stop looking for it.\n//!\n//! The TTL only matters for unprocessed messages. Already-processed message receptions complete when the block that\n//! included the originating transaction finalizes, which is exactly when the processing becomes reorg-proof.\n//!\n//! # Current limitations, future plans\n//!\n//! - Tx-less messages never reach `Processed` and are only ever removed by expiry. This will be supported in the\n//! future.\n//!\n//! # Implementation\n//!\n//! [`OffchainReception::init`] creates a [fact collection](crate::facts::FactCollection) of type\n//! `OFFCHAIN_RECEPTION_TYPE_ID`. The fact collection is identified by a hash of the `OffchainMessage` it tracks, which\n//! makes duplicate calls to `init` idempotent.\n//!\n//! Upon reception, an `OFFCHAIN_MESSAGE_RECEIVED` [non-retractable fact](crate::facts::record_non_retractable_fact) is\n//! recorded. The fact's payload is the `OffchainMessage` itself, which persists it to be subsequently processed.\n//! A fact collection with just an `OFFCHAIN_MESSAGE_RECEIVED` fact represents an active reception process in the\n//! RECEIVED state from our state chart above.\n//!\n//! The message reception state machine is driven externally, advancing one step at a time each time\n//! [`OffchainReception::step`] is invoked. [`OffchainReception::step`] implements the rest of the reception state\n//! machine described above.\n//!\n//! When stepping, if the transaction to the message is found onchain, an `OFFCHAIN_MESSAGE_PROCESSED`\n//! [retractable fact](crate::facts::record_retractable_fact) associated to the block where the transaction was found is\n//! recorded.\n//! Note that since this fact is retractable, a reorg dropping said block would result in the fact being automatically\n//! removed by PXE, effectively pushing the reception process back to `RECEIVED` state.\n//!\n//! To determine in which state of the reception process we are we just analyze the recorded facts:\n//!\n//! - If there is an `OFFCHAIN_MESSAGE_PROCESSED` fact we are in PROCESSED state. Once that fact's origin block has\n//! finalized the processing is reorg-proof, so the [fact collection](crate::facts::FactCollection) can (and should)\n//! be deleted; until then there is nothing to do.\n//! - If there is only an `OFFCHAIN_MESSAGE_RECEIVED` fact we are in RECEIVED state, so we check if the message\n//! transaction is now available onchain, and if so, exercise the RECEIVED->PROCESSED transition. Otherwise, once the\n//! TTL has elapsed the originating transaction can no longer appear and the collection can (and should) be deleted.\n//!\n//! The PROCESSED->RECEIVED transition is transparently handled by PXE: if a re-org caused the message transaction to\n//! fall off the chain, the `OFFCHAIN_MESSAGE_PROCESSED` fact disappears, taking us back to the RECEIVED state.\n\nuse crate::{\n ephemeral::EphemeralArray,\n facts::{\n delete_fact_collection, Fact, FactCollection, get_fact_collection, get_fact_collections_by_type, OriginBlock,\n record_non_retractable_fact, record_retractable_fact,\n },\n messages::processing::OffchainMessageWithTx,\n oracle::tx_resolution::ResolvedTx,\n protocol::{\n address::AztecAddress,\n constants::MAX_TX_LIFETIME,\n hash::{poseidon2_hash, sha256_to_field},\n traits::{Deserialize, Serialize},\n },\n};\nuse super::OffchainMessage;\n\n/// Maximum time-to-live for a tx-bound offchain message.\n///\n/// After `anchor_block_timestamp + MAX_MSG_TTL`, the message is evicted from the inbox.\n/// (7200 == 2 hours)\npub(crate) global MAX_MSG_TTL: u64 = MAX_TX_LIFETIME + 7200;\n\n/// Maximum amount by which a received message's `anchor_block_timestamp` may exceed our current timestamp.\n///\n/// A message's anchor is the timestamp of the block the sender anchored its originating tx to, so for a genuine\n/// message it is at or before our own anchor timestamp. Our PXE may lag the chain tip though, which can make a\n/// legitimate anchor appear to be in our future, so we tolerate a forward skew of `MAX_TX_LIFETIME` (the longest a tx\n/// can wait to be mined after its anchor) plus a 2h margin. A larger skew would mean our view trails the tip by more\n/// than a tx lifetime -- so far behind that we could not even build a tx that wouldn't be immediately expired -- so\n/// such a message cannot be genuine and is rejected on reception. Bounding the anchor this way also keeps accepted\n/// values near the present, which prevents the `anchor_block_timestamp + MAX_MSG_TTL` eviction check from overflowing.\n/// (7200 == 2 hours)\npub(crate) global MAX_ANCHOR_FUTURE_SKEW: u64 = MAX_TX_LIFETIME + 7200;\n\n/// Fact type id of the fact that stores the offchain message body inside a reception collection.\nglobal OFFCHAIN_MESSAGE_RECEIVED: Field = sha256_to_field(\"AZTEC_NR::OFFCHAIN_MESSAGE_RECEIVED\".as_bytes());\n\n/// Fact type id to mark an offchain message as processed.\n///\n/// A reception is in \"processed state\" exactly when its collection carries a fact of this type.\npub(crate) global OFFCHAIN_MESSAGE_PROCESSED: Field =\n sha256_to_field(\"AZTEC_NR::OFFCHAIN_MESSAGE_PROCESSED\".as_bytes());\n\n/// Fact-collection type id shared by every offchain message reception in the [fact store](crate::facts).\npub(crate) global OFFCHAIN_RECEPTION_TYPE_ID: Field =\n sha256_to_field(\"AZTEC_NR::OFFCHAIN_RECEPTION_TYPE_ID\".as_bytes());\n\n/// A single offchain message reception machine, backed by a [`FactCollection`](crate::facts::FactCollection).\n///\n/// Wraps the fact collection that tracks one message's progress through the reception state machine (see the\n/// [module documentation](super)); the [`OffchainMessage`] it carries is decoded on demand.\n#[derive(Deserialize, Serialize)]\npub(crate) struct OffchainReception {\n collection: FactCollection,\n}\n\nimpl OffchainReception {\n /// Initializes a new reception for a freshly received message, in the `Received` state.\n ///\n /// Re-initializing the same message is a no-op, which makes redelivery idempotent.\n pub(crate) unconstrained fn init(contract_address: AztecAddress, message: OffchainMessage) {\n record_non_retractable_fact(\n contract_address,\n message.recipient,\n OFFCHAIN_RECEPTION_TYPE_ID,\n Self::id_for(message),\n OFFCHAIN_MESSAGE_RECEIVED,\n to_payload(message),\n );\n }\n\n /// Loads every active reception for the given contract and scope, decoding each message body.\n pub(crate) unconstrained fn load_all(\n contract_address: AztecAddress,\n scope: AztecAddress,\n ) -> EphemeralArray<OffchainReception> {\n get_fact_collections_by_type(contract_address, scope, OFFCHAIN_RECEPTION_TYPE_ID)\n .map(|collection: FactCollection| OffchainReception { collection })\n }\n\n /// Reads and returns the message this reception carries, decoding it from its fact collection.\n pub(crate) unconstrained fn read_message(self) -> OffchainMessage {\n let message_fact = self.collection.facts.find(|f: Fact| f.fact_type_id == OFFCHAIN_MESSAGE_RECEIVED).unwrap();\n let n = <OffchainMessage as Deserialize>::N;\n let mut fields = [0; <OffchainMessage as Deserialize>::N];\n for i in 0..n {\n fields[i] = message_fact.payload.get(i);\n }\n Deserialize::deserialize(fields)\n }\n\n /// Computes the fact-collection id that identifies a message's reception machine in the [fact store](crate::facts).\n ///\n /// The id is a hash of the message, which makes duplicate receptions of the same message collapse onto a single\n /// reception.\n pub(crate) fn id_for(message: OffchainMessage) -> Field {\n poseidon2_hash(message.serialize())\n }\n\n /// Returns `true` if a reception for `message` is currently active for the given contract and scope.\n pub(crate) unconstrained fn is_active(\n contract_address: AztecAddress,\n scope: AztecAddress,\n message: OffchainMessage,\n ) -> bool {\n get_fact_collection(\n contract_address,\n scope,\n OFFCHAIN_RECEPTION_TYPE_ID,\n Self::id_for(message),\n )\n .is_some()\n }\n\n /// Advances this reception by one step of its state machine. See the [module documentation](super) for the\n /// states, transitions, and expiry rules.\n ///\n /// Returns `Some` with the message and its resolved context when this step determines the message is ready to be\n /// processed.\n pub(crate) unconstrained fn step(\n self,\n maybe_resolved_tx: Option<ResolvedTx>,\n now: u64,\n ) -> Option<OffchainMessageWithTx> {\n let message = self.read_message();\n let processed_fact = self.collection.facts.find(|f: Fact| f.fact_type_id == OFFCHAIN_MESSAGE_PROCESSED);\n\n if processed_fact.is_none() & maybe_resolved_tx.is_some() {\n // Received -> Processed: the originating tx is onchain.\n let resolved = maybe_resolved_tx.unwrap();\n self.mark_processed(resolved.block_number, resolved.block_hash);\n Option::some(\n OffchainMessageWithTx { message_ciphertext: message.ciphertext, resolved_tx: resolved },\n )\n } else if processed_fact.is_some() {\n if processed_fact.unwrap().origin_block.unwrap().block_state.is_finalized() {\n // Processed -> Terminated: once the marker's origin block finalizes, the processing is reorg-proof and\n // the reception is complete. Until then we wait: a reorg dropping that block removes the retractable\n // marker and PXE pushes us back to Received.\n self.terminate();\n }\n Option::none()\n } else {\n // Received -> Terminated: the TTL caps how long we keep looking for the originating tx.\n if now > message.anchor_block_timestamp + MAX_MSG_TTL {\n self.terminate();\n }\n Option::none()\n }\n }\n\n /// Returns `true` if the reception for `message` has been marked processed.\n pub(crate) unconstrained fn is_processed(\n contract_address: AztecAddress,\n scope: AztecAddress,\n message: OffchainMessage,\n ) -> bool {\n let maybe_collection = get_fact_collection(\n contract_address,\n scope,\n OFFCHAIN_RECEPTION_TYPE_ID,\n Self::id_for(message),\n );\n if maybe_collection.is_some() {\n maybe_collection.unwrap().facts.any(|f: Fact| f.fact_type_id == OFFCHAIN_MESSAGE_PROCESSED)\n } else {\n false\n }\n }\n\n /// Records the retractable processed marker for this reception, originated at the resolved block.\n unconstrained fn mark_processed(self, block_number: u32, block_hash: Field) {\n let empty_payload: EphemeralArray<Field> = EphemeralArray::empty();\n record_retractable_fact(\n self.collection.contract_address,\n self.collection.scope,\n self.collection.fact_collection_type_id,\n self.collection.fact_collection_id,\n OFFCHAIN_MESSAGE_PROCESSED,\n empty_payload,\n OriginBlock { block_number, block_hash },\n );\n }\n\n /// Terminates this reception by deleting its [fact collection](crate::facts::FactCollection).\n unconstrained fn terminate(self) {\n delete_fact_collection(\n self.collection.contract_address,\n self.collection.scope,\n self.collection.fact_collection_type_id,\n self.collection.fact_collection_id,\n );\n }\n}\n\n/// Serializes an [`OffchainMessage`] into a fact payload.\nunconstrained fn to_payload(message: OffchainMessage) -> EphemeralArray<Field> {\n let fields = message.serialize();\n let payload: EphemeralArray<Field> = EphemeralArray::empty();\n for i in 0..fields.len() {\n payload.push(fields[i]);\n }\n payload\n}\n\nmod test {\n use crate::{\n messages::processing::offchain::OffchainMessage,\n oracle::{random::random, tx_resolution::ResolvedTx},\n protocol::address::AztecAddress,\n test::helpers::test_environment::TestEnvironment,\n };\n use super::{MAX_MSG_TTL, OffchainReception};\n\n unconstrained fn setup() -> (TestEnvironment, AztecAddress) {\n let mut env = TestEnvironment::new();\n let scope = env.create_light_account();\n (env, scope)\n }\n\n /// Creates an `OffchainMessage` with dummy ciphertext and the given scope as recipient.\n fn make_msg(recipient: AztecAddress, tx_hash: Option<Field>, anchor_block_timestamp: u64) -> OffchainMessage {\n OffchainMessage { ciphertext: BoundedVec::new(), recipient, tx_hash, anchor_block_timestamp }\n }\n\n /// Builds the resolved-tx context PXE would return for `tx_hash`, found in `block_number`.\n fn resolved_tx_at_block(tx_hash: Field, block_number: u32) -> ResolvedTx {\n ResolvedTx {\n tx_hash,\n unique_note_hashes_in_tx: BoundedVec::new(),\n first_nullifier_in_tx: 0,\n block_number,\n block_hash: 0,\n }\n }\n\n /// Builds a resolved-tx context found in a low block, which TXE (proven == finalized == latest) reports as\n /// `Finalized`.\n fn resolved_tx(tx_hash: Field) -> ResolvedTx {\n resolved_tx_at_block(tx_hash, 1)\n }\n\n #[test]\n unconstrained fn expired_reception_is_terminated() {\n let (env, scope) = setup();\n let msg = make_msg(scope, Option::some(random()), 0);\n\n env.utility_context(|context| {\n let address = context.this_address();\n OffchainReception::init(address, msg);\n let reception = OffchainReception::load_all(address, scope).get(0);\n\n // Past the TTL with no resolved tx: the reception is terminated.\n assert(reception.step(Option::none(), MAX_MSG_TTL + 1).is_none());\n assert(!OffchainReception::is_active(address, scope, msg), \"expired reception should be terminated\");\n });\n }\n\n #[test]\n unconstrained fn unresolved_reception_stays_active() {\n let (env, scope) = setup();\n let msg = make_msg(scope, Option::some(random()), 0);\n\n env.utility_context(|context| {\n let address = context.this_address();\n OffchainReception::init(address, msg);\n let reception = OffchainReception::load_all(address, scope).get(0);\n\n // Within the TTL with no resolved tx: nothing to process, the reception stays.\n assert(reception.step(Option::none(), 100).is_none());\n assert(OffchainReception::is_active(address, scope, msg), \"unresolved reception should stay active\");\n assert(!OffchainReception::is_processed(address, scope, msg), \"should still be unprocessed\");\n });\n }\n\n #[test]\n unconstrained fn resolved_reception_is_ready_to_process() {\n let (env, scope) = setup();\n let tx_hash = random();\n let msg = make_msg(scope, Option::some(tx_hash), 0);\n\n env.utility_context(|context| {\n let address = context.this_address();\n OffchainReception::init(address, msg);\n let reception = OffchainReception::load_all(address, scope).get(0);\n\n // A resolved tx within the TTL: the message is handed off with its tx context attached.\n let processable = reception.step(Option::some(resolved_tx(tx_hash)), 100);\n assert(processable.is_some());\n assert_eq(processable.unwrap().resolved_tx.tx_hash, tx_hash);\n\n // It stays active for reorg safety and is now marked processed.\n assert(OffchainReception::is_active(address, scope, msg), \"processed reception should stay active\");\n assert(OffchainReception::is_processed(address, scope, msg), \"should be processed\");\n });\n }\n\n #[test]\n unconstrained fn already_processed_reception_is_not_re_pushed() {\n let (env, scope) = setup();\n let tx_hash = random();\n let msg = make_msg(scope, Option::some(tx_hash), 0);\n // A future origin block stays unfinalized, so the reception lingers in Processed across steps.\n let future_block = env.last_block_number() + 100;\n\n env.utility_context(|context| {\n let address = context.this_address();\n OffchainReception::init(address, msg);\n\n // First step processes the message.\n let reception = OffchainReception::load_all(address, scope).get(0);\n assert(reception.step(Option::some(resolved_tx_at_block(tx_hash, future_block)), 100).is_some());\n assert(OffchainReception::is_processed(address, scope, msg), \"should be processed\");\n\n // Second step (still resolved, not finalized) recognizes it as processed and does not re-push it.\n let reloaded = OffchainReception::load_all(address, scope).get(0);\n assert(\n reloaded.step(Option::some(resolved_tx_at_block(tx_hash, future_block)), 100).is_none(),\n \"already processed\",\n );\n assert(OffchainReception::is_active(address, scope, msg), \"processed reception should still be active\");\n });\n }\n\n #[test]\n unconstrained fn processed_reception_terminates_once_its_origin_block_finalizes() {\n let (env, scope) = setup();\n let tx_hash = random();\n let msg = make_msg(scope, Option::some(tx_hash), 0);\n\n env.utility_context(|context| {\n let address = context.this_address();\n OffchainReception::init(address, msg);\n\n // Process the message against a finalized block.\n let reception = OffchainReception::load_all(address, scope).get(0);\n assert(reception.step(Option::some(resolved_tx(tx_hash)), 100).is_some());\n assert(OffchainReception::is_processed(address, scope, msg), \"should be processed\");\n\n // Next step, still well within the TTL: a finalized origin block makes the processing reorg-proof, so the\n // reception terminates regardless of the TTL.\n let reloaded = OffchainReception::load_all(address, scope).get(0);\n assert(reloaded.step(Option::some(resolved_tx(tx_hash)), 100).is_none());\n assert(\n !OffchainReception::is_active(address, scope, msg),\n \"finalized processed reception should be terminated\",\n );\n });\n }\n\n #[test]\n unconstrained fn unfinalized_processed_reception_survives_past_the_ttl() {\n let (env, scope) = setup();\n let tx_hash = random();\n let msg = make_msg(scope, Option::some(tx_hash), 0);\n // A future origin block never finalizes here, so the reception must not be terminated by the TTL.\n let future_block = env.last_block_number() + 100;\n\n env.utility_context(|context| {\n let address = context.this_address();\n OffchainReception::init(address, msg);\n\n let reception = OffchainReception::load_all(address, scope).get(0);\n assert(reception.step(Option::some(resolved_tx_at_block(tx_hash, future_block)), 100).is_some());\n assert(OffchainReception::is_processed(address, scope, msg), \"should be processed\");\n\n // Past the TTL, but the origin block has not finalized: the reception stays active. The TTL no longer\n // governs an already-processed reception.\n let reloaded = OffchainReception::load_all(address, scope).get(0);\n assert(reloaded.step(Option::some(resolved_tx_at_block(tx_hash, future_block)), MAX_MSG_TTL + 1).is_none());\n assert(\n OffchainReception::is_active(address, scope, msg),\n \"unfinalized processed reception should survive past the TTL\",\n );\n });\n }\n\n #[test]\n unconstrained fn expired_reception_is_still_processed_when_its_tx_resolves() {\n let (env, scope) = setup();\n let tx_hash = random();\n let msg = make_msg(scope, Option::some(tx_hash), 0);\n\n env.utility_context(|context| {\n let address = context.this_address();\n OffchainReception::init(address, msg);\n\n // Even past the TTL, a freshly resolved tx is still handed off: expiry only caps the search for the\n // originating tx, it does not pre-empt processing once that tx is found.\n let reception = OffchainReception::load_all(address, scope).get(0);\n assert(reception.step(Option::some(resolved_tx(tx_hash)), MAX_MSG_TTL + 1).is_some());\n assert(OffchainReception::is_processed(address, scope, msg), \"should be processed\");\n assert(OffchainReception::is_active(address, scope, msg), \"just-processed reception should stay active\");\n });\n }\n}\n"
|
|
1200
1462
|
},
|
|
1201
1463
|
"17": {
|
|
1202
1464
|
"function_locations": [
|
|
@@ -1403,7 +1665,7 @@
|
|
|
1403
1665
|
"start": 3150
|
|
1404
1666
|
}
|
|
1405
1667
|
],
|
|
1406
|
-
"path": "/
|
|
1668
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/oracle/aes128_decrypt.nr",
|
|
1407
1669
|
"source": "#[oracle(aztec_utl_decryptAes128)]\nunconstrained fn aes128_decrypt_oracle<let N: u32>(\n ciphertext: BoundedVec<u8, N>,\n iv: [u8; 16],\n sym_key: [u8; 16],\n) -> Option<BoundedVec<u8, N>> {}\n\n/// Attempts to decrypt a ciphertext using AES128.\n///\n/// Returns `Option::some(plaintext)` on success, or `Option::none()` if decryption fails (e.g. due to malformed\n/// ciphertext or invalid PKCS#7 padding). Note that decryption with the wrong key will almost always return `None`\n/// because the decrypted garbage data will have invalid PKCS#7 padding.\n///\n/// Note that we accept ciphertext as a BoundedVec, not as an array. This is because this function is typically used\n/// when processing logs and at that point we don't have comptime information about the length of the ciphertext as\n/// the log is not specific to any individual note.\n// TODO(F-498): review naming consistency\npub unconstrained fn try_aes128_decrypt<let N: u32>(\n ciphertext: BoundedVec<u8, N>,\n iv: [u8; 16],\n sym_key: [u8; 16],\n) -> Option<BoundedVec<u8, N>> {\n aes128_decrypt_oracle(ciphertext, iv, sym_key)\n}\n\nmod test {\n use crate::{\n keys::ecdh_shared_secret::compute_app_siloed_shared_secret,\n messages::encryption::aes128::derive_aes_symmetric_key_and_iv_from_shared_secret,\n utils::{array::subarray::subarray, point::point_from_x_coord},\n };\n use crate::protocol::address::AztecAddress;\n use crate::test::helpers::test_environment::TestEnvironment;\n use super::try_aes128_decrypt;\n use std::aes128::aes128_encrypt;\n\n global CONTRACT_ADDRESS: AztecAddress = AztecAddress { inner: 42 };\n global TEST_PLAINTEXT_LENGTH: u32 = 10;\n global TEST_CIPHERTEXT_LENGTH: u32 = 16;\n global TEST_PADDING_LENGTH: u32 = TEST_CIPHERTEXT_LENGTH - TEST_PLAINTEXT_LENGTH;\n\n #[test]\n unconstrained fn aes_encrypt_then_decrypt() {\n let env = TestEnvironment::new();\n\n env.utility_context(|_| {\n let shared_secret_point = point_from_x_coord(1).unwrap();\n let s_app = compute_app_siloed_shared_secret(shared_secret_point, CONTRACT_ADDRESS);\n\n let (sym_key, iv) = derive_aes_symmetric_key_and_iv_from_shared_secret::<1>(s_app)[0];\n\n let plaintext: [u8; TEST_PLAINTEXT_LENGTH] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];\n\n let ciphertext: [u8; TEST_CIPHERTEXT_LENGTH] = aes128_encrypt(plaintext, iv, sym_key);\n\n let ciphertext_bvec = BoundedVec::<u8, TEST_CIPHERTEXT_LENGTH>::from_array(ciphertext);\n\n let received_plaintext = try_aes128_decrypt(ciphertext_bvec, iv, sym_key).unwrap();\n assert_eq(received_plaintext.len(), TEST_PLAINTEXT_LENGTH);\n assert_eq(received_plaintext.max_len(), TEST_CIPHERTEXT_LENGTH);\n assert_eq(subarray::<_, _, TEST_PLAINTEXT_LENGTH>(received_plaintext.storage(), 0), plaintext);\n assert_eq(\n subarray::<_, _, TEST_PADDING_LENGTH>(received_plaintext.storage(), TEST_PLAINTEXT_LENGTH),\n [0 as u8; TEST_PADDING_LENGTH],\n );\n })\n }\n\n #[test]\n unconstrained fn aes_encrypt_then_decrypt_with_bad_sym_key_is_caught() {\n let env = TestEnvironment::new();\n\n env.utility_context(|_| {\n // Decrypting with the wrong key results in garbage data with invalid PKCS#7 padding,\n // so the oracle returns None.\n let shared_secret_point = point_from_x_coord(1).unwrap();\n let s_app = compute_app_siloed_shared_secret(shared_secret_point, CONTRACT_ADDRESS);\n\n let (sym_key, iv) = derive_aes_symmetric_key_and_iv_from_shared_secret::<1>(s_app)[0];\n\n let plaintext: [u8; TEST_PLAINTEXT_LENGTH] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];\n let ciphertext: [u8; TEST_CIPHERTEXT_LENGTH] = aes128_encrypt(plaintext, iv, sym_key);\n\n let mut bad_sym_key = sym_key;\n bad_sym_key[0] = 0;\n\n let ciphertext_bvec = BoundedVec::<u8, TEST_CIPHERTEXT_LENGTH>::from_array(ciphertext);\n // Decryption with wrong key returns None because the garbage output has invalid PKCS#7 padding.\n let result = try_aes128_decrypt(ciphertext_bvec, iv, bad_sym_key);\n assert(result.is_none(), \"decryption with bad key should return None\");\n });\n }\n}\n"
|
|
1408
1670
|
},
|
|
1409
1671
|
"185": {
|
|
@@ -1641,7 +1903,7 @@
|
|
|
1641
1903
|
"start": 7247
|
|
1642
1904
|
}
|
|
1643
1905
|
],
|
|
1644
|
-
"path": "/
|
|
1906
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/oracle/avm.nr",
|
|
1645
1907
|
"source": "//! AVM oracles.\n//!\n//! There are only available during public execution. Calling any of them from a private or utility function will\n//! result in runtime errors.\n\nuse crate::protocol::address::{AztecAddress, EthAddress};\n\npub unconstrained fn address() -> AztecAddress {\n address_opcode()\n}\npub unconstrained fn sender() -> AztecAddress {\n sender_opcode()\n}\npub unconstrained fn transaction_fee() -> Field {\n transaction_fee_opcode()\n}\npub unconstrained fn chain_id() -> Field {\n chain_id_opcode()\n}\npub unconstrained fn version() -> Field {\n version_opcode()\n}\npub unconstrained fn block_number() -> u32 {\n block_number_opcode()\n}\npub unconstrained fn timestamp() -> u64 {\n timestamp_opcode()\n}\npub unconstrained fn min_fee_per_l2_gas() -> u128 {\n min_fee_per_l2_gas_opcode()\n}\npub unconstrained fn min_fee_per_da_gas() -> u128 {\n min_fee_per_da_gas_opcode()\n}\npub unconstrained fn l2_gas_left() -> u32 {\n l2_gas_left_opcode()\n}\npub unconstrained fn da_gas_left() -> u32 {\n da_gas_left_opcode()\n}\npub unconstrained fn is_static_call() -> bool {\n is_static_call_opcode()\n}\npub unconstrained fn note_hash_exists(note_hash: Field, leaf_index: u64) -> bool {\n note_hash_exists_opcode(note_hash, leaf_index)\n}\npub unconstrained fn emit_note_hash(note_hash: Field) {\n emit_note_hash_opcode(note_hash)\n}\npub unconstrained fn nullifier_exists(siloed_nullifier: Field) -> bool {\n nullifier_exists_opcode(siloed_nullifier)\n}\npub unconstrained fn emit_nullifier(nullifier: Field) {\n emit_nullifier_opcode(nullifier)\n}\npub unconstrained fn emit_public_log(message: [Field]) {\n emit_public_log_opcode(message)\n}\npub unconstrained fn l1_to_l2_msg_exists(msg_hash: Field, msg_leaf_index: u64) -> bool {\n l1_to_l2_msg_exists_opcode(msg_hash, msg_leaf_index)\n}\npub unconstrained fn send_l2_to_l1_msg(recipient: EthAddress, content: Field) {\n send_l2_to_l1_msg_opcode(recipient, content)\n}\n\npub unconstrained fn call<let N: u32>(\n l2_gas_allocation: u32,\n da_gas_allocation: u32,\n address: AztecAddress,\n args: [Field; N],\n) {\n call_opcode(l2_gas_allocation, da_gas_allocation, address, N, args)\n}\n\npub unconstrained fn call_static<let N: u32>(\n l2_gas_allocation: u32,\n da_gas_allocation: u32,\n address: AztecAddress,\n args: [Field; N],\n) {\n call_static_opcode(l2_gas_allocation, da_gas_allocation, address, N, args)\n}\n\npub unconstrained fn calldata_copy<let N: u32>(cdoffset: u32, copy_size: u32) -> [Field; N] {\n calldata_copy_opcode(cdoffset, copy_size)\n}\n\n/// `success_copy` is placed immediately after the CALL opcode to get the success value\npub unconstrained fn success_copy() -> bool {\n success_copy_opcode()\n}\n\npub unconstrained fn returndata_size() -> u32 {\n returndata_size_opcode()\n}\n\npub unconstrained fn returndata_copy(rdoffset: u32, copy_size: u32) -> [Field] {\n returndata_copy_opcode(rdoffset, copy_size)\n}\n\n/// The additional prefix is to avoid clashing with the `return` Noir keyword.\npub unconstrained fn avm_return(returndata: [Field]) {\n return_opcode(returndata)\n}\n\n/// This opcode reverts using the exact data given. In general it should only be used to do rethrows, where the revert\n/// data is the same as the original revert data. For normal reverts, use Noir's `assert` which, on top of reverting,\n/// will also add an error selector to the revert data.\npub unconstrained fn revert(revertdata: [Field]) {\n revert_opcode(revertdata)\n}\n\npub unconstrained fn storage_read(storage_slot: Field, contract_address: Field) -> Field {\n storage_read_opcode(storage_slot, contract_address)\n}\n\npub unconstrained fn storage_write(storage_slot: Field, value: Field) {\n storage_write_opcode(storage_slot, value);\n}\n\n#[oracle(aztec_avm_address)]\nunconstrained fn address_opcode() -> AztecAddress {}\n\n#[oracle(aztec_avm_sender)]\nunconstrained fn sender_opcode() -> AztecAddress {}\n\n#[oracle(aztec_avm_transactionFee)]\nunconstrained fn transaction_fee_opcode() -> Field {}\n\n#[oracle(aztec_avm_chainId)]\nunconstrained fn chain_id_opcode() -> Field {}\n\n#[oracle(aztec_avm_version)]\nunconstrained fn version_opcode() -> Field {}\n\n#[oracle(aztec_avm_blockNumber)]\nunconstrained fn block_number_opcode() -> u32 {}\n\n#[oracle(aztec_avm_timestamp)]\nunconstrained fn timestamp_opcode() -> u64 {}\n\n#[oracle(aztec_avm_minFeePerL2Gas)]\nunconstrained fn min_fee_per_l2_gas_opcode() -> u128 {}\n\n#[oracle(aztec_avm_minFeePerDaGas)]\nunconstrained fn min_fee_per_da_gas_opcode() -> u128 {}\n\n#[oracle(aztec_avm_l2GasLeft)]\nunconstrained fn l2_gas_left_opcode() -> u32 {}\n\n#[oracle(aztec_avm_daGasLeft)]\nunconstrained fn da_gas_left_opcode() -> u32 {}\n\n#[oracle(aztec_avm_isStaticCall)]\nunconstrained fn is_static_call_opcode() -> bool {}\n\n#[oracle(aztec_avm_noteHashExists)]\nunconstrained fn note_hash_exists_opcode(note_hash: Field, leaf_index: u64) -> bool {}\n\n#[oracle(aztec_avm_emitNoteHash)]\nunconstrained fn emit_note_hash_opcode(note_hash: Field) {}\n\n#[oracle(aztec_avm_nullifierExists)]\nunconstrained fn nullifier_exists_opcode(siloed_nullifier: Field) -> bool {}\n\n#[oracle(aztec_avm_emitNullifier)]\nunconstrained fn emit_nullifier_opcode(nullifier: Field) {}\n\n#[oracle(aztec_avm_emitPublicLog)]\nunconstrained fn emit_public_log_opcode(message: [Field]) {}\n\n#[oracle(aztec_avm_l1ToL2MsgExists)]\nunconstrained fn l1_to_l2_msg_exists_opcode(msg_hash: Field, msg_leaf_index: u64) -> bool {}\n\n#[oracle(aztec_avm_sendL2ToL1Msg)]\nunconstrained fn send_l2_to_l1_msg_opcode(recipient: EthAddress, content: Field) {}\n\n#[oracle(aztec_avm_calldataCopy)]\nunconstrained fn calldata_copy_opcode<let N: u32>(cdoffset: u32, copy_size: u32) -> [Field; N] {}\n\n#[oracle(aztec_avm_returndataSize)]\nunconstrained fn returndata_size_opcode() -> u32 {}\n\n#[oracle(aztec_avm_returndataCopy)]\nunconstrained fn returndata_copy_opcode(rdoffset: u32, copy_size: u32) -> [Field] {}\n\n#[oracle(aztec_avm_return)]\nunconstrained fn return_opcode(returndata: [Field]) {}\n\n#[oracle(aztec_avm_revert)]\nunconstrained fn revert_opcode(revertdata: [Field]) {}\n\n// While the length parameter might seem unnecessary given that we have N we keep it around because at the AVM bytecode\n// level, we want to support non-comptime-known lengths for such opcodes, even if Noir code will not generally take\n// that route.\n#[oracle(aztec_avm_call)]\nunconstrained fn call_opcode<let N: u32>(\n l2_gas_allocation: u32,\n da_gas_allocation: u32,\n address: AztecAddress,\n length: u32,\n args: [Field; N],\n) {}\n\n// While the length parameter might seem unnecessary given that we have N we keep it around because at the AVM bytecode\n// level, we want to support non-comptime-known lengths for such opcodes, even if Noir code will not generally take\n// that route.\n#[oracle(aztec_avm_staticCall)]\nunconstrained fn call_static_opcode<let N: u32>(\n l2_gas_allocation: u32,\n da_gas_allocation: u32,\n address: AztecAddress,\n length: u32,\n args: [Field; N],\n) {}\n\n#[oracle(aztec_avm_successCopy)]\nunconstrained fn success_copy_opcode() -> bool {}\n\n#[oracle(aztec_avm_storageRead)]\nunconstrained fn storage_read_opcode(storage_slot: Field, contract_address: Field) -> Field {}\n\n#[oracle(aztec_avm_storageWrite)]\nunconstrained fn storage_write_opcode(storage_slot: Field, value: Field) {}\n"
|
|
1646
1908
|
},
|
|
1647
1909
|
"187": {
|
|
@@ -1655,7 +1917,7 @@
|
|
|
1655
1917
|
"start": 598
|
|
1656
1918
|
}
|
|
1657
1919
|
],
|
|
1658
|
-
"path": "/
|
|
1920
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/oracle/call_private_function.nr",
|
|
1659
1921
|
"source": "use crate::protocol::{abis::function_selector::FunctionSelector, address::AztecAddress};\n\n#[oracle(aztec_prv_callPrivateFunction)]\nunconstrained fn call_private_function_oracle(\n _contract_address: AztecAddress,\n _function_selector: FunctionSelector,\n _args_hash: Field,\n _start_side_effect_counter: u32,\n _is_static_call: bool,\n) -> (u32, Field) {}\n\npub unconstrained fn call_private_function_internal(\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n start_side_effect_counter: u32,\n is_static_call: bool,\n) -> (u32, Field) {\n call_private_function_oracle(\n contract_address,\n function_selector,\n args_hash,\n start_side_effect_counter,\n is_static_call,\n )\n}\n"
|
|
1660
1922
|
},
|
|
1661
1923
|
"188": {
|
|
@@ -1669,7 +1931,7 @@
|
|
|
1669
1931
|
"start": 507
|
|
1670
1932
|
}
|
|
1671
1933
|
],
|
|
1672
|
-
"path": "/
|
|
1934
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/oracle/call_utility_function.nr",
|
|
1673
1935
|
"source": "use crate::protocol::{abis::function_selector::FunctionSelector, address::AztecAddress};\n\n#[oracle(aztec_utl_callUtilityFunction)]\nunconstrained fn call_utility_function_oracle<let M: u32, let N: u32>(\n _contract_address: AztecAddress,\n _function_selector: FunctionSelector,\n _args: [Field; M],\n) -> [Field; N] {}\n\npub unconstrained fn call_utility_function<let M: u32, let N: u32>(\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; M],\n) -> [Field; N] {\n call_utility_function_oracle(contract_address, function_selector, args)\n}\n"
|
|
1674
1936
|
},
|
|
1675
1937
|
"190": {
|
|
@@ -1683,7 +1945,7 @@
|
|
|
1683
1945
|
"start": 700
|
|
1684
1946
|
}
|
|
1685
1947
|
],
|
|
1686
|
-
"path": "/
|
|
1948
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/oracle/contract_sync.nr",
|
|
1687
1949
|
"source": "use crate::protocol::address::AztecAddress;\n\n#[oracle(aztec_utl_setContractSyncCacheInvalid)]\nunconstrained fn set_contract_sync_cache_invalid_oracle<let N: u32>(\n contract_address: AztecAddress,\n scopes: BoundedVec<AztecAddress, N>,\n) {}\n\n/// Forces the PXE to re-sync the given contract for a set of scopes on the next query.\n///\n/// Call this after writing data (e.g. offchain messages) that the contract's `sync_state` function needs to discover.\n/// Without invalidation, the sync cache would skip re-running `sync_state` until the next block.\npub unconstrained fn set_contract_sync_cache_invalid<let N: u32>(\n contract_address: AztecAddress,\n scopes: BoundedVec<AztecAddress, N>,\n) {\n set_contract_sync_cache_invalid_oracle(contract_address, scopes);\n}\n"
|
|
1688
1950
|
},
|
|
1689
1951
|
"192": {
|
|
@@ -1697,7 +1959,7 @@
|
|
|
1697
1959
|
"start": 786
|
|
1698
1960
|
}
|
|
1699
1961
|
],
|
|
1700
|
-
"path": "/
|
|
1962
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/oracle/execution.nr",
|
|
1701
1963
|
"source": "use crate::context::UtilityContext;\nuse crate::protocol::{abis::block_header::BlockHeader, address::AztecAddress};\n\n/// Wire shape of [`get_utility_context_oracle`]'s response. [`UtilityContext`] is built from it rather than returned\n/// directly so its fields stay private to its module.\n#[derive(Eq)]\npub(crate) struct UtilityContextData {\n pub(crate) block_header: BlockHeader,\n pub(crate) contract_address: AztecAddress,\n pub(crate) msg_sender: AztecAddress,\n}\n\n#[oracle(aztec_utl_getUtilityContext)]\nunconstrained fn get_utility_context_oracle() -> UtilityContextData {}\n\n/// Returns a utility context built from the global variables of anchor block and the contract address of the function\n/// being executed.\npub unconstrained fn get_utility_context() -> UtilityContext {\n UtilityContext::from(get_utility_context_oracle())\n}\n"
|
|
1702
1964
|
},
|
|
1703
1965
|
"193": {
|
|
@@ -1723,7 +1985,7 @@
|
|
|
1723
1985
|
"start": 1028
|
|
1724
1986
|
}
|
|
1725
1987
|
],
|
|
1726
|
-
"path": "/
|
|
1988
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/oracle/execution_cache.nr",
|
|
1727
1989
|
"source": "/// Stores values represented as slice in execution cache to be later obtained by its hash.\n// TODO(F-498): review naming consistency\npub fn store<let N: u32>(values: [Field; N], hash: Field) {\n // Safety: This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to\n // call. When loading the values, however, the caller must check that the values are indeed the preimage.\n unsafe { set_hash_preimage_oracle_wrapper(values, hash) };\n}\n\nunconstrained fn set_hash_preimage_oracle_wrapper<let N: u32>(values: [Field; N], hash: Field) {\n set_hash_preimage_oracle(values, hash);\n}\n\n// TODO(F-498): review naming consistency\npub unconstrained fn load<let N: u32>(hash: Field) -> [Field; N] {\n get_hash_preimage_oracle(hash)\n}\n\n#[oracle(aztec_prv_setHashPreimage)]\nunconstrained fn set_hash_preimage_oracle<let N: u32>(_values: [Field; N], _hash: Field) {}\n\n#[oracle(aztec_prv_getHashPreimage)]\nunconstrained fn get_hash_preimage_oracle<let N: u32>(_hash: Field) -> [Field; N] {}\n"
|
|
1728
1990
|
},
|
|
1729
1991
|
"203": {
|
|
@@ -1759,10 +2021,18 @@
|
|
|
1759
2021
|
{
|
|
1760
2022
|
"name": "get_tx_effect_oracle",
|
|
1761
2023
|
"start": 3000
|
|
2024
|
+
},
|
|
2025
|
+
{
|
|
2026
|
+
"name": "get_tx_effects",
|
|
2027
|
+
"start": 3193
|
|
2028
|
+
},
|
|
2029
|
+
{
|
|
2030
|
+
"name": "get_tx_effects_oracle",
|
|
2031
|
+
"start": 3378
|
|
1762
2032
|
}
|
|
1763
2033
|
],
|
|
1764
|
-
"path": "/
|
|
1765
|
-
"source": "use crate::ephemeral::EphemeralArray;\nuse crate::messages::processing::{\n event_validation_request::EventValidationRequest, log_retrieval_request::LogRetrievalRequest,\n log_retrieval_response::LogRetrievalResponse, NoteValidationRequest, pending_tagged_log::PendingTaggedLog,\n provided_secret::ProvidedSecret,\n};\nuse crate::protocol::address::AztecAddress;\nuse crate::protocol::blob_data::TxEffect;\n\n/// Finds new private logs that may have been sent to all registered accounts in PXE in the current contract and\n/// returns them in an ephemeral array with an oracle-allocated base slot.\n///\n/// # Arguments\n///\n/// * `scope` - The account scope to search under.\n/// * `provided_secrets` - Tagging secrets the app supplies explicitly, searched alongside the secrets PXE manages\n/// internally. Used for secrets PXE cannot derive itself (e.g. handshake-derived ones).\npub(crate) unconstrained fn get_pending_tagged_logs(\n scope: AztecAddress,\n provided_secrets: EphemeralArray<ProvidedSecret>,\n) -> EphemeralArray<PendingTaggedLog> {\n get_pending_tagged_logs_oracle(scope, provided_secrets)\n}\n\n#[oracle(aztec_utl_getPendingTaggedLogsV2)]\nunconstrained fn get_pending_tagged_logs_oracle(\n scope: AztecAddress,\n provided_secrets: EphemeralArray<ProvidedSecret>,\n) -> EphemeralArray<PendingTaggedLog> {}\n\n/// Validates note/event requests stored in ephemeral arrays.\npub(crate) unconstrained fn validate_and_store_enqueued_notes_and_events(\n note_validation_requests: EphemeralArray<NoteValidationRequest>,\n event_validation_requests: EphemeralArray<EventValidationRequest>,\n scope: AztecAddress,\n) {\n validate_and_store_enqueued_notes_and_events_oracle(note_validation_requests, event_validation_requests, scope);\n}\n\n#[oracle(aztec_utl_validateAndStoreEnqueuedNotesAndEvents)]\nunconstrained fn validate_and_store_enqueued_notes_and_events_oracle(\n note_validation_requests: EphemeralArray<NoteValidationRequest>,\n event_validation_requests: EphemeralArray<EventValidationRequest>,\n scope: AztecAddress,\n) {}\n\n/// Fetches all logs matching each request's tag and returns a nested ephemeral array.\n///\n/// Each element in the outer array is an inner `EphemeralArray<LogRetrievalResponse>` containing all matching logs for\n/// the request at the same index (which may be empty if no logs were found).\npub unconstrained fn get_logs_by_tag(\n requests: EphemeralArray<LogRetrievalRequest>,\n) -> EphemeralArray<EphemeralArray<LogRetrievalResponse>> {\n get_logs_by_tag_oracle(requests)\n}\n\n#[oracle(aztec_utl_getLogsByTagV2)]\nunconstrained fn get_logs_by_tag_oracle(\n requests: EphemeralArray<LogRetrievalRequest>,\n) -> EphemeralArray<EphemeralArray<LogRetrievalResponse>> {}\n\n/// Fetches all effects of a settled transaction by its hash.\npub unconstrained fn get_tx_effect(tx_hash: Field) -> Option<TxEffect> {\n get_tx_effect_oracle(tx_hash)\n}\n\n#[oracle(aztec_utl_getTxEffect)]\nunconstrained fn get_tx_effect_oracle(tx_hash: Field) -> Option<TxEffect> {}\n"
|
|
2034
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/oracle/message_processing.nr",
|
|
2035
|
+
"source": "use crate::ephemeral::EphemeralArray;\nuse crate::messages::processing::{\n event_validation_request::EventValidationRequest, log_retrieval_request::LogRetrievalRequest,\n log_retrieval_response::LogRetrievalResponse, NoteValidationRequest, pending_tagged_log::PendingTaggedLog,\n provided_secret::ProvidedSecret,\n};\nuse crate::protocol::address::AztecAddress;\nuse crate::protocol::blob_data::TxEffect;\n\n/// Finds new private logs that may have been sent to all registered accounts in PXE in the current contract and\n/// returns them in an ephemeral array with an oracle-allocated base slot.\n///\n/// # Arguments\n///\n/// * `scope` - The account scope to search under.\n/// * `provided_secrets` - Tagging secrets the app supplies explicitly, searched alongside the secrets PXE manages\n/// internally. Used for secrets PXE cannot derive itself (e.g. handshake-derived ones).\npub(crate) unconstrained fn get_pending_tagged_logs(\n scope: AztecAddress,\n provided_secrets: EphemeralArray<ProvidedSecret>,\n) -> EphemeralArray<PendingTaggedLog> {\n get_pending_tagged_logs_oracle(scope, provided_secrets)\n}\n\n#[oracle(aztec_utl_getPendingTaggedLogsV2)]\nunconstrained fn get_pending_tagged_logs_oracle(\n scope: AztecAddress,\n provided_secrets: EphemeralArray<ProvidedSecret>,\n) -> EphemeralArray<PendingTaggedLog> {}\n\n/// Validates note/event requests stored in ephemeral arrays.\npub(crate) unconstrained fn validate_and_store_enqueued_notes_and_events(\n note_validation_requests: EphemeralArray<NoteValidationRequest>,\n event_validation_requests: EphemeralArray<EventValidationRequest>,\n scope: AztecAddress,\n) {\n validate_and_store_enqueued_notes_and_events_oracle(note_validation_requests, event_validation_requests, scope);\n}\n\n#[oracle(aztec_utl_validateAndStoreEnqueuedNotesAndEvents)]\nunconstrained fn validate_and_store_enqueued_notes_and_events_oracle(\n note_validation_requests: EphemeralArray<NoteValidationRequest>,\n event_validation_requests: EphemeralArray<EventValidationRequest>,\n scope: AztecAddress,\n) {}\n\n/// Fetches all logs matching each request's tag and returns a nested ephemeral array.\n///\n/// Each element in the outer array is an inner `EphemeralArray<LogRetrievalResponse>` containing all matching logs for\n/// the request at the same index (which may be empty if no logs were found).\npub unconstrained fn get_logs_by_tag(\n requests: EphemeralArray<LogRetrievalRequest>,\n) -> EphemeralArray<EphemeralArray<LogRetrievalResponse>> {\n get_logs_by_tag_oracle(requests)\n}\n\n#[oracle(aztec_utl_getLogsByTagV2)]\nunconstrained fn get_logs_by_tag_oracle(\n requests: EphemeralArray<LogRetrievalRequest>,\n) -> EphemeralArray<EphemeralArray<LogRetrievalResponse>> {}\n\n/// Fetches all effects of a settled transaction by its hash.\npub unconstrained fn get_tx_effect(tx_hash: Field) -> Option<TxEffect> {\n get_tx_effect_oracle(tx_hash)\n}\n\n#[oracle(aztec_utl_getTxEffect)]\nunconstrained fn get_tx_effect_oracle(tx_hash: Field) -> Option<TxEffect> {}\n\n/// Fetches all effects of settled transactions by hash, preserving request order.\npub unconstrained fn get_tx_effects(tx_hashes: EphemeralArray<Field>) -> EphemeralArray<Option<TxEffect>> {\n get_tx_effects_oracle(tx_hashes)\n}\n\n#[oracle(aztec_utl_getTxEffects)]\nunconstrained fn get_tx_effects_oracle(tx_hashes: EphemeralArray<Field>) -> EphemeralArray<Option<TxEffect>> {}\n"
|
|
1766
2036
|
},
|
|
1767
2037
|
"206": {
|
|
1768
2038
|
"function_locations": [
|
|
@@ -1791,7 +2061,7 @@
|
|
|
1791
2061
|
"start": 2417
|
|
1792
2062
|
}
|
|
1793
2063
|
],
|
|
1794
|
-
"path": "/
|
|
2064
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/oracle/nullifiers.nr",
|
|
1795
2065
|
"source": "//! Nullifier creation, existence checks, etc.\n\nuse crate::protocol::address::aztec_address::AztecAddress;\n\n/// Notifies the simulator that a nullifier has been created, so that its correct status (pending or settled) can be\n/// determined when reading nullifiers in subsequent private function calls. The first non-revertible nullifier emitted\n/// is also used to compute note nonces.\npub fn notify_created_nullifier(inner_nullifier: Field) {\n // Safety: This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to\n // call.\n unsafe { notify_created_nullifier_oracle(inner_nullifier) };\n}\n\n#[oracle(aztec_prv_notifyCreatedNullifier)]\nunconstrained fn notify_created_nullifier_oracle(_inner_nullifier: Field) {}\n\n/// Returns `true` if the nullifier has been emitted in the same transaction, i.e. if [`notify_created_nullifier`] has\n/// been\n/// called for this inner nullifier from the contract with the specified address.\n///\n/// Note that despite sharing pending transaction information with the app, this is not a privacy leak: anyone in the\n/// network can always determine in which transaction a inner nullifier was emitted by a given contract by simply\n/// inspecting transaction effects. What _would_ constitute a leak would be to share the list of inner pending\n/// nullifiers, as that would reveal their preimages.\npub unconstrained fn is_nullifier_pending(inner_nullifier: Field, contract_address: AztecAddress) -> bool {\n is_nullifier_pending_oracle(inner_nullifier, contract_address)\n}\n\n#[oracle(aztec_prv_isNullifierPending)]\nunconstrained fn is_nullifier_pending_oracle(_inner_nullifier: Field, _contract_address: AztecAddress) -> bool {}\n\n/// Returns `true` if the nullifier exists. Note that a `true` value can be constrained by proving existence of the\n/// nullifier, but a `false` value should not be relied upon since other transactions may emit this nullifier before\n/// the current transaction is included in a block. While this might seem of little use at first, certain design\n/// patterns benefit from this abstraction (see e.g. `PrivateMutable`).\n// TODO(F-498): review naming consistency\npub unconstrained fn check_nullifier_exists(inner_nullifier: Field) -> bool {\n does_nullifier_exist_oracle(inner_nullifier)\n}\n\n#[oracle(aztec_utl_doesNullifierExist)]\nunconstrained fn does_nullifier_exist_oracle(_inner_nullifier: Field) -> bool {}\n"
|
|
1796
2066
|
},
|
|
1797
2067
|
"207": {
|
|
@@ -1805,7 +2075,7 @@
|
|
|
1805
2075
|
"start": 488
|
|
1806
2076
|
}
|
|
1807
2077
|
],
|
|
1808
|
-
"path": "/
|
|
2078
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/oracle/offchain_effect.nr",
|
|
1809
2079
|
"source": "use crate::protocol::traits::Serialize;\n\n/// Emits data that will be delivered to PXE unaltered. This data can be interpreted freely by a downstream consumer\n/// (such as a wallet).\n///\n/// # Arguments\n///\n/// * `data` - The data to emit.\npub unconstrained fn emit_offchain_effect<T>(data: T)\nwhere\n T: Serialize,\n{\n emit_offchain_effect_oracle(data.serialize());\n}\n\n#[oracle(aztec_utl_emitOffchainEffect)]\nunconstrained fn emit_offchain_effect_oracle<let N: u32>(data: [Field; N]) {}\n"
|
|
1810
2080
|
},
|
|
1811
2081
|
"208": {
|
|
@@ -1823,7 +2093,7 @@
|
|
|
1823
2093
|
"start": 835
|
|
1824
2094
|
}
|
|
1825
2095
|
],
|
|
1826
|
-
"path": "/
|
|
2096
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/oracle/public_call.nr",
|
|
1827
2097
|
"source": "/// Validates public calldata by checking that the preimage exists and the cumulative size is within limits.\n///\n/// The check is unconstrained and the only purpose of it is to fail early in case of calldata overflow or a bug in\n/// calldata hashing.\npub(crate) fn assert_valid_public_call_data(calldata_hash: Field) {\n // Safety: This oracle call returns nothing: we only call it for its side effects (validating the calldata).\n // It is therefore always safe to call.\n unsafe {\n assert_valid_public_call_data_oracle_wrapper(calldata_hash)\n }\n}\n\nunconstrained fn assert_valid_public_call_data_oracle_wrapper(calldata_hash: Field) {\n assert_valid_public_call_data_oracle(calldata_hash)\n}\n\n#[oracle(aztec_prv_assertValidPublicCalldata)]\nunconstrained fn assert_valid_public_call_data_oracle(_calldata_hash: Field) {}\n"
|
|
1828
2098
|
},
|
|
1829
2099
|
"209": {
|
|
@@ -1837,7 +2107,7 @@
|
|
|
1837
2107
|
"start": 568
|
|
1838
2108
|
}
|
|
1839
2109
|
],
|
|
1840
|
-
"path": "/
|
|
2110
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/oracle/random.nr",
|
|
1841
2111
|
"source": "/// Returns an unconstrained random value. Note that it is not possible to constrain this value to prove that it is\n/// truly random: we assume that the oracle is cooperating and returning random values. In some applications this\n/// behavior might not be acceptable and other techniques might be more suitable, such as producing pseudo-random\n/// values by hashing values outside of user control (like block hashes) or secrets.\npub unconstrained fn random() -> Field {\n rand_oracle()\n}\n\n#[oracle(aztec_misc_getRandomField)]\nunconstrained fn rand_oracle() -> Field {}\n"
|
|
1842
2112
|
},
|
|
1843
2113
|
"212": {
|
|
@@ -1883,7 +2153,7 @@
|
|
|
1883
2153
|
"start": 7189
|
|
1884
2154
|
}
|
|
1885
2155
|
],
|
|
1886
|
-
"path": "/
|
|
2156
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/oracle/shared_secret.nr",
|
|
1887
2157
|
"source": "use crate::ephemeral::EphemeralArray;\nuse crate::protocol::{address::AztecAddress, hash::sha256_to_field, point::EmbeddedCurvePoint};\n\nglobal GET_SHARED_SECRET_SINGLE_SLOT: Field = sha256_to_field(\"AZTEC_NR::GET_SHARED_SECRET_SINGLE_SLOT\".as_bytes());\n\n#[oracle(aztec_utl_getSharedSecrets)]\nunconstrained fn get_shared_secrets_oracle(\n address: AztecAddress,\n eph_pks: EphemeralArray<EmbeddedCurvePoint>,\n contract_address: AztecAddress,\n) -> EphemeralArray<Field> {}\n\n/// Convenience wrapper around [`get_shared_secrets`] for a single ephemeral public key.\n///\n/// Returns `none` when the PXE does not hold `address`'s keys and therefore cannot derive the secret.\npub unconstrained fn get_shared_secret(\n address: AztecAddress,\n eph_pk: EmbeddedCurvePoint,\n contract_address: AztecAddress,\n) -> Option<Field> {\n let eph_pks: EphemeralArray<EmbeddedCurvePoint> = EphemeralArray::empty_at(GET_SHARED_SECRET_SINGLE_SLOT);\n eph_pks.push(eph_pk);\n let secrets = get_shared_secrets(address, eph_pks, contract_address);\n if secrets.len() == 1 {\n Option::some(secrets.get(0))\n } else {\n Option::none()\n }\n}\n\n/// Returns app-siloed shared secrets between `address` and someone who knows the secret keys behind the given\n/// ephemeral public keys.\n///\n/// Each returned Field `s_app` is computed as:\n///\n/// ```text\n/// S = address_secret * ephPk (raw ECDH point)\n/// s_app = h(DOM_SEP, S.x, S.y, contract) (app-siloed scalar)\n/// ```\n///\n/// where `contract` is the address of the calling contract. The oracle host validates this matches its execution\n/// context.\n///\n/// Without app-siloing, a malicious contract could call this oracle with public information (address, ephPk) and\n/// obtain the same raw secret as the legitimate contract, enabling cross-contract decryption. By including the\n/// contract address in the hash, each contract receives a different `s_app`, preventing this attack.\n///\n/// Callers derive indexed subkeys from `s_app` via\n/// [`derive_shared_secret_subkey`](crate::keys::ecdh_shared_secret::derive_shared_secret_subkey).\n///\n/// Returns an empty array when the PXE does not hold `address`'s keys and therefore cannot derive any secrets. This\n/// happens when syncing the scope of an address the PXE does not control, and is an expected outcome rather than an\n/// error. Any other response length mismatch is a malformed oracle response.\npub unconstrained fn get_shared_secrets(\n address: AztecAddress,\n eph_pks: EphemeralArray<EmbeddedCurvePoint>,\n contract_address: AztecAddress,\n) -> EphemeralArray<Field> {\n let response = get_shared_secrets_oracle(address, eph_pks, contract_address);\n assert(\n (response.len() == eph_pks.len()) | (response.len() == 0),\n \"get_shared_secrets: response length does not match request length\",\n );\n response\n}\n\nmod test {\n use crate::ephemeral::EphemeralArray;\n use crate::oracle::shared_secret::{get_shared_secret, get_shared_secrets};\n use crate::protocol::{address::AztecAddress, traits::FromField};\n use crate::test::helpers::test_environment::TestEnvironment;\n use crate::utils::point::point_from_x_coord;\n use std::test::OracleMock;\n\n #[test]\n unconstrained fn preserves_ephemeral_key_ordering() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let _ = mock_get_shared_secrets([100, 200, 300]);\n\n let pk_a = point_from_x_coord(1).unwrap();\n let pk_b = point_from_x_coord(2).unwrap();\n let pk_c = point_from_x_coord(8).unwrap();\n\n let eph_pks: EphemeralArray<_> = EphemeralArray::empty_at(200);\n eph_pks.push(pk_a);\n eph_pks.push(pk_b);\n eph_pks.push(pk_c);\n\n let _: EphemeralArray<Field> = get_shared_secrets(\n AztecAddress::from_field(1),\n eph_pks,\n AztecAddress::from_field(2),\n );\n\n assert_eq(eph_pks.get(0), pk_a);\n assert_eq(eph_pks.get(1), pk_b);\n assert_eq(eph_pks.get(2), pk_c);\n });\n }\n\n #[test]\n unconstrained fn returns_secrets_in_order() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let _ = mock_get_shared_secrets([111, 222, 333]);\n\n let pk = point_from_x_coord(1).unwrap();\n let eph_pks: EphemeralArray<_> = EphemeralArray::empty_at(200);\n eph_pks.push(pk);\n eph_pks.push(pk);\n eph_pks.push(pk);\n\n let results: EphemeralArray<Field> = get_shared_secrets(\n AztecAddress::from_field(1),\n eph_pks,\n AztecAddress::from_field(2),\n );\n\n assert_eq(results.get(0), 111);\n assert_eq(results.get(1), 222);\n assert_eq(results.get(2), 333);\n });\n }\n\n #[test]\n unconstrained fn returns_empty_when_pxe_does_not_hold_keys() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let empty: [Field; 0] = [];\n let _ = mock_get_shared_secrets(empty);\n\n let pk = point_from_x_coord(1).unwrap();\n let eph_pks: EphemeralArray<_> = EphemeralArray::empty_at(200);\n eph_pks.push(pk);\n\n let results: EphemeralArray<Field> = get_shared_secrets(\n AztecAddress::from_field(1),\n eph_pks,\n AztecAddress::from_field(2),\n );\n\n assert_eq(results.len(), 0);\n });\n }\n\n #[test]\n unconstrained fn single_secret_returns_the_secret() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let _ = mock_get_shared_secrets([111]);\n\n let pk = point_from_x_coord(1).unwrap();\n let secret = get_shared_secret(AztecAddress::from_field(1), pk, AztecAddress::from_field(2));\n\n assert_eq(secret.unwrap(), 111);\n });\n }\n\n #[test]\n unconstrained fn single_secret_returns_none_when_pxe_does_not_hold_keys() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let empty: [Field; 0] = [];\n let _ = mock_get_shared_secrets(empty);\n\n let pk = point_from_x_coord(1).unwrap();\n let secret = get_shared_secret(AztecAddress::from_field(1), pk, AztecAddress::from_field(2));\n\n assert(secret.is_none());\n });\n }\n\n #[test(should_fail_with = \"response length does not match request length\")]\n unconstrained fn cannot_return_mismatched_length() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let _ = mock_get_shared_secrets([111, 222]);\n\n let pk = point_from_x_coord(1).unwrap();\n let eph_pks: EphemeralArray<_> = EphemeralArray::empty_at(200);\n eph_pks.push(pk);\n\n let _: EphemeralArray<Field> = get_shared_secrets(\n AztecAddress::from_field(1),\n eph_pks,\n AztecAddress::from_field(2),\n );\n });\n }\n\n unconstrained fn mock_get_shared_secrets<let N: u32>(response_values: [Field; N]) -> Field {\n let response_slot: Field = 99;\n let response_array: EphemeralArray<Field> = EphemeralArray::at(response_slot);\n for value in response_values {\n response_array.push(value);\n }\n let _ = OracleMock::mock(\"aztec_utl_getSharedSecrets\").returns(response_slot);\n response_slot\n }\n}\n"
|
|
1888
2158
|
},
|
|
1889
2159
|
"213": {
|
|
@@ -1901,7 +2171,7 @@
|
|
|
1901
2171
|
"start": 807
|
|
1902
2172
|
}
|
|
1903
2173
|
],
|
|
1904
|
-
"path": "/
|
|
2174
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/oracle/storage.nr",
|
|
1905
2175
|
"source": "use crate::protocol::{abis::block_header::BlockHeader, address::AztecAddress, traits::{Hash, Packable, ToField}};\n\n#[oracle(aztec_utl_getFromPublicStorage)]\nunconstrained fn get_from_public_storage_oracle<let N: u32>(\n block_hash: Field,\n address: Field,\n storage_slot: Field,\n length: u32,\n) -> [Field; N] {}\n\n// TODO(F-498): review naming consistency\npub unconstrained fn raw_storage_read<let N: u32>(\n block_hash_to_read_from: Field,\n address: AztecAddress,\n storage_slot: Field,\n) -> [Field; N] {\n get_from_public_storage_oracle(block_hash_to_read_from, address.to_field(), storage_slot, N)\n}\n\n// TODO(F-498): review naming consistency\npub unconstrained fn storage_read<T>(header_to_read_from: BlockHeader, address: AztecAddress, storage_slot: Field) -> T\nwhere\n T: Packable,\n{\n let block_hash_to_read_from = header_to_read_from.hash();\n T::unpack(\n raw_storage_read(block_hash_to_read_from, address, storage_slot),\n )\n}\n"
|
|
1906
2176
|
},
|
|
1907
2177
|
"215": {
|
|
@@ -1927,7 +2197,7 @@
|
|
|
1927
2197
|
"start": 1143
|
|
1928
2198
|
}
|
|
1929
2199
|
],
|
|
1930
|
-
"path": "/
|
|
2200
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/oracle/tx_phase.nr",
|
|
1931
2201
|
"source": "/// Notifies PXE of the side effect counter at which the revertible phase begins.\n///\n/// PXE uses it to classify notes and nullifiers as revertible or non-revertible in its note cache. This information is\n/// then fed to kernels as hints.\npub(crate) fn notify_revertible_phase_start(counter: u32) {\n // Safety: This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to\n // call.\n unsafe { notify_revertible_phase_start_oracle_wrapper(counter) };\n}\n\n/// Returns whether a side effect counter falls in the revertible phase of the transaction.\npub(crate) unconstrained fn is_execution_in_revertible_phase(current_counter: u32) -> bool {\n is_execution_in_revertible_phase_oracle(current_counter)\n}\n\nunconstrained fn notify_revertible_phase_start_oracle_wrapper(counter: u32) {\n notify_revertible_phase_start_oracle(counter);\n}\n\n#[oracle(aztec_prv_notifyRevertiblePhaseStart)]\nunconstrained fn notify_revertible_phase_start_oracle(_counter: u32) {}\n\n#[oracle(aztec_prv_isExecutionInRevertiblePhase)]\nunconstrained fn is_execution_in_revertible_phase_oracle(current_counter: u32) -> bool {}\n"
|
|
1932
2202
|
},
|
|
1933
2203
|
"216": {
|
|
@@ -1945,7 +2215,7 @@
|
|
|
1945
2215
|
"start": 991
|
|
1946
2216
|
}
|
|
1947
2217
|
],
|
|
1948
|
-
"path": "/
|
|
2218
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/oracle/tx_resolution.nr",
|
|
1949
2219
|
"source": "use crate::ephemeral::EphemeralArray;\nuse crate::protocol::{constants::MAX_NOTE_HASHES_PER_TX, traits::{Deserialize, Serialize}};\n\n/// The resolved on-chain context of a transaction.\n#[derive(Serialize, Deserialize, Eq)]\npub struct ResolvedTx {\n pub tx_hash: Field,\n pub unique_note_hashes_in_tx: BoundedVec<Field, MAX_NOTE_HASHES_PER_TX>,\n pub first_nullifier_in_tx: Field,\n pub block_number: u32,\n pub block_hash: Field,\n}\n\n/// Resolves the on-chain context of each tx hash.\npub(crate) unconstrained fn get_resolved_txs(requests: EphemeralArray<Field>) -> EphemeralArray<Option<ResolvedTx>> {\n get_resolved_txs_oracle(requests)\n}\n\n#[oracle(aztec_utl_getResolvedTxs)]\nunconstrained fn get_resolved_txs_oracle(requests: EphemeralArray<Field>) -> EphemeralArray<Option<ResolvedTx>> {}\n\nmod test {\n use crate::oracle::tx_resolution::ResolvedTx;\n use crate::protocol::traits::Deserialize;\n\n #[test]\n unconstrained fn resolved_tx_serialization_matches_typescript() {\n // Setup test data\n let tx_hash = 123;\n let unique_note_hashes = BoundedVec::from_array([4, 5]);\n let first_nullifier = 6;\n let block_number: u32 = 7;\n let block_hash = 8;\n\n // Create a ResolvedTx instance\n let resolved_tx = ResolvedTx {\n tx_hash,\n unique_note_hashes_in_tx: unique_note_hashes,\n first_nullifier_in_tx: first_nullifier,\n block_number,\n block_hash,\n };\n\n // Expected output generated from TypeScript's `ResolvedTx.toFields()`\n let serialized_resolved_tx_from_typescript = [\n 0x000000000000000000000000000000000000000000000000000000000000007b,\n 0x0000000000000000000000000000000000000000000000000000000000000004,\n 0x0000000000000000000000000000000000000000000000000000000000000005,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000000,\n 0x0000000000000000000000000000000000000000000000000000000000000002,\n 0x0000000000000000000000000000000000000000000000000000000000000006,\n 0x0000000000000000000000000000000000000000000000000000000000000007,\n 0x0000000000000000000000000000000000000000000000000000000000000008,\n ];\n\n let deserialized = ResolvedTx::deserialize(serialized_resolved_tx_from_typescript);\n\n assert_eq(deserialized, resolved_tx);\n }\n}\n"
|
|
1950
2220
|
},
|
|
1951
2221
|
"217": {
|
|
@@ -1971,8 +2241,8 @@
|
|
|
1971
2241
|
"start": 2136
|
|
1972
2242
|
}
|
|
1973
2243
|
],
|
|
1974
|
-
"path": "/
|
|
1975
|
-
"source": "/// The oracle version constants are used to check that the oracle interface is in sync between PXE and Aztec.nr.\n/// We version the oracle interface as `major.minor` where:\n/// - `major` = backward-breaking changes (must match exactly between PXE and Aztec.nr)\n/// - `minor` = oracle additions (non-breaking; PXE minor >= contract minor)\n///\n/// The TypeScript counterparts are in `oracle_version.ts`.\n///\n/// @dev Whenever a contract function or Noir test is run, the `aztec_misc_assertCompatibleOracleVersion` oracle is\n/// called. If the major version is incompatible, an error is thrown immediately. The minor version is recorded by\n/// the PXE and used to provide helpful error messages if a contract calls an oracle that doesn't exist. We don't throw\n/// immediately if AZTEC_NR_MINOR > PXE_MINOR because if a contract is updated to use a newer Aztec.nr dependency\n/// without actually using any of the new oracles then there is no reason to throw.\npub global ORACLE_VERSION_MAJOR: Field = 30;\npub global ORACLE_VERSION_MINOR: Field =
|
|
2244
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/oracle/version.nr",
|
|
2245
|
+
"source": "/// The oracle version constants are used to check that the oracle interface is in sync between PXE and Aztec.nr.\n/// We version the oracle interface as `major.minor` where:\n/// - `major` = backward-breaking changes (must match exactly between PXE and Aztec.nr)\n/// - `minor` = oracle additions (non-breaking; PXE minor >= contract minor)\n///\n/// The TypeScript counterparts are in `oracle_version.ts`.\n///\n/// @dev Whenever a contract function or Noir test is run, the `aztec_misc_assertCompatibleOracleVersion` oracle is\n/// called. If the major version is incompatible, an error is thrown immediately. The minor version is recorded by\n/// the PXE and used to provide helpful error messages if a contract calls an oracle that doesn't exist. We don't throw\n/// immediately if AZTEC_NR_MINOR > PXE_MINOR because if a contract is updated to use a newer Aztec.nr dependency\n/// without actually using any of the new oracles then there is no reason to throw.\npub global ORACLE_VERSION_MAJOR: Field = 30;\npub global ORACLE_VERSION_MINOR: Field = 8;\n\n/// Asserts that the version of the oracle is compatible with the version expected by the contract.\npub fn assert_compatible_oracle_version() {\n // Safety: This oracle call returns nothing: we only call it to check Aztec.nr and Oracle interface versions are\n // compatible. It is therefore always safe to call.\n unsafe {\n assert_compatible_oracle_version_wrapper();\n }\n}\n\nunconstrained fn assert_compatible_oracle_version_wrapper() {\n assert_compatible_oracle_version_oracle(ORACLE_VERSION_MAJOR, ORACLE_VERSION_MINOR);\n}\n\n#[oracle(aztec_misc_assertCompatibleOracleVersion)]\nunconstrained fn assert_compatible_oracle_version_oracle(major: Field, minor: Field) {}\n\nmod test {\n use super::{assert_compatible_oracle_version_oracle, ORACLE_VERSION_MAJOR, ORACLE_VERSION_MINOR};\n\n #[test]\n unconstrained fn compatible_oracle_version() {\n assert_compatible_oracle_version_oracle(ORACLE_VERSION_MAJOR, ORACLE_VERSION_MINOR);\n }\n\n #[test(should_fail_with = \"Incompatible aztec cli version:\")]\n unconstrained fn incompatible_oracle_version_major() {\n let arbitrary_incorrect_major = 318183437;\n assert_compatible_oracle_version_oracle(arbitrary_incorrect_major, ORACLE_VERSION_MINOR);\n }\n}\n"
|
|
1976
2246
|
},
|
|
1977
2247
|
"218": {
|
|
1978
2248
|
"function_locations": [
|
|
@@ -2085,7 +2355,7 @@
|
|
|
2085
2355
|
"start": 22505
|
|
2086
2356
|
}
|
|
2087
2357
|
],
|
|
2088
|
-
"path": "/
|
|
2358
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/partial_notes/fsm.nr",
|
|
2089
2359
|
"source": "//! The finite state machine to process a single partial note.\n//!\n//! A partial note arrives in two parts: a private part (delivered first, carrying the owner, randomness, completion-log\n//! tag, note type, and packed private content) and a public *completion log* (storage slot + packed public content).\n//! The note can only be discovered and stored once both are combined. The state chart below summarizes how a single\n//! partial note's process unfolds, including how reorgs cause it to rewind.\n//!\n//! ```text\n//! init() (partial note delivery message, including tx and block data)\n//! |\n//! v\n//! +-----------+ completion log found +-----------+\n//! ---- | | ------------------------------> | |\n//! log not found | | | | | discover note(s),\n//! |--> | PENDING | | COMPLETED | ~~> enqueue for storage, etc\n//! | | <------------------------------ | |\n//! | | completion log block re-orged | |\n//! +-----------+ +-----------+\n//! | |\n//! | delivery message block re-orged | completion log block finalized\n//! v v\n//! +---------------------------------------------------------+\n//! | TERMINATED (process ends) |\n//! +---------------------------------------------------------+\n//! ```\n//!\n//! ## States\n//!\n//! - **Pending**: the private part has been received but the completion log has not been found yet. While in this\n//! state, message discovery keeps searching for that log on each sync.\n//! - **Completed**: the completion log was found, so the note was completed and enqueued for storage. Because the\n//! block containing the completion log can be dropped by a reorg, this state is not terminal until the block\n//! finalizes: a reorg dropping it rewinds the FSM back to `Pending` state.\n//! - **Terminated**: nothing else can be done with the partial note, either because its delivery block was re-orged\n//! away (so the delivery itself was reverted) or because its completion block has finalized (so the discovered note\n//! is permanent and reorg-proof). This is the terminal state of this FSM.\n//!\n//! ## Transitions (each evaluated by [`step`](PartialNoteFsm::step))\n//!\n//! - **Pending -> Completed** ([`complete_with_log`](PartialNoteFsm::complete_with_log)): the completion log is\n//! found. Its public content is combined with the delivered private content, the resulting note(s) are discovered\n//! and enqueued for storage.\n//! - **Completed -> Pending**: the completion log block is re-orged out. The completion log is searched for again.\n//! - **Pending -> Terminated**: the delivery block is re-orged out, retracting the `delivered` birth fact. The\n//! delivery was reverted, so there is nothing left to do.\n//! - **Completed -> Terminated**: the completion log block finalizes, making the discovered note reorg-proof, so the\n//! reception is complete and its collection is deleted.\n//!\n//! ## Implementation\n//!\n//! Each pending partial note is tracked as a [fact collection](crate::facts::FactCollection) of type\n//! `PARTIAL_NOTE_RECEPTION_TYPE_ID`, identified by a hash of its [`DeliveredPendingPartialNote`] content (so\n//! re-delivery of the same partial note is idempotent). The collection holds:\n//!\n//! - a retractable `PARTIAL_NOTE_DELIVERED` birth fact tied to a delivery block (so a reorg of that block auto-prunes\n//! the pending note), whose payload is the serialized [`DeliveredPendingPartialNote`];\n//! - once the completion log is found, a retractable `PARTIAL_NOTE_COMPLETED` fact tied to the completion log block.\n//!\n//! Status folds from the canonical fact set:\n//! - `delivered` only ⇒ Pending\n//! - `delivered` + `completed` ⇒ Completed\n//!\n//! A reorg retracting either fact folds the reception back accordingly.\nuse crate::ephemeral::EphemeralArray;\nuse crate::facts::{\n delete_fact_collection, Fact, FactCollection, get_fact_collections_by_type, OriginBlock, record_retractable_fact,\n RetractableFactOrigin,\n};\nuse crate::logging::aztecnr_debug_log_format;\nuse crate::messages::{\n discovery::{ComputeNoteHash, ComputeNoteNullifier, nonce_discovery::attempt_note_nonce_discovery},\n processing::{enqueue_note_for_validation, log_retrieval_response::{LogRetrievalResponse, MAX_LOG_CONTENT_LEN}},\n};\nuse crate::protocol::{address::AztecAddress, hash::{poseidon2_hash, sha256_to_field}, traits::{Deserialize, Serialize}};\nuse crate::utils::array;\nuse super::DeliveredPendingPartialNote;\n\n/// Fact-collection type id shared by every partial-note reception in the [fact store](crate::facts).\nglobal PARTIAL_NOTE_RECEPTION_TYPE_ID: Field = sha256_to_field(\"AZTEC_NR::PARTIAL_NOTE_RECEPTION_TYPE_ID\".as_bytes());\n\n/// Fact type id of the birth fact carrying the delivered private partial note.\nglobal PARTIAL_NOTE_DELIVERED: Field = sha256_to_field(\"AZTEC_NR::PARTIAL_NOTE_DELIVERED\".as_bytes());\n\n/// Fact type id marking a partial note as completed (its note has been discovered and enqueued).\nglobal PARTIAL_NOTE_COMPLETED: Field = sha256_to_field(\"AZTEC_NR::PARTIAL_NOTE_COMPLETED\".as_bytes());\n\n/// A single partial note's finite state machine, backed by a [`FactCollection`](crate::facts::FactCollection).\n#[derive(Deserialize, Serialize)]\npub(crate) struct PartialNoteFsm {\n collection: FactCollection,\n}\n\nimpl PartialNoteFsm {\n /// Initializes an FSM for a freshly discovered partial note.\n ///\n /// The FSM existence is tied to `origin_block`: if `origin_block` is dropped by a reorg, the FSM is transparently\n /// deleted.\n pub(crate) unconstrained fn init(\n contract_address: AztecAddress,\n scope: AztecAddress,\n pending: DeliveredPendingPartialNote,\n origin_block: OriginBlock,\n ) {\n record_retractable_fact(\n contract_address,\n scope,\n PARTIAL_NOTE_RECEPTION_TYPE_ID,\n Self::id_for(pending),\n PARTIAL_NOTE_DELIVERED,\n to_payload(pending),\n origin_block,\n );\n }\n\n /// Loads every active partial-note FSM for the given contract and scope.\n pub(crate) unconstrained fn load_all(\n contract_address: AztecAddress,\n scope: AztecAddress,\n ) -> EphemeralArray<PartialNoteFsm> {\n get_fact_collections_by_type(contract_address, scope, PARTIAL_NOTE_RECEPTION_TYPE_ID)\n .map(|collection: FactCollection| PartialNoteFsm { collection })\n }\n\n /// The fact-collection id identifying a specific partial note.\n fn id_for(pending: DeliveredPendingPartialNote) -> Field {\n poseidon2_hash(pending.serialize())\n }\n\n /// Reads and decodes the delivered partial note this FSM processes.\n pub(crate) unconstrained fn read_pending_partial_note(self) -> DeliveredPendingPartialNote {\n let delivered = self.collection.facts.find(|f: Fact| f.fact_type_id == PARTIAL_NOTE_DELIVERED).unwrap();\n let mut fields = [0; <DeliveredPendingPartialNote as Deserialize>::N];\n for i in 0..fields.len() {\n fields[i] = delivered.payload.get(i);\n }\n Deserialize::deserialize(fields)\n }\n\n /// Whether the partial note FSM is in `completed` state, i.e. its note was completed and stored.\n unconstrained fn is_completed(self) -> bool {\n self.collection.facts.any(|f: Fact| f.fact_type_id == PARTIAL_NOTE_COMPLETED)\n }\n\n /// Whether the partial note FSM is in `pending` state, i.e. it hasn't been completed yet.\n pub(crate) unconstrained fn is_pending(self) -> bool {\n !self.is_completed()\n }\n\n /// Origin block of the partial note completion log, if available.\n unconstrained fn completion_log_origin(self) -> Option<RetractableFactOrigin> {\n let maybe_completed = self.collection.facts.find(|f: Fact| f.fact_type_id == PARTIAL_NOTE_COMPLETED);\n if maybe_completed.is_some() {\n maybe_completed.unwrap().origin_block\n } else {\n Option::none()\n }\n }\n\n /// Transition the partial note FSM as `completed`, conditional to `origin_block`.\n unconstrained fn mark_completed(self, origin_block: OriginBlock) {\n let empty_payload: EphemeralArray<Field> = EphemeralArray::empty();\n record_retractable_fact(\n self.collection.contract_address,\n self.collection.scope,\n self.collection.fact_collection_type_id,\n self.collection.fact_collection_id,\n PARTIAL_NOTE_COMPLETED,\n empty_payload,\n origin_block,\n );\n }\n\n /// Terminates this partial note FSM.\n unconstrained fn terminate(self) {\n delete_fact_collection(\n self.collection.contract_address,\n self.collection.scope,\n self.collection.fact_collection_type_id,\n self.collection.fact_collection_id,\n );\n }\n\n /// Advances this partial-note FSM by one step.\n ///\n /// Partial notes can only be completed if completion logs have been found for them. Log discovery and\n /// provisioning is responsibility of the caller.\n ///\n /// `compute_note_hash` and `compute_note_nullifier` are injected dependencies.\n pub(crate) unconstrained fn step(\n self,\n maybe_completion_logs: Option<EphemeralArray<LogRetrievalResponse>>,\n compute_note_hash: ComputeNoteHash,\n compute_note_nullifier: ComputeNoteNullifier,\n ) {\n if self.is_pending() {\n self.step_pending(maybe_completion_logs, compute_note_hash, compute_note_nullifier);\n } else {\n self.step_completed();\n }\n }\n\n /// Processes a partial note in pending state\n ///\n /// Completes the partial note if its completion log is given. If not, the partial note remains in pending state\n /// and its completion log is searched for again on future syncs.\n unconstrained fn step_pending(\n self,\n maybe_completion_logs: Option<EphemeralArray<LogRetrievalResponse>>,\n compute_note_hash: ComputeNoteHash,\n compute_note_nullifier: ComputeNoteNullifier,\n ) {\n if maybe_completion_logs.is_some() {\n let completion_logs = maybe_completion_logs.unwrap();\n let num_logs = completion_logs.len();\n if num_logs != 0 {\n assert(num_logs == 1, f\"Expected at most 1 completion log per partial note, got {num_logs}\");\n self.complete_with_log(completion_logs.get(0), compute_note_hash, compute_note_nullifier);\n }\n }\n }\n\n /// Advances partial note in `completed` state: terminates it once the completion log block finalizes, since the\n /// discovered note is then permanent and there is nothing left to track.\n unconstrained fn step_completed(self) {\n if self.completion_log_origin().unwrap().block_state.is_finalized() {\n self.terminate();\n }\n }\n\n /// Completes a partial note.\n ///\n /// Combines the delivered private content with the log's public content, discovers the resulting note(s), enqueues\n /// them for validation, and transitions the FSM to `completed` state conditional to the completion log's block.\n ///\n /// Because the completion fact is retractable, a reorg of the completion log's block rewinds the FSM back to\n /// `pending` state (which signals that completion log search should restart).\n unconstrained fn complete_with_log(\n self,\n log: LogRetrievalResponse,\n compute_note_hash: ComputeNoteHash,\n compute_note_nullifier: ComputeNoteNullifier,\n ) {\n let pending = self.read_pending_partial_note();\n\n // The first field in the completion log payload is the storage slot, followed by the public note content.\n let storage_slot = log.log_payload.get(0);\n let public_note_content: BoundedVec<Field, MAX_LOG_CONTENT_LEN - 1> = array::subbvec(log.log_payload, 1);\n\n // Public fields are placed at the end of the packed representation, so we combine the private and public\n // packed content to get the complete packed note.\n let complete_packed_note = array::append(pending.packed_private_note_content, public_note_content);\n\n let discovered_notes = attempt_note_nonce_discovery(\n log.unique_note_hashes_in_tx,\n log.first_nullifier_in_tx,\n compute_note_hash,\n compute_note_nullifier,\n self.collection.contract_address,\n pending.owner,\n storage_slot,\n pending.randomness,\n pending.note_type_id,\n complete_packed_note,\n );\n\n // TODO(#11627): is there anything reasonable we can do if we get a log but it doesn't result in a note being\n // found?\n if discovered_notes.len() == 0 {\n panic(\n f\"A partial note's completion log did not result in any notes being found - this should never happen\",\n );\n }\n\n aztecnr_debug_log_format!(\"Discovered {0} notes for partial note with tag {1}\")([\n discovered_notes.len() as Field,\n pending.note_completion_log_tag,\n ]);\n\n discovered_notes.for_each(|discovered_note| {\n enqueue_note_for_validation(\n self.collection.contract_address,\n pending.owner,\n storage_slot,\n pending.randomness,\n discovered_note.note_nonce,\n complete_packed_note,\n discovered_note.note_hash,\n discovered_note.inner_nullifier,\n log.tx_hash,\n );\n });\n\n self.mark_completed(OriginBlock { block_number: log.block_number, block_hash: log.block_hash });\n }\n}\n\n/// Serializes a [`DeliveredPendingPartialNote`] into a fact payload.\nunconstrained fn to_payload(pending: DeliveredPendingPartialNote) -> EphemeralArray<Field> {\n let fields = pending.serialize();\n let payload: EphemeralArray<Field> = EphemeralArray::empty();\n for i in 0..fields.len() {\n payload.push(fields[i]);\n }\n payload\n}\n\nmod test {\n use crate::ephemeral::EphemeralArray;\n use crate::facts::OriginBlock;\n use crate::messages::logs::note::MAX_NOTE_PACKED_LEN;\n use crate::messages::processing::log_retrieval_response::LogRetrievalResponse;\n use crate::partial_notes::DeliveredPendingPartialNote;\n use crate::protocol::address::AztecAddress;\n use crate::test::helpers::test_environment::TestEnvironment;\n use super::PartialNoteFsm;\n\n unconstrained fn setup() -> (TestEnvironment, AztecAddress) {\n let mut env = TestEnvironment::new();\n let scope = env.create_light_account();\n (env, scope)\n }\n\n /// A delivered partial note with simple dummy content.\n unconstrained fn make_pending(owner: AztecAddress) -> DeliveredPendingPartialNote {\n DeliveredPendingPartialNote {\n owner,\n randomness: 0x11,\n note_completion_log_tag: 0x22,\n note_type_id: 0x33,\n packed_private_note_content: BoundedVec::new(),\n }\n }\n\n /// A low block, which TXE (proven == finalized == latest) reports as finalized.\n fn finalized_block() -> OriginBlock {\n OriginBlock { block_number: 1, block_hash: 0 }\n }\n\n #[test]\n unconstrained fn init_creates_a_partial_note_fsm_in_pending_state() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let address = context.this_address();\n PartialNoteFsm::init(address, scope, make_pending(scope), finalized_block());\n\n let all = PartialNoteFsm::load_all(address, scope);\n assert_eq(all.len(), 1);\n assert(all.get(0).is_pending(), \"freshly delivered reception should be pending\");\n assert(all.get(0).completion_log_origin().is_none());\n });\n }\n\n #[test]\n unconstrained fn read_pending_round_trips_the_delivered_content() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let address = context.this_address();\n PartialNoteFsm::init(address, scope, make_pending(scope), finalized_block());\n\n let pending = PartialNoteFsm::load_all(address, scope).get(0).read_pending_partial_note();\n assert_eq(pending.owner, scope);\n assert_eq(pending.randomness, 0x11);\n assert_eq(pending.note_completion_log_tag, 0x22);\n assert_eq(pending.note_type_id, 0x33);\n });\n }\n\n #[test]\n unconstrained fn mark_completed_moves_to_completed() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let address = context.this_address();\n PartialNoteFsm::init(address, scope, make_pending(scope), finalized_block());\n\n PartialNoteFsm::load_all(address, scope).get(0).mark_completed(finalized_block());\n\n let reloaded = PartialNoteFsm::load_all(address, scope).get(0);\n assert(reloaded.is_completed(), \"should be completed after mark_completed\");\n assert(reloaded.completion_log_origin().unwrap().block_state.is_finalized());\n });\n }\n\n #[test]\n unconstrained fn terminate_deletes_the_collection() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let address = context.this_address();\n PartialNoteFsm::init(address, scope, make_pending(scope), finalized_block());\n\n PartialNoteFsm::load_all(address, scope).get(0).terminate();\n assert_eq(PartialNoteFsm::load_all(address, scope).len(), 0);\n });\n }\n\n #[test]\n unconstrained fn re_init_is_idempotent() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let address = context.this_address();\n PartialNoteFsm::init(address, scope, make_pending(scope), finalized_block());\n PartialNoteFsm::init(address, scope, make_pending(scope), finalized_block());\n\n assert_eq(PartialNoteFsm::load_all(address, scope).len(), 1);\n });\n }\n\n #[test]\n unconstrained fn step_leaves_a_pending_reception_untouched_when_it_has_no_completion_log() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let address = context.this_address();\n PartialNoteFsm::init(address, scope, make_pending(scope), finalized_block());\n\n // Neither an empty fetched-logs set (`Some(empty)`, the pass-1 \"searched, found nothing\" case) nor no\n // fetch at all (`None`, the pass-2 case) can complete a pending reception, so it stays pending.\n let no_logs: EphemeralArray<LogRetrievalResponse> = EphemeralArray::empty();\n PartialNoteFsm::load_all(address, scope).get(0).step(\n Option::some(no_logs),\n dummy_compute_note_hash,\n dummy_compute_note_nullifier,\n );\n PartialNoteFsm::load_all(address, scope).get(0).step(\n Option::none(),\n dummy_compute_note_hash,\n dummy_compute_note_nullifier,\n );\n\n let all = PartialNoteFsm::load_all(address, scope);\n assert_eq(all.len(), 1);\n assert(all.get(0).is_pending(), \"reception without a completion log should stay pending\");\n });\n }\n\n #[test]\n unconstrained fn step_terminates_a_completed_reception_once_its_block_is_finalized() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let address = context.this_address();\n PartialNoteFsm::init(address, scope, make_pending(scope), finalized_block());\n PartialNoteFsm::load_all(address, scope).get(0).mark_completed(finalized_block());\n\n // Completed with a finalized completion block: the discovered note is reorg-proof, so step terminates the\n // FSM by deleting its collection.\n PartialNoteFsm::load_all(address, scope).get(0).step(\n Option::none(),\n dummy_compute_note_hash,\n dummy_compute_note_nullifier,\n );\n\n assert_eq(PartialNoteFsm::load_all(address, scope).len(), 0);\n });\n }\n\n #[test]\n unconstrained fn step_keeps_a_completed_reception_while_its_block_is_unfinalized() {\n let (env, scope) = setup();\n // A future block never finalizes here, so the completed reception must survive the step.\n let unfinalized_block = OriginBlock { block_number: env.last_block_number() + 100, block_hash: 0 };\n env.private_context(|context| {\n let address = context.this_address();\n PartialNoteFsm::init(address, scope, make_pending(scope), finalized_block());\n PartialNoteFsm::load_all(address, scope).get(0).mark_completed(unfinalized_block);\n\n // Completed but not yet finalized: step must not terminate it, since a reorg could still fold it back.\n PartialNoteFsm::load_all(address, scope).get(0).step(\n Option::none(),\n dummy_compute_note_hash,\n dummy_compute_note_nullifier,\n );\n\n let all = PartialNoteFsm::load_all(address, scope);\n assert_eq(all.len(), 1);\n assert(all.get(0).is_completed(), \"unfinalized completed reception should survive step\");\n });\n }\n\n unconstrained fn dummy_compute_note_hash(\n _packed_note: BoundedVec<Field, MAX_NOTE_PACKED_LEN>,\n _owner: AztecAddress,\n _storage_slot: Field,\n _note_type_id: Field,\n _contract_address: AztecAddress,\n _randomness: Field,\n ) -> Option<Field> {\n Option::none()\n }\n\n unconstrained fn dummy_compute_note_nullifier(\n _unique_note_hash: Field,\n _packed_note: BoundedVec<Field, MAX_NOTE_PACKED_LEN>,\n _owner: AztecAddress,\n _storage_slot: Field,\n _note_type_id: Field,\n _contract_address: AztecAddress,\n _randomness: Field,\n ) -> Option<Field> {\n Option::none()\n }\n}\n"
|
|
2090
2360
|
},
|
|
2091
2361
|
"219": {
|
|
@@ -2099,7 +2369,7 @@
|
|
|
2099
2369
|
"start": 2404
|
|
2100
2370
|
}
|
|
2101
2371
|
],
|
|
2102
|
-
"path": "/
|
|
2372
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/partial_notes/mod.nr",
|
|
2103
2373
|
"source": "mod fsm;\n\nuse crate::{\n facts::OriginBlock,\n messages::{\n discovery::{ComputeNoteHash, ComputeNoteNullifier},\n encoding::MAX_MESSAGE_CONTENT_LEN,\n logs::partial_note::{decode_partial_note_private_message, MAX_PARTIAL_NOTE_PRIVATE_PACKED_LEN},\n processing::{get_pending_partial_notes_completion_logs, ResolvedTx},\n },\n};\n\nuse crate::logging::{aztecnr_debug_log_format, aztecnr_warn_log_format};\nuse crate::protocol::{address::AztecAddress, traits::{Deserialize, Serialize}};\nuse fsm::PartialNoteFsm;\n\n/// A partial note that was delivered but is still pending completion. Contains the information necessary to find the\n/// log that will complete it and lead to a note being discovered and delivered.\n#[derive(Serialize, Deserialize)]\npub(crate) struct DeliveredPendingPartialNote {\n pub(crate) owner: AztecAddress,\n pub(crate) randomness: Field,\n pub(crate) note_completion_log_tag: Field,\n pub(crate) note_type_id: Field,\n pub(crate) packed_private_note_content: BoundedVec<Field, MAX_PARTIAL_NOTE_PRIVATE_PACKED_LEN>,\n}\n\npub(crate) unconstrained fn process_partial_note_private_msg(\n contract_address: AztecAddress,\n msg_metadata: u64,\n msg_content: BoundedVec<Field, MAX_MESSAGE_CONTENT_LEN>,\n resolved_tx: ResolvedTx,\n recipient: AztecAddress,\n) {\n let decoded = decode_partial_note_private_message(msg_metadata, msg_content);\n\n if decoded.is_some() {\n let (owner, randomness, note_completion_log_tag, note_type_id, packed_private_note_content) = decoded.unwrap();\n\n PartialNoteFsm::init(\n contract_address,\n recipient,\n DeliveredPendingPartialNote {\n owner,\n randomness,\n note_completion_log_tag,\n note_type_id,\n packed_private_note_content,\n },\n OriginBlock { block_number: resolved_tx.block_number, block_hash: resolved_tx.block_hash },\n );\n } else {\n aztecnr_warn_log_format!(\n \"Could not decode partial note private message from tx {0}, ignoring\",\n )(\n [resolved_tx.tx_hash],\n );\n }\n}\n\n/// Drives every active partial-note FSM forward.\npub(crate) unconstrained fn sync(\n contract_address: AztecAddress,\n compute_note_hash: ComputeNoteHash,\n compute_note_nullifier: ComputeNoteNullifier,\n scope: AztecAddress,\n) {\n // `load_all` is a relatively expensive oracle round-trip, so we call it once and reuse the result.\n let active_partial_note_fsms = PartialNoteFsm::load_all(contract_address, scope);\n\n // Fetching completion logs is the dominant cost of partial note contract sync (a node round-trip each) and only\n // pending notes need them, so we batch that fetch for the pending subset and then drive the FSMs in two passes:\n // 1. Step each pending FSM with its freshly-fetched completion logs, giving found logs a chance to complete notes.\n // 2. Step every active FSM with no logs, which is where completed-and-finalized FSMs terminate.\n // Keeping both the completion and termination logic inside `PartialNoteFsm::step` is what lets the orchestrator\n // stay this small, the price is the somewhat less elegant two-pass shape that the batched fetch forces on us.\n let pending_partial_note_fsms = active_partial_note_fsms.filter(|fsm: PartialNoteFsm| fsm.is_pending());\n let pending_partial_notes = pending_partial_note_fsms.map(|fsm: PartialNoteFsm| fsm.read_pending_partial_note());\n\n aztecnr_debug_log_format!(\"{} pending partial notes\")([pending_partial_notes.len() as Field]);\n\n let completion_logs = get_pending_partial_notes_completion_logs(contract_address, pending_partial_notes);\n assert_eq(completion_logs.len(), pending_partial_notes.len());\n\n pending_partial_note_fsms.for_each(|i, fsm: PartialNoteFsm| {\n fsm.step(Option::some(completion_logs.get(i)), compute_note_hash, compute_note_nullifier);\n });\n\n active_partial_note_fsms.for_each(|_i, fsm: PartialNoteFsm| {\n fsm.step(Option::none(), compute_note_hash, compute_note_nullifier);\n });\n}\n"
|
|
2104
2374
|
},
|
|
2105
2375
|
"225": {
|
|
@@ -2117,7 +2387,7 @@
|
|
|
2117
2387
|
"start": 4999
|
|
2118
2388
|
}
|
|
2119
2389
|
],
|
|
2120
|
-
"path": "/
|
|
2390
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/state_vars/map.nr",
|
|
2121
2391
|
"source": "use crate::protocol::{storage::map::derive_storage_slot_in_map, traits::ToField};\nuse crate::state_vars::StateVariable;\n\n/// A key-value container for state variables.\n///\n/// A `Map` wraps another state variable type (the 'value') and creates independent instances of it for each key,\n/// resulting in effectively as many state variables as there are key values. This behavior is similar to a Solidity\n/// `mapping (K => V)`.\n///\n/// ## Use Cases\n///\n/// Any scenario in which a fixed number of variables is insufficient to represent contract state requires `Map` e.g.\n/// per-election configuration in a voting contract, per-user state, etc. `Map` also composes naturally into more\n/// complex containers: an array could be implemented as a `Map` with indices as keys.\n///\n/// Note that some private state variables, such as [`PrivateMutable`](crate::state_vars::PrivateMutable) and\n/// [`PrivateSet`](crate::state_vars::PrivateSet) cannot be wrapped in a `Map`. These types implement the\n/// [`OwnedStateVariable`](crate::state_vars::OwnedStateVariable) trait, and as such should instead be wrapped using the\n/// [`Owned`](crate::state_vars::Owned) container, which can be thought of as a specialization of `Map` for private\n/// state 'owned' by a single account.\n///\n/// ## Examples\n///\n/// Since `Map` is also a [`StateVariable`], it is declared in the contract's\n/// [`#[storage]`](crate::macros::storage::storage) struct along with all others:\n///\n/// ```noir\n/// #[storage]\n/// struct Storage<C> {\n/// is_admin: Map<AztecAddress, PublicMutable<bool, C>, C>,\n/// vote_tallies: Map<ElectionId, PublicMutable<u128, C>, C>,\n/// }\n/// ```\n///\n/// ### Multiple `Map`s\n///\n/// There is no limit to how many `Map` containers a contract can have, and `Map`s can themselves wrap other `Map`s,\n/// resulting in nested layouts.\n///\n/// ```noir\n/// #[storage]\n/// struct Storage<C> {\n/// // A nested map where the first key is an address and the second a `Year` type, such that\n/// // self.storage.user_yearly_config.at(user).at(year) results in distinct `UserConfig` variables for each\n/// // `(user, year)` tuple.\n/// user_yearly_config: Map<AztecAddress, Map<Year, UserConfig<C>, C>, C>,\n/// }\n/// ```\n///\n/// ## Requirements\n///\n/// The value type `V` must implement the [`StateVariable`] trait. The key type `K` must implement the [`ToField`] trait\n/// in such a way that the `Field` representation is unique for each key.\n///\n/// For key types that cannot be converted into a `Field`, consider wrapping them in a type that implements `ToField` as\n/// the hash of the key.\n///\n/// ```noir\n/// struct MyKey {\n/// a: Field,\n/// b: Field,\n/// }\n///\n/// struct MyKeyWrapper {\n/// inner: MyKey,\n/// }\n///\n/// impl ToField for MyKeyWrapper {\n/// fn to_field(self) -> Field {\n/// poseidon2_hash([self.inner.a, self.inner.b])\n/// }\n/// }\n///\n/// #[storage]\n/// struct Storage<C> {\n/// a: Map<MyKeyWrapper, PublicMutable<bool, C>, C>,\n/// }\n/// ```\n///\n/// ## Implementation Details\n///\n/// Like all other state variables, `Map` gets assigned a unique storage slot. It uses this value to derive unique\n/// storage slots for each key, resulting in independent state variables. Nothing gets stored at `Map`'s storage slot.\n/// This is equivalent to Solidity's implementation of `mapping`.\n///\n/// Because the storage slot derivation is done using a hash function, it is not possible to compute the key (preimage)\n/// used to obtain a given derived state variable slot.\npub struct Map<K, V, Context> {\n pub context: Context,\n storage_slot: Field,\n}\n\n// Map reserves a single storage slot regardless of what it stores because nothing is stored at said slot: it is only\n// used to derive the storage slots of nested state variables, which is expected to never result in collisions or slots\n// being close to one another due to these being hashes. This mirrors the strategy adopted by Solidity mappings.\nimpl<K, V, Context> StateVariable<1, Context> for Map<K, V, Context> {\n fn new(context: Context, storage_slot: Field) -> Self {\n assert(storage_slot != 0, \"Storage slot 0 not allowed. Storage slots must start from 1.\");\n Map { context, storage_slot }\n }\n\n fn get_storage_slot(self) -> Field {\n self.storage_slot\n }\n}\n\nimpl<K, V, Context> Map<K, V, Context> {\n /// Returns the state variable for a key.\n ///\n /// This derives a unique storage slot for `key` and returns a state variable of type `V` at that slot. It is\n /// equivalent to accessing a `mapping` via the `[]` operator in Solidity (e.g. `balances[user]` would be\n /// `balances.at(user)`).\n ///\n /// ## Example\n ///\n /// ```noir\n /// #[external(\"utility\")]\n /// fn get_election_vote_tallies(election: ElectionId) -> u128 {\n /// self.storage.vote_tallies.at(election).read()\n /// }\n /// ```\n pub fn at<let N: u32>(self, key: K) -> V\n where\n K: ToField,\n V: StateVariable<N, Context>,\n {\n V::new(\n self.context,\n derive_storage_slot_in_map(self.storage_slot, key),\n )\n }\n}\n"
|
|
2122
2392
|
},
|
|
2123
2393
|
"238": {
|
|
@@ -2143,7 +2413,7 @@
|
|
|
2143
2413
|
"start": 8774
|
|
2144
2414
|
}
|
|
2145
2415
|
],
|
|
2146
|
-
"path": "/
|
|
2416
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/state_vars/public_mutable.nr",
|
|
2147
2417
|
"source": "use crate::context::{PublicContext, UtilityContext};\nuse crate::protocol::traits::Packable;\nuse crate::state_vars::StateVariable;\n\nmod test;\n\n/// Mutable public values.\n///\n/// This is one of the most basic public state variables. It is equivalent to a non-`immutable` non-`constant` Solidity\n/// state variable.\n///\n/// It represents a public value of type `T` that can be written to repeatedly over the lifetime of the contract,\n/// allowing the last value that was written to be read.\n///\n/// ## Access Patterns\n///\n/// A value stored in a `PublicMutable` can be read and written from public contract functions.\n///\n/// It is not possible to read or write a `PublicMutable` from private contract functions. A common pattern is to have\n/// these functions [enqueue a public self\n/// calls](crate::contract_self::ContractSelfPrivate::enqueue) in which the\n/// required operation is performed.\n///\n/// For an immutable variant which can be read from private functions, see\n/// [`PublicImmutable`](crate::state_vars::PublicImmutable).\n///\n/// For a mutable (with restrictions) variant which can be read from private functions see\n/// [`DelayedPublicMutable`](crate::state_vars::DelayedPublicMutable).\n///\n/// ## Privacy\n///\n/// `PublicMutable` provides zero privacy. All write and read operations are public: the entire network can see these\n/// accesses and the data involved.\n///\n/// ## Use Cases\n///\n/// This is suitable for any kind of global state that needs to be accessible by everyone. For example, a token may\n/// have a public total supply, or a voting contract may have public vote tallies.\n///\n/// Note that contracts having public values does not necessarily mean the actions that update these values must\n/// themselves be wholly public. For example, the token could allow for private minting and burning, and casting a vote\n/// could be kept private: these private functions would enqueue a public function that writes to the `PublicMutable`.\n///\n/// Similarly, private functions can enqueue a public call in which the `PublicMutable` is checked to meet some\n/// condition. For example, a private action might be executable only if the vote count has exceeded some threshold, in\n/// which case the private function would enqueue a public function that reads from the `PublicMutable`.\n///\n/// Such patterns preserve the privacy of the account that executed the action, as well as details related to the\n/// private execution itself, but they _do_ reveal that the transaction interacted with the `PublicMutable` value (and\n/// hence that the contract was called), as all accesses to it are public. The\n/// [`only_self`](crate::macros::functions::only_self) attribute is very useful when implementing this.\n///\n/// ## Examples\n///\n/// Declaring a `PublicMutable` in the contract's [`#[storage]`](crate::macros::storage::storage) struct requires\n/// specifying the type `T` that is stored in the variable:\n///\n/// ```noir\n/// #[storage]\n/// struct Storage<C> {\n/// total_supply: PublicMutable<u128, C>,\n/// public_balances: Map<AztecAddress, PublicMutable<u128, C>, C>,\n///\n/// vote_tallies: Map<ElectionId, PublicMutable<u128, C>, C>,\n/// }\n/// ```\n///\n/// ## Requirements\n///\n/// The type `T` stored in the `PublicMutable` must implement the [`Packable`](crate::protocol::traits::Packable)\n/// trait.\n///\n/// ## Implementation Details\n///\n/// Values are packed and stored directly in the public storage tree, with no overhead. A `PublicMutable` therefore\n/// takes up as many storage slots as the packing length of the stored type `T`.\n///\n/// Private reads are not possible because private functions do not have access to the current network state, only the\n/// _past_ state at the anchor block. They _can_ perform historical reads of `PublicMutable` values at past times, but\n/// they have no way to guarantee that the value has not changed since then.\n/// [`PublicImmutable`](crate::state_vars::PublicImmutable) and\n/// [`DelayedPublicMutable`](crate::state_vars::DelayedPublicMutable) are examples of public state variables that _can_\n/// be read privately by restricting mutation.\npub struct PublicMutable<T, Context> {\n context: Context,\n storage_slot: Field,\n}\n\nimpl<T, Context, let M: u32> StateVariable<M, Context> for PublicMutable<T, Context>\nwhere\n T: Packable<N = M>,\n{\n fn new(context: Context, storage_slot: Field) -> Self {\n assert(storage_slot != 0, \"Storage slot 0 not allowed. Storage slots must start from 1.\");\n PublicMutable { context, storage_slot }\n }\n\n fn get_storage_slot(self) -> Field {\n self.storage_slot\n }\n}\n\nimpl<T> PublicMutable<T, PublicContext> {\n /// Returns the current value.\n ///\n /// If [`write`](PublicMutable::write) has never been called, then this returns the default empty public storage\n /// value, which is all zeroes - equivalent to `let t = T::unpack(std::mem::zeroed());`.\n ///\n /// It is not possible to detect if a `PublicMutable` has ever been initialized or not other than by testing for\n /// the zero sentinel value. For a more robust solution, store an `Option<T>` in the `PublicMutable`.\n ///\n /// ## Examples\n ///\n /// A public getter that returns the current value:\n /// ```noir\n /// #[external(\"public\")]\n /// fn get_total_supply() -> u128 {\n /// self.storage.total_supply.read()\n /// }\n /// ```\n ///\n /// An [`only_self`](crate::macros::functions::only_self) helper that asserts a condition a private function\n /// requires:\n /// ```noir\n /// #[external(\"private\")]\n /// fn execute_proposal(election_id: ElectionId) {\n /// self.enqueue_self._assert_vote_passed(election_id);\n ///\n /// // execute the proposal - this remains private\n /// }\n ///\n /// #[external(\"public\")]\n /// #[only_self]\n /// fn _assert_vote_passed(election_id: ElectionId) {\n /// assert(self.storage.vote_tallies.at(election_id).read() >= VOTE_PASSED_THRESHOLD);\n /// }\n /// ```\n ///\n /// ## Cost\n ///\n /// The `SLOAD` AVM opcode is invoked a number of times equal to `T`'s packed length.\n pub fn read(self) -> T\n where\n T: Packable,\n {\n self.context.storage_read(self.storage_slot)\n }\n\n /// Stores a new value.\n ///\n /// The old value is overridden and cannot be recovered. The new value can be immediately retrieved by\n /// [`read`](PublicMutable::read).\n ///\n /// ## Examples\n ///\n /// A public setter that updates the current value:\n /// ```noir\n /// #[external(\"public\")]\n /// fn mint_tokens(recipient: AztecAddress, amount: u128) {\n /// let current_recipient_balance = self.storage.public_balances.at(recipient).read();\n /// self.storage.public_balances.at(recipient).write(current_recipient_balance + amount);\n ///\n /// let current_supply = self.storage.total_supply.read();\n /// self.storage.total_supply.write(current_supply + amount);\n /// }\n /// ```\n ///\n /// An [`only_self`](crate::macros::functions::only_self) helper that updates public state triggered by a private\n /// function:\n /// ```noir\n /// #[external(\"private\")]\n /// fn vote_for_proposal(election_id: ElectionId, votes: u128) {\n /// // validate the sender can cast this many votes - this remains private\n ///\n /// self.enqueue_self._tally_vote(election_id, votes);\n /// }\n ///\n /// #[external(\"public\")]\n /// #[only_self]\n /// fn _tally_vote(election_id: ElectionId, votes: u128) {\n /// let current = self.storage.vote_tallies.at(election_id).read();\n /// self.storage.vote_tallies.at(election_id).write(current + votes);\n /// }\n /// ```\n ///\n /// ## Cost\n ///\n /// The `SSTORE` AVM opcode is invoked a number of times equal to `T`'s packed length.\n pub fn write(self, value: T)\n where\n T: Packable,\n {\n self.context.storage_write(self.storage_slot, value);\n }\n}\n\nimpl<T> PublicMutable<T, UtilityContext> {\n /// Returns the value at the anchor block.\n ///\n /// If [`write`](PublicMutable::write) has never been called, then this returns the default empty public storage\n /// value, which is all zeroes - equivalent to `let t = T::unpack(std::mem::zeroed());`.\n ///\n /// It is not possible to detect if a `PublicMutable` has ever been initialized or not other than by testing for\n /// the zero sentinel value. For a more robust solution, store an `Option<T>` in the `PublicMutable`.\n ///\n /// ## Examples\n ///\n /// ```noir\n /// #[external(\"utility\")]\n /// fn get_total_supply() -> u128 {\n /// self.storage.total_supply.read()\n /// }\n /// ```\n pub unconstrained fn read(self) -> T\n where\n T: Packable,\n {\n self.context.storage_read(self.storage_slot)\n }\n}\n"
|
|
2148
2418
|
},
|
|
2149
2419
|
"272": {
|
|
@@ -2213,7 +2483,7 @@
|
|
|
2213
2483
|
"start": 7995
|
|
2214
2484
|
}
|
|
2215
2485
|
],
|
|
2216
|
-
"path": "/
|
|
2486
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/unconstrained_array/mod.nr",
|
|
2217
2487
|
"source": "pub(crate) mod test_helpers;\npub(crate) mod test_suite;\n\nuse crate::oracle::random::random;\nuse crate::protocol::traits::{Deserialize, Serialize};\n\n/// Oracle backend for an [`UnconstrainedArray`]: the set of PXE-side operations that implement its storage.\n///\n/// Each implementor routes these operations to a distinct family of oracles, and the oracle family determines the\n/// array's lifetime and visibility (e.g. [`EphemeralArray`](crate::ephemeral::EphemeralArray) arrays live for one\n/// contract call frame, while [`TransientArray`](crate::transient::TransientArray) arrays are shared across all frames\n/// of the same contract within one top-level PXE call).\npub(crate) trait ArrayOracles {\n /// Returns the number of elements in the array at `slot`.\n unconstrained fn len_oracle(slot: Field) -> u32;\n\n /// Appends a serialized element to the array at `slot` and returns the new length.\n unconstrained fn push_oracle<let N: u32>(slot: Field, values: [Field; N]) -> u32;\n\n /// Removes and returns the last serialized element of the array at `slot`. Implementors must panic if the\n /// array is empty.\n unconstrained fn pop_oracle<let N: u32>(slot: Field) -> [Field; N];\n\n /// Returns the serialized element at the given index of the array at `slot`. Implementors must panic if `index`\n /// is out of bounds.\n unconstrained fn get_oracle<let N: u32>(slot: Field, index: u32) -> [Field; N];\n\n /// Overwrites the serialized element at the given index of the array at `slot`. Implementors must panic if\n /// `index` is out of bounds.\n unconstrained fn set_oracle<let N: u32>(slot: Field, index: u32, values: [Field; N]);\n\n /// Removes the element at the given index of the array at `slot`, shifting subsequent elements backward.\n /// Implementors must panic if `index` is out of bounds.\n unconstrained fn remove_oracle(slot: Field, index: u32);\n\n /// Removes all elements from the array at `slot`.\n unconstrained fn clear_oracle(slot: Field);\n}\n\n/// A dynamically sized array backed by PXE-side in-memory storage via an [`ArrayOracles`] backend.\n///\n/// Arrays are identified by a slot, and each logical operation (push, pop, get, etc.) is a single oracle call. The\n/// `Oracle` backend determines the array's lifetime and visibility; contracts should not use this type directly but\n/// rather one of its aliases: [`EphemeralArray`](crate::ephemeral::EphemeralArray) (scoped to a single contract call\n/// frame) or [`TransientArray`](crate::transient::TransientArray) (shared across all frames of the same contract\n/// within one top-level PXE call).\npub struct UnconstrainedArray<T, Oracle> {\n pub(crate) slot: Field,\n}\n\nimpl<T, Oracle> UnconstrainedArray<T, Oracle>\nwhere\n Oracle: ArrayOracles,\n{\n /// Returns a handle to the array at the given slot, which may already contain data (e.g. populated by an oracle\n /// or by an earlier frame, depending on the backend's visibility).\n pub unconstrained fn at(slot: Field) -> Self {\n Self { slot }\n }\n\n /// Returns an empty array at the given slot, clearing any pre-existing data.\n ///\n /// For backends whose arrays are visible beyond a single call frame (e.g. transient arrays), this wipes data\n /// other frames of the same contract may have written at the slot.\n pub unconstrained fn empty_at(slot: Field) -> Self {\n Self::at(slot).clear()\n }\n\n /// Returns an empty array at a fresh, randomly allocated slot.\n ///\n /// Use this when the caller does not need a specific slot: the random slot is isolated from every other array of\n /// the same backend with overwhelming probability. Prefer [`UnconstrainedArray::empty_at`] when the slot must be a\n /// known value (e.g. one shared with an oracle or another call frame).\n pub unconstrained fn empty() -> Self {\n Self::at(random())\n }\n\n /// Returns the number of elements stored in the array.\n pub unconstrained fn len(self) -> u32 {\n Oracle::len_oracle(self.slot)\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 serialized = value.serialize();\n let _ = Oracle::push_oracle(self.slot, serialized);\n }\n\n /// Removes and returns the last element. Implementors are required to panic if the array is empty.\n pub unconstrained fn pop(self) -> T\n where\n T: Deserialize,\n {\n let serialized = Oracle::pop_oracle(self.slot);\n Deserialize::deserialize(serialized)\n }\n\n /// Retrieves the value stored at `index`. Implementors are required to panic if the index is out of bounds.\n pub unconstrained fn get(self, index: u32) -> T\n where\n T: Deserialize,\n {\n let serialized = Oracle::get_oracle(self.slot, index);\n Deserialize::deserialize(serialized)\n }\n\n /// Overwrites the value stored at `index`. Implementors are required to panic if the index is out of bounds.\n pub unconstrained fn set(self, index: u32, value: T)\n where\n T: Serialize,\n {\n let serialized = value.serialize();\n Oracle::set_oracle(self.slot, index, serialized);\n }\n\n /// Removes the element at `index`, shifting subsequent elements backward. Implementors are required to panic if\n /// the index is out of bounds.\n pub unconstrained fn remove(self, index: u32) {\n Oracle::remove_oracle(self.slot, index);\n }\n\n /// Removes all elements from the array and returns self for chaining.\n pub unconstrained fn clear(self) -> Self {\n Oracle::clear_oracle(self.slot);\n self\n }\n\n /// Calls a function on each element of the array.\n ///\n /// The function `f` is called once with each array value and its corresponding index, in order (from the first\n /// element to the last).\n ///\n /// Structurally mutating the array from inside the callback (e.g. via `push`, `pop`, `remove` or `clear`) is\n /// **not** supported: it can cause elements to be skipped, visited more than once, or read out of bounds.\n pub unconstrained fn for_each<Env>(self, f: unconstrained fn[Env](u32, T) -> ())\n where\n T: Deserialize,\n {\n let n = self.len();\n for i in 0..n {\n f(i, self.get(i));\n }\n }\n\n /// Applies `f` to every element and collects the results into a fresh array.\n pub unconstrained fn map<U, Env>(self, f: unconstrained fn[Env](T) -> U) -> UnconstrainedArray<U, Oracle>\n where\n T: Deserialize,\n U: Serialize,\n {\n let dest: UnconstrainedArray<U, Oracle> = UnconstrainedArray::empty();\n let n = self.len();\n for i in 0..n {\n dest.push(f(self.get(i)));\n }\n dest\n }\n\n /// Collects every element satisfying the predicate `f` into a fresh array.\n pub unconstrained fn filter<Env>(self, f: unconstrained fn[Env](T) -> bool) -> Self\n where\n T: Serialize + Deserialize,\n {\n let dest: Self = UnconstrainedArray::empty();\n let n = self.len();\n for i in 0..n {\n let value = self.get(i);\n if f(value) {\n dest.push(value);\n }\n }\n dest\n }\n\n /// Returns `true` if at least one element satisfies the predicate `f`.\n pub unconstrained fn any<Env>(self, f: unconstrained fn[Env](T) -> bool) -> bool\n where\n T: Serialize + Deserialize,\n {\n self.filter(f).len() != 0\n }\n\n /// Returns `true` if every element satisfies the predicate `f` (vacuously `true` for an empty array).\n pub unconstrained fn all<Env>(self, f: unconstrained fn[Env](T) -> bool) -> bool\n where\n T: Serialize + Deserialize,\n {\n self.filter(f).len() == self.len()\n }\n\n /// Returns the first element satisfying the predicate `f`, or `Option::none` if none do.\n pub unconstrained fn find<Env>(self, f: unconstrained fn[Env](T) -> bool) -> Option<T>\n where\n T: Deserialize,\n {\n let n = self.len();\n let mut result: Option<T> = Option::none();\n let mut i = 0;\n while (i < n) & result.is_none() {\n let value = self.get(i);\n if f(value) {\n result = Option::some(value);\n }\n i += 1;\n }\n result\n }\n}\n"
|
|
2218
2488
|
},
|
|
2219
2489
|
"275": {
|
|
@@ -2235,7 +2505,7 @@
|
|
|
2235
2505
|
"start": 1387
|
|
2236
2506
|
}
|
|
2237
2507
|
],
|
|
2238
|
-
"path": "/
|
|
2508
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/utils/array/append.nr",
|
|
2239
2509
|
"source": "/// Appends the elements of the second `BoundedVec` to the end of the first one. The resulting `BoundedVec` can have\n/// any arbitrary maximum length, but it must be large enough to fit all of the elements of both the first and second\n/// vectors.\npub fn append<T, let ALen: u32, let BLen: u32, let DstLen: u32>(\n a: BoundedVec<T, ALen>,\n b: BoundedVec<T, BLen>,\n) -> BoundedVec<T, DstLen> {\n let mut dst = BoundedVec::new();\n\n dst.extend_from_bounded_vec(a);\n dst.extend_from_bounded_vec(b);\n\n dst\n}\n\nmod test {\n use super::append;\n\n #[test]\n unconstrained fn append_empty_vecs() {\n let a: BoundedVec<_, 3> = BoundedVec::new();\n let b: BoundedVec<_, 14> = BoundedVec::new();\n\n let result: BoundedVec<Field, 5> = append(a, b);\n\n assert_eq(result.len(), 0);\n assert_eq(result.storage(), std::mem::zeroed());\n }\n\n #[test]\n unconstrained fn append_non_empty_vecs() {\n let a: BoundedVec<_, 3> = BoundedVec::from_array([1, 2, 3]);\n let b: BoundedVec<_, 14> = BoundedVec::from_array([4, 5, 6]);\n\n let result: BoundedVec<Field, 8> = append(a, b);\n\n assert_eq(result.len(), 6);\n assert_eq(result.storage(), [1, 2, 3, 4, 5, 6, std::mem::zeroed(), std::mem::zeroed()]);\n }\n\n #[test(should_fail_with = \"out of bounds\")]\n unconstrained fn append_non_empty_vecs_insufficient_max_len() {\n let a: BoundedVec<_, 3> = BoundedVec::from_array([1, 2, 3]);\n let b: BoundedVec<_, 14> = BoundedVec::from_array([4, 5, 6]);\n\n let _: BoundedVec<Field, 5> = append(a, b);\n }\n}\n"
|
|
2240
2510
|
},
|
|
2241
2511
|
"278": {
|
|
@@ -2265,7 +2535,7 @@
|
|
|
2265
2535
|
"start": 1941
|
|
2266
2536
|
}
|
|
2267
2537
|
],
|
|
2268
|
-
"path": "/
|
|
2538
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/utils/array/subarray.nr",
|
|
2269
2539
|
"source": "/// Returns `DstLen` elements from a source array, starting at `offset`. `DstLen` must not be larger than the number of\n/// elements past `offset`.\n///\n/// Examples:\n/// ```\n/// let foo: [Field; 2] = subarray([1, 2, 3, 4, 5], 2);\n/// assert_eq(foo, [3, 4]);\n///\n/// let bar: [Field; 5] = subarray([1, 2, 3, 4, 5], 2); // fails - we can't return 5 elements since only 3 remain\n/// ```\npub fn subarray<T, let SrcLen: u32, let DstLen: u32>(src: [T; SrcLen], offset: u32) -> [T; DstLen] {\n assert(offset + DstLen <= SrcLen, \"DstLen too large for offset\");\n\n let mut dst: [T; DstLen] = std::mem::zeroed();\n for i in 0..DstLen {\n dst[i] = src[i + offset];\n }\n\n dst\n}\n\nmod test {\n use super::subarray;\n\n #[test]\n unconstrained fn subarray_into_empty() {\n // In all of these cases we're setting DstLen to be 0, so we always get back an empty array.\n assert_eq(subarray::<Field, _, _>([], 0), []);\n assert_eq(subarray([1, 2, 3, 4, 5], 0), []);\n assert_eq(subarray([1, 2, 3, 4, 5], 2), []);\n }\n\n #[test]\n unconstrained fn subarray_complete() {\n assert_eq(subarray::<Field, _, _>([], 0), []);\n assert_eq(subarray([1, 2, 3, 4, 5], 0), [1, 2, 3, 4, 5]);\n }\n\n #[test]\n unconstrained fn subarray_different_end_sizes() {\n // We implicitly select how many values to read in the size of the return array\n assert_eq(subarray([1, 2, 3, 4, 5], 1), [2, 3, 4, 5]);\n assert_eq(subarray([1, 2, 3, 4, 5], 1), [2, 3, 4]);\n assert_eq(subarray([1, 2, 3, 4, 5], 1), [2, 3]);\n assert_eq(subarray([1, 2, 3, 4, 5], 1), [2]);\n }\n\n #[test(should_fail_with = \"DstLen too large for offset\")]\n unconstrained fn subarray_offset_too_large() {\n // With an offset of 1 we can only request up to 4 elements\n let _: [_; 5] = subarray([1, 2, 3, 4, 5], 1);\n }\n\n #[test(should_fail)]\n unconstrained fn subarray_bad_return_value() {\n assert_eq(subarray([1, 2, 3, 4, 5], 1), [3, 3, 4, 5]);\n }\n}\n"
|
|
2270
2540
|
},
|
|
2271
2541
|
"279": {
|
|
@@ -2307,7 +2577,7 @@
|
|
|
2307
2577
|
"start": 3409
|
|
2308
2578
|
}
|
|
2309
2579
|
],
|
|
2310
|
-
"path": "/
|
|
2580
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/utils/array/subbvec.nr",
|
|
2311
2581
|
"source": "use crate::utils::array;\n\n/// Returns `DstMaxLen` elements from a source BoundedVec, starting at `offset`. `offset` must not be larger than the\n/// original length, and `DstLen` must not be larger than the total number of elements past `offset` (including the\n/// zeroed elements past `len()`).\n///\n/// Only elements at the beginning of the vector can be removed: it is not possible to also remove elements at the end\n/// of the vector by passing a value for `DstLen` that is smaller than `len() - offset`.\n///\n/// Examples:\n/// ```\n/// let foo = BoundedVec::<_, 10>::from_array([1, 2, 3, 4, 5]);\n/// assert_eq(subbvec(foo, 2), BoundedVec::<_, 8>::from_array([3, 4, 5]));\n///\n/// let bar: BoundedVec<_, 1> = subbvec(foo, 2); // fails - we can't return just 1 element since 3 remain\n/// let baz: BoundedVec<_, 10> = subbvec(foo, 3); // fails - we can't return 10 elements since only 7 remain\n/// ```\npub fn subbvec<T, let SrcMaxLen: u32, let DstMaxLen: u32>(\n bvec: BoundedVec<T, SrcMaxLen>,\n offset: u32,\n) -> BoundedVec<T, DstMaxLen> {\n // The new storage array is a subarray of the original one (which has zeroed storage past len), so elements past\n // the new len remain zeroed: `subarray` does not allow extending arrays past their original length.\n BoundedVec::from_parts(array::subarray(bvec.storage(), offset), bvec.len() - offset)\n}\n\nmod test {\n use super::subbvec;\n\n #[test]\n unconstrained fn subbvec_empty() {\n let bvec = BoundedVec::<Field, 0>::from_array([]);\n assert_eq(subbvec(bvec, 0), bvec);\n }\n\n #[test]\n unconstrained fn subbvec_complete() {\n let bvec = BoundedVec::<_, 10>::from_array([1, 2, 3, 4, 5]);\n assert_eq(subbvec(bvec, 0), bvec);\n\n let smaller_capacity = BoundedVec::<_, 5>::from_array([1, 2, 3, 4, 5]);\n assert_eq(subbvec(bvec, 0), smaller_capacity);\n }\n\n #[test]\n unconstrained fn subbvec_partial() {\n let bvec = BoundedVec::<_, 10>::from_array([1, 2, 3, 4, 5]);\n\n assert_eq(subbvec(bvec, 2), BoundedVec::<_, 8>::from_array([3, 4, 5]));\n assert_eq(subbvec(bvec, 2), BoundedVec::<_, 3>::from_array([3, 4, 5]));\n }\n\n #[test]\n unconstrained fn subbvec_into_empty() {\n let bvec: BoundedVec<_, 10> = BoundedVec::from_array([1, 2, 3, 4, 5]);\n assert_eq(subbvec(bvec, 5), BoundedVec::<_, 5>::from_array([]));\n }\n\n #[test(should_fail)]\n unconstrained fn subbvec_offset_past_len() {\n let bvec = BoundedVec::<_, 10>::from_array([1, 2, 3, 4, 5]);\n let _: BoundedVec<_, 1> = subbvec(bvec, 6);\n }\n\n #[test(should_fail)]\n unconstrained fn subbvec_insufficient_dst_len() {\n let bvec = BoundedVec::<_, 10>::from_array([1, 2, 3, 4, 5]);\n\n // We're not providing enough space to hold all of the items inside the original BoundedVec. subbvec can cause\n // for the capacity to reduce, but not the length (other than by len - offset).\n let _: BoundedVec<_, 1> = subbvec(bvec, 2);\n }\n\n #[test(should_fail_with = \"DstLen too large for offset\")]\n unconstrained fn subbvec_dst_len_causes_enlarge() {\n let bvec = BoundedVec::<_, 10>::from_array([1, 2, 3, 4, 5]);\n\n // subbvec does not support capacity increases\n let _: BoundedVec<_, 11> = subbvec(bvec, 0);\n }\n\n #[test(should_fail_with = \"DstLen too large for offset\")]\n unconstrained fn subbvec_dst_len_too_large_for_offset() {\n let bvec = BoundedVec::<_, 10>::from_array([1, 2, 3, 4, 5]);\n\n // This effectively requests a capacity increase, since there'd be just one element plus the 5 empty slots,\n // which is less than 7.\n let _: BoundedVec<_, 7> = subbvec(bvec, 4);\n }\n}\n"
|
|
2312
2582
|
},
|
|
2313
2583
|
"282": {
|
|
@@ -2333,7 +2603,7 @@
|
|
|
2333
2603
|
"start": 2454
|
|
2334
2604
|
}
|
|
2335
2605
|
],
|
|
2336
|
-
"path": "/
|
|
2606
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/utils/conversion/bytes_as_fields.nr",
|
|
2337
2607
|
"source": "use std::static_assert;\n\n/// Encodes an array of bytes as fields.\n///\n/// Use\n/// [`decode_bytes_from_fields`](crate::utils::conversion::bytes_as_fields::decode_bytes_from_fields) to recover\n/// the original bytes.\n///\n/// The `bytes` array length must be a multiple of 31. If padding is added, it will need to be manually removed\n/// after decoding.\n///\n/// ## Encoding\n///\n/// Each 31-byte chunk is interpreted as a big-endian integer and stored in a `Field`. For input `[1, 10, 3, ..., 0]`\n/// (31 bytes), the resulting `Field` is `1 * 256^30 + 10 * 256^29 + 3 * 256^28 + ... + 0`.\npub fn encode_bytes_as_fields<let N: u32>(bytes: [u8; N]) -> [Field; N / 31] {\n static_assert(N % 31 == 0, \"N must be a multiple of 31\");\n\n let mut fields = [0; N / 31];\n for i in 0..N / 31 {\n let mut field = 0;\n for j in 0..31 {\n field = field * 256 + bytes[i * 31 + j] as Field;\n }\n fields[i] = field;\n }\n\n fields\n}\n\n/// Decodes fields back into bytes.\n///\n/// Inverse of\n/// [`encode_bytes_as_fields`](crate::utils::conversion::bytes_as_fields::encode_bytes_as_fields).\n/// Each input `Field` must fit in 248 bits; `Field::to_be_bytes::<31>()` fails the proof otherwise.\npub fn decode_bytes_from_fields<let N: u32>(fields: BoundedVec<Field, N>) -> BoundedVec<u8, N * 31> {\n let mut bytes = BoundedVec::new();\n for i in 0..fields.len() {\n let chunk: [u8; 31] = fields.get(i).to_be_bytes();\n for j in 0..31 {\n bytes.push(chunk[j]);\n }\n }\n bytes\n}\n\nmod tests {\n use crate::utils::array::subarray;\n use super::{decode_bytes_from_fields, encode_bytes_as_fields};\n\n #[test]\n unconstrained fn round_trips_bytes(input: [u8; 93]) {\n let fields = encode_bytes_as_fields(input);\n\n // In production the fields fly through the system and arrive as a BoundedVec on the other end.\n let fields_bvec = BoundedVec::<_, 6>::from_array(fields);\n let bytes_back = decode_bytes_from_fields(fields_bvec);\n\n assert_eq(bytes_back.len(), input.len());\n assert_eq(subarray(bytes_back.storage(), 0), input);\n }\n\n #[test(should_fail_with = \"N must be a multiple of 31\")]\n unconstrained fn encode_rejects_length_not_multiple_of_31() {\n let _fields = encode_bytes_as_fields([0; 32]);\n }\n\n #[test(should_fail_with = \"Field failed to decompose into specified 31 limbs\")]\n unconstrained fn decode_rejects_oversized_field() {\n // `Field::to_be_bytes::<31>()` fails the proof when a field has any bit above position 247 set.\n let oversized: Field = (1 as Field) * 2.pow_32(249);\n let input = BoundedVec::<_, 1>::from_array([oversized]);\n let _bytes = decode_bytes_from_fields(input);\n }\n}\n"
|
|
2338
2608
|
},
|
|
2339
2609
|
"283": {
|
|
@@ -2383,7 +2653,7 @@
|
|
|
2383
2653
|
"start": 6544
|
|
2384
2654
|
}
|
|
2385
2655
|
],
|
|
2386
|
-
"path": "/
|
|
2656
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/utils/conversion/fields_as_bytes.nr",
|
|
2387
2657
|
"source": "/// Encodes an array of fields as bytes.\n///\n/// Losslessly preserves any field value; use\n/// [`try_decode_fields_from_bytes`](crate::utils::conversion::fields_as_bytes::try_decode_fields_from_bytes) to\n/// recover the original fields.\n///\n/// ## Encoding\n///\n/// Each field is written as 32 big-endian bytes and the chunks are concatenated. The field array `[5, 42]` becomes:\n///\n/// ```text\n/// [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5, // First field (32 bytes)\n/// 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42] // Second field (32 bytes)\n/// ```\n///\n/// ## Privacy\n///\n/// The BN254 modulus is `< 2^254`, so every 32-byte chunk has its top bit at zero and the next bit biased. The output\n/// is therefore distinguishable from uniform random bytes; take this into account when feeding it into anything that\n/// assumes uniform randomness (e.g. ciphertexts meant to look random).\npub fn encode_fields_as_bytes<let N: u32>(fields: [Field; N]) -> [u8; 32 * N] {\n let mut bytes = [0; 32 * N];\n for i in 0..N {\n let chunk: [u8; 32] = fields[i].to_be_bytes();\n for j in 0..32 {\n bytes[i * 32 + j] = chunk[j];\n }\n }\n bytes\n}\n\n/// Decodes bytes back into fields.\n///\n/// Panics if the input length is not a multiple of 32 or if any chunk exceeds the BN254 field modulus. See\n/// [`try_decode_fields_from_bytes`](crate::utils::conversion::fields_as_bytes::try_decode_fields_from_bytes)\n/// for a non-panicking variant.\npub fn decode_fields_from_bytes<let N: u32>(bytes: BoundedVec<u8, N>) -> BoundedVec<Field, N / 32> {\n assert(bytes.len() % 32 == 0, \"Input length must be a multiple of 32\");\n try_decode_fields_from_bytes(bytes).expect(f\"Value does not fit in field\")\n}\n\n/// Decodes bytes back into fields, returning None on failure.\n///\n/// Inverse of\n/// [`encode_fields_as_bytes`](crate::utils::conversion::fields_as_bytes::encode_fields_as_bytes).\n/// Returns `Option::none()` if the input length is not a multiple of 32, or if any 32-byte chunk is `>=` the BN254\n/// field modulus.\npub fn try_decode_fields_from_bytes<let N: u32>(bytes: BoundedVec<u8, N>) -> Option<BoundedVec<Field, N / 32>> {\n if bytes.len() % 32 == 0 {\n let num_chunks = bytes.len() / 32;\n let mut fields: BoundedVec<Field, N / 32> = BoundedVec::new();\n for i in 0..num_chunks {\n let maybe_field = try_decode_field_from_bytes(bytes, i * 32);\n if maybe_field.is_some() {\n fields.push(maybe_field.unwrap());\n }\n }\n if fields.len() == num_chunks {\n Option::some(fields)\n } else {\n Option::none()\n }\n } else {\n Option::none()\n }\n}\n\nfn try_decode_field_from_bytes<let N: u32>(bytes: BoundedVec<u8, N>, offset: u32) -> Option<Field> {\n // Field arithmetic silently wraps values >= the modulus, so we compare each chunk against the modulus\n // byte-by-byte (big-endian) while building `field`. cmp: 0 = equal so far, 1 = less than modulus, 2 = exceeds.\n let p = std::field::modulus_be_bytes();\n let mut field = 0;\n let mut cmp: u8 = 0;\n for j in 0..32 {\n let byte = bytes.get(offset + j);\n field = field * 256 + byte as Field;\n if cmp == 0 {\n if byte < p[j] {\n cmp = 1;\n } else if byte > p[j] {\n cmp = 2;\n }\n }\n }\n\n if cmp == 1 {\n Option::some(field)\n } else {\n Option::none()\n }\n}\n\nmod tests {\n use crate::utils::array::subarray;\n use super::{decode_fields_from_bytes, encode_fields_as_bytes, try_decode_fields_from_bytes};\n\n #[test]\n unconstrained fn round_trips_fields(input: [Field; 3]) {\n let bytes = encode_fields_as_bytes(input);\n\n // In production the bytes fly through the system and arrive as a BoundedVec on the other end. 113 is an\n // arbitrary max length larger than the input length of 96.\n let bytes_bvec = BoundedVec::<_, 113>::from_array(bytes);\n let fields_back = try_decode_fields_from_bytes(bytes_bvec).unwrap();\n\n assert_eq(fields_back.len(), input.len());\n assert_eq(subarray(fields_back.storage(), 0), input);\n }\n\n #[test]\n unconstrained fn try_decode_returns_none_on_length_not_multiple_of_32() {\n let input = BoundedVec::<_, 64>::from_parts([0 as u8; 64], 33);\n assert(try_decode_fields_from_bytes(input).is_none());\n }\n\n #[test]\n unconstrained fn try_decode_accepts_max_field() {\n // -1 in field arithmetic wraps to `modulus - 1`, the largest valid field value.\n let max_field_as_bytes: [u8; 32] = (-1).to_be_bytes();\n let input = BoundedVec::<_, 32>::from_array(max_field_as_bytes);\n\n let fields = try_decode_fields_from_bytes(input).unwrap();\n\n assert_eq(fields.get(0), -1);\n }\n\n // Verifies the overflow check: take the max allowed value, bump a random byte, feed it in.\n #[test]\n unconstrained fn try_decode_returns_none_on_chunk_above_modulus(random_value: u8) {\n let index_of_byte_to_bump = random_value % 32;\n let max_field_value_as_bytes: [u8; 32] = (-1).to_be_bytes();\n let byte_to_bump = max_field_value_as_bytes[index_of_byte_to_bump as u32];\n\n // Skip if the selected byte is already 255. Acceptable under fuzz testing.\n if byte_to_bump != 255 {\n let mut input = BoundedVec::<_, 32>::from_array(max_field_value_as_bytes);\n input.set(index_of_byte_to_bump as u32, byte_to_bump + 1);\n\n assert(try_decode_fields_from_bytes(input).is_none());\n }\n }\n\n #[test]\n unconstrained fn try_decode_returns_none_on_chunk_equal_to_modulus() {\n // The field modulus itself is not a valid field value (it wraps to 0).\n let p: [u8; 32] = std::field::modulus_be_bytes().as_array();\n let input = BoundedVec::<u8, 32>::from_array(p);\n assert(try_decode_fields_from_bytes(input).is_none());\n }\n\n #[test(should_fail_with = \"Input length must be a multiple of 32\")]\n unconstrained fn decode_asserts_length_multiple_of_32() {\n let input = BoundedVec::<_, 143>::from_array([\n 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,\n 30, 31, 32, 33,\n ]);\n let _fields = decode_fields_from_bytes(input);\n }\n\n #[test(should_fail_with = \"Value does not fit in field\")]\n unconstrained fn decode_panics_on_chunk_above_modulus(random_value: u8) {\n let index_of_byte_to_bump = random_value % 32;\n let max_field_value_as_bytes: [u8; 32] = (-1).to_be_bytes();\n let byte_to_bump = max_field_value_as_bytes[index_of_byte_to_bump as u32];\n\n if byte_to_bump != 255 {\n let mut input = BoundedVec::<_, 32>::from_array(max_field_value_as_bytes);\n input.set(index_of_byte_to_bump as u32, byte_to_bump + 1);\n let _fields = decode_fields_from_bytes(input);\n }\n }\n}\n"
|
|
2388
2658
|
},
|
|
2389
2659
|
"286": {
|
|
@@ -2433,7 +2703,7 @@
|
|
|
2433
2703
|
"start": 6628
|
|
2434
2704
|
}
|
|
2435
2705
|
],
|
|
2436
|
-
"path": "/
|
|
2706
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/utils/point.nr",
|
|
2437
2707
|
"source": "use crate::protocol::{point::EmbeddedCurvePoint, utils::field::sqrt};\n\n// I am storing the modulus minus 1 divided by 2 here because full modulus would throw \"String literal too large\" error\n// Full modulus is 21888242871839275222246405745257275088548364400416034343698204186575808495617\nglobal BN254_FR_MODULUS_DIV_2: Field = 10944121435919637611123202872628637544274182200208017171849102093287904247808;\n\n/// Returns: true if p.y <= MOD_DIV_2, else false.\npub fn get_sign_of_point(p: EmbeddedCurvePoint) -> bool {\n // We store only a \"sign\" of the y coordinate because the rest can be derived from the x coordinate. To get the\n // sign we check if the y coordinate is less or equal than the field's modulus minus 1 divided by 2. Ideally we'd\n // do `y <= MOD_DIV_2`, but there's no `lte` function, so instead we do `!(y > MOD_DIV_2)`, which is equivalent,\n // and then rewrite that as `!(MOD_DIV_2 < y)`, since we also have no `gt` function.\n !BN254_FR_MODULUS_DIV_2.lt(p.y)\n}\n\n/// Returns an `EmbeddedCurvePoint` in the Grumpkin curve given its x coordinate.\n///\n/// Because not all values in the field are valid x coordinates of points in the curve (i.e. there is no corresponding\n/// y value in the field that satisfies the curve equation), it may not be possible to reconstruct a `Point`.\n/// `Option::none()` is returned in such cases.\npub fn point_from_x_coord(x: Field) -> Option<EmbeddedCurvePoint> {\n // y ^ 2 = x ^ 3 - 17\n let rhs = x * x * x - 17;\n sqrt(rhs).map(|y| EmbeddedCurvePoint { x, y })\n}\n\n/// Returns an `EmbeddedCurvePoint` in the Grumpkin curve given its x coordinate and sign for the y coordinate.\n///\n/// Because not all values in the field are valid x coordinates of points in the curve (i.e. there is no corresponding\n/// y value in the field that satisfies the curve equation), it may not be possible to reconstruct a `Point`.\n/// `Option::none()` is returned in such cases.\n///\n/// @param x - The x coordinate of the point @param sign - The \"sign\" of the y coordinate - determines whether y <=\n/// (Fr.MODULUS - 1) / 2\npub fn point_from_x_coord_and_sign(x: Field, sign: bool) -> Option<EmbeddedCurvePoint> {\n // y ^ 2 = x ^ 3 - 17\n let rhs = x * x * x - 17;\n\n sqrt(rhs).map(|y| {\n // If there is a square root, we need to ensure it has the correct \"sign\"\n let y_is_positive = !BN254_FR_MODULUS_DIV_2.lt(y);\n let final_y = if y_is_positive == sign { y } else { -y };\n EmbeddedCurvePoint { x, y: final_y }\n })\n}\n\nmod test {\n use crate::protocol::point::EmbeddedCurvePoint;\n use crate::utils::point::{\n BN254_FR_MODULUS_DIV_2, get_sign_of_point, point_from_x_coord, point_from_x_coord_and_sign,\n };\n\n #[test]\n unconstrained fn test_point_from_x_coord_and_sign() {\n // Test positive y coordinate\n let x = 0x1af41f5de96446dc3776a1eb2d98bb956b7acd9979a67854bec6fa7c2973bd73;\n let sign = true;\n let p = point_from_x_coord_and_sign(x, sign).unwrap();\n\n assert_eq(p.x, x);\n assert_eq(p.y, 0x07fc22c7f2c7057571f137fe46ea9c95114282bc95d37d71ec4bfb88de457d4a);\n assert_eq(p.is_infinite(), false);\n\n // Test negative y coordinate\n let x2 = 0x247371652e55dd74c9af8dbe9fb44931ba29a9229994384bd7077796c14ee2b5;\n let sign2 = false;\n let p2 = point_from_x_coord_and_sign(x2, sign2).unwrap();\n\n assert_eq(p2.x, x2);\n assert_eq(p2.y, 0x26441aec112e1ae4cee374f42556932001507ad46e255ffb27369c7e3766e5c0);\n assert_eq(p2.is_infinite(), false);\n }\n\n #[test]\n unconstrained fn test_point_from_x_coord_valid() {\n // x = 8 is a known quadratic residue - should give a valid point\n let result = point_from_x_coord(Field::from(8));\n assert(result.is_some());\n\n let point = result.unwrap();\n assert_eq(point.x, Field::from(8));\n // Check curve equation y^2 = x^3 - 17\n assert_eq(point.y * point.y, point.x * point.x * point.x - 17);\n }\n\n #[test]\n unconstrained fn test_point_from_x_coord_invalid() {\n // x = 3 is a non-residue for this curve - should give None\n let x = Field::from(3);\n let maybe_point = point_from_x_coord(x);\n assert(maybe_point.is_none());\n }\n\n #[test]\n unconstrained fn test_both_roots_satisfy_curve() {\n // Derive a point from x = 8 (known to be valid from test_point_from_x_coord_valid)\n let x: Field = 8;\n let point = point_from_x_coord(x).unwrap();\n\n // Check y satisfies curve equation\n assert_eq(point.y * point.y, x * x * x - 17);\n\n // Check -y also satisfies curve equation\n let neg_y = 0 - point.y;\n assert_eq(neg_y * neg_y, x * x * x - 17);\n\n // Verify they are different (unless y = 0)\n assert(point.y != neg_y);\n }\n\n #[test]\n unconstrained fn test_point_from_x_coord_and_sign_invalid() {\n // x = 3 has no valid point on the curve (from test_point_from_x_coord_invalid)\n let x = Field::from(3);\n let result_positive = point_from_x_coord_and_sign(x, true);\n let result_negative = point_from_x_coord_and_sign(x, false);\n\n assert(result_positive.is_none());\n assert(result_negative.is_none());\n }\n\n #[test]\n unconstrained fn test_get_sign_of_point() {\n // Derive a point from x = 8, then test both possible y values\n let point = point_from_x_coord(8).unwrap();\n let neg_point = EmbeddedCurvePoint { x: point.x, y: 0 - point.y };\n\n // One should be \"positive\" (y <= MOD_DIV_2) and one \"negative\"\n let sign1 = get_sign_of_point(point);\n let sign2 = get_sign_of_point(neg_point);\n assert(sign1 != sign2);\n\n // y = 0 should return true (0 <= MOD_DIV_2)\n let zero_y_point = EmbeddedCurvePoint { x: 0, y: 0 };\n assert(get_sign_of_point(zero_y_point) == true);\n\n // y = MOD_DIV_2 should return true (exactly at boundary)\n let boundary_point = EmbeddedCurvePoint { x: 0, y: BN254_FR_MODULUS_DIV_2 };\n assert(get_sign_of_point(boundary_point) == true);\n\n // y = MOD_DIV_2 + 1 should return false (just over boundary)\n let over_boundary_point = EmbeddedCurvePoint { x: 0, y: BN254_FR_MODULUS_DIV_2 + 1 };\n assert(get_sign_of_point(over_boundary_point) == false);\n }\n\n #[test]\n unconstrained fn test_point_from_x_coord_zero() {\n // x = 0: y^2 = 0^3 - 17 = -17, which is not a quadratic residue in BN254 scalar field\n let result = point_from_x_coord(0);\n assert(result.is_none());\n }\n\n #[test]\n unconstrained fn test_bn254_fr_modulus_div_2() {\n // Verify that BN254_FR_MODULUS_DIV_2 == (p - 1) / 2 This means: 2 * BN254_FR_MODULUS_DIV_2 + 1 == p == 0 (in\n // the field)\n assert_eq(2 * BN254_FR_MODULUS_DIV_2 + 1, 0);\n }\n\n}\n"
|
|
2438
2708
|
},
|
|
2439
2709
|
"296": {
|
|
@@ -2475,7 +2745,7 @@
|
|
|
2475
2745
|
"start": 4549
|
|
2476
2746
|
}
|
|
2477
2747
|
],
|
|
2478
|
-
"path": "/
|
|
2748
|
+
"path": "/home/nventuro/nargo/github.com/noir-lang/poseidon/v0.3.0/src/poseidon2.nr",
|
|
2479
2749
|
"source": "use std::default::Default;\nuse std::hash::Hasher;\n\nglobal RATE: u32 = 3;\n\npub struct Poseidon2 {\n cache: [Field; 3],\n state: [Field; 4],\n cache_size: u32,\n squeeze_mode: bool, // 0 => absorb, 1 => squeeze\n}\n\nimpl Poseidon2 {\n #[no_predicates]\n pub fn hash<let N: u32>(input: [Field; N], message_size: u32) -> Field {\n Poseidon2::hash_internal(input, message_size)\n }\n\n pub(crate) fn new(iv: Field) -> Poseidon2 {\n let mut result =\n Poseidon2 { cache: [0; 3], state: [0; 4], cache_size: 0, squeeze_mode: false };\n result.state[RATE] = iv;\n result\n }\n\n fn perform_duplex(&mut self) {\n // add the cache into sponge state\n self.state[0] += self.cache[0];\n self.state[1] += self.cache[1];\n self.state[2] += self.cache[2];\n self.state = crate::poseidon2_permutation(self.state);\n }\n\n fn absorb(&mut self, input: Field) {\n assert(!self.squeeze_mode);\n if self.cache_size == RATE {\n // If we're absorbing, and the cache is full, apply the sponge permutation to compress the cache\n self.perform_duplex();\n self.cache[0] = input;\n self.cache_size = 1;\n } else {\n // If we're absorbing, and the cache is not full, add the input into the cache\n self.cache[self.cache_size] = input;\n self.cache_size += 1;\n }\n }\n\n fn squeeze(&mut self) -> Field {\n assert(!self.squeeze_mode);\n // If we're in absorb mode, apply sponge permutation to compress the cache.\n self.perform_duplex();\n self.squeeze_mode = true;\n\n // Pop one item off the top of the permutation and return it.\n self.state[0]\n }\n\n fn hash_internal<let N: u32>(input: [Field; N], in_len: u32) -> Field {\n let two_pow_64 = 18446744073709551616;\n let iv: Field = (in_len as Field) * two_pow_64;\n let mut state = [0; 4];\n state[RATE] = iv;\n\n if std::runtime::is_unconstrained() {\n for i in 0..(in_len / RATE) {\n state[0] += input[i * RATE];\n state[1] += input[i * RATE + 1];\n state[2] += input[i * RATE + 2];\n state = crate::poseidon2_permutation(state);\n }\n\n // handle remaining elements after last full RATE-sized chunk\n let num_extra_fields = in_len % RATE;\n if num_extra_fields != 0 {\n let remainder_start = in_len - num_extra_fields;\n state[0] += input[remainder_start];\n if num_extra_fields > 1 {\n state[1] += input[remainder_start + 1];\n }\n }\n } else {\n let mut states: [[Field; 4]; N / RATE + 1] = [[0; 4]; N / RATE + 1];\n states[0] = state;\n\n // process all full RATE-sized chunks, storing state after each permutation\n for chunk_idx in 0..(N / RATE) {\n for i in 0..RATE {\n state[i] += input[chunk_idx * RATE + i];\n }\n state = crate::poseidon2_permutation(state);\n states[chunk_idx + 1] = state;\n }\n\n // get state at the last full block before in_len\n let first_partially_filled_chunk = in_len / RATE;\n state = states[first_partially_filled_chunk];\n\n // handle remaining elements after last full RATE-sized chunk\n let remainder_start = (in_len / RATE) * RATE;\n for j in 0..RATE {\n let idx = remainder_start + j;\n if idx < in_len {\n state[j] += input[idx];\n }\n }\n }\n\n // always run final permutation unless we just completed a full chunk\n // still need to permute once if in_len is 0\n if (in_len == 0) | (in_len % RATE != 0) {\n state = crate::poseidon2_permutation(state);\n };\n\n state[0]\n }\n}\n\npub struct Poseidon2Hasher {\n _state: [Field],\n}\n\nimpl Hasher for Poseidon2Hasher {\n fn finish(self) -> Field {\n let iv: Field = (self._state.len() as Field) * 18446744073709551616; // iv = (self._state.len() << 64)\n let mut sponge = Poseidon2::new(iv);\n for i in 0..self._state.len() {\n sponge.absorb(self._state[i]);\n }\n sponge.squeeze()\n }\n\n fn write(&mut self, input: Field) {\n self._state = self._state.push_back(input);\n }\n}\n\nimpl Default for Poseidon2Hasher {\n fn default() -> Self {\n Poseidon2Hasher { _state: @[] }\n }\n}\n"
|
|
2480
2750
|
},
|
|
2481
2751
|
"3": {
|
|
@@ -2695,9 +2965,99 @@
|
|
|
2695
2965
|
"start": 3427
|
|
2696
2966
|
}
|
|
2697
2967
|
],
|
|
2698
|
-
"path": "/
|
|
2968
|
+
"path": "/home/nventuro/pkg-1/noir-projects/noir-protocol-circuits/crates/types/src/abis/block_header.nr",
|
|
2699
2969
|
"source": "use crate::{\n abis::{\n append_only_tree_snapshot::AppendOnlyTreeSnapshot, global_variables::GlobalVariables,\n state_reference::StateReference,\n },\n constants::{BLOCK_HEADER_LENGTH, DOM_SEP__BLOCK_HEADER_HASH, GENESIS_BLOCK_HEADER_HASH},\n hash::poseidon2_hash_with_separator,\n traits::{Deserialize, Empty, Hash, Serialize},\n};\nuse std::meta::derive;\n\n// docs:start:block-header\n#[derive(Deserialize, Eq, Serialize)]\npub struct BlockHeader {\n pub last_archive: AppendOnlyTreeSnapshot,\n pub state: StateReference,\n\n // The hash of the sponge blob for this block, which commits to the tx effects added in this block.\n // Note: it may also include tx effects from previous blocks within the same checkpoint.\n // When proving tx effects from this block only, we must refer to the `sponge_blob_hash` in the previous block\n // header to show that the effect was added after the previous block.\n // The previous block header can be validated using a membership proof of the last leaf in `last_archive`.\n pub sponge_blob_hash: Field,\n\n pub global_variables: GlobalVariables,\n pub total_fees: Field,\n pub total_mana_used: Field,\n}\n// docs:end:block-header\n\nimpl BlockHeader {\n pub fn chain_id(self) -> Field {\n self.global_variables.chain_id\n }\n\n pub fn version(self) -> Field {\n self.global_variables.version\n }\n\n pub fn block_number(self) -> u32 {\n self.global_variables.block_number\n }\n\n pub fn timestamp(self) -> u64 {\n self.global_variables.timestamp\n }\n}\n\nimpl Empty for BlockHeader {\n fn empty() -> Self {\n Self {\n last_archive: AppendOnlyTreeSnapshot::empty(),\n state: StateReference::empty(),\n sponge_blob_hash: 0,\n global_variables: GlobalVariables::empty(),\n total_fees: 0,\n total_mana_used: 0,\n }\n }\n}\n\nimpl Hash for BlockHeader {\n fn hash(self) -> Field {\n poseidon2_hash_with_separator(self.serialize(), DOM_SEP__BLOCK_HEADER_HASH)\n }\n}\n\n#[test]\nfn serialization_of_empty() {\n let header = BlockHeader::empty();\n // We use the BLOCK_HEADER_LENGTH constant to ensure that there is a match\n // between the derived trait implementation and the constant.\n let serialized: [Field; BLOCK_HEADER_LENGTH] = header.serialize();\n let deserialized = BlockHeader::deserialize(serialized);\n assert(header.eq(deserialized));\n}\n\n#[test]\nfn hash_of_genesis_block_header() {\n let mut header = BlockHeader::empty();\n // The following values are taken from world_state.test.cpp > WorldStateTest.GetInitialTreeInfoForAllTrees.\n header.state.l1_to_l2_message_tree.root =\n 0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a;\n header.state.partial.note_hash_tree.root =\n 0x2590f2aab19dd791700b4a43d3f52bb88ef2409a3731da8e848663559202e4c6;\n header.state.partial.nullifier_tree.root =\n 0x18935581a8ed73d08ffd00386fba55ba6c89f3ab848a76b8fedfa9034cee0454;\n header.state.partial.nullifier_tree.next_available_leaf_index = 128;\n header.state.partial.public_data_tree.root =\n 0x1bef38b621017d3c7416663d0cd81369424560710526a3fbaaec13e356b9d084;\n header.state.partial.public_data_tree.next_available_leaf_index = 128;\n\n let hash = header.hash();\n assert_eq(hash, GENESIS_BLOCK_HEADER_HASH);\n}\n\n#[test]\nfn hash_of_empty_block_header_match_typescript() {\n let header = BlockHeader::empty();\n let hash = header.hash();\n\n // Value from block_header.test.ts \"computes empty hash\" test\n let test_data_empty_hash = 0x0bdc537052dea0f80db9698585dff9f32063b86b6d4934ac17c30c81e8e416d3;\n assert_eq(hash, test_data_empty_hash);\n}\n"
|
|
2700
2970
|
},
|
|
2971
|
+
"354": {
|
|
2972
|
+
"function_locations": [
|
|
2973
|
+
{
|
|
2974
|
+
"name": "<impl Empty for AztecAddress>::empty",
|
|
2975
|
+
"start": 853
|
|
2976
|
+
},
|
|
2977
|
+
{
|
|
2978
|
+
"name": "<impl ToField for AztecAddress>::to_field",
|
|
2979
|
+
"start": 953
|
|
2980
|
+
},
|
|
2981
|
+
{
|
|
2982
|
+
"name": "<impl FromField for AztecAddress>::from_field",
|
|
2983
|
+
"start": 1065
|
|
2984
|
+
},
|
|
2985
|
+
{
|
|
2986
|
+
"name": "AztecAddress::zero",
|
|
2987
|
+
"start": 1160
|
|
2988
|
+
},
|
|
2989
|
+
{
|
|
2990
|
+
"name": "AztecAddress::is_valid",
|
|
2991
|
+
"start": 1490
|
|
2992
|
+
},
|
|
2993
|
+
{
|
|
2994
|
+
"name": "AztecAddress::to_address_point",
|
|
2995
|
+
"start": 1865
|
|
2996
|
+
},
|
|
2997
|
+
{
|
|
2998
|
+
"name": "AztecAddress::is_positive",
|
|
2999
|
+
"start": 2511
|
|
3000
|
+
},
|
|
3001
|
+
{
|
|
3002
|
+
"name": "AztecAddress::get_y",
|
|
3003
|
+
"start": 3367
|
|
3004
|
+
},
|
|
3005
|
+
{
|
|
3006
|
+
"name": "AztecAddress::compute",
|
|
3007
|
+
"start": 3753
|
|
3008
|
+
},
|
|
3009
|
+
{
|
|
3010
|
+
"name": "AztecAddress::compute_from_class_id",
|
|
3011
|
+
"start": 7944
|
|
3012
|
+
},
|
|
3013
|
+
{
|
|
3014
|
+
"name": "AztecAddress::is_zero",
|
|
3015
|
+
"start": 8216
|
|
3016
|
+
},
|
|
3017
|
+
{
|
|
3018
|
+
"name": "AztecAddress::assert_is_zero",
|
|
3019
|
+
"start": 8281
|
|
3020
|
+
},
|
|
3021
|
+
{
|
|
3022
|
+
"name": "check_max_field_value",
|
|
3023
|
+
"start": 8365
|
|
3024
|
+
},
|
|
3025
|
+
{
|
|
3026
|
+
"name": "check_is_positive",
|
|
3027
|
+
"start": 8476
|
|
3028
|
+
},
|
|
3029
|
+
{
|
|
3030
|
+
"name": "check_embedded_curve_point_add",
|
|
3031
|
+
"start": 8997
|
|
3032
|
+
},
|
|
3033
|
+
{
|
|
3034
|
+
"name": "compute_address_from_partial_and_pub_keys",
|
|
3035
|
+
"start": 9262
|
|
3036
|
+
},
|
|
3037
|
+
{
|
|
3038
|
+
"name": "compute_preaddress_from_partial_and_pub_keys",
|
|
3039
|
+
"start": 11366
|
|
3040
|
+
},
|
|
3041
|
+
{
|
|
3042
|
+
"name": "from_field_to_field",
|
|
3043
|
+
"start": 11715
|
|
3044
|
+
},
|
|
3045
|
+
{
|
|
3046
|
+
"name": "serde",
|
|
3047
|
+
"start": 11852
|
|
3048
|
+
},
|
|
3049
|
+
{
|
|
3050
|
+
"name": "to_address_point_valid",
|
|
3051
|
+
"start": 12258
|
|
3052
|
+
},
|
|
3053
|
+
{
|
|
3054
|
+
"name": "to_address_point_invalid",
|
|
3055
|
+
"start": 12908
|
|
3056
|
+
}
|
|
3057
|
+
],
|
|
3058
|
+
"path": "/home/nventuro/pkg-1/noir-projects/noir-protocol-circuits/crates/types/src/address/aztec_address.nr",
|
|
3059
|
+
"source": "use crate::{\n address::{\n partial_address::PartialAddress, salted_initialization_hash::SaltedInitializationHash,\n },\n constants::{AZTEC_ADDRESS_LENGTH, DOM_SEP__CONTRACT_ADDRESS_V2, MAX_FIELD_VALUE},\n contract_class_id::ContractClassId,\n hash::poseidon2_hash_with_separator,\n public_keys::{hash_public_key, IvpkM, PublicKeys, ToPoint},\n traits::{Deserialize, Empty, FromField, Packable, Serialize, ToField},\n utils::field::sqrt,\n};\n\nuse crate::point::EmbeddedCurvePoint;\n\nuse crate::public_keys::AddressPoint;\nuse std::{\n embedded_curve_ops::{EmbeddedCurveScalar, fixed_base_scalar_mul as derive_public_key},\n ops::Add,\n};\nuse std::meta::derive;\n\n// Aztec address\n#[derive(Deserialize, Eq, Packable, Serialize)]\npub struct AztecAddress {\n pub inner: Field,\n}\n\nimpl Empty for AztecAddress {\n fn empty() -> Self {\n Self { inner: 0 }\n }\n}\n\nimpl ToField for AztecAddress {\n fn to_field(self) -> Field {\n self.inner\n }\n}\n\nimpl FromField for AztecAddress {\n fn from_field(value: Field) -> AztecAddress {\n AztecAddress { inner: value }\n }\n}\n\nimpl AztecAddress {\n pub fn zero() -> Self {\n Self { inner: 0 }\n }\n\n /// Returns `true` if the address is valid.\n ///\n /// An invalid address is one that can be proven to not be correctly derived, meaning it contains no contract code,\n /// public keys, etc., and can therefore not receive messages nor execute calls.\n pub fn is_valid(self) -> bool {\n self.get_y().is_some()\n }\n\n /// Returns an address's [`AddressPoint`].\n ///\n /// This can be used to create shared secrets with the owner of the address. If the address is invalid (see\n /// [`AztecAddress::is_valid`]) then this returns `Option::none()`, and no shared secrets can be created.\n pub fn to_address_point(self) -> Option<AddressPoint> {\n self.get_y().map(|y| {\n // If we get a negative y coordinate (y > (r - 1) / 2), we swap it to the\n // positive one (where y <= (r - 1) / 2) by negating it.\n let final_y = if Self::is_positive(y) { y } else { -y };\n\n AddressPoint { inner: EmbeddedCurvePoint { x: self.inner, y: final_y } }\n })\n }\n\n /// Determines whether a y-coordinate is in the lower (positive) or upper (negative) \"half\" of the field.\n /// I.e.\n /// y <= (r - 1)/2 => positive.\n /// y > (r - 1)/2 => negative.\n /// An AddressPoint always uses the \"positive\" y.\n fn is_positive(y: Field) -> bool {\n // Note: The field modulus r is MAX_FIELD_VALUE + 1.\n let MID = MAX_FIELD_VALUE / 2; // (r - 1) / 2\n let MID_PLUS_1 = MID + 1; // (r - 1)/2 + 1\n // Note: y <= m implies y < m + 1.\n y.lt(MID_PLUS_1)\n }\n\n /// Returns one of the two possible y-coordinates.\n ///\n /// Not all `AztecAddresses` are valid, in which case there is no corresponding y-coordinate. This returns\n /// `Option::none()` for invalid addresses.\n ///\n /// An `AztecAddress` is defined by an x-coordinate, for which two y-coordinates exist as solutions to the curve\n /// equation. This function returns either of them. Note that an [`AddressPoint`] must **always** have a positive\n /// y-coordinate - if trying to obtain the underlying point use [`AztecAddress::to_address_point`] instead.\n fn get_y(self) -> Option<Field> {\n // We compute the address point by taking our address as x, and then solving for y in the\n // equation which defines the grumpkin curve:\n // y^2 = x^3 - 17; x = address\n let x = self.inner;\n let y_squared = x * x * x - 17;\n\n sqrt(y_squared)\n }\n\n pub fn compute(public_keys: PublicKeys, partial_address: PartialAddress) -> AztecAddress {\n //\n // address = address_point.x\n // |\n // address_point = pre_address * G + Ivpk_m (always choose \"positive\" y-coord)\n // | ^\n // | |.....................\n // pre_address .\n // / \\ .\n // / \\ .\n // partial_address public_keys_hash .\n // / \\ / / | | | \\ .\n // / \\ / / | | | \\ .\n // npk_m_hash Ivpk_m ovpk_m_hash tpk_m_hash mspk_m_hash fbpk_m_hash\n // contract_class_id \\ |.........................\n // / | \\ \\\n // artifact_hash | public_bytecode_commitment salted_initialization_hash\n // | / / \\ \\\n // private_function_tree_root salt initialization_hash deployer_address immutables_hash\n // / \\ / \\\n // ... ... constructor_fn_selector constructor_args_hash\n // / \\\n // / \\ / \\\n // leaf leaf leaf leaf\n // ^\n // |\n // |---h(function_selector, vk_hash)\n // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n // Each of these represents a private function of the contract.\n\n let public_keys_hash = public_keys.hash();\n\n let pre_address = poseidon2_hash_with_separator(\n [public_keys_hash.to_field(), partial_address.to_field()],\n DOM_SEP__CONTRACT_ADDRESS_V2,\n );\n\n // Note: `.add()` will fail within the blackbox fn if either of the points are not on the curve. (See tests below).\n let address_point = derive_public_key(EmbeddedCurveScalar::from_field(pre_address)).add(\n public_keys.ivpk_m.to_point(),\n );\n\n // Note that our address is only the x-coordinate of the full address_point. This is okay because when people want to encrypt something and send it to us\n // they can recover our full point using the x-coordinate (our address itself). To do this, they recompute the y-coordinate according to the equation y^2 = x^3 - 17.\n // When they do this, they may get a positive y-coordinate (a value that is less than or equal to MAX_FIELD_VALUE / 2) or\n // a negative y-coordinate (a value that is more than MAX_FIELD_VALUE), and we cannot dictate which one they get and hence the recovered point may sometimes be different than the one\n // our secret can decrypt. Regardless though, they should and will always encrypt using point with the positive y-coordinate by convention.\n // This ensures that everyone encrypts to the same point given an arbitrary x-coordinate (address). This is allowed because even though our original point may not have a positive y-coordinate,\n // with our original secret, we will be able to derive the secret to the point with the flipped (and now positive) y-coordinate that everyone encrypts to.\n AztecAddress::from_field(address_point.x)\n }\n\n pub fn compute_from_class_id(\n contract_class_id: ContractClassId,\n salted_initialization_hash: SaltedInitializationHash,\n public_keys: PublicKeys,\n ) -> Self {\n let partial_address = PartialAddress::compute_from_salted_initialization_hash(\n contract_class_id,\n salted_initialization_hash,\n );\n\n AztecAddress::compute(public_keys, partial_address)\n }\n\n pub fn is_zero(self) -> bool {\n self.inner == 0\n }\n\n pub fn assert_is_zero(self) {\n assert(self.to_field() == 0);\n }\n}\n\n#[test]\nfn check_max_field_value() {\n // Check that it is indeed r-1.\n assert_eq(MAX_FIELD_VALUE + 1, 0);\n}\n\n#[test]\nfn check_is_positive() {\n assert(AztecAddress::is_positive(0));\n assert(AztecAddress::is_positive(1));\n assert(!AztecAddress::is_positive(-1));\n assert(AztecAddress::is_positive(MAX_FIELD_VALUE / 2));\n assert(!AztecAddress::is_positive((MAX_FIELD_VALUE / 2) + 1));\n}\n\n// Gives us confidence that we don't need to manually check that the input public keys need to be on the curve for `add`,\n// because the blackbox function does this check for us.\n#[test(should_fail_with = \"is not on curve\")]\nfn check_embedded_curve_point_add() {\n // Choose a point not on the curve in the 2nd position.\n let p1 = EmbeddedCurvePoint::generator();\n let key = IvpkM { inner: EmbeddedCurvePoint { x: 1, y: 1 } };\n let _ = p1 + key.to_point();\n}\n\n#[test]\nfn compute_address_from_partial_and_pub_keys() {\n let npk_m_point = EmbeddedCurvePoint {\n x: 0x22f7fcddfa3ce3e8f0cc8e82d7b94cdd740afa3e77f8e4a63ea78a239432dcab,\n y: 0x0471657de2b6216ade6c506d28fbc22ba8b8ed95c871ad9f3e3984e90d9723a7,\n };\n let ovpk_m_point = EmbeddedCurvePoint {\n x: 0x09115c96e962322ffed6522f57194627136b8d03ac7469109707f5e44190c484,\n y: 0x0c49773308a13d740a7f0d4f0e6163b02c5a408b6f965856b6a491002d073d5b,\n };\n let tpk_m_point = EmbeddedCurvePoint {\n x: 0x00d3d81beb009873eb7116327cf47c612d5758ef083d4fda78e9b63980b2a762,\n y: 0x2f567d22d2b02fe1f4ad42db9d58a36afd1983e7e2909d1cab61cafedad6193a,\n };\n let mspk_m_point = EmbeddedCurvePoint {\n x: 0x1bd6cb13e0bc8c6e0c1a8b2c5d7f9e0a4b6c8d0e2f4a6c8e0a2c4e6f8a0b2c4d,\n y: 0x0a032ec7b21c2bdb35f8a13e594764e39ee786c4b275eef3f0435bf6ab2b9822,\n };\n let fbpk_m_point = EmbeddedCurvePoint {\n x: 0x2c8e0a2c4e6f8b0d2f4a6c8e0a2c4e6f8b0d2f4a6c8e0a2c4e6f8b0d2f4a6c90,\n y: 0x2ef338da3a77e65f90b6d48ac686fc9ff3a95de0c39e0426fc443377425e6634,\n };\n\n let public_keys = PublicKeys {\n npk_m_hash: hash_public_key(npk_m_point),\n ivpk_m: IvpkM {\n inner: EmbeddedCurvePoint {\n x: 0x111223493147f6785514b1c195bb37a2589f22a6596d30bb2bb145fdc9ca8f1e,\n y: 0x273bbffd678edce8fe30e0deafc4f66d58357c06fd4a820285294b9746c3be95,\n },\n },\n ovpk_m_hash: hash_public_key(ovpk_m_point),\n tpk_m_hash: hash_public_key(tpk_m_point),\n mspk_m_hash: hash_public_key(mspk_m_point),\n fbpk_m_hash: hash_public_key(fbpk_m_point),\n };\n\n let partial_address = PartialAddress::from_field(\n 0x0a7c585381b10f4666044266a02405bf6e01fa564c8517d4ad5823493abd31de,\n );\n\n let address = AztecAddress::compute(public_keys, partial_address).to_field();\n\n let expected_computed_address_from_partial_and_pubkeys =\n 0x303ffc8bd456d132463b1fc3a633aeb718a7883c268f3956c05e6fe09b5a5424;\n assert_eq(address, expected_computed_address_from_partial_and_pubkeys);\n}\n\n#[test]\nfn compute_preaddress_from_partial_and_pub_keys() {\n let pre_address = poseidon2_hash_with_separator([1, 2], DOM_SEP__CONTRACT_ADDRESS_V2);\n let expected_computed_preaddress_from_partial_and_pubkey =\n 0x0fa1c698858df1a99170cd39d5f4bfad6d0d60f1f8afa3dc92281ee60b36f3bb;\n assert(pre_address == expected_computed_preaddress_from_partial_and_pubkey);\n}\n\n#[test]\nfn from_field_to_field() {\n let address = AztecAddress { inner: 37 };\n assert_eq(FromField::from_field(address.to_field()), address);\n}\n\n#[test]\nfn serde() {\n let address = AztecAddress { inner: 37 };\n // We use the AZTEC_ADDRESS_LENGTH constant to ensure that there is a match between the derived trait\n // implementation and the constant.\n let serialized: [Field; AZTEC_ADDRESS_LENGTH] = address.serialize();\n let deserialized = AztecAddress::deserialize(serialized);\n assert_eq(address, deserialized);\n}\n\n#[test]\nfn to_address_point_valid() {\n // x = 8 where x^3 - 17 = 512 - 17 = 495, which is a residue in this field\n let address = AztecAddress { inner: 8 };\n\n assert(address.get_y().is_some()); // We don't bother checking the result of get_y as it is only used internally\n assert(address.is_valid());\n\n let maybe_point = address.to_address_point();\n assert(maybe_point.is_some());\n\n let point = maybe_point.unwrap().inner;\n // check that x is preserved\n assert_eq(point.x, Field::from(8));\n\n // check that the curve equation holds: y^2 == x^3 - 17\n assert_eq(point.y * point.y, point.x * point.x * point.x - 17);\n}\n\n#[test]\nfn to_address_point_invalid() {\n // x = 3 where x^3 - 17 = 27 - 17 = 10, which is a non-residue in this field\n let address = AztecAddress { inner: 3 };\n\n assert(address.get_y().is_none());\n assert(!address.is_valid());\n\n assert(address.to_address_point().is_none());\n}\n"
|
|
3060
|
+
},
|
|
2701
3061
|
"385": {
|
|
2702
3062
|
"function_locations": [
|
|
2703
3063
|
{
|
|
@@ -2817,7 +3177,7 @@
|
|
|
2817
3177
|
"start": 16359
|
|
2818
3178
|
}
|
|
2819
3179
|
],
|
|
2820
|
-
"path": "/
|
|
3180
|
+
"path": "/home/nventuro/pkg-1/noir-projects/noir-protocol-circuits/crates/types/src/hash.nr",
|
|
2821
3181
|
"source": "mod poseidon2_chunks;\n\nuse crate::{\n abis::{\n contract_class_function_leaf_preimage::ContractClassFunctionLeafPreimage,\n function_selector::FunctionSelector, nullifier::Nullifier, private_log::PrivateLog,\n transaction::tx_request::TxRequest,\n },\n address::{AztecAddress, EthAddress},\n constants::{\n CONTRACT_CLASS_LOG_SIZE_IN_FIELDS, DOM_SEP__NOTE_HASH_NONCE,\n DOM_SEP__PRIVATE_LOG_FIRST_FIELD, DOM_SEP__SILOED_NOTE_HASH, DOM_SEP__SILOED_NULLIFIER,\n DOM_SEP__UNIQUE_NOTE_HASH, FUNCTION_TREE_HEIGHT, NULL_MSG_SENDER_CONTRACT_ADDRESS,\n TWO_POW_64,\n },\n merkle_tree::root_from_sibling_path,\n messaging::l2_to_l1_message::L2ToL1Message,\n poseidon2::Poseidon2Sponge,\n side_effect::{Counted, Scoped},\n traits::{FromField, Hash, ToField},\n utils::field::{field_from_bytes, field_from_bytes_32_trunc},\n};\n\npub use poseidon2_chunks::poseidon2_absorb_in_chunks_existing_sponge;\nuse poseidon2_chunks::poseidon2_absorb_in_chunks;\nuse std::embedded_curve_ops::EmbeddedCurveScalar;\n\n// TODO: refactor these into their own files: sha256, poseidon2, some protocol-specific hash computations, some merkle computations.\n\npub fn sha256_to_field<let N: u32>(bytes_to_hash: [u8; N]) -> Field {\n let sha256_hashed = sha256::digest(bytes_to_hash);\n let hash_in_a_field = field_from_bytes_32_trunc(sha256_hashed);\n\n hash_in_a_field\n}\n\npub fn private_functions_root_from_siblings(\n selector: FunctionSelector,\n vk_hash: Field,\n function_leaf_index: Field,\n function_leaf_sibling_path: [Field; FUNCTION_TREE_HEIGHT],\n) -> Field {\n let function_leaf_preimage = ContractClassFunctionLeafPreimage { selector, vk_hash };\n let function_leaf = function_leaf_preimage.hash();\n root_from_sibling_path(\n function_leaf,\n function_leaf_index,\n function_leaf_sibling_path,\n )\n}\n\n/// Siloing in the context of Aztec refers to the process of hashing a note hash with a contract address (this way\n/// the note hash is scoped to a specific contract). This is used to prevent intermingling of notes between contracts.\npub fn compute_siloed_note_hash(contract_address: AztecAddress, note_hash: Field) -> Field {\n poseidon2_hash_with_separator(\n [contract_address.to_field(), note_hash],\n DOM_SEP__SILOED_NOTE_HASH,\n )\n}\n\n/// Computes unique, siloed note hashes from siloed note hashes.\n///\n/// The protocol injects uniqueness into every note_hash, so that every single note_hash in the\n/// tree is unique. This prevents faerie gold attacks, where a malicious sender could create\n/// two identical note_hashes for a recipient (meaning only one would be nullifiable in future).\n///\n/// Most privacy protocols will inject the note's leaf_index (its position in the Note Hashes Tree)\n/// into the note, but this requires the creator of a note to wait until their tx is included in\n/// a block to know the note's final note hash (the unique, siloed note hash), because inserting\n/// leaves into trees is the job of a block producer.\n///\n/// We took a different approach so that the creator of a note will know each note's unique, siloed\n/// note hash before broadcasting their tx to the network.\n/// (There was also a historical requirement relating to \"chained transactions\" -- a feature that\n/// Aztec Connect had to enable notes to be spent from distinct txs earlier in the same block,\n/// and hence before an archive block root had been established for that block -- but that feature\n/// was abandoned for the Aztec Network for having too many bad tradeoffs).\n///\n/// (\n/// Edit: it is no longer true that all final note_hashes will be known by the creator of a tx\n/// before they send it to the network. If a tx makes public function calls, then _revertible_\n/// note_hashes that are created in private will not be made unique in private by the Reset circuit,\n/// but will instead be made unique by the AVM, because the `note_index_in_tx` will not be known\n/// until the AVM has executed the public functions of the tx. (See an explanation in\n/// reset_output_composer.nr for why).\n/// For some such txs, the `note_index_in_tx` might still be predictable through simulation, but\n/// for txs whose public functions create a varying number of non-revertible notes (determined at\n/// runtime), the `note_index_in_tx` will not be deterministically derivable before submitting the\n/// tx to the network.\n/// )\n///\n/// We use the `first_nullifier` of a tx as a seed of uniqueness. We have a guarantee that there will\n/// always be at least one nullifier per tx, because the init circuit will create one if one isn't\n/// created naturally by any functions of the tx. (Search \"protocol_nullifier\").\n/// We combine the `first_nullifier` with the note's index (its position within this tx's new\n/// note_hashes array) (`note_index_in_tx`) to get a truly unique value to inject into a note, which\n/// we call a `note_nonce`.\npub fn compute_unique_note_hash(note_nonce: Field, siloed_note_hash: Field) -> Field {\n let inputs = [note_nonce, siloed_note_hash];\n poseidon2_hash_with_separator(inputs, DOM_SEP__UNIQUE_NOTE_HASH)\n}\n\npub fn compute_note_hash_nonce(first_nullifier_in_tx: Field, note_index_in_tx: u32) -> Field {\n // Hashing the first nullifier with note index in tx is guaranteed to be unique (because all nullifiers are also\n // unique).\n poseidon2_hash_with_separator(\n [first_nullifier_in_tx, note_index_in_tx as Field],\n DOM_SEP__NOTE_HASH_NONCE,\n )\n}\n\npub fn compute_note_nonce_and_unique_note_hash(\n siloed_note_hash: Field,\n first_nullifier: Field,\n note_index_in_tx: u32,\n) -> Field {\n let note_nonce = compute_note_hash_nonce(first_nullifier, note_index_in_tx);\n compute_unique_note_hash(note_nonce, siloed_note_hash)\n}\n\npub fn compute_siloed_nullifier(contract_address: AztecAddress, nullifier: Field) -> Field {\n poseidon2_hash_with_separator(\n [contract_address.to_field(), nullifier],\n DOM_SEP__SILOED_NULLIFIER,\n )\n}\n\npub fn create_protocol_nullifier(tx_request: TxRequest) -> Scoped<Counted<Nullifier>> {\n // The protocol nullifier is ascribed a special side-effect counter of 1. No other side-effect\n // can have counter 1 (see `validate_as_first_call` for that assertion).\n Nullifier { value: tx_request.hash(), note_hash: 0 }.count(1).scope(\n NULL_MSG_SENDER_CONTRACT_ADDRESS,\n )\n}\n\npub fn compute_log_tag(raw_tag: Field, dom_sep: u32) -> Field {\n poseidon2_hash_with_separator([raw_tag], dom_sep)\n}\n\npub fn compute_siloed_private_log_first_field(\n contract_address: AztecAddress,\n field: Field,\n) -> Field {\n poseidon2_hash_with_separator(\n [contract_address.to_field(), field],\n DOM_SEP__PRIVATE_LOG_FIRST_FIELD,\n )\n}\n\npub fn compute_siloed_private_log(contract_address: AztecAddress, log: PrivateLog) -> PrivateLog {\n let mut fields = log.fields;\n fields[0] = compute_siloed_private_log_first_field(contract_address, fields[0]);\n PrivateLog::new(fields, log.length)\n}\n\npub fn compute_contract_class_log_hash(log: [Field; CONTRACT_CLASS_LOG_SIZE_IN_FIELDS]) -> Field {\n poseidon2_hash(log)\n}\n\npub fn compute_app_siloed_secret_key(\n master_secret_key: EmbeddedCurveScalar,\n app_address: AztecAddress,\n key_type_domain_separator: Field,\n) -> Field {\n poseidon2_hash_with_separator(\n [master_secret_key.hi, master_secret_key.lo, app_address.to_field()],\n key_type_domain_separator,\n )\n}\n\npub fn compute_l2_to_l1_message_hash(\n message: Scoped<L2ToL1Message>,\n rollup_version_id: Field,\n chain_id: Field,\n) -> Field {\n let contract_address_bytes: [u8; 32] = message.contract_address.to_field().to_be_bytes();\n let recipient_bytes: [u8; 20] = message.inner.recipient.to_be_bytes();\n let content_bytes: [u8; 32] = message.inner.content.to_be_bytes();\n let rollup_version_id_bytes: [u8; 32] = rollup_version_id.to_be_bytes();\n let chain_id_bytes: [u8; 32] = chain_id.to_be_bytes();\n\n let mut bytes: [u8; 148] = std::mem::zeroed();\n for i in 0..32 {\n bytes[i] = contract_address_bytes[i];\n bytes[i + 32] = rollup_version_id_bytes[i];\n // 64 - 84 are for recipient.\n bytes[i + 84] = chain_id_bytes[i];\n bytes[i + 116] = content_bytes[i];\n }\n\n for i in 0..20 {\n bytes[64 + i] = recipient_bytes[i];\n }\n\n sha256_to_field(bytes)\n}\n\n// TODO: consider a variant that enables domain separation with a u32 (we seem to have standardised u32s for domain separators)\n/// Computes sha256 hash of 2 input fields.\n///\n/// @returns A truncated field (i.e., the first byte is always 0).\npub fn accumulate_sha256(v0: Field, v1: Field) -> Field {\n // Concatenate two fields into 32 x 2 = 64 bytes\n let v0_as_bytes: [u8; 32] = v0.to_be_bytes();\n let v1_as_bytes: [u8; 32] = v1.to_be_bytes();\n let hash_input_flattened = v0_as_bytes.concat(v1_as_bytes);\n\n sha256_to_field(hash_input_flattened)\n}\n\npub fn poseidon2_hash<let N: u32>(inputs: [Field; N]) -> Field {\n poseidon::poseidon2::Poseidon2::hash(inputs, N)\n}\n\n#[no_predicates]\npub fn poseidon2_hash_with_separator<let N: u32, T>(inputs: [Field; N], separator: T) -> Field\nwhere\n T: ToField,\n{\n let inputs_with_separator = [separator.to_field()].concat(inputs);\n poseidon2_hash(inputs_with_separator)\n}\n\n/// Computes a Poseidon2 hash over a dynamic-length subarray of the given input.\n/// Only the first `in_len` fields of `input` are absorbed; any remaining fields are ignored.\n/// The caller is responsible for ensuring that the input is padded with zeros if required.\n#[no_predicates]\npub fn poseidon2_hash_subarray<let N: u32>(input: [Field; N], in_len: u32) -> Field {\n let mut sponge = poseidon2_absorb_in_chunks(input, in_len);\n sponge.squeeze()\n}\n\n// This function is unconstrained because it is intended to be used in unconstrained context only as\n// in constrained contexts it would be too inefficient.\npub unconstrained fn poseidon2_hash_with_separator_bounded_vec<let N: u32, T>(\n inputs: BoundedVec<Field, N>,\n separator: T,\n) -> Field\nwhere\n T: ToField,\n{\n let in_len = inputs.len() + 1;\n let iv: Field = (in_len as Field) * TWO_POW_64;\n let mut sponge = Poseidon2Sponge::new(iv);\n sponge.absorb(separator.to_field());\n\n for i in 0..inputs.len() {\n sponge.absorb(inputs.get(i));\n }\n\n sponge.squeeze()\n}\n\n#[no_predicates]\npub fn poseidon2_hash_bytes<let N: u32>(inputs: [u8; N]) -> Field {\n let mut fields = [0; (N + 30) / 31];\n let mut field_index = 0;\n let mut current_field = [0; 31];\n for i in 0..inputs.len() {\n let index = i % 31;\n current_field[index] = inputs[i];\n if index == 30 {\n fields[field_index] = field_from_bytes(current_field, false);\n current_field = [0; 31];\n field_index += 1;\n }\n }\n if field_index != fields.len() {\n fields[field_index] = field_from_bytes(current_field, false);\n }\n poseidon2_hash(fields)\n}\n\n#[test]\nfn subarray_hash_matches_fixed() {\n let values_to_hash = [3; 17];\n let padded = values_to_hash.concat([0; 11]);\n let subarray_hash = poseidon2_hash_subarray(padded, values_to_hash.len());\n\n // Hash the entire values_to_hash.\n let fixed_len_hash = poseidon::poseidon2::Poseidon2::hash(values_to_hash, values_to_hash.len());\n\n assert_eq(subarray_hash, fixed_len_hash);\n}\n\n#[test]\nfn subarray_hash_matches_variable() {\n let values_to_hash = [3; 17];\n let padded = values_to_hash.concat([0; 11]);\n let subarray_hash = poseidon2_hash_subarray(padded, values_to_hash.len());\n\n // Hash up to values_to_hash.len() fields of the padded array.\n let variable_len_hash = poseidon::poseidon2::Poseidon2::hash(padded, values_to_hash.len());\n\n assert_eq(subarray_hash, variable_len_hash);\n}\n\n#[test]\nfn smoke_sha256_to_field() {\n let full_buffer = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,\n 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,\n 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,\n 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,\n 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,\n 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,\n 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,\n 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,\n ];\n let result = sha256_to_field(full_buffer);\n\n assert(result == 0x448ebbc9e1a31220a2f3830c18eef61b9bd070e5084b7fa2a359fe729184c7);\n\n // to show correctness of the current ver (truncate one byte) vs old ver (mod full bytes):\n let result_bytes = sha256::digest(full_buffer);\n let truncated_field = crate::utils::field::field_from_bytes_32_trunc(result_bytes);\n assert(truncated_field == result);\n let mod_res = result + (result_bytes[31] as Field);\n assert(mod_res == 0x448ebbc9e1a31220a2f3830c18eef61b9bd070e5084b7fa2a359fe729184e0);\n}\n\n#[test]\nfn unique_siloed_note_hash_matches_typescript() {\n let inner_note_hash = 1;\n let contract_address = AztecAddress::from_field(2);\n let first_nullifier = 3;\n let note_index_in_tx = 4;\n\n let siloed_note_hash = compute_siloed_note_hash(contract_address, inner_note_hash);\n let siloed_note_hash_from_ts =\n 0x1986a4bea3eddb1fff917d629a13e10f63f514f401bdd61838c6b475db949169;\n assert_eq(siloed_note_hash, siloed_note_hash_from_ts);\n\n let nonce: Field = compute_note_hash_nonce(first_nullifier, note_index_in_tx);\n let note_hash_nonce_from_ts =\n 0x28e7799791bf066a57bb51fdd0fbcaf3f0926414314c7db515ea343f44f5d58b;\n assert_eq(nonce, note_hash_nonce_from_ts);\n\n let unique_siloed_note_hash_from_nonce = compute_unique_note_hash(nonce, siloed_note_hash);\n let unique_siloed_note_hash = compute_note_nonce_and_unique_note_hash(\n siloed_note_hash,\n first_nullifier,\n note_index_in_tx,\n );\n assert_eq(unique_siloed_note_hash_from_nonce, unique_siloed_note_hash);\n\n let unique_siloed_note_hash_from_ts =\n 0x29949aef207b715303b24639737c17fbfeb375c1d965ecfa85c7e4f0febb7d16;\n assert_eq(unique_siloed_note_hash, unique_siloed_note_hash_from_ts);\n}\n\n#[test]\nfn siloed_nullifier_matches_typescript() {\n let contract_address = AztecAddress::from_field(123);\n let nullifier = 456;\n\n let res = compute_siloed_nullifier(contract_address, nullifier);\n\n let siloed_nullifier_from_ts =\n 0x169b50336c1f29afdb8a03d955a81e485f5ac7d5f0b8065673d1e407e5877813;\n\n assert_eq(res, siloed_nullifier_from_ts);\n}\n\n#[test]\nfn siloed_private_log_first_field_matches_typescript() {\n let contract_address = AztecAddress::from_field(123);\n let field = 456;\n let res = compute_siloed_private_log_first_field(contract_address, field);\n\n let siloed_private_log_first_field_from_ts =\n 0x29480984f7b9257fded523d50addbcfc8d1d33adcf2db73ef3390a8fd5cdffaa;\n\n assert_eq(res, siloed_private_log_first_field_from_ts);\n}\n\n#[test]\nfn empty_l2_to_l1_message_hash_matches_typescript() {\n // All zeroes\n let res = compute_l2_to_l1_message_hash(\n L2ToL1Message { recipient: EthAddress::zero(), content: 0 }.scope(AztecAddress::from_field(\n 0,\n )),\n 0,\n 0,\n );\n\n let empty_l2_to_l1_msg_hash_from_ts =\n 0x003b18c58c739716e76429634a61375c45b3b5cd470c22ab6d3e14cee23dd992;\n\n assert_eq(res, empty_l2_to_l1_msg_hash_from_ts);\n}\n\n#[test]\nfn l2_to_l1_message_hash_matches_typescript() {\n let message = L2ToL1Message { recipient: EthAddress::from_field(1), content: 2 }.scope(\n AztecAddress::from_field(3),\n );\n let version = 4;\n let chainId = 5;\n\n let hash = compute_l2_to_l1_message_hash(message, version, chainId);\n\n // The following value was generated by `yarn-project/stdlib/src/hash/hash.test.ts`\n let l2_to_l1_message_hash_from_ts =\n 0x0081edf209e087ad31b3fd24263698723d57190bd1d6e9fe056fc0c0a68ee661;\n\n assert_eq(hash, l2_to_l1_message_hash_from_ts);\n}\n\n#[test]\nunconstrained fn poseidon2_hash_with_separator_bounded_vec_matches_non_bounded_vec_version() {\n let inputs = BoundedVec::<Field, 4>::from_array([1, 2, 3]);\n let separator = 42;\n\n // Hash using bounded vec version\n let bounded_result = poseidon2_hash_with_separator_bounded_vec(inputs, separator);\n\n // Hash using regular version\n let regular_result = poseidon2_hash_with_separator([1, 2, 3], separator);\n\n // Results should match\n assert_eq(bounded_result, regular_result);\n}\n"
|
|
2822
3182
|
},
|
|
2823
3183
|
"387": {
|
|
@@ -2891,7 +3251,7 @@
|
|
|
2891
3251
|
"start": 2802
|
|
2892
3252
|
}
|
|
2893
3253
|
],
|
|
2894
|
-
"path": "/
|
|
3254
|
+
"path": "/home/nventuro/pkg-1/noir-projects/noir-protocol-circuits/crates/types/src/logging.nr",
|
|
2895
3255
|
"source": "// Log levels matching the JS logger:\n\n// global SILENT_LOG_LEVEL: u8 = 0;\nglobal FATAL_LOG_LEVEL: u8 = 1;\nglobal ERROR_LOG_LEVEL: u8 = 2;\nglobal WARN_LOG_LEVEL: u8 = 3;\nglobal INFO_LOG_LEVEL: u8 = 4;\nglobal VERBOSE_LOG_LEVEL: u8 = 5;\nglobal DEBUG_LOG_LEVEL: u8 = 6;\nglobal TRACE_LOG_LEVEL: u8 = 7;\n\n// --- Per-level log functions (no format args) ---\n\npub fn fatal_log<let N: u32>(msg: str<N>) {\n fatal_log_format(msg, []);\n}\n\npub fn error_log<let N: u32>(msg: str<N>) {\n error_log_format(msg, []);\n}\n\npub fn warn_log<let N: u32>(msg: str<N>) {\n warn_log_format(msg, []);\n}\n\npub fn info_log<let N: u32>(msg: str<N>) {\n info_log_format(msg, []);\n}\n\npub fn verbose_log<let N: u32>(msg: str<N>) {\n verbose_log_format(msg, []);\n}\n\npub fn debug_log<let N: u32>(msg: str<N>) {\n debug_log_format(msg, []);\n}\n\npub fn trace_log<let N: u32>(msg: str<N>) {\n trace_log_format(msg, []);\n}\n\n// --- Per-level log functions (with format args) ---\n\npub fn fatal_log_format<let M: u32, let N: u32>(msg: str<M>, args: [Field; N]) {\n log_format(FATAL_LOG_LEVEL, msg, args);\n}\n\npub fn error_log_format<let M: u32, let N: u32>(msg: str<M>, args: [Field; N]) {\n log_format(ERROR_LOG_LEVEL, msg, args);\n}\n\npub fn warn_log_format<let M: u32, let N: u32>(msg: str<M>, args: [Field; N]) {\n log_format(WARN_LOG_LEVEL, msg, args);\n}\n\npub fn info_log_format<let M: u32, let N: u32>(msg: str<M>, args: [Field; N]) {\n log_format(INFO_LOG_LEVEL, msg, args);\n}\n\npub fn verbose_log_format<let M: u32, let N: u32>(msg: str<M>, args: [Field; N]) {\n log_format(VERBOSE_LOG_LEVEL, msg, args);\n}\n\npub fn debug_log_format<let M: u32, let N: u32>(msg: str<M>, args: [Field; N]) {\n log_format(DEBUG_LOG_LEVEL, msg, args);\n}\n\npub fn trace_log_format<let M: u32, let N: u32>(msg: str<M>, args: [Field; N]) {\n log_format(TRACE_LOG_LEVEL, msg, args);\n}\n\nfn log_format<let M: u32, let N: u32>(log_level: u8, msg: str<M>, args: [Field; N]) {\n // Safety: This oracle call returns nothing: we only call it for its side effects. It is therefore always safe\n // to call.\n unsafe { log_oracle_wrapper(log_level, msg, args) };\n}\n\nunconstrained fn log_oracle_wrapper<let M: u32, let N: u32>(\n log_level: u8,\n msg: str<M>,\n args: [Field; N],\n) {\n log_oracle(log_level, msg, N, args);\n}\n\n// While the length parameter might seem unnecessary given that we have N, we keep it around because at the AVM\n// bytecode level we want to support non-comptime-known lengths for such opcodes, even if Noir code will not generally\n// take that route. The AVM transpiler maps this oracle to the DEBUGLOG opcode, which reads the fields size from memory.\n#[oracle(aztec_misc_log)]\nunconstrained fn log_oracle<let M: u32, let N: u32>(\n log_level: u8,\n msg: str<M>,\n length: u32,\n args: [Field; N],\n) {}\n"
|
|
2896
3256
|
},
|
|
2897
3257
|
"406": {
|
|
@@ -2921,7 +3281,7 @@
|
|
|
2921
3281
|
"start": 2544
|
|
2922
3282
|
}
|
|
2923
3283
|
],
|
|
2924
|
-
"path": "/
|
|
3284
|
+
"path": "/home/nventuro/pkg-1/noir-projects/noir-protocol-circuits/crates/types/src/poseidon2.nr",
|
|
2925
3285
|
"source": "use crate::constants::TWO_POW_64;\nuse crate::traits::{Deserialize, Serialize};\nuse std::meta::derive;\n// NB: This is a clone of noir/noir-repo/noir_stdlib/src/hash/poseidon2.nr\n// It exists as we sometimes need to perform custom absorption, but the stdlib version\n// has a private absorb() method (it's also designed to just be a hasher)\n// Can be removed when standalone noir poseidon lib exists: See noir#6679\n// TODO: Poseidon is stand-alone now\n\nglobal RATE: u32 = 3;\n\n#[derive(Deserialize, Eq, Serialize)]\npub struct Poseidon2Sponge {\n pub cache: [Field; 3],\n pub state: [Field; 4],\n pub cache_size: u32,\n pub squeeze_mode: bool, // 0 => absorb, 1 => squeeze\n}\n\nimpl Poseidon2Sponge {\n #[no_predicates]\n pub fn hash<let N: u32>(input: [Field; N], message_size: u32) -> Field {\n Poseidon2Sponge::hash_internal(input, message_size, message_size != N)\n }\n\n pub(crate) fn new(iv: Field) -> Poseidon2Sponge {\n let mut result =\n Poseidon2Sponge { cache: [0; 3], state: [0; 4], cache_size: 0, squeeze_mode: false };\n result.state[RATE] = iv;\n result\n }\n\n fn perform_duplex(&mut self) {\n // add the cache into sponge state\n for i in 0..RATE {\n // We effectively zero-pad the cache by only adding to the state\n // cache that is less than the specified `cache_size`\n if i < self.cache_size {\n self.state[i] += self.cache[i];\n }\n }\n self.state = std::hash::poseidon2_permutation(self.state);\n }\n\n pub fn absorb(&mut self, input: Field) {\n assert(!self.squeeze_mode);\n if self.cache_size == RATE {\n // If we're absorbing, and the cache is full, apply the sponge permutation to compress the cache\n self.perform_duplex();\n self.cache[0] = input;\n self.cache_size = 1;\n } else {\n // If we're absorbing, and the cache is not full, add the input into the cache\n self.cache[self.cache_size] = input;\n self.cache_size += 1;\n }\n }\n\n pub fn squeeze(&mut self) -> Field {\n assert(!self.squeeze_mode);\n // If we're in absorb mode, apply sponge permutation to compress the cache.\n self.perform_duplex();\n self.squeeze_mode = true;\n\n // Pop one item off the top of the permutation and return it.\n self.state[0]\n }\n\n fn hash_internal<let N: u32>(\n input: [Field; N],\n in_len: u32,\n is_variable_length: bool,\n ) -> Field {\n let iv: Field = (in_len as Field) * TWO_POW_64;\n let mut sponge = Poseidon2Sponge::new(iv);\n for i in 0..input.len() {\n if i < in_len {\n sponge.absorb(input[i]);\n }\n }\n\n sponge.squeeze()\n }\n}\n"
|
|
2926
3286
|
},
|
|
2927
3287
|
"418": {
|
|
@@ -2935,7 +3295,7 @@
|
|
|
2935
3295
|
"start": 587
|
|
2936
3296
|
}
|
|
2937
3297
|
],
|
|
2938
|
-
"path": "/
|
|
3298
|
+
"path": "/home/nventuro/pkg-1/noir-projects/noir-protocol-circuits/crates/types/src/storage/map.nr",
|
|
2939
3299
|
"source": "use crate::{\n constants::DOM_SEP__PUBLIC_STORAGE_MAP_SLOT, hash::poseidon2_hash_with_separator,\n traits::ToField,\n};\n\n// TODO: Move this to src/public_data/storage/map.nr\npub fn derive_storage_slot_in_map<K>(storage_slot: Field, key: K) -> Field\nwhere\n K: ToField,\n{\n poseidon2_hash_with_separator(\n [storage_slot, key.to_field()],\n DOM_SEP__PUBLIC_STORAGE_MAP_SLOT,\n )\n}\n\nmod test {\n use crate::{address::AztecAddress, storage::map::derive_storage_slot_in_map, traits::FromField};\n\n #[test]\n fn test_derive_storage_slot_in_map_matches_typescript() {\n let map_slot = 0x132258fb6962c4387ba659d9556521102d227549a386d39f0b22d1890d59c2b5;\n let key = AztecAddress::from_field(\n 0x302dbc2f9b50a73283d5fb2f35bc01eae8935615817a0b4219a057b2ba8a5a3f,\n );\n\n let slot = derive_storage_slot_in_map(map_slot, key);\n\n // The following value was generated by `map_slot.test.ts`\n let slot_from_typescript =\n 0x2d225f361108379adc2da91378b9702675c5546b57e78bafc1e74ec7fec55967;\n\n assert_eq(slot, slot_from_typescript);\n }\n}\n"
|
|
2940
3300
|
},
|
|
2941
3301
|
"42": {
|
|
@@ -3151,7 +3511,7 @@
|
|
|
3151
3511
|
"start": 912
|
|
3152
3512
|
}
|
|
3153
3513
|
],
|
|
3154
|
-
"path": "/
|
|
3514
|
+
"path": "/home/nventuro/pkg-1/noir-projects/noir-protocol-circuits/crates/types/src/traits/to_field.nr",
|
|
3155
3515
|
"source": "use crate::utils::field::field_from_bytes;\n\npub trait ToField {\n fn to_field(self) -> Field;\n}\n\nimpl ToField for Field {\n #[inline_always]\n fn to_field(self) -> Field {\n self\n }\n}\n\nimpl ToField for bool {\n #[inline_always]\n fn to_field(self) -> Field {\n self as Field\n }\n}\nimpl ToField for u8 {\n #[inline_always]\n fn to_field(self) -> Field {\n self as Field\n }\n}\nimpl ToField for u16 {\n fn to_field(self) -> Field {\n self as Field\n }\n}\nimpl ToField for u32 {\n #[inline_always]\n fn to_field(self) -> Field {\n self as Field\n }\n}\nimpl ToField for u64 {\n #[inline_always]\n fn to_field(self) -> Field {\n self as Field\n }\n}\nimpl ToField for u128 {\n #[inline_always]\n fn to_field(self) -> Field {\n self as Field\n }\n}\nimpl<let N: u32> ToField for str<N> {\n #[inline_always]\n fn to_field(self) -> Field {\n assert(N < 32, \"String doesn't fit in a field, consider using Serialize instead\");\n field_from_bytes(self.as_bytes(), true)\n }\n}\n"
|
|
3156
3516
|
},
|
|
3157
3517
|
"426": {
|
|
@@ -3301,7 +3661,7 @@
|
|
|
3301
3661
|
"start": 6145
|
|
3302
3662
|
}
|
|
3303
3663
|
],
|
|
3304
|
-
"path": "/
|
|
3664
|
+
"path": "/home/nventuro/pkg-1/noir-projects/noir-protocol-circuits/crates/types/src/type_packing.nr",
|
|
3305
3665
|
"source": "use crate::traits::{Deserialize, Packable, Serialize};\n\nglobal BOOL_PACKED_LEN: u32 = 1;\nglobal U8_PACKED_LEN: u32 = 1;\nglobal U16_PACKED_LEN: u32 = 1;\nglobal U32_PACKED_LEN: u32 = 1;\nglobal U64_PACKED_LEN: u32 = 1;\nglobal U128_PACKED_LEN: u32 = 1;\nglobal FIELD_PACKED_LEN: u32 = 1;\nglobal I8_PACKED_LEN: u32 = 1;\nglobal I16_PACKED_LEN: u32 = 1;\nglobal I32_PACKED_LEN: u32 = 1;\nglobal I64_PACKED_LEN: u32 = 1;\nglobal POINT_PACKED_LEN: u32 = 2;\n\nimpl Packable for bool {\n let N: u32 = BOOL_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as Field]\n }\n\n /// Unpacks a `bool`, constraining the field to be a canonical boolean. A field outside `{0, 1}` is\n /// rejected (rather than silently reinterpreted), so an arbitrary-origin field cannot be misread.\n /// `pack` always emits `0` or `1`, so round-tripping is unaffected.\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> bool {\n let v = fields[0];\n // v * v == v holds iff v is 0 or 1: a single degree-2 constraint that both validates the field\n // is a canonical bool and avoids the byte-range decomposition that a cast to u8 would require.\n assert(v * v == v, \"Packable::unpack: bool field must be 0 or 1\");\n v == 1\n }\n}\n\nimpl Packable for u8 {\n let N: u32 = U8_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as Field]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0] as u8\n }\n}\n\nimpl Packable for u16 {\n let N: u32 = U16_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as Field]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0] as u16\n }\n}\n\nimpl Packable for u32 {\n let N: u32 = U32_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as Field]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0] as u32\n }\n}\n\nimpl Packable for u64 {\n let N: u32 = U64_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as Field]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0] as u64\n }\n}\n\nimpl Packable for u128 {\n let N: u32 = U128_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as Field]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0] as u128\n }\n}\n\nimpl Packable for Field {\n let N: u32 = FIELD_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0]\n }\n}\n\nimpl Packable for i8 {\n let N: u32 = I8_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as u8 as Field]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0] as u8 as i8\n }\n}\n\nimpl Packable for i16 {\n let N: u32 = I16_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as u16 as Field]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0] as u16 as i16\n }\n}\n\nimpl Packable for i32 {\n let N: u32 = I32_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as u32 as Field]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0] as u32 as i32\n }\n}\n\nimpl Packable for i64 {\n let N: u32 = I64_PACKED_LEN;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n [self as u64 as Field]\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n fields[0] as u64 as i64\n }\n}\n\nimpl Packable for super::point::EmbeddedCurvePoint {\n let N: u32 = POINT_PACKED_LEN;\n fn pack(self) -> [Field; Self::N] {\n self.serialize()\n }\n\n fn unpack(packed: [Field; Self::N]) -> Self {\n Self::deserialize(packed)\n }\n}\n\nimpl<T, let M: u32> Packable for [T; M]\nwhere\n T: Packable,\n{\n let N: u32 = M * <T as Packable>::N;\n\n #[inline_always]\n fn pack(self) -> [Field; Self::N] {\n let mut result: [Field; Self::N] = std::mem::zeroed();\n for i in 0..M {\n let serialized = self[i].pack();\n for j in 0..<T as Packable>::N {\n result[i * <T as Packable>::N + j] = serialized[j];\n }\n }\n result\n }\n\n #[inline_always]\n fn unpack(fields: [Field; Self::N]) -> Self {\n let mut reader = crate::utils::reader::Reader::new(fields);\n let result: [T; M] = std::mem::zeroed();\n reader.read_struct_array::<T, <T as Packable>::N, M>(Packable::unpack, result)\n }\n}\n\n#[test]\nfn test_u16_packing() {\n let a: u16 = 10;\n assert_eq(a, u16::unpack(a.pack()));\n}\n\n#[test]\nfn test_i8_packing() {\n let a: i8 = -10;\n assert_eq(a, i8::unpack(a.pack()));\n}\n\n#[test]\nfn test_i16_packing() {\n let a: i16 = -10;\n assert_eq(a, i16::unpack(a.pack()));\n}\n\n#[test]\nfn test_i32_packing() {\n let a: i32 = -10;\n assert_eq(a, i32::unpack(a.pack()));\n}\n\n#[test]\nfn test_i64_packing() {\n let a: i64 = -10;\n assert_eq(a, i64::unpack(a.pack()));\n}\n\n#[test]\nfn test_bool_unpack_accepts_canonical_values() {\n assert_eq(bool::unpack([0]), false);\n assert_eq(bool::unpack([1]), true);\n}\n\n#[test(should_fail_with = \"bool field must be 0 or 1\")]\nfn test_bool_unpack_rejects_even_non_bool() {\n // 2 has LSB 0, so the previous LSB-based unpack silently returned false; now it is rejected.\n let _ = bool::unpack([2]);\n}\n\n#[test(should_fail_with = \"bool field must be 0 or 1\")]\nfn test_bool_unpack_rejects_odd_non_bool() {\n // 3 has LSB 1, so the previous LSB-based unpack silently returned true; now it is rejected.\n let _ = bool::unpack([3]);\n}\n\n#[test(should_fail_with = \"bool field must be 0 or 1\")]\nfn test_bool_unpack_rejects_large_field() {\n let _ = bool::unpack([1000000]);\n}\n\n#[test]\nfn test_bool_pack_unpack_roundtrip() {\n // `pack` always emits 0 or 1, so it round-trips through the canonical-bool check in `unpack`.\n assert_eq(true.pack(), [1]);\n assert_eq(false.pack(), [0]);\n assert_eq(bool::unpack(true.pack()), true);\n assert_eq(bool::unpack(false.pack()), false);\n}\n"
|
|
3306
3666
|
},
|
|
3307
3667
|
"43": {
|
|
@@ -3429,7 +3789,7 @@
|
|
|
3429
3789
|
"start": 11830
|
|
3430
3790
|
}
|
|
3431
3791
|
],
|
|
3432
|
-
"path": "/
|
|
3792
|
+
"path": "/home/nventuro/pkg-1/noir-projects/noir-protocol-circuits/crates/types/src/utils/field.nr",
|
|
3433
3793
|
"source": "pub fn field_from_bytes<let N: u32>(bytes: [u8; N], big_endian: bool) -> Field {\n std::static_assert(N < 32, \"field_from_bytes: N must be less than 32\");\n let mut as_field = 0;\n let mut offset = 1;\n for i in 0..N {\n let mut index = i;\n if big_endian {\n index = N - i - 1;\n }\n as_field += (bytes[index] as Field) * offset;\n offset *= 256;\n }\n\n as_field\n}\n\n// Convert a 32 byte array to a field element by truncating the final byte\npub fn field_from_bytes_32_trunc(bytes32: [u8; 32]) -> Field {\n // Convert it to a field element\n let mut v = 1;\n let mut high = 0 as Field;\n let mut low = 0 as Field;\n\n for i in 0..15 {\n // covers bytes 16..30 (31 is truncated and ignored)\n low = low + (bytes32[15 + 15 - i] as Field) * v;\n v = v * 256;\n // covers bytes 0..14\n high = high + (bytes32[14 - i] as Field) * v;\n }\n // covers byte 15\n low = low + (bytes32[15] as Field) * v;\n\n low + high * v\n}\n\npub fn min(f1: Field, f2: Field) -> Field {\n if f1.lt(f2) {\n f1\n } else {\n f2\n }\n}\n\n// TODO: write doc-comments and tests for these magic constants.\n\nglobal KNOWN_NON_RESIDUE: Field = 5; // This is a non-residue in Noir's native Field.\nglobal C1: u32 = 28;\nglobal C3: Field = 40770029410420498293352137776570907027550720424234931066070132305055;\nglobal C5: Field = 19103219067921713944291392827692070036145651957329286315305642004821462161904;\n\n// @dev: only use this for _huge_ exponents y, when writing a constrained function.\n// If you're only exponentiating by a small value, first consider writing-out the multiplications by hand.\n// Only after you've measured the gates of that approach, consider using the native Field::pow_32 function.\n// Only if your exponent is larger than 32 bits, resort to using this function.\npub fn pow(x: Field, y: Field) -> Field {\n let mut r = 1 as Field;\n let b: [bool; 254] = y.to_le_bits();\n\n for i in 0..254 {\n r *= r;\n r *= (b[254 - 1 - i] as Field) * x + (1 - b[254 - 1 - i] as Field);\n }\n\n r\n}\n\n/// Returns Option::some(sqrt) if there is a square root, and Option::none() if there isn't.\npub fn sqrt(x: Field) -> Option<Field> {\n // Safety: if the hint returns the square root of x, then we simply square it\n // check the result equals x. If x is not square, we return a value that\n // enables us to prove that fact (see the `else` clause below).\n let (is_sq, maybe_sqrt) = unsafe { __sqrt(x) };\n\n if is_sq {\n let sqrt = maybe_sqrt;\n validate_sqrt_hint(x, sqrt);\n Option::some(sqrt)\n } else {\n let not_sqrt_hint = maybe_sqrt;\n validate_not_sqrt_hint(x, not_sqrt_hint);\n Option::none()\n }\n}\n\n// Boolean indicating whether Field element is a square, i.e. whether there exists a y in Field s.t. x = y*y.\nunconstrained fn is_square(x: Field) -> bool {\n let v = pow(x, -1 / 2);\n v * (v - 1) == 0\n}\n\n// Tonelli-Shanks algorithm for computing the square root of a Field element.\n// Requires C1 = max{c: 2^c divides (p-1)}, where p is the order of Field\n// as well as C3 = (C2 - 1)/2, where C2 = (p-1)/(2^c1),\n// and C5 = ZETA^C2, where ZETA is a non-square element of Field.\n// These are pre-computed above as globals.\nunconstrained fn tonelli_shanks_sqrt(x: Field) -> Field {\n let mut z = pow(x, C3);\n let mut t = z * z * x;\n z *= x;\n let mut b = t;\n let mut c = C5;\n\n for i in 0..(C1 - 1) {\n for _j in 1..(C1 - i - 1) {\n b *= b;\n }\n\n z *= if b == 1 { 1 } else { c };\n\n c *= c;\n\n t *= if b == 1 { 1 } else { c };\n\n b = t;\n }\n\n z\n}\n\n// NB: this doesn't return an option, because in the case of there _not_ being a square root, we still want to return a field element that allows us to then assert in the _constrained_ sqrt function that there is no sqrt.\nunconstrained fn __sqrt(x: Field) -> (bool, Field) {\n let is_sq = is_square(x);\n if is_sq {\n let sqrt = tonelli_shanks_sqrt(x);\n (true, sqrt)\n } else {\n // Demonstrate that x is not a square (a.k.a. a \"quadratic non-residue\").\n // Facts:\n // The Legendre symbol (\"LS\") of x, is x^((p-1)/2) (mod p).\n // - If x is a square, LS(x) = 1\n // - If x is not a square, LS(x) = -1\n // - If x = 0, LS(x) = 0.\n //\n // Hence:\n // sq * sq = sq // 1 * 1 = 1\n // non-sq * non-sq = sq // -1 * -1 = 1\n // sq * non-sq = non-sq // -1 * 1 = -1\n //\n // See: https://en.wikipedia.org/wiki/Legendre_symbol\n let demo_x_not_square = x * KNOWN_NON_RESIDUE;\n let not_sqrt = tonelli_shanks_sqrt(demo_x_not_square);\n (false, not_sqrt)\n }\n}\n\nfn validate_sqrt_hint(x: Field, hint: Field) {\n assert(hint * hint == x, f\"The claimed_sqrt {hint} is not the sqrt of x {x}\");\n}\n\nfn validate_not_sqrt_hint(x: Field, hint: Field) {\n // We need this assertion, because x = 0 would pass the other assertions in this\n // function, and we don't want people to be able to prove that 0 is not square!\n assert(x != 0, \"0 has a square root; you cannot claim it is not square\");\n // Demonstrate that x is not a square (a.k.a. a \"quadratic non-residue\").\n //\n // Facts:\n // The Legendre symbol (\"LS\") of x, is x^((p-1)/2) (mod p).\n // - If x is a square, LS(x) = 1\n // - If x is not a square, LS(x) = -1\n // - If x = 0, LS(x) = 0.\n //\n // Hence:\n // 1. sq * sq = sq // 1 * 1 = 1\n // 2. non-sq * non-sq = sq // -1 * -1 = 1\n // 3. sq * non-sq = non-sq // -1 * 1 = -1\n //\n // See: https://en.wikipedia.org/wiki/Legendre_symbol\n //\n // We want to demonstrate that this below multiplication falls under bullet-point (2):\n let demo_x_not_square = x * KNOWN_NON_RESIDUE;\n // I.e. we want to demonstrate that `demo_x_not_square` has Legendre symbol 1\n // (i.e. that it is a square), so we prove that it is square below.\n // Why do we want to prove that it has LS 1?\n // Well, since it was computed with a known-non-residue, its squareness implies we're\n // in case 2 (something multiplied by a known-non-residue yielding a result which\n // has a LS of 1), which implies that x must be a non-square. The unconstrained\n // function gave us the sqrt of demo_x_not_square, so all we need to do is\n // assert its squareness:\n assert(\n hint * hint == demo_x_not_square,\n f\"The hint {hint} does not demonstrate that {x} is not a square\",\n );\n}\n\n#[test]\nunconstrained fn bytes_field_test() {\n // Tests correctness of field_from_bytes_32_trunc against existing methods\n // Bytes representing 0x543e0a6642ffeb8039296861765a53407bba62bd1c97ca43374de950bbe0a7\n let inputs = [\n 84, 62, 10, 102, 66, 255, 235, 128, 57, 41, 104, 97, 118, 90, 83, 64, 123, 186, 98, 189, 28,\n 151, 202, 67, 55, 77, 233, 80, 187, 224, 167,\n ];\n let field = field_from_bytes(inputs, true);\n let return_bytes: [u8; 31] = field.to_be_bytes();\n assert_eq(inputs, return_bytes);\n // 32 bytes - we remove the final byte, and check it matches the field\n let inputs2 = [\n 84, 62, 10, 102, 66, 255, 235, 128, 57, 41, 104, 97, 118, 90, 83, 64, 123, 186, 98, 189, 28,\n 151, 202, 67, 55, 77, 233, 80, 187, 224, 167, 158,\n ];\n let field2 = field_from_bytes_32_trunc(inputs2);\n let return_bytes2: [u8; 31] = field2.to_be_bytes();\n\n assert_eq(return_bytes2, return_bytes);\n assert_eq(field2, field);\n}\n\n#[test]\nunconstrained fn max_field_test() {\n // Tests the hardcoded value in constants.nr vs underlying modulus\n // NB: We can't use 0-1 in constants.nr as it will be transpiled incorrectly to ts and sol constants files\n let max_value = crate::constants::MAX_FIELD_VALUE;\n assert_eq(max_value, 0 - 1);\n // modulus == 0 is tested elsewhere, so below is more of a sanity check\n let max_bytes: [u8; 32] = max_value.to_be_bytes();\n let mod_bytes = std::field::modulus_be_bytes();\n for i in 0..31 {\n assert_eq(max_bytes[i], mod_bytes[i]);\n }\n assert_eq(max_bytes[31], mod_bytes[31] - 1);\n}\n\n#[test]\nunconstrained fn sqrt_valid_test() {\n let x = 16; // examples: 16, 9, 25, 81\n let result = sqrt(x);\n assert(result.is_some());\n assert_eq(result.unwrap() * result.unwrap(), x);\n}\n\n#[test]\nunconstrained fn sqrt_invalid_test() {\n let x = KNOWN_NON_RESIDUE; // has no square root in the field\n let result = sqrt(x);\n assert(result.is_none());\n}\n\n#[test]\nunconstrained fn sqrt_zero_test() {\n let result = sqrt(0);\n assert(result.is_some());\n assert_eq(result.unwrap(), 0);\n}\n\n#[test]\nunconstrained fn sqrt_one_test() {\n let result = sqrt(1);\n assert(result.is_some());\n assert_eq(result.unwrap() * result.unwrap(), 1);\n}\n\n#[test]\nunconstrained fn field_from_bytes_empty_test() {\n let empty: [u8; 0] = [];\n let result = field_from_bytes(empty, true);\n assert_eq(result, 0);\n\n let result_le = field_from_bytes(empty, false);\n assert_eq(result_le, 0);\n}\n\n#[test]\nunconstrained fn field_from_bytes_little_endian_test() {\n // Test little-endian conversion: [0x01, 0x02] should be 0x0201 = 513\n let bytes = [0x01, 0x02];\n let result_le = field_from_bytes(bytes, false);\n assert_eq(result_le, 0x0201);\n\n // Compare with big-endian: [0x01, 0x02] should be 0x0102 = 258\n let result_be = field_from_bytes(bytes, true);\n assert_eq(result_be, 0x0102);\n}\n\n#[test]\nunconstrained fn pow_test() {\n assert_eq(pow(2, 0), 1);\n assert_eq(pow(2, 1), 2);\n assert_eq(pow(2, 10), 1024);\n assert_eq(pow(3, 5), 243);\n assert_eq(pow(0, 5), 0);\n assert_eq(pow(1, 100), 1);\n}\n\n#[test]\nunconstrained fn min_test() {\n assert_eq(min(5, 10), 5);\n assert_eq(min(10, 5), 5);\n assert_eq(min(7, 7), 7);\n assert_eq(min(0, 1), 0);\n}\n\n#[test]\nunconstrained fn sqrt_has_two_roots_test() {\n // Every square has two roots: r and -r (i.e., p - r)\n // sqrt(16) can return 4 or -4\n let x = 16;\n let result = sqrt(x).unwrap();\n assert(result * result == x);\n // The other root is -result\n let other_root = 0 - result;\n assert(other_root * other_root == x);\n // Verify they are different (unless x = 0)\n assert(result != other_root);\n\n // Same for 9: roots are 3 and -3\n let y = 9;\n let result_y = sqrt(y).unwrap();\n assert(result_y * result_y == y);\n let other_root_y = 0 - result_y;\n assert(other_root_y * other_root_y == y);\n assert(result_y != other_root_y);\n}\n\n#[test]\nunconstrained fn sqrt_negative_one_test() {\n let x = 0 - 1;\n let result = sqrt(x);\n assert(result.unwrap() == 0x30644e72e131a029048b6e193fd841045cea24f6fd736bec231204708f703636);\n}\n\n#[test]\nunconstrained fn validate_sqrt_hint_valid_test() {\n // 4 is a valid sqrt of 16\n validate_sqrt_hint(16, 4);\n // -4 is also a valid sqrt of 16\n validate_sqrt_hint(16, 0 - 4);\n // 0 is a valid sqrt of 0\n validate_sqrt_hint(0, 0);\n // 1 is a valid sqrt of 1\n validate_sqrt_hint(1, 1);\n // -1 is also a valid sqrt of 1\n validate_sqrt_hint(1, 0 - 1);\n}\n\n#[test(should_fail_with = \"is not the sqrt of x\")]\nunconstrained fn validate_sqrt_hint_invalid_test() {\n // 5 is not a valid sqrt of 16\n validate_sqrt_hint(16, 5);\n}\n\n#[test]\nunconstrained fn validate_not_sqrt_hint_valid_test() {\n // 5 (KNOWN_NON_RESIDUE) is not a square.\n let x = KNOWN_NON_RESIDUE;\n let hint = tonelli_shanks_sqrt(x * KNOWN_NON_RESIDUE);\n validate_not_sqrt_hint(x, hint);\n}\n\n#[test(should_fail_with = \"0 has a square root\")]\nunconstrained fn validate_not_sqrt_hint_zero_test() {\n // 0 has a square root, so we cannot claim it is not square\n validate_not_sqrt_hint(0, 0);\n}\n\n#[test(should_fail_with = \"does not demonstrate that\")]\nunconstrained fn validate_not_sqrt_hint_wrong_hint_test() {\n // Provide a wrong hint for a non-square\n let x = KNOWN_NON_RESIDUE;\n validate_not_sqrt_hint(x, 123);\n}\n"
|
|
3434
3794
|
},
|
|
3435
3795
|
"439": {
|
|
@@ -3479,7 +3839,7 @@
|
|
|
3479
3839
|
"start": 1426
|
|
3480
3840
|
}
|
|
3481
3841
|
],
|
|
3482
|
-
"path": "/
|
|
3842
|
+
"path": "/home/nventuro/pkg-1/noir-projects/noir-protocol-circuits/crates/serde/src/reader.nr",
|
|
3483
3843
|
"source": "pub struct Reader<let N: u32> {\n data: [Field; N],\n offset: u32,\n}\n\nimpl<let N: u32> Reader<N> {\n pub fn new(data: [Field; N]) -> Self {\n Self { data, offset: 0 }\n }\n\n pub fn read(&mut self) -> Field {\n let result = self.data[self.offset];\n self.offset += 1;\n result\n }\n\n pub fn read_u32(&mut self) -> u32 {\n self.read() as u32\n }\n\n pub fn read_u64(&mut self) -> u64 {\n self.read() as u64\n }\n\n pub fn read_bool(&mut self) -> bool {\n self.read() != 0\n }\n\n pub fn read_array<let K: u32>(&mut self) -> [Field; K] {\n let mut result = [0; K];\n for i in 0..K {\n result[i] = self.data[self.offset + i];\n }\n self.offset += K;\n result\n }\n\n pub fn read_struct<T, let K: u32>(&mut self, deserialise: fn([Field; K]) -> T) -> T {\n let result = deserialise(self.read_array());\n result\n }\n\n pub fn read_struct_array<T, let K: u32, let C: u32>(\n &mut self,\n deserialise: fn([Field; K]) -> T,\n mut result: [T; C],\n ) -> [T; C] {\n for i in 0..C {\n result[i] = self.read_struct(deserialise);\n }\n result\n }\n\n pub fn peek_offset(&mut self, offset: u32) -> Field {\n self.data[self.offset + offset]\n }\n\n pub fn advance_offset(&mut self, offset: u32) {\n self.offset += offset;\n }\n\n pub fn finish(self) {\n assert_eq(self.offset, self.data.len(), \"Reader did not read all data\");\n }\n}\n"
|
|
3484
3844
|
},
|
|
3485
3845
|
"440": {
|
|
@@ -3505,7 +3865,7 @@
|
|
|
3505
3865
|
"start": 12477
|
|
3506
3866
|
}
|
|
3507
3867
|
],
|
|
3508
|
-
"path": "/
|
|
3868
|
+
"path": "/home/nventuro/pkg-1/noir-projects/noir-protocol-circuits/crates/serde/src/serialization.nr",
|
|
3509
3869
|
"source": "use crate::{reader::Reader, writer::Writer};\n\n/// Trait for serializing Noir types into arrays of Fields.\n///\n/// An implementation of the Serialize trait has to follow Noir's intrinsic serialization (each member of a struct\n/// converted directly into one or more Fields without any packing or compression). This trait (and Deserialize) are\n/// typically used to communicate between Noir and TypeScript (via oracles and function arguments).\n///\n/// # On Following Noir's Intrinsic Serialization\n/// When calling a Noir function from TypeScript (TS), first the function arguments are serialized into an array\n/// of fields. This array is then included in the initial witness. Noir's intrinsic serialization is then used\n/// to deserialize the arguments from the witness. When the same Noir function is called from Noir this Serialize trait\n/// is used instead of the serialization in TS. For this reason we need to have a match between TS serialization,\n/// Noir's intrinsic serialization and the implementation of this trait. If there is a mismatch, the function calls\n/// fail with an arguments hash mismatch error message.\n///\n/// # Associated Constants\n/// * `N` - The length of the output Field array, known at compile time\n///\n/// # Example\n/// ```\n/// impl<let N: u32> Serialize for str<N> {\n/// let N: u32 = N;\n///\n/// fn serialize(self) -> [Field; Self::N] {\n/// let mut writer: Writer<Self::N> = Writer::new();\n/// self.stream_serialize(&mut writer);\n/// writer.finish()\n/// }\n///\n/// fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n/// let bytes = self.as_bytes();\n/// for i in 0..bytes.len() {\n/// writer.write(bytes[i] as Field);\n/// }\n/// }\n/// }\n/// ```\n#[derive_via(derive_serialize)]\npub trait Serialize {\n let N: u32;\n\n fn serialize(self) -> [Field; Self::N];\n\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>);\n}\n\n/// Generates a `Serialize` trait implementation for a struct type.\n///\n/// # Parameters\n/// - `s`: The struct type definition to generate the implementation for\n///\n/// # Returns\n/// A quoted code block containing the trait implementation\n///\n/// # Example\n/// For a struct defined as:\n/// ```\n/// struct Log<N> {\n/// fields: [Field; N],\n/// length: u32\n/// }\n/// ```\n///\n/// This function generates code equivalent to:\n/// ```\n/// impl<let N: u32> Serialize for Log<N> {\n/// let N: u32 = <[Field; N] as Serialize>::N + <u32 as Serialize>::N;\n///\n/// fn serialize(self) -> [Field; Self::N] {\n/// let mut writer: Writer<Self::N> = Writer::new();\n/// self.stream_serialize(&mut writer);\n/// writer.finish()\n/// }\n///\n/// #[inline_always]\n/// fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n/// Serialize::stream_serialize(self.fields, writer);\n/// Serialize::stream_serialize(self.length, writer);\n/// }\n/// }\n/// ```\npub comptime fn derive_serialize(s: TypeDefinition) -> Quoted {\n let typ = s.as_type();\n let nested_struct = typ.as_data_type().unwrap();\n\n // We care only about the name and type so we drop the last item of the tuple\n let params = nested_struct.0.fields(nested_struct.1).map(|(name, typ, _)| (name, typ));\n\n // Generates the generic parameter declarations (to be placed after the `impl` keyword) and the `where` clause\n // for the `Serialize` trait.\n let generics_declarations = get_generics_declarations(s);\n let where_serialize_clause = get_where_trait_clause(s, quote { Serialize });\n\n let params_len_quote = get_params_len_quote(params);\n\n let function_body = params\n .map(|(name, _typ): (Quoted, Type)| {\n quote {\n $crate::serialization::Serialize::stream_serialize(self.$name, writer);\n }\n })\n .join(quote {});\n\n quote {\n impl$generics_declarations $crate::serialization::Serialize for $typ\n $where_serialize_clause\n {\n let N: u32 = $params_len_quote;\n\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: $crate::writer::Writer<Self::N> = $crate::writer::Writer::new();\n $crate::serialization::Serialize::stream_serialize(self, &mut writer);\n writer.finish()\n }\n\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut $crate::writer::Writer<K>) {\n $function_body\n }\n }\n }\n}\n\n/// Trait for deserializing Noir types from arrays of Fields.\n///\n/// An implementation of the Deserialize trait has to follow Noir's intrinsic serialization (each member of a struct\n/// converted directly into one or more Fields without any packing or compression). This trait is typically used when\n/// deserializing return values from function calls in Noir. Since the same function could be called from TypeScript\n/// (TS), in which case the TS deserialization would get used, we need to have a match between the 2.\n///\n/// # Associated Constants\n/// * `N` - The length of the input Field array, known at compile time\n///\n/// # Example\n/// ```\n/// impl<let M: u32> Deserialize for str<M> {\n/// let N: u32 = M;\n///\n/// fn deserialize(fields: [Field; Self::N]) -> Self {\n/// let mut reader = Reader::new(fields);\n/// let result = Self::stream_deserialize(&mut reader);\n/// reader.finish();\n/// result\n/// }\n///\n/// fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n/// let mut bytes = [0 as u8; M];\n/// for i in 0..M {\n/// bytes[i] = reader.read() as u8;\n/// }\n/// str::<M>::from(bytes)\n/// }\n/// }\n/// ```\n#[derive_via(derive_deserialize)]\npub trait Deserialize {\n let N: u32;\n\n fn deserialize(fields: [Field; Self::N]) -> Self;\n\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self;\n}\n\n/// Generates a `Deserialize` trait implementation for a given struct `s`.\n///\n/// # Arguments\n/// * `s` - The struct type definition to generate the implementation for\n///\n/// # Returns\n/// A `Quoted` block containing the generated trait implementation\n///\n/// # Requirements\n/// Each struct member type must implement the `Deserialize` trait (it gets used in the generated code).\n///\n/// # Example\n/// For a struct like:\n/// ```\n/// struct MyStruct {\n/// x: AztecAddress,\n/// y: Field,\n/// }\n/// ```\n///\n/// This generates:\n/// ```\n/// impl Deserialize for MyStruct {\n/// let N: u32 = <AztecAddress as Deserialize>::N + <Field as Deserialize>::N;\n///\n/// fn deserialize(fields: [Field; Self::N]) -> Self {\n/// let mut reader = Reader::new(fields);\n/// let result = Self::stream_deserialize(&mut reader);\n/// reader.finish();\n/// result\n/// }\n///\n/// #[inline_always]\n/// fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n/// let x = <AztecAddress as Deserialize>::stream_deserialize(reader);\n/// let y = <Field as Deserialize>::stream_deserialize(reader);\n/// Self { x, y }\n/// }\n/// }\n/// ```\npub comptime fn derive_deserialize(s: TypeDefinition) -> Quoted {\n let typ = s.as_type();\n let nested_struct = typ.as_data_type().unwrap();\n let params = nested_struct.0.fields(nested_struct.1);\n\n // Generates the generic parameter declarations (to be placed after the `impl` keyword) and the `where` clause\n // for the `Deserialize` trait.\n let generics_declarations = get_generics_declarations(s);\n let where_deserialize_clause = get_where_trait_clause(s, quote { Deserialize });\n\n // The following will give us:\n // <type_of_struct_member_1 as Deserialize>::N + <type_of_struct_member_2 as Deserialize>::N + ...\n // (or 0 if the struct has no members)\n let right_hand_side_of_definition_of_n = if params.len() > 0 {\n params\n .map(|(_, param_type, _): (Quoted, Type, Quoted)| {\n quote {\n <$param_type as $crate::serialization::Deserialize>::N\n }\n })\n .join(quote {+})\n } else {\n quote { 0 }\n };\n\n // For structs containing a single member, we can enhance performance by directly deserializing the input array,\n // bypassing the need for loop-based array construction. While this optimization yields significant benefits in\n // Brillig where the loops are expected to not be optimized, it is not relevant in ACIR where the loops are\n // expected to be optimized away.\n let function_body = if params.len() > 1 {\n // This generates deserialization code for each struct member and concatenates them together.\n let deserialization_of_struct_members = params\n .map(|(param_name, param_type, _): (Quoted, Type, Quoted)| {\n quote {\n let $param_name = <$param_type as Deserialize>::stream_deserialize(reader);\n }\n })\n .join(quote {});\n\n // We join the struct member names with a comma to be used in the `Self { ... }` syntax\n // This will give us e.g. `a, b, c` for a struct with three fields named `a`, `b`, and `c`.\n let struct_members = params\n .map(|(param_name, _, _): (Quoted, Type, Quoted)| quote { $param_name })\n .join(quote {,});\n\n quote {\n $deserialization_of_struct_members\n\n Self { $struct_members }\n }\n } else if params.len() == 1 {\n let param_name = params[0].0;\n quote {\n Self { $param_name: $crate::serialization::Deserialize::stream_deserialize(reader) }\n }\n } else {\n quote {\n Self {}\n }\n };\n\n quote {\n impl$generics_declarations $crate::serialization::Deserialize for $typ\n $where_deserialize_clause\n {\n let N: u32 = $right_hand_side_of_definition_of_n;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = $crate::reader::Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut $crate::reader::Reader<K>) -> Self {\n $function_body\n }\n }\n }\n}\n\n/// Generates a quoted expression that computes the total serialized length of function parameters.\n///\n/// # Parameters\n/// * `params` - An array of tuples where each tuple contains a quoted parameter name and its Type. The type needs\n/// to implement the Serialize trait.\n///\n/// # Returns\n/// A quoted expression that evaluates to:\n/// * `0` if there are no parameters\n/// * `(<type1 as Serialize>::N + <type2 as Serialize>::N + ...)` for one or more parameters\ncomptime fn get_params_len_quote(params: [(Quoted, Type)]) -> Quoted {\n if params.len() == 0 {\n quote { 0 }\n } else {\n let params_quote_without_parentheses = params\n .map(|(_, param_type): (Quoted, Type)| {\n quote {\n <$param_type as $crate::serialization::Serialize>::N\n }\n })\n .join(quote {+});\n quote { ($params_quote_without_parentheses) }\n }\n}\n\ncomptime fn get_generics_declarations(s: TypeDefinition) -> Quoted {\n let generics = s.generics();\n\n if generics.len() > 0 {\n let generics_declarations_items = generics\n .map(|(name, maybe_integer_typ)| {\n // The second item in the generics tuple is an Option of an integer type that is Some only if\n // the generic is numeric.\n if maybe_integer_typ.is_some() {\n // The generic is numeric, so we return a quote defined as e.g. \"let N: u32\"\n let integer_type = maybe_integer_typ.unwrap();\n quote {let $name: $integer_type}\n } else {\n // The generic is not numeric, so we return a quote containing the name of the generic (e.g. \"T\")\n quote { $name }\n }\n })\n .join(quote {,});\n quote {<$generics_declarations_items>}\n } else {\n // The struct doesn't have any generics defined, so we just return an empty quote.\n quote {}\n }\n}\n\ncomptime fn get_where_trait_clause(s: TypeDefinition, trait_name: Quoted) -> Quoted {\n let generics = s.generics();\n\n // The second item in the generics tuple is an Option of an integer type that is Some only if the generic is\n // numeric.\n let non_numeric_generics =\n generics.filter(|(_, maybe_integer_typ)| maybe_integer_typ.is_none());\n\n if non_numeric_generics.len() > 0 {\n let non_numeric_generics_declarations =\n non_numeric_generics.map(|(name, _)| quote {$name: $trait_name}).join(quote {,});\n quote {where $non_numeric_generics_declarations}\n } else {\n // There are no non-numeric generics, so we return an empty quote.\n quote {}\n }\n}\n"
|
|
3510
3870
|
},
|
|
3511
3871
|
"442": {
|
|
@@ -3819,7 +4179,7 @@
|
|
|
3819
4179
|
"start": 21246
|
|
3820
4180
|
}
|
|
3821
4181
|
],
|
|
3822
|
-
"path": "/
|
|
4182
|
+
"path": "/home/nventuro/pkg-1/noir-projects/noir-protocol-circuits/crates/serde/src/type_impls.nr",
|
|
3823
4183
|
"source": "use crate::{reader::Reader, serialization::{Deserialize, Serialize}, writer::Writer};\nuse std::embedded_curve_ops::EmbeddedCurvePoint;\nuse std::embedded_curve_ops::EmbeddedCurveScalar;\n\nglobal BOOL_SERIALIZED_LEN: u32 = 1;\nglobal U8_SERIALIZED_LEN: u32 = 1;\nglobal U16_SERIALIZED_LEN: u32 = 1;\nglobal U32_SERIALIZED_LEN: u32 = 1;\nglobal U64_SERIALIZED_LEN: u32 = 1;\nglobal U128_SERIALIZED_LEN: u32 = 1;\nglobal FIELD_SERIALIZED_LEN: u32 = 1;\nglobal I8_SERIALIZED_LEN: u32 = 1;\nglobal I16_SERIALIZED_LEN: u32 = 1;\nglobal I32_SERIALIZED_LEN: u32 = 1;\nglobal I64_SERIALIZED_LEN: u32 = 1;\n\nimpl Serialize for bool {\n let N: u32 = BOOL_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as Field);\n }\n}\n\nimpl Deserialize for bool {\n let N: u32 = BOOL_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> bool {\n reader.read() != 0\n }\n}\n\nimpl Serialize for u8 {\n let N: u32 = U8_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as Field);\n }\n}\n\nimpl Deserialize for u8 {\n let N: u32 = U8_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read() as u8\n }\n}\n\nimpl Serialize for u16 {\n let N: u32 = U16_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as Field);\n }\n}\n\nimpl Deserialize for u16 {\n let N: u32 = U16_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read() as u16\n }\n}\n\nimpl Serialize for u32 {\n let N: u32 = U32_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as Field);\n }\n}\n\nimpl Deserialize for u32 {\n let N: u32 = U32_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read() as u32\n }\n}\n\nimpl Serialize for u64 {\n let N: u32 = U64_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as Field);\n }\n}\n\nimpl Deserialize for u64 {\n let N: u32 = U64_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read() as u64\n }\n}\n\nimpl Serialize for u128 {\n let N: u32 = U128_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as Field);\n }\n}\n\nimpl Deserialize for u128 {\n let N: u32 = U128_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read() as u128\n }\n}\n\nimpl Serialize for Field {\n let N: u32 = FIELD_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self);\n }\n}\n\nimpl Deserialize for Field {\n let N: u32 = FIELD_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read()\n }\n}\n\nimpl Serialize for i8 {\n let N: u32 = I8_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as u8 as Field);\n }\n}\n\nimpl Deserialize for i8 {\n let N: u32 = I8_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read() as u8 as i8\n }\n}\n\nimpl Serialize for i16 {\n let N: u32 = I16_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as u16 as Field);\n }\n}\n\nimpl Deserialize for i16 {\n let N: u32 = I16_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read() as u16 as i16\n }\n}\n\nimpl Serialize for i32 {\n let N: u32 = I32_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as u32 as Field);\n }\n}\n\nimpl Deserialize for i32 {\n let N: u32 = I32_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read() as u32 as i32\n }\n}\n\nimpl Serialize for i64 {\n let N: u32 = I64_SERIALIZED_LEN;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self as u64 as Field);\n }\n}\n\nimpl Deserialize for i64 {\n let N: u32 = I64_SERIALIZED_LEN;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n reader.read() as u64 as i64\n }\n}\n\nimpl<T, let M: u32> Serialize for [T; M]\nwhere\n T: Serialize,\n{\n let N: u32 = <T as Serialize>::N * M;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n for i in 0..M {\n self[i].stream_serialize(writer);\n }\n }\n}\n\nimpl<T, let M: u32> Deserialize for [T; M]\nwhere\n T: Deserialize,\n{\n let N: u32 = <T as Deserialize>::N * M;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n let mut result: [T; M] = std::mem::zeroed();\n for i in 0..M {\n result[i] = T::stream_deserialize(reader);\n }\n result\n }\n}\n\nimpl<T> Serialize for Option<T>\nwhere\n T: Serialize,\n{\n let N: u32 = <T as Serialize>::N + 1;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write_bool(self.is_some());\n if self.is_some() {\n self.unwrap_unchecked().stream_serialize(writer);\n } else {\n writer.advance_offset(<T as Serialize>::N);\n }\n }\n}\n\nimpl<T> Deserialize for Option<T>\nwhere\n T: Deserialize,\n{\n let N: u32 = <T as Deserialize>::N + 1;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n if reader.read_bool() {\n Option::some(<T as Deserialize>::stream_deserialize(reader))\n } else {\n reader.advance_offset(<T as Deserialize>::N);\n Option::none()\n }\n }\n}\n\nglobal SCALAR_SIZE: u32 = 2;\n\nimpl Serialize for EmbeddedCurveScalar {\n\n let N: u32 = SCALAR_SIZE;\n\n fn serialize(self) -> [Field; SCALAR_SIZE] {\n [self.lo, self.hi]\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self.lo);\n writer.write(self.hi);\n }\n}\n\nimpl Deserialize for EmbeddedCurveScalar {\n let N: u32 = SCALAR_SIZE;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n Self { lo: fields[0], hi: fields[1] }\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n Self { lo: reader.read(), hi: reader.read() }\n }\n}\n\nglobal POINT_SIZE: u32 = 2;\n\nimpl Serialize for EmbeddedCurvePoint {\n let N: u32 = POINT_SIZE;\n\n fn serialize(self) -> [Field; Self::N] {\n [self.x, self.y]\n }\n\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self.x);\n writer.write(self.y);\n }\n}\n\nimpl Deserialize for EmbeddedCurvePoint {\n let N: u32 = POINT_SIZE;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n Self { x: fields[0], y: fields[1] }\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n Self { x: reader.read(), y: reader.read() }\n }\n}\n\nimpl<let M: u32> Deserialize for str<M> {\n let N: u32 = M;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n let u8_arr = <[u8; Self::N] as Deserialize>::stream_deserialize(reader);\n str::<Self::N>::from(u8_arr)\n }\n}\n\nimpl<let M: u32> Serialize for str<M> {\n let N: u32 = M;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n self.as_bytes().stream_serialize(writer);\n }\n}\n\n// Note: Not deriving this because it's not supported to call derive_serialize on a \"remote\" struct (and it will never\n// be supported).\nimpl<T, let M: u32> Deserialize for BoundedVec<T, M>\nwhere\n T: Deserialize,\n{\n let N: u32 = <T as Deserialize>::N * M + 1;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n let mut new_bounded_vec: BoundedVec<T, M> = BoundedVec::new();\n let payload_len = Self::N - 1;\n\n // Length is stored in the last field as we need to match intrinsic Noir serialization and the `len` struct\n // field is after `storage` struct field (see `bounded_vec.nr` in noir-stdlib)\n let len = reader.peek_offset(payload_len) as u32;\n\n for i in 0..M {\n if i < len {\n new_bounded_vec.push(<T as Deserialize>::stream_deserialize(reader));\n }\n }\n\n // +1 for the length of the BoundedVec\n reader.advance_offset((M - len) * <T as Deserialize>::N + 1);\n\n new_bounded_vec\n }\n}\n\n// This may cause issues if used as program input, because noir disallows empty arrays for program input.\n// I think this is okay because I don't foresee a unit type being used as input. But leaving this comment as a hint\n// if someone does run into this in the future.\nimpl Deserialize for () {\n let N: u32 = 0;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(_reader: &mut Reader<K>) -> Self {\n ()\n }\n}\n\n// Note: Not deriving this because it's not supported to call derive_serialize on a \"remote\" struct (and it will never\n// be supported).\nimpl<T, let M: u32> Serialize for BoundedVec<T, M>\nwhere\n T: Serialize,\n{\n let N: u32 = <T as Serialize>::N * M + 1; // +1 for the length of the BoundedVec\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: Writer<Self::N> = Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n self.storage().stream_serialize(writer);\n // Length is stored in the last field as we need to match intrinsic Noir serialization and the `len` struct\n // field is after `storage` struct field (see `bounded_vec.nr` in noir-stdlib)\n writer.write_u32(self.len() as u32);\n }\n}\n\n// Create a slice of the given length with each element made from `f(i)` where `i` is the current index\ncomptime fn make_slice<Env, T>(length: u32, f: fn[Env](u32) -> T) -> [T] {\n let mut slice = @[];\n for i in 0..length {\n slice = slice.push_back(f(i));\n }\n slice\n}\n\n// Implements Serialize and Deserialize for an arbitrary tuple type\ncomptime fn impl_serialize_for_tuple(_m: Module, length: u32) -> Quoted {\n // `T0`, `T1`, `T2`\n let type_names = make_slice(length, |i| f\"T{i}\".quoted_contents());\n\n // `result0`, `result1`, `result2`\n let result_names = make_slice(length, |i| f\"result{i}\".quoted_contents());\n\n // `T0, T1, T2`\n let field_generics = type_names.join(quote [,]);\n\n // `<T0 as Serialize>::N + <T1 as Serialize>::N + <T2 as Serialize>::N`\n let full_size_serialize = type_names\n .map(|type_name| quote {\n <$type_name as Serialize>::N\n })\n .join(quote [+]);\n\n // `<T0 as Deserialize>::N + <T1 as Deserialize>::N + <T2 as Deserialize>::N`\n let full_size_deserialize = type_names\n .map(|type_name| quote {\n <$type_name as Deserialize>::N\n })\n .join(quote [+]);\n\n // `T0: Serialize, T1: Serialize, T2: Serialize,`\n let serialize_constraints = type_names\n .map(|field_name| quote {\n $field_name: Serialize,\n })\n .join(quote []);\n\n // `T0: Deserialize, T1: Deserialize, T2: Deserialize,`\n let deserialize_constraints = type_names\n .map(|field_name| quote {\n $field_name: Deserialize,\n })\n .join(quote []);\n\n // Statements to serialize each field\n let serialized_fields = type_names\n .mapi(|i, _type_name| quote {\n $crate::serialization::Serialize::stream_serialize(self.$i, writer);\n })\n .join(quote []);\n\n // Statements to deserialize each field\n let deserialized_fields = type_names\n .mapi(|i, type_name| {\n let result_name = result_names[i];\n quote {\n let $result_name = <$type_name as $crate::serialization::Deserialize>::stream_deserialize(reader);\n }\n })\n .join(quote []);\n let deserialize_results = result_names.join(quote [,]);\n\n quote {\n impl<$field_generics> Serialize for ($field_generics) where $serialize_constraints {\n let N: u32 = $full_size_serialize;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: $crate::writer::Writer<Self::N> = $crate::writer::Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut $crate::writer::Writer<K>) {\n\n $serialized_fields\n }\n }\n\n impl<$field_generics> Deserialize for ($field_generics) where $deserialize_constraints {\n let N: u32 = $full_size_deserialize;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = $crate::reader::Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n \n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut $crate::reader::Reader<K>) -> Self {\n $deserialized_fields\n ($deserialize_results)\n }\n }\n }\n}\n\n// Keeping these manual impls. They are more efficient since they do not\n// require copying sub-arrays from any serialized arrays.\nimpl<T1> Serialize for (T1,)\nwhere\n T1: Serialize,\n{\n let N: u32 = <T1 as Serialize>::N;\n\n fn serialize(self) -> [Field; Self::N] {\n let mut writer: crate::writer::Writer<Self::N> = crate::writer::Writer::new();\n self.stream_serialize(&mut writer);\n writer.finish()\n }\n\n #[inline_always]\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n self.0.stream_serialize(writer);\n }\n}\n\nimpl<T1> Deserialize for (T1,)\nwhere\n T1: Deserialize,\n{\n let N: u32 = <T1 as Deserialize>::N;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n let mut reader = crate::reader::Reader::new(fields);\n let result = Self::stream_deserialize(&mut reader);\n reader.finish();\n result\n }\n\n #[inline_always]\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n (<T1 as Deserialize>::stream_deserialize(reader),)\n }\n}\n\n#[impl_serialize_for_tuple(2)]\n#[impl_serialize_for_tuple(3)]\n#[impl_serialize_for_tuple(4)]\n#[impl_serialize_for_tuple(5)]\n#[impl_serialize_for_tuple(6)]\nmod impls {\n use crate::serialization::{Deserialize, Serialize};\n}\n\n#[test]\nunconstrained fn bounded_vec_serialization() {\n // Test empty BoundedVec\n let empty_vec: BoundedVec<Field, 3> = BoundedVec::from_array([]);\n let serialized = empty_vec.serialize();\n let deserialized = BoundedVec::<Field, 3>::deserialize(serialized);\n assert_eq(empty_vec, deserialized);\n assert_eq(deserialized.len(), 0);\n\n // Test partially filled BoundedVec\n let partial_vec: BoundedVec<[u32; 2], 3> = BoundedVec::from_array([[1, 2]]);\n let serialized = partial_vec.serialize();\n let deserialized = BoundedVec::<[u32; 2], 3>::deserialize(serialized);\n assert_eq(partial_vec, deserialized);\n assert_eq(deserialized.len(), 1);\n assert_eq(deserialized.get(0), [1, 2]);\n\n // Test full BoundedVec\n let full_vec: BoundedVec<[u32; 2], 3> = BoundedVec::from_array([[1, 2], [3, 4], [5, 6]]);\n let serialized = full_vec.serialize();\n let deserialized = BoundedVec::<[u32; 2], 3>::deserialize(serialized);\n assert_eq(full_vec, deserialized);\n assert_eq(deserialized.len(), 3);\n assert_eq(deserialized.get(0), [1, 2]);\n assert_eq(deserialized.get(1), [3, 4]);\n assert_eq(deserialized.get(2), [5, 6]);\n}\n"
|
|
3824
4184
|
},
|
|
3825
4185
|
"443": {
|
|
@@ -3865,7 +4225,7 @@
|
|
|
3865
4225
|
"start": 1263
|
|
3866
4226
|
}
|
|
3867
4227
|
],
|
|
3868
|
-
"path": "/
|
|
4228
|
+
"path": "/home/nventuro/pkg-1/noir-projects/noir-protocol-circuits/crates/serde/src/writer.nr",
|
|
3869
4229
|
"source": "pub struct Writer<let N: u32> {\n data: [Field; N],\n offset: u32,\n}\n\nimpl<let N: u32> Writer<N> {\n pub fn new() -> Self {\n Self { data: [0; N], offset: 0 }\n }\n\n pub fn write(&mut self, value: Field) {\n self.data[self.offset] = value;\n self.offset += 1;\n }\n\n pub fn write_u32(&mut self, value: u32) {\n self.write(value as Field);\n }\n\n pub fn write_u64(&mut self, value: u64) {\n self.write(value as Field);\n }\n\n pub fn write_bool(&mut self, value: bool) {\n self.write(value as Field);\n }\n\n pub fn write_array<let K: u32>(&mut self, value: [Field; K]) {\n for i in 0..K {\n self.data[i + self.offset] = value[i];\n }\n self.offset += K;\n }\n\n pub fn write_struct<T, let K: u32>(&mut self, value: T, serialize: fn(T) -> [Field; K]) {\n self.write_array(serialize(value));\n }\n\n pub fn write_struct_array<T, let K: u32, let C: u32>(\n &mut self,\n value: [T; C],\n serialize: fn(T) -> [Field; K],\n ) {\n for i in 0..C {\n self.write_struct(value[i], serialize);\n }\n }\n\n pub fn advance_offset(&mut self, offset: u32) {\n self.offset += offset;\n }\n\n pub fn finish(self) -> [Field; N] {\n assert_eq(self.offset, self.data.len(), \"Writer did not write all data\");\n self.data\n }\n}\n"
|
|
3870
4230
|
},
|
|
3871
4231
|
"5": {
|
|
@@ -4213,7 +4573,7 @@
|
|
|
4213
4573
|
"start": 6092
|
|
4214
4574
|
}
|
|
4215
4575
|
],
|
|
4216
|
-
"path": "/
|
|
4576
|
+
"path": "/home/nventuro/pkg-1/noir-projects/noir-contracts/contracts/standard/auth_registry_contract/src/main.nr",
|
|
4217
4577
|
"source": "use aztec::macros::aztec;\n\n/// A contract that manages public authentication witnesses (authwits) on the Aztec network.\n///\n/// In Aztec, private authwits are verified by account contracts directly (via oracles on the user's device). Public\n/// authwits, however, require this onchain registry because local oracles cannot be used for global execution. Users\n/// pre-approve actions by storing `message_hash -> true` mappings via `set_authorized`, and consumer contracts verify\n/// and atomically revoke these approvals via `consume`.\n///\n/// The `message_hash` includes the consumer address, chain ID, and protocol version, preventing cross-chain and\n/// cross-contract replay. Each approval can only be consumed once. Users can also enable `reject_all` as an emergency\n/// kill switch to invalidate all outstanding approvals at once.\n///\n/// Note that there is no expiration time enforced on the approved actions in this contract as this can be achieved by\n/// including an expiration timestamp in the `message` (`message_hash` preimage) and having the consumer contract\n/// constrain that value.\n#[aztec]\npub contract AuthRegistry {\n use aztec::{\n authwit::auth::{assert_current_call_valid_authwit, compute_authwit_message_hash, IS_VALID_SELECTOR},\n macros::{functions::{external, only_self, view}, storage::storage},\n protocol::address::AztecAddress,\n state_vars::{Map, PublicMutable},\n };\n\n #[storage]\n struct Storage<Context> {\n /// Per-address flag that, when true, causes all `consume` calls for that address to revert. Provides an\n /// emergency \"mass revocation\" mechanism. Does not delete existing approvals - if later set back to false,\n /// unconsumed approvals become consumable again.\n reject_all: Map<AztecAddress, PublicMutable<bool, Context>, Context>,\n /// Per-user, per-message authorization status. `approved_actions[user][message_hash]` is set to true by\n /// `set_authorized` and atomically revoked by `consume` to prevent replay.\n approved_actions: Map<AztecAddress, Map<Field, PublicMutable<bool, Context>, Context>, Context>,\n }\n\n /// Approves or revokes a `message_hash` for the `msg_sender`.\n #[external(\"public\")]\n fn set_authorized(message_hash: Field, authorize: bool) {\n self.storage.approved_actions.at(self.msg_sender()).at(message_hash).write(authorize);\n }\n\n /// Enables or disables mass rejection of all authwits for `msg_sender`. When enabled, all `consume` calls for the\n /// `msg_sender` will revert regardless of individual approvals.\n #[external(\"public\")]\n fn set_reject_all(reject: bool) {\n self.storage.reject_all.at(self.msg_sender()).write(reject);\n }\n\n /// Consumes (verifies and atomically revokes) an authorization on behalf of `on_behalf_of`.\n ///\n /// Called by consumer contracts (e.g. Token) to verify a user has authorized an action. Reverts if `reject_all`\n /// is set for `msg_sender`.\n ///\n /// Returns `IS_VALID_SELECTOR` (0x47dacd73) on success instead of a boolean. This follows the EIP-1271 pattern:\n /// a failed or malformed call would return the default zero value, which is indistinguishable from `false`. By\n /// requiring a specific magic value, the caller can reliably distinguish a successful validation from a failed\n /// call. The function also reverts on failure as a first line of defense, making the magic return value a\n /// defense-in-depth measure against subtle integration bugs on the caller side.\n #[external(\"public\")]\n fn consume(on_behalf_of: AztecAddress, inner_hash: Field) -> Field {\n assert_eq(false, self.storage.reject_all.at(on_behalf_of).read(), \"rejecting all\");\n\n let message_hash = compute_authwit_message_hash(\n self.msg_sender(),\n self.context.chain_id(),\n self.context.version(),\n inner_hash,\n );\n\n let authorized = self.storage.approved_actions.at(on_behalf_of).at(message_hash).read();\n\n assert_eq(true, authorized, \"unauthorized\");\n\n self.storage.approved_actions.at(on_behalf_of).at(message_hash).write(false);\n\n IS_VALID_SELECTOR\n }\n\n /// Updates a public authwit for `approver` using a private authwit\n ///\n /// Useful for the case where you want someone else to insert a public authwit for you. For example, if Alice\n /// (`approver` in this scenario) wants Bob to insert an authwit in public, such that they can execute a trade,\n /// Alice can create a private authwit, and Bob can call this function with it.\n #[external(\"private\")]\n fn set_authorized_private(approver: AztecAddress, message_hash: Field, authorize: bool) {\n assert_current_call_valid_authwit::<3>(self.context, approver);\n self.enqueue_self._set_authorized(approver, message_hash, authorize);\n }\n\n /// A function that writes an authorization entry for an arbitrary `approver`. Only callable by this contract\n /// itself (`#[only_self]`), ensuring it is only reachable through the validated `set_authorized_private` flow.\n #[external(\"public\")]\n #[only_self]\n fn _set_authorized(approver: AztecAddress, message_hash: Field, authorize: bool) {\n self.storage.approved_actions.at(approver).at(message_hash).write(authorize);\n }\n\n /// Returns whether `on_behalf_of` has enabled the `reject_all` flag.\n #[external(\"public\")]\n #[view]\n fn is_reject_all(on_behalf_of: AztecAddress) -> bool {\n self.storage.reject_all.at(on_behalf_of).read()\n }\n\n /// Returns whether a specific `message_hash` is currently consumable for `on_behalf_of`.\n #[external(\"public\")]\n #[view]\n fn is_consumable(on_behalf_of: AztecAddress, message_hash: Field) -> bool {\n !self.storage.reject_all.at(on_behalf_of).read()\n & self.storage.approved_actions.at(on_behalf_of).at(message_hash).read()\n }\n\n /// Utility version of `is_consumable`\n #[external(\"utility\")]\n unconstrained fn utility_is_consumable(on_behalf_of: AztecAddress, message_hash: Field) -> bool {\n !self.storage.reject_all.at(on_behalf_of).read()\n & self.storage.approved_actions.at(on_behalf_of).at(message_hash).read()\n }\n}\n"
|
|
4218
4578
|
},
|
|
4219
4579
|
"53": {
|
|
@@ -4263,7 +4623,7 @@
|
|
|
4263
4623
|
"start": 24401
|
|
4264
4624
|
}
|
|
4265
4625
|
],
|
|
4266
|
-
"path": "/
|
|
4626
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/authwit/auth.nr",
|
|
4267
4627
|
"source": "use crate::{\n authwit::{authorization_interface::AuthorizationInterface, AuthorizationSelector},\n context::{gas::GasOpts, PrivateContext, PublicContext},\n hash::hash_args,\n macros::authorization::authorization,\n oracle::{execution_cache::load, offchain_effect::emit_offchain_effect},\n};\nuse crate::protocol::{\n abis::function_selector::FunctionSelector,\n address::AztecAddress,\n constants::{DOM_SEP__AUTHWIT_INNER, DOM_SEP__AUTHWIT_NULLIFIER, DOM_SEP__AUTHWIT_OUTER},\n hash::poseidon2_hash_with_separator,\n traits::{Serialize, ToField},\n};\nuse crate::standard_addresses::STANDARD_AUTH_REGISTRY_ADDRESS;\n\n/// Authentication witness helper library\n///\n/// Authentication Witness is a scheme for authenticating actions on Aztec, so users can allow third-parties (e.g.\n/// protocols or other users) to execute an action on their behalf.\n///\n/// This library provides helper functions to manage such witnesses. The authentication witness, is some \"witness\"\n/// (data) that authenticates a `message_hash`. The simplest example of an authentication witness, is a signature. The\n/// signature is the \"evidence\", that the signer has seen the message, agrees with it, and has allowed it. It does not\n/// need to be a signature. It could be any kind of \"proof\" that the message is allowed. Another proof could be knowing\n/// some kind of secret, or having some kind of \"token\" that allows the message.\n///\n/// The `message_hash` is a hash of the following structure: hash(consumer, chain_id, version, inner_hash)\n/// - consumer: the address of the contract that is \"consuming\" the message,\n/// - chain_id: the chain id of the chain that the message is being consumed on,\n/// - version: the version of the chain that the message is being consumed on,\n/// - inner_hash: the hash of the \"inner\" message that is being consumed, this is the \"actual\" message or action.\n///\n/// While the `inner_hash` could be anything, such as showing you signed a specific message, it will often be a hash of\n/// the \"action\" to approve, along with who made the call. As part of this library, we provide a few helper functions\n/// to deal with such messages.\n///\n/// For example, we provide helper function that is used for checking that the message is an encoding of the current\n/// call. This can be used to let some contract \"allow\" another contract to act on its behalf, as long as it can show\n/// that it is acting on behalf of the contract.\n///\n/// If we take a case of allowing a contract to transfer tokens on behalf of an account, the `inner_hash` can be\n/// derived as: inner_hash = hash(caller, \"transfer\", hash(to, amount))\n///\n/// Where the `caller` would be the address of the contract that is trying to transfer the tokens, and `to` and\n/// `amount` the arguments for the transfer.\n///\n/// Note that we have both a `caller` and a `consumer`, the `consumer` will be the contract that is consuming the\n/// message, in the case of the transfer, it would be the `Token` contract itself, while the caller, will be the actor\n/// that is allowed to transfer the tokens.\n///\n///\n/// The authentication mechanism works differently in public and private contexts. In private, we recall that\n/// everything is executed on the user's device, so we can use `oracles` to \"ask\" the user (not contract) for\n/// information. In public we cannot do this, since it is executed by the sequencer (someone else). Therefore we can\n/// instead use a \"registry\" to store the messages that we have approved.\n///\n/// A simple example would be a \"token\" that is being \"pulled\" from one account into another. We will first outline how\n/// this would look in private, and then in public later.\n///\n/// Say that a user `Alice` wants to deposit some tokens into a DeFi protocol (say a DEX). `Alice` would make a\n/// `deposit` transaction, that she is executing using her account contract. The account would call the `DeFi` contract\n/// to execute `deposit`, which would try to pull funds from the `Token` contract. Since the `DeFi` contract is trying\n/// to pull funds from an account that is not its own, it needs to convince the `Token` contract that it is allowed to\n/// do so.\n///\n/// This is where the authentication witness comes in The `Token` contract computes a `message_hash` from the\n/// `transfer` call, and then asks `Alice Account` contract to verify that the `DeFi` contract is allowed to execute\n/// that call.\n///\n/// `Alice Account` contract can then ask `Alice` if she wants to allow the `DeFi` contract to pull funds from her\n/// account. If she does, she will sign the `message_hash` and return the signature to the `Alice Account` which will\n/// validate it and return success to the `Token` contract which will then allow the `DeFi` contract to pull funds from\n/// `Alice`.\n///\n/// To ensure that the same \"approval\" cannot be used multiple times, we also compute a `nullifier` for the\n/// authentication witness, and emit it from the `Token` contract (consumer).\n///\n/// Note that we can do this flow as we are in private were we can do oracle calls out from contracts.\n///\n///\n/// Person Contract Contract Contract\n/// Alice Alice Account Token DeFi\n/// | | | |\n/// | Defi.deposit(Token, 1000) | |\n/// |----------------->| | |\n/// | | deposit(Token, 1000) |\n/// | |---------------------------------------->|\n/// | | | |\n/// | | | transfer(Alice, Defi, 1000)\n/// | | |<---------------------|\n/// | | | |\n/// | | Check if Defi may call transfer(Alice, Defi, 1000)\n/// | |<-----------------| |\n/// | | | |\n/// | Please give me AuthWit for DeFi | |\n/// | calling transfer(Alice, Defi, 1000) | |\n/// |<-----------------| | |\n/// | | | |\n/// | | | |\n/// | AuthWit for transfer(Alice, Defi, 1000) |\n/// |----------------->| | |\n/// | | AuthWit validity | |\n/// | |----------------->| |\n/// | | | |\n/// | | throw if invalid AuthWit |\n/// | | | |\n/// | | emit AuthWit nullifier |\n/// | | | |\n/// | | transfer(Alice, Defi, 1000) |\n/// | | | |\n/// | | | |\n/// | | | success |\n/// | | |--------------------->|\n/// | | | |\n/// | | | |\n/// | | | deposit(Token, 1000)\n/// | | | |\n/// | | | |\n///\n///\n/// If we instead were in public, we cannot do the same flow. Instead we would use an authentication registry to store\n/// the messages that we have approved.\n///\n/// To approve a message, `Alice Account` can make a `set_authorized` call to the registry, to set a `message_hash` as\n/// authorized. This is essentially a mapping from `message_hash` to `true` for `Alice Contract`. Every account has its\n/// own map in the registry, so `Alice` cannot approve a message for `Bob`.\n///\n/// The `Token` contract can then try to \"spend\" the approval by calling `consume` on the registry. If the message was\n/// approved, the value is updated to `false`, and we return the success flag. For more information on the registry,\n/// see `main.nr` in `auth_registry_contract`.\n///\n/// Person Contract Contract Contract Contract\n/// Alice Alice Account Registry Token DeFi\n/// | | | | |\n/// | Registry.set_authorized(..., true) | | |\n/// |----------------->| | | |\n/// | | set_authorized(..., true) | |\n/// | |------------------->| | |\n/// | | | | |\n/// | | set authorized to true | |\n/// | | | | |\n/// | | | | |\n/// | Defi.deposit(Token, 1000) | | |\n/// |----------------->| | | |\n/// | | deposit(Token, 1000) | |\n/// | |-------------------------------------------------------------->|\n/// | | | | |\n/// | | | transfer(Alice, Defi, 1000) |\n/// | | | |<---------------------|\n/// | | | | |\n/// | | | Check if Defi may call transfer(Alice, Defi, 1000)\n/// | | |<------------------| |\n/// | | | | |\n/// | | throw if invalid AuthWit | |\n/// | | | | |\n/// | | | | |\n/// | | set authorized to false | |\n/// | | | | |\n/// | | | | |\n/// | | | AuthWit validity | |\n/// | | |------------------>| |\n/// | | | | |\n/// | | | | transfer(Alice, Defi, 1000)\n/// | | | |<-------------------->|\n/// | | | | |\n/// | | | | success |\n/// | | | |--------------------->|\n/// | | | | |\n/// | | | | deposit(Token, 1000)\n/// | | | | |\n///\n///\n/// --- FAQ ---\n/// Q: Why are we using a success flag of `poseidon2_hash_bytes(\"IS_VALID()\")` instead of just returning a boolean?\n/// A: We want to make sure that we don't accidentally return `true` if there is a collision in the function\n/// selector. By returning a hash of `IS_VALID()`, it becomes very unlikely that there is both a collision and we\n/// return a success flag.\n///\n/// Q: Why are we using static calls?\n/// A: We are using static calls to ensure that the account contract cannot re-enter. If it was a normal call, it\n/// could make a new call and do a re-entry attack. Using a static ensures that it cannot update any state.\n///\n/// Q: Would it not be cheaper to use a nullifier instead of updating state in public?\n/// A: At a quick glance, a public state update + nullifier is 96 bytes, but two state updates are 128, so it would\n/// be cheaper to use a nullifier, if this is the way it would always be done. However, if both the approval and the\n/// consumption is done in the same transaction, then we will be able to squash the updates (only final tx state diff\n/// is posted to DA), and now it is cheaper.\n///\n/// Q: Why is the chain id and the version part of the message hash?\n/// A: The chain id and the version is part of the message hash to ensure that the message is only valid on a\n/// specific chain to avoid a case where the same message could be used across multiple chains.\n\npub global IS_VALID_SELECTOR: Field = 0x47dacd73; // 4 last bytes of\n// poseidon2_hash_bytes(\"IS_VALID()\")\n\n/// A struct that represents a contract call the user can authorize. It's associated identifier is generated by\n/// serializing and hashing it. The user is expected to sign this hash to signal the contract call can be performed on\n/// their behalf\n#[authorization]\nstruct CallAuthorization {\n msg_sender: AztecAddress,\n selector: FunctionSelector,\n args_hash: Field,\n}\n\n/// A struct that represents a request to authorize a call, which is used to emit an offchain effect so the user/wallet\n/// can understand what they are being asked to sign. It is generated from a CallAuthorization by adding metadata to\n/// it, such as the selector for the authorization, the inner hash, and the actual arguments that are being passed to\n/// the function call.\n#[derive(Serialize)]\nstruct CallAuthorizationRequest {\n selector: AuthorizationSelector,\n inner_hash: Field,\n on_behalf_of: AztecAddress,\n msg_sender: AztecAddress,\n fn_selector: FunctionSelector,\n args_hash: Field,\n}\n\nunconstrained fn emit_authorization_as_offchain_effect<let N: u32>(\n authorization: CallAuthorization,\n inner_hash: Field,\n on_behalf_of: AztecAddress,\n) {\n let args: [Field; N] = load(authorization.args_hash);\n let authorization_request = CallAuthorizationRequest {\n selector: authorization.get_authorization_selector(),\n inner_hash: inner_hash,\n on_behalf_of: on_behalf_of,\n msg_sender: authorization.msg_sender,\n fn_selector: authorization.selector,\n args_hash: authorization.args_hash,\n };\n emit_offchain_effect(authorization_request.serialize().concat(args))\n}\n\n/// Assert that `on_behalf_of` has authorized the current call with a valid authentication witness\n///\n/// Compute the `inner_hash` using the `msg_sender`, `selector` and `args_hash` and then make a call out to the\n/// `on_behalf_of` contract to verify that the `inner_hash` is valid.\n///\n/// Additionally, this function emits the identifying information of the call as an offchain effect so PXE can rely the\n/// information to the user/wallet in a readable way. To that effect, it is generic over N, where N is the number of\n/// arguments the authorized functions takes. This is used to load the arguments from the execution cache. This\n/// function is intended to be called via a macro, which will use the turbofish operator to specify the number of\n/// arguments.\n///\n/// @param on_behalf_of The address that has allegedly authorized the current call\npub fn assert_current_call_valid_authwit<let N: u32>(context: &mut PrivateContext, on_behalf_of: AztecAddress) {\n let args_hash: Field = context.get_args_hash();\n\n let authorization =\n CallAuthorization { msg_sender: context.maybe_msg_sender().unwrap(), selector: context.selector(), args_hash };\n let inner_hash = compute_inner_authwit_hash(authorization.serialize());\n // Safety: Offchain effects are by definition unconstrained. They are emitted via an oracle which we don't use for\n // anything besides its side effects, therefore this is safe to call.\n unsafe { emit_authorization_as_offchain_effect::<N>(authorization, inner_hash, on_behalf_of) };\n\n assert_inner_hash_valid_authwit(context, on_behalf_of, inner_hash);\n}\n\n/// Assert that a specific `inner_hash` is valid for the `on_behalf_of` address\n///\n/// Used as an internal function for `assert_current_call_valid_authwit` and can be used as a standalone function when\n/// the `inner_hash` is from a different source, e.g., say a block of text etc.\n///\n/// @param on_behalf_of The address that has allegedly authorized the current call @param inner_hash The hash of the\n/// message to authorize\npub fn assert_inner_hash_valid_authwit(context: &mut PrivateContext, on_behalf_of: AztecAddress, inner_hash: Field) {\n // We perform a static call here and not a standard one to ensure that the account contract cannot re-enter.\n let result: Field = context\n .static_call_private_function(\n on_behalf_of,\n comptime { FunctionSelector::from_signature(\"verify_private_authwit(Field)\") },\n [inner_hash],\n )\n .get_preimage();\n assert(result == IS_VALID_SELECTOR, \"Message not authorized by account\");\n // Compute the nullifier, similar computation to the outer hash, but without the chain_id and version. Those should\n // already be handled in the verification, so we just need something to nullify, that allows the same inner_hash\n // for multiple actors.\n let nullifier = compute_authwit_nullifier(on_behalf_of, inner_hash);\n context.push_nullifier_unsafe(nullifier);\n}\n\n/// Assert that `on_behalf_of` has authorized the current call in the authentication registry\n///\n/// Compute the `inner_hash` using the `msg_sender`, `selector` and `args_hash` and then make a call out to the\n/// `on_behalf_of` contract to verify that the `inner_hash` is valid.\n///\n/// Note that the authentication registry will take the `msg_sender` into account as the consumer, so this will only\n/// work if the `msg_sender` is the same as the `consumer` when the `message_hash` was inserted into the registry.\n///\n/// @param on_behalf_of The address that has allegedly authorized the current call\npub unconstrained fn assert_current_call_valid_authwit_public(context: PublicContext, on_behalf_of: AztecAddress) {\n let inner_hash = compute_inner_authwit_hash([\n context.maybe_msg_sender().unwrap().to_field(),\n context.selector().to_field(),\n context.get_args_hash(),\n ]);\n assert_inner_hash_valid_authwit_public(context, on_behalf_of, inner_hash);\n}\n\n/// Assert that `on_behalf_of` has authorized a specific `inner_hash` in the authentication registry\n///\n/// Compute the `inner_hash` using the `msg_sender`, `selector` and `args_hash` and then make a call out to the\n/// `on_behalf_of` contract to verify that the `inner_hash` is valid.\n///\n/// Note that the authentication registry will take the `msg_sender` into account as the consumer, so this will only\n/// work if the `msg_sender` is the same as the `consumer` when the `message_hash` was inserted into the registry.\n///\n/// @param on_behalf_of The address that has allegedly authorized the `inner_hash`\npub unconstrained fn assert_inner_hash_valid_authwit_public(\n context: PublicContext,\n on_behalf_of: AztecAddress,\n inner_hash: Field,\n) {\n let results: [Field] = context.call_public_function(\n STANDARD_AUTH_REGISTRY_ADDRESS,\n comptime { FunctionSelector::from_signature(\"consume((Field),Field)\") },\n [on_behalf_of.to_field(), inner_hash],\n GasOpts::default(),\n );\n assert(results.len() == 1, \"Invalid response from registry\");\n assert(results[0] == IS_VALID_SELECTOR, \"Message not authorized by account\");\n}\n\n/// Compute the `message_hash` from a function call to be used by an authentication witness\n///\n/// Useful for when you need a non-account contract to approve during execution. For example if you need a contract to\n/// make a call to nested contract, e.g., contract A wants to exit token T to L1 using bridge B, so it needs to allow B\n/// to transfer T on its behalf.\n///\n/// @param caller The address of the contract that is calling the function, in the example above, this would be B\n/// @param consumer The address of the contract that is consuming the message, in the example above, this would be T\n/// @param chain_id The chain id of the chain that the message is being consumed on @param version The version of the\n/// chain that the message is being consumed on @param selector The function selector of the function that is being\n/// called @param args The arguments of the function that is being called\npub fn compute_authwit_message_hash_from_call<let N: u32>(\n caller: AztecAddress,\n consumer: AztecAddress,\n chain_id: Field,\n version: Field,\n selector: FunctionSelector,\n args: [Field; N],\n) -> Field {\n let args_hash = hash_args(args);\n let inner_hash = compute_inner_authwit_hash([caller.to_field(), selector.to_field(), args_hash]);\n compute_authwit_message_hash(consumer, chain_id, version, inner_hash)\n}\n\n/// Computes the `inner_hash` of the authentication witness\n///\n/// This is used internally, but also useful in cases where you want to compute the `inner_hash` for a specific message\n/// that is not necessarily a call, but just some \"bytes\" or text.\n///\n/// @param args The arguments to hash\npub fn compute_inner_authwit_hash<let N: u32>(args: [Field; N]) -> Field {\n poseidon2_hash_with_separator(args, DOM_SEP__AUTHWIT_INNER)\n}\n\n/// Computes the `authwit_nullifier` for a specific `on_behalf_of` and `inner_hash`\n///\n/// Using the `on_behalf_of` and the `inner_hash` to ensure that the nullifier is siloed for a specific `on_behalf_of`.\n///\n/// @param on_behalf_of The address that has authorized the `inner_hash` @param inner_hash The hash of the message to\n/// authorize\npub fn compute_authwit_nullifier(on_behalf_of: AztecAddress, inner_hash: Field) -> Field {\n poseidon2_hash_with_separator(\n [on_behalf_of.to_field(), inner_hash],\n DOM_SEP__AUTHWIT_NULLIFIER,\n )\n}\n\n/// Computes the `message_hash` for the authentication witness\n///\n/// @param consumer The address of the contract that is consuming the message @param chain_id The chain id of the chain\n/// that the message is being consumed on @param version The version of the chain that the message is being consumed on\n/// @param inner_hash The hash of the \"inner\" message that is being consumed\npub fn compute_authwit_message_hash(\n consumer: AztecAddress,\n chain_id: Field,\n version: Field,\n inner_hash: Field,\n) -> Field {\n poseidon2_hash_with_separator(\n [consumer.to_field(), chain_id, version, inner_hash],\n DOM_SEP__AUTHWIT_OUTER,\n )\n}\n\n/// Helper function to set the authorization status of a message hash\n///\n/// Wraps a public call to the authentication registry to set the authorization status of a `message_hash`\n///\n/// @param message_hash The hash of the message to authorize @param authorize True if the message should be authorized,\n/// false if it should be revoked\npub unconstrained fn set_authorized(context: PublicContext, message_hash: Field, authorize: bool) {\n let res = context.call_public_function(\n STANDARD_AUTH_REGISTRY_ADDRESS,\n comptime { FunctionSelector::from_signature(\"set_authorized(Field,bool)\") },\n [message_hash, authorize as Field],\n GasOpts::default(),\n );\n assert(res.len() == 0);\n}\n\n/// Helper function to reject all authwits\n///\n/// Wraps a public call to the authentication registry to set the `reject_all` flag\n///\n/// @param reject True if all authwits should be rejected, false otherwise\npub unconstrained fn set_reject_all(context: PublicContext, reject: bool) {\n let res = context.call_public_function(\n STANDARD_AUTH_REGISTRY_ADDRESS,\n comptime { FunctionSelector::from_signature(\"set_reject_all(bool)\") },\n [reject as Field],\n GasOpts::default(),\n );\n assert(res.len() == 0);\n}\n"
|
|
4268
4628
|
},
|
|
4269
4629
|
"6": {
|
|
@@ -4724,119 +5084,119 @@
|
|
|
4724
5084
|
},
|
|
4725
5085
|
{
|
|
4726
5086
|
"name": "PrivateContext::set_as_fee_payer",
|
|
4727
|
-
"start":
|
|
5087
|
+
"start": 29840
|
|
4728
5088
|
},
|
|
4729
5089
|
{
|
|
4730
5090
|
"name": "PrivateContext::in_revertible_phase",
|
|
4731
|
-
"start":
|
|
5091
|
+
"start": 30420
|
|
4732
5092
|
},
|
|
4733
5093
|
{
|
|
4734
5094
|
"name": "PrivateContext::end_setup",
|
|
4735
|
-
"start":
|
|
5095
|
+
"start": 32732
|
|
4736
5096
|
},
|
|
4737
5097
|
{
|
|
4738
5098
|
"name": "PrivateContext::set_expiration_timestamp",
|
|
4739
|
-
"start":
|
|
5099
|
+
"start": 35997
|
|
4740
5100
|
},
|
|
4741
5101
|
{
|
|
4742
5102
|
"name": "PrivateContext::assert_note_exists",
|
|
4743
|
-
"start":
|
|
5103
|
+
"start": 37392
|
|
4744
5104
|
},
|
|
4745
5105
|
{
|
|
4746
5106
|
"name": "PrivateContext::assert_nullifier_exists",
|
|
4747
|
-
"start":
|
|
5107
|
+
"start": 40028
|
|
4748
5108
|
},
|
|
4749
5109
|
{
|
|
4750
5110
|
"name": "PrivateContext::request_nhk_app",
|
|
4751
|
-
"start":
|
|
5111
|
+
"start": 42125
|
|
4752
5112
|
},
|
|
4753
5113
|
{
|
|
4754
5114
|
"name": "PrivateContext::request_ovsk_app",
|
|
4755
|
-
"start":
|
|
5115
|
+
"start": 43771
|
|
4756
5116
|
},
|
|
4757
5117
|
{
|
|
4758
5118
|
"name": "PrivateContext::request_sk_app",
|
|
4759
|
-
"start":
|
|
5119
|
+
"start": 45492
|
|
4760
5120
|
},
|
|
4761
5121
|
{
|
|
4762
5122
|
"name": "PrivateContext::message_portal",
|
|
4763
|
-
"start":
|
|
5123
|
+
"start": 48797
|
|
4764
5124
|
},
|
|
4765
5125
|
{
|
|
4766
5126
|
"name": "PrivateContext::consume_l1_to_l2_message",
|
|
4767
|
-
"start":
|
|
5127
|
+
"start": 50744
|
|
4768
5128
|
},
|
|
4769
5129
|
{
|
|
4770
5130
|
"name": "PrivateContext::emit_private_log_unsafe",
|
|
4771
|
-
"start":
|
|
5131
|
+
"start": 54863
|
|
4772
5132
|
},
|
|
4773
5133
|
{
|
|
4774
5134
|
"name": "PrivateContext::emit_raw_note_log_unsafe",
|
|
4775
|
-
"start":
|
|
5135
|
+
"start": 56320
|
|
4776
5136
|
},
|
|
4777
5137
|
{
|
|
4778
5138
|
"name": "PrivateContext::emit_contract_class_log",
|
|
4779
|
-
"start":
|
|
5139
|
+
"start": 56928
|
|
4780
5140
|
},
|
|
4781
5141
|
{
|
|
4782
5142
|
"name": "PrivateContext::call_private_function",
|
|
4783
|
-
"start":
|
|
5143
|
+
"start": 61487
|
|
4784
5144
|
},
|
|
4785
5145
|
{
|
|
4786
5146
|
"name": "PrivateContext::static_call_private_function",
|
|
4787
|
-
"start":
|
|
5147
|
+
"start": 62689
|
|
4788
5148
|
},
|
|
4789
5149
|
{
|
|
4790
5150
|
"name": "PrivateContext::call_private_function_no_args",
|
|
4791
|
-
"start":
|
|
5151
|
+
"start": 63704
|
|
4792
5152
|
},
|
|
4793
5153
|
{
|
|
4794
5154
|
"name": "PrivateContext::static_call_private_function_no_args",
|
|
4795
|
-
"start":
|
|
5155
|
+
"start": 64557
|
|
4796
5156
|
},
|
|
4797
5157
|
{
|
|
4798
5158
|
"name": "PrivateContext::call_private_function_with_args_hash",
|
|
4799
|
-
"start":
|
|
5159
|
+
"start": 65535
|
|
4800
5160
|
},
|
|
4801
5161
|
{
|
|
4802
5162
|
"name": "PrivateContext::call_public_function",
|
|
4803
|
-
"start":
|
|
5163
|
+
"start": 69434
|
|
4804
5164
|
},
|
|
4805
5165
|
{
|
|
4806
5166
|
"name": "PrivateContext::static_call_public_function",
|
|
4807
|
-
"start":
|
|
5167
|
+
"start": 70701
|
|
4808
5168
|
},
|
|
4809
5169
|
{
|
|
4810
5170
|
"name": "PrivateContext::call_public_function_no_args",
|
|
4811
|
-
"start":
|
|
5171
|
+
"start": 71720
|
|
4812
5172
|
},
|
|
4813
5173
|
{
|
|
4814
5174
|
"name": "PrivateContext::static_call_public_function_no_args",
|
|
4815
|
-
"start":
|
|
5175
|
+
"start": 72619
|
|
4816
5176
|
},
|
|
4817
5177
|
{
|
|
4818
5178
|
"name": "PrivateContext::call_public_function_with_calldata_hash",
|
|
4819
|
-
"start":
|
|
5179
|
+
"start": 73808
|
|
4820
5180
|
},
|
|
4821
5181
|
{
|
|
4822
5182
|
"name": "PrivateContext::set_public_teardown_function",
|
|
4823
|
-
"start":
|
|
5183
|
+
"start": 76336
|
|
4824
5184
|
},
|
|
4825
5185
|
{
|
|
4826
5186
|
"name": "PrivateContext::set_public_teardown_function_with_calldata_hash",
|
|
4827
|
-
"start":
|
|
5187
|
+
"start": 77607
|
|
4828
5188
|
},
|
|
4829
5189
|
{
|
|
4830
5190
|
"name": "PrivateContext::next_counter",
|
|
4831
|
-
"start":
|
|
5191
|
+
"start": 83011
|
|
4832
5192
|
},
|
|
4833
5193
|
{
|
|
4834
5194
|
"name": "<impl Empty for PrivateContext>::empty",
|
|
4835
|
-
"start":
|
|
5195
|
+
"start": 83180
|
|
4836
5196
|
}
|
|
4837
5197
|
],
|
|
4838
|
-
"path": "/
|
|
4839
|
-
"source": "use crate::{\n context::{inputs::PrivateContextInputs, NoteExistenceRequest, NullifierExistenceRequest, ReturnsHash},\n hash::{hash_args, hash_calldata_array},\n keys::constants::{NULLIFIER_INDEX, NUM_KEY_TYPES, OUTGOING_INDEX, public_key_domain_separators},\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 execution_cache,\n key_validation_request::get_key_validation_request,\n logs::notify_created_contract_class_log,\n notes::notify_nullified_note,\n nullifiers::notify_created_nullifier,\n public_call::assert_valid_public_call_data,\n tx_phase::{is_execution_in_revertible_phase, notify_revertible_phase_start},\n },\n};\nuse crate::logging::aztecnr_trace_log_format;\nuse crate::protocol::{\n abis::{\n block_header::BlockHeader,\n call_context::CallContext,\n function_selector::FunctionSelector,\n gas_settings::GasSettings,\n log_hash::LogHash,\n 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, KeyValidationRequestAndSeparator},\n },\n address::{AztecAddress, EthAddress},\n constants::{\n CONTRACT_CLASS_LOG_SIZE_IN_FIELDS, MAX_CONTRACT_CLASS_LOGS_PER_CALL, MAX_ENQUEUED_CALLS_PER_CALL,\n MAX_KEY_VALIDATION_REQUESTS_PER_CALL, MAX_L2_TO_L1_MSGS_PER_CALL, MAX_NOTE_HASH_READ_REQUESTS_PER_CALL,\n MAX_NOTE_HASHES_PER_CALL, MAX_NULLIFIER_READ_REQUESTS_PER_CALL, MAX_NULLIFIERS_PER_CALL,\n MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL, MAX_PRIVATE_LOGS_PER_CALL, MAX_TX_LIFETIME,\n NULL_MSG_SENDER_CONTRACT_ADDRESS, PRIVATE_LOG_CIPHERTEXT_LEN,\n },\n hash::compute_contract_class_log_hash,\n messaging::l2_to_l1_message::L2ToL1Message,\n side_effect::{Counted, scoped::Scoped},\n traits::{Empty, ToField},\n utils::arrays::{ClaimedLengthArray, 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 of every private function, within the\n/// #[external(\"private\")] macro, so you'll never need to consciously instantiate this yourself.\n///\n/// The instance is always named `context`, and it is always be available within the body of every\n/// #[external(\"private\")] function in your smart contract.\n///\n/// > For those used to \"vanilla\" Noir, it might be jarring to have access to > `context` without seeing a declaration\n/// `let context = PrivateContext::new(...)` > 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 > expand all macros, if you dare.\n///\n/// Typical usage for a smart contract developer will be to call getter methods of the PrivateContext.\n///\n/// _Pushing_ data and requests to the context is mostly handled within aztec-nr's own functions, so typically a smart\n/// contract developer won't need to call any setter methods directly.\n///\n/// > Advanced users might occasionally wish to push data to the context > directly for lower-level control. If you\n/// find yourself doing this, please > open an issue on GitHub to describe your use case: it might be that > new\n/// 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 executed)\n/// - See `CallContext` for more data.\n/// - Data relating to the transaction in which this private function is being executed.\n/// - chain_id\n/// - version\n/// - gas_settings\n/// - Provides state access:\n/// - Access to the \"Anchor block\" header. Recall, a private function cannot read from the \"current\" block header, but\n/// must read from some historical block header, because as soon as private function execution begins (asynchronously,\n/// on a user's device), the public state of the chain (the \"current state\") will have progressed forward. We call this\n/// reference the \"Anchor block\". 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 (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 do not trust them. They are instead given\n/// \"app-siloed\" secret keys with a claim that they relate to a master public key. They can then request validation of\n/// this claim, by making a \"key validation request\" to the protocol's kernel circuits (which _are_ allowed to see\n/// certain master secret keys).\n///\n/// ## Advanced Responsibilities\n///\n/// - Ultimately, the PrivateContext is responsible for constructing the PrivateCircuitPublicInputs of the private\n/// function being executed. All private functions on Aztec must have public inputs which adhere to the rigid layout of\n/// the PrivateCircuitPublicInputs, in order to be compatible with the protocol's kernel circuits. A well-known\n/// 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 \"return values\" of the function.\n/// - Most of the so-called \"public inputs\" are kept _private_, and never leak to the outside world, because they are\n/// 'swallowed' by the protocol's kernel circuits before the tx is sent to the network. Only the following are exposed\n/// 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 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 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 the PrivateContext instance to\n/// read/write data. This is why you'll see the arguably-ugly pervasiveness of the \"context\" throughout your smart\n/// contract and the aztec-nr library. For example, `&mut context` is prevalent. In some languages, you can access and\n/// mutate a global variable (such as a PrivateContext instance) from a function without polluting the function's\n/// parameters. With Noir, a function 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 to the PrivateContext, they need to be\n/// handed a mutable reference _to_ the context as a parameter. For example, `Context` is prevalent as a generic\n/// parameter, to give better type safety at compile time. Many `aztec-nr` functions don't make sense if they're called\n/// in a particular runtime (private, public or utility), and so are intentionally only implemented over certain\n/// [Private|Public|Utility]Context structs. This gives smart contract developers a much faster feedback loop if\n/// they're making a mistake, as an 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 inputs: PrivateContextInputs,\n side_effect_counter: u32,\n\n min_revertible_side_effect_counter: u32,\n is_fee_payer: bool,\n\n args_hash: Field,\n return_hash: Field,\n\n pub(crate) expiration_timestamp: u64,\n\n pub(crate) note_hash_read_requests: BoundedVec<Scoped<Counted<Field>>, MAX_NOTE_HASH_READ_REQUESTS_PER_CALL>,\n pub(crate) nullifier_read_requests: BoundedVec<Scoped<Counted<Field>>, MAX_NULLIFIER_READ_REQUESTS_PER_CALL>,\n key_validation_requests_and_separators: BoundedVec<KeyValidationRequestAndSeparator, MAX_KEY_VALIDATION_REQUESTS_PER_CALL>,\n\n pub(crate) note_hashes: BoundedVec<Counted<NoteHash>, MAX_NOTE_HASHES_PER_CALL>,\n pub(crate) nullifiers: BoundedVec<Counted<Nullifier>, MAX_NULLIFIERS_PER_CALL>,\n\n pub(crate) private_call_requests: BoundedVec<PrivateCallRequest, MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL>,\n public_call_requests: BoundedVec<Counted<PublicCallRequest>, MAX_ENQUEUED_CALLS_PER_CALL>,\n public_teardown_call_request: PublicCallRequest,\n 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(crate) anchor_block_header: BlockHeader,\n\n private_logs: BoundedVec<Counted<PrivateLogData>, MAX_PRIVATE_LOGS_PER_CALL>,\n 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. The index of the array corresponds to the key type (0 nullifier, 1\n // incoming, 2 outgoing, 3 tagging).\n last_key_validation_requests: [Option<KeyValidationRequest>; NUM_KEY_TYPES],\n\n expected_non_revertible_side_effect_counter: u32,\n expected_revertible_side_effect_counter: u32,\n}\n\nimpl PrivateContext {\n pub fn new(inputs: PrivateContextInputs, args_hash: Field) -> PrivateContext {\n PrivateContext {\n inputs,\n side_effect_counter: inputs.start_side_effect_counter + 1,\n min_revertible_side_effect_counter: 0,\n is_fee_payer: false,\n args_hash,\n return_hash: 0,\n expiration_timestamp: inputs.anchor_block_header.timestamp() + MAX_TX_LIFETIME,\n note_hash_read_requests: BoundedVec::new(),\n nullifier_read_requests: BoundedVec::new(),\n key_validation_requests_and_separators: 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 (Externally-owned Account), the msg_sender is\n /// \"none\" 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\n /// or 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 pub fn maybe_msg_sender(self) -> Option<AztecAddress> {\n let maybe_msg_sender = self.inputs.call_context.msg_sender;\n if maybe_msg_sender == NULL_MSG_SENDER_CONTRACT_ADDRESS {\n Option::none()\n } else {\n Option::some(maybe_msg_sender)\n }\n }\n\n /// Returns the contract address of the current function being executed.\n ///\n /// This is equivalent to `address(this)` in Solidity (hence the name). Use this to identify the current contract's\n /// address, commonly needed for access control or when interacting with other contracts.\n ///\n /// # Returns\n /// * `AztecAddress` - The contract address of the current function being 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 identifier for the blockchain network this\n /// transaction is executing on.\n ///\n /// Helps prevent cross-chain replay attacks. Useful if implementing 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 under. Different versions may have\n /// different rules, opcodes, or 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 transaction, similar to `tx.gasprice` and gas\n /// limits in Ethereum. However, Aztec has a more sophisticated gas model with separate accounting for L2\n /// 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 to access this.\n ///\n /// This is similar to `msg.sig` in Solidity, which returns the first 4 bytes of the function signature. In Aztec,\n /// the selector uniquely 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- enshrined concept. The function\n /// selectors of private functions are 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 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 whether this call is being executed as part of a static call.\n ///\n /// Similar to Solidity's `STATICCALL`, a static call is read-only: neither this function nor any of its nested\n /// calls may emit side-effects (new notes, nullifiers, logs, L2->L1 messages, etc.). A call is considered static\n /// if it was invoked as a static call or if any of its ancestor calls were.\n ///\n /// # Returns\n /// * `bool` - `true` if this call (or an ancestor call) is a static call.\n ///\n pub fn is_static_call(self) -> bool {\n self.inputs.call_context.is_static_call\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\")] macro calls this, and it\n /// makes the arguments neatly available to the 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 /// Returns the current value of the side-effect counter, i.e. the counter that will be assigned to the next\n /// side-effect emitted by this function.\n ///\n /// Low-level function: Ordinarily, smart contract developers will not need to access this. See `next_counter` for\n /// details on how side-effect counters are assigned and why they exist.\n ///\n /// # Returns\n /// * `u32` - The current side-effect counter.\n ///\n pub fn get_side_effect_counter(self) -> u32 {\n self.side_effect_counter\n }\n\n /// Pushes a new note_hash to the Aztec blockchain's global Note Hash Tree (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 to manually call this. Aztec-nr's state\n /// variables (see `../state_vars/`) 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 note_hash into the protocol's \"note\n /// hash tree\" (in the Base Rollup circuit). Before insertion, the protocol will:\n /// - \"Silo\" the `note_hash` with the contract address of this function, to yield a `siloed_note_hash`. This\n /// prevents state collisions between different smart contracts.\n /// - Ensure uniqueness of the `siloed_note_hash`, to prevent Faerie-Gold attacks, by hashing the\n /// `siloed_note_hash` with a unique value, to 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 of the newly-created note to the PXE, via\n /// the `notify_created_note` oracle.\n ///\n /// > Advanced users might occasionally wish to push data to the context > directly for lower-level control. If you\n /// find yourself doing this, > please open an issue on GitHub to describe your use case: it might be > that new\n /// 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 /// Creates a new [nullifier](crate::nullifier).\n ///\n /// ## Safety\n ///\n /// This is a low-level function that must be used with great care to avoid subtle corruption of contract state.\n /// Instead of calling this function, consider using the higher-level [`crate::state_vars::SingleUseClaim`].\n ///\n /// In particular, callers must ensure all nullifiers created by a contract are properly domain-separated, so that\n /// unrelated components don't interfere with one another (e.g. a transaction nullifier accidentally marking a\n /// variable as initialized). Only [`PrivateContext::push_nullifier_for_note_hash`] should be used for note\n /// nullifiers, never this one.\n ///\n /// ## Advanced\n ///\n /// The raw `nullifier` is not what is inserted into the Aztec state tree: it will be first siloed by contract\n /// address via [`crate::protocol::hash::compute_siloed_nullifier`] in order to prevent accidental or malicious\n /// interference of nullifiers from different contracts.\n pub fn push_nullifier_unsafe(&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 /// Creates a new [nullifier](crate::nullifier) associated with a note.\n ///\n /// This is a variant of [`PrivateContext::push_nullifier_unsafe`] that is used for note nullifiers, i.e.\n /// nullifiers that correspond to a note. If a note and its nullifier are created in the same transaction, then\n /// the private kernels will 'squash' these values, deleting them both as if they never existed and reducing\n /// transaction fees.\n ///\n /// The `nullification_note_hash` must be the result of calling\n /// [`crate::note::utils::compute_confirmed_note_hash_for_nullification`] for pending notes, and `0` for settled\n /// notes (which cannot be squashed).\n ///\n /// ## Safety\n ///\n /// This is a low-level function that must be used with great care to avoid subtle corruption of contract state.\n /// Instead of calling this function, consider using the higher-level [`crate::note::lifecycle::destroy_note`].\n ///\n /// The precautions listed for [`PrivateContext::push_nullifier_unsafe`] apply here as well, and callers should\n /// additionally ensure `nullification_note_hash` corresponds to a note emitted by this contract, with its hash\n /// computed in the same transaction execution phase as the call to this function. Finally, only this function\n /// should be used for note nullifiers, never [`PrivateContext::push_nullifier_unsafe`].\n ///\n /// Failure to do these things can result in unprovable contexts, accidental deletion of notes, or double-spend\n /// attacks.\n pub fn push_nullifier_for_note_hash(&mut self, nullifier: Field, nullification_note_hash: Field) {\n let nullifier_counter = self.next_counter();\n notify_nullified_note(nullifier, nullification_note_hash, nullifier_counter);\n self.nullifiers.push(Nullifier { value: nullifier, note_hash: nullification_note_hash }.count(\n nullifier_counter,\n ));\n }\n\n /// Returns the anchor block header - the historical block header that this private function is reading from.\n ///\n /// A private function CANNOT read from the \"current\" block header, but must read from some older block header,\n /// because as soon as private function execution begins (asynchronously, on a user's device), the public state of\n /// the chain (the \"current state\") will have progressed 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 `expiration_timestamp` of every tx is at most 24 hours beyond the timestamp of\n /// the tx's chosen anchor block header. This enables the network's nodes to safely prune old txs from the mempool.\n /// Therefore, the chosen block header _must_ be one 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 block.\n ///\n /// This enables private contracts to access information from even older blocks than the anchor block header.\n ///\n /// Useful for time-based contract logic that needs to compare against multiple historical points.\n ///\n /// # Arguments\n /// * `block_number` - The block number to retrieve (must be <= anchor 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 PXE. Depending on how much blockchain\n /// data the user's PXE has been set up to store, this might require a query from the PXE to another Aztec node to\n /// get the data. > 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 Archive Tree. In fact, the i-th block\n /// header gets stored at the i-th leaf index of the Archive Tree. Behind the scenes, this `get_block_header_at`\n /// function will add Archive Tree merkle-membership constraints (~3k) to your smart contract function's circuit,\n /// to prove 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 same block header, because each call\n /// will add duplicate constraints.\n ///\n /// Calling this function is more expensive (constraint-wise) than getting the anchor block header (via\n /// `get_block_header`). This is because the 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 private functions of a tx share a common\n /// anchor block header. Therefore, the cost (constraint-wise) of calling `get_block_header` is effectively 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 ensure compatibility with the protocol's\n /// kernel circuits.\n ///\n /// Very low-level function: This function is automatically called by the #[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 expiration_timestamp: self.expiration_timestamp,\n note_hash_read_requests: ClaimedLengthArray::from_bounded_vec(self.note_hash_read_requests),\n nullifier_read_requests: ClaimedLengthArray::from_bounded_vec(self.nullifier_read_requests),\n key_validation_requests_and_separators: ClaimedLengthArray::from_bounded_vec(\n self.key_validation_requests_and_separators,\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(self.contract_class_logs_hashes),\n anchor_block_header: self.anchor_block_header,\n tx_context: self.inputs.tx_context,\n expected_non_revertible_side_effect_counter: self.expected_non_revertible_side_effect_counter,\n expected_revertible_side_effect_counter: self.expected_revertible_side_effect_counter,\n tx_request_salt: self.inputs.tx_request_salt,\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 allows any contract to voluntarily pay\n /// transaction fees. This enables patterns like sponsored transactions or fee abstraction where users don't need\n /// to hold fee-juice themselves. (Fee juice is a fee-paying asset for Aztec).\n ///\n /// Only one contract per transaction can declare itself as the fee payer, and it must have sufficient fee-juice\n /// balance (>= the gas limits specified in the TxContext) by the time we reach the public setup phase of the tx.\n ///\n pub fn set_as_fee_payer(&mut self) {\n aztecnr_trace_log_format!(\"Setting {0} as fee payer\")([self.this_address().to_field()]);\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 = unsafe { is_execution_in_revertible_phase(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 (aka Fee-payment contracts) will need\n /// to make use of this function.\n ///\n /// Aztec supports a three-phase execution model: setup, app logic, teardown. The phases exist to enable a fee\n /// payer to take on the risk of paying a transaction fee, safe in the knowledge that their payment (in whatever\n /// token or method the user chooses) will succeed, regardless of whether the app logic will succeed. The \"setup\"\n /// phase enables such a payment to be made, because the setup phase _cannot revert_: a reverting function within\n /// the setup phase would result in an invalid block which cannot be proven. Any side-effects generated during that\n /// phase are guaranteed to be inserted into Aztec's state trees (except for squashed notes & nullifiers, of\n /// course).\n ///\n /// Even though the end of the setup phase is declared within a private function, you might have noticed that\n /// _public_ functions can also execute within the setup phase. This is because any public function calls which\n /// were enqueued _within the setup phase_ by a private 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 PrivateContext's _current_ side effect\n /// counter.\n ///\n pub fn end_setup(&mut self) {\n // We bump the counter twice: once so that `min_revertible_side_effect_counter` sits strictly above any\n // non-revertible side effect counter (including queries made via `in_revertible_phase` before this call), and\n // once more so that the next revertible side effect counter is strictly greater than\n // `min_revertible_side_effect_counter`. This ensures `min_revertible_side_effect_counter` occupies a gap that\n // no side effect takes, which the kernel relies on when validating the phase split.\n self.side_effect_counter += 1;\n self.min_revertible_side_effect_counter = self.side_effect_counter;\n self.side_effect_counter += 1;\n\n aztecnr_trace_log_format!(\n \"Ending setup, minimum revertible side effect counter is {0}\",\n )(\n [self.min_revertible_side_effect_counter as Field],\n );\n notify_revertible_phase_start(self.min_revertible_side_effect_counter);\n }\n\n /// Sets a deadline (an \"include-by timestamp\") for when this transaction must be included in a block.\n ///\n /// Other functions in this tx might call this setter with differing values for the include-by timestamp. To ensure\n /// that all functions' deadlines are met, the _minimum_ of all these include-by timestamps will be exposed when\n /// this tx is submitted to the network.\n ///\n /// If the transaction is not included in a block by its include-by timestamp, it becomes invalid and it will never\n /// be included.\n ///\n /// This expiry timestamp is publicly visible. See the \"Advanced\" section for privacy concerns.\n ///\n /// # Arguments\n /// * `expiration_timestamp` - Unix timestamp (seconds) deadline for inclusion. The include-by timestamp of this tx\n /// will be _at most_ the timestamp specified.\n ///\n /// # Advanced\n /// * If multiple functions set differing `expiration_timestamp`s, the kernel circuits will set it to be the\n /// _minimum_ of the two. This 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 24 hours of their chosen anchor block's\n /// timestamp, to enable safe mempool pruning.\n /// * The DelayedPublicMutable design makes heavy use of this functionality, to enable private functions to read\n /// public state.\n /// * A sophisticated Wallet should cleverly set an include-by timestamp to improve the privacy of the user and the\n /// network as a whole. For example, if a contract interaction sets include-by to some publicly-known value (e.g.\n /// the time when a contract upgrades), then the wallet might wish to set an even lower one to avoid revealing that\n /// this tx is interacting with said contract. Ideally, all wallets should standardize on an approach in order to\n /// provide users with a large privacy set -- although the exact approach\n /// will need to be discussed. Wallets that deviate from a standard might accidentally reveal which wallet each\n /// transaction originates from.\n ///\n // docs:start:expiration-timestamp\n pub fn set_expiration_timestamp(&mut self, expiration_timestamp: u64) {\n // docs:end:expiration-timestamp\n self.expiration_timestamp = std::cmp::min(self.expiration_timestamp, expiration_timestamp);\n }\n\n /// Asserts that a note has been created.\n ///\n /// This function will cause the transaction to fail unless the requested note exists. This is the preferred\n /// mechanism for performing this check, and the only one that works for pending notes.\n ///\n /// ## Pending Notes\n ///\n /// Both settled notes (created in prior transactions) and pending notes (created in the current transaction) will\n /// be considered by this function. Pending notes must have been created **before** this call is made for the check\n /// to pass.\n ///\n /// ## Historical Notes\n ///\n /// If you need to assert that a note existed _by some specific block in the past_, instead of simply proving that\n /// it exists by the current anchor block, use [`crate::history::note::assert_note_existed_by`] instead.\n ///\n /// ## Cost\n ///\n /// This uses up one of the call's kernel note hash read requests, which are limited. Like all kernel requests,\n /// proving time costs are only incurred when the total number of requests exceeds the kernel's capacity, requiring\n /// an additional invocation of the kernel reset circuit.\n pub fn assert_note_exists(&mut self, note_existence_request: NoteExistenceRequest) {\n // Note that the `note_hash_read_requests` array does not hold `NoteExistenceRequest` objects, but rather a\n // custom kernel type. We convert from the aztec-nr type into it.\n\n let note_hash = note_existence_request.note_hash();\n let contract_address = note_existence_request.maybe_contract_address().unwrap_or(AztecAddress::zero());\n\n let side_effect = Scoped::new(\n Counted::new(note_hash, self.next_counter()),\n contract_address,\n );\n\n self.note_hash_read_requests.push(side_effect);\n }\n\n /// Asserts that a nullifier has been emitted.\n ///\n /// This function will cause the transaction to fail unless the requested nullifier exists. This is the preferred\n /// mechanism for performing this check, and the only one that works for pending nullifiers.\n ///\n /// ## Pending Nullifiers\n ///\n /// Both settled nullifiers (emitted in prior transactions) and pending nullifiers (emitted in the current\n /// transaction) will be considered by this function. Pending nullifiers must have been emitted **before** this\n /// call is made for the check to pass.\n ///\n /// ## Historical Nullifiers\n ///\n /// If you need to assert that a nullifier existed _by some specific block in the past_, instead of simply proving\n /// that it exists by the current anchor block, use [`crate::history::nullifier::assert_nullifier_existed_by`]\n /// instead.\n ///\n /// ## Public vs Private\n ///\n /// In general, it is unsafe to check for nullifier non-existence in private, as that will not consider the\n /// possibility of the nullifier having been emitted in any transaction between the anchor block and the inclusion\n /// block. Private functions instead prove existence via this function and 'prove' non-existence by _emitting_ the\n /// nullifer, which would cause the transaction to fail if the nullifier existed.\n ///\n /// This is not the case in public functions, which do have access to the tip of the blockchain and so can reliably\n /// prove whether a nullifier exists or not via\n /// [`crate::context::public_context::PublicContext::nullifier_exists_unsafe`].\n ///\n /// ## Cost\n ///\n /// This uses up one of the call's kernel nullifier read requests, which are limited. Like all kernel requests,\n /// proving time costs are only incurred when the total number of requests exceeds the kernel's capacity, requiring\n /// an additional invocation of the kernel reset circuit.\n pub fn assert_nullifier_exists(&mut self, nullifier_existence_request: NullifierExistenceRequest) {\n let nullifier = nullifier_existence_request.nullifier();\n let contract_address = nullifier_existence_request.maybe_contract_address().unwrap_or(AztecAddress::zero());\n\n let request = Scoped::new(\n Counted::new(nullifier, self.next_counter()),\n contract_address,\n );\n\n self.nullifier_read_requests.push(request);\n }\n\n /// Requests the app-siloed nullifier hiding key (nhk_app) for the given (hashed) master nullifier public key\n /// (npk_m), from the user's PXE.\n ///\n /// Advanced function: Only needed if you're designing your own notes and/or nullifiers.\n ///\n /// Contracts are not allowed to compute nullifiers for other contracts, as that would let them read parts of their\n /// private state. Because of this, a contract is only given an \"app-siloed key\", which is constructed by\n /// hashing the user's master nullifier hiding key with the contract's address. However, because contracts cannot\n /// be trusted with a user's master nullifier hiding key (because we don't know which contracts are honest or\n /// malicious), the PXE refuses to provide any master secret keys to any app smart contract function. This means\n /// app functions are unable to prove that the derivation of an app-siloed nullifier hiding key has been computed\n /// correctly. Instead, an app function can request to the kernel (via `request_nhk_app`) that it validates the\n /// siloed derivation, since the kernel has been vetted to not leak any master secret keys.\n ///\n /// A common nullification scheme is to inject a nullifier hiding key into the preimage of a nullifier, to make the\n /// nullifier deterministic but 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 whose PXE is executing this function.\n ///\n /// # Returns\n /// * The app-siloed nullifier hiding key that corresponds to the given `npk_m_hash`.\n ///\n pub fn request_nhk_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 outgoing viewing secret key (ovsk_app) for the given (hashed) master outgoing\n /// viewing public key (ovpk_m), from the user's PXE.\n ///\n /// See `request_nhk_app` and `request_sk_app` for more info.\n ///\n /// The intention of the \"outgoing\" keypair is to provide a second secret key for all of a user's outgoing activity\n /// (i.e. for notes that a user creates, as opposed to notes that a user receives from others). The separation of\n /// incoming and outgoing data was a distinction made by zcash, with the intention of enabling a user to optionally\n /// share with a 3rd party a controlled view of only incoming or outgoing notes. Similar functionality of sharing\n /// select data can be achieved with offchain zero-knowledge proofs. It is up to an app developer whether they\n /// choose to make use of a user's outgoing keypair within their application logic, or instead simply use the same\n /// keypair (the address keypair (which is effectively the same as the \"incoming\" keypair)) for all incoming &\n /// outgoing messages to a user.\n ///\n /// Currently, all of the exposed encryption functions in aztec-nr ignore the outgoing viewing keys, and instead\n /// encrypt all note logs and event 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, because we do not trust them. They are\n /// instead given \"app-siloed\" secret keys with a claim that they relate to a master public key. They can then\n /// request validation of this claim, by making a \"key validation request\" to the protocol's kernel circuits (which\n /// _are_ allowed to see certain master secret keys).\n ///\n /// The app circuit only sees `pk_m_hash` (not the raw point). The kernel derives the\n /// point from `sk_m`, hashes it, and asserts equality. When a Key Validation Request tuple of\n /// (sk_app, pk_m_hash, app_address) is submitted to the kernel, it performs the following\n /// derivations to validate the relationship between the claimed sk_app and the user's pk_m_hash:\n ///\n /// (sk_m) ----> * G ----> pk_m ----> hash_public_key(pk_m)\n /// | |\n /// v | We use the kernel to prove this\n /// h(sk_m, app_address) | sk_app-pk_m_hash 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 that a Key Validation Request will be\n /// emitted to the kernel.\n ///\n fn request_sk_app(&mut self, pk_m_hash: Field, key_index: Field) -> Field {\n // Match against the cache only when a request is actually present in the slot.\n let cached_slot = self.last_key_validation_requests[key_index as u32];\n let cache_hit = cached_slot.is_some() & (cached_slot.unwrap_unchecked().pk_m_hash == pk_m_hash);\n\n if cache_hit {\n // We get a match so the cached request is the latest one\n cached_slot.unwrap_unchecked().sk_app\n } else {\n // We didn't get a match meaning the cached result is stale. Typically we'd validate keys by showing that\n // the master secret key derives to a public key matching `pk_m_hash`, but that'd require the oracle\n // returning the master secret keys, which could cause malicious contracts to leak it or learn about\n // secrets from other contracts. We therefore silo secret keys, and rely on the private kernel to validate\n // that the siloed secret key corresponds to correct siloing of the master secret key that hashes to\n // `pk_m_hash`.\n\n // Safety: Kernels verify that the key validation request is valid and below we verify that a request for\n // 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 key validation request for wrong pk_m_hash\");\n\n self.key_validation_requests_and_separators.push(\n KeyValidationRequestAndSeparator {\n request,\n key_type_domain_separator: public_key_domain_separators[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 contract on Ethereum (L1). L1 contracts\n /// which are designed to send/receive messages to/from Aztec are called \"Portal Contracts\".\n ///\n /// Common use cases include withdrawals, cross-chain asset transfers, and triggering L1 actions based on L2 state\n /// changes.\n ///\n /// The message will be inserted into an Aztec \"Outbox\" contract on L1, when this transaction's block is proposed\n /// to L1. Sending the message will not result in any immediate state changes in the target portal contract. The\n /// message will need to be manually consumed from the Outbox through a separate Ethereum transaction: a user will\n /// need to call a function of the portal contract -- a function specifically designed to make a call to the Outbox\n /// to consume the message. The message will only be available for consumption once the _epoch_ proof has been\n /// submitted. Given that there are multiple Aztec blocks within an epoch, it might take some time for this epoch\n /// proof to be 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). This content has a very\n /// specific layout. 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 triggering L2 actions based on L1 events.\n ///\n /// Use this function if you only want the message to ever be \"referred to\" once. Once consumed using this method,\n /// the message cannot be consumed again, because a nullifier is emitted. If your use case wants for the message to\n /// be read unlimited times, then 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 on L1. Sending the message will not\n /// result in any immediate state changes in the target L2 contract. The message will need to be manually consumed\n /// by the target contract through a separate Aztec transaction. The message will not be available for consumption\n /// immediately. Messages get copied over from the L1 Inbox to L2 by the next Proposer in batches. So you will need\n /// to wait until the messages are copied before you can 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 the message to prevent\n /// double-consumption.\n pub fn consume_l1_to_l2_message(&mut self, content: Field, secret: Field, sender: EthAddress, leaf_index: Field) {\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_unsafe(nullifier)\n }\n\n /// Emits a private log (an array of Fields) that will be published to an Ethereum blob.\n ///\n /// Private logs are intended for the broadcasting of ciphertexts: that is, encrypted events or encrypted note\n /// contents. Since the data in the logs is meant to be _encrypted_, private_logs are broadcast to publicly-visible\n /// Ethereum blobs. The intended recipients of such encrypted messages can then discover and decrypt these\n /// encrypted logs using their viewing secret key. (See `../messages/discovery` for more details).\n ///\n /// Important note: This function DOES NOT _do_ any encryption of the input `log` fields. This function blindly\n /// publishes whatever input `log` data 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 encryption.\n ///\n /// The protocol does not dictate what encryption scheme should be used: a smart contract developer can choose\n /// whatever encryption scheme they like. Aztec-nr includes some off-the-shelf encryption libraries that developers\n /// might wish to use, for convenience. These libraries not only encrypt a plaintext (to produce a ciphertext);\n /// they also prepend the ciphertext with a `tag` and `ephemeral public key` for easier message discovery. This is\n /// a very dense topic, and we will be writing more libraries and docs soon.\n ///\n /// > Currently, AES128 CBC encryption is the main scheme included in > aztec.nr. > We are currently making\n /// significant changes to the interfaces of the > encryption library.\n ///\n /// In some niche use cases, an app might be tempted to publish _un-encrypted_ data via a private log, because\n /// _public logs_ are not available to private functions. Be warned that emitting public data via private logs is\n /// strongly discouraged, and is considered a \"privacy anti-pattern\", because it reveals identifiable information\n /// about _which_ function has been executed. A tx which leaks such information does not contribute to the privacy\n /// set of the network.\n ///\n /// * Unlike `emit_raw_note_log_unsafe`, this log is not tied to any specific note\n ///\n /// # Arguments\n /// * `tag` - A tag placed at `fields[0]` of the emitted log. Used by recipients and nodes to identify and\n /// filter for relevant logs without scanning all of them.\n /// * `log` - The log data that will be publicly broadcast (so make sure it's already been encrypted before you\n /// call this function). Private logs are bounded in size (`PRIVATE_LOG_CIPHERTEXT_LEN`), to encourage all logs\n /// from all smart contracts look identical. The protocol's kernel circuits can then append random fields as\n /// \"padding\" after the log's length, so that the logs of this smart contract look indistinguishable from (the\n /// same length as) the logs of all other applications. It's up to wallets how much padding to apply, so\n /// ideally all wallets should agree on standards for this.\n ///\n /// ## Safety\n ///\n /// The `tag` should be domain-separated (e.g. via [`crate::protocol::hash::compute_log_tag`]) to prevent\n /// collisions between logs from different sources. Without domain separation, two unrelated log types that\n /// happen to share a raw tag value become indistinguishable. Prefer the higher-level APIs\n /// ([`crate::messages::delivery::MessageDelivery`] for messages, `self.emit(event)` for events) which\n /// handle tagging automatically.\n pub fn emit_private_log_unsafe(&mut self, tag: Field, log: BoundedVec<Field, PRIVATE_LOG_CIPHERTEXT_LEN>) {\n self.emit_raw_note_log_unsafe(tag, log, 0);\n }\n\n /// Emits a private log that is explicitly tied to a newly-emitted note_hash, to convey to the kernel: \"this log\n /// relates to this note\".\n ///\n /// This linkage is important in case the note gets squashed (due to being read later in this same tx), since we\n /// can then squash the log as well.\n ///\n /// See [`emit_private_log_unsafe`](PrivateContext::emit_private_log_unsafe) for more info about private log\n /// emission.\n ///\n /// # Arguments\n /// * `tag` - A tag placed at `fields[0]`. See\n /// [`emit_private_log_unsafe`](PrivateContext::emit_private_log_unsafe).\n /// * `log` - The log data as a `BoundedVec` of Field elements.\n /// * `note_hash_counter` - The side-effect counter that was assigned to the new note_hash when it was pushed to\n /// this `PrivateContext`.\n ///\n /// Important: If your application logic requires the log to always be emitted regardless of note squashing,\n /// consider using [`emit_private_log_unsafe`](PrivateContext::emit_private_log_unsafe) instead, or emitting\n /// additional events.\n ///\n /// ## Safety\n ///\n /// Same as [`PrivateContext::emit_private_log_unsafe`]: the `tag` should be domain-separated.\n pub fn emit_raw_note_log_unsafe(\n &mut self,\n tag: Field,\n log: BoundedVec<Field, PRIVATE_LOG_CIPHERTEXT_LEN>,\n note_hash_counter: u32,\n ) {\n let counter = self.next_counter();\n let full_log = [tag].concat(log.storage());\n let private_log = PrivateLogData { log: PrivateLog::new(full_log, log.len() + 1), note_hash_counter };\n self.private_logs.push(private_log.count(counter));\n }\n\n /// Emits large data blobs.\n ///\n /// This reuses the Contract Class Log channel to emit blobs of up to [`CONTRACT_CLASS_LOG_SIZE_IN_FIELDS`].\n ///\n /// ## Privacy\n ///\n /// The address of the contract emitting these blobs is revelead.\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\n // to save blob space.\n // Safety: The below length is constrained in the base rollup, which will make sure that all the fields beyond\n // length are zero. However, it won't be able to check that we didn't add extra padding (trailing zeroes) or\n // that we cut trailing zeroes from the end.\n let length = unsafe { trimmed_array_length_hint(log) };\n // We hash the entire padded log to ensure a user cannot pass a shorter length and so emit incorrect shorter\n // bytecode.\n let log_hash = compute_contract_class_log_hash(log_to_emit);\n // Safety: the below only exists to broadcast the raw log, so we can provide it to the base rollup later to be\n // constrained.\n unsafe {\n notify_created_contract_class_log(contract_address, log_to_emit, length, counter);\n }\n\n self.contract_class_logs_hashes.push(LogHash { value: log_hash, length: length }.count(counter));\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 `.get_preimage()` to extract the actual\n /// return values.\n ///\n /// This enables contracts to interact with each other while maintaining privacy. This \"composability\" of private\n /// contract functions is a key feature of the Aztec network.\n ///\n /// If a user's transaction includes multiple private function calls, then by the design of Aztec, the following\n /// information will remain private[1]:\n /// - The function selectors and contract addresses of all private function calls will remain private, so an\n /// observer of the public mempool will not be able to look at a tx and deduce which private functions have been\n /// executed.\n /// - The arguments and return values of all private function calls will 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 private function calls will (if designed\n /// well) not leak any user secrets, nor leak which functions have been executed.\n ///\n /// [1] Caveats: Some of these privacy guarantees depend on how app developers design their smart contracts. Some\n /// actions _can_ leak information, such as:\n /// - Calling an internal public function.\n /// - Calling a public function and not setting msg_sender to Option::none (feature not built yet - see github).\n /// - Calling any public function will always leak details about the nature of the transaction, so devs should be\n /// careful in their contract designs. If it can be done in a private function, then that will give the best\n /// privacy.\n /// - Not padding the side-effects of a tx to some standardized, uniform size. The kernel circuits can take hints\n /// to pad side-effects, so a wallet should be able to request for a particular amount of padding. Wallets should\n /// 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 size. See also:\n /// 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 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(contract_address, function_selector, args_hash, false)\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 cannot modify state, emit L2->L2 messages, nor\n /// emit events. Any nested calls are constrained to also be staticcalls.\n ///\n /// See `call_private_function` for more general info on private function 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 `.get_preimage()` to extract the actual\n /// 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(contract_address, function_selector, args_hash, true)\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 require any input parameters. It's\n /// equivalent to `call_private_function` 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 `.get_preimage()` to extract the actual\n /// 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 the safety of\n /// `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 `.get_preimage()` to extract the actual\n /// 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 call methods. Instead of taking raw\n /// arguments, it accepts a 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 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 the number of\n // side effects that took place), along with the hash of the return values. We validate these by requesting a\n // private kernel iteration in which the return values are constrained to hash to `returns_hash` and the side\n // 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 // The kernel circuits ensure that end_side_effect_counter is greater than start_side_effect_counter, and that\n // all side effects emitted in the child call have counters within the range [start_side_effect_counter,\n // end_side_effect_counter]. Therefore, we only need to ensure that the next side effect from the current call\n // starts after the end side effect from the child call.\n self.side_effect_counter = end_side_effect_counter + 1;\n\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, public function calls are \"enqueued\"\n /// and executed some time later by a block proposer.\n ///\n /// This means a public function cannot return any values back to a private function, because by the time the\n /// public function is being executed, the private function which called it has already completed execution. (In\n /// fact, the private function has been executed and proven, along with all other private function calls of the\n /// user's tx. A single proof of the tx has been submitted to the Aztec network, and some time later a proposer has\n /// picked the tx up from the mempool and begun executing all of the enqueued public functions).\n ///\n /// # Privacy warning Enqueueing a public function call is an inherently leaky action. Many interesting applications will require some interaction with public state, but smart contract developers should try to use public function calls sparingly, and carefully. _Internal_ public function calls are especially leaky, because they completely leak which private contract made the call. 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 `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(contract_address, calldata_hash, false, hide_msg_sender)\n }\n\n /// Enqueues a read-only call to a public function.\n ///\n /// This is similar to Solidity's `staticcall`. The called function cannot modify state or emit events. Any nested\n /// calls are constrained to also be staticcalls.\n ///\n /// See also `call_public_function` for more important information about 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 `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(contract_address, calldata_hash, true, hide_msg_sender)\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 take any input parameters. It's otherwise\n /// equivalent to `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 `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(contract_address, calldata_hash, false, hide_msg_sender)\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 the safety of\n /// `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 `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(contract_address, calldata_hash, true, hide_msg_sender)\n }\n\n /// Low-level public function call.\n ///\n /// This is the underlying implementation used by all other public function call methods. Instead of taking raw\n /// arguments, it accepts a hash of the arguments.\n ///\n /// Advanced function: Most developers should use `call_public_function` or `static_call_public_function` instead.\n /// This function is exposed for 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 `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 is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n\n assert_valid_public_call_data(calldata_hash);\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 = 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 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 (aka Fee-payment contracts) will need\n /// to make use of this function.\n ///\n /// Aztec supports a three-phase execution model: setup, app logic, teardown. The phases exist to enable a fee\n /// payer to take on the risk of paying a transaction fee, safe in the knowledge that their payment (in whatever\n /// token or method the user chooses) will succeed, regardless of whether the app logic will succeed. The \"setup\"\n /// phase ensures the fee payer has sufficient balance to pay the proposer their fees. The teardown phase is\n /// primarily intended to: calculate exactly 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 tx side-effects) might exceed the refund\n /// amount. For app logic with fairly stable and predictable gas consumption, a material refund amount is unlikely.\n /// For app logic with unpredictable gas consumption, a refund might be important to the user (e.g. if a hefty\n /// function reverts very early). Wallet/FPC/Paymaster developers should be mindful of this.\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract containing the teardown 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 `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(contract_address, calldata_hash, false, hide_msg_sender)\n }\n\n /// Low-level function to set the public teardown function.\n ///\n /// This is the underlying implementation for setting the teardown function call that will execute at the end of\n /// the transaction. Instead of taking raw arguments, it accepts a hash of the arguments.\n ///\n /// Advanced function: Most developers should use `set_public_teardown_function` instead.\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract containing the teardown 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 `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 is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n\n assert_valid_public_call_data(calldata_hash);\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\", based on when it is created. This\n /// PrivateContext is in charge of assigning the counters.\n ///\n /// The reason we have side-effect counters is complicated. Consider this illustrative pseudocode of inter-contract\n /// 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 counter of each side-effect, and what\n /// the new value of `x` is.\n ///\n /// These (private) functions are processed by Aztec's kernel circuits in an order that is different from execution\n /// order: All of A.a1 is proven before B.b is proven, before A.a2 is proven. So when we're in the 2nd execution\n /// frame of A.a1 (after the call to B.b), the circuit needs to justify why x went from being `6` to `36`. But the\n /// circuit doesn't know why, and given the order of proving, the kernel hasn't _seen_ a value of 36 get written\n /// yet. The kernel needs to track big arrays of all side-effects of all private functions in a tx. Then, as it\n /// recurses and processes B.b(), it will eventually see a value of 36 get written.\n ///\n /// Suppose side-effect counters weren't exposed: The kernel would only see this ordering (in order of proof\n /// verification): [ 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 it can't see what's going on within an\n /// app circuit. So the kernel wouldn't know that the ordering of reads and writes should actually be: [ A.a1.read,\n /// 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 assign side-effect counters alongside\n /// every side-effect that it emits, and also expose to the kernel the counters that it started and ended with.\n /// This gives the kernel enough information to arrange all side-effects in the correct order. It can then catch\n /// (for example) if a function tries to read state before it has been written (e.g. if A.a2() maliciously tried to\n /// read 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 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 start and end counters' range. The kernel\n /// will catch 2. The kernel will not catch 1., but this would only cause corruption to the private state of the\n /// malicious contract, and not any other contracts (because a contract can only modify its own state). If a \"good\"\n /// contract is given _read access_ to a maliciously-counting contract (via an external getter function, or by\n /// reading historic state from the archive tree directly), and they then make state changes to their _own_ state\n /// accordingly, that could be dangerous. Developers should be mindful not to trust the claimed innards of external\n /// contracts unless they have audited/vetted the contracts including vetting the side-effect counter\n /// incrementation. This is a similar paradigm to Ethereum smart contract development: you must vet external\n /// contracts that your contract relies upon, and you must not make any presumptions about their claimed behaviour.\n /// (Hopefully if a contract imports a version of aztec-nr, we will get contract verification tooling that can\n /// validate the authenticity of the imported aztec-nr package, and hence infer that the side- effect counting will\n /// be correct, without having to re-audit such logic 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 expiration_timestamp: 0,\n note_hash_read_requests: BoundedVec::new(),\n nullifier_read_requests: BoundedVec::new(),\n key_validation_requests_and_separators: 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"
|
|
5198
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/context/private_context.nr",
|
|
5199
|
+
"source": "use crate::{\n context::{inputs::PrivateContextInputs, NoteExistenceRequest, NullifierExistenceRequest, ReturnsHash},\n hash::{hash_args, hash_calldata_array},\n keys::constants::{NULLIFIER_INDEX, NUM_KEY_TYPES, OUTGOING_INDEX, public_key_domain_separators},\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 execution_cache,\n key_validation_request::get_key_validation_request,\n logs::notify_created_contract_class_log,\n notes::notify_nullified_note,\n nullifiers::notify_created_nullifier,\n public_call::assert_valid_public_call_data,\n tx_phase::{is_execution_in_revertible_phase, notify_revertible_phase_start},\n },\n};\nuse crate::logging::aztecnr_trace_log_format;\nuse crate::protocol::{\n abis::{\n block_header::BlockHeader,\n call_context::CallContext,\n function_selector::FunctionSelector,\n gas_settings::GasSettings,\n log_hash::LogHash,\n 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, KeyValidationRequestAndSeparator},\n },\n address::{AztecAddress, EthAddress},\n constants::{\n CONTRACT_CLASS_LOG_SIZE_IN_FIELDS, MAX_CONTRACT_CLASS_LOGS_PER_CALL, MAX_ENQUEUED_CALLS_PER_CALL,\n MAX_KEY_VALIDATION_REQUESTS_PER_CALL, MAX_L2_TO_L1_MSGS_PER_CALL, MAX_NOTE_HASH_READ_REQUESTS_PER_CALL,\n MAX_NOTE_HASHES_PER_CALL, MAX_NULLIFIER_READ_REQUESTS_PER_CALL, MAX_NULLIFIERS_PER_CALL,\n MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL, MAX_PRIVATE_LOGS_PER_CALL, MAX_TX_LIFETIME,\n NULL_MSG_SENDER_CONTRACT_ADDRESS, PRIVATE_LOG_CIPHERTEXT_LEN,\n },\n hash::compute_contract_class_log_hash,\n messaging::l2_to_l1_message::L2ToL1Message,\n side_effect::{Counted, scoped::Scoped},\n traits::{Empty, ToField},\n utils::arrays::{ClaimedLengthArray, 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 of every private function, within the\n/// #[external(\"private\")] macro, so you'll never need to consciously instantiate this yourself.\n///\n/// The instance is always named `context`, and it is always be available within the body of every\n/// #[external(\"private\")] function in your smart contract.\n///\n/// > For those used to \"vanilla\" Noir, it might be jarring to have access to > `context` without seeing a declaration\n/// `let context = PrivateContext::new(...)` > 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 > expand all macros, if you dare.\n///\n/// Typical usage for a smart contract developer will be to call getter methods of the PrivateContext.\n///\n/// _Pushing_ data and requests to the context is mostly handled within aztec-nr's own functions, so typically a smart\n/// contract developer won't need to call any setter methods directly.\n///\n/// > Advanced users might occasionally wish to push data to the context > directly for lower-level control. If you\n/// find yourself doing this, please > open an issue on GitHub to describe your use case: it might be that > new\n/// 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 executed)\n/// - See `CallContext` for more data.\n/// - Data relating to the transaction in which this private function is being executed.\n/// - chain_id\n/// - version\n/// - gas_settings\n/// - Provides state access:\n/// - Access to the \"Anchor block\" header. Recall, a private function cannot read from the \"current\" block header, but\n/// must read from some historical block header, because as soon as private function execution begins (asynchronously,\n/// on a user's device), the public state of the chain (the \"current state\") will have progressed forward. We call this\n/// reference the \"Anchor block\". 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 (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 do not trust them. They are instead given\n/// \"app-siloed\" secret keys with a claim that they relate to a master public key. They can then request validation of\n/// this claim, by making a \"key validation request\" to the protocol's kernel circuits (which _are_ allowed to see\n/// certain master secret keys).\n///\n/// ## Advanced Responsibilities\n///\n/// - Ultimately, the PrivateContext is responsible for constructing the PrivateCircuitPublicInputs of the private\n/// function being executed. All private functions on Aztec must have public inputs which adhere to the rigid layout of\n/// the PrivateCircuitPublicInputs, in order to be compatible with the protocol's kernel circuits. A well-known\n/// 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 \"return values\" of the function.\n/// - Most of the so-called \"public inputs\" are kept _private_, and never leak to the outside world, because they are\n/// 'swallowed' by the protocol's kernel circuits before the tx is sent to the network. Only the following are exposed\n/// 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 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 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 the PrivateContext instance to\n/// read/write data. This is why you'll see the arguably-ugly pervasiveness of the \"context\" throughout your smart\n/// contract and the aztec-nr library. For example, `&mut context` is prevalent. In some languages, you can access and\n/// mutate a global variable (such as a PrivateContext instance) from a function without polluting the function's\n/// parameters. With Noir, a function 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 to the PrivateContext, they need to be\n/// handed a mutable reference _to_ the context as a parameter. For example, `Context` is prevalent as a generic\n/// parameter, to give better type safety at compile time. Many `aztec-nr` functions don't make sense if they're called\n/// in a particular runtime (private, public or utility), and so are intentionally only implemented over certain\n/// [Private|Public|Utility]Context structs. This gives smart contract developers a much faster feedback loop if\n/// they're making a mistake, as an 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 inputs: PrivateContextInputs,\n side_effect_counter: u32,\n\n min_revertible_side_effect_counter: u32,\n is_fee_payer: bool,\n\n args_hash: Field,\n return_hash: Field,\n\n pub(crate) expiration_timestamp: u64,\n\n pub(crate) note_hash_read_requests: BoundedVec<Scoped<Counted<Field>>, MAX_NOTE_HASH_READ_REQUESTS_PER_CALL>,\n pub(crate) nullifier_read_requests: BoundedVec<Scoped<Counted<Field>>, MAX_NULLIFIER_READ_REQUESTS_PER_CALL>,\n key_validation_requests_and_separators: BoundedVec<KeyValidationRequestAndSeparator, MAX_KEY_VALIDATION_REQUESTS_PER_CALL>,\n\n pub(crate) note_hashes: BoundedVec<Counted<NoteHash>, MAX_NOTE_HASHES_PER_CALL>,\n pub(crate) nullifiers: BoundedVec<Counted<Nullifier>, MAX_NULLIFIERS_PER_CALL>,\n\n pub(crate) private_call_requests: BoundedVec<PrivateCallRequest, MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL>,\n public_call_requests: BoundedVec<Counted<PublicCallRequest>, MAX_ENQUEUED_CALLS_PER_CALL>,\n public_teardown_call_request: PublicCallRequest,\n 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(crate) anchor_block_header: BlockHeader,\n\n private_logs: BoundedVec<Counted<PrivateLogData>, MAX_PRIVATE_LOGS_PER_CALL>,\n 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. The index of the array corresponds to the key type (0 nullifier, 1\n // incoming, 2 outgoing, 3 tagging).\n last_key_validation_requests: [Option<KeyValidationRequest>; NUM_KEY_TYPES],\n\n expected_non_revertible_side_effect_counter: u32,\n expected_revertible_side_effect_counter: u32,\n}\n\nimpl PrivateContext {\n pub fn new(inputs: PrivateContextInputs, args_hash: Field) -> PrivateContext {\n PrivateContext {\n inputs,\n side_effect_counter: inputs.start_side_effect_counter + 1,\n min_revertible_side_effect_counter: 0,\n is_fee_payer: false,\n args_hash,\n return_hash: 0,\n expiration_timestamp: inputs.anchor_block_header.timestamp() + MAX_TX_LIFETIME,\n note_hash_read_requests: BoundedVec::new(),\n nullifier_read_requests: BoundedVec::new(),\n key_validation_requests_and_separators: 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 (Externally-owned Account), the msg_sender is\n /// \"none\" 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\n /// or 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 pub fn maybe_msg_sender(self) -> Option<AztecAddress> {\n let maybe_msg_sender = self.inputs.call_context.msg_sender;\n if maybe_msg_sender == NULL_MSG_SENDER_CONTRACT_ADDRESS {\n Option::none()\n } else {\n Option::some(maybe_msg_sender)\n }\n }\n\n /// Returns the contract address of the current function being executed.\n ///\n /// This is equivalent to `address(this)` in Solidity (hence the name). Use this to identify the current contract's\n /// address, commonly needed for access control or when interacting with other contracts.\n ///\n /// # Returns\n /// * `AztecAddress` - The contract address of the current function being 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 identifier for the blockchain network this\n /// transaction is executing on.\n ///\n /// Helps prevent cross-chain replay attacks. Useful if implementing 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 under. Different versions may have\n /// different rules, opcodes, or 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 transaction, similar to `tx.gasprice` and gas\n /// limits in Ethereum. However, Aztec has a more sophisticated gas model with separate accounting for L2\n /// 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 to access this.\n ///\n /// This is similar to `msg.sig` in Solidity, which returns the first 4 bytes of the function signature. In Aztec,\n /// the selector uniquely 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- enshrined concept. The function\n /// selectors of private functions are 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 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 whether this call is being executed as part of a static call.\n ///\n /// Similar to Solidity's `STATICCALL`, a static call is read-only: neither this function nor any of its nested\n /// calls may emit side-effects (new notes, nullifiers, logs, L2->L1 messages, etc.). A call is considered static\n /// if it was invoked as a static call or if any of its ancestor calls were.\n ///\n /// # Returns\n /// * `bool` - `true` if this call (or an ancestor call) is a static call.\n ///\n pub fn is_static_call(self) -> bool {\n self.inputs.call_context.is_static_call\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\")] macro calls this, and it\n /// makes the arguments neatly available to the 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 /// Returns the current value of the side-effect counter, i.e. the counter that will be assigned to the next\n /// side-effect emitted by this function.\n ///\n /// Low-level function: Ordinarily, smart contract developers will not need to access this. See `next_counter` for\n /// details on how side-effect counters are assigned and why they exist.\n ///\n /// # Returns\n /// * `u32` - The current side-effect counter.\n ///\n pub fn get_side_effect_counter(self) -> u32 {\n self.side_effect_counter\n }\n\n /// Pushes a new note_hash to the Aztec blockchain's global Note Hash Tree (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 to manually call this. Aztec-nr's state\n /// variables (see `../state_vars/`) 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 note_hash into the protocol's \"note\n /// hash tree\" (in the Base Rollup circuit). Before insertion, the protocol will:\n /// - \"Silo\" the `note_hash` with the contract address of this function, to yield a `siloed_note_hash`. This\n /// prevents state collisions between different smart contracts.\n /// - Ensure uniqueness of the `siloed_note_hash`, to prevent Faerie-Gold attacks, by hashing the\n /// `siloed_note_hash` with a unique value, to 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 of the newly-created note to the PXE, via\n /// the `notify_created_note` oracle.\n ///\n /// > Advanced users might occasionally wish to push data to the context > directly for lower-level control. If you\n /// find yourself doing this, > please open an issue on GitHub to describe your use case: it might be > that new\n /// 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 /// Creates a new [nullifier](crate::nullifier).\n ///\n /// ## Safety\n ///\n /// This is a low-level function that must be used with great care to avoid subtle corruption of contract state.\n /// Instead of calling this function, consider using the higher-level [`crate::state_vars::SingleUseClaim`].\n ///\n /// In particular, callers must ensure all nullifiers created by a contract are properly domain-separated, so that\n /// unrelated components don't interfere with one another (e.g. a transaction nullifier accidentally marking a\n /// variable as initialized). Only [`PrivateContext::push_nullifier_for_note_hash`] should be used for note\n /// nullifiers, never this one.\n ///\n /// ## Advanced\n ///\n /// The raw `nullifier` is not what is inserted into the Aztec state tree: it will be first siloed by contract\n /// address via [`crate::protocol::hash::compute_siloed_nullifier`] in order to prevent accidental or malicious\n /// interference of nullifiers from different contracts.\n pub fn push_nullifier_unsafe(&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 /// Creates a new [nullifier](crate::nullifier) associated with a note.\n ///\n /// This is a variant of [`PrivateContext::push_nullifier_unsafe`] that is used for note nullifiers, i.e.\n /// nullifiers that correspond to a note. If a note and its nullifier are created in the same transaction, then\n /// the private kernels will 'squash' these values, deleting them both as if they never existed and reducing\n /// transaction fees.\n ///\n /// The `nullification_note_hash` must be the result of calling\n /// [`crate::note::utils::compute_confirmed_note_hash_for_nullification`] for pending notes, and `0` for settled\n /// notes (which cannot be squashed).\n ///\n /// ## Safety\n ///\n /// This is a low-level function that must be used with great care to avoid subtle corruption of contract state.\n /// Instead of calling this function, consider using the higher-level [`crate::note::lifecycle::destroy_note`].\n ///\n /// The precautions listed for [`PrivateContext::push_nullifier_unsafe`] apply here as well, and callers should\n /// additionally ensure `nullification_note_hash` corresponds to a note emitted by this contract, with its hash\n /// computed in the same transaction execution phase as the call to this function. Finally, only this function\n /// should be used for note nullifiers, never [`PrivateContext::push_nullifier_unsafe`].\n ///\n /// Failure to do these things can result in unprovable contexts, accidental deletion of notes, or double-spend\n /// attacks.\n pub fn push_nullifier_for_note_hash(&mut self, nullifier: Field, nullification_note_hash: Field) {\n let nullifier_counter = self.next_counter();\n notify_nullified_note(nullifier, nullification_note_hash, nullifier_counter);\n self.nullifiers.push(Nullifier { value: nullifier, note_hash: nullification_note_hash }.count(\n nullifier_counter,\n ));\n }\n\n /// Returns the anchor block header - the historical block header that this private function is reading from.\n ///\n /// A private function CANNOT read from the \"current\" block header, but must read from some older block header,\n /// because as soon as private function execution begins (asynchronously, on a user's device), the public state of\n /// the chain (the \"current state\") will have progressed 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 `expiration_timestamp` of every tx is at most 24 hours beyond the timestamp of\n /// the tx's chosen anchor block header. This enables the network's nodes to safely prune old txs from the mempool.\n /// Therefore, the chosen block header _must_ be one 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 block.\n ///\n /// This enables private contracts to access information from even older blocks than the anchor block header.\n ///\n /// Useful for time-based contract logic that needs to compare against multiple historical points.\n ///\n /// # Arguments\n /// * `block_number` - The block number to retrieve (must be <= anchor 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 PXE. Depending on how much blockchain\n /// data the user's PXE has been set up to store, this might require a query from the PXE to another Aztec node to\n /// get the data. > 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 Archive Tree. In fact, the i-th block\n /// header gets stored at the i-th leaf index of the Archive Tree. Behind the scenes, this `get_block_header_at`\n /// function will add Archive Tree merkle-membership constraints (~3k) to your smart contract function's circuit,\n /// to prove 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 same block header, because each call\n /// will add duplicate constraints.\n ///\n /// Calling this function is more expensive (constraint-wise) than getting the anchor block header (via\n /// `get_block_header`). This is because the 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 private functions of a tx share a common\n /// anchor block header. Therefore, the cost (constraint-wise) of calling `get_block_header` is effectively 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 ensure compatibility with the protocol's\n /// kernel circuits.\n ///\n /// Very low-level function: This function is automatically called by the #[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 expiration_timestamp: self.expiration_timestamp,\n note_hash_read_requests: ClaimedLengthArray::from_bounded_vec(self.note_hash_read_requests),\n nullifier_read_requests: ClaimedLengthArray::from_bounded_vec(self.nullifier_read_requests),\n key_validation_requests_and_separators: ClaimedLengthArray::from_bounded_vec(\n self.key_validation_requests_and_separators,\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(self.contract_class_logs_hashes),\n anchor_block_header: self.anchor_block_header,\n tx_context: self.inputs.tx_context,\n expected_non_revertible_side_effect_counter: self.expected_non_revertible_side_effect_counter,\n expected_revertible_side_effect_counter: self.expected_revertible_side_effect_counter,\n tx_request_salt: self.inputs.tx_request_salt,\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 allows any contract to voluntarily pay\n /// transaction fees. This enables patterns like sponsored transactions or fee abstraction where users don't need\n /// to hold fee-juice themselves. (Fee juice is a fee-paying asset for Aztec).\n ///\n /// Only one contract per transaction can declare itself as the fee payer, and it must have sufficient fee-juice\n /// balance (>= the gas limits specified in the TxContext) by the time we reach the public setup phase of the tx.\n ///\n /// The fee payer must be elected during the setup (non-revertible) phase, i.e. before\n /// [`end_setup`](PrivateContext::end_setup) is called - this function asserts so. This is because any compensation\n /// collected by the fee payer during the revertible phase can be discarded if a public call later reverts, while\n /// the protocol still debits the fee payer's fee-juice balance. Note that `end_setup` does not need to be called\n /// by the electing function itself: it can be called later in the transaction (e.g. by the fee-juice contract when\n /// claiming fee juice that pays for the very same transaction).\n pub fn set_as_fee_payer(&mut self) {\n assert(!self.in_revertible_phase(), \"fee payer must be elected during the setup phase\");\n aztecnr_trace_log_format!(\"Setting {0} as fee payer\")([self.this_address().to_field()]);\n self.is_fee_payer = true;\n }\n\n /// Returns whether execution is currently in the revertible (app) phase of the transaction.\n ///\n /// A transaction is in the revertible phase if [`end_setup`](PrivateContext::end_setup) has already been called -\n /// potentially by a different function of the same transaction.\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 = unsafe { is_execution_in_revertible_phase(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 (aka Fee-payment contracts) will need\n /// to make use of this function.\n ///\n /// Aztec supports a three-phase execution model: setup, app logic, teardown. The phases exist to enable a fee\n /// payer to take on the risk of paying a transaction fee, safe in the knowledge that their payment (in whatever\n /// token or method the user chooses) will succeed, regardless of whether the app logic will succeed. The \"setup\"\n /// phase enables such a payment to be made, because the setup phase _cannot revert_: a reverting function within\n /// the setup phase would result in an invalid block which cannot be proven. Any side-effects generated during that\n /// phase are guaranteed to be inserted into Aztec's state trees (except for squashed notes & nullifiers, of\n /// course).\n ///\n /// Even though the end of the setup phase is declared within a private function, you might have noticed that\n /// _public_ functions can also execute within the setup phase. This is because any public function calls which\n /// were enqueued _within the setup phase_ by a private 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 PrivateContext's _current_ side effect\n /// counter.\n ///\n pub fn end_setup(&mut self) {\n // We bump the counter twice: once so that `min_revertible_side_effect_counter` sits strictly above any\n // non-revertible side effect counter (including queries made via `in_revertible_phase` before this call), and\n // once more so that the next revertible side effect counter is strictly greater than\n // `min_revertible_side_effect_counter`. This ensures `min_revertible_side_effect_counter` occupies a gap that\n // no side effect takes, which the kernel relies on when validating the phase split.\n self.side_effect_counter += 1;\n self.min_revertible_side_effect_counter = self.side_effect_counter;\n self.side_effect_counter += 1;\n\n aztecnr_trace_log_format!(\n \"Ending setup, minimum revertible side effect counter is {0}\",\n )(\n [self.min_revertible_side_effect_counter as Field],\n );\n notify_revertible_phase_start(self.min_revertible_side_effect_counter);\n }\n\n /// Sets a deadline (an \"include-by timestamp\") for when this transaction must be included in a block.\n ///\n /// Other functions in this tx might call this setter with differing values for the include-by timestamp. To ensure\n /// that all functions' deadlines are met, the _minimum_ of all these include-by timestamps will be exposed when\n /// this tx is submitted to the network.\n ///\n /// If the transaction is not included in a block by its include-by timestamp, it becomes invalid and it will never\n /// be included.\n ///\n /// This expiry timestamp is publicly visible. See the \"Advanced\" section for privacy concerns.\n ///\n /// # Arguments\n /// * `expiration_timestamp` - Unix timestamp (seconds) deadline for inclusion. The include-by timestamp of this tx\n /// will be _at most_ the timestamp specified.\n ///\n /// # Advanced\n /// * If multiple functions set differing `expiration_timestamp`s, the kernel circuits will set it to be the\n /// _minimum_ of the two. This 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 24 hours of their chosen anchor block's\n /// timestamp, to enable safe mempool pruning.\n /// * The DelayedPublicMutable design makes heavy use of this functionality, to enable private functions to read\n /// public state.\n /// * A sophisticated Wallet should cleverly set an include-by timestamp to improve the privacy of the user and the\n /// network as a whole. For example, if a contract interaction sets include-by to some publicly-known value (e.g.\n /// the time when a contract upgrades), then the wallet might wish to set an even lower one to avoid revealing that\n /// this tx is interacting with said contract. Ideally, all wallets should standardize on an approach in order to\n /// provide users with a large privacy set -- although the exact approach\n /// will need to be discussed. Wallets that deviate from a standard might accidentally reveal which wallet each\n /// transaction originates from.\n ///\n // docs:start:expiration-timestamp\n pub fn set_expiration_timestamp(&mut self, expiration_timestamp: u64) {\n // docs:end:expiration-timestamp\n self.expiration_timestamp = std::cmp::min(self.expiration_timestamp, expiration_timestamp);\n }\n\n /// Asserts that a note has been created.\n ///\n /// This function will cause the transaction to fail unless the requested note exists. This is the preferred\n /// mechanism for performing this check, and the only one that works for pending notes.\n ///\n /// ## Pending Notes\n ///\n /// Both settled notes (created in prior transactions) and pending notes (created in the current transaction) will\n /// be considered by this function. Pending notes must have been created **before** this call is made for the check\n /// to pass.\n ///\n /// ## Historical Notes\n ///\n /// If you need to assert that a note existed _by some specific block in the past_, instead of simply proving that\n /// it exists by the current anchor block, use [`crate::history::note::assert_note_existed_by`] instead.\n ///\n /// ## Cost\n ///\n /// This uses up one of the call's kernel note hash read requests, which are limited. Like all kernel requests,\n /// proving time costs are only incurred when the total number of requests exceeds the kernel's capacity, requiring\n /// an additional invocation of the kernel reset circuit.\n pub fn assert_note_exists(&mut self, note_existence_request: NoteExistenceRequest) {\n // Note that the `note_hash_read_requests` array does not hold `NoteExistenceRequest` objects, but rather a\n // custom kernel type. We convert from the aztec-nr type into it.\n\n let note_hash = note_existence_request.note_hash();\n let contract_address = note_existence_request.maybe_contract_address().unwrap_or(AztecAddress::zero());\n\n let side_effect = Scoped::new(\n Counted::new(note_hash, self.next_counter()),\n contract_address,\n );\n\n self.note_hash_read_requests.push(side_effect);\n }\n\n /// Asserts that a nullifier has been emitted.\n ///\n /// This function will cause the transaction to fail unless the requested nullifier exists. This is the preferred\n /// mechanism for performing this check, and the only one that works for pending nullifiers.\n ///\n /// ## Pending Nullifiers\n ///\n /// Both settled nullifiers (emitted in prior transactions) and pending nullifiers (emitted in the current\n /// transaction) will be considered by this function. Pending nullifiers must have been emitted **before** this\n /// call is made for the check to pass.\n ///\n /// ## Historical Nullifiers\n ///\n /// If you need to assert that a nullifier existed _by some specific block in the past_, instead of simply proving\n /// that it exists by the current anchor block, use [`crate::history::nullifier::assert_nullifier_existed_by`]\n /// instead.\n ///\n /// ## Public vs Private\n ///\n /// In general, it is unsafe to check for nullifier non-existence in private, as that will not consider the\n /// possibility of the nullifier having been emitted in any transaction between the anchor block and the inclusion\n /// block. Private functions instead prove existence via this function and 'prove' non-existence by _emitting_ the\n /// nullifer, which would cause the transaction to fail if the nullifier existed.\n ///\n /// This is not the case in public functions, which do have access to the tip of the blockchain and so can reliably\n /// prove whether a nullifier exists or not via\n /// [`crate::context::public_context::PublicContext::nullifier_exists_unsafe`].\n ///\n /// ## Cost\n ///\n /// This uses up one of the call's kernel nullifier read requests, which are limited. Like all kernel requests,\n /// proving time costs are only incurred when the total number of requests exceeds the kernel's capacity, requiring\n /// an additional invocation of the kernel reset circuit.\n pub fn assert_nullifier_exists(&mut self, nullifier_existence_request: NullifierExistenceRequest) {\n let nullifier = nullifier_existence_request.nullifier();\n let contract_address = nullifier_existence_request.maybe_contract_address().unwrap_or(AztecAddress::zero());\n\n let request = Scoped::new(\n Counted::new(nullifier, self.next_counter()),\n contract_address,\n );\n\n self.nullifier_read_requests.push(request);\n }\n\n /// Requests the app-siloed nullifier hiding key (nhk_app) for the given (hashed) master nullifier public key\n /// (npk_m), from the user's PXE.\n ///\n /// Advanced function: Only needed if you're designing your own notes and/or nullifiers.\n ///\n /// Contracts are not allowed to compute nullifiers for other contracts, as that would let them read parts of their\n /// private state. Because of this, a contract is only given an \"app-siloed key\", which is constructed by\n /// hashing the user's master nullifier hiding key with the contract's address. However, because contracts cannot\n /// be trusted with a user's master nullifier hiding key (because we don't know which contracts are honest or\n /// malicious), the PXE refuses to provide any master secret keys to any app smart contract function. This means\n /// app functions are unable to prove that the derivation of an app-siloed nullifier hiding key has been computed\n /// correctly. Instead, an app function can request to the kernel (via `request_nhk_app`) that it validates the\n /// siloed derivation, since the kernel has been vetted to not leak any master secret keys.\n ///\n /// A common nullification scheme is to inject a nullifier hiding key into the preimage of a nullifier, to make the\n /// nullifier deterministic but 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 whose PXE is executing this function.\n ///\n /// # Returns\n /// * The app-siloed nullifier hiding key that corresponds to the given `npk_m_hash`.\n ///\n pub fn request_nhk_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 outgoing viewing secret key (ovsk_app) for the given (hashed) master outgoing\n /// viewing public key (ovpk_m), from the user's PXE.\n ///\n /// See `request_nhk_app` and `request_sk_app` for more info.\n ///\n /// The intention of the \"outgoing\" keypair is to provide a second secret key for all of a user's outgoing activity\n /// (i.e. for notes that a user creates, as opposed to notes that a user receives from others). The separation of\n /// incoming and outgoing data was a distinction made by zcash, with the intention of enabling a user to optionally\n /// share with a 3rd party a controlled view of only incoming or outgoing notes. Similar functionality of sharing\n /// select data can be achieved with offchain zero-knowledge proofs. It is up to an app developer whether they\n /// choose to make use of a user's outgoing keypair within their application logic, or instead simply use the same\n /// keypair (the address keypair (which is effectively the same as the \"incoming\" keypair)) for all incoming &\n /// outgoing messages to a user.\n ///\n /// Currently, all of the exposed encryption functions in aztec-nr ignore the outgoing viewing keys, and instead\n /// encrypt all note logs and event 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, because we do not trust them. They are\n /// instead given \"app-siloed\" secret keys with a claim that they relate to a master public key. They can then\n /// request validation of this claim, by making a \"key validation request\" to the protocol's kernel circuits (which\n /// _are_ allowed to see certain master secret keys).\n ///\n /// The app circuit only sees `pk_m_hash` (not the raw point). The kernel derives the\n /// point from `sk_m`, hashes it, and asserts equality. When a Key Validation Request tuple of\n /// (sk_app, pk_m_hash, app_address) is submitted to the kernel, it performs the following\n /// derivations to validate the relationship between the claimed sk_app and the user's pk_m_hash:\n ///\n /// (sk_m) ----> * G ----> pk_m ----> hash_public_key(pk_m)\n /// | |\n /// v | We use the kernel to prove this\n /// h(sk_m, app_address) | sk_app-pk_m_hash 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 that a Key Validation Request will be\n /// emitted to the kernel.\n ///\n fn request_sk_app(&mut self, pk_m_hash: Field, key_index: Field) -> Field {\n // Match against the cache only when a request is actually present in the slot.\n let cached_slot = self.last_key_validation_requests[key_index as u32];\n let cache_hit = cached_slot.is_some() & (cached_slot.unwrap_unchecked().pk_m_hash == pk_m_hash);\n\n if cache_hit {\n // We get a match so the cached request is the latest one\n cached_slot.unwrap_unchecked().sk_app\n } else {\n // We didn't get a match meaning the cached result is stale. Typically we'd validate keys by showing that\n // the master secret key derives to a public key matching `pk_m_hash`, but that'd require the oracle\n // returning the master secret keys, which could cause malicious contracts to leak it or learn about\n // secrets from other contracts. We therefore silo secret keys, and rely on the private kernel to validate\n // that the siloed secret key corresponds to correct siloing of the master secret key that hashes to\n // `pk_m_hash`.\n\n // Safety: Kernels verify that the key validation request is valid and below we verify that a request for\n // 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 key validation request for wrong pk_m_hash\");\n\n self.key_validation_requests_and_separators.push(\n KeyValidationRequestAndSeparator {\n request,\n key_type_domain_separator: public_key_domain_separators[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 contract on Ethereum (L1). L1 contracts\n /// which are designed to send/receive messages to/from Aztec are called \"Portal Contracts\".\n ///\n /// Common use cases include withdrawals, cross-chain asset transfers, and triggering L1 actions based on L2 state\n /// changes.\n ///\n /// The message will be inserted into an Aztec \"Outbox\" contract on L1, when this transaction's block is proposed\n /// to L1. Sending the message will not result in any immediate state changes in the target portal contract. The\n /// message will need to be manually consumed from the Outbox through a separate Ethereum transaction: a user will\n /// need to call a function of the portal contract -- a function specifically designed to make a call to the Outbox\n /// to consume the message. The message will only be available for consumption once the _epoch_ proof has been\n /// submitted. Given that there are multiple Aztec blocks within an epoch, it might take some time for this epoch\n /// proof to be 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). This content has a very\n /// specific layout. 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 triggering L2 actions based on L1 events.\n ///\n /// Use this function if you only want the message to ever be \"referred to\" once. Once consumed using this method,\n /// the message cannot be consumed again, because a nullifier is emitted. If your use case wants for the message to\n /// be read unlimited times, then 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 on L1. Sending the message will not\n /// result in any immediate state changes in the target L2 contract. The message will need to be manually consumed\n /// by the target contract through a separate Aztec transaction. The message will not be available for consumption\n /// immediately. Messages get copied over from the L1 Inbox to L2 by the next Proposer in batches. So you will need\n /// to wait until the messages are copied before you can consume them.\n ///\n /// # Arguments\n /// * `content` - The message content that was sent from L1\n /// * `secret` - Secret fields 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 the message to prevent\n /// double-consumption.\n pub fn consume_l1_to_l2_message<let N: u32>(\n &mut self,\n content: Field,\n secret: [Field; N],\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_unsafe(nullifier)\n }\n\n /// Emits a private log (an array of Fields) that will be published to an Ethereum blob.\n ///\n /// Private logs are intended for the broadcasting of ciphertexts: that is, encrypted events or encrypted note\n /// contents. Since the data in the logs is meant to be _encrypted_, private_logs are broadcast to publicly-visible\n /// Ethereum blobs. The intended recipients of such encrypted messages can then discover and decrypt these\n /// encrypted logs using their viewing secret key. (See `../messages/discovery` for more details).\n ///\n /// Important note: This function DOES NOT _do_ any encryption of the input `log` fields. This function blindly\n /// publishes whatever input `log` data 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 encryption.\n ///\n /// The protocol does not dictate what encryption scheme should be used: a smart contract developer can choose\n /// whatever encryption scheme they like. Aztec-nr includes some off-the-shelf encryption libraries that developers\n /// might wish to use, for convenience. These libraries not only encrypt a plaintext (to produce a ciphertext);\n /// they also prepend the ciphertext with a `tag` and `ephemeral public key` for easier message discovery. This is\n /// a very dense topic, and we will be writing more libraries and docs soon.\n ///\n /// > Currently, AES128 CBC encryption is the main scheme included in > aztec.nr. > We are currently making\n /// significant changes to the interfaces of the > encryption library.\n ///\n /// In some niche use cases, an app might be tempted to publish _un-encrypted_ data via a private log, because\n /// _public logs_ are not available to private functions. Be warned that emitting public data via private logs is\n /// strongly discouraged, and is considered a \"privacy anti-pattern\", because it reveals identifiable information\n /// about _which_ function has been executed. A tx which leaks such information does not contribute to the privacy\n /// set of the network.\n ///\n /// * Unlike `emit_raw_note_log_unsafe`, this log is not tied to any specific note\n ///\n /// # Arguments\n /// * `tag` - A tag placed at `fields[0]` of the emitted log. Used by recipients and nodes to identify and\n /// filter for relevant logs without scanning all of them.\n /// * `log` - The log data that will be publicly broadcast (so make sure it's already been encrypted before you\n /// call this function). Private logs are bounded in size (`PRIVATE_LOG_CIPHERTEXT_LEN`), to encourage all logs\n /// from all smart contracts look identical. The protocol's kernel circuits can then append random fields as\n /// \"padding\" after the log's length, so that the logs of this smart contract look indistinguishable from (the\n /// same length as) the logs of all other applications. It's up to wallets how much padding to apply, so\n /// ideally all wallets should agree on standards for this.\n ///\n /// ## Safety\n ///\n /// The `tag` should be domain-separated (e.g. via [`crate::protocol::hash::compute_log_tag`]) to prevent\n /// collisions between logs from different sources. Without domain separation, two unrelated log types that\n /// happen to share a raw tag value become indistinguishable. Prefer the higher-level APIs\n /// ([`crate::messages::delivery::MessageDelivery`] for messages, `self.emit(event)` for events) which\n /// handle tagging automatically.\n pub fn emit_private_log_unsafe(&mut self, tag: Field, log: BoundedVec<Field, PRIVATE_LOG_CIPHERTEXT_LEN>) {\n self.emit_raw_note_log_unsafe(tag, log, 0);\n }\n\n /// Emits a private log that is explicitly tied to a newly-emitted note_hash, to convey to the kernel: \"this log\n /// relates to this note\".\n ///\n /// This linkage is important in case the note gets squashed (due to being read later in this same tx), since we\n /// can then squash the log as well.\n ///\n /// See [`emit_private_log_unsafe`](PrivateContext::emit_private_log_unsafe) for more info about private log\n /// emission.\n ///\n /// # Arguments\n /// * `tag` - A tag placed at `fields[0]`. See\n /// [`emit_private_log_unsafe`](PrivateContext::emit_private_log_unsafe).\n /// * `log` - The log data as a `BoundedVec` of Field elements.\n /// * `note_hash_counter` - The side-effect counter that was assigned to the new note_hash when it was pushed to\n /// this `PrivateContext`.\n ///\n /// Important: If your application logic requires the log to always be emitted regardless of note squashing,\n /// consider using [`emit_private_log_unsafe`](PrivateContext::emit_private_log_unsafe) instead, or emitting\n /// additional events.\n ///\n /// ## Safety\n ///\n /// Same as [`PrivateContext::emit_private_log_unsafe`]: the `tag` should be domain-separated.\n pub fn emit_raw_note_log_unsafe(\n &mut self,\n tag: Field,\n log: BoundedVec<Field, PRIVATE_LOG_CIPHERTEXT_LEN>,\n note_hash_counter: u32,\n ) {\n let counter = self.next_counter();\n let full_log = [tag].concat(log.storage());\n let private_log = PrivateLogData { log: PrivateLog::new(full_log, log.len() + 1), note_hash_counter };\n self.private_logs.push(private_log.count(counter));\n }\n\n /// Emits large data blobs.\n ///\n /// This reuses the Contract Class Log channel to emit blobs of up to [`CONTRACT_CLASS_LOG_SIZE_IN_FIELDS`].\n ///\n /// ## Privacy\n ///\n /// The address of the contract emitting these blobs is revelead.\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\n // to save blob space.\n // Safety: The below length is constrained in the base rollup, which will make sure that all the fields beyond\n // length are zero. However, it won't be able to check that we didn't add extra padding (trailing zeroes) or\n // that we cut trailing zeroes from the end.\n let length = unsafe { trimmed_array_length_hint(log) };\n // We hash the entire padded log to ensure a user cannot pass a shorter length and so emit incorrect shorter\n // bytecode.\n let log_hash = compute_contract_class_log_hash(log_to_emit);\n // Safety: the below only exists to broadcast the raw log, so we can provide it to the base rollup later to be\n // constrained.\n unsafe {\n notify_created_contract_class_log(contract_address, log_to_emit, length, counter);\n }\n\n self.contract_class_logs_hashes.push(LogHash { value: log_hash, length: length }.count(counter));\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 `.get_preimage()` to extract the actual\n /// return values.\n ///\n /// This enables contracts to interact with each other while maintaining privacy. This \"composability\" of private\n /// contract functions is a key feature of the Aztec network.\n ///\n /// If a user's transaction includes multiple private function calls, then by the design of Aztec, the following\n /// information will remain private[1]:\n /// - The function selectors and contract addresses of all private function calls will remain private, so an\n /// observer of the public mempool will not be able to look at a tx and deduce which private functions have been\n /// executed.\n /// - The arguments and return values of all private function calls will 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 private function calls will (if designed\n /// well) not leak any user secrets, nor leak which functions have been executed.\n ///\n /// [1] Caveats: Some of these privacy guarantees depend on how app developers design their smart contracts. Some\n /// actions _can_ leak information, such as:\n /// - Calling an internal public function.\n /// - Calling a public function and not setting msg_sender to Option::none (feature not built yet - see github).\n /// - Calling any public function will always leak details about the nature of the transaction, so devs should be\n /// careful in their contract designs. If it can be done in a private function, then that will give the best\n /// privacy.\n /// - Not padding the side-effects of a tx to some standardized, uniform size. The kernel circuits can take hints\n /// to pad side-effects, so a wallet should be able to request for a particular amount of padding. Wallets should\n /// 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 size. See also:\n /// 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 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(contract_address, function_selector, args_hash, false)\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 cannot modify state, emit L2->L2 messages, nor\n /// emit events. Any nested calls are constrained to also be staticcalls.\n ///\n /// See `call_private_function` for more general info on private function 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 `.get_preimage()` to extract the actual\n /// 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(contract_address, function_selector, args_hash, true)\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 require any input parameters. It's\n /// equivalent to `call_private_function` 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 `.get_preimage()` to extract the actual\n /// 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 the safety of\n /// `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 `.get_preimage()` to extract the actual\n /// 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 call methods. Instead of taking raw\n /// arguments, it accepts a 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 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 the number of\n // side effects that took place), along with the hash of the return values. We validate these by requesting a\n // private kernel iteration in which the return values are constrained to hash to `returns_hash` and the side\n // 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 // The kernel circuits ensure that end_side_effect_counter is greater than start_side_effect_counter, and that\n // all side effects emitted in the child call have counters within the range [start_side_effect_counter,\n // end_side_effect_counter]. Therefore, we only need to ensure that the next side effect from the current call\n // starts after the end side effect from the child call.\n self.side_effect_counter = end_side_effect_counter + 1;\n\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, public function calls are \"enqueued\"\n /// and executed some time later by a block proposer.\n ///\n /// This means a public function cannot return any values back to a private function, because by the time the\n /// public function is being executed, the private function which called it has already completed execution. (In\n /// fact, the private function has been executed and proven, along with all other private function calls of the\n /// user's tx. A single proof of the tx has been submitted to the Aztec network, and some time later a proposer has\n /// picked the tx up from the mempool and begun executing all of the enqueued public functions).\n ///\n /// # Privacy warning Enqueueing a public function call is an inherently leaky action. Many interesting applications will require some interaction with public state, but smart contract developers should try to use public function calls sparingly, and carefully. _Internal_ public function calls are especially leaky, because they completely leak which private contract made the call. 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 `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(contract_address, calldata_hash, false, hide_msg_sender)\n }\n\n /// Enqueues a read-only call to a public function.\n ///\n /// This is similar to Solidity's `staticcall`. The called function cannot modify state or emit events. Any nested\n /// calls are constrained to also be staticcalls.\n ///\n /// See also `call_public_function` for more important information about 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 `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(contract_address, calldata_hash, true, hide_msg_sender)\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 take any input parameters. It's otherwise\n /// equivalent to `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 `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(contract_address, calldata_hash, false, hide_msg_sender)\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 the safety of\n /// `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 `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(contract_address, calldata_hash, true, hide_msg_sender)\n }\n\n /// Low-level public function call.\n ///\n /// This is the underlying implementation used by all other public function call methods. Instead of taking raw\n /// arguments, it accepts a hash of the arguments.\n ///\n /// Advanced function: Most developers should use `call_public_function` or `static_call_public_function` instead.\n /// This function is exposed for 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 `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 is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n\n assert_valid_public_call_data(calldata_hash);\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 = 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 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 (aka Fee-payment contracts) will need\n /// to make use of this function.\n ///\n /// Aztec supports a three-phase execution model: setup, app logic, teardown. The phases exist to enable a fee\n /// payer to take on the risk of paying a transaction fee, safe in the knowledge that their payment (in whatever\n /// token or method the user chooses) will succeed, regardless of whether the app logic will succeed. The \"setup\"\n /// phase ensures the fee payer has sufficient balance to pay the proposer their fees. The teardown phase is\n /// primarily intended to: calculate exactly 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 tx side-effects) might exceed the refund\n /// amount. For app logic with fairly stable and predictable gas consumption, a material refund amount is unlikely.\n /// For app logic with unpredictable gas consumption, a refund might be important to the user (e.g. if a hefty\n /// function reverts very early). Wallet/FPC/Paymaster developers should be mindful of this.\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract containing the teardown 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 `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(contract_address, calldata_hash, false, hide_msg_sender)\n }\n\n /// Low-level function to set the public teardown function.\n ///\n /// This is the underlying implementation for setting the teardown function call that will execute at the end of\n /// the transaction. Instead of taking raw arguments, it accepts a hash of the arguments.\n ///\n /// Advanced function: Most developers should use `set_public_teardown_function` instead.\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract containing the teardown 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 `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 is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n\n assert_valid_public_call_data(calldata_hash);\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\", based on when it is created. This\n /// PrivateContext is in charge of assigning the counters.\n ///\n /// The reason we have side-effect counters is complicated. Consider this illustrative pseudocode of inter-contract\n /// 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 counter of each side-effect, and what\n /// the new value of `x` is.\n ///\n /// These (private) functions are processed by Aztec's kernel circuits in an order that is different from execution\n /// order: All of A.a1 is proven before B.b is proven, before A.a2 is proven. So when we're in the 2nd execution\n /// frame of A.a1 (after the call to B.b), the circuit needs to justify why x went from being `6` to `36`. But the\n /// circuit doesn't know why, and given the order of proving, the kernel hasn't _seen_ a value of 36 get written\n /// yet. The kernel needs to track big arrays of all side-effects of all private functions in a tx. Then, as it\n /// recurses and processes B.b(), it will eventually see a value of 36 get written.\n ///\n /// Suppose side-effect counters weren't exposed: The kernel would only see this ordering (in order of proof\n /// verification): [ 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 it can't see what's going on within an\n /// app circuit. So the kernel wouldn't know that the ordering of reads and writes should actually be: [ A.a1.read,\n /// 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 assign side-effect counters alongside\n /// every side-effect that it emits, and also expose to the kernel the counters that it started and ended with.\n /// This gives the kernel enough information to arrange all side-effects in the correct order. It can then catch\n /// (for example) if a function tries to read state before it has been written (e.g. if A.a2() maliciously tried to\n /// read 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 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 start and end counters' range. The kernel\n /// will catch 2. The kernel will not catch 1., but this would only cause corruption to the private state of the\n /// malicious contract, and not any other contracts (because a contract can only modify its own state). If a \"good\"\n /// contract is given _read access_ to a maliciously-counting contract (via an external getter function, or by\n /// reading historic state from the archive tree directly), and they then make state changes to their _own_ state\n /// accordingly, that could be dangerous. Developers should be mindful not to trust the claimed innards of external\n /// contracts unless they have audited/vetted the contracts including vetting the side-effect counter\n /// incrementation. This is a similar paradigm to Ethereum smart contract development: you must vet external\n /// contracts that your contract relies upon, and you must not make any presumptions about their claimed behaviour.\n /// (Hopefully if a contract imports a version of aztec-nr, we will get contract verification tooling that can\n /// validate the authenticity of the imported aztec-nr package, and hence infer that the side- effect counting will\n /// be correct, without having to re-audit such logic 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 expiration_timestamp: 0,\n note_hash_read_requests: BoundedVec::new(),\n nullifier_read_requests: BoundedVec::new(),\n key_validation_requests_and_separators: 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"
|
|
4840
5200
|
},
|
|
4841
5201
|
"69": {
|
|
4842
5202
|
"function_locations": [
|
|
@@ -4866,107 +5226,107 @@
|
|
|
4866
5226
|
},
|
|
4867
5227
|
{
|
|
4868
5228
|
"name": "PublicContext::consume_l1_to_l2_message",
|
|
4869
|
-
"start":
|
|
5229
|
+
"start": 11961
|
|
4870
5230
|
},
|
|
4871
5231
|
{
|
|
4872
5232
|
"name": "PublicContext::message_portal",
|
|
4873
|
-
"start":
|
|
5233
|
+
"start": 14085
|
|
4874
5234
|
},
|
|
4875
5235
|
{
|
|
4876
5236
|
"name": "PublicContext::call_public_function",
|
|
4877
|
-
"start":
|
|
5237
|
+
"start": 14975
|
|
4878
5238
|
},
|
|
4879
5239
|
{
|
|
4880
5240
|
"name": "PublicContext::static_call_public_function",
|
|
4881
|
-
"start":
|
|
5241
|
+
"start": 16607
|
|
4882
5242
|
},
|
|
4883
5243
|
{
|
|
4884
5244
|
"name": "PublicContext::push_note_hash",
|
|
4885
|
-
"start":
|
|
5245
|
+
"start": 18391
|
|
4886
5246
|
},
|
|
4887
5247
|
{
|
|
4888
5248
|
"name": "PublicContext::push_nullifier_unsafe",
|
|
4889
|
-
"start":
|
|
5249
|
+
"start": 19837
|
|
4890
5250
|
},
|
|
4891
5251
|
{
|
|
4892
5252
|
"name": "PublicContext::this_address",
|
|
4893
|
-
"start":
|
|
5253
|
+
"start": 20427
|
|
4894
5254
|
},
|
|
4895
5255
|
{
|
|
4896
5256
|
"name": "PublicContext::maybe_msg_sender",
|
|
4897
|
-
"start":
|
|
5257
|
+
"start": 21522
|
|
4898
5258
|
},
|
|
4899
5259
|
{
|
|
4900
5260
|
"name": "PublicContext::selector",
|
|
4901
|
-
"start":
|
|
5261
|
+
"start": 22294
|
|
4902
5262
|
},
|
|
4903
5263
|
{
|
|
4904
5264
|
"name": "PublicContext::get_args_hash",
|
|
4905
|
-
"start":
|
|
5265
|
+
"start": 23033
|
|
4906
5266
|
},
|
|
4907
5267
|
{
|
|
4908
5268
|
"name": "PublicContext::transaction_fee",
|
|
4909
|
-
"start":
|
|
5269
|
+
"start": 24425
|
|
4910
5270
|
},
|
|
4911
5271
|
{
|
|
4912
5272
|
"name": "PublicContext::chain_id",
|
|
4913
|
-
"start":
|
|
5273
|
+
"start": 25014
|
|
4914
5274
|
},
|
|
4915
5275
|
{
|
|
4916
5276
|
"name": "PublicContext::version",
|
|
4917
|
-
"start":
|
|
5277
|
+
"start": 25684
|
|
4918
5278
|
},
|
|
4919
5279
|
{
|
|
4920
5280
|
"name": "PublicContext::block_number",
|
|
4921
|
-
"start":
|
|
5281
|
+
"start": 26624
|
|
4922
5282
|
},
|
|
4923
5283
|
{
|
|
4924
5284
|
"name": "PublicContext::timestamp",
|
|
4925
|
-
"start":
|
|
5285
|
+
"start": 27736
|
|
4926
5286
|
},
|
|
4927
5287
|
{
|
|
4928
5288
|
"name": "PublicContext::min_fee_per_l2_gas",
|
|
4929
|
-
"start":
|
|
5289
|
+
"start": 29017
|
|
4930
5290
|
},
|
|
4931
5291
|
{
|
|
4932
5292
|
"name": "PublicContext::min_fee_per_da_gas",
|
|
4933
|
-
"start":
|
|
5293
|
+
"start": 29544
|
|
4934
5294
|
},
|
|
4935
5295
|
{
|
|
4936
5296
|
"name": "PublicContext::l2_gas_left",
|
|
4937
|
-
"start":
|
|
5297
|
+
"start": 29942
|
|
4938
5298
|
},
|
|
4939
5299
|
{
|
|
4940
5300
|
"name": "PublicContext::da_gas_left",
|
|
4941
|
-
"start":
|
|
5301
|
+
"start": 30558
|
|
4942
5302
|
},
|
|
4943
5303
|
{
|
|
4944
5304
|
"name": "PublicContext::is_static_call",
|
|
4945
|
-
"start":
|
|
5305
|
+
"start": 31023
|
|
4946
5306
|
},
|
|
4947
5307
|
{
|
|
4948
5308
|
"name": "PublicContext::raw_storage_read",
|
|
4949
|
-
"start":
|
|
5309
|
+
"start": 31865
|
|
4950
5310
|
},
|
|
4951
5311
|
{
|
|
4952
5312
|
"name": "PublicContext::storage_read",
|
|
4953
|
-
"start":
|
|
5313
|
+
"start": 32723
|
|
4954
5314
|
},
|
|
4955
5315
|
{
|
|
4956
5316
|
"name": "PublicContext::raw_storage_write",
|
|
4957
|
-
"start":
|
|
5317
|
+
"start": 33391
|
|
4958
5318
|
},
|
|
4959
5319
|
{
|
|
4960
5320
|
"name": "PublicContext::storage_write",
|
|
4961
|
-
"start":
|
|
5321
|
+
"start": 34125
|
|
4962
5322
|
},
|
|
4963
5323
|
{
|
|
4964
5324
|
"name": "<impl Empty for PublicContext>::empty",
|
|
4965
|
-
"start":
|
|
5325
|
+
"start": 34250
|
|
4966
5326
|
}
|
|
4967
5327
|
],
|
|
4968
|
-
"path": "/
|
|
4969
|
-
"source": "use crate::{\n context::gas::GasOpts,\n hash::{\n compute_l1_to_l2_message_hash, compute_l1_to_l2_message_nullifier, compute_secret_hash,\n compute_siloed_nullifier,\n },\n oracle::avm,\n};\nuse crate::protocol::{\n abis::function_selector::FunctionSelector,\n address::{AztecAddress, EthAddress},\n constants::{MAX_U32_VALUE, NULL_MSG_SENDER_CONTRACT_ADDRESS},\n traits::{Empty, FromField, Packable, Serialize, ToField},\n utils::writer::Writer,\n};\n\n/// # PublicContext\n///\n/// The **main interface** between an #[external(\"public\")] function and the Aztec blockchain.\n///\n/// An instance of the PublicContext is initialized automatically at the outset of every public function, within the\n/// #[external(\"public\")] macro, so you'll never need to consciously instantiate this yourself.\n///\n/// The instance is always named `context`, and it will always be available within the body of every\n/// #[external(\"public\")] function in your smart contract.\n///\n/// Typical usage for a smart contract developer will be to call getter methods of the PublicContext.\n///\n/// _Pushing_ data and requests to the context is mostly handled within aztec-nr's own functions, so typically a smart\n/// contract developer won't need to call any setter methods directly.\n///\n/// ## Responsibilities\n/// - Exposes contextual data to a public function:\n/// - Data relating to how this public function was called:\n/// - msg_sender, this_address\n/// - Data relating to the current blockchain state:\n/// - timestamp, block_number, chain_id, version\n/// - Gas and fee information\n/// - Provides state access:\n/// - Read/write public storage (key-value mapping)\n/// - Check existence of notes and nullifiers (Some patterns use notes & nullifiers to store public (not private)\n/// information)\n/// - Enables consumption of L1->L2 messages.\n/// - Enables calls to other public smart contract functions:\n/// - Writes data to the blockchain:\n/// - Updates to public state variables\n/// - New public logs (for events)\n/// - New L2->L1 messages\n/// - New notes & nullifiers (E.g. pushing public info to notes/nullifiers, or for completing \"partial notes\")\n///\n/// ## Key Differences from Private Execution\n///\n/// Unlike private functions -- which are executed on the user's device and which can only reference historic state --\n/// public functions are executed by a block proposer and are executed \"live\" on the _current_ tip of the chain. This\n/// means public functions can:\n/// - Read and write _current_ public state\n/// - Immediately see the effects of earlier transactions in the same block\n///\n/// Also, public functions are executed within a zkVM (the \"AVM\"), so that they can _revert_ whilst still ensuring\n/// payment to the proposer and prover. (Private functions cannot revert: they either succeed, or they cannot be\n/// included).\n///\n/// ## Optimising Public Functions\n///\n/// Using the AVM to execute public functions means they compile down to \"AVM bytecode\" instead of the ACIR that\n/// private functions (standalone circuits) compile to. Therefore the approach to optimising a public function is\n/// fundamentally different from optimising a public function.\n///\npub struct PublicContext {\n args_hash: Option<Field>,\n compute_args_hash: fn() -> Field,\n}\n\nimpl Eq for PublicContext {\n fn eq(self, other: Self) -> bool {\n (self.args_hash == other.args_hash)\n // Can't compare the function compute_args_hash\n }\n}\n\nimpl PublicContext {\n /// Creates a new PublicContext instance.\n ///\n /// Low-level function: This is called automatically by the #[external(\"public\")] macro, so you shouldn't need to\n /// be called directly by smart contract developers.\n ///\n /// # Arguments\n /// * `compute_args_hash` - Function to compute the args_hash\n ///\n /// # Returns\n /// * A new PublicContext instance\n ///\n pub fn new(compute_args_hash: fn() -> Field) -> Self {\n PublicContext { args_hash: Option::none(), compute_args_hash }\n }\n\n /// Emits a _public_ log that will be visible onchain to everyone.\n ///\n /// # Arguments\n /// * `tag` - A tag placed at `fields[0]` of the emitted log. Nodes index logs by this value, allowing\n /// clients to efficiently query for matching logs without scanning all of them.\n /// * `log` - The data to log, must implement Serialize trait.\n ///\n /// ## Safety\n ///\n /// The `tag` should be domain-separated (e.g. via [`crate::protocol::hash::compute_log_tag`]) to prevent\n /// collisions between logs from different sources. Without domain separation, two unrelated log types that\n /// happen to share a raw tag value become indistinguishable. Prefer `self.emit(event)` for events, which\n /// handles tagging automatically.\n pub fn emit_public_log_unsafe<T>(_self: Self, tag: Field, log: T)\n where\n T: Serialize,\n {\n // We use a Writer to serialize the log directly after the tag, avoiding an extra O(n) copy that would\n // result from serializing first and then prepending the tag.\n let mut writer: Writer<1 + <T as Serialize>::N> = Writer::new();\n writer.write(tag);\n Serialize::stream_serialize(log, &mut writer);\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { avm::emit_public_log(writer.finish().as_vector()) };\n }\n\n /// Checks if a given note hash exists in the note hash tree at a particular leaf_index.\n ///\n /// # Arguments\n /// * `note_hash` - The note hash to check for existence\n /// * `leaf_index` - The index where the note hash should be located\n ///\n /// # Returns\n /// * `bool` - True if the note hash exists at the specified index\n ///\n pub fn note_hash_exists(_self: Self, note_hash: Field, leaf_index: u64) -> bool {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::note_hash_exists(note_hash, leaf_index)\n }\n }\n\n /// Checks if a specific L1-to-L2 message exists in the L1-to-L2 message tree at a particular leaf index.\n ///\n /// Common use cases include token bridging, cross-chain governance, and triggering L2 actions based on L1 events.\n ///\n /// This function should be called before attempting to consume an L1-to-L2 message.\n ///\n /// # Arguments\n /// * `msg_hash` - Hash of the L1-to-L2 message to check\n /// * `msg_leaf_index` - The index where the message should be located\n ///\n /// # Returns\n /// * `bool` - True if the message exists at the specified index\n ///\n /// # Advanced\n /// * Uses the AVM l1_to_l2_msg_exists opcode for tree lookup\n /// * Messages are copied from L1 Inbox to L2 by block proposers\n ///\n pub fn l1_to_l2_msg_exists(_self: Self, msg_hash: Field, msg_leaf_index: Field) -> bool {\n // Safety: AVM opcodes are constrained by the AVM itself TODO(alvaro): Make l1l2msg leaf index a u64 upstream\n unsafe {\n avm::l1_to_l2_msg_exists(msg_hash, msg_leaf_index as u64)\n }\n }\n\n /// Returns `true` if an `unsiloed_nullifier` has been emitted by `contract_address`.\n ///\n /// Note that unsiloed nullifiers are not the actual values stored in the nullifier tree: they are first siloed via\n /// [`crate::hash::compute_siloed_nullifier`] with the emitting contract's address.\n ///\n /// ## Use Cases\n ///\n /// Nullifiers are typically used as a _privacy-preserving_ record of a one-time action, but they can also be used\n /// to efficiently record _public_ one-time actions as well. This is cheaper than using public storage, and has the\n /// added benefit of the nullifier being emittable from a private function.\n ///\n /// An example is to check whether a contract has been published: we emit a nullifier that is deterministic and\n /// which has a _public_ preimage.\n ///\n /// ## Public vs Private\n ///\n /// In general, one should not attempt to prove nullifier non-existence in private, as that will not consider the\n /// possibility of the nullifier having been emitted in any transaction between the anchor block and the inclusion\n /// block. Private functions instead prove existence via\n /// [`crate::context::PrivateContext::assert_nullifier_exists`]\n /// and 'prove' non-existence by _emitting_ the nullifer, which would cause the transaction to fail if the\n /// nullifier existed.\n ///\n /// This is not the case in public functions, which **do** have access to the tip of the blockchain and so can\n /// reliably prove whether a nullifier exists or not.\n ///\n /// ## Safety\n ///\n /// While it is safe to rely on this function's return value to determine if a nullifier exists or not, it is often\n /// **not** safe to infer additional information from that. In particular, it is **unsafe** to infer that the\n /// existence of a nullifier emitted from a private function implies that all other side-effects of said private\n /// execution have been completed, more concretely that any enqueued public calls have been executed.\n ///\n /// For example, if a function in contract `A` privately emits nullifier `X` and then enqueues public function `Y`,\n /// then it is **unsafe** for a contract `B` to infer that `Y` has alredy executed simply because `X` exists.\n ///\n /// This is because **all** private transaction effects are committed _before_ enqueued public functions are run\n /// (in\n /// order to not reveal detailed timing information about the transaction), so it is possible to observe a\n /// nullifier that was emitted alongside the enqueuing of a public call **before** said call has been completed.\n ///\n /// ## Cost\n ///\n /// This emits the `CHECKNULLIFIEREXISTS` opcode, which conceptually performs a merkle inclusion proof on the\n /// nullifier tree (both when the nullifier exists and when it doesn't).\n pub fn nullifier_exists_unsafe(_self: Self, unsiloed_nullifier: Field, contract_address: AztecAddress) -> bool {\n let siloed_nullifier = compute_siloed_nullifier(contract_address, unsiloed_nullifier);\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::nullifier_exists(siloed_nullifier)\n }\n }\n\n /// Consumes a message sent from Ethereum (L1) to Aztec (L2) -- effectively marking it as \"read\".\n ///\n /// Use this function if you only want the message to ever be \"referred to\" once. Once consumed using this method,\n /// the message cannot be consumed again, because a nullifier is emitted. If your use case wants for the message to\n /// be read unlimited times, then you can always read any historic message from the L1-to-L2 messages tree, using\n /// the `l1_to_l2_msg_exists` method. Messages never technically get deleted from that tree.\n ///\n /// The message will first be inserted into an Aztec \"Inbox\" smart contract on L1. It will not be available for\n /// consumption immediately. Messages get copied-over from the L1 Inbox to L2 by the next Proposer in batches. So\n /// you will need to wait until the messages are copied before you can 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\n /// * Prevents double-consumption by emitting a nullifier\n /// * Message hash is computed from all parameters + chain context\n /// * Will revert if message doesn't exist or was already consumed\n ///\n pub fn consume_l1_to_l2_message(self: Self, content: Field, secret: Field, sender: EthAddress, leaf_index: Field) {\n let secret_hash = compute_secret_hash(secret);\n let message_hash = compute_l1_to_l2_message_hash(\n sender,\n self.chain_id(),\n /*recipient=*/\n self.this_address(),\n self.version(),\n content,\n secret_hash,\n leaf_index,\n );\n let nullifier = compute_l1_to_l2_message_nullifier(message_hash, secret);\n\n assert(!self.nullifier_exists_unsafe(nullifier, self.this_address()), \"L1-to-L2 message is already nullified\");\n assert(self.l1_to_l2_msg_exists(message_hash, leaf_index), \"Tried to consume nonexistent L1-to-L2 message\");\n\n self.push_nullifier_unsafe(nullifier);\n }\n\n /// Sends an \"L2 -> L1 message\" from this function (Aztec, L2) to a smart contract on Ethereum (L1). L1 contracts\n /// which are designed to send/receive messages to/from Aztec are called \"Portal Contracts\".\n ///\n /// Common use cases include withdrawals, cross-chain asset transfers, and triggering L1 actions based on L2 state\n /// changes.\n ///\n /// The message will be inserted into an Aztec \"Outbox\" contract on L1, when this transaction's block is proposed\n /// to L1. Sending the message will not result in any immediate state changes in the target portal contract. The\n /// message will need to be manually consumed from the Outbox through a separate Ethereum transaction: a user will\n /// need to call a function of the portal contract -- a function specifically designed to make a call to the Outbox\n /// to consume the message. The message will only be available for consumption once the _epoch_ proof has been\n /// submitted. Given that there are multiple Aztec blocks within an epoch, it might take some time for this epoch\n /// proof to be 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 ///\n pub fn message_portal(_self: Self, recipient: EthAddress, content: Field) {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { avm::send_l2_to_l1_msg(recipient, content) };\n }\n\n /// Calls a public function on another contract.\n ///\n /// Will revert if the called function reverts or runs out of gas.\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract to call\n /// * `function_selector` - Function to call on the target contract\n /// * `args` - Arguments to pass to the function\n /// * `gas_opts` - An optional allocation of gas to the called function.\n ///\n /// # Returns\n /// * `[Field]` - Return data from the called function\n ///\n pub unconstrained fn call_public_function<let N: u32>(\n _self: Self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; N],\n gas_opts: GasOpts,\n ) -> [Field] {\n let calldata = [function_selector.to_field()].concat(args);\n\n avm::call(\n gas_opts.l2_gas.unwrap_or(MAX_U32_VALUE),\n gas_opts.da_gas.unwrap_or(MAX_U32_VALUE),\n contract_address,\n calldata,\n );\n // Use success_copy to determine whether the call succeeded\n let success = avm::success_copy();\n\n let result_data = avm::returndata_copy(0, avm::returndata_size());\n if !success {\n // Rethrow the revert data.\n avm::revert(result_data);\n }\n result_data\n }\n\n /// Makes a read-only call to a public function on another contract.\n ///\n /// This is similar to Solidity's `staticcall`. The called function cannot modify state or emit events. Any nested\n /// calls are constrained to also be staticcalls.\n ///\n /// Useful for querying data from other contracts safely.\n ///\n /// Will revert if the called function reverts or runs out of gas.\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract to call\n /// * `function_selector` - Function to call on the target contract\n /// * `args` - Array of arguments to pass to the called function\n /// * `gas_opts` - An optional allocation of gas to the called function.\n ///\n /// # Returns\n /// * `[Field]` - Return data from the called function\n ///\n pub unconstrained fn static_call_public_function<let N: u32>(\n _self: Self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; N],\n gas_opts: GasOpts,\n ) -> [Field] {\n let calldata = [function_selector.to_field()].concat(args);\n\n avm::call_static(\n gas_opts.l2_gas.unwrap_or(MAX_U32_VALUE),\n gas_opts.da_gas.unwrap_or(MAX_U32_VALUE),\n contract_address,\n calldata,\n );\n // Use success_copy to determine whether the call succeeded\n let success = avm::success_copy();\n\n let result_data = avm::returndata_copy(0, avm::returndata_size());\n if !success {\n // Rethrow the revert data.\n avm::revert(result_data);\n }\n result_data\n }\n\n /// Adds a new note hash to the Aztec blockchain's global Note Hash Tree.\n ///\n /// Notes are ordinarily constructed and emitted by _private_ functions, to ensure that both the content of the\n /// note, and the contract that emitted the note, stay private.\n ///\n /// There are however some useful patterns whereby a note needs to contain _public_ data. The ability to push a new\n /// note_hash from a _public_ function means that notes can be injected with public data immediately -- as soon as\n /// the public value is known. The slower alternative would be to submit a follow-up transaction so that a private\n /// function can inject the data. Both are possible on Aztec.\n ///\n /// Search \"Partial Note\" for a very common pattern which enables a note to be \"partially\" populated with some data\n /// in a _private_ function, and then later \"completed\" with some data in a public function.\n ///\n /// # Arguments\n /// * `note_hash` - The hash of the note to add to the tree\n ///\n /// # Advanced\n /// * The note hash will be siloed with the contract address by the protocol\n ///\n pub fn push_note_hash(_self: Self, note_hash: Field) {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { avm::emit_note_hash(note_hash) };\n }\n\n /// Creates a new [nullifier](crate::nullifier).\n ///\n /// While nullifiers are primarily intended as a _privacy-preserving_ record of a one-time action, they can also\n /// be used to efficiently record _public_ one-time actions. This function allows creating nullifiers from public\n /// contract functions, which behave just like those created from private functions.\n ///\n /// ## Safety\n ///\n /// This is a low-level function that must be used with great care to avoid subtle corruption of contract state.\n ///\n /// In particular, callers must ensure all nullifiers created by a contract are properly domain-separated, so that\n /// unrelated components don't interfere with one another (e.g. a transaction nullifier accidentally marking a\n /// variable as initialized). Note nullifiers should only be created via\n /// [`crate::context::PrivateContext::push_nullifier_for_note_hash`].\n ///\n /// ## Advanced\n ///\n /// The raw `nullifier` is not what is inserted into the Aztec state tree: it will be first siloed by contract\n /// address via [`crate::protocol::hash::compute_siloed_nullifier`] in order to prevent accidental or malicious\n /// interference of nullifiers from different contracts.\n pub fn push_nullifier_unsafe(_self: Self, nullifier: Field) {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { avm::emit_nullifier(nullifier) };\n }\n\n /// Returns the address of the current contract being executed.\n ///\n /// This is equivalent to `address(this)` in Solidity (hence the name). Use this to identify the current contract's\n /// address, commonly needed for access control or when interacting with other contracts.\n ///\n /// # Returns\n /// * `AztecAddress` - The contract address of the current function being executed.\n ///\n pub fn this_address(_self: Self) -> AztecAddress {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::address()\n }\n }\n\n /// Returns the contract address that initiated this function call.\n ///\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 method will return `Option<AztecAddress>::none`.\n /// If the calling function is a _public_ function, it will always return an `Option<AztecAddress>::some` (i.e. a\n /// non-null value).\n ///\n /// # Returns\n /// * `Option<AztecAddress>` - The address of the smart contract that called this function (be it an app contract\n /// or 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 maybe_msg_sender(_self: Self) -> Option<AztecAddress> {\n // Safety: AVM opcodes are constrained by the AVM itself\n let maybe_msg_sender = unsafe { avm::sender() };\n if maybe_msg_sender == NULL_MSG_SENDER_CONTRACT_ADDRESS {\n Option::none()\n } else {\n Option::some(maybe_msg_sender)\n }\n }\n\n /// Returns the function selector of the currently-executing function.\n ///\n /// This is similar to `msg.sig` in Solidity, returning the first 4 bytes of the function signature.\n ///\n /// # Returns\n /// * `FunctionSelector` - The 4-byte function identifier\n ///\n /// # Advanced\n /// * Extracted from the first element of calldata\n /// * Used internally for function dispatch in the AVM\n ///\n pub fn selector(_self: Self) -> FunctionSelector {\n // The selector is the first element of the calldata when calling a public function through dispatch.\n // Safety: AVM opcodes are constrained by the AVM itself.\n let raw_selector: [Field; 1] = unsafe { avm::calldata_copy(0, 1) };\n FunctionSelector::from_field(raw_selector[0])\n }\n\n /// Returns the hash of the arguments passed to the current function.\n ///\n /// Very low-level function: The #[external(\"public\")] macro uses this internally. Smart contract developers\n /// typically won't need to access this directly as arguments are automatically made available.\n ///\n /// # Returns\n /// * `Field` - Hash of the function arguments\n ///\n pub fn get_args_hash(mut self) -> Field {\n if !self.args_hash.is_some() {\n self.args_hash = Option::some((self.compute_args_hash)());\n }\n\n self.args_hash.unwrap_unchecked()\n }\n\n /// Returns the \"transaction fee\" for the current transaction. This is the final tx fee that will be deducted from\n /// the fee_payer's \"fee-juice\" balance (in the protocol's Base Rollup circuit).\n ///\n /// # Returns\n /// * `Field` - The actual, final cost of the transaction, taking into account: the actual gas used during the\n /// setup and app-logic phases, and the fixed amount of gas that's been allocated by the user for the teardown\n /// phase. I.e. effectiveL2FeePerGas * l2GasUsed + effectiveDAFeePerGas * daGasUsed\n ///\n /// This will return `0` during the \"setup\" and \"app-logic\" phases of tx execution (because the final tx fee is not\n /// known at that time). This will only return a nonzero value during the \"teardown\" phase of execution, where the\n /// final tx fee can actually be computed.\n ///\n /// Regardless of _when_ this function is called during the teardown phase, it will always return the same final tx\n /// fee value. The teardown phase does not consume a variable amount of gas: it always consumes a pre-allocated\n /// amount of gas, as specified by the user when they generate their tx.\n ///\n pub fn transaction_fee(_self: Self) -> Field {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::transaction_fee()\n }\n }\n\n /// Returns the chain ID of the current network.\n ///\n /// This is similar to `block.chainid` in Solidity. Returns the unique identifier for the blockchain network this\n /// transaction is executing on.\n ///\n /// Helps prevent cross-chain replay attacks. Useful if implementing multi-chain contract logic.\n ///\n /// # Returns\n /// * `Field` - The chain ID as a field element\n ///\n pub fn chain_id(_self: Self) -> Field {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::chain_id()\n }\n }\n\n /// Returns the Aztec protocol version that this transaction is executing under. Different versions may have\n /// different rules, opcodes, or 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: Self) -> Field {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::version()\n }\n }\n /// Returns the current block number.\n ///\n /// This is similar to `block.number` in Solidity.\n ///\n /// Note: the current block number is only available within a public function (as opposed to a private function).\n ///\n /// Note: the time intervals between blocks should not be relied upon as being consistent:\n /// - Timestamps of blocks fall within a range, rather than at exact regular intervals.\n /// - Slots can be missed.\n /// - Protocol upgrades can completely change the intervals between blocks (and indeed the current roadmap plans to\n /// reduce the time between blocks, eventually). Use `context.timestamp()` for more-reliable time-based logic.\n ///\n /// # Returns\n /// * `u32` - The current block number\n ///\n pub fn block_number(_self: Self) -> u32 {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::block_number()\n }\n }\n\n /// Returns the timestamp of the current block.\n ///\n /// This is similar to `block.timestamp` in Solidity.\n ///\n /// All functions of all transactions in a block share the exact same timestamp (even though technically each\n /// transaction is executed one-after-the-other).\n ///\n /// Important note: Timestamps of Aztec blocks are not at reliably-fixed intervals. The proposer of the block has\n /// some flexibility to choose a timestamp which is in a valid _range_: Obviously the timestamp of this block must\n /// be strictly greater than that of the previous block, and must must be less than the timestamp of whichever\n /// ethereum block the aztec block is proposed to. Furthermore, if the timestamp is not deemed close enough to the\n /// actual current time, the committee of validators will not attest to the block.\n ///\n /// # Returns\n /// * `u64` - Unix timestamp in seconds\n ///\n pub fn timestamp(_self: Self) -> u64 {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::timestamp()\n }\n }\n\n /// Returns the fee per unit of L2 gas for this transaction (aka the \"L2 gas price\"), as chosen by the user.\n ///\n /// L2 gas covers the cost of executing public functions and handling side-effects within the AVM.\n ///\n /// # Returns\n /// * `u128` - Fee per unit of L2 gas\n ///\n /// Wallet developers should be mindful that the choice of gas price (which is publicly visible) can leak\n /// information about the user, e.g.:\n /// - which wallet software the user is using;\n /// - the amount of time which has elapsed from the time the user's wallet chose a gas price (at the going rate),\n /// to the time of tx submission. This can give clues about the proving time, and hence the nature of the tx.\n /// - the urgency of the transaction (which is kind of unavoidable, if the tx is indeed urgent).\n /// - the wealth of the user.\n /// - the exact user (if the gas price is explicitly chosen by the user to be some unique number like 0.123456789,\n /// or their favorite number). Wallet devs might wish to consider fuzzing the choice of gas price.\n ///\n pub fn min_fee_per_l2_gas(_self: Self) -> u128 {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::min_fee_per_l2_gas()\n }\n }\n\n /// Returns the fee per unit of DA (Data Availability) gas (aka the \"DA gas price\").\n ///\n /// DA gas covers the cost of making transaction data available on L1.\n ///\n /// See the warning in `min_fee_per_l2_gas` for how gas prices can be leaky.\n ///\n /// # Returns\n /// * `u128` - Fee per unit of DA gas\n ///\n pub fn min_fee_per_da_gas(_self: Self) -> u128 {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::min_fee_per_da_gas()\n }\n }\n\n /// Returns the remaining L2 gas available for this transaction.\n ///\n /// Different AVM opcodes consume different amounts of gas.\n ///\n /// # Returns\n /// * `u32` - Remaining L2 gas units\n ///\n pub fn l2_gas_left(_self: Self) -> u32 {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::l2_gas_left()\n }\n }\n\n /// Returns the remaining DA (Data Availability) gas available for this transaction.\n ///\n /// DA gas is consumed when emitting data that needs to be made available on L1, such as public logs or state\n /// updates. All of the side-effects from the private part of the tx also consume DA gas before execution of any\n /// public functions even begins.\n ///\n /// # Returns\n /// * `u32` - Remaining DA gas units\n ///\n pub fn da_gas_left(_self: Self) -> u32 {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::da_gas_left()\n }\n }\n\n /// Checks if the current execution is within a staticcall context, where no state changes or logs are allowed to\n /// be emitted (by this function or any nested function calls).\n ///\n /// # Returns\n /// * `bool` - True if in staticcall context, false otherwise\n ///\n pub fn is_static_call(_self: Self) -> bool {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::is_static_call()\n }\n }\n\n /// Reads raw field values from public storage. Reads N consecutive storage slots starting from the given slot.\n ///\n /// Very low-level function. Users should typically use the public state variable abstractions to perform reads:\n /// PublicMutable & PublicImmutable.\n ///\n /// # Arguments\n /// * `storage_slot` - The starting storage slot to read from\n ///\n /// # Returns\n /// * `[Field; N]` - Array of N field values from consecutive storage slots\n ///\n /// # Generic Parameters\n /// * `N` - the number of consecutive slots to return, starting from the `storage_slot`.\n ///\n pub fn raw_storage_read<let N: u32>(self: Self, storage_slot: Field) -> [Field; N] {\n let mut out = [0; N];\n for i in 0..N {\n // Safety: AVM opcodes are constrained by the AVM itself\n out[i] = unsafe { avm::storage_read(storage_slot + i as Field, self.this_address().to_field()) };\n }\n out\n }\n\n /// Reads a typed value from public storage.\n ///\n /// Low-level function. Users should typically use the public state variable abstractions to perform reads:\n /// PublicMutable & PublicImmutable.\n ///\n /// # Arguments\n /// * `storage_slot` - The storage slot to read from\n ///\n /// # Returns\n /// * `T` - The deserialized value from storage\n ///\n /// # Generic Parameters\n /// * `T` - The type that the caller expects to read from the `storage_slot`.\n ///\n pub fn storage_read<T>(self, storage_slot: Field) -> T\n where\n T: Packable,\n {\n T::unpack(self.raw_storage_read(storage_slot))\n }\n\n /// Writes raw field values to public storage. Writes to N consecutive storage slots starting from the given slot.\n ///\n /// Very low-level function. Users should typically use the public state variable abstractions to perform writes:\n /// PublicMutable & PublicImmutable.\n ///\n /// Public storage writes take effect immediately.\n ///\n /// # Arguments\n /// * `storage_slot` - The starting storage slot to write to\n /// * `values` - Array of N Fields to write to storage\n ///\n pub fn raw_storage_write<let N: u32>(_self: Self, storage_slot: Field, values: [Field; N]) {\n for i in 0..N {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { avm::storage_write(storage_slot + i as Field, values[i]) };\n }\n }\n\n /// Writes a typed value to public storage.\n ///\n /// Low-level function. Users should typically use the public state variable abstractions to perform writes:\n /// PublicMutable & PublicImmutable.\n ///\n /// # Arguments\n /// * `storage_slot` - The storage slot to write to\n /// * `value` - The typed value to write to storage\n ///\n /// # Generic Parameters\n /// * `T` - The type to write to storage.\n ///\n pub fn storage_write<T>(self, storage_slot: Field, value: T)\n where\n T: Packable,\n {\n self.raw_storage_write(storage_slot, value.pack());\n }\n}\n\nimpl Empty for PublicContext {\n fn empty() -> Self {\n PublicContext::new(|| 0)\n }\n}\n"
|
|
5328
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/context/public_context.nr",
|
|
5329
|
+
"source": "use crate::{\n context::gas::GasOpts,\n hash::{\n compute_l1_to_l2_message_hash, compute_l1_to_l2_message_nullifier, compute_secret_hash,\n compute_siloed_nullifier,\n },\n oracle::avm,\n};\nuse crate::protocol::{\n abis::function_selector::FunctionSelector,\n address::{AztecAddress, EthAddress},\n constants::{MAX_U32_VALUE, NULL_MSG_SENDER_CONTRACT_ADDRESS},\n traits::{Empty, FromField, Packable, Serialize, ToField},\n utils::writer::Writer,\n};\n\n/// # PublicContext\n///\n/// The **main interface** between an #[external(\"public\")] function and the Aztec blockchain.\n///\n/// An instance of the PublicContext is initialized automatically at the outset of every public function, within the\n/// #[external(\"public\")] macro, so you'll never need to consciously instantiate this yourself.\n///\n/// The instance is always named `context`, and it will always be available within the body of every\n/// #[external(\"public\")] function in your smart contract.\n///\n/// Typical usage for a smart contract developer will be to call getter methods of the PublicContext.\n///\n/// _Pushing_ data and requests to the context is mostly handled within aztec-nr's own functions, so typically a smart\n/// contract developer won't need to call any setter methods directly.\n///\n/// ## Responsibilities\n/// - Exposes contextual data to a public function:\n/// - Data relating to how this public function was called:\n/// - msg_sender, this_address\n/// - Data relating to the current blockchain state:\n/// - timestamp, block_number, chain_id, version\n/// - Gas and fee information\n/// - Provides state access:\n/// - Read/write public storage (key-value mapping)\n/// - Check existence of notes and nullifiers (Some patterns use notes & nullifiers to store public (not private)\n/// information)\n/// - Enables consumption of L1->L2 messages.\n/// - Enables calls to other public smart contract functions:\n/// - Writes data to the blockchain:\n/// - Updates to public state variables\n/// - New public logs (for events)\n/// - New L2->L1 messages\n/// - New notes & nullifiers (E.g. pushing public info to notes/nullifiers, or for completing \"partial notes\")\n///\n/// ## Key Differences from Private Execution\n///\n/// Unlike private functions -- which are executed on the user's device and which can only reference historic state --\n/// public functions are executed by a block proposer and are executed \"live\" on the _current_ tip of the chain. This\n/// means public functions can:\n/// - Read and write _current_ public state\n/// - Immediately see the effects of earlier transactions in the same block\n///\n/// Also, public functions are executed within a zkVM (the \"AVM\"), so that they can _revert_ whilst still ensuring\n/// payment to the proposer and prover. (Private functions cannot revert: they either succeed, or they cannot be\n/// included).\n///\n/// ## Optimising Public Functions\n///\n/// Using the AVM to execute public functions means they compile down to \"AVM bytecode\" instead of the ACIR that\n/// private functions (standalone circuits) compile to. Therefore the approach to optimising a public function is\n/// fundamentally different from optimising a public function.\n///\npub struct PublicContext {\n args_hash: Option<Field>,\n compute_args_hash: fn() -> Field,\n}\n\nimpl Eq for PublicContext {\n fn eq(self, other: Self) -> bool {\n (self.args_hash == other.args_hash)\n // Can't compare the function compute_args_hash\n }\n}\n\nimpl PublicContext {\n /// Creates a new PublicContext instance.\n ///\n /// Low-level function: This is called automatically by the #[external(\"public\")] macro, so you shouldn't need to\n /// be called directly by smart contract developers.\n ///\n /// # Arguments\n /// * `compute_args_hash` - Function to compute the args_hash\n ///\n /// # Returns\n /// * A new PublicContext instance\n ///\n pub fn new(compute_args_hash: fn() -> Field) -> Self {\n PublicContext { args_hash: Option::none(), compute_args_hash }\n }\n\n /// Emits a _public_ log that will be visible onchain to everyone.\n ///\n /// # Arguments\n /// * `tag` - A tag placed at `fields[0]` of the emitted log. Nodes index logs by this value, allowing\n /// clients to efficiently query for matching logs without scanning all of them.\n /// * `log` - The data to log, must implement Serialize trait.\n ///\n /// ## Safety\n ///\n /// The `tag` should be domain-separated (e.g. via [`crate::protocol::hash::compute_log_tag`]) to prevent\n /// collisions between logs from different sources. Without domain separation, two unrelated log types that\n /// happen to share a raw tag value become indistinguishable. Prefer `self.emit(event)` for events, which\n /// handles tagging automatically.\n pub fn emit_public_log_unsafe<T>(_self: Self, tag: Field, log: T)\n where\n T: Serialize,\n {\n // We use a Writer to serialize the log directly after the tag, avoiding an extra O(n) copy that would\n // result from serializing first and then prepending the tag.\n let mut writer: Writer<1 + <T as Serialize>::N> = Writer::new();\n writer.write(tag);\n Serialize::stream_serialize(log, &mut writer);\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { avm::emit_public_log(writer.finish().as_vector()) };\n }\n\n /// Checks if a given note hash exists in the note hash tree at a particular leaf_index.\n ///\n /// # Arguments\n /// * `note_hash` - The note hash to check for existence\n /// * `leaf_index` - The index where the note hash should be located\n ///\n /// # Returns\n /// * `bool` - True if the note hash exists at the specified index\n ///\n pub fn note_hash_exists(_self: Self, note_hash: Field, leaf_index: u64) -> bool {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::note_hash_exists(note_hash, leaf_index)\n }\n }\n\n /// Checks if a specific L1-to-L2 message exists in the L1-to-L2 message tree at a particular leaf index.\n ///\n /// Common use cases include token bridging, cross-chain governance, and triggering L2 actions based on L1 events.\n ///\n /// This function should be called before attempting to consume an L1-to-L2 message.\n ///\n /// # Arguments\n /// * `msg_hash` - Hash of the L1-to-L2 message to check\n /// * `msg_leaf_index` - The index where the message should be located\n ///\n /// # Returns\n /// * `bool` - True if the message exists at the specified index\n ///\n /// # Advanced\n /// * Uses the AVM l1_to_l2_msg_exists opcode for tree lookup\n /// * Messages are copied from L1 Inbox to L2 by block proposers\n ///\n pub fn l1_to_l2_msg_exists(_self: Self, msg_hash: Field, msg_leaf_index: Field) -> bool {\n // Safety: AVM opcodes are constrained by the AVM itself TODO(alvaro): Make l1l2msg leaf index a u64 upstream\n unsafe {\n avm::l1_to_l2_msg_exists(msg_hash, msg_leaf_index as u64)\n }\n }\n\n /// Returns `true` if an `unsiloed_nullifier` has been emitted by `contract_address`.\n ///\n /// Note that unsiloed nullifiers are not the actual values stored in the nullifier tree: they are first siloed via\n /// [`crate::hash::compute_siloed_nullifier`] with the emitting contract's address.\n ///\n /// ## Use Cases\n ///\n /// Nullifiers are typically used as a _privacy-preserving_ record of a one-time action, but they can also be used\n /// to efficiently record _public_ one-time actions as well. This is cheaper than using public storage, and has the\n /// added benefit of the nullifier being emittable from a private function.\n ///\n /// An example is to check whether a contract has been published: we emit a nullifier that is deterministic and\n /// which has a _public_ preimage.\n ///\n /// ## Public vs Private\n ///\n /// In general, one should not attempt to prove nullifier non-existence in private, as that will not consider the\n /// possibility of the nullifier having been emitted in any transaction between the anchor block and the inclusion\n /// block. Private functions instead prove existence via\n /// [`crate::context::PrivateContext::assert_nullifier_exists`]\n /// and 'prove' non-existence by _emitting_ the nullifer, which would cause the transaction to fail if the\n /// nullifier existed.\n ///\n /// This is not the case in public functions, which **do** have access to the tip of the blockchain and so can\n /// reliably prove whether a nullifier exists or not.\n ///\n /// ## Safety\n ///\n /// While it is safe to rely on this function's return value to determine if a nullifier exists or not, it is often\n /// **not** safe to infer additional information from that. In particular, it is **unsafe** to infer that the\n /// existence of a nullifier emitted from a private function implies that all other side-effects of said private\n /// execution have been completed, more concretely that any enqueued public calls have been executed.\n ///\n /// For example, if a function in contract `A` privately emits nullifier `X` and then enqueues public function `Y`,\n /// then it is **unsafe** for a contract `B` to infer that `Y` has alredy executed simply because `X` exists.\n ///\n /// This is because **all** private transaction effects are committed _before_ enqueued public functions are run\n /// (in\n /// order to not reveal detailed timing information about the transaction), so it is possible to observe a\n /// nullifier that was emitted alongside the enqueuing of a public call **before** said call has been completed.\n ///\n /// ## Cost\n ///\n /// This emits the `CHECKNULLIFIEREXISTS` opcode, which conceptually performs a merkle inclusion proof on the\n /// nullifier tree (both when the nullifier exists and when it doesn't).\n pub fn nullifier_exists_unsafe(_self: Self, unsiloed_nullifier: Field, contract_address: AztecAddress) -> bool {\n let siloed_nullifier = compute_siloed_nullifier(contract_address, unsiloed_nullifier);\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::nullifier_exists(siloed_nullifier)\n }\n }\n\n /// Consumes a message sent from Ethereum (L1) to Aztec (L2) -- effectively marking it as \"read\".\n ///\n /// Use this function if you only want the message to ever be \"referred to\" once. Once consumed using this method,\n /// the message cannot be consumed again, because a nullifier is emitted. If your use case wants for the message to\n /// be read unlimited times, then you can always read any historic message from the L1-to-L2 messages tree, using\n /// the `l1_to_l2_msg_exists` method. Messages never technically get deleted from that tree.\n ///\n /// The message will first be inserted into an Aztec \"Inbox\" smart contract on L1. It will not be available for\n /// consumption immediately. Messages get copied-over from the L1 Inbox to L2 by the next Proposer in batches. So\n /// you will need to wait until the messages are copied before you can consume them.\n ///\n /// # Arguments\n /// * `content` - The message content that was sent from L1\n /// * `secret` - Secret fields 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\n /// * Prevents double-consumption by emitting a nullifier\n /// * Message hash is computed from all parameters + chain context\n /// * Will revert if message doesn't exist or was already consumed\n ///\n pub fn consume_l1_to_l2_message<let N: u32>(\n self: Self,\n content: Field,\n secret: [Field; N],\n sender: EthAddress,\n leaf_index: Field,\n ) {\n let secret_hash = compute_secret_hash(secret);\n let message_hash = compute_l1_to_l2_message_hash(\n sender,\n self.chain_id(),\n /*recipient=*/\n self.this_address(),\n self.version(),\n content,\n secret_hash,\n leaf_index,\n );\n let nullifier = compute_l1_to_l2_message_nullifier(message_hash, secret);\n\n assert(!self.nullifier_exists_unsafe(nullifier, self.this_address()), \"L1-to-L2 message is already nullified\");\n assert(self.l1_to_l2_msg_exists(message_hash, leaf_index), \"Tried to consume nonexistent L1-to-L2 message\");\n\n self.push_nullifier_unsafe(nullifier);\n }\n\n /// Sends an \"L2 -> L1 message\" from this function (Aztec, L2) to a smart contract on Ethereum (L1). L1 contracts\n /// which are designed to send/receive messages to/from Aztec are called \"Portal Contracts\".\n ///\n /// Common use cases include withdrawals, cross-chain asset transfers, and triggering L1 actions based on L2 state\n /// changes.\n ///\n /// The message will be inserted into an Aztec \"Outbox\" contract on L1, when this transaction's block is proposed\n /// to L1. Sending the message will not result in any immediate state changes in the target portal contract. The\n /// message will need to be manually consumed from the Outbox through a separate Ethereum transaction: a user will\n /// need to call a function of the portal contract -- a function specifically designed to make a call to the Outbox\n /// to consume the message. The message will only be available for consumption once the _epoch_ proof has been\n /// submitted. Given that there are multiple Aztec blocks within an epoch, it might take some time for this epoch\n /// proof to be 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 ///\n pub fn message_portal(_self: Self, recipient: EthAddress, content: Field) {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { avm::send_l2_to_l1_msg(recipient, content) };\n }\n\n /// Calls a public function on another contract.\n ///\n /// Will revert if the called function reverts or runs out of gas.\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract to call\n /// * `function_selector` - Function to call on the target contract\n /// * `args` - Arguments to pass to the function\n /// * `gas_opts` - An optional allocation of gas to the called function.\n ///\n /// # Returns\n /// * `[Field]` - Return data from the called function\n ///\n pub unconstrained fn call_public_function<let N: u32>(\n _self: Self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; N],\n gas_opts: GasOpts,\n ) -> [Field] {\n let calldata = [function_selector.to_field()].concat(args);\n\n avm::call(\n gas_opts.l2_gas.unwrap_or(MAX_U32_VALUE),\n gas_opts.da_gas.unwrap_or(MAX_U32_VALUE),\n contract_address,\n calldata,\n );\n // Use success_copy to determine whether the call succeeded\n let success = avm::success_copy();\n\n let result_data = avm::returndata_copy(0, avm::returndata_size());\n if !success {\n // Rethrow the revert data.\n avm::revert(result_data);\n }\n result_data\n }\n\n /// Makes a read-only call to a public function on another contract.\n ///\n /// This is similar to Solidity's `staticcall`. The called function cannot modify state or emit events. Any nested\n /// calls are constrained to also be staticcalls.\n ///\n /// Useful for querying data from other contracts safely.\n ///\n /// Will revert if the called function reverts or runs out of gas.\n ///\n /// # Arguments\n /// * `contract_address` - Address of the contract to call\n /// * `function_selector` - Function to call on the target contract\n /// * `args` - Array of arguments to pass to the called function\n /// * `gas_opts` - An optional allocation of gas to the called function.\n ///\n /// # Returns\n /// * `[Field]` - Return data from the called function\n ///\n pub unconstrained fn static_call_public_function<let N: u32>(\n _self: Self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; N],\n gas_opts: GasOpts,\n ) -> [Field] {\n let calldata = [function_selector.to_field()].concat(args);\n\n avm::call_static(\n gas_opts.l2_gas.unwrap_or(MAX_U32_VALUE),\n gas_opts.da_gas.unwrap_or(MAX_U32_VALUE),\n contract_address,\n calldata,\n );\n // Use success_copy to determine whether the call succeeded\n let success = avm::success_copy();\n\n let result_data = avm::returndata_copy(0, avm::returndata_size());\n if !success {\n // Rethrow the revert data.\n avm::revert(result_data);\n }\n result_data\n }\n\n /// Adds a new note hash to the Aztec blockchain's global Note Hash Tree.\n ///\n /// Notes are ordinarily constructed and emitted by _private_ functions, to ensure that both the content of the\n /// note, and the contract that emitted the note, stay private.\n ///\n /// There are however some useful patterns whereby a note needs to contain _public_ data. The ability to push a new\n /// note_hash from a _public_ function means that notes can be injected with public data immediately -- as soon as\n /// the public value is known. The slower alternative would be to submit a follow-up transaction so that a private\n /// function can inject the data. Both are possible on Aztec.\n ///\n /// Search \"Partial Note\" for a very common pattern which enables a note to be \"partially\" populated with some data\n /// in a _private_ function, and then later \"completed\" with some data in a public function.\n ///\n /// # Arguments\n /// * `note_hash` - The hash of the note to add to the tree\n ///\n /// # Advanced\n /// * The note hash will be siloed with the contract address by the protocol\n ///\n pub fn push_note_hash(_self: Self, note_hash: Field) {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { avm::emit_note_hash(note_hash) };\n }\n\n /// Creates a new [nullifier](crate::nullifier).\n ///\n /// While nullifiers are primarily intended as a _privacy-preserving_ record of a one-time action, they can also\n /// be used to efficiently record _public_ one-time actions. This function allows creating nullifiers from public\n /// contract functions, which behave just like those created from private functions.\n ///\n /// ## Safety\n ///\n /// This is a low-level function that must be used with great care to avoid subtle corruption of contract state.\n ///\n /// In particular, callers must ensure all nullifiers created by a contract are properly domain-separated, so that\n /// unrelated components don't interfere with one another (e.g. a transaction nullifier accidentally marking a\n /// variable as initialized). Note nullifiers should only be created via\n /// [`crate::context::PrivateContext::push_nullifier_for_note_hash`].\n ///\n /// ## Advanced\n ///\n /// The raw `nullifier` is not what is inserted into the Aztec state tree: it will be first siloed by contract\n /// address via [`crate::protocol::hash::compute_siloed_nullifier`] in order to prevent accidental or malicious\n /// interference of nullifiers from different contracts.\n pub fn push_nullifier_unsafe(_self: Self, nullifier: Field) {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { avm::emit_nullifier(nullifier) };\n }\n\n /// Returns the address of the current contract being executed.\n ///\n /// This is equivalent to `address(this)` in Solidity (hence the name). Use this to identify the current contract's\n /// address, commonly needed for access control or when interacting with other contracts.\n ///\n /// # Returns\n /// * `AztecAddress` - The contract address of the current function being executed.\n ///\n pub fn this_address(_self: Self) -> AztecAddress {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::address()\n }\n }\n\n /// Returns the contract address that initiated this function call.\n ///\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 method will return `Option<AztecAddress>::none`.\n /// If the calling function is a _public_ function, it will always return an `Option<AztecAddress>::some` (i.e. a\n /// non-null value).\n ///\n /// # Returns\n /// * `Option<AztecAddress>` - The address of the smart contract that called this function (be it an app contract\n /// or 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 maybe_msg_sender(_self: Self) -> Option<AztecAddress> {\n // Safety: AVM opcodes are constrained by the AVM itself\n let maybe_msg_sender = unsafe { avm::sender() };\n if maybe_msg_sender == NULL_MSG_SENDER_CONTRACT_ADDRESS {\n Option::none()\n } else {\n Option::some(maybe_msg_sender)\n }\n }\n\n /// Returns the function selector of the currently-executing function.\n ///\n /// This is similar to `msg.sig` in Solidity, returning the first 4 bytes of the function signature.\n ///\n /// # Returns\n /// * `FunctionSelector` - The 4-byte function identifier\n ///\n /// # Advanced\n /// * Extracted from the first element of calldata\n /// * Used internally for function dispatch in the AVM\n ///\n pub fn selector(_self: Self) -> FunctionSelector {\n // The selector is the first element of the calldata when calling a public function through dispatch.\n // Safety: AVM opcodes are constrained by the AVM itself.\n let raw_selector: [Field; 1] = unsafe { avm::calldata_copy(0, 1) };\n FunctionSelector::from_field(raw_selector[0])\n }\n\n /// Returns the hash of the arguments passed to the current function.\n ///\n /// Very low-level function: The #[external(\"public\")] macro uses this internally. Smart contract developers\n /// typically won't need to access this directly as arguments are automatically made available.\n ///\n /// # Returns\n /// * `Field` - Hash of the function arguments\n ///\n pub fn get_args_hash(mut self) -> Field {\n if !self.args_hash.is_some() {\n self.args_hash = Option::some((self.compute_args_hash)());\n }\n\n self.args_hash.unwrap_unchecked()\n }\n\n /// Returns the \"transaction fee\" for the current transaction. This is the final tx fee that will be deducted from\n /// the fee_payer's \"fee-juice\" balance (in the protocol's Base Rollup circuit).\n ///\n /// # Returns\n /// * `Field` - The actual, final cost of the transaction, taking into account: the actual gas used during the\n /// setup and app-logic phases, and the fixed amount of gas that's been allocated by the user for the teardown\n /// phase. I.e. effectiveL2FeePerGas * l2GasUsed + effectiveDAFeePerGas * daGasUsed\n ///\n /// This will return `0` during the \"setup\" and \"app-logic\" phases of tx execution (because the final tx fee is not\n /// known at that time). This will only return a nonzero value during the \"teardown\" phase of execution, where the\n /// final tx fee can actually be computed.\n ///\n /// Regardless of _when_ this function is called during the teardown phase, it will always return the same final tx\n /// fee value. The teardown phase does not consume a variable amount of gas: it always consumes a pre-allocated\n /// amount of gas, as specified by the user when they generate their tx.\n ///\n pub fn transaction_fee(_self: Self) -> Field {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::transaction_fee()\n }\n }\n\n /// Returns the chain ID of the current network.\n ///\n /// This is similar to `block.chainid` in Solidity. Returns the unique identifier for the blockchain network this\n /// transaction is executing on.\n ///\n /// Helps prevent cross-chain replay attacks. Useful if implementing multi-chain contract logic.\n ///\n /// # Returns\n /// * `Field` - The chain ID as a field element\n ///\n pub fn chain_id(_self: Self) -> Field {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::chain_id()\n }\n }\n\n /// Returns the Aztec protocol version that this transaction is executing under. Different versions may have\n /// different rules, opcodes, or 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: Self) -> Field {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::version()\n }\n }\n /// Returns the current block number.\n ///\n /// This is similar to `block.number` in Solidity.\n ///\n /// Note: the current block number is only available within a public function (as opposed to a private function).\n ///\n /// Note: the time intervals between blocks should not be relied upon as being consistent:\n /// - Timestamps of blocks fall within a range, rather than at exact regular intervals.\n /// - Slots can be missed.\n /// - Protocol upgrades can completely change the intervals between blocks (and indeed the current roadmap plans to\n /// reduce the time between blocks, eventually). Use `context.timestamp()` for more-reliable time-based logic.\n ///\n /// # Returns\n /// * `u32` - The current block number\n ///\n pub fn block_number(_self: Self) -> u32 {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::block_number()\n }\n }\n\n /// Returns the timestamp of the current block.\n ///\n /// This is similar to `block.timestamp` in Solidity.\n ///\n /// All functions of all transactions in a block share the exact same timestamp (even though technically each\n /// transaction is executed one-after-the-other).\n ///\n /// Important note: Timestamps of Aztec blocks are not at reliably-fixed intervals. The proposer of the block has\n /// some flexibility to choose a timestamp which is in a valid _range_: Obviously the timestamp of this block must\n /// be strictly greater than that of the previous block, and must must be less than the timestamp of whichever\n /// ethereum block the aztec block is proposed to. Furthermore, if the timestamp is not deemed close enough to the\n /// actual current time, the committee of validators will not attest to the block.\n ///\n /// # Returns\n /// * `u64` - Unix timestamp in seconds\n ///\n pub fn timestamp(_self: Self) -> u64 {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::timestamp()\n }\n }\n\n /// Returns the fee per unit of L2 gas for this transaction (aka the \"L2 gas price\"), as chosen by the user.\n ///\n /// L2 gas covers the cost of executing public functions and handling side-effects within the AVM.\n ///\n /// # Returns\n /// * `u128` - Fee per unit of L2 gas\n ///\n /// Wallet developers should be mindful that the choice of gas price (which is publicly visible) can leak\n /// information about the user, e.g.:\n /// - which wallet software the user is using;\n /// - the amount of time which has elapsed from the time the user's wallet chose a gas price (at the going rate),\n /// to the time of tx submission. This can give clues about the proving time, and hence the nature of the tx.\n /// - the urgency of the transaction (which is kind of unavoidable, if the tx is indeed urgent).\n /// - the wealth of the user.\n /// - the exact user (if the gas price is explicitly chosen by the user to be some unique number like 0.123456789,\n /// or their favorite number). Wallet devs might wish to consider fuzzing the choice of gas price.\n ///\n pub fn min_fee_per_l2_gas(_self: Self) -> u128 {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::min_fee_per_l2_gas()\n }\n }\n\n /// Returns the fee per unit of DA (Data Availability) gas (aka the \"DA gas price\").\n ///\n /// DA gas covers the cost of making transaction data available on L1.\n ///\n /// See the warning in `min_fee_per_l2_gas` for how gas prices can be leaky.\n ///\n /// # Returns\n /// * `u128` - Fee per unit of DA gas\n ///\n pub fn min_fee_per_da_gas(_self: Self) -> u128 {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::min_fee_per_da_gas()\n }\n }\n\n /// Returns the remaining L2 gas available for this transaction.\n ///\n /// Different AVM opcodes consume different amounts of gas.\n ///\n /// # Returns\n /// * `u32` - Remaining L2 gas units\n ///\n pub fn l2_gas_left(_self: Self) -> u32 {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::l2_gas_left()\n }\n }\n\n /// Returns the remaining DA (Data Availability) gas available for this transaction.\n ///\n /// DA gas is consumed when emitting data that needs to be made available on L1, such as public logs or state\n /// updates. All of the side-effects from the private part of the tx also consume DA gas before execution of any\n /// public functions even begins.\n ///\n /// # Returns\n /// * `u32` - Remaining DA gas units\n ///\n pub fn da_gas_left(_self: Self) -> u32 {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::da_gas_left()\n }\n }\n\n /// Checks if the current execution is within a staticcall context, where no state changes or logs are allowed to\n /// be emitted (by this function or any nested function calls).\n ///\n /// # Returns\n /// * `bool` - True if in staticcall context, false otherwise\n ///\n pub fn is_static_call(_self: Self) -> bool {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe {\n avm::is_static_call()\n }\n }\n\n /// Reads raw field values from public storage. Reads N consecutive storage slots starting from the given slot.\n ///\n /// Very low-level function. Users should typically use the public state variable abstractions to perform reads:\n /// PublicMutable & PublicImmutable.\n ///\n /// # Arguments\n /// * `storage_slot` - The starting storage slot to read from\n ///\n /// # Returns\n /// * `[Field; N]` - Array of N field values from consecutive storage slots\n ///\n /// # Generic Parameters\n /// * `N` - the number of consecutive slots to return, starting from the `storage_slot`.\n ///\n pub fn raw_storage_read<let N: u32>(self: Self, storage_slot: Field) -> [Field; N] {\n let mut out = [0; N];\n for i in 0..N {\n // Safety: AVM opcodes are constrained by the AVM itself\n out[i] = unsafe { avm::storage_read(storage_slot + i as Field, self.this_address().to_field()) };\n }\n out\n }\n\n /// Reads a typed value from public storage.\n ///\n /// Low-level function. Users should typically use the public state variable abstractions to perform reads:\n /// PublicMutable & PublicImmutable.\n ///\n /// # Arguments\n /// * `storage_slot` - The storage slot to read from\n ///\n /// # Returns\n /// * `T` - The deserialized value from storage\n ///\n /// # Generic Parameters\n /// * `T` - The type that the caller expects to read from the `storage_slot`.\n ///\n pub fn storage_read<T>(self, storage_slot: Field) -> T\n where\n T: Packable,\n {\n T::unpack(self.raw_storage_read(storage_slot))\n }\n\n /// Writes raw field values to public storage. Writes to N consecutive storage slots starting from the given slot.\n ///\n /// Very low-level function. Users should typically use the public state variable abstractions to perform writes:\n /// PublicMutable & PublicImmutable.\n ///\n /// Public storage writes take effect immediately.\n ///\n /// # Arguments\n /// * `storage_slot` - The starting storage slot to write to\n /// * `values` - Array of N Fields to write to storage\n ///\n pub fn raw_storage_write<let N: u32>(_self: Self, storage_slot: Field, values: [Field; N]) {\n for i in 0..N {\n // Safety: AVM opcodes are constrained by the AVM itself\n unsafe { avm::storage_write(storage_slot + i as Field, values[i]) };\n }\n }\n\n /// Writes a typed value to public storage.\n ///\n /// Low-level function. Users should typically use the public state variable abstractions to perform writes:\n /// PublicMutable & PublicImmutable.\n ///\n /// # Arguments\n /// * `storage_slot` - The storage slot to write to\n /// * `value` - The typed value to write to storage\n ///\n /// # Generic Parameters\n /// * `T` - The type to write to storage.\n ///\n pub fn storage_write<T>(self, storage_slot: Field, value: T)\n where\n T: Packable,\n {\n self.raw_storage_write(storage_slot, value.pack());\n }\n}\n\nimpl Empty for PublicContext {\n fn empty() -> Self {\n PublicContext::new(|| 0)\n }\n}\n"
|
|
4970
5330
|
},
|
|
4971
5331
|
"70": {
|
|
4972
5332
|
"function_locations": [
|
|
@@ -4991,7 +5351,7 @@
|
|
|
4991
5351
|
"start": 2669
|
|
4992
5352
|
}
|
|
4993
5353
|
],
|
|
4994
|
-
"path": "/
|
|
5354
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/context/returns_hash.nr",
|
|
4995
5355
|
"source": "use crate::{hash::hash_args, oracle::execution_cache};\nuse crate::protocol::traits::Deserialize;\n\n/// The hash of a private contract function call's return value.\n///\n/// Use [`ReturnsHash::get_preimage`] to get the underlying value.\n///\n/// The kernels don't process the actual return values but instead their hashes, so it is up to contracts to populate\n/// oracles with the preimages of these hashes on return to make them available to their callers.\n///\n/// Public calls don't utilize this mechanism since the AVM does process the full return values.\npub struct ReturnsHash {\n hash: Field,\n}\n\nimpl ReturnsHash {\n pub fn new(hash: Field) -> Self {\n ReturnsHash { hash }\n }\n\n /// Fetches the underlying return value from an oracle, constraining that it corresponds to the return data hash.\n pub fn get_preimage<T>(self) -> T\n where\n T: Deserialize,\n {\n // Safety: We verify that the value returned by `load` is the preimage of `hash`, fully constraining it. If `T`\n // is `()`, then `preimage` must be an array of length 0 (since that is `()`'s deserialization length).\n // `hash_args` handles empty arrays following the protocol rules (i.e. an empty args array is signaled with a\n // zero hash), correctly constraining `self.hash`.\n let preimage = unsafe { execution_cache::load(self.hash) };\n assert_eq(self.hash, hash_args(preimage), \"Preimage mismatch\");\n\n Deserialize::deserialize(preimage)\n }\n}\n\nmod test {\n use crate::{\n hash::hash_args,\n oracle::execution_cache,\n test::{helpers::test_environment::TestEnvironment, mocks::MockStruct},\n };\n use crate::protocol::traits::Serialize;\n use super::ReturnsHash;\n use std::test::OracleMock;\n\n #[test]\n unconstrained fn retrieves_preimage() {\n let env = TestEnvironment::new();\n env.private_context(|_| {\n let value = MockStruct::new(4, 7);\n let serialized = value.serialize();\n\n let hash = hash_args(serialized);\n execution_cache::store(serialized, hash);\n\n assert_eq(ReturnsHash::new(hash).get_preimage(), value);\n });\n }\n\n #[test]\n unconstrained fn retrieves_empty_preimage() {\n let env = TestEnvironment::new();\n env.private_context(|_| {\n let value = ();\n let serialized = [];\n\n let hash = hash_args(serialized);\n execution_cache::store(serialized, hash);\n\n assert_eq(ReturnsHash::new(hash).get_preimage(), value);\n });\n }\n\n #[test(should_fail_with = \"Preimage mismatch\")]\n unconstrained fn rejects_bad_preimage() {\n let value = MockStruct::new(4, 7);\n let serialized = value.serialize();\n\n let mut bad_serialized = serialized;\n bad_serialized[0] += 1;\n\n let hash = hash_args(serialized);\n\n let _ = OracleMock::mock(\"aztec_prv_getHashPreimage\").returns(bad_serialized);\n assert_eq(ReturnsHash::new(hash).get_preimage(), value);\n }\n}\n"
|
|
4996
5356
|
},
|
|
4997
5357
|
"71": {
|
|
@@ -5045,7 +5405,7 @@
|
|
|
5045
5405
|
"start": 2891
|
|
5046
5406
|
}
|
|
5047
5407
|
],
|
|
5048
|
-
"path": "/
|
|
5408
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/context/utility_context.nr",
|
|
5049
5409
|
"source": "use crate::oracle::{execution::{get_utility_context, UtilityContextData}, storage::storage_read};\nuse crate::protocol::{\n abis::block_header::BlockHeader, address::AztecAddress, constants::NULL_MSG_SENDER_CONTRACT_ADDRESS,\n traits::Packable,\n};\n\n// If you'll modify this struct don't forget to update utility_context.ts as well.\npub struct UtilityContext {\n block_header: BlockHeader,\n contract_address: AztecAddress,\n msg_sender: AztecAddress,\n}\n\nimpl From<UtilityContextData> for UtilityContext {\n fn from(data: UtilityContextData) -> Self {\n Self { block_header: data.block_header, contract_address: data.contract_address, msg_sender: data.msg_sender }\n }\n}\n\nimpl UtilityContext {\n pub unconstrained fn new() -> Self {\n get_utility_context()\n }\n\n pub unconstrained fn at(contract_address: AztecAddress) -> Self {\n // We get a context with default contract address, and then we construct the final context with the provided\n // contract address.\n let default_context = get_utility_context();\n\n Self { block_header: default_context.block_header, contract_address, msg_sender: default_context.msg_sender }\n }\n\n pub fn block_header(self) -> BlockHeader {\n self.block_header\n }\n\n pub fn block_number(self) -> u32 {\n self.block_header.block_number()\n }\n\n pub fn timestamp(self) -> u64 {\n self.block_header.timestamp()\n }\n\n pub fn this_address(self) -> AztecAddress {\n self.contract_address\n }\n\n /// Returns the address that initiated this utility call.\n ///\n /// This is similar to `msg.sender` in Solidity (hence the name). A utility function called by another contract\n /// (via a nested utility call) sees that contract's address. A utility function invoked directly (e.g. by a wallet\n /// or dApp) has no caller and sees `Option::none`.\n ///\n /// Important Note: utility functions are simulated client-side and never proven, so this value is whatever the\n /// simulator (PXE) set it to: nothing about it is verified onchain. It exists to assist simulation in a\n /// cooperative environment and must not be relied on as a security guarantee.\n pub unconstrained fn maybe_msg_sender(self) -> Option<AztecAddress> {\n if self.msg_sender == NULL_MSG_SENDER_CONTRACT_ADDRESS {\n Option::none()\n } else {\n Option::some(self.msg_sender)\n }\n }\n\n pub fn version(self) -> Field {\n self.block_header.version()\n }\n\n pub fn chain_id(self) -> Field {\n self.block_header.chain_id()\n }\n\n pub unconstrained fn raw_storage_read<let N: u32>(self: Self, storage_slot: Field) -> [Field; N] {\n storage_read(self.block_header, self.this_address(), storage_slot)\n }\n\n pub unconstrained fn storage_read<T>(self, storage_slot: Field) -> T\n where\n T: Packable,\n {\n T::unpack(self.raw_storage_read(storage_slot))\n }\n}\n"
|
|
5050
5410
|
},
|
|
5051
5411
|
"73": {
|
|
@@ -5071,7 +5431,7 @@
|
|
|
5071
5431
|
"start": 6480
|
|
5072
5432
|
}
|
|
5073
5433
|
],
|
|
5074
|
-
"path": "/
|
|
5434
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/contract_self/contract_self_public.nr",
|
|
5075
5435
|
"source": "//! The `self` contract value for public execution contexts.\n\nuse crate::{\n context::{calls::{PublicCall, PublicStaticCall}, PublicContext},\n event::{event_emission::emit_event_in_public, event_interface::EventInterface},\n};\nuse crate::protocol::{address::AztecAddress, traits::{Deserialize, Serialize}};\n\n/// Core interface for interacting with aztec-nr contract features in public execution contexts.\n///\n/// This struct is automatically injected into every [`external`](crate::macros::functions::external) and\n/// [`internal`](crate::macros::functions::internal) contract function marked with `\"public\"` by the Aztec macro\n/// system and is accessible through the `self` variable.\n///\n/// ## Type Parameters\n///\n/// - `Storage`: The contract's storage struct (defined with [`storage`](crate::macros::storage::storage), or `()` if\n/// the contract has no storage\n/// - `CallSelf`: Macro-generated type for calling contract's own non-view functions\n/// - `CallSelfStatic`: Macro-generated type for calling contract's own view functions\n/// - `CallInternal`: Macro-generated type for calling internal functions\npub struct ContractSelfPublic<Storage, CallSelf, CallSelfStatic, CallInternal> {\n /// The address of this contract\n pub address: AztecAddress,\n\n /// The contract's storage instance, representing the struct to which the\n /// [`storage`](crate::macros::storage::storage) macro was applied in your contract. If the contract has no\n /// storage, the type of this will be `()`.\n ///\n /// This storage instance is specialized for the current execution context (public) and\n /// provides access to the contract's state variables.\n ///\n /// ## Developer Note\n ///\n /// If you've arrived here while trying to access your contract's storage while the `Storage` generic type is set\n /// to unit type `()`, it means you haven't yet defined a Storage struct using the\n /// [`storage`](crate::macros::storage::storage) macro in your contract. For guidance on setting this up, please\n /// refer to our docs: https://docs.aztec.network/developers/docs/guides/smart_contracts/storage\n pub storage: Storage,\n\n /// The public execution context.\n pub context: PublicContext,\n\n /// Provides type-safe methods for calling this contract's own non-view functions.\n ///\n /// Example API:\n /// ```noir\n /// self.call_self.some_public_function(args)\n /// ```\n pub call_self: CallSelf,\n\n /// Provides type-safe methods for calling this contract's own view functions.\n ///\n /// Example API:\n /// ```noir\n /// self.call_self_static.some_view_function(args)\n /// ```\n pub call_self_static: CallSelfStatic,\n\n /// Provides type-safe methods for calling internal functions.\n ///\n /// Example API:\n /// ```noir\n /// self.internal.some_internal_function(args)\n /// ```\n pub internal: CallInternal,\n}\n\nimpl<Storage, CallSelf, CallSelfStatic, CallInternal> ContractSelfPublic<Storage, CallSelf, CallSelfStatic, CallInternal> {\n /// Creates a new `ContractSelfPublic` 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(\n context: PublicContext,\n storage: Storage,\n call_self: CallSelf,\n call_self_static: CallSelfStatic,\n internal: CallInternal,\n ) -> Self {\n Self { context, storage, address: context.this_address(), call_self, call_self_static, internal }\n }\n\n /// The address of the contract address that made this function call.\n ///\n /// This is similar to Solidity's `msg.sender` value.\n ///\n /// ## Incognito Calls\n ///\n /// Contracts can call public functions from private ones hiding their identity (see\n ///\n /// [`ContractSelfPrivate::enqueue_incognito`](crate::contract_self::ContractSelfPrivate::enqueue_incognito)).\n /// This function reverts when executed in such a context.\n ///\n /// If you need to handle these cases, use [`PublicContext::maybe_msg_sender`].\n pub fn msg_sender(self: Self) -> AztecAddress {\n self.context.maybe_msg_sender().unwrap()\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 unconstrained 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 a public contract call.\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 a public read-only contract call.\n ///\n /// This is similar to Solidity's `staticcall`. The called function cannot modify state or emit events. Any nested\n /// calls are constrained to 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"
|
|
5076
5436
|
},
|
|
5077
5437
|
"76": {
|
|
@@ -5121,7 +5481,7 @@
|
|
|
5121
5481
|
"start": 3259
|
|
5122
5482
|
}
|
|
5123
5483
|
],
|
|
5124
|
-
"path": "/
|
|
5484
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/ephemeral/mod.nr",
|
|
5125
5485
|
"source": "use crate::oracle::ephemeral_oracles;\nuse crate::protocol::traits::{Deserialize, Serialize};\nuse crate::protocol::utils::{reader::Reader, writer::Writer};\nuse crate::unconstrained_array::{ArrayOracles, UnconstrainedArray};\n\n/// A dynamically sized array that exists only during a single contract call frame.\n///\n/// Ephemeral arrays are backed by in-memory storage on the PXE side rather than a persistent database. Each contract\n/// call frame gets its own isolated slot space of ephemeral arrays. Child simulations cannot see the parent's\n/// ephemeral arrays, and vice versa.\n///\n/// Each logical array operation (push, pop, get, etc.) is a single oracle call, making ephemeral arrays significantly\n/// cheaper than capsule arrays.\n///\n/// ## Use Cases\n///\n/// Ephemeral arrays are designed for passing data between PXE (TypeScript) and contracts (Noir) during simulation,\n/// for example, note validation requests or event validation responses. This data type is appropriate for data that\n/// is not supposed to be persisted.\n///\n/// For data that needs to persist across simulations, contract calls, etc, use\n/// [`CapsuleArray`](crate::capsules::CapsuleArray) instead.\n///\n/// For data that must be shared across all frames of the same contract (private and utility) within one top-level PXE\n/// call (transaction simulation or utility call) but not persisted, use\n/// [`TransientArray`](crate::transient::TransientArray).\npub type EphemeralArray<T> = UnconstrainedArray<T, EphemeralOracles>;\n\npub struct EphemeralOracles {}\n\nimpl ArrayOracles for EphemeralOracles {\n unconstrained fn len_oracle(slot: Field) -> u32 {\n ephemeral_oracles::len_oracle(slot)\n }\n\n unconstrained fn push_oracle<let N: u32>(slot: Field, values: [Field; N]) -> u32 {\n ephemeral_oracles::push_oracle(slot, values)\n }\n\n unconstrained fn pop_oracle<let N: u32>(slot: Field) -> [Field; N] {\n ephemeral_oracles::pop_oracle(slot)\n }\n\n unconstrained fn get_oracle<let N: u32>(slot: Field, index: u32) -> [Field; N] {\n ephemeral_oracles::get_oracle(slot, index)\n }\n\n unconstrained fn set_oracle<let N: u32>(slot: Field, index: u32, values: [Field; N]) {\n ephemeral_oracles::set_oracle(slot, index, values)\n }\n\n unconstrained fn remove_oracle(slot: Field, index: u32) {\n ephemeral_oracles::remove_oracle(slot, index)\n }\n\n unconstrained fn clear_oracle(slot: Field) {\n ephemeral_oracles::clear_oracle(slot)\n }\n}\n\n/// Serializes an `EphemeralArray` as its slot, allowing oracle function signatures to use ephemeral array types\n/// instead of opaque `Field` slots.\nimpl<T> Serialize for UnconstrainedArray<T, EphemeralOracles> {\n let N: u32 = 1;\n\n fn serialize(self) -> [Field; Self::N] {\n [self.slot]\n }\n\n fn stream_serialize<let K: u32>(self, writer: &mut Writer<K>) {\n writer.write(self.slot);\n }\n}\n\n/// Deserializes a single Field into an `EphemeralArray` handle, treating the field value as the slot identifier.\nimpl<T> Deserialize for UnconstrainedArray<T, EphemeralOracles> {\n let N: u32 = 1;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n Self { slot: fields[0] }\n }\n\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n Self { slot: reader.read() }\n }\n}\n\n#[crate::unconstrained_array::test_suite::unconstrained_array_tests(quote { crate::ephemeral::EphemeralOracles })]\nmod test {}\n"
|
|
5126
5486
|
},
|
|
5127
5487
|
"78": {
|
|
@@ -5143,7 +5503,7 @@
|
|
|
5143
5503
|
"start": 2814
|
|
5144
5504
|
}
|
|
5145
5505
|
],
|
|
5146
|
-
"path": "/
|
|
5506
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/event/event_interface.nr",
|
|
5147
5507
|
"source": "use crate::{event::EventSelector, messages::logs::event::MAX_EVENT_SERIALIZED_LEN};\nuse crate::protocol::{\n constants::DOM_SEP__EVENT_COMMITMENT,\n hash::{poseidon2_hash_with_separator, poseidon2_hash_with_separator_bounded_vec},\n traits::{Serialize, ToField},\n};\n\npub trait EventInterface {\n fn get_event_type_id() -> EventSelector;\n}\n\n/// A private event's commitment is a value stored on-chain which is used to verify that the event was indeed emitted.\n///\n/// It requires a `randomness` value that must be produced alongside the event in order to perform said validation.\n/// This random value prevents attacks in which someone guesses plausible events (e.g. 'Alice transfers to Bob an\n/// amount of 10'), since they will not be able to test for existence of their guessed events without brute-forcing the\n/// entire `Field` space by guessing `randomness` values.\npub fn compute_private_event_commitment<Event>(event: Event, randomness: Field) -> Field\nwhere\n Event: EventInterface + Serialize,\n{\n poseidon2_hash_with_separator(\n [randomness, Event::get_event_type_id().to_field()].concat(event.serialize()),\n DOM_SEP__EVENT_COMMITMENT,\n )\n}\n\n/// Unconstrained variant of [`compute_private_event_commitment`] which takes the event in serialized form.\n///\n/// This function is unconstrained as the mechanism it uses to compute the commitment would be very inefficient in a\n/// constrained environment (due to the hashing of a dynamically sized array). This is not an issue as it is typically\n/// invoked when processing event messages, which is an unconstrained operation.\npub unconstrained fn compute_private_serialized_event_commitment(\n serialized_event: BoundedVec<Field, MAX_EVENT_SERIALIZED_LEN>,\n randomness: Field,\n event_type_id: Field,\n) -> Field {\n let mut commitment_preimage =\n BoundedVec::<_, 2 + MAX_EVENT_SERIALIZED_LEN>::from_array([randomness, event_type_id]);\n commitment_preimage.extend_from_bounded_vec(serialized_event);\n\n poseidon2_hash_with_separator_bounded_vec(commitment_preimage, DOM_SEP__EVENT_COMMITMENT)\n}\n\nmod test {\n use crate::event::event_interface::{\n compute_private_event_commitment, compute_private_serialized_event_commitment, EventInterface,\n };\n use crate::messages::logs::event::MAX_EVENT_SERIALIZED_LEN;\n use crate::protocol::traits::{Serialize, ToField};\n use crate::test::mocks::mock_event::MockEvent;\n\n global VALUE: Field = 7;\n global RANDOMNESS: Field = 10;\n\n #[test]\n unconstrained fn max_size_serialized_event_commitment() {\n let serialized_event = BoundedVec::from_array([0; MAX_EVENT_SERIALIZED_LEN]);\n let _ = compute_private_serialized_event_commitment(serialized_event, 0, 0);\n }\n\n #[test]\n unconstrained fn event_commitment_equivalence() {\n let event = MockEvent::new(VALUE).build_event();\n\n assert_eq(\n compute_private_event_commitment(event, RANDOMNESS),\n compute_private_serialized_event_commitment(\n BoundedVec::from_array(event.serialize()),\n RANDOMNESS,\n MockEvent::get_event_type_id().to_field(),\n ),\n );\n }\n}\n"
|
|
5148
5508
|
},
|
|
5149
5509
|
"80": {
|
|
@@ -5173,7 +5533,7 @@
|
|
|
5173
5533
|
"start": 985
|
|
5174
5534
|
}
|
|
5175
5535
|
],
|
|
5176
|
-
"path": "/
|
|
5536
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/event/event_selector.nr",
|
|
5177
5537
|
"source": "use crate::protocol::{hash::poseidon2_hash_bytes, traits::{Deserialize, Empty, FromField, Serialize, ToField}};\n\n#[derive(Deserialize, Eq, Serialize)]\npub struct EventSelector {\n // Low 32 bits of the poseidon2 hash of the event signature.\n inner: u32,\n}\n\nimpl FromField for EventSelector {\n fn from_field(field: Field) -> Self {\n Self { inner: field as u32 }\n }\n}\n\nimpl ToField for EventSelector {\n fn to_field(self) -> Field {\n self.inner as Field\n }\n}\n\nimpl Empty for EventSelector {\n fn empty() -> Self {\n Self { inner: 0 as u32 }\n }\n}\n\nimpl EventSelector {\n pub fn from_u32(value: u32) -> Self {\n Self { inner: value }\n }\n\n pub fn from_signature<let N: u32>(signature: str<N>) -> Self {\n let bytes = signature.as_bytes();\n let hash = poseidon2_hash_bytes(bytes);\n\n // `hash` is automatically truncated to fit within 32 bits.\n EventSelector::from_field(hash)\n }\n\n pub fn zero() -> Self {\n Self { inner: 0 }\n }\n}\n"
|
|
5178
5538
|
},
|
|
5179
5539
|
"82": {
|
|
@@ -5255,7 +5615,7 @@
|
|
|
5255
5615
|
"start": 12385
|
|
5256
5616
|
}
|
|
5257
5617
|
],
|
|
5258
|
-
"path": "/
|
|
5618
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/facts/mod.nr",
|
|
5259
5619
|
"source": "//! Per-contract storage of immutable facts grouped into collections.\n//!\n//! A fact is a contract-defined, typed, immutable datum. Facts are grouped into collections identified by a\n//! `(collection type, collection id)` tuple.\n//!\n//! They are stored in PXE's FactStore, which automatically deals with reorgs by removing any facts\n//! associated with blocks that have been pruned.\nuse crate::ephemeral::EphemeralArray;\nuse crate::oracle::fact_store::{\n delete_fact_collection_oracle, get_fact_collection_oracle, get_fact_collections_by_type_oracle, record_fact_oracle,\n};\nuse crate::protocol::{address::AztecAddress, traits::{Deserialize, Serialize}};\n\nmod origin_state;\npub use origin_state::OriginBlockState;\n\n/// The block a retractable fact originates from.\n#[derive(Deserialize, Eq, Serialize)]\npub struct OriginBlock {\n pub block_number: u32,\n pub block_hash: Field,\n}\n\n/// A retractable fact's origin block.\n#[derive(Deserialize, Eq, Serialize)]\npub struct RetractableFactOrigin {\n pub block_number: u32,\n pub block_hash: Field,\n pub block_state: OriginBlockState,\n}\n\n/// A single immutable fact in a collection.\n#[derive(Deserialize, Serialize)]\npub struct Fact {\n /// A user-defined identifier for fact kinds. Typically used to determine how to deserialize `payload`.\n pub fact_type_id: Field,\n pub payload: EphemeralArray<Field>,\n /// The block the fact is associated to, if any. A fact with an origin block is said to be a 'retractable' fact,\n /// and will be automatically deleted if its origin block gets pruned in a reorg. Typically used by facts\n /// associated with a transaction (e.g. 'processed entry X using data from tx Y in block Z').\n pub origin_block: Option<RetractableFactOrigin>,\n}\n\n/// A fact collection as returned by the store.\n#[derive(Deserialize, Serialize)]\npub struct FactCollection {\n pub contract_address: AztecAddress,\n pub scope: AztecAddress,\n /// The collection's type. A single contract may have facts in collections of different types (e.g. one for the\n /// processing offchain messages, another for partial notes, etc.).\n pub fact_collection_type_id: Field,\n /// The collection's unique identifier among the other collections of this type in this contract and scope.\n pub fact_collection_id: Field,\n pub facts: EphemeralArray<Fact>,\n}\n\n/// Records a retractable fact into a collection: PXE prunes it if `origin_block` is reorg'd away. Re-recording an\n/// identical fact is a no-op.\npub unconstrained fn record_retractable_fact(\n contract_address: AztecAddress,\n scope: AztecAddress,\n fact_collection_type_id: Field,\n fact_collection_id: Field,\n fact_type_id: Field,\n payload: EphemeralArray<Field>,\n origin_block: OriginBlock,\n) {\n record_fact_oracle(\n contract_address,\n scope,\n fact_collection_type_id,\n fact_collection_id,\n fact_type_id,\n payload,\n Option::some(origin_block),\n );\n}\n\n/// Records a non-retractable fact into a collection: it survives reorgs and will persist until the fact collection\n/// itself is deleted. Re-recording an identical fact is a no-op.\npub unconstrained fn record_non_retractable_fact(\n contract_address: AztecAddress,\n scope: AztecAddress,\n fact_collection_type_id: Field,\n fact_collection_id: Field,\n fact_type_id: Field,\n payload: EphemeralArray<Field>,\n) {\n record_fact_oracle(\n contract_address,\n scope,\n fact_collection_type_id,\n fact_collection_id,\n fact_type_id,\n payload,\n Option::none(),\n );\n}\n\n/// Deletes a fact collection, removing all its facts from PXE storage.\n///\n/// Collections must be eventually deleted to reclaim storage and to stop reprocessing past the lifespan of the\n/// workflows they enable.\n///\n/// A no-op if no such collection exists.\npub unconstrained fn delete_fact_collection(\n contract_address: AztecAddress,\n scope: AztecAddress,\n fact_collection_type_id: Field,\n fact_collection_id: Field,\n) {\n delete_fact_collection_oracle(\n contract_address,\n scope,\n fact_collection_type_id,\n fact_collection_id,\n );\n}\n\n/// Fetches a fact collection.\npub unconstrained fn get_fact_collection(\n contract_address: AztecAddress,\n scope: AztecAddress,\n fact_collection_type_id: Field,\n fact_collection_id: Field,\n) -> Option<FactCollection> {\n get_fact_collection_oracle(\n contract_address,\n scope,\n fact_collection_type_id,\n fact_collection_id,\n )\n}\n\n/// Returns every fact collection of `fact_collection_type_id`.\npub unconstrained fn get_fact_collections_by_type(\n contract_address: AztecAddress,\n scope: AztecAddress,\n fact_collection_type_id: Field,\n) -> EphemeralArray<FactCollection> {\n get_fact_collections_by_type_oracle(contract_address, scope, fact_collection_type_id)\n}\n\nmod test {\n use crate::ephemeral::EphemeralArray;\n use crate::facts::{\n delete_fact_collection, get_fact_collection, get_fact_collections_by_type, OriginBlock,\n record_non_retractable_fact, record_retractable_fact,\n };\n use crate::protocol::address::AztecAddress;\n use crate::protocol::traits::{FromField, ToField};\n use crate::test::helpers::test_environment::TestEnvironment;\n\n global TYPE_ID: Field = 42;\n global COLLECTION_ID: Field = 7;\n global FACT_TYPE_ID: Field = 99;\n global PAYLOAD: [Field; 3] = [123, 456, 789];\n\n unconstrained fn setup() -> (TestEnvironment, AztecAddress) {\n let mut env = TestEnvironment::new();\n let scope = env.create_light_account();\n (env, scope)\n }\n\n unconstrained fn make_payload<let N: u32>(values: [Field; N]) -> EphemeralArray<Field> {\n let payload: EphemeralArray<Field> = EphemeralArray::empty();\n for i in 0..N {\n payload.push(values[i]);\n }\n payload\n }\n\n unconstrained fn assert_payload(payload: EphemeralArray<Field>) {\n assert_eq(payload.len(), PAYLOAD.len());\n for i in 0..PAYLOAD.len() {\n assert_eq(payload.get(i), PAYLOAD[i]);\n }\n }\n\n unconstrained fn record_fact(contract_address: AztecAddress, scope: AztecAddress) {\n record_non_retractable_fact(\n contract_address,\n scope,\n TYPE_ID,\n COLLECTION_ID,\n FACT_TYPE_ID,\n make_payload(PAYLOAD),\n );\n }\n\n #[test]\n unconstrained fn records_and_reads_a_fact() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n record_fact(contract_address, scope);\n\n let collection = get_fact_collection(contract_address, scope, TYPE_ID, COLLECTION_ID).unwrap();\n assert_eq(collection.contract_address, contract_address);\n assert_eq(collection.scope, scope);\n assert_eq(collection.fact_collection_type_id, TYPE_ID);\n assert_eq(collection.fact_collection_id, COLLECTION_ID);\n assert_eq(collection.facts.len(), 1);\n\n let fact = collection.facts.get(0);\n assert_eq(fact.fact_type_id, FACT_TYPE_ID);\n assert_payload(fact.payload);\n assert(fact.origin_block.is_none());\n });\n }\n\n #[test]\n unconstrained fn reads_collections_by_type() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n record_fact(contract_address, scope);\n\n let collections = get_fact_collections_by_type(contract_address, scope, TYPE_ID);\n assert_eq(collections.len(), 1);\n\n let collection = collections.get(0);\n assert_eq(collection.fact_collection_id, COLLECTION_ID);\n assert_eq(collection.facts.len(), 1);\n\n let fact = collection.facts.get(0);\n assert_eq(fact.fact_type_id, FACT_TYPE_ID);\n assert_payload(fact.payload);\n });\n }\n\n #[test]\n unconstrained fn records_a_retractable_fact_finalized_at_latest_block() {\n let (env, scope) = setup();\n let origin_block_number = env.last_block_number();\n env.private_context(|context| {\n let contract_address = context.this_address();\n record_retractable_fact(\n contract_address,\n scope,\n TYPE_ID,\n COLLECTION_ID,\n FACT_TYPE_ID,\n make_payload(PAYLOAD),\n OriginBlock { block_number: origin_block_number, block_hash: 0xabc },\n );\n\n let collection = get_fact_collection(contract_address, scope, TYPE_ID, COLLECTION_ID).unwrap();\n assert_eq(collection.facts.len(), 1);\n\n let fact = collection.facts.get(0);\n assert_eq(fact.fact_type_id, FACT_TYPE_ID);\n assert_payload(fact.payload);\n\n let origin = fact.origin_block.unwrap();\n assert_eq(origin.block_number, origin_block_number);\n assert_eq(origin.block_hash, 0xabc);\n // TXE finalizes every mined block, so an origin at the latest block is Finalized.\n assert(origin.block_state.is_finalized());\n });\n }\n\n #[test]\n unconstrained fn retractable_fact_above_proven_tip_is_pending() {\n let (env, scope) = setup();\n let future_block_number = env.last_block_number() + 100;\n env.private_context(|context| {\n let contract_address = context.this_address();\n record_retractable_fact(\n contract_address,\n scope,\n TYPE_ID,\n COLLECTION_ID,\n FACT_TYPE_ID,\n make_payload(PAYLOAD),\n OriginBlock { block_number: future_block_number, block_hash: 0xabc },\n );\n\n let origin = get_fact_collection(contract_address, scope, TYPE_ID, COLLECTION_ID)\n .unwrap()\n .facts\n .get(0)\n .origin_block\n .unwrap();\n assert(origin.block_state.is_pending());\n });\n }\n\n #[test]\n unconstrained fn deletes_a_fact_collection() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n record_fact(contract_address, scope);\n delete_fact_collection(contract_address, scope, TYPE_ID, COLLECTION_ID);\n\n let collections = get_fact_collections_by_type(contract_address, scope, TYPE_ID);\n assert_eq(collections.len(), 0);\n });\n }\n\n #[test]\n unconstrained fn reading_unknown_collection_returns_none() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n let collection = get_fact_collection(contract_address, scope, TYPE_ID, COLLECTION_ID);\n assert(collection.is_none());\n });\n }\n\n #[test(should_fail_with = \"not allowed to access\")]\n unconstrained fn cannot_record_for_other_contract() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let other = AztecAddress::from_field(context.this_address().to_field() + 1);\n record_fact(other, scope);\n });\n }\n\n #[test]\n unconstrained fn re_recording_an_identical_fact_is_a_no_op() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n record_fact(contract_address, scope);\n record_fact(contract_address, scope);\n\n let collection = get_fact_collection(contract_address, scope, TYPE_ID, COLLECTION_ID).unwrap();\n assert_eq(collection.facts.len(), 1);\n });\n }\n\n #[test]\n unconstrained fn deleting_a_non_existing_collection_is_a_no_op() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n delete_fact_collection(contract_address, scope, TYPE_ID, COLLECTION_ID);\n\n assert(get_fact_collection(contract_address, scope, TYPE_ID, COLLECTION_ID).is_none());\n });\n }\n\n #[test]\n unconstrained fn recording_a_fact_after_delete_recreates_the_collection() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n record_fact(contract_address, scope);\n let collection_before_delete =\n get_fact_collection(contract_address, scope, TYPE_ID, COLLECTION_ID).unwrap();\n assert_eq(collection_before_delete.facts.len(), 1);\n\n delete_fact_collection(contract_address, scope, TYPE_ID, COLLECTION_ID);\n assert(get_fact_collection(contract_address, scope, TYPE_ID, COLLECTION_ID).is_none());\n\n record_fact(contract_address, scope);\n let collection_after_recreate =\n get_fact_collection(contract_address, scope, TYPE_ID, COLLECTION_ID).unwrap();\n assert_eq(collection_after_recreate.facts.len(), 1);\n });\n }\n}\n"
|
|
5260
5620
|
},
|
|
5261
5621
|
"83": {
|
|
@@ -5317,54 +5677,54 @@
|
|
|
5317
5677
|
"start": 3216
|
|
5318
5678
|
}
|
|
5319
5679
|
],
|
|
5320
|
-
"path": "/
|
|
5680
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/facts/origin_state.nr",
|
|
5321
5681
|
"source": "use crate::protocol::{traits::{Deserialize, Serialize}, utils::reader::Reader};\n\n/// Chain state of a retractable fact's origin block, mirroring the L2 chain tips.\n#[derive(Serialize)]\npub struct OriginBlockState {\n // Noir has no enums, so this wraps a `u8` discriminant. The discriminant values must stay in sync with the\n // TypeScript `OriginBlockState` enum in `yarn-project/pxe/src/storage/fact_store/origin_state.ts`, which PXE\n // serializes into the `Fact` oracle response that `from_u8` below deserializes.\n inner: u8,\n}\n\nimpl OriginBlockState {\n pub fn pending() -> Self {\n Self { inner: 1 }\n }\n\n pub fn proven() -> Self {\n Self { inner: 2 }\n }\n\n pub fn finalized() -> Self {\n Self { inner: 3 }\n }\n\n /// Whether the origin block is still above the proven tip.\n pub fn is_pending(self) -> bool {\n self == Self::pending()\n }\n\n /// Whether the origin block is proven but not yet finalized.\n pub fn is_proven(self) -> bool {\n self == Self::proven()\n }\n\n /// Whether the origin block is finalized, and thus facts related to it can no longer be retracted.\n pub fn is_finalized(self) -> bool {\n self == Self::finalized()\n }\n\n fn from_u8(inner: u8) -> Self {\n let state = Self { inner };\n assert(state.is_valid(), \"unrecognized origin state\");\n state\n }\n\n fn is_valid(self) -> bool {\n self.is_pending() | self.is_proven() | self.is_finalized()\n }\n}\n\nimpl Eq for OriginBlockState {\n fn eq(self, other: Self) -> bool {\n self.inner == other.inner\n }\n}\n\nimpl Deserialize for OriginBlockState {\n let N: u32 = <u8 as Deserialize>::N;\n\n fn deserialize(fields: [Field; Self::N]) -> Self {\n Self::from_u8(<u8 as Deserialize>::deserialize(fields))\n }\n\n fn stream_deserialize<let K: u32>(reader: &mut Reader<K>) -> Self {\n Self::from_u8(reader.read() as u8)\n }\n}\n\nmod test {\n use crate::protocol::traits::{Deserialize, Serialize};\n use super::OriginBlockState;\n\n #[test]\n fn query_functions_identify_each_state() {\n assert(OriginBlockState::pending().is_pending());\n assert(!OriginBlockState::pending().is_proven());\n assert(!OriginBlockState::pending().is_finalized());\n\n assert(OriginBlockState::proven().is_proven());\n assert(!OriginBlockState::proven().is_pending());\n assert(!OriginBlockState::proven().is_finalized());\n\n assert(OriginBlockState::finalized().is_finalized());\n assert(!OriginBlockState::finalized().is_pending());\n assert(!OriginBlockState::finalized().is_proven());\n }\n\n #[test]\n fn origin_state_roundtrips_through_serialization() {\n let pending = OriginBlockState::pending();\n let proven = OriginBlockState::proven();\n let finalized = OriginBlockState::finalized();\n assert(OriginBlockState::deserialize(pending.serialize()) == pending);\n assert(OriginBlockState::deserialize(proven.serialize()) == proven);\n assert(OriginBlockState::deserialize(finalized.serialize()) == finalized);\n }\n\n #[test(should_fail_with = \"unrecognized origin state\")]\n fn deserializing_invalid_state_fails() {\n let _ = OriginBlockState::deserialize([99]);\n }\n}\n"
|
|
5322
5682
|
},
|
|
5323
5683
|
"84": {
|
|
5324
5684
|
"function_locations": [
|
|
5325
5685
|
{
|
|
5326
5686
|
"name": "compute_secret_hash",
|
|
5327
|
-
"start":
|
|
5687
|
+
"start": 536
|
|
5328
5688
|
},
|
|
5329
5689
|
{
|
|
5330
5690
|
"name": "compute_l1_to_l2_message_hash",
|
|
5331
|
-
"start":
|
|
5691
|
+
"start": 815
|
|
5332
5692
|
},
|
|
5333
5693
|
{
|
|
5334
5694
|
"name": "compute_l1_to_l2_message_nullifier",
|
|
5335
|
-
"start":
|
|
5695
|
+
"start": 1892
|
|
5336
5696
|
},
|
|
5337
5697
|
{
|
|
5338
5698
|
"name": "hash_args",
|
|
5339
|
-
"start":
|
|
5699
|
+
"start": 2151
|
|
5340
5700
|
},
|
|
5341
5701
|
{
|
|
5342
5702
|
"name": "hash_calldata_array",
|
|
5343
|
-
"start":
|
|
5703
|
+
"start": 2403
|
|
5344
5704
|
},
|
|
5345
5705
|
{
|
|
5346
5706
|
"name": "compute_public_bytecode_commitment",
|
|
5347
|
-
"start":
|
|
5707
|
+
"start": 3035
|
|
5348
5708
|
},
|
|
5349
5709
|
{
|
|
5350
5710
|
"name": "secret_hash_matches_typescript",
|
|
5351
|
-
"start":
|
|
5711
|
+
"start": 4194
|
|
5352
5712
|
},
|
|
5353
5713
|
{
|
|
5354
5714
|
"name": "var_args_hash_matches_typescript",
|
|
5355
|
-
"start":
|
|
5715
|
+
"start": 4555
|
|
5356
5716
|
},
|
|
5357
5717
|
{
|
|
5358
5718
|
"name": "compute_calldata_hash",
|
|
5359
|
-
"start":
|
|
5719
|
+
"start": 4965
|
|
5360
5720
|
},
|
|
5361
5721
|
{
|
|
5362
5722
|
"name": "public_bytecode_commitment",
|
|
5363
|
-
"start":
|
|
5723
|
+
"start": 5428
|
|
5364
5724
|
}
|
|
5365
5725
|
],
|
|
5366
|
-
"path": "/
|
|
5367
|
-
"source": "//! Aztec hash functions.\n\nuse crate::protocol::{\n address::{AztecAddress, EthAddress},\n constants::{\n DOM_SEP__FUNCTION_ARGS, DOM_SEP__MESSAGE_NULLIFIER, DOM_SEP__PUBLIC_BYTECODE, DOM_SEP__PUBLIC_CALLDATA,\n DOM_SEP__SECRET_HASH, MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS,\n },\n hash::{poseidon2_hash_subarray, poseidon2_hash_with_separator, sha256_to_field},\n traits::ToField,\n};\n\npub use crate::protocol::hash::compute_siloed_nullifier;\n\npub fn compute_secret_hash(secret: Field) -> Field {\n poseidon2_hash_with_separator(
|
|
5726
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/hash.nr",
|
|
5727
|
+
"source": "//! Aztec hash functions.\n\nuse crate::protocol::{\n address::{AztecAddress, EthAddress},\n constants::{\n DOM_SEP__FUNCTION_ARGS, DOM_SEP__MESSAGE_NULLIFIER, DOM_SEP__PUBLIC_BYTECODE, DOM_SEP__PUBLIC_CALLDATA,\n DOM_SEP__SECRET_HASH, MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS,\n },\n hash::{poseidon2_hash_subarray, poseidon2_hash_with_separator, sha256_to_field},\n traits::ToField,\n};\n\npub use crate::protocol::hash::compute_siloed_nullifier;\n\npub fn compute_secret_hash<let N: u32>(secret: [Field; N]) -> Field {\n poseidon2_hash_with_separator(secret, DOM_SEP__SECRET_HASH)\n}\n\npub fn compute_l1_to_l2_message_hash(\n sender: EthAddress,\n chain_id: Field,\n recipient: AztecAddress,\n version: Field,\n content: Field,\n secret_hash: Field,\n leaf_index: Field,\n) -> Field {\n let mut hash_bytes = [0 as u8; 224];\n let sender_bytes: [u8; 32] = sender.to_field().to_be_bytes();\n let chain_id_bytes: [u8; 32] = chain_id.to_be_bytes();\n let recipient_bytes: [u8; 32] = recipient.to_field().to_be_bytes();\n let version_bytes: [u8; 32] = version.to_be_bytes();\n let content_bytes: [u8; 32] = content.to_be_bytes();\n let secret_hash_bytes: [u8; 32] = secret_hash.to_be_bytes();\n let leaf_index_bytes: [u8; 32] = leaf_index.to_be_bytes();\n\n for i in 0..32 {\n hash_bytes[i] = sender_bytes[i];\n hash_bytes[i + 32] = chain_id_bytes[i];\n hash_bytes[i + 64] = recipient_bytes[i];\n hash_bytes[i + 96] = version_bytes[i];\n hash_bytes[i + 128] = content_bytes[i];\n hash_bytes[i + 160] = secret_hash_bytes[i];\n hash_bytes[i + 192] = leaf_index_bytes[i];\n }\n\n sha256_to_field(hash_bytes)\n}\n\n// The nullifier of an l1 to l2 message is the hash of the message salted with the secret.\npub fn compute_l1_to_l2_message_nullifier<let N: u32>(message_hash: Field, secret: [Field; N]) -> Field {\n poseidon2_hash_with_separator([message_hash].concat(secret), DOM_SEP__MESSAGE_NULLIFIER)\n}\n\n// Computes the hash of input arguments or return values for private functions, or for authwit creation.\npub fn hash_args<let N: u32>(args: [Field; N]) -> Field {\n if args.len() == 0 {\n 0\n } else {\n poseidon2_hash_with_separator(args, DOM_SEP__FUNCTION_ARGS)\n }\n}\n\n// Computes the hash of calldata for public functions.\npub fn hash_calldata_array<let N: u32>(calldata: [Field; N]) -> Field {\n poseidon2_hash_with_separator(calldata, DOM_SEP__PUBLIC_CALLDATA)\n}\n\n/// Computes the public bytecode commitment for a contract class. The commitment is `hash([(length | separator),\n/// ...bytecode])`.\n///\n/// @param packed_bytecode - The packed bytecode of the contract class. 0th word is the length in bytes.\n/// packed_bytecode is mutable so that we can avoid copying the array to construct one starting with first_field\n/// instead of length. @returns The public bytecode commitment.\npub fn compute_public_bytecode_commitment(\n mut packed_public_bytecode: [Field; MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS],\n) -> Field {\n // First field element contains the length of the bytecode\n let bytecode_length_in_bytes: u32 = packed_public_bytecode[0] as u32;\n let bytecode_length_in_fields: u32 = (bytecode_length_in_bytes / 31) + (bytecode_length_in_bytes % 31 != 0) as u32;\n // Don't allow empty public bytecode. AVM doesn't handle execution of contracts that exist with empty bytecode.\n assert(bytecode_length_in_fields != 0);\n assert(bytecode_length_in_fields < MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS);\n\n // Packed_bytecode's 0th entry is the length. Append it to the separator before hashing.\n let first_field = DOM_SEP__PUBLIC_BYTECODE.to_field() + (packed_public_bytecode[0] as u64 << 32) as Field;\n packed_public_bytecode[0] = first_field;\n\n // `fields_to_hash` is the number of fields from the start of `packed_public_bytecode` that should be included in\n // the hash. Fields after this length are ignored. +1 to account for the prepended field.\n let num_fields_to_hash = bytecode_length_in_fields + 1;\n\n poseidon2_hash_subarray(packed_public_bytecode, num_fields_to_hash)\n}\n\n#[test]\nunconstrained fn secret_hash_matches_typescript() {\n let secret = 8;\n let hash = compute_secret_hash([secret]);\n\n // The following value was generated by `yarn-project/stdlib/src/hash/hash.test.ts`\n let secret_hash_from_ts = 0x1848b066724ab0ffb50ecb0ee3398eb839f162823d262bad959721a9c13d1e96;\n\n assert_eq(hash, secret_hash_from_ts);\n}\n\n#[test]\nunconstrained fn var_args_hash_matches_typescript() {\n let mut input = [0; 100];\n for i in 0..100 {\n input[i] = i as Field;\n }\n let hash = hash_args(input);\n\n // The following value was generated by `yarn-project/stdlib/src/hash/hash.test.ts`\n let var_args_hash_from_ts = 0x262e5e121a8efc0382566ab42f0ae2a78bd85db88484f83018fe07fc2552ba0c;\n\n assert_eq(hash, var_args_hash_from_ts);\n}\n\n#[test]\nunconstrained fn compute_calldata_hash() {\n let mut input = [0; 100];\n for i in 0..input.len() {\n input[i] = i as Field;\n }\n let hash = hash_calldata_array(input);\n\n // The following value was generated by `yarn-project/stdlib/src/hash/hash.test.ts`\n let calldata_hash_from_ts = 0x14a1539bdb1d26e03097cf4d40c87e02ca03f0bb50a3e617ace5a7bfd3943944;\n\n // Used in cpp vm2 tests:\n assert_eq(hash, calldata_hash_from_ts);\n}\n\n#[test]\nunconstrained fn public_bytecode_commitment() {\n let mut input = [0; MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS];\n let len = 99;\n for i in 1..len + 1 {\n input[i] = i as Field;\n }\n input[0] = (len as Field) * 31;\n let hash = compute_public_bytecode_commitment(input);\n // Used in cpp vm2 tests:\n assert_eq(hash, 0x09348974e76c3602893d7a4b4bb52c2ec746f1ade5004ac471d0fbb4587a81a6);\n}\n"
|
|
5368
5728
|
},
|
|
5369
5729
|
"95": {
|
|
5370
5730
|
"function_locations": [
|
|
@@ -5401,7 +5761,7 @@
|
|
|
5401
5761
|
"start": 5055
|
|
5402
5762
|
}
|
|
5403
5763
|
],
|
|
5404
|
-
"path": "/
|
|
5764
|
+
"path": "/home/nventuro/pkg-1/noir-projects/aztec-nr/aztec/src/keys/ecdh_shared_secret.nr",
|
|
5405
5765
|
"source": "use crate::protocol::{\n address::aztec_address::AztecAddress,\n constants::{DOM_SEP__APP_SILOED_ECDH_SHARED_SECRET, DOM_SEP__ECDH_FIELD_MASK, DOM_SEP__ECDH_SUBKEY},\n hash::poseidon2_hash_with_separator,\n point::EmbeddedCurvePoint,\n scalar::Scalar,\n traits::{FromField, ToField},\n};\nuse std::{embedded_curve_ops::multi_scalar_mul, ops::Neg};\n\n/// Computes a standard ECDH shared secret: secret * public_key = shared_secret.\n///\n/// The input secret is known only to one party. The output shared secret can be derived given knowledge of\n/// `public_key`'s key-pair and the public ephemeral secret, using this same function (with reversed inputs).\n///\n/// E.g.: Epk = esk * G // ephemeral key-pair\n/// Pk = sk * G // recipient key-pair\n/// Shared secret S = esk * Pk = sk * Epk\n///\n/// See also: https://en.wikipedia.org/wiki/Elliptic-curve_Diffie%E2%80%93Hellman\npub fn derive_ecdh_shared_secret(secret: Scalar, public_key: EmbeddedCurvePoint) -> EmbeddedCurvePoint {\n multi_scalar_mul([public_key], [secret])\n}\n\n/// Computes an app-siloed shared secret from a raw ECDH shared secret point and a contract address.\n///\n/// `s_app = h(DOM_SEP__APP_SILOED_ECDH_SHARED_SECRET, S.x, S.y, contract_address)`\npub fn compute_app_siloed_shared_secret(shared_secret: EmbeddedCurvePoint, contract_address: AztecAddress) -> Field {\n poseidon2_hash_with_separator(\n [shared_secret.x, shared_secret.y, contract_address.to_field()],\n DOM_SEP__APP_SILOED_ECDH_SHARED_SECRET,\n )\n}\n\n/// Derives an indexed subkey from an app-siloed shared secret, used for AES key/IV derivation.\n///\n/// `s_i = h(DOM_SEP__ECDH_SUBKEY + i, s_app)`\npub(crate) fn derive_shared_secret_subkey(s_app: Field, index: u32) -> Field {\n poseidon2_hash_with_separator([s_app], DOM_SEP__ECDH_SUBKEY + index)\n}\n\n/// Derives an indexed field mask from an app-siloed shared secret, used for masking ciphertext fields.\n///\n/// `m_i = h(DOM_SEP__ECDH_FIELD_MASK + i, s_app)`\npub(crate) fn derive_shared_secret_field_mask(s_app: Field, index: u32) -> Field {\n poseidon2_hash_with_separator([s_app], DOM_SEP__ECDH_FIELD_MASK + index)\n}\n\n#[test]\nunconstrained fn test_consistency_with_typescript() {\n let secret = Scalar {\n lo: 0x00000000000000000000000000000000649e7ca01d9de27b21624098b897babd,\n hi: 0x0000000000000000000000000000000023b3127c127b1f29a7adff5cccf8fb06,\n };\n let point = EmbeddedCurvePoint {\n x: 0x2688431c705a5ff3e6c6f2573c9e3ba1c1026d2251d0dbbf2d810aa53fd1d186,\n y: 0x1e96887b117afca01c00468264f4f80b5bb16d94c1808a448595f115556e5c8e,\n };\n\n let shared_secret = derive_ecdh_shared_secret(secret, point);\n\n // This is just pasted from a test run. The original typescript code from which this could be generated seems to\n // have been deleted by someone, and soon the typescript code for encryption and decryption won't be needed, so\n // this will have to do.\n let hard_coded_shared_secret = EmbeddedCurvePoint {\n x: 0x15d55a5b3b2caa6a6207f313f05c5113deba5da9927d6421bcaa164822b911bc,\n y: 0x0974c3d0825031ae933243d653ebb1a0b08b90ee7f228f94c5c74739ea3c871e,\n };\n assert_eq(shared_secret, hard_coded_shared_secret);\n}\n\n#[test]\nunconstrained fn test_shared_secret_computation_in_both_directions() {\n let secret_a = Scalar { lo: 0x1234, hi: 0x2345 };\n let secret_b = Scalar { lo: 0x3456, hi: 0x4567 };\n\n let pk_a = std::embedded_curve_ops::fixed_base_scalar_mul(secret_a);\n let pk_b = std::embedded_curve_ops::fixed_base_scalar_mul(secret_b);\n\n let shared_secret = derive_ecdh_shared_secret(secret_a, pk_b);\n let shared_secret_alt = derive_ecdh_shared_secret(secret_b, pk_a);\n\n assert_eq(shared_secret, shared_secret_alt);\n}\n\n#[test]\nunconstrained fn test_shared_secret_computation_from_address_in_both_directions() {\n let secret_a = Scalar { lo: 0x1234, hi: 0x2345 };\n let secret_b = Scalar { lo: 0x3456, hi: 0x4567 };\n\n let mut pk_a = std::embedded_curve_ops::fixed_base_scalar_mul(secret_a);\n let mut pk_b = std::embedded_curve_ops::fixed_base_scalar_mul(secret_b);\n\n let address_b = AztecAddress::from_field(pk_b.x);\n\n // We were lazy in deriving the secret keys, and didn't check the resulting y-coordinates of the pk_a or pk_b to be\n // less than half the field modulus. If needed, we negate the pk's so that they yield valid address points. (We\n // could also have negated the secrets, but there's no negate method for EmbeddedCurvesScalar).\n pk_a = if (AztecAddress::from_field(pk_a.x).to_address_point().unwrap().inner == pk_a) {\n pk_a\n } else {\n pk_a.neg()\n };\n pk_b = if (address_b.to_address_point().unwrap().inner == pk_b) {\n pk_b\n } else {\n pk_b.neg()\n };\n\n let shared_secret = derive_ecdh_shared_secret(secret_a, address_b.to_address_point().unwrap().inner);\n let shared_secret_alt = derive_ecdh_shared_secret(secret_b, pk_a);\n\n assert_eq(shared_secret, shared_secret_alt);\n}\n\n#[test]\nunconstrained fn test_app_siloed_shared_secret_differs_per_contract() {\n let secret_a = Scalar { lo: 0x1234, hi: 0x2345 };\n let pk_b = std::embedded_curve_ops::fixed_base_scalar_mul(Scalar { lo: 0x3456, hi: 0x4567 });\n\n let shared_secret = derive_ecdh_shared_secret(secret_a, pk_b);\n\n let contract_a = AztecAddress::from_field(0xAAAA);\n let contract_b = AztecAddress::from_field(0xBBBB);\n\n let s_app_a = compute_app_siloed_shared_secret(shared_secret, contract_a);\n let s_app_b = compute_app_siloed_shared_secret(shared_secret, contract_b);\n\n assert(s_app_a != s_app_b, \"app-siloed secrets must differ for different contracts\");\n}\n"
|
|
5406
5766
|
}
|
|
5407
5767
|
},
|
|
@@ -5457,7 +5817,7 @@
|
|
|
5457
5817
|
"abi_public",
|
|
5458
5818
|
"abi_only_self"
|
|
5459
5819
|
],
|
|
5460
|
-
"debug_symbols": "
|
|
5820
|
+
"debug_symbols": "rZjbbuJADIbfJddcjA9zcF9lVVWUphUSAkRhpVXFu6+njJOANLOU7E35cJI/tvN7MuWre+tfTx8v6+377rN7+vXVvR7Wm83642WzWy2P691Wo1+dy38AQvfkFx0gdE+SP/U7kAJpAPIRCgXYlUPsC/gciRl8gWCRkApEMogKSSFhAXEGejnqLdA5AylAFiE2sENsEbaIt4hPBQIaxAIRDEKBZLdIlkbKgpozChmkC5AjA4uARcAimNNIGaQAWYT0HHIKTAY5AgqeCgQw0AwpXxWdgS+QLJIsIhYRNkgX4JzzBWIBQINyC87P/wIqyC6DFMjJX8AibBG2iLdINgBDBm+Qz1G3cMzncAYpkGIB0Xw431004uF8XnTm1Zfjoe+zVSfmVUvvl4d+e+yetqfNZtH9Xm5O3yd97pfb78/j8qBHNaN++6afKvi+3vSZzovxale/1DsfytUeIA4CAHIlAXUJdgGLhHacqxJYl4AkVgMIuKoE1SXQeaSioUxjKeFagxsaMZmCTOpI/t46UOfOFChStY5QlyBmXyRI3TVIqNpUIf6HTqS5nWj5SkfNfMUU6r5qaKibwmAsX20FNLyJEFCsEgiMtV4Ath6JSVCoN+Mfafg4pBGdVNNouJPRDZM6UfCP9XNSyW0/G+4UZ74QHFPQtt5ti1xhsUX0VVu0JJBtufEYxyq+19NJFdJc9PzYyjELxJtJb6Sh71MzhaSxE5CuFRqmEHKWhdDEmXS73mDrebCNujhxdQ1q2dskKI2VoIRrhda6CTEM7k78mAbSsGhhaOQRWgaP9lB0WCYvs3h3GiTDCq4o1TTa9nIyvlND3V7SeqlKHGYV+FGNoR0wrQX9Q8OWYm3YCOcPG9HcYSOeP2zk5w8bhbnDRnH+sDU17hw2ktnD1krj3mFr2+u+YeOGhm75LQ9mN2kHpR9oJB40Jlu/W407h41cddi4YdEozswRhbBeSdOiEHHYgur/sdWddOPR+jgM/cTnjOEnadC4EwZf39A3TErkna2jyoFqIr7xXCikoR8R6XoH+Kxfl6v14epXh3MWO6yXr5u+fH0/bVeTo8c/eztiv1rsD7tV/3Y69Flp+tOF/iMofiHx+Zzv9hc=",
|
|
5461
5821
|
"is_unconstrained": true,
|
|
5462
5822
|
"name": "_set_authorized"
|
|
5463
5823
|
},
|
|
@@ -5517,7 +5877,7 @@
|
|
|
5517
5877
|
"custom_attributes": [
|
|
5518
5878
|
"abi_public"
|
|
5519
5879
|
],
|
|
5520
|
-
"debug_symbols": "vZrRbhs5DEX/
|
|
5880
|
+
"debug_symbols": "vZrRbhs5DEX/xc95kEiREvsrRVGkqVsECJLATRZYFPn3JW1RM85CytTy7kt8whnfkTSXlEbj37vv+2+vP7/eP/54+rX79Pn37tvh/uHh/ufXh6e725f7p0eN/t4F+xNBP+hGP2n3SfQT9f/IBlQhpQrsEZYK2Q9ljxSPFI8IOuQTQAAHrhCjQ70EQHAwwWJQKiA6eCR5JHmEPELWDO0XcHLwSNZzIBqUCsUiYFAqSI1giA7aZlBltDZjMFBBtEPWVEQDqYC5QtIuYzKwiI43ElTg4KB9R20YZo2kaEAOUg/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VtM5dZMFy2hmkeavvs8/aAbl1gx9rOquvUZ1sKWKzvaLAl02nquevBvPNJrsg9tCQFbG2u6KJc0KpZ4r0mgNqpORD4QyUHcsB4UnybJygouWb6XN0bq50k2QNDIF5bJ0JEt3NkgDbxJ7udCNios6knlZAUI3T2kgAQhtRtLljyx3hM6dRXF+GUkwv4wknF1GUppfRg41Ni4jiaeXkcNm0FI914uEP+oKpfbIp/tsl2kwtPLJSBdqYOsL82UauppNLVlSf1nN8J/elq2r+1HaS3t21Ae/btozzT9+Ms8+fnKerxtc5usGy2zdyGG+bgw1NtaNPG/QHOYNOrbXtsfPPJrmg+S24onpUo02HHHdF6ALki3pnmkv2XKZT7Yss8lWwnyylTifbAVmk63gfLINNTYmW6HpZBs1Y2uyje21LdlKmd/rGWvM7/Wskw2wl2wS5/d6BK6w1yN4hb0eSVfY6xGa3ev5oC/b9nokz+/1fHBntu31iMzv9XygsWmvZ7QnELA90odVT7bv05xNbwD99xB4hRcRIU2/iQh0hVcRga/wLiLk6ZcRoVzhbcRQZOvriNGLgI1z1FaTYdemcfSeafvbLpw22eg902aTjd7PbDZZ5GmTxXwFkw1FNptM/jeTUd9kMJj5swQfjyzYn/kjDFenEZdX1JG6E24cvXBCpOCrEOXVzsm/VEZbBVzaNnxerYaOE+YX/ff27v5w9kO/NxM73N9+e9jXf3+8Pt6tjr78/exH/IeCz4enu/3318PelJZfC+qfz7pquVFXfLnZ2e9xPoNu5ADIlze7+j8=",
|
|
5521
5881
|
"is_unconstrained": true,
|
|
5522
5882
|
"name": "consume"
|
|
5523
5883
|
},
|
|
@@ -5574,7 +5934,7 @@
|
|
|
5574
5934
|
"abi_public",
|
|
5575
5935
|
"abi_view"
|
|
5576
5936
|
],
|
|
5577
|
-
"debug_symbols": "
|
|
5937
|
+
"debug_symbols": "rVlRbtswDL2Lv/MhUhQl9SrDUKRtOgQI0iJrBwxF7j6yFm2ngFQvyk/9TNvPJMUnMvXH8LR7eP91vz8+v/we7n58DA+n/eGw/3V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3fqfkOP1OAbqWY0oHLGPBcJXYsq+JLWC/2ILvFVugfrGF0C+2wL1iC7FfbE2OlWILuVtsLTfWiq1dXuvExtg/CrY5+kfBhdjyYo77IjYO/aMg8w1GQY43GAU53WAU5Nw7Cn4Ty7pRMEL/KPjNyqwbBaPvHwW/4Vg1CjY5bjAKxgSzYOhCMD/lbPu4P118gzgr12m/fTjsyunz+/FxcfXt76tdsW8Yr6eXx93T+2mnTPOHDJD/t/6Q4Dfi/M+zvu8f",
|
|
5578
5938
|
"is_unconstrained": true,
|
|
5579
5939
|
"name": "is_consumable"
|
|
5580
5940
|
},
|
|
@@ -5624,7 +5984,7 @@
|
|
|
5624
5984
|
"abi_public",
|
|
5625
5985
|
"abi_view"
|
|
5626
5986
|
],
|
|
5627
|
-
"debug_symbols": "
|
|
5987
|
+
"debug_symbols": "rZfZbqMwFIbfhWsuzuYtrzKqKprSCgmRiCYjjaq8+9gtx0AlW91u4p9j+Dib7fDaPPYP1+f7YXo6vTSHP6/NwzyM4/B8P56O3WU4TdH62kD6sdIcTNvY0BxC27h4hRTHeIncNl7ex0DL6JoDQdsg2EUgLoJJhU6JTolajFqMWiyoEBVhEY5V+EV4fYVXN0ICUhLmXRCACrWgWlAtpBZKbsSwiFGFWiTdY5IwizDJYpMwi7BqsX4RyWdO5OQzSxQ+AjlNJVfZJWHfBYOoiCGzv93aRutzf5n7PpVnU7BYxnM399OlOUzXcWybv914fbvp5dxNb+Olm+NsTEw/PcYxAp+GsU/q1q5PQ/lRA8YuTxtElwGIYYfAMkLA0oIQJCkiqIxAHzSGWGEoIriMiOVPZXxjRM1rKHbPkArDeSWETRzefDYOIodKYMfFOGwZwSJmQbBYkxGRtiW4X8iE/2kman1lQ+4rR+VMYIXBca8JmgtEgVIgWOlOBK+OIEL4Xiw+5FjEFmOpIQzkdBimjDC4D0SqK9XklQprYxDtA0FTKavXZcbBZ4Kg3xMq7RkY1IvAsgbCH9KJlQYNINqfAQKUGb62TBTBfo0kbrV7QqjkAp2WhNDL9xjEeaXFM6HIoNr2iU6LIgSbHdh92g0OeduJMpRDqbYXhPUgsMX2ogpDOKgfIrBJB/svMLxkxmYL/cj47GKLK6yw2KjSojb+41gQlpDKkdRalNzapOSslLYvqpWWwObzgMBTCcLwCycC448Px3osBGsswRbdqJzzHCuqDAtUdqReGd5UZrNiPjpS2Uvj7q8JQYK1UYXsVxiYGcZ+j0E2H3DkaM+4i5fdcZh33wG3BJuH7mHsl8un63TczF7+nXVGvyPO8+nYP17nPpHWj4n0MfDHYmv57pbe9h8=",
|
|
5628
5988
|
"is_unconstrained": true,
|
|
5629
5989
|
"name": "is_reject_all"
|
|
5630
5990
|
},
|
|
@@ -5658,7 +6018,7 @@
|
|
|
5658
6018
|
"custom_attributes": [
|
|
5659
6019
|
"abi_public"
|
|
5660
6020
|
],
|
|
5661
|
-
"debug_symbols": "
|
|
6021
|
+
"debug_symbols": "rVhbbuMwDLyLv/MhknoxV1kURdq6RQAjCdxkgUWRuy/ViLITQNo03p94TNljkp6RFH91b/3L6eN5u3vff3brX1/dy7gdhu3H87B/3Ry3+51EvzqTfgCwW7uVHEO3ZjminAMlIAFII4QKfB6yoCBFggAHCjTirQLOIFC3RptAzCCGC0CTI5iyuQAdQo2gRkgjKZ9vYI0Cp4AzcFaBPsKTgkToBQRQ4DOIGokaYY1wjpBJaYQEQgagEUjXSDMJQYFEyAggUMAZWMmQ0l02ZuBIgUa8RrxGAirwGaScL8BlwEaBPoL5AqxJhJxAyCAlfwEaQY2gRkgjJGlYSd5aUiDXWBTg5BpLCYQMvMsgSD42PT1IxJnzedWpIJ+PY98nPc4UKro9bMZ+d+zWu9MwrLrfm+H0fdHnYbP7Ph43o4zK8/vdmxyF8H079AmdV9Pdpn6rM87nu51YoBAA8BUF1Cms8ZgppIm2SoF1CoisNQCDqVJQnQKNQ8ocgmkqxV9z2AZHiMrAszqiu7cO8SgoAwWq1uHrFGIHlylIlFMohG3OEP5DJ+LSTjR0hVJH6YTjQuHgWlYNChGTL7py1U5AQ5oIPs0+lzRkRsZaKwBbb0QpyNd78Y80XChpBMPVNBritGiKUWcM7rF+ziq57WdDnGxUFoxTCtLWu1UBkz8sVVURmxOWm/owqQLxphPcSCNqK4njVAbEa583CmEymgXTTFZ0O1dAq5lWbcqGTZ2jqU2loDhVImv0NUNr3oTgizSjfYwDqUw46Bt5uJY6g74UUfpsIQp3p0FcZl+BXE2jLS/D03roq/LC2FoQORSjgX2Uo7QD5rWge8hss5XkxmwEy81GuNRsRMvNRna52cgtNRv55WZrctxpNoqLzdZK416zteV1n9lsa/dJrHlYa2btoPgDjmgLx2zbdstxr9li1Wy2IdHARsURmLBeSVOiELBsHyFWNzy28WpdKKaf6dyi/0kaNO1iwdU34w2REjmj86hgT1WSxlIvfxhLPwLS9fbtSU43r9vx6rPAOZGN283L0OfT99PudTZ6/HPQEf2scBj3r/3baewT0/zbgvyJi3HF5umcnvYX",
|
|
5662
6022
|
"is_unconstrained": true,
|
|
5663
6023
|
"name": "set_authorized"
|
|
5664
6024
|
},
|
|
@@ -7468,11 +7828,11 @@
|
|
|
7468
7828
|
"visibility": "databus"
|
|
7469
7829
|
}
|
|
7470
7830
|
},
|
|
7471
|
-
"bytecode": "H4sIAAAAAAAA/+2dd2BUxdrG876TUAJYQMUKEQSxK/YuJAFiAQR7W9dkgZWQhM0GAUGJDbEmSxF7oQqigoqKgL3PI3ZFsfeOvXu/E1J2UzaZTfa5ev24/9zj7pzfO2fO9Nn8MJHyGat39vn848OBXF9ByBcsCAdCBf78Yp+vOBD2+UvCIwpDwfGBPF9RKDjGHw6sMfNK7+yb788d2bdwbL+SgtxMf35+6ZwhfQb2z46Uzjs+GC4IFBdrhkMiIw6JNnYhdTrMIdFmdpJDqs5OqbZ2ydU2Lom6uCTq6pIowynn2zql6uaUqrtTqu1cMt9LShf2DQXz84PDK76fllJWNrWs7LGMlMb/J6UL+hQXB0LhkwKhwqll5ZHHMnbPGxh6b4+bdrhvcPbS0tITTu2156cDxt1fVJ753o9T13q3wB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T3anxfM9RUWn5UXzFm/QeIr7xlrjTwbpk0bpk31P1Mi06Zu0RpfUflOKK97g9ZXvaqiacrM6e6KwchL4W2kl//w89ra1WXzZlbXzZLzqlOi+akG125Yjr8dTylZWNEDrU8+sHBqdf88J2tUsT+vqE5MrdObmdZ1mqVjdIkXPWVmZnB0tJFX56GqmlQ/dlVBRJbHvrz1RewbVexNqgP54Rm1s5fW1EPryvvbJvk1pkXBccpD51cGjCmWlGj5xLlLZh5TnBfz3hpNPqT4rHroNQbqmHpQ62VU/+Qi7f8AvUwgboqeAQA=",
|
|
7472
7832
|
"custom_attributes": [
|
|
7473
7833
|
"abi_private"
|
|
7474
7834
|
],
|
|
7475
|
-
"debug_symbols": "
|
|
7835
|
+
"debug_symbols": "tVrRjhsrDP2XPO8DNraB/ZXqqkrbtFop2l2lu5Wuqv77BQYYkl6cyUz2Ze1Jdk6MOTYG/Hv37fDl/cfnp+fvLz93j59+776cno7Hpx+fjy9f929PL8/x0987k/4A7R6R/jzsID/Z+GTjE+ansHukqJtJwCRwEnYSNAnePYYoZPcIEKUr0hcZJmlNkVAkFmmLjGiAUXKRUqQr0hcZJkmmSCgSi7RFFjwqeFTwqOBRwaOCxwWPCx4XPC54XPC44HHB44LHCc9HGSYppsiEF/0jCS9E99rk3jTaMliMn1H6LPkaIT5xnoCIh/Ff0kQkmb/FaSqyxCLTtCUMyW+lb018cv/zK77+B/yJT5UPn99Oh0P6piNIpM3r/nR4fts9Pr8fjw+7X/vje/6nn6/75yzf9qf4rXnYHZ6/RRkBvz8dD0n78zC/bcavCkt52RnXXkfjlwKwDwVAcAaAYJcCAPk0cxki6gQNhM8x7BjDEddROF5lBEOo4wBGa0ZG8BiDMEVQhiB0oSEQnc+GjCGsowphPZghhNsO4RUIlOoLix47CFzrzzDyJ2jcNOwrt4zM5LoFgbAhMA8Q9HE4P4+DZDgOhZ2W24wIdzHmzhFojBAIXIEIZP1wRkChZxBTZySItWMMhZ8spvqTBWiMoRA0BleBQO65dYM/0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sQSsneuR/p7wL0u8dko9lyTUXY9dlCSA4Q5Zzd6jGrDbqwHtdmpxVlNBlmY17Q5iaVaz96htdJBlZzxXQBYWSPYeBZINH+zXhQXStRCeMz0hwziECbfuGK9YgjJvbiw4xRKFsc76VmpFnYYbYCC+Q66/Ykvgdmtvw/jWC7TrJgrztVe/AC6/OHNcHcv9XdPlxRlQuMPN2RUU166bot5tpG9E8TOKp/W2cIcSVqJsvwxk8W2KQ5eXLidIa9cJ7ZLW9e0dGeKf+Lj/+nQ67+oFiSyKbgSXbosecg9plmGSuZu39JBS6SFNMZMberl09MrU0pulpOifenqz9Im7U09vkqmnN0uY3k89vWynnt4sqUhOTJ96erN0yZdTT2+WYZKppzdtzVJPb5YRL5V5qac3+TP19GbJRUpa1qee3lB6ekPp6U29SqmnN0tIHTKlp9dIaepNl4u5qzfVKrmtN63Rua83K64quVMYS2svUuntzUpqpk2JMnf3ZsVWharCuaiLilTFVcXnxBiVhJw87kxVEnLyuUvIKec4W5WEnG6AHVdFquKqkpDTBa8LRfGmKlCVjBx/3dvyo56qwlXJyHGk3lXFVyUUJVSbA1QFq1KRQ7Y55YZf+9PT/svxkAibOP3+/LXyNz6+/ftav6l966+nl6+Hb++nQ+J6prktfz7F2t7aFArcPpEHK+kTd/E/KWT+Aw==",
|
|
7476
7836
|
"is_unconstrained": false,
|
|
7477
7837
|
"name": "set_authorized_private",
|
|
7478
7838
|
"verification_key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAtSwyHHUqyUUK9yzTh7CfEpUAAAAAAAAAAAAAAAAAAAAAAB+qjwUJI7zdgKiow5OyswAAAAAAAAAAAAAAAAAAAIBYjWl1F4+B4LVrQz4dWHfnAAAAAAAAAAAAAAAAAAAAAAAJFUWtzUojIQ99Glu37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JMo2JOi2ZeqCuC+1k/V5Xc9rNiTjFqC8ElhdjWu13h1dzRIFB0RahuWG7pw+IKxJtOSCWNoK0kCUsZELbrvFKIkNEshFa2otu9AmrNtLpMxYgpM6reVASFpRIUvyXU9k1gP1sz2J8xkOYNB30lD1dzJ+ukRKevDiK+Ow2SefeNUopp1O1lZDkPfdFeWGFYEs3DWrNqB4VvMIKdGauT5JZx52LjVSk3i40qFmUxag4WwmIWVLUoMM4nGoTiHkyVqXU8L/qVzy3676RBy8EKrngqUsWk8VXO6EYetacipHbC+zD3g5G2J8pjvG0P/bR5f78m2NS3z0OXb18v42E1ev590hF9/z9Nx0P3cpm6RFr9CYivzQ8edp4er+nX/gA=",
|
|
7504
7864
|
"is_unconstrained": true,
|
|
7505
7865
|
"name": "set_reject_all"
|
|
7506
7866
|
},
|
|
@@ -7556,7 +7916,7 @@
|
|
|
7556
7916
|
"visibility": "public"
|
|
7557
7917
|
}
|
|
7558
7918
|
},
|
|
7559
|
-
"bytecode": "H4sIAAAAAAAA/+1b3W8jVxX3fHnGdvZ7N84Sx3Hs9EPiqVuE+trNJm12N5vVbpcnhDVNhmBwbDMeVw1PuA9ISDzY2S1/AMmGQFlUJHihEkLi4wFqCQkJVKkPICEhgRA8ICQqVeq4/pgz9865M3d83W3V5Gkyd87vnHvu75577rnXyn73u+98tlw2v+FYW+WaXa7UHMuumdVmudxyKtWKs1euNMtb9VqztWu+XLW67Teu2pVqtbKzYlarDxL77aO7ldpO1brf6e7/upBg/0mJ0E8SfIBSOGC3j7jbqFry/U4nHHE/IXW6squcyy/vysn2wxX3X+d+++haxba2HLn9/XVXaseyD+49eyVcMSkvccl/c5OUT/Dp32wf9oe0e3qMc3zHqppO5RVL5UOSaQSNDyHR/lHflm3TMVfqjb1xl25CmwD4wUb9lX3vhex9T7Qoo5aNYW/nhl8MX9+
|
|
7919
|
+
"bytecode": "H4sIAAAAAAAA/+1b3W8jVxX3fHnGdvZ7N84Sx3Hs9EPiqVuE+trNJm12N5v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abi_utility"
|
|
7562
7922
|
],
|
|
@@ -7575,6 +7935,10 @@
|
|
|
7575
7935
|
"error_kind": "string",
|
|
7576
7936
|
"string": "Index out of bounds"
|
|
7577
7937
|
},
|
|
7938
|
+
"4215903597095405243": {
|
|
7939
|
+
"error_kind": "string",
|
|
7940
|
+
"string": "offchain message anchor timestamp is implausibly far in the future"
|
|
7941
|
+
},
|
|
7578
7942
|
"9530675838293881722": {
|
|
7579
7943
|
"error_kind": "string",
|
|
7580
7944
|
"string": "Writer did not write all data"
|
|
@@ -7686,11 +8050,11 @@
|
|
|
7686
8050
|
],
|
|
7687
8051
|
"return_type": null
|
|
7688
8052
|
},
|
|
7689
|
-
"bytecode": "H4sIAAAAAAAA/+
|
|
8053
|
+
"bytecode": "H4sIAAAAAAAA/+2deWCcRfnHk2y2uY+26QXd7JG2ySYgFEpBRKF3C9TWlsolliXZpoFcTTaloSKu5aqAJmm5rAL2oqUUKwUBKyCHKDLDfYhU0UJBRcQKiAjqbwLZ3dn3fWfed958w/7U4a8h787ned6Z7zxzvH2f19PXe82utmXL6pdHmlqXdkTro00ro73xHdM7mpqbmxpnRJqb12f1xbdM6+iIdO/NPmFdT2/fw4Es+X/ZWbY/yXIGykaBclAgDwqUiwJ5UaBhKFAeCpSPAhWgQIUoUBEKVIwClaBApShQGQpUjgINR4FGoEAjUaAKFGgUCjQaBRqDAo1FgcahQAehQAejQONRIB8KVIkC+VGgAAoURIFCKFAVCjQBBZqIAk1CgapRoBoUKIwC1aJAdSjQISjQoSjQp1Cgw1Cgw1GgySjQESjQkSjQFBToKBRoKgp0NAp0DAr0aRToWBToMyjQcSjQZ1Ggz6FAx6NAJ6BA01Cg6SjQDBRoJgo0CwWajQLNQYHmokDzUKATUaCTUKCTUaD5KNDnUaAFKNBCFOgLKNAiFGgxCnQKCrQEBfoiCnQqCnQaCnQ6CnQGCnQmCvQlFOgsFOjLKNBSFOhsFCiCAp2DAtWjQA0oUBQFWoYCNaJAy1GgJhToXBToPBSoGQV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XXp/zwKzDUupdbD/ySjmR8/ASB+vM4oFEQf1ngFbtW2g9Ok5NerVSoccdngsWJ88F15gWEMlFRir4T50iDv6v5i+clXPnlf745lM6Iu29fan6CSkkvnw8oLGBPw9LzUCWq548Pr+SsU5Oqs0SP6fe1vSZzZvyxOmyKjnvWVYoMFbwpCqkWS5M/SDt70Up1waa33uuoVXyU4zEADJWzrf2rtDonfCbuwmgsUKRTQVDpDeaKTD1CVPxMpG8vKqr00SLtQl62ZOQ2SD1/GTeG+889khjj72eB2no4hkPHbrv9d0XDLmhY+P7PxwbfmSPraH/A5Nv4PX1VwEA",
|
|
7690
8054
|
"custom_attributes": [
|
|
7691
8055
|
"abi_utility"
|
|
7692
8056
|
],
|
|
7693
|
-
"debug_symbols": "
|
|
8057
|
+
"debug_symbols": "tZzfbt02E8Tfxde50O7yb16lKAo3cQoDhhO4yQd8CPLu5VIaznECMfKRfVP/XB/NkBR3RFIH+X7z8e7vb//8df/46fO/N+//+H7z99P9w8P9P389fP5w+/X+82P7v99vFv9PMr15b+/aT7t5n9vP0H7W9jOFm/ciDrlBcCiAukFeAAJQgAECIAISAMoZyhnKxXWig1/l7SoJ4B/2Fpa6QV0AAlCAAQIgAhIgA6BcN+W8LAABNGVdHAwQABGQABlQAHUD8cvVIQAiIAEyoADqBroABKAAKCuUFcoKZYWyQlmhbFA2KBuUDcoGZYOyQdmgbFA2KAcoBygHKPuk0+gQABHgyj7yIQMKoG4QF4AAFGCAAIgAKEcoRyjHpmxt8ue0AATg9WIOBgiAdrl5m70cLDv4h13Qy2GFAGjNCD4TvBxWyIACqBuUBSCAphy8PcUAARABruwNKxlQAK7cCi177awgAAUYIAAiwJW9p147KxRAXaF47YTs4MrVQQEGaMpxcYiABMiAAqgbyAJoylEcFGCAAHAdcyiAuoEX0Qp+VXIIgAjw9ngvvGRWKIC6gZfMCgJQgCsXhwCIgARwQR8Nr5TkbfZKWUEATTCpgwECIAISIAMKwJW9p14pKwhAAa7sN84rZYUIcGVvoVfK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058
|
"is_unconstrained": true,
|
|
7695
8059
|
"name": "offchain_receive"
|
|
7696
8060
|
},
|
|
@@ -7750,7 +8114,7 @@
|
|
|
7750
8114
|
"custom_attributes": [
|
|
7751
8115
|
"abi_public"
|
|
7752
8116
|
],
|
|
7753
|
-
"debug_symbols": "
|
|
8117
|
+
"debug_symbols": "vZ3djt02DoDfZa5zIZH6ofIqRVGkbboIEKRFmiywKPLuK1IS6RnAPMrY6U38HY6PfklRIu2Tf55+f//r1//88uHTH3/+/fT2p3+efv384ePHD//55eOfv7378uHPT136z1Pgf2KsT2/jm6cIZVwxPr0FvpZxTfNzmp9zmNc8rmV+LutzG9ea5pXGlVCuUHp5ia95XGuY1/mZ5mean1v/XuUryRUDPL1tfK3jGnt5MTCUCdBLiIWBm8QS5DYmBpbwn1JYkOafUpuQWUIMbUKpEyos6HVh7sCtHZAntCVpU5JCWJAW0ISIC+oEgAWzisQTMoALrAxtAjd+wJLkJclLUpaEBxqJIS/o96Q+Pon6PSkytAmtDsg83IkYygQe8AFLAksCS8IDPiAtaBMSLqAJeVWR6wTWkRwY8gRu/IAloSWhJWlL0nozcm98CXEB34MdIt+TGPIEwAW9PbnXXrBLCn8LhyqXhPM6VLlwgwuXxg0W4AYPKBPqkhCIXZUW5VpjEr2ukcaV65fr/IzzM87PbHddz2uO85qHmlc2vAFp6HsV02MJ216pDF1S+Fs8wwNo/ontagAbVm8ZBZzAMzygTGCTqsSQFrQJuCS4JGlJeLwEeMAG1Ak8YAPKhLqq4Bke0Auk3h3ipWMATWhL0qakBVywJDzQFBnaBB5qQga+pw9u48EW4FVuQG8P9dqbjDd/i9vcZ72VOK9jIWzcYJ7hxg0e0CbIaAtMSQy8CESBNgGqTHAMGBeUCWlJ0pLkJWG7bkI87ZPG0hhDxQV1qEQMrH6sE51YFqRq0cWJZWEM0dCk0aQxGzZFVomFpMgju1ArjgkMpQoeG3EpC7NiMWkxaTVpNSlJI5NgUWxybxGUe3lsQGZiIinyStybKsjSmBnFKUa5g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ablea9R7UbgHhRyPQJ3tDw8f58CvDeptrfe2VXWzYd5wctd7T3N+6ghm2cAL3m1fwZws1ebZwB3hkvTHzp4VsbLjbP7LlOUX+IeLemuIpx3x1ld+6FBn5I6bja/rzuk5ldTed1GL6vC5oynsTMoN6RaoVxOtUK5IdUK5YZUK5TLqVYoN6Ra/UJ23U25nmp1G7LtbsoNqVZw01e77sYv5AZ3c7S8fPpQPniJp92ED3jvWW0nfMB702o74QNeBms74QPuu1JbCZ9H3dlL+ICXv9pN+Dyan72ED1C8nvB5VMhWwscvZPMBYfd1A1IjDnj+Ci64713po4aVzPxevpkD5D4kuMyv5fOXe9xVoOq2JtNhOXq5CtyRu4LruSu4I3cFd+Su4HruCu7IXcEduSu4IXflNmTb//p6tul/vezVtv/1C7nB/x4t7/xRY/SyV7v+F73U07b/xYA3+F8Md/x8GobLv5/2qDt7/hfdJNam/300P3v+F70c1q7/fVTIlv/1C7nhBZ1M+otumerpa88Yb8gPYLycH8B4Q34A4w35AYyX8wMYb8gP+IXs/oIXXM8PuA3ZdVsP9GzzR7zghvzAo0Ku5weOltdOnxNEuCE/gHA5P4BwQ34A4Yb8AOLl/ADiDfkBv5Bdy8Pr+QG3IduWBzfkBxBvyA88KOSGDePB8lo8DZWil8za3jC6yaztDaObAdreMHq/2ba/YXR/FHBvw/igO5sbRu93Abc3jA/mZ3PD6L2Mtb1hfFDI3obRLeSODWPViE03ntMHStzor76w1/NJ5787jtlVV/3JtMOPVCf89u3n/undbx8+P/t/zL9xSZ8/vPv14/v58Y+vn347/PXL//5af1n/D/pfn//87f3vXz+/55LsP0Pv//xEIbyhSD+/eUL+1NdfSrF/4v9L4yfqWSWC+PM3bsv/AQ==",
|
|
7754
8118
|
"is_unconstrained": true,
|
|
7755
8119
|
"name": "public_dispatch"
|
|
7756
8120
|
},
|
|
@@ -7788,6 +8152,11 @@
|
|
|
7788
8152
|
],
|
|
7789
8153
|
"length": 66
|
|
7790
8154
|
},
|
|
8155
|
+
"12706857619424059571": {
|
|
8156
|
+
"error_kind": "fmtstring",
|
|
8157
|
+
"item_types": [],
|
|
8158
|
+
"length": 37
|
|
8159
|
+
},
|
|
7791
8160
|
"12820178569648940736": {
|
|
7792
8161
|
"error_kind": "fmtstring",
|
|
7793
8162
|
"item_types": [
|
|
@@ -7890,11 +8259,11 @@
|
|
|
7890
8259
|
],
|
|
7891
8260
|
"return_type": null
|
|
7892
8261
|
},
|
|
7893
|
-
"bytecode": "H4sIAAAAAAAA/+19eYBcRZn4TN/33TM9Mz13Lo5AwhERjzXcR8IA4RQiDpkmiZkjzBGSQJAISgxJmJkkk0zClQRCUMEDVFBUPHB1pXdZdld0hXXRn8cKeOCtqL8e6H5d71V9X716XS/pxzz+4WVe11ff++766quvnONjEx8bWte/7Jqh4e7h3NjGj582uLK3d+Xy07t7e3fUjG08uGRl//Le3PbRsfFvtNXg/9XWcH9SM7p9dJQPaKxmdLQwI4HZC3NqNz5w+kD/0PD2jQfPWDmYWzbs2Pjguf3DueW5wQOXnngCH6h2fK3Q+FsOasfXiM1/cOP9U0QdCylwDl2c6+0eXrkm5zT6JQoElxiEmo2fmMKlp3u4+/SB1euUT3rmARIpAvqBxQNrxst/cBAD3vyqARonhyh9KqVLzcb7lwwPrB5TIUoA0/Dv9AfOWpnr7SmA/c8nPhX51jP/88yM/n/3/eqm392wv+aTn/dubL5nRT711NIFM7QDz1AG/tOMlU+O/PquK377zLF/v+l/tj7+yfCvX/J8pfarH/jlf2TH2tq0A89UBm6d/9VHL739+ReuPaPhM87f3PiTrz/RdsMPIz/xujzfTc298V7twLOUgX9+9bk79tZ87dG6Hzkfqp/3mQ33/NPvb+z61Xhv+lcbcnsfeVw78Gxl4GD3s09njvrWqV/vezT6g9pbf3faY7UzXVf+9bTkdXds6nuxRTvwHIL0C07ikL627z7t+HNLE9du/3rTc4udZ3/snu99NN8375wTdn9k5tdeyy5sWf/n551XNj6gHXieAM+/MXLfy9rx5yvj9196CldkKKFYJDTcox2+WKH3z7fs/WD0k+P3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dDt0O3Q7dDt0O3R66Z/3zyQmcwQUs4ApuYAUbGLoJugm6seZlKda8LMWal6VY87IUa16WYs3LzvrnUatjZ/3z5PN9rsnTfyYLePqPa53+M3n6T3c2sPteToPnGOnkBHbfG7VVNuucLxZwBTewgg3cg+cYadRl2axzvjiDC3jqel/NMdLs/zlGOlnBFjzHOfNczHHOyQ2sYAP34DnOOTmBM7iAodug26DboNug26Cr0FXoKnQVugrdOSbJft7nmOTkCvb2FD/vc0xysoF78ByTnJzAGVzAAq5g6Hboduj20J11xRcncAYXsIAruIEVbGDoJugm6CboJugm6CboJugm6CboJuhm6GboZuhm6GboZuhm6GboZuhm6BboFugW6BboFugW6BboFugW6BboCnQFugJdga5AV6Ar0BXoCnQFuhW6FboVuhW6FboVuhW6FboVuhW6DboNug26DboNug26DboNug26DboKXYWuQlehq9BV6Cp0FboKXYWuQdega9A16Bp0Dbrwqwy/yvCrDL/K8KsMv8rwqwy/yvCrDL/K8KsMv8rwqwy/KvCrAr8q8KsCvyrwqwK/KvCrAr8q8KsCvyrwqwK/KvCrAr8q8KsCvyrwqwK/KvCrAr8q8KsCvyrwqwK/KvCrAr8q8KsCvyrwqwK/KvCrcvpVdc7gAp5a6tzACp5a5tyDT4+aPLW6cwYXsIAruIEVbOAefHrUZOhOjxq1oDZrkpt4P0wvGvvJ26xJvtjAPXh60ckJnMEFLOCpK84NrGAD9+DpRScncAYXsIChq9BV6Cp0FboGXYOuQdega9A16Bp0DboGXYNuh26Hboduh26Hboduh26HboduD91Zt3xxAmdwAQu4ghtYwQaGboJugm6CboJugm6CboJugm6CboJuhm6GboZuhm6GboZuhm6GboZuhm6BboFugW6BboFugW6BboFugW6BrkBXoCvQFegKdAW6Al2BrkBXoFuhW6FboVuhW6FboVuhW6FboVuh26DboNug26DboAu/EviVwK8EfiXwK4FfCfxK4FcCvxL4lcCvBH4l8CuBXwn8SuBXAr8S+JXArwR+JfArgV8J/ErgVwK/EviVwK8EfiXwK4FfCfxK4FcCvxL4lcC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KD8ZDuux7qB6sPD887G8Y7sYqy9vF7M9mPUBBz3qbmxf9R1Pbduvib381KbHekVTD/vRw46mdb/SlHYdsnsn4P7Dzn47xJsPO9um3H7YafKeh53dq1z3x427ddb746zdB4juDm92Lbn9sNP6723Idx52dnsH3n3Y0TcMYG+2Y/uws++T+w87+paLVts7Hnb0DRft7ZZsH3b0LUm42wvxHcdz+2HH8j+wIbuHnW2Quw872w+J3X3Y2e2CePthZ/cZsZsPO7tviN0eCe8P5ubDzm77w9sPOz399sO5+bCzD3LzYWe38eHth53tl7fe3ie7h5195rz6sKNpjWOVL5B8HnHtdjx8w8OOxuu6mnQzLO/HbgB5d4+Evnsf5vYeCf3Y7uRy8231vv9+R8MHpRpeQf507+rH7t2C9f4Uq84/va++j7Heha6l72K8vj/ysz6JND6Ui+2f+6S/4wztVr1K7LQ2RtibtqTjLW3ZbtWZYtOTvLtW9lHWbg2PgGUXRd5wptPNTNztkNC3q1+bHRL+5+PXH//1z3/7l7/827/+8T/+/G9//ffHP/zvEetvf/7j//rLn86f/+c///qv+F//4////67/5X/97c9/+cuf/++//L+//du//ul//+ff/jQijf/tD8f5//2PejxmrutR8//8pz+kx+90jG/aj+8tjv9SHv9FRmHwYzqijL8Yf9LHVwMe/1/9n/892vj/AQ==",
|
|
7898
8267
|
"is_unconstrained": true,
|
|
7899
8268
|
"name": "sync_state"
|
|
7900
8269
|
}
|
|
@@ -8404,5 +8773,5 @@
|
|
|
8404
8773
|
}
|
|
8405
8774
|
},
|
|
8406
8775
|
"transpiled": true,
|
|
8407
|
-
"aztec_version": "5.0.
|
|
8776
|
+
"aztec_version": "5.0.1"
|
|
8408
8777
|
}
|