@aztec/standard-contracts 0.0.1-commit.993d240 → 0.0.1-commit.b9865e97
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 +268 -256
- package/artifacts/HandshakeRegistry.d.json.ts +5 -0
- package/artifacts/HandshakeRegistry.json +10071 -0
- package/artifacts/MultiCallEntrypoint.json +227 -219
- package/artifacts/PublicChecks.json +197 -185
- package/dest/contract_data.d.ts +1 -1
- package/dest/contract_data.d.ts.map +1 -1
- package/dest/contract_data.js +5 -0
- package/dest/handshake-registry/constants.d.ts +4 -0
- package/dest/handshake-registry/constants.d.ts.map +1 -0
- package/dest/handshake-registry/constants.js +7 -0
- package/dest/handshake-registry/index.d.ts +6 -0
- package/dest/handshake-registry/index.d.ts.map +1 -0
- package/dest/handshake-registry/index.js +14 -0
- package/dest/handshake-registry/lazy.d.ts +7 -0
- package/dest/handshake-registry/lazy.d.ts.map +1 -0
- package/dest/handshake-registry/lazy.js +24 -0
- package/dest/index.d.ts +2 -1
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -0
- package/dest/standard_contract_data.d.ts +2 -2
- package/dest/standard_contract_data.d.ts.map +1 -1
- package/dest/standard_contract_data.js +33 -13
- package/package.json +5 -4
- package/src/contract_data.ts +5 -0
- package/src/handshake-registry/constants.ts +8 -0
- package/src/handshake-registry/index.ts +24 -0
- package/src/handshake-registry/lazy.ts +35 -0
- package/src/index.ts +1 -0
- package/src/standard_contract_data.ts +38 -10
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"start": 12880
|
|
36
36
|
}
|
|
37
37
|
],
|
|
38
|
-
"path": "/home/
|
|
38
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/macros/aztec.nr",
|
|
39
39
|
"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"
|
|
40
40
|
},
|
|
41
41
|
"105": {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"start": 12234
|
|
66
66
|
}
|
|
67
67
|
],
|
|
68
|
-
"path": "/home/
|
|
68
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/macros/dispatch.nr",
|
|
69
69
|
"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"
|
|
70
70
|
},
|
|
71
71
|
"116": {
|
|
@@ -83,32 +83,32 @@
|
|
|
83
83
|
"start": 4225
|
|
84
84
|
}
|
|
85
85
|
],
|
|
86
|
-
"path": "/home/
|
|
86
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/macros/internals_functions_generation/external/public.nr",
|
|
87
87
|
"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 { aztec::macros::functions::initialization_utils::assert_initialization_matches_address_preimage_public(self.context); },\n quote { aztec::macros::functions::initialization_utils::mark_as_initialized_from_public_initializer(self.context); },\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"
|
|
88
88
|
},
|
|
89
|
-
"
|
|
89
|
+
"128": {
|
|
90
90
|
"function_locations": [
|
|
91
91
|
{
|
|
92
92
|
"name": "do_sync_state",
|
|
93
|
-
"start":
|
|
93
|
+
"start": 7341
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
"name": "test::do_sync_state_does_not_panic_on_empty_logs",
|
|
97
|
-
"start":
|
|
97
|
+
"start": 10249
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
"name": "test::dummy_compute_note_hash",
|
|
101
|
-
"start":
|
|
101
|
+
"start": 11736
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
"name": "test::dummy_compute_note_nullifier",
|
|
105
|
-
"start":
|
|
105
|
+
"start": 12097
|
|
106
106
|
}
|
|
107
107
|
],
|
|
108
|
-
"path": "/home/
|
|
109
|
-
"source": "use crate::logging::{aztecnr_debug_log, aztecnr_debug_log_format, aztecnr_warn_log_format};\nuse crate::protocol::address::AztecAddress;\n\npub(crate) mod nonce_discovery;\npub(crate) mod partial_notes;\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 MessageContext, offchain::OffchainInboxSync, OffchainMessageWithContext,\n pending_tagged_log::PendingTaggedLog, 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/* message_context */ MessageContext,\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 aztecnr_debug_log!(\"Performing state synchronization\");\n\n // First we process all private logs, which can contain different kinds of messages e.g. private notes, partial\n // notes, private events, etc.\n let logs = message_processing::get_pending_tagged_logs(scope);\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: OffchainMessageWithContext| {\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.message_context,\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::fetch_and_process_partial_note_completion_logs(\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 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;\n use crate::test::helpers::test_environment::TestEnvironment;\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 // 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_getPendingTaggedLogs\");\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 }\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"
|
|
108
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/messages/discovery/mod.nr",
|
|
109
|
+
"source": "use crate::logging::{aztecnr_debug_log, aztecnr_debug_log_format, aztecnr_warn_log_format};\nuse crate::protocol::address::AztecAddress;\nuse crate::protocol::hash::sha256_to_field;\n\npub(crate) mod nonce_discovery;\npub(crate) mod partial_notes;\npub(crate) mod private_events;\npub mod private_notes;\npub mod process_message;\n\nuse crate::{\n ephemeral::EphemeralArray,\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 MessageContext, offchain::OffchainInboxSync, OffchainMessageWithContext,\n pending_tagged_log::PendingTaggedLog, provided_secret::ProvidedSecret,\n validate_and_store_enqueued_notes_and_events,\n },\n },\n oracle::message_processing,\n utils::array,\n};\n\nglobal PROVIDED_SECRETS_ARRAY_BASE_SLOT: Field =\n sha256_to_field(\"AZTEC_NR::PROVIDED_SECRETS_ARRAY_BASE_SLOT\".as_bytes());\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/* message_context */ MessageContext,\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 aztecnr_debug_log!(\"Performing state synchronization\");\n\n // First we process all private logs, which can contain different kinds of messages e.g. private notes, partial\n // notes, private events, etc.\n // TODO(F-588): populate with tagging secrets for constrained delivery\n let provided_secrets = EphemeralArray::<ProvidedSecret>::empty_at(PROVIDED_SECRETS_ARRAY_BASE_SLOT);\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: OffchainMessageWithContext| {\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.message_context,\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::fetch_and_process_partial_note_completion_logs(\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 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;\n use crate::test::helpers::test_environment::TestEnvironment;\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 // 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_getPendingTaggedLogs\");\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 }\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"
|
|
110
110
|
},
|
|
111
|
-
"
|
|
111
|
+
"129": {
|
|
112
112
|
"function_locations": [
|
|
113
113
|
{
|
|
114
114
|
"name": "attempt_note_nonce_discovery",
|
|
@@ -163,10 +163,10 @@
|
|
|
163
163
|
"start": 18937
|
|
164
164
|
}
|
|
165
165
|
],
|
|
166
|
-
"path": "/home/
|
|
166
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/messages/discovery/nonce_discovery.nr",
|
|
167
167
|
"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"
|
|
168
168
|
},
|
|
169
|
-
"
|
|
169
|
+
"130": {
|
|
170
170
|
"function_locations": [
|
|
171
171
|
{
|
|
172
172
|
"name": "process_partial_note_private_msg",
|
|
@@ -177,20 +177,20 @@
|
|
|
177
177
|
"start": 3193
|
|
178
178
|
}
|
|
179
179
|
],
|
|
180
|
-
"path": "/home/
|
|
180
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/messages/discovery/partial_notes.nr",
|
|
181
181
|
"source": "use crate::{\n capsules::CapsuleArray,\n ephemeral::EphemeralArray,\n messages::{\n discovery::{ComputeNoteHash, ComputeNoteNullifier, nonce_discovery::attempt_note_nonce_discovery},\n encoding::MAX_MESSAGE_CONTENT_LEN,\n logs::partial_note::{decode_partial_note_private_message, MAX_PARTIAL_NOTE_PRIVATE_PACKED_LEN},\n processing::{\n enqueue_note_for_validation,\n get_pending_partial_notes_completion_logs,\n log_retrieval_response::{LogRetrievalResponse, MAX_LOG_CONTENT_LEN},\n },\n },\n utils::array,\n};\n\nuse crate::logging::{aztecnr_debug_log_format, aztecnr_warn_log_format};\nuse crate::protocol::{address::AztecAddress, hash::sha256_to_field, traits::{Deserialize, Serialize}};\n\n/// The slot in the PXE capsules where we store a `CapsuleArray` of `DeliveredPendingPartialNote`.\npub(crate) global DELIVERED_PENDING_PARTIAL_NOTE_ARRAY_LENGTH_CAPSULES_SLOT: Field = sha256_to_field(\n \"AZTEC_NR::DELIVERED_PENDING_PARTIAL_NOTE_ARRAY_LENGTH_CAPSULES_SLOT\".as_bytes(),\n);\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 tx_hash: Field,\n scope: AztecAddress,\n) {\n let decoded = decode_partial_note_private_message(msg_metadata, msg_content);\n\n if decoded.is_some() {\n // We store the information of the partial note we found in a persistent capsule in PXE, so that we can later\n // search for the public log that will complete it.\n let (owner, randomness, note_completion_log_tag, note_type_id, packed_private_note_content) = decoded.unwrap();\n\n let pending = DeliveredPendingPartialNote {\n owner,\n randomness,\n note_completion_log_tag,\n note_type_id,\n packed_private_note_content,\n };\n\n CapsuleArray::at(\n contract_address,\n DELIVERED_PENDING_PARTIAL_NOTE_ARRAY_LENGTH_CAPSULES_SLOT,\n scope,\n )\n .push(pending);\n } else {\n aztecnr_warn_log_format!(\n \"Could not decode partial note private message from tx {0}, ignoring\",\n )(\n [tx_hash],\n );\n }\n}\n\n/// Searches for logs that would result in the completion of pending partial notes, ultimately resulting in the notes\n/// being delivered to PXE if completed.\npub(crate) unconstrained fn fetch_and_process_partial_note_completion_logs(\n contract_address: AztecAddress,\n compute_note_hash: ComputeNoteHash,\n compute_note_nullifier: ComputeNoteNullifier,\n scope: AztecAddress,\n) {\n let pending_partial_notes = CapsuleArray::at(\n contract_address,\n DELIVERED_PENDING_PARTIAL_NOTE_ARRAY_LENGTH_CAPSULES_SLOT,\n scope,\n );\n\n aztecnr_debug_log_format!(\"{} pending partial notes\")([pending_partial_notes.len() as Field]);\n\n // Each of the pending partial notes might get completed by a log containing its public values. For performance\n // reasons, we fetch all of these logs concurrently and then process them one by one, minimizing the amount of time\n // waiting for the node roundtrip.\n let completion_logs = get_pending_partial_notes_completion_logs(contract_address, pending_partial_notes);\n\n // Each entry in the completion logs array corresponds to the entry in the pending partial notes array at the same\n // index. Each inner array contains all matching LogRetrievalResponses.\n assert_eq(completion_logs.len(), pending_partial_notes.len());\n\n completion_logs.for_each(|i, logs_for_tag: EphemeralArray<LogRetrievalResponse>| {\n let pending_partial_note = pending_partial_notes.get(i);\n let num_logs = logs_for_tag.len();\n\n if num_logs == 0 {\n aztecnr_debug_log_format!(\"Found no completion logs for partial note with tag {}\")(\n [pending_partial_note.note_completion_log_tag],\n );\n\n // Note that we're not removing the pending partial note from the capsule array, so we will continue\n // searching for this tagged log when performing message discovery in the future until we either find it or\n // the entry is somehow removed from the array.\n } else {\n assert(num_logs == 1, f\"Expected at most 1 completion log per partial note, got {num_logs}\");\n\n aztecnr_debug_log_format!(\"Completion log found for partial note with tag {}\")([\n pending_partial_note.note_completion_log_tag,\n ]);\n let log = logs_for_tag.get(0);\n\n // The first field in the completion log payload is the storage slot, followed by the public note\n // content fields.\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 assumed to all be placed at the end of the packed representation, so we combine\n // the private and public packed fields (i.e. the contents of the private message and public log\n // plaintext) to get the complete packed content.\n let complete_packed_note = array::append(\n pending_partial_note.packed_private_note_content,\n public_note_content,\n );\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 contract_address,\n pending_partial_note.owner,\n storage_slot,\n pending_partial_note.randomness,\n pending_partial_note.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\n // being 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_partial_note.note_completion_log_tag,\n ]);\n\n discovered_notes.for_each(|discovered_note| {\n enqueue_note_for_validation(\n contract_address,\n pending_partial_note.owner,\n storage_slot,\n pending_partial_note.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 // Because there is only a single log for a given tag, once we've processed the tagged log then we simply\n // delete the pending work entry, regardless of whether it was actually completed or not.\n pending_partial_notes.remove(i);\n }\n });\n}\n"
|
|
182
182
|
},
|
|
183
|
-
"
|
|
183
|
+
"131": {
|
|
184
184
|
"function_locations": [
|
|
185
185
|
{
|
|
186
186
|
"name": "process_private_event_msg",
|
|
187
187
|
"start": 547
|
|
188
188
|
}
|
|
189
189
|
],
|
|
190
|
-
"path": "/home/
|
|
190
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/messages/discovery/private_events.nr",
|
|
191
191
|
"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"
|
|
192
192
|
},
|
|
193
|
-
"
|
|
193
|
+
"132": {
|
|
194
194
|
"function_locations": [
|
|
195
195
|
{
|
|
196
196
|
"name": "process_private_note_msg",
|
|
@@ -201,10 +201,10 @@
|
|
|
201
201
|
"start": 3612
|
|
202
202
|
}
|
|
203
203
|
],
|
|
204
|
-
"path": "/home/
|
|
204
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/messages/discovery/private_notes.nr",
|
|
205
205
|
"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"
|
|
206
206
|
},
|
|
207
|
-
"
|
|
207
|
+
"133": {
|
|
208
208
|
"function_locations": [
|
|
209
209
|
{
|
|
210
210
|
"name": "process_message_ciphertext",
|
|
@@ -215,10 +215,10 @@
|
|
|
215
215
|
"start": 2868
|
|
216
216
|
}
|
|
217
217
|
],
|
|
218
|
-
"path": "/home/
|
|
218
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/messages/discovery/process_message.nr",
|
|
219
219
|
"source": "use crate::messages::{\n discovery::{\n ComputeNoteHash, ComputeNoteNullifier, CustomMessageHandler, partial_notes::process_partial_note_private_msg,\n private_events::process_private_event_msg, 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::MessageContext,\n};\n\nuse crate::logging::{aztecnr_debug_log, aztecnr_warn_log_format};\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 message_context: MessageContext,\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 message_context,\n recipient,\n );\n } else {\n aztecnr_warn_log_format!(\"Could not decrypt message ciphertext from tx {0}, ignoring\")([message_context.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 message_context: MessageContext,\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 message_context.tx_hash,\n message_context.unique_note_hashes_in_tx,\n message_context.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 message_context.tx_hash,\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 message_context.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 message_context,\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\")([message_context.tx_hash]);\n }\n}\n"
|
|
220
220
|
},
|
|
221
|
-
"
|
|
221
|
+
"134": {
|
|
222
222
|
"function_locations": [
|
|
223
223
|
{
|
|
224
224
|
"name": "encode_message",
|
|
@@ -277,10 +277,10 @@
|
|
|
277
277
|
"start": 13280
|
|
278
278
|
}
|
|
279
279
|
],
|
|
280
|
-
"path": "/home/
|
|
280
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/messages/encoding.nr",
|
|
281
281
|
"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"
|
|
282
282
|
},
|
|
283
|
-
"
|
|
283
|
+
"135": {
|
|
284
284
|
"function_locations": [
|
|
285
285
|
{
|
|
286
286
|
"name": "extract_many_close_to_uniformly_random_256_bits_using_poseidon2",
|
|
@@ -324,49 +324,49 @@
|
|
|
324
324
|
},
|
|
325
325
|
{
|
|
326
326
|
"name": "test::encrypt_decrypt_random",
|
|
327
|
-
"start":
|
|
327
|
+
"start": 27098
|
|
328
328
|
},
|
|
329
329
|
{
|
|
330
330
|
"name": "test::encrypt_to_invalid_address",
|
|
331
|
-
"start":
|
|
331
|
+
"start": 27944
|
|
332
332
|
},
|
|
333
333
|
{
|
|
334
334
|
"name": "test::pkcs7_padding_always_adds_at_least_one_byte",
|
|
335
|
-
"start":
|
|
335
|
+
"start": 28394
|
|
336
336
|
},
|
|
337
337
|
{
|
|
338
338
|
"name": "test::encrypt_decrypt_max_size_plaintext",
|
|
339
|
-
"start":
|
|
339
|
+
"start": 28958
|
|
340
340
|
},
|
|
341
341
|
{
|
|
342
342
|
"name": "test::encrypt_oversized_plaintext",
|
|
343
|
-
"start":
|
|
343
|
+
"start": 29857
|
|
344
344
|
},
|
|
345
345
|
{
|
|
346
346
|
"name": "test::random_address_point_produces_valid_points",
|
|
347
|
-
"start":
|
|
347
|
+
"start": 30215
|
|
348
348
|
},
|
|
349
349
|
{
|
|
350
350
|
"name": "test::decrypt_invalid_ephemeral_public_key",
|
|
351
|
-
"start":
|
|
351
|
+
"start": 30666
|
|
352
352
|
},
|
|
353
353
|
{
|
|
354
354
|
"name": "test::decrypt_returns_none_on_empty_ciphertext",
|
|
355
|
-
"start":
|
|
355
|
+
"start": 31511
|
|
356
356
|
},
|
|
357
357
|
{
|
|
358
358
|
"name": "test::decrypt_returns_none_on_empty_header",
|
|
359
|
-
"start":
|
|
359
|
+
"start": 32065
|
|
360
360
|
},
|
|
361
361
|
{
|
|
362
362
|
"name": "test::decrypt_returns_none_on_oversized_ciphertext_length",
|
|
363
|
-
"start":
|
|
363
|
+
"start": 32991
|
|
364
364
|
}
|
|
365
365
|
],
|
|
366
|
-
"path": "/home/
|
|
367
|
-
"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`.\n point_from_x_coord_and_sign(eph_pk_x, true).and_then(|eph_pk| {\n let s_app = get_shared_secret(recipient, eph_pk, contract_address);\n\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 necessary\n // here as the header ciphertext length is fixed. But we do it anyway to not have to have duplicate\n // 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_utl_getRandomField\").returns(eph_sk).times(1);\n\n let randomness = 0x0101010101010101010101010101010101010101010101010101010101010101;\n let _ = OracleMock::mock(\"aztec_utl_getRandomField\").returns(randomness).times(1000000);\n\n let _ = OracleMock::mock(\"aztec_prv_getNextAppTagAsSender\").returns(42);\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"
|
|
366
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/messages/encryption/aes128.nr",
|
|
367
|
+
"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`.\n point_from_x_coord_and_sign(eph_pk_x, true).and_then(|eph_pk| {\n let s_app = get_shared_secret(recipient, eph_pk, contract_address);\n\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 necessary\n // here as the header ciphertext length is fixed. But we do it anyway to not have to have duplicate\n // 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"
|
|
368
368
|
},
|
|
369
|
-
"
|
|
369
|
+
"140": {
|
|
370
370
|
"function_locations": [
|
|
371
371
|
{
|
|
372
372
|
"name": "encode_private_event_message",
|
|
@@ -389,10 +389,10 @@
|
|
|
389
389
|
"start": 6064
|
|
390
390
|
}
|
|
391
391
|
],
|
|
392
|
-
"path": "/home/
|
|
392
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/messages/logs/event.nr",
|
|
393
393
|
"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` has too few fields. This plaintext is meant to have originated\n/// 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,\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::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 #[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_with_only_reserved_fields_returns_none() {\n let content = BoundedVec::from_array([0]);\n assert(decode_private_event_message(0, content).is_none());\n }\n}\n"
|
|
394
394
|
},
|
|
395
|
-
"
|
|
395
|
+
"142": {
|
|
396
396
|
"function_locations": [
|
|
397
397
|
{
|
|
398
398
|
"name": "encode_private_note_message_with_msg_type_id",
|
|
@@ -435,10 +435,10 @@
|
|
|
435
435
|
"start": 8407
|
|
436
436
|
}
|
|
437
437
|
],
|
|
438
|
-
"path": "/home/
|
|
438
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/messages/logs/note.nr",
|
|
439
439
|
"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` has too few fields. This plaintext is meant to have originated\n/// 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}};\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 #[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_only_reserved_fields_returns_none() {\n let content = BoundedVec::from_array([0, 0, 0]);\n assert(decode_private_note_message(0, content).is_none());\n }\n}\n"
|
|
440
440
|
},
|
|
441
|
-
"
|
|
441
|
+
"143": {
|
|
442
442
|
"function_locations": [
|
|
443
443
|
{
|
|
444
444
|
"name": "encode_partial_note_private_message",
|
|
@@ -461,7 +461,7 @@
|
|
|
461
461
|
"start": 7197
|
|
462
462
|
}
|
|
463
463
|
],
|
|
464
|
-
"path": "/home/
|
|
464
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/messages/logs/partial_note.nr",
|
|
465
465
|
"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"
|
|
466
466
|
},
|
|
467
467
|
"15": {
|
|
@@ -534,29 +534,29 @@
|
|
|
534
534
|
"path": "std/field/bn254.nr",
|
|
535
535
|
"source": "use crate::field::field_less_than;\nuse crate::runtime::is_unconstrained;\n\n// The low and high decomposition of the field modulus\npub(crate) global PLO: Field = 53438638232309528389504892708671455233;\npub(crate) global PHI: Field = 64323764613183177041862057485226039389;\n\npub(crate) global TWO_POW_128: Field = 0x100000000000000000000000000000000;\n\n// Decomposes a single field into two 16 byte fields.\nfn compute_decomposition(x: Field) -> (Field, Field) {\n // Here's we're taking advantage of truncating 128 bit limbs from the input field\n // and then subtracting them from the input such the field division is equivalent to integer division.\n let low = (x as u128) as Field;\n let high = (x - low) / TWO_POW_128;\n\n (low, high)\n}\n\npub(crate) unconstrained fn decompose_hint(x: Field) -> (Field, Field) {\n compute_decomposition(x)\n}\n\nunconstrained fn lte_hint(x: Field, y: Field) -> bool {\n if x == y {\n true\n } else {\n field_less_than(x, y)\n }\n}\n\n// Assert that (alo > blo && ahi >= bhi) || (alo <= blo && ahi > bhi)\nfn assert_gt_limbs(a: (Field, Field), b: (Field, Field)) {\n let (alo, ahi) = a;\n let (blo, bhi) = b;\n // Safety: borrow is enforced to be boolean due to its type.\n // if borrow is 0, it asserts that (alo > blo && ahi >= bhi)\n // if borrow is 1, it asserts that (alo <= blo && ahi > bhi)\n unsafe {\n let borrow = lte_hint(alo, blo);\n\n let rlo = alo - blo - 1 + (borrow as Field) * TWO_POW_128;\n let rhi = ahi - bhi - (borrow as Field);\n\n rlo.assert_max_bit_size::<128>();\n rhi.assert_max_bit_size::<128>();\n }\n}\n\n/// Decompose a single field into two 16 byte fields.\npub fn decompose(x: Field) -> (Field, Field) {\n if is_unconstrained() {\n compute_decomposition(x)\n } else {\n // Safety: decomposition is properly checked below\n unsafe {\n // Take hints of the decomposition\n let (xlo, xhi) = decompose_hint(x);\n\n // Range check the limbs\n xlo.assert_max_bit_size::<128>();\n xhi.assert_max_bit_size::<128>();\n\n // Check that the decomposition is correct\n assert_eq(x, xlo + TWO_POW_128 * xhi);\n\n // Assert that the decomposition of P is greater than the decomposition of x\n assert_gt_limbs((PLO, PHI), (xlo, xhi));\n (xlo, xhi)\n }\n }\n}\n\npub fn assert_gt(a: Field, b: Field) {\n if is_unconstrained() {\n assert(\n // Safety: already unconstrained\n unsafe { field_less_than(b, a) },\n );\n } else {\n // Decompose a and b\n let a_limbs = decompose(a);\n let b_limbs = decompose(b);\n\n // Assert that a_limbs is greater than b_limbs\n assert_gt_limbs(a_limbs, b_limbs)\n }\n}\n\npub fn assert_lt(a: Field, b: Field) {\n assert_gt(b, a);\n}\n\npub fn gt(a: Field, b: Field) -> bool {\n if is_unconstrained() {\n // Safety: unsafe in unconstrained\n unsafe {\n field_less_than(b, a)\n }\n } else if a == b {\n false\n } else {\n // Safety: Take a hint of the comparison and verify it\n unsafe {\n if field_less_than(a, b) {\n assert_gt(b, a);\n false\n } else {\n assert_gt(a, b);\n true\n }\n }\n }\n}\n\npub fn lt(a: Field, b: Field) -> bool {\n gt(b, a)\n}\n\nmod tests {\n // TODO: Allow imports from \"super\"\n use crate::field::bn254::{assert_gt, decompose, gt, lt, lte_hint, PHI, PLO, TWO_POW_128};\n\n #[test]\n fn check_decompose() {\n assert_eq(decompose(TWO_POW_128), (0, 1));\n assert_eq(decompose(TWO_POW_128 + 0x1234567890), (0x1234567890, 1));\n assert_eq(decompose(0x1234567890), (0x1234567890, 0));\n }\n\n #[test]\n unconstrained fn check_lte_hint() {\n assert(lte_hint(0, 1));\n assert(lte_hint(0, 0x100));\n assert(lte_hint(0x100, TWO_POW_128 - 1));\n assert(!lte_hint(0 - 1, 0));\n\n assert(lte_hint(0, 0));\n assert(lte_hint(0x100, 0x100));\n assert(lte_hint(0 - 1, 0 - 1));\n }\n\n #[test]\n fn check_gt() {\n assert(gt(1, 0));\n assert(gt(0x100, 0));\n assert(gt((0 - 1), (0 - 2)));\n assert(gt(TWO_POW_128, 0));\n assert(!gt(0, 0));\n assert(!gt(0, 0x100));\n assert(gt(0 - 1, 0 - 2));\n assert(!gt(0 - 2, 0 - 1));\n assert_gt(0 - 1, 0);\n }\n\n #[test]\n fn check_plo_phi() {\n assert_eq(PLO + PHI * TWO_POW_128, 0);\n let p_bytes = crate::field::modulus_le_bytes();\n let mut p_low: Field = 0;\n let mut p_high: Field = 0;\n\n let mut offset = 1;\n for i in 0..16 {\n p_low += (p_bytes[i] as Field) * offset;\n p_high += (p_bytes[i + 16] as Field) * offset;\n offset *= 256;\n }\n assert_eq(p_low, PLO);\n assert_eq(p_high, PHI);\n }\n\n #[test]\n fn check_decompose_edge_cases() {\n assert_eq(decompose(0), (0, 0));\n assert_eq(decompose(TWO_POW_128 - 1), (TWO_POW_128 - 1, 0));\n assert_eq(decompose(TWO_POW_128 + 1), (1, 1));\n assert_eq(decompose(TWO_POW_128 * 2), (0, 2));\n assert_eq(decompose(TWO_POW_128 * 2 + 0x1234567890), (0x1234567890, 2));\n }\n\n #[test]\n fn check_decompose_large_values() {\n let large_field = 0xffffffffffffffff;\n let (lo, hi) = decompose(large_field);\n assert_eq(large_field, lo + TWO_POW_128 * hi);\n\n let large_value = large_field - TWO_POW_128;\n let (lo2, hi2) = decompose(large_value);\n assert_eq(large_value, lo2 + TWO_POW_128 * hi2);\n }\n\n #[test]\n fn check_lt_comprehensive() {\n assert(lt(0, 1));\n assert(!lt(1, 0));\n assert(!lt(0, 0));\n assert(!lt(42, 42));\n\n assert(lt(TWO_POW_128 - 1, TWO_POW_128));\n assert(!lt(TWO_POW_128, TWO_POW_128 - 1));\n }\n}\n"
|
|
536
536
|
},
|
|
537
|
-
"
|
|
537
|
+
"153": {
|
|
538
538
|
"function_locations": [
|
|
539
539
|
{
|
|
540
540
|
"name": "enqueue_note_for_validation",
|
|
541
|
-
"start":
|
|
541
|
+
"start": 3744
|
|
542
542
|
},
|
|
543
543
|
{
|
|
544
544
|
"name": "enqueue_event_for_validation",
|
|
545
|
-
"start":
|
|
545
|
+
"start": 5107
|
|
546
546
|
},
|
|
547
547
|
{
|
|
548
548
|
"name": "validate_and_store_enqueued_notes_and_events",
|
|
549
|
-
"start":
|
|
549
|
+
"start": 5775
|
|
550
550
|
},
|
|
551
551
|
{
|
|
552
552
|
"name": "get_pending_partial_notes_completion_logs",
|
|
553
|
-
"start":
|
|
553
|
+
"start": 7073
|
|
554
554
|
}
|
|
555
555
|
],
|
|
556
|
-
"path": "/home/
|
|
557
|
-
"source": "pub(crate) mod event_validation_request;\npub mod offchain;\n\nmod message_context;\npub use message_context::MessageContext;\n\nmod note_validation_request;\npub use note_validation_request::NoteValidationRequest;\n\npub
|
|
556
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/messages/processing/mod.nr",
|
|
557
|
+
"source": "pub(crate) mod event_validation_request;\npub mod offchain;\n\nmod message_context;\npub use message_context::MessageContext;\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 capsules::CapsuleArray,\n ephemeral::EphemeralArray,\n event::EventSelector,\n messages::{\n discovery::partial_notes::DeliveredPendingPartialNote,\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};\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 OffchainMessageWithContext {\n pub message_ciphertext: BoundedVec<Field, MESSAGE_CIPHERTEXT_LEN>,\n pub message_context: MessageContext,\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 stored in\n/// a `CapsuleArray` 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: CapsuleArray<DeliveredPendingPartialNote>,\n) -> EphemeralArray<EphemeralArray<LogRetrievalResponse>> {\n let log_retrieval_requests = EphemeralArray::at(LOG_RETRIEVAL_REQUESTS_ARRAY_BASE_SLOT);\n\n // We create a LogRetrievalRequest for each PendingPartialNote in the EphemeralArray. Because we need the indices\n // in the request array to match the indices in the partial note array, we can't use EphemeralArray::for_each, as\n // that function has arbitrary iteration order. Instead, we manually iterate the array from the beginning and push\n // into the requests array, which we expect to be empty.\n let mut i = 0;\n let pending_partial_notes_count = pending_partial_notes.len();\n while i < pending_partial_notes_count {\n let pending_partial_note = pending_partial_notes.get(i);\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 i += 1;\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"
|
|
558
558
|
},
|
|
559
|
-
"
|
|
559
|
+
"155": {
|
|
560
560
|
"function_locations": [
|
|
561
561
|
{
|
|
562
562
|
"name": "receive",
|
|
@@ -568,47 +568,47 @@
|
|
|
568
568
|
},
|
|
569
569
|
{
|
|
570
570
|
"name": "test::setup",
|
|
571
|
-
"start":
|
|
571
|
+
"start": 11124
|
|
572
572
|
},
|
|
573
573
|
{
|
|
574
574
|
"name": "test::make_msg",
|
|
575
|
-
"start":
|
|
575
|
+
"start": 11454
|
|
576
576
|
},
|
|
577
577
|
{
|
|
578
578
|
"name": "test::advance_by",
|
|
579
|
-
"start":
|
|
579
|
+
"start": 11737
|
|
580
580
|
},
|
|
581
581
|
{
|
|
582
582
|
"name": "test::empty_inbox_returns_empty_result",
|
|
583
|
-
"start":
|
|
583
|
+
"start": 11928
|
|
584
584
|
},
|
|
585
585
|
{
|
|
586
586
|
"name": "test::tx_bound_msg_expires_after_max_msg_ttl",
|
|
587
|
-
"start":
|
|
587
|
+
"start": 12391
|
|
588
588
|
},
|
|
589
589
|
{
|
|
590
590
|
"name": "test::tx_bound_msg_not_expired_before_max_msg_ttl",
|
|
591
|
-
"start":
|
|
591
|
+
"start": 13356
|
|
592
592
|
},
|
|
593
593
|
{
|
|
594
594
|
"name": "test::tx_less_msg_expires_after_max_msg_ttl",
|
|
595
|
-
"start":
|
|
595
|
+
"start": 14314
|
|
596
596
|
},
|
|
597
597
|
{
|
|
598
598
|
"name": "test::unresolved_tx_stays_in_inbox",
|
|
599
|
-
"start":
|
|
599
|
+
"start": 15256
|
|
600
600
|
},
|
|
601
601
|
{
|
|
602
602
|
"name": "test::multiple_messages_mixed_expiration",
|
|
603
|
-
"start":
|
|
603
|
+
"start": 16150
|
|
604
604
|
},
|
|
605
605
|
{
|
|
606
606
|
"name": "test::resolved_msg_is_ready_to_process",
|
|
607
|
-
"start":
|
|
607
|
+
"start": 17889
|
|
608
608
|
}
|
|
609
609
|
],
|
|
610
|
-
"path": "/home/
|
|
611
|
-
"source": "use crate::{\n capsules::CapsuleArray,\n context::UtilityContext,\n ephemeral::EphemeralArray,\n messages::{encoding::MESSAGE_CIPHERTEXT_LEN, processing::OffchainMessageWithContext},\n oracle::contract_sync::set_contract_sync_cache_invalid,\n protocol::{\n address::AztecAddress,\n constants::MAX_TX_LIFETIME,\n hash::sha256_to_field,\n traits::{Deserialize, Serialize},\n },\n};\n\n/// Base capsule slot for the persistent inbox of [`PendingOffchainMsg`] entries.\n///\n/// This is the slot where we accumulate messages received through [`receive`].\nglobal OFFCHAIN_INBOX_SLOT: Field = sha256_to_field(\"AZTEC_NR::OFFCHAIN_INBOX_SLOT\".as_bytes());\n\n/// Ephemeral array slot used by [`sync_inbox`] to pass tx hash resolution requests to PXE.\nglobal OFFCHAIN_CONTEXT_REQUESTS_SLOT: Field = sha256_to_field(\"AZTEC_NR::OFFCHAIN_CONTEXT_REQUESTS_SLOT\".as_bytes());\n\n/// Ephemeral array slot used by [`sync_inbox`] to collect messages ready for processing.\nglobal OFFCHAIN_READY_MESSAGES_SLOT: Field = sha256_to_field(\"AZTEC_NR::OFFCHAIN_READY_MESSAGES_SLOT\".as_bytes());\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/// Tolerance added to the `MAX_TX_LIFETIME` cap for message expiration.\nglobal TX_EXPIRATION_TOLERANCE: u64 = 7200; // 2 hours\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.\nglobal MAX_MSG_TTL: u64 = MAX_TX_LIFETIME + TX_EXPIRATION_TOLERANCE;\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 expiration\n/// based eviction and automatic transaction context resolution.\npub type OffchainInboxSync = unconstrained fn(\n/* contract_address */AztecAddress, /* scope */ AztecAddress) -> EphemeralArray<OffchainMessageWithContext>;\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\n/// An offchain message awaiting processing (or re-processing) in the inbox.\n///\n/// Messages remain in the inbox until they expire, even if they have already been processed. This is necessary to\n/// handle reorgs: a processed message may need to be re-processed if the transaction that provided its context is\n/// reverted. On each sync, resolved messages are promoted to [`OffchainMessageWithContext`] for processing.\n#[derive(Serialize, Deserialize)]\nstruct PendingOffchainMsg {\n /// The encrypted message payload.\n ciphertext: BoundedVec<Field, MESSAGE_CIPHERTEXT_LEN>,\n /// The intended recipient of the message.\n recipient: AztecAddress,\n /// The hash of the transaction that produced this message. A value of 0 indicates a tx-less message.\n tx_hash: Field,\n /// Anchor block timestamp at message emission. Used to compute the effective expiration: messages are evicted\n /// after `anchor_block_timestamp + MAX_MSG_TTL`.\n anchor_block_timestamp: u64,\n}\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/// Each message is routed to the inbox scoped to its `recipient` field, so messages for different accounts are\n/// automatically isolated.\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 kept in the inbox until they expire. The effective expiration is\n/// `anchor_block_timestamp + MAX_MSG_TTL`.\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 // May contain duplicates if multiple messages target the same recipient. This is harmless since\n // cache invalidation on the TS side is idempotent (deleting an already-deleted key is a no-op).\n let mut scopes: BoundedVec<AztecAddress, MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL> = BoundedVec::new();\n let mut i = 0;\n let messages_len = messages.len();\n while i < messages_len {\n let msg = messages.get(i);\n let tx_hash = if msg.tx_hash.is_some() {\n msg.tx_hash.unwrap()\n } else {\n 0\n };\n let inbox: CapsuleArray<PendingOffchainMsg> =\n CapsuleArray::at(contract_address, OFFCHAIN_INBOX_SLOT, msg.recipient);\n inbox.push(\n PendingOffchainMsg {\n ciphertext: msg.ciphertext,\n recipient: msg.recipient,\n tx_hash,\n anchor_block_timestamp: msg.anchor_block_timestamp,\n },\n );\n scopes.push(msg.recipient);\n i += 1;\n }\n\n set_contract_sync_cache_invalid(contract_address, scopes);\n}\n\n/// Returns offchain-delivered messages to process during sync.\n///\n/// Messages remain in the inbox and are reprocessed on each sync until their originating transaction is no longer at\n/// risk of being dropped by a reorg.\npub unconstrained fn sync_inbox(\n contract_address: AztecAddress,\n scope: AztecAddress,\n) -> EphemeralArray<OffchainMessageWithContext> {\n let inbox: CapsuleArray<PendingOffchainMsg> = CapsuleArray::at(contract_address, OFFCHAIN_INBOX_SLOT, scope);\n let context_resolution_requests: EphemeralArray<Field> = EphemeralArray::at(OFFCHAIN_CONTEXT_REQUESTS_SLOT).clear();\n let ready_to_process: EphemeralArray<OffchainMessageWithContext> =\n EphemeralArray::at(OFFCHAIN_READY_MESSAGES_SLOT).clear();\n\n // Build a request list aligned with the inbox indices.\n let mut i = 0;\n let inbox_len = inbox.len();\n while i < inbox_len {\n let msg = inbox.get(i);\n context_resolution_requests.push(msg.tx_hash);\n i += 1;\n }\n\n // Ask PXE to resolve contexts for all requested tx hashes. The oracle returns responses in a new\n // ephemeral array.\n let resolved_contexts =\n crate::oracle::message_processing::get_message_contexts_by_tx_hash(context_resolution_requests);\n\n assert_eq(resolved_contexts.len(), inbox_len);\n\n let now = UtilityContext::new().timestamp();\n\n let mut j = inbox_len;\n while j > 0 {\n // This loop decides what to do with each message in the offchain message inbox. We need to handle 3\n // different scenarios for each message.\n //\n // 1. The TX that emitted this message is still not known to PXE: in this case we can't yet process this\n // message, as any notes or events discovered will fail to be validated. So we leave the message in the inbox,\n // awaiting for future syncs to detect that the TX became available.\n //\n // 2. The message is not associated to a TX to begin with. The current version of offchain message processing\n // does not support this case, but in the future it will. Right now, a message without an associated TX will\n // sit in the inbox until it expires.\n //\n // 3. The TX that emitted this message has been found by PXE. That gives us all the information needed to\n // process the message. We add the message to the `ready_to_process` EphemeralArray so that the `sync_state`\n // loop\n // processes it.\n //\n // In all cases, if the message has expired (i.e. `now > anchor_block_timestamp + MAX_MSG_TTL`), we remove it\n // from the inbox.\n //\n // Note: the loop runs backwards because it might call `inbox.remove(j)` to purge expired messages and we also\n // need to align it with `resolved_contexts.get(j)`. Going from last to first simplifies the algorithm as\n // not yet visited element indexes remain stable.\n j -= 1;\n let maybe_ctx = resolved_contexts.get(j);\n let msg = inbox.get(j);\n\n // Compute the message's effective expiration timestamp to determine if we can purge it from the inbox.\n let effective_expiration = msg.anchor_block_timestamp + MAX_MSG_TTL;\n\n // Message expired. We remove it from the inbox.\n if now > effective_expiration {\n inbox.remove(j);\n }\n\n // Scenario 1: associated TX not yet available. We keep the message in the inbox, as it might become\n // processable as new blocks get mined.\n // Scenario 2: no TX associated to message. The message will sit in the inbox until it expires.\n if maybe_ctx.is_none() {\n continue;\n }\n\n // Scenario 3: Message is ready to process, add to result array. Note we still keep it in the inbox unless we\n // consider it has expired: this is because we need to account for reorgs. If reorg occurs after we processed\n // a message, the effects of processing the message get rewind. However, the associated TX can be included in\n // a subsequent block. Should that happen, the message must be re-processed to ensure consistency.\n let message_context = maybe_ctx.unwrap();\n ready_to_process.push(OffchainMessageWithContext { message_ciphertext: msg.ciphertext, message_context });\n }\n\n ready_to_process\n}\n\nmod test {\n use crate::{\n capsules::CapsuleArray, oracle::random::random, protocol::address::AztecAddress,\n test::helpers::test_environment::TestEnvironment,\n };\n use super::{\n MAX_MSG_TTL, MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL, OFFCHAIN_INBOX_SLOT, OffchainMessage, PendingOffchainMsg,\n receive, sync_inbox,\n };\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 result = sync_inbox(context.this_address(), scope);\n let inbox: CapsuleArray<PendingOffchainMsg> =\n CapsuleArray::at(context.this_address(), OFFCHAIN_INBOX_SLOT, scope);\n\n assert_eq(result.len(), 0);\n assert_eq(inbox.len(), 0);\n });\n }\n\n #[test]\n unconstrained fn tx_bound_msg_expires_after_max_msg_ttl() {\n let (env, scope) = setup();\n let anchor_ts = advance_by(env, 10);\n\n env.utility_context(|context| {\n let mut msgs: BoundedVec<OffchainMessage, MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL> = BoundedVec::new();\n msgs.push(make_msg(scope, Option::some(random()), anchor_ts));\n receive(context.this_address(), msgs);\n });\n\n // Advance past anchor_ts + MAX_MSG_TTL.\n let _now = advance_by(env, MAX_MSG_TTL + 1);\n\n env.utility_context(|context| {\n let address = context.this_address();\n let result = sync_inbox(address, scope);\n let inbox: CapsuleArray<PendingOffchainMsg> = CapsuleArray::at(address, OFFCHAIN_INBOX_SLOT, scope);\n\n assert_eq(result.len(), 0); // context is None, not ready\n assert_eq(inbox.len(), 0); // expired, removed\n });\n }\n\n #[test]\n unconstrained fn tx_bound_msg_not_expired_before_max_msg_ttl() {\n let (env, scope) = setup();\n let anchor_ts = advance_by(env, 10);\n\n env.utility_context(|context| {\n let mut msgs: BoundedVec<OffchainMessage, MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL> = BoundedVec::new();\n msgs.push(make_msg(scope, Option::some(random()), anchor_ts));\n receive(context.this_address(), msgs);\n });\n\n // Advance, but not past anchor_ts + MAX_MSG_TTL.\n let _now = advance_by(env, 100);\n\n env.utility_context(|context| {\n let address = context.this_address();\n let result = sync_inbox(address, scope);\n let inbox: CapsuleArray<PendingOffchainMsg> = CapsuleArray::at(address, OFFCHAIN_INBOX_SLOT, scope);\n\n assert_eq(result.len(), 0); // context is None, not ready\n assert_eq(inbox.len(), 1); // not expired, stays\n });\n }\n\n #[test]\n unconstrained fn tx_less_msg_expires_after_max_msg_ttl() {\n let (env, scope) = setup();\n let anchor_ts = advance_by(env, 10);\n\n env.utility_context(|context| {\n let mut msgs: BoundedVec<OffchainMessage, MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL> = BoundedVec::new();\n msgs.push(make_msg(scope, Option::none(), anchor_ts));\n receive(context.this_address(), msgs);\n });\n\n // Advance past anchor_ts + MAX_MSG_TTL.\n let _now = advance_by(env, MAX_MSG_TTL + 1);\n\n env.utility_context(|context| {\n let address = context.this_address();\n let result = sync_inbox(address, scope);\n let inbox: CapsuleArray<PendingOffchainMsg> = CapsuleArray::at(address, OFFCHAIN_INBOX_SLOT, scope);\n\n assert_eq(result.len(), 0); // context is None, not ready\n assert_eq(inbox.len(), 0); // expired, removed\n });\n }\n\n #[test]\n unconstrained fn unresolved_tx_stays_in_inbox() {\n let (env, scope) = setup();\n let anchor_ts = advance_by(env, 10);\n\n env.utility_context(|context| {\n let mut msgs: BoundedVec<OffchainMessage, MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL> = BoundedVec::new();\n msgs.push(make_msg(scope, Option::some(random()), anchor_ts));\n receive(context.this_address(), msgs);\n });\n\n let _now = advance_by(env, 100);\n\n env.utility_context(|context| {\n let address = context.this_address();\n let result = sync_inbox(address, scope);\n let inbox: CapsuleArray<PendingOffchainMsg> = CapsuleArray::at(address, OFFCHAIN_INBOX_SLOT, scope);\n\n assert_eq(result.len(), 0); // not resolved, not ready\n assert_eq(inbox.len(), 1); // not expired, stays\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 survivor_tx_hash = random();\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_ts in the past so it expires at\n // anchor_ts + MAX_MSG_TTL. We set anchor to 0 so it expires quickly.\n msgs.push(make_msg(scope, Option::some(random()), 0));\n // Message 1: tx-bound, anchor_ts is recent so it survives.\n msgs.push(make_msg(scope, Option::some(survivor_tx_hash), anchor_ts));\n // Message 2: tx-less, anchor_ts=0 so it also expires.\n msgs.push(make_msg(scope, Option::none(), 0));\n receive(address, msgs);\n });\n\n // Advance past MAX_MSG_TTL for anchor_ts=0, but not for anchor_ts=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 let inbox: CapsuleArray<PendingOffchainMsg> = CapsuleArray::at(address, OFFCHAIN_INBOX_SLOT, scope);\n\n assert_eq(result.len(), 0); // all contexts are None\n // Message 0 expired (anchor=0), message 1 survived (anchor=anchor_ts),\n // Message 2 expired (anchor=0).\n assert_eq(inbox.len(), 1);\n assert_eq(inbox.get(0).tx_hash, survivor_tx_hash);\n });\n }\n\n // -- Resolved context (ready to process) ------------------------------\n\n #[test]\n unconstrained fn resolved_msg_is_ready_to_process() {\n let (env, scope) = setup();\n // TestEnvironment::new() deploys protocol contracts, creating blocks with tx effects.\n // In TXE, tx hashes equal Fr(blockNumber), so Fr(1) is the tx effect from block 1.\n // We use this as a \"known resolvable\" tx hash.\n let known_tx_hash: Field = 1;\n let anchor_ts = advance_by(env, 10);\n\n env.utility_context(|context| {\n let mut msgs: BoundedVec<OffchainMessage, MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL> = BoundedVec::new();\n msgs.push(make_msg(scope, Option::some(known_tx_hash), anchor_ts));\n receive(context.this_address(), msgs);\n });\n\n let _now = advance_by(env, 100);\n\n env.utility_context(|context| {\n let address = context.this_address();\n let result = sync_inbox(address, scope);\n let inbox: CapsuleArray<PendingOffchainMsg> = CapsuleArray::at(address, OFFCHAIN_INBOX_SLOT, scope);\n\n // The message should be ready to process since its tx context was resolved.\n assert_eq(result.len(), 1);\n\n let ctx = result.get(0).message_context;\n assert_eq(ctx.tx_hash, known_tx_hash);\n assert(ctx.first_nullifier_in_tx != 0, \"resolved context must have a first nullifier\");\n\n // Message stays in inbox (not expired) for potential reorg reprocessing.\n assert_eq(inbox.len(), 1);\n });\n }\n}\n"
|
|
610
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/messages/processing/offchain.nr",
|
|
611
|
+
"source": "use crate::{\n capsules::CapsuleArray,\n context::UtilityContext,\n ephemeral::EphemeralArray,\n messages::{encoding::MESSAGE_CIPHERTEXT_LEN, processing::OffchainMessageWithContext},\n oracle::contract_sync::set_contract_sync_cache_invalid,\n protocol::{\n address::AztecAddress,\n constants::MAX_TX_LIFETIME,\n hash::sha256_to_field,\n traits::{Deserialize, Serialize},\n },\n};\n\n/// Base capsule slot for the persistent inbox of [`PendingOffchainMsg`] entries.\n///\n/// This is the slot where we accumulate messages received through [`receive`].\nglobal OFFCHAIN_INBOX_SLOT: Field = sha256_to_field(\"AZTEC_NR::OFFCHAIN_INBOX_SLOT\".as_bytes());\n\n/// Ephemeral array slot used by [`sync_inbox`] to pass tx hash resolution requests to PXE.\nglobal OFFCHAIN_CONTEXT_REQUESTS_SLOT: Field = sha256_to_field(\"AZTEC_NR::OFFCHAIN_CONTEXT_REQUESTS_SLOT\".as_bytes());\n\n/// Ephemeral array slot used by [`sync_inbox`] to collect messages ready for processing.\nglobal OFFCHAIN_READY_MESSAGES_SLOT: Field = sha256_to_field(\"AZTEC_NR::OFFCHAIN_READY_MESSAGES_SLOT\".as_bytes());\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/// Tolerance added to the `MAX_TX_LIFETIME` cap for message expiration.\nglobal TX_EXPIRATION_TOLERANCE: u64 = 7200; // 2 hours\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.\nglobal MAX_MSG_TTL: u64 = MAX_TX_LIFETIME + TX_EXPIRATION_TOLERANCE;\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 expiration\n/// based eviction and automatic transaction context resolution.\npub type OffchainInboxSync = unconstrained fn(\n/* contract_address */AztecAddress, /* scope */ AztecAddress) -> EphemeralArray<OffchainMessageWithContext>;\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\n/// An offchain message awaiting processing (or re-processing) in the inbox.\n///\n/// Messages remain in the inbox until they expire, even if they have already been processed. This is necessary to\n/// handle reorgs: a processed message may need to be re-processed if the transaction that provided its context is\n/// reverted. On each sync, resolved messages are promoted to [`OffchainMessageWithContext`] for processing.\n#[derive(Serialize, Deserialize)]\nstruct PendingOffchainMsg {\n /// The encrypted message payload.\n ciphertext: BoundedVec<Field, MESSAGE_CIPHERTEXT_LEN>,\n /// The intended recipient of the message.\n recipient: AztecAddress,\n /// The hash of the transaction that produced this message. A value of 0 indicates a tx-less message.\n tx_hash: Field,\n /// Anchor block timestamp at message emission. Used to compute the effective expiration: messages are evicted\n /// after `anchor_block_timestamp + MAX_MSG_TTL`.\n anchor_block_timestamp: u64,\n}\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/// Each message is routed to the inbox scoped to its `recipient` field, so messages for different accounts are\n/// automatically isolated.\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 kept in the inbox until they expire. The effective expiration is\n/// `anchor_block_timestamp + MAX_MSG_TTL`.\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 // May contain duplicates if multiple messages target the same recipient. This is harmless since\n // cache invalidation on the TS side is idempotent (deleting an already-deleted key is a no-op).\n let mut scopes: BoundedVec<AztecAddress, MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL> = BoundedVec::new();\n let mut i = 0;\n let messages_len = messages.len();\n while i < messages_len {\n let msg = messages.get(i);\n let tx_hash = if msg.tx_hash.is_some() {\n msg.tx_hash.unwrap()\n } else {\n 0\n };\n let inbox: CapsuleArray<PendingOffchainMsg> =\n CapsuleArray::at(contract_address, OFFCHAIN_INBOX_SLOT, msg.recipient);\n inbox.push(\n PendingOffchainMsg {\n ciphertext: msg.ciphertext,\n recipient: msg.recipient,\n tx_hash,\n anchor_block_timestamp: msg.anchor_block_timestamp,\n },\n );\n scopes.push(msg.recipient);\n i += 1;\n }\n\n set_contract_sync_cache_invalid(contract_address, scopes);\n}\n\n/// Returns offchain-delivered messages to process during sync.\n///\n/// Messages remain in the inbox and are reprocessed on each sync until their originating transaction is no longer at\n/// risk of being dropped by a reorg.\npub unconstrained fn sync_inbox(\n contract_address: AztecAddress,\n scope: AztecAddress,\n) -> EphemeralArray<OffchainMessageWithContext> {\n let inbox: CapsuleArray<PendingOffchainMsg> = CapsuleArray::at(contract_address, OFFCHAIN_INBOX_SLOT, scope);\n let context_resolution_requests: EphemeralArray<Field> = EphemeralArray::empty_at(OFFCHAIN_CONTEXT_REQUESTS_SLOT);\n let ready_to_process: EphemeralArray<OffchainMessageWithContext> =\n EphemeralArray::empty_at(OFFCHAIN_READY_MESSAGES_SLOT);\n\n // Build a request list aligned with the inbox indices.\n let mut i = 0;\n let inbox_len = inbox.len();\n while i < inbox_len {\n let msg = inbox.get(i);\n context_resolution_requests.push(msg.tx_hash);\n i += 1;\n }\n\n // Ask PXE to resolve contexts for all requested tx hashes. The oracle returns responses in a new\n // ephemeral array.\n let resolved_contexts =\n crate::oracle::message_processing::get_message_contexts_by_tx_hash(context_resolution_requests);\n\n assert_eq(resolved_contexts.len(), inbox_len);\n\n let now = UtilityContext::new().timestamp();\n\n let mut j = inbox_len;\n while j > 0 {\n // This loop decides what to do with each message in the offchain message inbox. We need to handle 3\n // different scenarios for each message.\n //\n // 1. The TX that emitted this message is still not known to PXE: in this case we can't yet process this\n // message, as any notes or events discovered will fail to be validated. So we leave the message in the inbox,\n // awaiting for future syncs to detect that the TX became available.\n //\n // 2. The message is not associated to a TX to begin with. The current version of offchain message processing\n // does not support this case, but in the future it will. Right now, a message without an associated TX will\n // sit in the inbox until it expires.\n //\n // 3. The TX that emitted this message has been found by PXE. That gives us all the information needed to\n // process the message. We add the message to the `ready_to_process` EphemeralArray so that the `sync_state`\n // loop\n // processes it.\n //\n // In all cases, if the message has expired (i.e. `now > anchor_block_timestamp + MAX_MSG_TTL`), we remove it\n // from the inbox.\n //\n // Note: the loop runs backwards because it might call `inbox.remove(j)` to purge expired messages and we also\n // need to align it with `resolved_contexts.get(j)`. Going from last to first simplifies the algorithm as\n // not yet visited element indexes remain stable.\n j -= 1;\n let maybe_ctx = resolved_contexts.get(j);\n let msg = inbox.get(j);\n\n // Compute the message's effective expiration timestamp to determine if we can purge it from the inbox.\n let effective_expiration = msg.anchor_block_timestamp + MAX_MSG_TTL;\n\n // Message expired. We remove it from the inbox.\n if now > effective_expiration {\n inbox.remove(j);\n }\n\n // Scenario 1: associated TX not yet available. We keep the message in the inbox, as it might become\n // processable as new blocks get mined.\n // Scenario 2: no TX associated to message. The message will sit in the inbox until it expires.\n if maybe_ctx.is_none() {\n continue;\n }\n\n // Scenario 3: Message is ready to process, add to result array. Note we still keep it in the inbox unless we\n // consider it has expired: this is because we need to account for reorgs. If reorg occurs after we processed\n // a message, the effects of processing the message get rewind. However, the associated TX can be included in\n // a subsequent block. Should that happen, the message must be re-processed to ensure consistency.\n let message_context = maybe_ctx.unwrap();\n ready_to_process.push(OffchainMessageWithContext { message_ciphertext: msg.ciphertext, message_context });\n }\n\n ready_to_process\n}\n\nmod test {\n use crate::{\n capsules::CapsuleArray, oracle::random::random, protocol::address::AztecAddress,\n test::helpers::test_environment::TestEnvironment,\n };\n use super::{\n MAX_MSG_TTL, MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL, OFFCHAIN_INBOX_SLOT, OffchainMessage, PendingOffchainMsg,\n receive, sync_inbox,\n };\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 result = sync_inbox(context.this_address(), scope);\n let inbox: CapsuleArray<PendingOffchainMsg> =\n CapsuleArray::at(context.this_address(), OFFCHAIN_INBOX_SLOT, scope);\n\n assert_eq(result.len(), 0);\n assert_eq(inbox.len(), 0);\n });\n }\n\n #[test]\n unconstrained fn tx_bound_msg_expires_after_max_msg_ttl() {\n let (env, scope) = setup();\n let anchor_ts = advance_by(env, 10);\n\n env.utility_context(|context| {\n let mut msgs: BoundedVec<OffchainMessage, MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL> = BoundedVec::new();\n msgs.push(make_msg(scope, Option::some(random()), anchor_ts));\n receive(context.this_address(), msgs);\n });\n\n // Advance past anchor_ts + MAX_MSG_TTL.\n let _now = advance_by(env, MAX_MSG_TTL + 1);\n\n env.utility_context(|context| {\n let address = context.this_address();\n let result = sync_inbox(address, scope);\n let inbox: CapsuleArray<PendingOffchainMsg> = CapsuleArray::at(address, OFFCHAIN_INBOX_SLOT, scope);\n\n assert_eq(result.len(), 0); // context is None, not ready\n assert_eq(inbox.len(), 0); // expired, removed\n });\n }\n\n #[test]\n unconstrained fn tx_bound_msg_not_expired_before_max_msg_ttl() {\n let (env, scope) = setup();\n let anchor_ts = advance_by(env, 10);\n\n env.utility_context(|context| {\n let mut msgs: BoundedVec<OffchainMessage, MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL> = BoundedVec::new();\n msgs.push(make_msg(scope, Option::some(random()), anchor_ts));\n receive(context.this_address(), msgs);\n });\n\n // Advance, but not past anchor_ts + MAX_MSG_TTL.\n let _now = advance_by(env, 100);\n\n env.utility_context(|context| {\n let address = context.this_address();\n let result = sync_inbox(address, scope);\n let inbox: CapsuleArray<PendingOffchainMsg> = CapsuleArray::at(address, OFFCHAIN_INBOX_SLOT, scope);\n\n assert_eq(result.len(), 0); // context is None, not ready\n assert_eq(inbox.len(), 1); // not expired, stays\n });\n }\n\n #[test]\n unconstrained fn tx_less_msg_expires_after_max_msg_ttl() {\n let (env, scope) = setup();\n let anchor_ts = advance_by(env, 10);\n\n env.utility_context(|context| {\n let mut msgs: BoundedVec<OffchainMessage, MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL> = BoundedVec::new();\n msgs.push(make_msg(scope, Option::none(), anchor_ts));\n receive(context.this_address(), msgs);\n });\n\n // Advance past anchor_ts + MAX_MSG_TTL.\n let _now = advance_by(env, MAX_MSG_TTL + 1);\n\n env.utility_context(|context| {\n let address = context.this_address();\n let result = sync_inbox(address, scope);\n let inbox: CapsuleArray<PendingOffchainMsg> = CapsuleArray::at(address, OFFCHAIN_INBOX_SLOT, scope);\n\n assert_eq(result.len(), 0); // context is None, not ready\n assert_eq(inbox.len(), 0); // expired, removed\n });\n }\n\n #[test]\n unconstrained fn unresolved_tx_stays_in_inbox() {\n let (env, scope) = setup();\n let anchor_ts = advance_by(env, 10);\n\n env.utility_context(|context| {\n let mut msgs: BoundedVec<OffchainMessage, MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL> = BoundedVec::new();\n msgs.push(make_msg(scope, Option::some(random()), anchor_ts));\n receive(context.this_address(), msgs);\n });\n\n let _now = advance_by(env, 100);\n\n env.utility_context(|context| {\n let address = context.this_address();\n let result = sync_inbox(address, scope);\n let inbox: CapsuleArray<PendingOffchainMsg> = CapsuleArray::at(address, OFFCHAIN_INBOX_SLOT, scope);\n\n assert_eq(result.len(), 0); // not resolved, not ready\n assert_eq(inbox.len(), 1); // not expired, stays\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 survivor_tx_hash = random();\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_ts in the past so it expires at\n // anchor_ts + MAX_MSG_TTL. We set anchor to 0 so it expires quickly.\n msgs.push(make_msg(scope, Option::some(random()), 0));\n // Message 1: tx-bound, anchor_ts is recent so it survives.\n msgs.push(make_msg(scope, Option::some(survivor_tx_hash), anchor_ts));\n // Message 2: tx-less, anchor_ts=0 so it also expires.\n msgs.push(make_msg(scope, Option::none(), 0));\n receive(address, msgs);\n });\n\n // Advance past MAX_MSG_TTL for anchor_ts=0, but not for anchor_ts=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 let inbox: CapsuleArray<PendingOffchainMsg> = CapsuleArray::at(address, OFFCHAIN_INBOX_SLOT, scope);\n\n assert_eq(result.len(), 0); // all contexts are None\n // Message 0 expired (anchor=0), message 1 survived (anchor=anchor_ts),\n // Message 2 expired (anchor=0).\n assert_eq(inbox.len(), 1);\n assert_eq(inbox.get(0).tx_hash, survivor_tx_hash);\n });\n }\n\n // -- Resolved context (ready to process) ------------------------------\n\n #[test]\n unconstrained fn resolved_msg_is_ready_to_process() {\n let (env, scope) = setup();\n // TestEnvironment::new() deploys protocol contracts, creating blocks with tx effects.\n // In TXE, tx hashes equal Fr(blockNumber), so Fr(1) is the tx effect from block 1.\n // We use this as a \"known resolvable\" tx hash.\n let known_tx_hash: Field = 1;\n let anchor_ts = advance_by(env, 10);\n\n env.utility_context(|context| {\n let mut msgs: BoundedVec<OffchainMessage, MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL> = BoundedVec::new();\n msgs.push(make_msg(scope, Option::some(known_tx_hash), anchor_ts));\n receive(context.this_address(), msgs);\n });\n\n let _now = advance_by(env, 100);\n\n env.utility_context(|context| {\n let address = context.this_address();\n let result = sync_inbox(address, scope);\n let inbox: CapsuleArray<PendingOffchainMsg> = CapsuleArray::at(address, OFFCHAIN_INBOX_SLOT, scope);\n\n // The message should be ready to process since its tx context was resolved.\n assert_eq(result.len(), 1);\n\n let ctx = result.get(0).message_context;\n assert_eq(ctx.tx_hash, known_tx_hash);\n assert(ctx.first_nullifier_in_tx != 0, \"resolved context must have a first nullifier\");\n\n // Message stays in inbox (not expired) for potential reorg reprocessing.\n assert_eq(inbox.len(), 1);\n });\n }\n}\n"
|
|
612
612
|
},
|
|
613
613
|
"16": {
|
|
614
614
|
"function_locations": [
|
|
@@ -986,7 +986,7 @@
|
|
|
986
986
|
"path": "std/hash/mod.nr",
|
|
987
987
|
"source": "// Exposed only for usage in `std::meta`\npub(crate) mod poseidon2;\n\nuse crate::default::Default;\nuse crate::embedded_curve_ops::{\n EmbeddedCurvePoint, EmbeddedCurveScalar, multi_scalar_mul, multi_scalar_mul_array_return,\n};\nuse crate::meta::derive_via;\nuse crate::static_assert;\n\n/// The size of the state accepted by the backend in `poseidon2_permutation`.\nglobal POSEIDON2_CONFIG_STATE_SIZE: u32 = poseidon2_config_state_size();\n\n#[foreign(sha256_compression)]\n// docs:start:sha256_compression\npub fn sha256_compression(input: [u32; 16], state: [u32; 8]) -> [u32; 8] {}\n// docs:end:sha256_compression\n\n#[foreign(keccakf1600)]\n// docs:start:keccakf1600\npub fn keccakf1600(input: [u64; 25]) -> [u64; 25] {}\n// docs:end:keccakf1600\n\npub mod keccak {\n #[deprecated(\"This function has been moved to std::hash::keccakf1600\")]\n pub fn keccakf1600(input: [u64; 25]) -> [u64; 25] {\n super::keccakf1600(input)\n }\n}\n\n#[foreign(blake2s)]\n// docs:start:blake2s\npub fn blake2s<let N: u32>(input: [u8; N]) -> [u8; 32]\n// docs:end:blake2s\n{}\n\n// docs:start:blake3\npub fn blake3<let N: u32>(input: [u8; N]) -> [u8; 32]\n// docs:end:blake3\n{\n if crate::runtime::is_unconstrained() {\n // Temporary measure while Barretenberg is main proving system.\n // Please open an issue if you're working on another proving system and running into problems due to this.\n crate::static_assert(\n N <= 1024,\n \"Barretenberg cannot prove blake3 hashes with inputs larger than 1024 bytes\",\n );\n }\n __blake3(input)\n}\n\n#[foreign(blake3)]\nfn __blake3<let N: u32>(input: [u8; N]) -> [u8; 32] {}\n\n// docs:start:pedersen_commitment\npub fn pedersen_commitment<let N: u32>(input: [Field; N]) -> EmbeddedCurvePoint {\n // docs:end:pedersen_commitment\n pedersen_commitment_with_separator(input, 0)\n}\n\n#[inline_always]\npub fn pedersen_commitment_with_separator<let N: u32>(\n input: [Field; N],\n separator: u32,\n) -> EmbeddedCurvePoint {\n let mut points = [EmbeddedCurveScalar { lo: 0, hi: 0 }; N];\n for i in 0..N {\n points[i] = EmbeddedCurveScalar::from_field(input[i]);\n }\n let generators = derive_generators(\"DEFAULT_DOMAIN_SEPARATOR\".as_bytes(), separator);\n multi_scalar_mul(generators, points)\n}\n\n// docs:start:pedersen_hash\npub fn pedersen_hash<let N: u32>(input: [Field; N]) -> Field\n// docs:end:pedersen_hash\n{\n pedersen_hash_with_separator(input, 0)\n}\n\n#[no_predicates]\npub fn pedersen_hash_with_separator<let N: u32>(input: [Field; N], separator: u32) -> Field {\n let mut scalars: [EmbeddedCurveScalar; N + 1] = [EmbeddedCurveScalar { lo: 0, hi: 0 }; N + 1];\n let mut generators: [EmbeddedCurvePoint; N + 1] =\n [EmbeddedCurvePoint::point_at_infinity(); N + 1];\n crate::assert_constant(separator);\n let domain_generators: [EmbeddedCurvePoint; N] =\n derive_generators(\"DEFAULT_DOMAIN_SEPARATOR\".as_bytes(), separator);\n\n for i in 0..N {\n scalars[i] = EmbeddedCurveScalar::from_field(input[i]);\n generators[i] = domain_generators[i];\n }\n scalars[N] = EmbeddedCurveScalar { lo: N as Field, hi: 0 as Field };\n\n let length_generator: [EmbeddedCurvePoint; 1] =\n derive_generators(\"pedersen_hash_length\".as_bytes(), 0);\n generators[N] = length_generator[0];\n multi_scalar_mul_array_return(generators, scalars, true)[0].x\n}\n\n#[field(bn254)]\n#[inline_always]\npub fn derive_generators<let N: u32, let M: u32>(\n domain_separator_bytes: [u8; M],\n starting_index: u32,\n) -> [EmbeddedCurvePoint; N] {\n crate::assert_constant(domain_separator_bytes);\n crate::assert_constant(starting_index);\n __derive_generators(domain_separator_bytes, starting_index)\n}\n\n#[builtin(derive_pedersen_generators)]\n#[field(bn254)]\nfn __derive_generators<let N: u32, let M: u32>(\n domain_separator_bytes: [u8; M],\n starting_index: u32,\n) -> [EmbeddedCurvePoint; N] {}\n\npub fn poseidon2_permutation<let N: u32>(input: [Field; N]) -> [Field; N] {\n static_assert(\n N == POSEIDON2_CONFIG_STATE_SIZE,\n f\"the input length must equal the state size in the Poseidon2 config; expected {POSEIDON2_CONFIG_STATE_SIZE}, got {N}\",\n );\n poseidon2_permutation_internal(input)\n}\n\n#[foreign(poseidon2_permutation)]\nfn poseidon2_permutation_internal<let N: u32>(input: [Field; N]) -> [Field; N] {}\n\n#[foreign(poseidon2_config_state_size)]\ncomptime fn poseidon2_config_state_size() -> u32 {}\n\n// Generic hashing support.\n// Partially ported and impacted by rust.\n\n// Hash trait shall be implemented per type.\n#[derive_via(derive_hash)]\npub trait Hash {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher;\n}\n\n// docs:start:derive_hash\ncomptime fn derive_hash(s: TypeDefinition) -> Quoted {\n let name = quote { $crate::hash::Hash };\n let signature = quote { fn hash<H>(_self: Self, _state: &mut H) where H: $crate::hash::Hasher };\n let for_each_field = |name| quote { _self.$name.hash(_state); };\n crate::meta::make_trait_impl(\n s,\n name,\n signature,\n for_each_field,\n quote {},\n |fields| fields,\n )\n}\n// docs:end:derive_hash\n\n// Hasher trait shall be implemented by algorithms to provide hash-agnostic means.\n// TODO: consider making the types generic here ([u8], [Field], etc.)\npub trait Hasher {\n fn finish(self) -> Field;\n\n /// Returns the hash value without consuming the hasher.\n /// Override this for more efficient implementations that avoid copying.\n /// TODO: deprecate finish() and replace it\n fn finish_ref(&self) -> Field {\n (*self).finish()\n }\n\n fn write(&mut self, input: Field);\n}\n\n// BuildHasher is a factory trait, responsible for production of specific Hasher.\npub trait BuildHasher {\n type H: Hasher;\n\n fn build_hasher(self) -> H;\n}\n\npub struct BuildHasherDefault<H>;\n\nimpl<H> BuildHasher for BuildHasherDefault<H>\nwhere\n H: Hasher + Default,\n{\n type H = H;\n\n fn build_hasher(_self: Self) -> H {\n H::default()\n }\n}\n\nimpl<H> Default for BuildHasherDefault<H>\nwhere\n H: Hasher + Default,\n{\n fn default() -> Self {\n BuildHasherDefault {}\n }\n}\n\nimpl Hash for Field {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self);\n }\n}\n\nimpl Hash for u8 {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as Field);\n }\n}\n\nimpl Hash for u16 {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as Field);\n }\n}\n\nimpl Hash for u32 {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as Field);\n }\n}\n\nimpl Hash for u64 {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as Field);\n }\n}\n\nimpl Hash for u128 {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as Field);\n }\n}\n\nimpl Hash for i8 {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as u8 as Field);\n }\n}\n\nimpl Hash for i16 {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as u16 as Field);\n }\n}\n\nimpl Hash for i32 {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as u32 as Field);\n }\n}\n\nimpl Hash for i64 {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as u64 as Field);\n }\n}\n\nimpl Hash for bool {\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n H::write(state, self as Field);\n }\n}\n\nimpl Hash for () {\n fn hash<H>(_self: Self, _state: &mut H)\n where\n H: Hasher,\n {}\n}\n\nimpl<T, let N: u32> Hash for [T; N]\nwhere\n T: Hash,\n{\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n for elem in self {\n elem.hash(state);\n }\n }\n}\n\nimpl<T> Hash for [T]\nwhere\n T: Hash,\n{\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n self.len().hash(state);\n for elem in self {\n elem.hash(state);\n }\n }\n}\n\nimpl<A, B> Hash for (A, B)\nwhere\n A: Hash,\n B: Hash,\n{\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n self.0.hash(state);\n self.1.hash(state);\n }\n}\n\nimpl<A, B, C> Hash for (A, B, C)\nwhere\n A: Hash,\n B: Hash,\n C: Hash,\n{\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n self.0.hash(state);\n self.1.hash(state);\n self.2.hash(state);\n }\n}\n\nimpl<A, B, C, D> Hash for (A, B, C, D)\nwhere\n A: Hash,\n B: Hash,\n C: Hash,\n D: Hash,\n{\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n self.0.hash(state);\n self.1.hash(state);\n self.2.hash(state);\n self.3.hash(state);\n }\n}\n\nimpl<A, B, C, D, E> Hash for (A, B, C, D, E)\nwhere\n A: Hash,\n B: Hash,\n C: Hash,\n D: Hash,\n E: Hash,\n{\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n self.0.hash(state);\n self.1.hash(state);\n self.2.hash(state);\n self.3.hash(state);\n self.4.hash(state);\n }\n}\n\n// Some test vectors for Pedersen hash and Pedersen Commitment.\n// They have been generated using the same functions so the tests are for now useless\n// but they will be useful when we switch to Noir implementation.\n#[test]\nfn assert_pedersen() {\n assert_eq(\n pedersen_hash_with_separator([1], 1),\n 0x1b3f4b1a83092a13d8d1a59f7acb62aba15e7002f4440f2275edb99ebbc2305f,\n );\n assert_eq(\n pedersen_commitment_with_separator([1], 1),\n EmbeddedCurvePoint {\n x: 0x054aa86a73cb8a34525e5bbed6e43ba1198e860f5f3950268f71df4591bde402,\n y: 0x209dcfbf2cfb57f9f6046f44d71ac6faf87254afc7407c04eb621a6287cac126,\n },\n );\n\n assert_eq(\n pedersen_hash_with_separator([1, 2], 2),\n 0x26691c129448e9ace0c66d11f0a16d9014a9e8498ee78f4d69f0083168188255,\n );\n assert_eq(\n pedersen_commitment_with_separator([1, 2], 2),\n EmbeddedCurvePoint {\n x: 0x2e2b3b191e49541fe468ec6877721d445dcaffe41728df0a0eafeb15e87b0753,\n y: 0x2ff4482400ad3a6228be17a2af33e2bcdf41be04795f9782bd96efe7e24f8778,\n },\n );\n assert_eq(\n pedersen_hash_with_separator([1, 2, 3], 3),\n 0x0bc694b7a1f8d10d2d8987d07433f26bd616a2d351bc79a3c540d85b6206dbe4,\n );\n assert_eq(\n pedersen_commitment_with_separator([1, 2, 3], 3),\n EmbeddedCurvePoint {\n x: 0x1fee4e8cf8d2f527caa2684236b07c4b1bad7342c01b0f75e9a877a71827dc85,\n y: 0x2f9fedb9a090697ab69bf04c8bc15f7385b3e4b68c849c1536e5ae15ff138fd1,\n },\n );\n assert_eq(\n pedersen_hash_with_separator([1, 2, 3, 4], 4),\n 0xdae10fb32a8408521803905981a2b300d6a35e40e798743e9322b223a5eddc,\n );\n assert_eq(\n pedersen_commitment_with_separator([1, 2, 3, 4], 4),\n EmbeddedCurvePoint {\n x: 0x07ae3e202811e1fca39c2d81eabe6f79183978e6f12be0d3b8eda095b79bdbc9,\n y: 0x0afc6f892593db6fbba60f2da558517e279e0ae04f95758587760ba193145014,\n },\n );\n assert_eq(\n pedersen_hash_with_separator([1, 2, 3, 4, 5], 5),\n 0xfc375b062c4f4f0150f7100dfb8d9b72a6d28582dd9512390b0497cdad9c22,\n );\n assert_eq(\n pedersen_commitment_with_separator([1, 2, 3, 4, 5], 5),\n EmbeddedCurvePoint {\n x: 0x1754b12bd475a6984a1094b5109eeca9838f4f81ac89c5f0a41dbce53189bb29,\n y: 0x2da030e3cfcdc7ddad80eaf2599df6692cae0717d4e9f7bfbee8d073d5d278f7,\n },\n );\n assert_eq(\n pedersen_hash_with_separator([1, 2, 3, 4, 5, 6], 6),\n 0x1696ed13dc2730062a98ac9d8f9de0661bb98829c7582f699d0273b18c86a572,\n );\n assert_eq(\n pedersen_commitment_with_separator([1, 2, 3, 4, 5, 6], 6),\n EmbeddedCurvePoint {\n x: 0x190f6c0e97ad83e1e28da22a98aae156da083c5a4100e929b77e750d3106a697,\n y: 0x1f4b60f34ef91221a0b49756fa0705da93311a61af73d37a0c458877706616fb,\n },\n );\n assert_eq(\n pedersen_hash_with_separator([1, 2, 3, 4, 5, 6, 7], 7),\n 0x128c0ff144fc66b6cb60eeac8a38e23da52992fc427b92397a7dffd71c45ede3,\n );\n assert_eq(\n pedersen_commitment_with_separator([1, 2, 3, 4, 5, 6, 7], 7),\n EmbeddedCurvePoint {\n x: 0x015441e9d29491b06563fac16fc76abf7a9534c715421d0de85d20dbe2965939,\n y: 0x1d2575b0276f4e9087e6e07c2cb75aa1baafad127af4be5918ef8a2ef2fea8fc,\n },\n );\n assert_eq(\n pedersen_hash_with_separator([1, 2, 3, 4, 5, 6, 7, 8], 8),\n 0x2f960e117482044dfc99d12fece2ef6862fba9242be4846c7c9a3e854325a55c,\n );\n assert_eq(\n pedersen_commitment_with_separator([1, 2, 3, 4, 5, 6, 7, 8], 8),\n EmbeddedCurvePoint {\n x: 0x1657737676968887fceb6dd516382ea13b3a2c557f509811cd86d5d1199bc443,\n y: 0x1f39f0cb569040105fa1e2f156521e8b8e08261e635a2b210bdc94e8d6d65f77,\n },\n );\n assert_eq(\n pedersen_hash_with_separator([1, 2, 3, 4, 5, 6, 7, 8, 9], 9),\n 0x0c96db0790602dcb166cc4699e2d306c479a76926b81c2cb2aaa92d249ec7be7,\n );\n assert_eq(\n pedersen_commitment_with_separator([1, 2, 3, 4, 5, 6, 7, 8, 9], 9),\n EmbeddedCurvePoint {\n x: 0x0a3ceae42d14914a432aa60ec7fded4af7dad7dd4acdbf2908452675ec67e06d,\n y: 0xfc19761eaaf621ad4aec9a8b2e84a4eceffdba78f60f8b9391b0bd9345a2f2,\n },\n );\n assert_eq(\n pedersen_hash_with_separator([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 10),\n 0x2cd37505871bc460a62ea1e63c7fe51149df5d0801302cf1cbc48beb8dff7e94,\n );\n assert_eq(\n pedersen_commitment_with_separator([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 10),\n EmbeddedCurvePoint {\n x: 0x2fb3f8b3d41ddde007c8c3c62550f9a9380ee546fcc639ffbb3fd30c8d8de30c,\n y: 0x300783be23c446b11a4c0fabf6c91af148937cea15fcf5fb054abf7f752ee245,\n },\n );\n}\n"
|
|
988
988
|
},
|
|
989
|
-
"
|
|
989
|
+
"174": {
|
|
990
990
|
"function_locations": [
|
|
991
991
|
{
|
|
992
992
|
"name": "aes128_decrypt_oracle",
|
|
@@ -1005,10 +1005,10 @@
|
|
|
1005
1005
|
"start": 3150
|
|
1006
1006
|
}
|
|
1007
1007
|
],
|
|
1008
|
-
"path": "/home/
|
|
1008
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/oracle/aes128_decrypt.nr",
|
|
1009
1009
|
"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"
|
|
1010
1010
|
},
|
|
1011
|
-
"
|
|
1011
|
+
"176": {
|
|
1012
1012
|
"function_locations": [
|
|
1013
1013
|
{
|
|
1014
1014
|
"name": "address",
|
|
@@ -1241,12 +1241,16 @@
|
|
|
1241
1241
|
{
|
|
1242
1242
|
"name": "storage_write_opcode",
|
|
1243
1243
|
"start": 7247
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
"name": "test::avm_storage_read",
|
|
1247
|
+
"start": 7410
|
|
1244
1248
|
}
|
|
1245
1249
|
],
|
|
1246
|
-
"path": "/home/
|
|
1247
|
-
"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"
|
|
1250
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/oracle/avm.nr",
|
|
1251
|
+
"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\nmod test {\n use crate::macros::oracle_testing::oracle_test;\n use super::storage_read_opcode;\n\n #[oracle_test]\n unconstrained fn avm_storage_read() {\n let result = storage_read_opcode(10, 1);\n assert_eq(result, 42);\n }\n}\n"
|
|
1248
1252
|
},
|
|
1249
|
-
"
|
|
1253
|
+
"180": {
|
|
1250
1254
|
"function_locations": [
|
|
1251
1255
|
{
|
|
1252
1256
|
"name": "store",
|
|
@@ -1337,10 +1341,10 @@
|
|
|
1337
1341
|
"start": 11311
|
|
1338
1342
|
}
|
|
1339
1343
|
],
|
|
1340
|
-
"path": "/home/
|
|
1344
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/oracle/capsules.nr",
|
|
1341
1345
|
"source": "use crate::protocol::{address::AztecAddress, traits::{Deserialize, Serialize}};\n\n/// Stores arbitrary information in a per-contract non-volatile database, which can later be retrieved with `load`. If\n/// data was already stored at this slot, it is overwritten.\n// TODO(F-498): review naming consistency\npub unconstrained fn store<T>(contract_address: AztecAddress, slot: Field, value: T, scope: AztecAddress)\nwhere\n T: Serialize,\n{\n let serialized = value.serialize();\n set_capsule_oracle(contract_address, slot, serialized, scope);\n}\n\n/// Returns data previously stored via `storeCapsule` in the per-contract non-volatile database. Returns\n/// Option::none() if nothing was stored at the given slot.\n// TODO(F-498): review naming consistency\npub unconstrained fn load<T>(contract_address: AztecAddress, slot: Field, scope: AztecAddress) -> Option<T>\nwhere\n T: Deserialize,\n{\n let serialized_option = get_capsule_oracle(contract_address, slot, <T as Deserialize>::N, scope);\n serialized_option.map(|arr| Deserialize::deserialize(arr))\n}\n\n/// Deletes data in the per-contract non-volatile database. Does nothing if no data was present.\npub unconstrained fn delete(contract_address: AztecAddress, slot: Field, scope: AztecAddress) {\n delete_oracle(contract_address, slot, scope);\n}\n\n/// Copies a number of contiguous entries in the per-contract non-volatile database. This allows for efficient data\n/// structures by avoiding repeated calls to `loadCapsule` and `storeCapsule`. Supports overlapping source and\n/// destination regions (which will result in the overlapped source values being overwritten). All copied slots must\n/// exist in the database (i.e. have been stored and not deleted)\npub unconstrained fn copy(\n contract_address: AztecAddress,\n src_slot: Field,\n dst_slot: Field,\n num_entries: u32,\n scope: AztecAddress,\n) {\n copy_oracle(contract_address, src_slot, dst_slot, num_entries, scope);\n}\n\n#[oracle(aztec_utl_setCapsule)]\nunconstrained fn set_capsule_oracle<let N: u32>(\n contract_address: AztecAddress,\n slot: Field,\n values: [Field; N],\n scope: AztecAddress,\n) {}\n\n/// We need to pass in `array_len` (the value of N) as a parameter to tell the oracle how many fields the response must\n/// have.\n///\n/// Note that the oracle returns an Option<[Field; N]> because we cannot return an Option<T> directly. That would\n/// require for the oracle resolver to know the shape of T (e.g. if T were a struct of 3 u32 values then the expected\n/// response shape would be 3 single items, whereas it were a struct containing `u32, [Field;10], u32` then the\n/// expected shape would be single, array, single.). Instead, we return the serialization and deserialize in Noir.\n#[oracle(aztec_utl_getCapsule)]\nunconstrained fn get_capsule_oracle<let N: u32>(\n contract_address: AztecAddress,\n slot: Field,\n array_len: u32,\n scope: AztecAddress,\n) -> Option<[Field; N]> {}\n\n#[oracle(aztec_utl_deleteCapsule)]\nunconstrained fn delete_oracle(contract_address: AztecAddress, slot: Field, scope: AztecAddress) {}\n\n#[oracle(aztec_utl_copyCapsule)]\nunconstrained fn copy_oracle(\n contract_address: AztecAddress,\n src_slot: Field,\n dst_slot: Field,\n num_entries: u32,\n scope: AztecAddress,\n) {}\n\nmod test {\n // These tests are sort of redundant since we already test the oracle implementation directly in TypeScript, but\n // they are cheap regardless and help ensure both that the TXE implementation works accordingly and that the Noir\n // oracles are hooked up correctly.\n\n use crate::{\n oracle::capsules::{copy, delete, load, store},\n test::{helpers::test_environment::TestEnvironment, mocks::MockStruct},\n };\n use crate::protocol::{address::AztecAddress, traits::{FromField, ToField}};\n\n global SLOT: Field = 1;\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 #[test]\n unconstrained fn stores_and_loads() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let value = MockStruct::new(5, 6);\n store(contract_address, SLOT, value, scope);\n\n assert_eq(load(contract_address, SLOT, scope).unwrap(), value);\n });\n }\n\n #[test]\n unconstrained fn store_overwrites() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let value = MockStruct::new(5, 6);\n store(contract_address, SLOT, value, scope);\n\n let new_value = MockStruct::new(7, 8);\n store(contract_address, SLOT, new_value, scope);\n\n assert_eq(load(contract_address, SLOT, scope).unwrap(), new_value);\n });\n }\n\n #[test]\n unconstrained fn loads_empty_slot() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let loaded_value: Option<MockStruct> = load(contract_address, SLOT, scope);\n assert_eq(loaded_value, Option::none());\n });\n }\n\n #[test]\n unconstrained fn deletes_stored_value() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let value = MockStruct::new(5, 6);\n store(contract_address, SLOT, value, scope);\n delete(contract_address, SLOT, scope);\n\n let loaded_value: Option<MockStruct> = load(contract_address, SLOT, scope);\n assert_eq(loaded_value, Option::none());\n });\n }\n\n #[test]\n unconstrained fn deletes_empty_slot() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n delete(contract_address, SLOT, scope);\n let loaded_value: Option<MockStruct> = load(contract_address, SLOT, scope);\n assert_eq(loaded_value, Option::none());\n });\n }\n\n #[test]\n unconstrained fn copies_non_overlapping_values() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let src = 5;\n\n let values = [MockStruct::new(5, 6), MockStruct::new(7, 8), MockStruct::new(9, 10)];\n store(contract_address, src, values[0], scope);\n store(contract_address, src + 1, values[1], scope);\n store(contract_address, src + 2, values[2], scope);\n\n let dst = 10;\n copy(contract_address, src, dst, 3, scope);\n\n assert_eq(load(contract_address, dst, scope).unwrap(), values[0]);\n assert_eq(load(contract_address, dst + 1, scope).unwrap(), values[1]);\n assert_eq(load(contract_address, dst + 2, scope).unwrap(), values[2]);\n });\n }\n\n #[test]\n unconstrained fn copies_overlapping_values_with_src_ahead() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let src = 1;\n\n let values = [MockStruct::new(5, 6), MockStruct::new(7, 8), MockStruct::new(9, 10)];\n store(contract_address, src, values[0], scope);\n store(contract_address, src + 1, values[1], scope);\n store(contract_address, src + 2, values[2], scope);\n\n let dst = 2;\n copy(contract_address, src, dst, 3, scope);\n\n assert_eq(load(contract_address, dst, scope).unwrap(), values[0]);\n assert_eq(load(contract_address, dst + 1, scope).unwrap(), values[1]);\n assert_eq(load(contract_address, dst + 2, scope).unwrap(), values[2]);\n\n // src[1] and src[2] should have been overwritten since they are also dst[0] and dst[1]\n assert_eq(load(contract_address, src, scope).unwrap(), values[0]); // src[0] (unchanged)\n assert_eq(load(contract_address, src + 1, scope).unwrap(), values[0]); // dst[0]\n assert_eq(load(contract_address, src + 2, scope).unwrap(), values[1]); // dst[1]\n });\n }\n\n #[test]\n unconstrained fn copies_overlapping_values_with_dst_ahead() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let src = 2;\n\n let values = [MockStruct::new(5, 6), MockStruct::new(7, 8), MockStruct::new(9, 10)];\n store(contract_address, src, values[0], scope);\n store(contract_address, src + 1, values[1], scope);\n store(contract_address, src + 2, values[2], scope);\n\n let dst = 1;\n copy(contract_address, src, dst, 3, scope);\n\n assert_eq(load(contract_address, dst, scope).unwrap(), values[0]);\n assert_eq(load(contract_address, dst + 1, scope).unwrap(), values[1]);\n assert_eq(load(contract_address, dst + 2, scope).unwrap(), values[2]);\n\n // src[0] and src[1] should have been overwritten since they are also dst[1] and dst[2]\n assert_eq(load(contract_address, src, scope).unwrap(), values[1]); // dst[1]\n assert_eq(load(contract_address, src + 1, scope).unwrap(), values[2]); // dst[2]\n assert_eq(load(contract_address, src + 2, scope).unwrap(), values[2]); // src[2] (unchanged)\n });\n }\n\n #[test(should_fail_with = \"copy empty slot\")]\n unconstrained fn cannot_copy_empty_values() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n copy(contract_address, SLOT, SLOT, 1, scope);\n });\n }\n\n #[test(should_fail_with = \"not allowed to access\")]\n unconstrained fn cannot_store_other_contract() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n let other_contract_address = AztecAddress::from_field(contract_address.to_field() + 1);\n\n let value = MockStruct::new(5, 6);\n store(other_contract_address, SLOT, value, scope);\n });\n }\n\n #[test(should_fail_with = \"not allowed to access\")]\n unconstrained fn cannot_load_other_contract() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n let other_contract_address = AztecAddress::from_field(contract_address.to_field() + 1);\n\n let _: Option<MockStruct> = load(other_contract_address, SLOT, scope);\n });\n }\n\n #[test(should_fail_with = \"not allowed to access\")]\n unconstrained fn cannot_delete_other_contract() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n let other_contract_address = AztecAddress::from_field(contract_address.to_field() + 1);\n\n delete(other_contract_address, SLOT, scope);\n });\n }\n\n #[test(should_fail_with = \"not allowed to access\")]\n unconstrained fn cannot_copy_other_contract() {\n let (env, scope) = setup();\n env.private_context(|context| {\n let contract_address = context.this_address();\n let other_contract_address = AztecAddress::from_field(contract_address.to_field() + 1);\n\n copy(other_contract_address, SLOT, SLOT, 0, scope);\n });\n }\n}\n"
|
|
1342
1346
|
},
|
|
1343
|
-
"
|
|
1347
|
+
"181": {
|
|
1344
1348
|
"function_locations": [
|
|
1345
1349
|
{
|
|
1346
1350
|
"name": "set_contract_sync_cache_invalid_oracle",
|
|
@@ -1351,10 +1355,10 @@
|
|
|
1351
1355
|
"start": 700
|
|
1352
1356
|
}
|
|
1353
1357
|
],
|
|
1354
|
-
"path": "/home/
|
|
1358
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/oracle/contract_sync.nr",
|
|
1355
1359
|
"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"
|
|
1356
1360
|
},
|
|
1357
|
-
"
|
|
1361
|
+
"183": {
|
|
1358
1362
|
"function_locations": [
|
|
1359
1363
|
{
|
|
1360
1364
|
"name": "get_utility_context_oracle",
|
|
@@ -1365,56 +1369,56 @@
|
|
|
1365
1369
|
"start": 344
|
|
1366
1370
|
}
|
|
1367
1371
|
],
|
|
1368
|
-
"path": "/home/
|
|
1372
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/oracle/execution.nr",
|
|
1369
1373
|
"source": "use crate::context::UtilityContext;\n\n#[oracle(aztec_utl_getUtilityContext)]\nunconstrained fn get_utility_context_oracle() -> UtilityContext {}\n\n/// Returns a utility context built from the global variables of anchor block and the contract address of the function\n/// being executed.\npub unconstrained fn get_utility_context() -> UtilityContext {\n get_utility_context_oracle()\n}\n"
|
|
1370
1374
|
},
|
|
1371
|
-
"
|
|
1375
|
+
"193": {
|
|
1372
1376
|
"function_locations": [
|
|
1373
1377
|
{
|
|
1374
1378
|
"name": "get_pending_tagged_logs",
|
|
1375
|
-
"start":
|
|
1379
|
+
"start": 1064
|
|
1376
1380
|
},
|
|
1377
1381
|
{
|
|
1378
1382
|
"name": "get_pending_tagged_logs_oracle",
|
|
1379
|
-
"start":
|
|
1383
|
+
"start": 1337
|
|
1380
1384
|
},
|
|
1381
1385
|
{
|
|
1382
1386
|
"name": "validate_and_store_enqueued_notes_and_events",
|
|
1383
|
-
"start":
|
|
1387
|
+
"start": 1644
|
|
1384
1388
|
},
|
|
1385
1389
|
{
|
|
1386
1390
|
"name": "validate_and_store_enqueued_notes_and_events_oracle",
|
|
1387
|
-
"start":
|
|
1391
|
+
"start": 2063
|
|
1388
1392
|
},
|
|
1389
1393
|
{
|
|
1390
1394
|
"name": "get_logs_by_tag",
|
|
1391
|
-
"start":
|
|
1395
|
+
"start": 2503
|
|
1392
1396
|
},
|
|
1393
1397
|
{
|
|
1394
1398
|
"name": "get_logs_by_tag_oracle",
|
|
1395
|
-
"start":
|
|
1399
|
+
"start": 2729
|
|
1396
1400
|
},
|
|
1397
1401
|
{
|
|
1398
1402
|
"name": "get_message_contexts_by_tx_hash",
|
|
1399
|
-
"start":
|
|
1403
|
+
"start": 2989
|
|
1400
1404
|
},
|
|
1401
1405
|
{
|
|
1402
1406
|
"name": "get_message_contexts_by_tx_hash_oracle",
|
|
1403
|
-
"start":
|
|
1407
|
+
"start": 3233
|
|
1404
1408
|
},
|
|
1405
1409
|
{
|
|
1406
1410
|
"name": "get_tx_effect",
|
|
1407
|
-
"start":
|
|
1411
|
+
"start": 3370
|
|
1408
1412
|
},
|
|
1409
1413
|
{
|
|
1410
1414
|
"name": "get_tx_effect_oracle",
|
|
1411
|
-
"start":
|
|
1415
|
+
"start": 3516
|
|
1412
1416
|
}
|
|
1413
1417
|
],
|
|
1414
|
-
"path": "/home/
|
|
1415
|
-
"source": "use crate::ephemeral::EphemeralArray;\nuse crate::messages::processing::{\n event_validation_request::EventValidationRequest, log_retrieval_request::LogRetrievalRequest,\n log_retrieval_response::LogRetrievalResponse, MessageContext, NoteValidationRequest,\n pending_tagged_log::PendingTaggedLog,\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.\npub(crate) unconstrained fn get_pending_tagged_logs(scope: AztecAddress) -> EphemeralArray<PendingTaggedLog> {\n get_pending_tagged_logs_oracle(scope)\n}\n\n#[oracle(aztec_utl_getPendingTaggedLogs)]\nunconstrained fn get_pending_tagged_logs_oracle(scope: AztecAddress) -> 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
|
|
1418
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/oracle/message_processing.nr",
|
|
1419
|
+
"source": "use crate::ephemeral::EphemeralArray;\nuse crate::messages::processing::{\n event_validation_request::EventValidationRequest, log_retrieval_request::LogRetrievalRequest,\n log_retrieval_response::LogRetrievalResponse, MessageContext, NoteValidationRequest,\n pending_tagged_log::PendingTaggedLog, 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_getPendingTaggedLogs)]\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_getLogsByTag)]\nunconstrained fn get_logs_by_tag_oracle(\n requests: EphemeralArray<LogRetrievalRequest>,\n) -> EphemeralArray<EphemeralArray<LogRetrievalResponse>> {}\n\n/// Resolves message contexts for tx hashes in an ephemeral request array and returns a response ephemeral array.\npub(crate) unconstrained fn get_message_contexts_by_tx_hash(\n requests: EphemeralArray<Field>,\n) -> EphemeralArray<Option<MessageContext>> {\n get_message_contexts_by_tx_hash_oracle(requests)\n}\n\n#[oracle(aztec_utl_getMessageContextsByTxHash)]\nunconstrained fn get_message_contexts_by_tx_hash_oracle(\n requests: EphemeralArray<Field>,\n) -> EphemeralArray<Option<MessageContext>> {}\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"
|
|
1416
1420
|
},
|
|
1417
|
-
"
|
|
1421
|
+
"200": {
|
|
1418
1422
|
"function_locations": [
|
|
1419
1423
|
{
|
|
1420
1424
|
"name": "get_shared_secrets_oracle",
|
|
@@ -1430,25 +1434,25 @@
|
|
|
1430
1434
|
},
|
|
1431
1435
|
{
|
|
1432
1436
|
"name": "test::preserves_ephemeral_key_ordering",
|
|
1433
|
-
"start":
|
|
1437
|
+
"start": 2943
|
|
1434
1438
|
},
|
|
1435
1439
|
{
|
|
1436
1440
|
"name": "test::returns_secrets_in_order",
|
|
1437
|
-
"start":
|
|
1441
|
+
"start": 3814
|
|
1438
1442
|
},
|
|
1439
1443
|
{
|
|
1440
1444
|
"name": "test::cannot_return_mismatched_length",
|
|
1441
|
-
"start":
|
|
1445
|
+
"start": 4522
|
|
1442
1446
|
},
|
|
1443
1447
|
{
|
|
1444
1448
|
"name": "test::mock_get_shared_secrets",
|
|
1445
|
-
"start":
|
|
1449
|
+
"start": 5038
|
|
1446
1450
|
}
|
|
1447
1451
|
],
|
|
1448
|
-
"path": "/home/
|
|
1449
|
-
"source": "use crate::ephemeral::EphemeralArray;\nuse crate::protocol::{address::AztecAddress, hash::sha256_to_field, point::EmbeddedCurvePoint};\n\nglobal GET_SHARED_SECRETS_REQUEST_SLOT: Field = sha256_to_field(\"AZTEC_NR::GET_SHARED_SECRETS_REQUEST_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.\npub unconstrained fn get_shared_secret(\n address: AztecAddress,\n eph_pk: EmbeddedCurvePoint,\n contract_address: AztecAddress,\n) -> Field {\n get_shared_secrets::<1>(address, BoundedVec::from_array([eph_pk]), contract_address).get(0)\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).\npub unconstrained fn get_shared_secrets<let N: u32>(\n address: AztecAddress,\n eph_pks: BoundedVec<EmbeddedCurvePoint, N>,\n contract_address: AztecAddress,\n) -> BoundedVec<Field, N> {\n let request_array: EphemeralArray<EmbeddedCurvePoint> = EphemeralArray::
|
|
1452
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/oracle/shared_secret.nr",
|
|
1453
|
+
"source": "use crate::ephemeral::EphemeralArray;\nuse crate::protocol::{address::AztecAddress, hash::sha256_to_field, point::EmbeddedCurvePoint};\n\nglobal GET_SHARED_SECRETS_REQUEST_SLOT: Field = sha256_to_field(\"AZTEC_NR::GET_SHARED_SECRETS_REQUEST_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.\npub unconstrained fn get_shared_secret(\n address: AztecAddress,\n eph_pk: EmbeddedCurvePoint,\n contract_address: AztecAddress,\n) -> Field {\n get_shared_secrets::<1>(address, BoundedVec::from_array([eph_pk]), contract_address).get(0)\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).\npub unconstrained fn get_shared_secrets<let N: u32>(\n address: AztecAddress,\n eph_pks: BoundedVec<EmbeddedCurvePoint, N>,\n contract_address: AztecAddress,\n) -> BoundedVec<Field, N> {\n let request_array: EphemeralArray<EmbeddedCurvePoint> = EphemeralArray::empty_at(GET_SHARED_SECRETS_REQUEST_SLOT);\n eph_pks.for_each(|pk| request_array.push(pk));\n\n let response_array = get_shared_secrets_oracle(address, request_array, contract_address);\n assert(response_array.len() == eph_pks.len(), \"get_shared_secrets: response length does not match request length\");\n\n let mut results: BoundedVec<Field, N> = BoundedVec::new();\n for i in 0..eph_pks.len() {\n results.push(response_array.get(i));\n }\n results\n}\n\nmod test {\n use crate::ephemeral::EphemeralArray;\n use crate::oracle::shared_secret::{get_shared_secrets, GET_SHARED_SECRETS_REQUEST_SLOT};\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 _: BoundedVec<Field, 3> = get_shared_secrets(\n AztecAddress::from_field(1),\n BoundedVec::from_array([pk_a, pk_b, pk_c]),\n AztecAddress::from_field(2),\n );\n\n let request_array: EphemeralArray<_> = EphemeralArray::at(GET_SHARED_SECRETS_REQUEST_SLOT);\n assert_eq(request_array.get(0), pk_a);\n assert_eq(request_array.get(1), pk_b);\n assert_eq(request_array.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 results: BoundedVec<Field, 3> = get_shared_secrets(\n AztecAddress::from_field(1),\n BoundedVec::from_array([pk, pk, pk]),\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(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 _: BoundedVec<Field, 1> = get_shared_secrets(\n AztecAddress::from_field(1),\n BoundedVec::from_array([pk]),\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"
|
|
1450
1454
|
},
|
|
1451
|
-
"
|
|
1455
|
+
"252": {
|
|
1452
1456
|
"function_locations": [
|
|
1453
1457
|
{
|
|
1454
1458
|
"name": "append",
|
|
@@ -1467,10 +1471,10 @@
|
|
|
1467
1471
|
"start": 1387
|
|
1468
1472
|
}
|
|
1469
1473
|
],
|
|
1470
|
-
"path": "/home/
|
|
1474
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/utils/array/append.nr",
|
|
1471
1475
|
"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"
|
|
1472
1476
|
},
|
|
1473
|
-
"
|
|
1477
|
+
"255": {
|
|
1474
1478
|
"function_locations": [
|
|
1475
1479
|
{
|
|
1476
1480
|
"name": "subarray",
|
|
@@ -1497,10 +1501,10 @@
|
|
|
1497
1501
|
"start": 1941
|
|
1498
1502
|
}
|
|
1499
1503
|
],
|
|
1500
|
-
"path": "/home/
|
|
1504
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/utils/array/subarray.nr",
|
|
1501
1505
|
"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"
|
|
1502
1506
|
},
|
|
1503
|
-
"
|
|
1507
|
+
"256": {
|
|
1504
1508
|
"function_locations": [
|
|
1505
1509
|
{
|
|
1506
1510
|
"name": "subbvec",
|
|
@@ -1539,10 +1543,10 @@
|
|
|
1539
1543
|
"start": 3579
|
|
1540
1544
|
}
|
|
1541
1545
|
],
|
|
1542
|
-
"path": "/home/
|
|
1546
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/utils/array/subbvec.nr",
|
|
1543
1547
|
"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 // from_parts_unchecked does not verify that the elements past len are zeroed, but that is not an issue in our case\n // because we're constructing the new storage array as a subarray of the original one (which should have zeroed\n // storage past len), guaranteeing correctness. This is because `subarray` does not allow extending arrays past\n // their original length.\n BoundedVec::from_parts_unchecked(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"
|
|
1544
1548
|
},
|
|
1545
|
-
"
|
|
1549
|
+
"258": {
|
|
1546
1550
|
"function_locations": [
|
|
1547
1551
|
{
|
|
1548
1552
|
"name": "compare",
|
|
@@ -1553,10 +1557,10 @@
|
|
|
1553
1557
|
"start": 987
|
|
1554
1558
|
}
|
|
1555
1559
|
],
|
|
1556
|
-
"path": "/home/
|
|
1560
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/utils/comparison.nr",
|
|
1557
1561
|
"source": "struct ComparatorEnum {\n pub EQ: u8,\n pub NEQ: u8,\n pub LT: u8,\n pub LTE: u8,\n pub GT: u8,\n pub GTE: u8,\n}\n\npub global Comparator: ComparatorEnum = ComparatorEnum { EQ: 1, NEQ: 2, LT: 3, LTE: 4, GT: 5, GTE: 6 };\n\npub fn compare(lhs: Field, operation: u8, rhs: Field) -> bool {\n // Values are computed ahead of time because circuits evaluate all branches\n let is_equal = lhs == rhs;\n let is_lt = lhs.lt(rhs);\n\n if (operation == Comparator.EQ) {\n is_equal\n } else if (operation == Comparator.NEQ) {\n !is_equal\n } else if (operation == Comparator.LT) {\n is_lt\n } else if (operation == Comparator.LTE) {\n is_lt | is_equal\n } else if (operation == Comparator.GT) {\n !is_lt & !is_equal\n } else if (operation == Comparator.GTE) {\n !is_lt\n } else {\n panic(f\"Invalid operation\")\n }\n}\n\nmod test {\n use super::Comparator;\n use super::compare;\n\n #[test]\n unconstrained fn test_compare() {\n let lhs = 10;\n let rhs = 10;\n assert(compare(lhs, Comparator.EQ, rhs), \"Expected lhs to be equal to rhs\");\n\n let lhs = 10;\n let rhs = 11;\n assert(compare(lhs, Comparator.NEQ, rhs), \"Expected lhs to be not equal to rhs\");\n\n let lhs = 10;\n let rhs = 11;\n assert(compare(lhs, Comparator.LT, rhs), \"Expected lhs to be less than rhs\");\n\n let lhs = 10;\n let rhs = 10;\n assert(compare(lhs, Comparator.LTE, rhs), \"Expected lhs to be less than or equal to rhs\");\n\n let lhs = 11;\n let rhs = 10;\n assert(compare(lhs, Comparator.GT, rhs), \"Expected lhs to be greater than rhs\");\n\n let lhs = 10;\n let rhs = 10;\n assert(compare(lhs, Comparator.GTE, rhs), \"Expected lhs to be greater than or equal to rhs\");\n\n let lhs = 11;\n let rhs = 10;\n assert(compare(lhs, Comparator.GTE, rhs), \"Expected lhs to be greater than or equal to rhs\");\n\n let lhs = 10;\n let rhs = 11;\n assert(!compare(lhs, Comparator.EQ, rhs), \"Expected lhs to be not equal to rhs\");\n\n let lhs = 10;\n let rhs = 10;\n assert(!compare(lhs, Comparator.NEQ, rhs), \"Expected lhs to not be not equal to rhs\");\n\n let lhs = 11;\n let rhs = 10;\n assert(!compare(lhs, Comparator.LT, rhs), \"Expected lhs to not be less than rhs\");\n\n let lhs = 11;\n let rhs = 10;\n assert(!compare(lhs, Comparator.LTE, rhs), \"Expected lhs to not be less than or equal to rhs\");\n\n let lhs = 10;\n let rhs = 10;\n assert(!compare(lhs, Comparator.GT, rhs), \"Expected lhs to not be greater than rhs\");\n\n let lhs = 10;\n let rhs = 11;\n assert(!compare(lhs, Comparator.GTE, rhs), \"Expected lhs to not be greater than or equal to rhs\");\n\n let lhs = 10;\n let rhs = 11;\n assert(!compare(lhs, Comparator.GTE, rhs), \"Expected lhs to not be greater than or equal to rhs\");\n }\n}\n"
|
|
1558
1562
|
},
|
|
1559
|
-
"
|
|
1563
|
+
"259": {
|
|
1560
1564
|
"function_locations": [
|
|
1561
1565
|
{
|
|
1562
1566
|
"name": "encode_bytes_as_fields",
|
|
@@ -1579,10 +1583,10 @@
|
|
|
1579
1583
|
"start": 2454
|
|
1580
1584
|
}
|
|
1581
1585
|
],
|
|
1582
|
-
"path": "/home/
|
|
1586
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/utils/conversion/bytes_as_fields.nr",
|
|
1583
1587
|
"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"
|
|
1584
1588
|
},
|
|
1585
|
-
"
|
|
1589
|
+
"260": {
|
|
1586
1590
|
"function_locations": [
|
|
1587
1591
|
{
|
|
1588
1592
|
"name": "encode_fields_as_bytes",
|
|
@@ -1629,10 +1633,10 @@
|
|
|
1629
1633
|
"start": 6544
|
|
1630
1634
|
}
|
|
1631
1635
|
],
|
|
1632
|
-
"path": "/home/
|
|
1636
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/utils/conversion/fields_as_bytes.nr",
|
|
1633
1637
|
"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"
|
|
1634
1638
|
},
|
|
1635
|
-
"
|
|
1639
|
+
"263": {
|
|
1636
1640
|
"function_locations": [
|
|
1637
1641
|
{
|
|
1638
1642
|
"name": "get_sign_of_point",
|
|
@@ -1679,10 +1683,10 @@
|
|
|
1679
1683
|
"start": 6628
|
|
1680
1684
|
}
|
|
1681
1685
|
],
|
|
1682
|
-
"path": "/home/
|
|
1686
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/utils/point.nr",
|
|
1683
1687
|
"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"
|
|
1684
1688
|
},
|
|
1685
|
-
"
|
|
1689
|
+
"273": {
|
|
1686
1690
|
"function_locations": [
|
|
1687
1691
|
{
|
|
1688
1692
|
"name": "Poseidon2::hash",
|
|
@@ -1724,7 +1728,7 @@
|
|
|
1724
1728
|
"path": "/home/aztec-dev/nargo/github.com/noir-lang/poseidon/v0.3.0/src/poseidon2.nr",
|
|
1725
1729
|
"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"
|
|
1726
1730
|
},
|
|
1727
|
-
"
|
|
1731
|
+
"362": {
|
|
1728
1732
|
"function_locations": [
|
|
1729
1733
|
{
|
|
1730
1734
|
"name": "sha256_to_field",
|
|
@@ -1843,10 +1847,10 @@
|
|
|
1843
1847
|
"start": 16359
|
|
1844
1848
|
}
|
|
1845
1849
|
],
|
|
1846
|
-
"path": "/home/
|
|
1850
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/noir-protocol-circuits/crates/types/src/hash.nr",
|
|
1847
1851
|
"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"
|
|
1848
1852
|
},
|
|
1849
|
-
"
|
|
1853
|
+
"364": {
|
|
1850
1854
|
"function_locations": [
|
|
1851
1855
|
{
|
|
1852
1856
|
"name": "fatal_log",
|
|
@@ -1914,13 +1918,13 @@
|
|
|
1914
1918
|
},
|
|
1915
1919
|
{
|
|
1916
1920
|
"name": "log_oracle",
|
|
1917
|
-
"start":
|
|
1921
|
+
"start": 2802
|
|
1918
1922
|
}
|
|
1919
1923
|
],
|
|
1920
|
-
"path": "/home/
|
|
1921
|
-
"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(
|
|
1924
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/noir-protocol-circuits/crates/types/src/logging.nr",
|
|
1925
|
+
"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"
|
|
1922
1926
|
},
|
|
1923
|
-
"
|
|
1927
|
+
"383": {
|
|
1924
1928
|
"function_locations": [
|
|
1925
1929
|
{
|
|
1926
1930
|
"name": "Poseidon2Sponge::hash",
|
|
@@ -1947,7 +1951,7 @@
|
|
|
1947
1951
|
"start": 2544
|
|
1948
1952
|
}
|
|
1949
1953
|
],
|
|
1950
|
-
"path": "/home/
|
|
1954
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/noir-protocol-circuits/crates/types/src/poseidon2.nr",
|
|
1951
1955
|
"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"
|
|
1952
1956
|
},
|
|
1953
1957
|
"40": {
|
|
@@ -2048,7 +2052,7 @@
|
|
|
2048
2052
|
"path": "std/option.nr",
|
|
2049
2053
|
"source": "use crate::cmp::{Eq, Ord, Ordering};\nuse crate::default::Default;\nuse crate::hash::{Hash, Hasher};\n\n/// Represents a value of type T or its absence.\n/// Use `Option::some(value)` to construct a value or `Option::none()` to record the absence of one.\npub struct Option<T> {\n _is_some: bool,\n _value: T,\n}\n\nimpl<T> Option<T> {\n /// Constructs a None value\n pub fn none() -> Self {\n Self { _is_some: false, _value: crate::mem::zeroed() }\n }\n\n /// Constructs a Some wrapper around the given value\n pub fn some(_value: T) -> Self {\n Self { _is_some: true, _value }\n }\n\n /// True if this Option is None\n pub fn is_none(&self) -> bool {\n !self._is_some\n }\n\n /// True if this Option is Some\n pub fn is_some(&self) -> bool {\n self._is_some\n }\n\n /// Asserts `self.is_some()` and returns the wrapped value.\n pub fn unwrap(self) -> T {\n assert(self._is_some);\n self._value\n }\n\n /// Returns the inner value without asserting `self.is_some()`\n /// Note that if `self` is `None`, there is no guarantee what value will be returned,\n /// only that it will be of type `T`.\n pub fn unwrap_unchecked(self) -> T {\n self._value\n }\n\n /// Returns the wrapped value if `self.is_some()`. Otherwise, returns the given default value.\n pub fn unwrap_or(self, default: T) -> T {\n if self._is_some {\n self._value\n } else {\n default\n }\n }\n\n /// Returns the wrapped value if `self.is_some()`. Otherwise, calls the given function to return\n /// a default value.\n pub fn unwrap_or_else<Env>(self, default: fn[Env]() -> T) -> T {\n if self._is_some {\n self._value\n } else {\n default()\n }\n }\n\n /// Asserts `self.is_some()` with a provided custom message and returns the contained `Some` value\n pub fn expect<let N: u32, MessageTypes>(self, message: fmtstr<N, MessageTypes>) -> T {\n assert(self.is_some(), message);\n self._value\n }\n\n /// If self is `Some(x)`, this returns `Some(f(x))`. Otherwise, this returns `None`.\n pub fn map<U, Env>(self, f: fn[Env](T) -> U) -> Option<U> {\n if self._is_some {\n Option::some(f(self._value))\n } else {\n Option::none()\n }\n }\n\n /// If self is `Some(x)`, this returns `f(x)`. Otherwise, this returns the given default value.\n pub fn map_or<U, Env>(self, default: U, f: fn[Env](T) -> U) -> U {\n if self._is_some {\n f(self._value)\n } else {\n default\n }\n }\n\n /// If self is `Some(x)`, this returns `f(x)`. Otherwise, this returns `default()`.\n pub fn map_or_else<U, Env1, Env2>(self, default: fn[Env1]() -> U, f: fn[Env2](T) -> U) -> U {\n if self._is_some {\n f(self._value)\n } else {\n default()\n }\n }\n\n /// Returns None if self is None. Otherwise, this returns `other`.\n pub fn and(self, other: Self) -> Self {\n if self.is_none() {\n Option::none()\n } else {\n other\n }\n }\n\n /// If self is None, this returns None. Otherwise, this calls the given function\n /// with the Some value contained within self, and returns the result of that call.\n ///\n /// In some languages this function is called `flat_map` or `bind`.\n pub fn and_then<U, Env>(self, f: fn[Env](T) -> Option<U>) -> Option<U> {\n if self._is_some {\n f(self._value)\n } else {\n Option::none()\n }\n }\n\n /// If self is Some, return self. Otherwise, return `other`.\n pub fn or(self, other: Self) -> Self {\n if self._is_some {\n self\n } else {\n other\n }\n }\n\n /// If self is Some, return self. Otherwise, return `default()`.\n pub fn or_else<Env>(self, default: fn[Env]() -> Self) -> Self {\n if self._is_some {\n self\n } else {\n default()\n }\n }\n\n // If only one of the two Options is Some, return that option.\n // Otherwise, if both options are Some or both are None, None is returned.\n pub fn xor(self, other: Self) -> Self {\n if self._is_some {\n if other._is_some {\n Option::none()\n } else {\n self\n }\n } else if other._is_some {\n other\n } else {\n Option::none()\n }\n }\n\n /// Returns `Some(x)` if self is `Some(x)` and `predicate(x)` is true.\n /// Otherwise, this returns `None`\n pub fn filter<Env>(self, predicate: fn[Env](T) -> bool) -> Self {\n if self._is_some {\n if predicate(self._value) {\n self\n } else {\n Option::none()\n }\n } else {\n Option::none()\n }\n }\n\n /// Flattens an Option<Option<T>> into a Option<T>.\n /// This returns None if the outer Option is None. Otherwise, this returns the inner Option.\n pub fn flatten(option: Option<Option<T>>) -> Option<T> {\n if option._is_some {\n option._value\n } else {\n Option::none()\n }\n }\n}\n\nimpl<T> Default for Option<T> {\n fn default() -> Self {\n Option::none()\n }\n}\n\nimpl<T> Eq for Option<T>\nwhere\n T: Eq,\n{\n fn eq(self, other: Self) -> bool {\n if self._is_some == other._is_some {\n if self._is_some {\n self._value == other._value\n } else {\n true\n }\n } else {\n false\n }\n }\n}\n\nimpl<T> Hash for Option<T>\nwhere\n T: Hash,\n{\n fn hash<H>(self, state: &mut H)\n where\n H: Hasher,\n {\n self._is_some.hash(state);\n if self._is_some {\n self._value.hash(state);\n }\n }\n}\n\n// For this impl we're declaring Option::none < Option::some\nimpl<T> Ord for Option<T>\nwhere\n T: Ord,\n{\n fn cmp(self, other: Self) -> Ordering {\n if self._is_some {\n if other._is_some {\n self._value.cmp(other._value)\n } else {\n Ordering::greater()\n }\n } else if other._is_some {\n Ordering::less()\n } else {\n Ordering::equal()\n }\n }\n}\n"
|
|
2050
2054
|
},
|
|
2051
|
-
"
|
|
2055
|
+
"402": {
|
|
2052
2056
|
"function_locations": [
|
|
2053
2057
|
{
|
|
2054
2058
|
"name": "<impl ToField for Field>::to_field",
|
|
@@ -2083,10 +2087,20 @@
|
|
|
2083
2087
|
"start": 912
|
|
2084
2088
|
}
|
|
2085
2089
|
],
|
|
2086
|
-
"path": "/home/
|
|
2090
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/noir-protocol-circuits/crates/types/src/traits/to_field.nr",
|
|
2087
2091
|
"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"
|
|
2088
2092
|
},
|
|
2089
|
-
"
|
|
2093
|
+
"41": {
|
|
2094
|
+
"function_locations": [
|
|
2095
|
+
{
|
|
2096
|
+
"name": "panic",
|
|
2097
|
+
"start": 196
|
|
2098
|
+
}
|
|
2099
|
+
],
|
|
2100
|
+
"path": "std/panic.nr",
|
|
2101
|
+
"source": "/// Halt the program at runtime with the given error message.\n///\n/// The provided error message must be either a `str` or a `fmtstr`.\npub fn panic<T, U>(message: T) -> U\nwhere\n T: StringLike,\n{\n assert(false, message);\n crate::mem::zeroed()\n}\n\ntrait StringLike {}\n\nimpl<let N: u32> StringLike for str<N> {}\nimpl<let N: u32, T> StringLike for fmtstr<N, T> {}\n"
|
|
2102
|
+
},
|
|
2103
|
+
"410": {
|
|
2090
2104
|
"function_locations": [
|
|
2091
2105
|
{
|
|
2092
2106
|
"name": "field_from_bytes",
|
|
@@ -2197,20 +2211,10 @@
|
|
|
2197
2211
|
"start": 11828
|
|
2198
2212
|
}
|
|
2199
2213
|
],
|
|
2200
|
-
"path": "/home/
|
|
2214
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/noir-protocol-circuits/crates/types/src/utils/field.nr",
|
|
2201
2215
|
"source": "pub fn field_from_bytes<let N: u32>(bytes: [u8; N], big_endian: bool) -> Field {\n assert(bytes.len() < 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"
|
|
2202
2216
|
},
|
|
2203
|
-
"
|
|
2204
|
-
"function_locations": [
|
|
2205
|
-
{
|
|
2206
|
-
"name": "panic",
|
|
2207
|
-
"start": 196
|
|
2208
|
-
}
|
|
2209
|
-
],
|
|
2210
|
-
"path": "std/panic.nr",
|
|
2211
|
-
"source": "/// Halt the program at runtime with the given error message.\n///\n/// The provided error message must be either a `str` or a `fmtstr`.\npub fn panic<T, U>(message: T) -> U\nwhere\n T: StringLike,\n{\n assert(false, message);\n crate::mem::zeroed()\n}\n\ntrait StringLike {}\n\nimpl<let N: u32> StringLike for str<N> {}\nimpl<let N: u32, T> StringLike for fmtstr<N, T> {}\n"
|
|
2212
|
-
},
|
|
2213
|
-
"414": {
|
|
2217
|
+
"416": {
|
|
2214
2218
|
"function_locations": [
|
|
2215
2219
|
{
|
|
2216
2220
|
"name": "Reader<N>::new",
|
|
@@ -2257,10 +2261,10 @@
|
|
|
2257
2261
|
"start": 1426
|
|
2258
2262
|
}
|
|
2259
2263
|
],
|
|
2260
|
-
"path": "/home/
|
|
2264
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/noir-protocol-circuits/crates/serde/src/reader.nr",
|
|
2261
2265
|
"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"
|
|
2262
2266
|
},
|
|
2263
|
-
"
|
|
2267
|
+
"417": {
|
|
2264
2268
|
"function_locations": [
|
|
2265
2269
|
{
|
|
2266
2270
|
"name": "derive_serialize",
|
|
@@ -2283,10 +2287,10 @@
|
|
|
2283
2287
|
"start": 12469
|
|
2284
2288
|
}
|
|
2285
2289
|
],
|
|
2286
|
-
"path": "/home/
|
|
2290
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/noir-protocol-circuits/crates/serde/src/serialization.nr",
|
|
2287
2291
|
"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"
|
|
2288
2292
|
},
|
|
2289
|
-
"
|
|
2293
|
+
"419": {
|
|
2290
2294
|
"function_locations": [
|
|
2291
2295
|
{
|
|
2292
2296
|
"name": "<impl Serialize for bool>::serialize",
|
|
@@ -2597,10 +2601,10 @@
|
|
|
2597
2601
|
"start": 21226
|
|
2598
2602
|
}
|
|
2599
2603
|
],
|
|
2600
|
-
"path": "/home/
|
|
2604
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/noir-protocol-circuits/crates/serde/src/type_impls.nr",
|
|
2601
2605
|
"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"
|
|
2602
2606
|
},
|
|
2603
|
-
"
|
|
2607
|
+
"420": {
|
|
2604
2608
|
"function_locations": [
|
|
2605
2609
|
{
|
|
2606
2610
|
"name": "Writer<N>::new",
|
|
@@ -2643,7 +2647,7 @@
|
|
|
2643
2647
|
"start": 1263
|
|
2644
2648
|
}
|
|
2645
2649
|
],
|
|
2646
|
-
"path": "/home/
|
|
2650
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/noir-protocol-circuits/crates/serde/src/writer.nr",
|
|
2647
2651
|
"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"
|
|
2648
2652
|
},
|
|
2649
2653
|
"49": {
|
|
@@ -2657,7 +2661,7 @@
|
|
|
2657
2661
|
"start": 1364
|
|
2658
2662
|
}
|
|
2659
2663
|
],
|
|
2660
|
-
"path": "/home/
|
|
2664
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/noir-contracts/contracts/standard/public_checks_contract/src/main.nr",
|
|
2661
2665
|
"source": "mod test;\n\nuse aztec::macros::aztec;\n\n/// The purpose of this contract is to perform a check in public without revealing what contract enqueued the public\n/// call. This can be achieved by enqueueing an `incognito` public call.\n///\n/// Note that this contract should not be grouped with protocol contracts as it is not part of the protocol. We keep\n/// it here for now as it allows us to use hardcoded address.\n#[aztec]\npub contract PublicChecks {\n use aztec::{macros::functions::{external, view}, utils::comparison::compare};\n\n // docs:start:check_timestamp\n /// Asserts that the current timestamp satisfies the `operation` with respect\n /// to the `value.\n /// NOTE: signature is hardcoded in `aztec-nr/aztec/src/public_checks.nr`; keep in sync.\n #[external(\"public\")]\n #[view]\n fn check_timestamp(operation: u8, value: u64) {\n let lhs_field = self.context.timestamp() as Field;\n let rhs_field = value as Field;\n assert(compare(lhs_field, operation, rhs_field), \"Timestamp mismatch.\");\n }\n // docs:end:check_timestamp\n\n /// Asserts that the current block number satisfies the `operation` with respect\n /// to the `value.\n /// NOTE: signature is hardcoded in `aztec-nr/aztec/src/public_checks.nr`; keep in sync.\n #[external(\"public\")]\n #[view]\n fn check_block_number(operation: u8, value: u32) {\n assert(\n compare(\n self.context.block_number() as Field,\n operation,\n value as Field,\n ),\n \"Block number mismatch.\",\n );\n }\n}\n"
|
|
2662
2666
|
},
|
|
2663
2667
|
"59": {
|
|
@@ -2739,7 +2743,7 @@
|
|
|
2739
2743
|
"start": 13383
|
|
2740
2744
|
}
|
|
2741
2745
|
],
|
|
2742
|
-
"path": "/home/
|
|
2746
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/capsules/mod.nr",
|
|
2743
2747
|
"source": "use crate::oracle::capsules;\nuse crate::protocol::{address::AztecAddress, traits::{Deserialize, Serialize}};\n\n/// A dynamically sized array backed by PXE's non-volatile database (called capsules). Values are persisted until\n/// deleted, so they can be e.g. stored during simulation of a transaction and later retrieved during witness\n/// generation. All values are scoped per contract address, so external contracts cannot access them.\npub struct CapsuleArray<T> {\n contract_address: AztecAddress,\n /// The base slot is where the array length is stored in capsules. Array elements are stored in consecutive slots\n /// after the base slot. For example, with base slot 5: the length is at slot 5, the first element (index 0) is at\n /// slot 6, the second element (index 1) is at slot 7, and so on.\n base_slot: Field,\n /// Scope for capsule isolation. Capsule operations are scoped to the given address, allowing multiple independent\n /// namespaces within the same contract.\n scope: AztecAddress,\n}\n\nimpl<T> CapsuleArray<T> {\n /// Returns a CapsuleArray scoped to a specific address.\n ///\n /// Array elements are stored in contiguous slots\n /// following the base slot, so there should be sufficient space between array base slots to accommodate elements.\n /// A reasonable strategy is to make the base slot a hash of a unique value.\n pub unconstrained fn at(contract_address: AztecAddress, base_slot: Field, scope: AztecAddress) -> Self {\n Self { contract_address, base_slot, scope }\n }\n\n /// Returns the number of elements stored in the array.\n pub unconstrained fn len(self) -> u32 {\n // An uninitialized array defaults to a length of 0.\n capsules::load(self.contract_address, self.base_slot, self.scope).unwrap_or(0) as u32\n }\n\n /// Stores a value at the end of the array.\n pub unconstrained fn push(self, value: T)\n where\n T: Serialize,\n {\n let current_length = self.len();\n\n // The slot corresponding to the index `current_length` is the first slot immediately after the end of the\n // array, which is where we want to place the new value.\n capsules::store(\n self.contract_address,\n self.slot_at(current_length),\n value,\n self.scope,\n );\n\n // Then we simply update the length.\n let new_length = current_length + 1;\n capsules::store(\n self.contract_address,\n self.base_slot,\n new_length,\n self.scope,\n );\n }\n\n /// Retrieves the value stored in the array at `index`. Throws if the index is out of bounds.\n pub unconstrained fn get(self, index: u32) -> T\n where\n T: Deserialize,\n {\n assert(index < self.len(), \"Attempted to read past the length of a CapsuleArray\");\n\n capsules::load(self.contract_address, self.slot_at(index), self.scope).unwrap()\n }\n\n /// Deletes the value stored in the array at `index`. Throws if the index is out of bounds.\n pub unconstrained fn remove(self, index: u32) {\n let current_length = self.len();\n assert(index < current_length, \"Attempted to delete past the length of a CapsuleArray\");\n\n // In order to be able to remove elements at arbitrary indices, we need to shift the entire contents of the\n // array past the removed element one slot backward so that we don't end up with a gap and preserve the\n // contiguous slots. We can skip this when deleting the last element however.\n if index != current_length - 1 {\n // The source and destination regions overlap, but `copy` supports this.\n capsules::copy(\n self.contract_address,\n self.slot_at(index + 1),\n self.slot_at(index),\n current_length - index - 1,\n self.scope,\n );\n }\n\n // We can now delete the last element (which has either been copied to the slot immediately before it, or was\n // the element we meant to delete in the first place) and update the length.\n capsules::delete(\n self.contract_address,\n self.slot_at(current_length - 1),\n self.scope,\n );\n capsules::store(\n self.contract_address,\n self.base_slot,\n current_length - 1,\n self.scope,\n );\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. The order in which values\n /// are processed is arbitrary.\n ///\n /// ## Array Mutation\n ///\n /// It is safe to delete the current element (and only the current element) from inside the callback via `remove`:\n /// ```noir\n /// array.for_each(|index, value| {\n /// if some_condition(value) {\n /// array.remove(index); // safe only for this index\n /// }\n /// }\n /// ```\n ///\n /// If all elements in the array need to iterated over and then removed, then using `for_each` results in optimal\n /// efficiency.\n ///\n /// It is **not** safe to push new elements into the array from inside the callback.\n pub unconstrained fn for_each<Env>(self, f: unconstrained fn[Env](u32, T) -> ())\n where\n T: Deserialize,\n {\n // Iterating over all elements is simple, but we want to do it in such a way that a) deleting the current\n // element is safe to do, and b) deleting *all* elements is optimally efficient. This is because CapsuleArrays\n // are typically used to hold pending tasks, so iterating them while clearing completed tasks (sometimes\n // unconditionally, resulting in a full clear) is a very common access pattern.\n //\n // The way we achieve this is by iterating backwards: each element can always be deleted since it won't change\n // any preceding (lower) indices, and if every element is deleted then every element will (in turn) be the last\n // element. This results in an optimal full clear since `remove` will be able to skip the `capsules::copy` call\n // to shift any elements past the deleted one (because there will be none).\n let mut i = self.len();\n while i > 0 {\n i -= 1;\n f(i, self.get(i));\n }\n }\n\n unconstrained fn slot_at(self, index: u32) -> Field {\n // Elements are stored immediately after the base slot, so we add 1 to it to compute the slot for the first\n // element.\n self.base_slot + 1 + index as Field\n }\n}\n\nmod test {\n use crate::test::helpers::test_environment::TestEnvironment;\n use super::CapsuleArray;\n\n global SLOT: Field = 1230;\n\n #[test]\n unconstrained fn empty_array() {\n let mut env = TestEnvironment::new();\n let scope = env.create_light_account();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let array: CapsuleArray<Field> = CapsuleArray::at(contract_address, SLOT, scope);\n assert_eq(array.len(), 0);\n });\n }\n\n #[test(should_fail_with = \"Attempted to read past the length of a CapsuleArray\")]\n unconstrained fn empty_array_read() {\n let mut env = TestEnvironment::new();\n let scope = env.create_light_account();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let array = CapsuleArray::at(contract_address, SLOT, scope);\n let _: Field = array.get(0);\n });\n }\n\n #[test]\n unconstrained fn array_push() {\n let mut env = TestEnvironment::new();\n let scope = env.create_light_account();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let array = CapsuleArray::at(contract_address, SLOT, scope);\n array.push(5);\n\n assert_eq(array.len(), 1);\n assert_eq(array.get(0), 5);\n });\n }\n\n #[test(should_fail_with = \"Attempted to read past the length of a CapsuleArray\")]\n unconstrained fn read_past_len() {\n let mut env = TestEnvironment::new();\n let scope = env.create_light_account();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let array = CapsuleArray::at(contract_address, SLOT, scope);\n array.push(5);\n\n let _ = array.get(1);\n });\n }\n\n #[test]\n unconstrained fn array_remove_last() {\n let mut env = TestEnvironment::new();\n let scope = env.create_light_account();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let array = CapsuleArray::at(contract_address, SLOT, scope);\n\n array.push(5);\n array.remove(0);\n\n assert_eq(array.len(), 0);\n });\n }\n\n #[test]\n unconstrained fn array_remove_some() {\n let mut env = TestEnvironment::new();\n let scope = env.create_light_account();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let array = CapsuleArray::at(contract_address, SLOT, scope);\n\n array.push(7);\n array.push(8);\n array.push(9);\n\n assert_eq(array.len(), 3);\n assert_eq(array.get(0), 7);\n assert_eq(array.get(1), 8);\n assert_eq(array.get(2), 9);\n\n array.remove(1);\n\n assert_eq(array.len(), 2);\n assert_eq(array.get(0), 7);\n assert_eq(array.get(1), 9);\n });\n }\n\n #[test]\n unconstrained fn array_remove_all() {\n let mut env = TestEnvironment::new();\n let scope = env.create_light_account();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let array = CapsuleArray::at(contract_address, SLOT, scope);\n\n array.push(7);\n array.push(8);\n array.push(9);\n\n array.remove(1);\n array.remove(1);\n array.remove(0);\n\n assert_eq(array.len(), 0);\n });\n }\n\n #[test]\n unconstrained fn for_each_called_with_all_elements() {\n let mut env = TestEnvironment::new();\n let scope = env.create_light_account();\n env.private_context(|context| {\n let contract_address = context.this_address();\n let array = CapsuleArray::at(contract_address, SLOT, scope);\n\n array.push(4);\n array.push(5);\n array.push(6);\n\n // We store all values that we were called with and check that all (value, index) tuples are present. Note\n // that we do not care about the order in which each tuple was passed to the closure.\n let called_with = &mut BoundedVec::<(u32, Field), 3>::new();\n array.for_each(|index, value| { called_with.push((index, value)); });\n\n assert_eq(called_with.len(), 3);\n assert(called_with.any(|(index, value)| (index == 0) & (value == 4)));\n assert(called_with.any(|(index, value)| (index == 1) & (value == 5)));\n assert(called_with.any(|(index, value)| (index == 2) & (value == 6)));\n });\n }\n\n #[test]\n unconstrained fn for_each_remove_some() {\n let mut env = TestEnvironment::new();\n let scope = env.create_light_account();\n env.private_context(|context| {\n let contract_address = context.this_address();\n let array = CapsuleArray::at(contract_address, SLOT, scope);\n\n array.push(4);\n array.push(5);\n array.push(6);\n\n array.for_each(|index, _| {\n if index == 1 {\n array.remove(index);\n }\n });\n\n assert_eq(array.len(), 2);\n assert_eq(array.get(0), 4);\n assert_eq(array.get(1), 6);\n });\n }\n\n #[test]\n unconstrained fn for_each_remove_all() {\n let mut env = TestEnvironment::new();\n let scope = env.create_light_account();\n env.private_context(|context| {\n let contract_address = context.this_address();\n let array = CapsuleArray::at(contract_address, SLOT, scope);\n\n array.push(4);\n array.push(5);\n array.push(6);\n\n array.for_each(|index, _| { array.remove(index); });\n\n assert_eq(array.len(), 0);\n });\n }\n\n #[test]\n unconstrained fn for_each_remove_all_no_copy() {\n let mut env = TestEnvironment::new();\n let scope = env.create_light_account();\n env.private_context(|context| {\n let contract_address = context.this_address();\n let array = CapsuleArray::at(contract_address, SLOT, scope);\n\n array.push(4);\n array.push(5);\n array.push(6);\n\n // We test that the aztec_utl_copyCapsule was never called, which is the expensive operation we want to\n // avoid.\n let mock = std::test::OracleMock::mock(\"aztec_utl_copyCapsule\");\n\n array.for_each(|index, _| { array.remove(index); });\n\n assert_eq(mock.times_called(), 0);\n });\n }\n\n #[test]\n unconstrained fn different_scopes_are_isolated() {\n let mut env = TestEnvironment::new();\n let scope_a = env.create_light_account();\n let scope_b = env.create_light_account();\n env.private_context(|context| {\n let contract_address = context.this_address();\n\n let array_a = CapsuleArray::at(contract_address, SLOT, scope_a);\n let array_b = CapsuleArray::at(contract_address, SLOT, scope_b);\n\n array_a.push(10);\n array_a.push(20);\n array_b.push(99);\n\n assert_eq(array_a.len(), 2);\n assert_eq(array_a.get(0), 10);\n assert_eq(array_a.get(1), 20);\n\n assert_eq(array_b.len(), 1);\n assert_eq(array_b.get(0), 99);\n });\n }\n}\n"
|
|
2744
2748
|
},
|
|
2745
2749
|
"6": {
|
|
@@ -3251,7 +3255,7 @@
|
|
|
3251
3255
|
"start": 34193
|
|
3252
3256
|
}
|
|
3253
3257
|
],
|
|
3254
|
-
"path": "/home/
|
|
3258
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/context/public_context.nr",
|
|
3255
3259
|
"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 pub args_hash: Option<Field>,\n pub compute_args_hash: fn() -> Field,\n}\n\nimpl Eq for PublicContext {\n fn eq(self, other: Self) -> bool {\n (self.args_hash == other.args_hash)\n // Can't compare the function compute_args_hash\n }\n}\n\nimpl PublicContext {\n /// 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"
|
|
3256
3260
|
},
|
|
3257
3261
|
"70": {
|
|
@@ -3297,7 +3301,7 @@
|
|
|
3297
3301
|
"start": 1596
|
|
3298
3302
|
}
|
|
3299
3303
|
],
|
|
3300
|
-
"path": "/home/
|
|
3304
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/context/utility_context.nr",
|
|
3301
3305
|
"source": "use crate::oracle::{execution::get_utility_context, storage::storage_read};\nuse crate::protocol::{abis::block_header::BlockHeader, address::AztecAddress, traits::Packable};\n\n// If you'll modify this struct don't forget to update utility_context.ts as well.\npub struct UtilityContext {\n block_header: BlockHeader,\n contract_address: AztecAddress,\n}\n\nimpl UtilityContext {\n pub unconstrained fn new() -> Self {\n get_utility_context()\n }\n\n pub unconstrained fn at(contract_address: AztecAddress) -> Self {\n // We get a context with default contract address, and then we construct the final context with the provided\n // contract address.\n let default_context = get_utility_context();\n\n Self { block_header: default_context.block_header, contract_address }\n }\n\n pub fn block_header(self) -> BlockHeader {\n self.block_header\n }\n\n pub fn block_number(self) -> u32 {\n self.block_header.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 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"
|
|
3302
3306
|
},
|
|
3303
3307
|
"72": {
|
|
@@ -3323,7 +3327,7 @@
|
|
|
3323
3327
|
"start": 6480
|
|
3324
3328
|
}
|
|
3325
3329
|
],
|
|
3326
|
-
"path": "/home/
|
|
3330
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/contract_self/contract_self_public.nr",
|
|
3327
3331
|
"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"
|
|
3328
3332
|
},
|
|
3329
3333
|
"75": {
|
|
@@ -3332,125 +3336,133 @@
|
|
|
3332
3336
|
"name": "EphemeralArray<T>::at",
|
|
3333
3337
|
"start": 1367
|
|
3334
3338
|
},
|
|
3339
|
+
{
|
|
3340
|
+
"name": "EphemeralArray<T>::empty_at",
|
|
3341
|
+
"start": 1545
|
|
3342
|
+
},
|
|
3335
3343
|
{
|
|
3336
3344
|
"name": "EphemeralArray<T>::len",
|
|
3337
|
-
"start":
|
|
3345
|
+
"start": 1687
|
|
3338
3346
|
},
|
|
3339
3347
|
{
|
|
3340
3348
|
"name": "EphemeralArray<T>::push",
|
|
3341
|
-
"start":
|
|
3349
|
+
"start": 1867
|
|
3342
3350
|
},
|
|
3343
3351
|
{
|
|
3344
3352
|
"name": "EphemeralArray<T>::pop",
|
|
3345
|
-
"start":
|
|
3353
|
+
"start": 2137
|
|
3346
3354
|
},
|
|
3347
3355
|
{
|
|
3348
3356
|
"name": "EphemeralArray<T>::get",
|
|
3349
|
-
"start":
|
|
3357
|
+
"start": 2425
|
|
3350
3358
|
},
|
|
3351
3359
|
{
|
|
3352
3360
|
"name": "EphemeralArray<T>::set",
|
|
3353
|
-
"start":
|
|
3361
|
+
"start": 2724
|
|
3354
3362
|
},
|
|
3355
3363
|
{
|
|
3356
3364
|
"name": "EphemeralArray<T>::remove",
|
|
3357
|
-
"start":
|
|
3365
|
+
"start": 2992
|
|
3358
3366
|
},
|
|
3359
3367
|
{
|
|
3360
3368
|
"name": "EphemeralArray<T>::clear",
|
|
3361
|
-
"start":
|
|
3369
|
+
"start": 3273
|
|
3362
3370
|
},
|
|
3363
3371
|
{
|
|
3364
3372
|
"name": "EphemeralArray<T>::for_each",
|
|
3365
|
-
"start":
|
|
3373
|
+
"start": 3844
|
|
3366
3374
|
},
|
|
3367
3375
|
{
|
|
3368
3376
|
"name": "<impl Serialize for EphemeralArray<T>>::serialize",
|
|
3369
|
-
"start":
|
|
3377
|
+
"start": 4235
|
|
3370
3378
|
},
|
|
3371
3379
|
{
|
|
3372
3380
|
"name": "<impl Serialize for EphemeralArray<T>>::stream_serialize",
|
|
3373
|
-
"start":
|
|
3381
|
+
"start": 4330
|
|
3374
3382
|
},
|
|
3375
3383
|
{
|
|
3376
3384
|
"name": "<impl Deserialize for EphemeralArray<T>>::deserialize",
|
|
3377
|
-
"start":
|
|
3385
|
+
"start": 4648
|
|
3378
3386
|
},
|
|
3379
3387
|
{
|
|
3380
3388
|
"name": "<impl Deserialize for EphemeralArray<T>>::stream_deserialize",
|
|
3381
|
-
"start":
|
|
3389
|
+
"start": 4760
|
|
3382
3390
|
},
|
|
3383
3391
|
{
|
|
3384
3392
|
"name": "test::empty_array",
|
|
3385
|
-
"start":
|
|
3393
|
+
"start": 5072
|
|
3386
3394
|
},
|
|
3387
3395
|
{
|
|
3388
3396
|
"name": "test::empty_array_read",
|
|
3389
|
-
"start":
|
|
3397
|
+
"start": 5369
|
|
3390
3398
|
},
|
|
3391
3399
|
{
|
|
3392
3400
|
"name": "test::empty_array_pop",
|
|
3393
|
-
"start":
|
|
3401
|
+
"start": 5639
|
|
3394
3402
|
},
|
|
3395
3403
|
{
|
|
3396
3404
|
"name": "test::array_push",
|
|
3397
|
-
"start":
|
|
3405
|
+
"start": 5872
|
|
3398
3406
|
},
|
|
3399
3407
|
{
|
|
3400
3408
|
"name": "test::read_past_len",
|
|
3401
|
-
"start":
|
|
3409
|
+
"start": 6211
|
|
3402
3410
|
},
|
|
3403
3411
|
{
|
|
3404
3412
|
"name": "test::array_pop",
|
|
3405
|
-
"start":
|
|
3413
|
+
"start": 6465
|
|
3406
3414
|
},
|
|
3407
3415
|
{
|
|
3408
3416
|
"name": "test::array_set",
|
|
3409
|
-
"start":
|
|
3417
|
+
"start": 6872
|
|
3410
3418
|
},
|
|
3411
3419
|
{
|
|
3412
3420
|
"name": "test::array_remove_last",
|
|
3413
|
-
"start":
|
|
3421
|
+
"start": 7170
|
|
3414
3422
|
},
|
|
3415
3423
|
{
|
|
3416
3424
|
"name": "test::array_remove_some",
|
|
3417
|
-
"start":
|
|
3425
|
+
"start": 7465
|
|
3418
3426
|
},
|
|
3419
3427
|
{
|
|
3420
3428
|
"name": "test::array_remove_all",
|
|
3421
|
-
"start":
|
|
3429
|
+
"start": 7936
|
|
3422
3430
|
},
|
|
3423
3431
|
{
|
|
3424
3432
|
"name": "test::for_each_called_with_all_elements",
|
|
3425
|
-
"start":
|
|
3433
|
+
"start": 8362
|
|
3426
3434
|
},
|
|
3427
3435
|
{
|
|
3428
3436
|
"name": "test::for_each_remove_some",
|
|
3429
|
-
"start":
|
|
3437
|
+
"start": 9098
|
|
3430
3438
|
},
|
|
3431
3439
|
{
|
|
3432
3440
|
"name": "test::for_each_remove_all",
|
|
3433
|
-
"start":
|
|
3441
|
+
"start": 9650
|
|
3434
3442
|
},
|
|
3435
3443
|
{
|
|
3436
3444
|
"name": "test::different_slots_are_isolated",
|
|
3437
|
-
"start":
|
|
3445
|
+
"start": 10049
|
|
3438
3446
|
},
|
|
3439
3447
|
{
|
|
3440
3448
|
"name": "test::works_with_multi_field_type",
|
|
3441
|
-
"start":
|
|
3449
|
+
"start": 10623
|
|
3450
|
+
},
|
|
3451
|
+
{
|
|
3452
|
+
"name": "test::empty_at_wipes_previous_data",
|
|
3453
|
+
"start": 11247
|
|
3442
3454
|
},
|
|
3443
3455
|
{
|
|
3444
3456
|
"name": "test::clear_returns_self",
|
|
3445
|
-
"start":
|
|
3457
|
+
"start": 11656
|
|
3446
3458
|
},
|
|
3447
3459
|
{
|
|
3448
3460
|
"name": "test::clear_wipes_previous_data",
|
|
3449
|
-
"start":
|
|
3461
|
+
"start": 12043
|
|
3450
3462
|
}
|
|
3451
3463
|
],
|
|
3452
|
-
"path": "/home/
|
|
3453
|
-
"source": "use crate::oracle::ephemeral;\nuse crate::protocol::traits::{Deserialize, Serialize};\nuse crate::protocol::utils::{reader::Reader, writer::Writer};\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.\npub struct EphemeralArray<T> {\n pub slot: Field,\n}\n\nimpl<T> EphemeralArray<T> {\n /// Returns a handle to an ephemeral array at the given slot, which may already contain data (e.g. populated\n /// by an oracle).\n pub unconstrained fn at(slot: Field) -> Self {\n Self { slot }\n }\n\n /// Returns the number of elements stored in the array.\n pub unconstrained fn len(self) -> u32 {\n ephemeral::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 _ = ephemeral::push_oracle(self.slot, serialized);\n }\n\n /// Removes and returns the last element. Panics if the array is empty.\n pub unconstrained fn pop(self) -> T\n where\n T: Deserialize,\n {\n let serialized = ephemeral::pop_oracle(self.slot);\n Deserialize::deserialize(serialized)\n }\n\n /// Retrieves the value stored at `index`. Panics 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 = ephemeral::get_oracle(self.slot, index);\n Deserialize::deserialize(serialized)\n }\n\n /// Overwrites the value stored at `index`. Panics 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 ephemeral::set_oracle(self.slot, index, serialized);\n }\n\n /// Removes the element at `index`, shifting subsequent elements backward. Panics if out of bounds.\n pub unconstrained fn remove(self, index: u32) {\n ephemeral::remove_oracle(self.slot, index);\n }\n\n /// Removes all elements from the array and returns self for chaining (e.g. `EphemeralArray::at(slot).clear()`\n /// to get a guaranteed-empty array at a given slot).\n pub unconstrained fn clear(self) -> Self {\n ephemeral::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. Iteration proceeds\n /// backwards so that it is safe to remove the current element (and only the current element) inside the\n /// callback.\n ///\n /// It is **not** safe to push new elements from inside the callback.\n pub unconstrained fn for_each<Env>(self, f: unconstrained fn[Env](u32, T) -> ())\n where\n T: Deserialize,\n {\n let mut i = self.len();\n while i > 0 {\n i -= 1;\n f(i, self.get(i));\n }\n }\n}\n\n/// Serializes an `EphemeralArray` as its slot identifier, allowing oracle function signatures to use\n/// `EphemeralArray<T>` instead of opaque `Field` slots.\nimpl<T> Serialize for EphemeralArray<T> {\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.\n/// This is the inverse of [`Serialize`].\nimpl<T> Deserialize for EphemeralArray<T> {\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\nmod test {\n use crate::test::helpers::test_environment::TestEnvironment;\n use crate::test::mocks::MockStruct;\n use super::EphemeralArray;\n\n global SLOT: Field = 1230;\n global OTHER_SLOT: Field = 5670;\n\n #[test]\n unconstrained fn empty_array() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array: EphemeralArray<Field> = EphemeralArray::at(SLOT);\n assert_eq(array.len(), 0);\n });\n }\n\n #[test(should_fail_with = \"out of bounds\")]\n unconstrained fn empty_array_read() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n let _: Field = array.get(0);\n });\n }\n\n #[test(should_fail_with = \"is empty\")]\n unconstrained fn empty_array_pop() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n let _: Field = array.pop();\n });\n }\n\n #[test]\n unconstrained fn array_push() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n array.push(5);\n\n assert_eq(array.len(), 1);\n assert_eq(array.get(0), 5);\n });\n }\n\n #[test(should_fail_with = \"out of bounds\")]\n unconstrained fn read_past_len() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n array.push(5);\n\n let _ = array.get(1);\n });\n }\n\n #[test]\n unconstrained fn array_pop() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n array.push(5);\n array.push(10);\n\n let popped: Field = array.pop();\n assert_eq(popped, 10);\n assert_eq(array.len(), 1);\n assert_eq(array.get(0), 5);\n });\n }\n\n #[test]\n unconstrained fn array_set() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n array.push(5);\n array.set(0, 99);\n assert_eq(array.get(0), 99);\n });\n }\n\n #[test]\n unconstrained fn array_remove_last() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n array.push(5);\n array.remove(0);\n assert_eq(array.len(), 0);\n });\n }\n\n #[test]\n unconstrained fn array_remove_some() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n\n array.push(7);\n array.push(8);\n array.push(9);\n\n assert_eq(array.len(), 3);\n\n array.remove(1);\n\n assert_eq(array.len(), 2);\n assert_eq(array.get(0), 7);\n assert_eq(array.get(1), 9);\n });\n }\n\n #[test]\n unconstrained fn array_remove_all() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n\n array.push(7);\n array.push(8);\n array.push(9);\n\n array.remove(1);\n array.remove(1);\n array.remove(0);\n\n assert_eq(array.len(), 0);\n });\n }\n\n #[test]\n unconstrained fn for_each_called_with_all_elements() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n\n array.push(4);\n array.push(5);\n array.push(6);\n\n let called_with = &mut BoundedVec::<(u32, Field), 3>::new();\n array.for_each(|index, value| { called_with.push((index, value)); });\n\n assert_eq(called_with.len(), 3);\n assert(called_with.any(|(index, value)| (index == 0) & (value == 4)));\n assert(called_with.any(|(index, value)| (index == 1) & (value == 5)));\n assert(called_with.any(|(index, value)| (index == 2) & (value == 6)));\n });\n }\n\n #[test]\n unconstrained fn for_each_remove_some() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n\n array.push(4);\n array.push(5);\n array.push(6);\n\n array.for_each(|index, _| {\n if index == 1 {\n array.remove(index);\n }\n });\n\n assert_eq(array.len(), 2);\n assert_eq(array.get(0), 4);\n assert_eq(array.get(1), 6);\n });\n }\n\n #[test]\n unconstrained fn for_each_remove_all() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n\n array.push(4);\n array.push(5);\n array.push(6);\n\n array.for_each(|index, _| { array.remove(index); });\n\n assert_eq(array.len(), 0);\n });\n }\n\n #[test]\n unconstrained fn different_slots_are_isolated() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array_a = EphemeralArray::at(SLOT);\n let array_b = EphemeralArray::at(OTHER_SLOT);\n\n array_a.push(10);\n array_a.push(20);\n array_b.push(99);\n\n assert_eq(array_a.len(), 2);\n assert_eq(array_a.get(0), 10);\n assert_eq(array_a.get(1), 20);\n\n assert_eq(array_b.len(), 1);\n assert_eq(array_b.get(0), 99);\n });\n }\n\n #[test]\n unconstrained fn works_with_multi_field_type() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array: EphemeralArray<MockStruct> = EphemeralArray::at(SLOT);\n\n let a = MockStruct::new(5, 6);\n let b = MockStruct::new(7, 8);\n array.push(a);\n array.push(b);\n\n assert_eq(array.len(), 2);\n assert_eq(array.get(0), a);\n assert_eq(array.get(1), b);\n\n let popped: MockStruct = array.pop();\n assert_eq(popped, b);\n assert_eq(array.len(), 1);\n });\n }\n\n #[test]\n unconstrained fn clear_returns_self() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array: EphemeralArray<Field> = EphemeralArray::at(SLOT).clear();\n assert_eq(array.len(), 0);\n\n array.push(42);\n assert_eq(array.len(), 1);\n assert_eq(array.get(0), 42);\n });\n }\n\n #[test]\n unconstrained fn clear_wipes_previous_data() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array: EphemeralArray<Field> = EphemeralArray::at(SLOT);\n array.push(1);\n array.push(2);\n array.push(3);\n assert_eq(array.len(), 3);\n\n // Clear the same slot, previous data should be gone.\n let fresh: EphemeralArray<Field> = EphemeralArray::at(SLOT).clear();\n assert_eq(fresh.len(), 0);\n fresh.push(4);\n assert_eq(fresh.get(0), 4);\n });\n }\n}\n"
|
|
3464
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/ephemeral/mod.nr",
|
|
3465
|
+
"source": "use crate::oracle::ephemeral;\nuse crate::protocol::traits::{Deserialize, Serialize};\nuse crate::protocol::utils::{reader::Reader, writer::Writer};\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.\npub struct EphemeralArray<T> {\n pub slot: Field,\n}\n\nimpl<T> EphemeralArray<T> {\n /// Returns a handle to an ephemeral array at the given slot, which may already contain data (e.g. populated\n /// by an oracle).\n pub unconstrained fn at(slot: Field) -> Self {\n Self { slot }\n }\n\n /// Returns an empty ephemeral array at the given slot, clearing any pre-existing data.\n pub unconstrained fn empty_at(slot: Field) -> Self {\n Self::at(slot).clear()\n }\n\n /// Returns the number of elements stored in the array.\n pub unconstrained fn len(self) -> u32 {\n ephemeral::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 _ = ephemeral::push_oracle(self.slot, serialized);\n }\n\n /// Removes and returns the last element. Panics if the array is empty.\n pub unconstrained fn pop(self) -> T\n where\n T: Deserialize,\n {\n let serialized = ephemeral::pop_oracle(self.slot);\n Deserialize::deserialize(serialized)\n }\n\n /// Retrieves the value stored at `index`. Panics 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 = ephemeral::get_oracle(self.slot, index);\n Deserialize::deserialize(serialized)\n }\n\n /// Overwrites the value stored at `index`. Panics 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 ephemeral::set_oracle(self.slot, index, serialized);\n }\n\n /// Removes the element at `index`, shifting subsequent elements backward. Panics if out of bounds.\n pub unconstrained fn remove(self, index: u32) {\n ephemeral::remove_oracle(self.slot, index);\n }\n\n /// Removes all elements from the array and returns self for chaining.\n ///\n /// Prefer [`EphemeralArray::empty_at`] when the intent is to start with a fresh array.\n pub unconstrained fn clear(self) -> Self {\n ephemeral::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. Iteration proceeds\n /// backwards so that it is safe to remove the current element (and only the current element) inside the\n /// callback.\n ///\n /// It is **not** safe to push new elements from inside the callback.\n pub unconstrained fn for_each<Env>(self, f: unconstrained fn[Env](u32, T) -> ())\n where\n T: Deserialize,\n {\n let mut i = self.len();\n while i > 0 {\n i -= 1;\n f(i, self.get(i));\n }\n }\n}\n\n/// Serializes an `EphemeralArray` as its slot identifier, allowing oracle function signatures to use\n/// `EphemeralArray<T>` instead of opaque `Field` slots.\nimpl<T> Serialize for EphemeralArray<T> {\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.\n/// This is the inverse of [`Serialize`].\nimpl<T> Deserialize for EphemeralArray<T> {\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\nmod test {\n use crate::test::helpers::test_environment::TestEnvironment;\n use crate::test::mocks::MockStruct;\n use super::EphemeralArray;\n\n global SLOT: Field = 1230;\n global OTHER_SLOT: Field = 5670;\n\n #[test]\n unconstrained fn empty_array() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array: EphemeralArray<Field> = EphemeralArray::at(SLOT);\n assert_eq(array.len(), 0);\n });\n }\n\n #[test(should_fail_with = \"out of bounds\")]\n unconstrained fn empty_array_read() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n let _: Field = array.get(0);\n });\n }\n\n #[test(should_fail_with = \"is empty\")]\n unconstrained fn empty_array_pop() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n let _: Field = array.pop();\n });\n }\n\n #[test]\n unconstrained fn array_push() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n array.push(5);\n\n assert_eq(array.len(), 1);\n assert_eq(array.get(0), 5);\n });\n }\n\n #[test(should_fail_with = \"out of bounds\")]\n unconstrained fn read_past_len() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n array.push(5);\n\n let _ = array.get(1);\n });\n }\n\n #[test]\n unconstrained fn array_pop() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n array.push(5);\n array.push(10);\n\n let popped: Field = array.pop();\n assert_eq(popped, 10);\n assert_eq(array.len(), 1);\n assert_eq(array.get(0), 5);\n });\n }\n\n #[test]\n unconstrained fn array_set() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n array.push(5);\n array.set(0, 99);\n assert_eq(array.get(0), 99);\n });\n }\n\n #[test]\n unconstrained fn array_remove_last() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n array.push(5);\n array.remove(0);\n assert_eq(array.len(), 0);\n });\n }\n\n #[test]\n unconstrained fn array_remove_some() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n\n array.push(7);\n array.push(8);\n array.push(9);\n\n assert_eq(array.len(), 3);\n\n array.remove(1);\n\n assert_eq(array.len(), 2);\n assert_eq(array.get(0), 7);\n assert_eq(array.get(1), 9);\n });\n }\n\n #[test]\n unconstrained fn array_remove_all() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n\n array.push(7);\n array.push(8);\n array.push(9);\n\n array.remove(1);\n array.remove(1);\n array.remove(0);\n\n assert_eq(array.len(), 0);\n });\n }\n\n #[test]\n unconstrained fn for_each_called_with_all_elements() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n\n array.push(4);\n array.push(5);\n array.push(6);\n\n let called_with = &mut BoundedVec::<(u32, Field), 3>::new();\n array.for_each(|index, value| { called_with.push((index, value)); });\n\n assert_eq(called_with.len(), 3);\n assert(called_with.any(|(index, value)| (index == 0) & (value == 4)));\n assert(called_with.any(|(index, value)| (index == 1) & (value == 5)));\n assert(called_with.any(|(index, value)| (index == 2) & (value == 6)));\n });\n }\n\n #[test]\n unconstrained fn for_each_remove_some() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n\n array.push(4);\n array.push(5);\n array.push(6);\n\n array.for_each(|index, _| {\n if index == 1 {\n array.remove(index);\n }\n });\n\n assert_eq(array.len(), 2);\n assert_eq(array.get(0), 4);\n assert_eq(array.get(1), 6);\n });\n }\n\n #[test]\n unconstrained fn for_each_remove_all() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array = EphemeralArray::at(SLOT);\n\n array.push(4);\n array.push(5);\n array.push(6);\n\n array.for_each(|index, _| { array.remove(index); });\n\n assert_eq(array.len(), 0);\n });\n }\n\n #[test]\n unconstrained fn different_slots_are_isolated() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array_a = EphemeralArray::at(SLOT);\n let array_b = EphemeralArray::at(OTHER_SLOT);\n\n array_a.push(10);\n array_a.push(20);\n array_b.push(99);\n\n assert_eq(array_a.len(), 2);\n assert_eq(array_a.get(0), 10);\n assert_eq(array_a.get(1), 20);\n\n assert_eq(array_b.len(), 1);\n assert_eq(array_b.get(0), 99);\n });\n }\n\n #[test]\n unconstrained fn works_with_multi_field_type() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array: EphemeralArray<MockStruct> = EphemeralArray::at(SLOT);\n\n let a = MockStruct::new(5, 6);\n let b = MockStruct::new(7, 8);\n array.push(a);\n array.push(b);\n\n assert_eq(array.len(), 2);\n assert_eq(array.get(0), a);\n assert_eq(array.get(1), b);\n\n let popped: MockStruct = array.pop();\n assert_eq(popped, b);\n assert_eq(array.len(), 1);\n });\n }\n\n #[test]\n unconstrained fn empty_at_wipes_previous_data() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array: EphemeralArray<Field> = EphemeralArray::at(SLOT);\n array.push(1);\n assert_eq(array.len(), 1);\n\n let fresh: EphemeralArray<Field> = EphemeralArray::empty_at(SLOT);\n assert_eq(fresh.len(), 0);\n });\n }\n\n #[test]\n unconstrained fn clear_returns_self() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array: EphemeralArray<Field> = EphemeralArray::at(SLOT).clear();\n assert_eq(array.len(), 0);\n\n array.push(42);\n assert_eq(array.len(), 1);\n assert_eq(array.get(0), 42);\n });\n }\n\n #[test]\n unconstrained fn clear_wipes_previous_data() {\n let env = TestEnvironment::new();\n env.utility_context(|_| {\n let array: EphemeralArray<Field> = EphemeralArray::at(SLOT);\n array.push(1);\n array.push(2);\n array.push(3);\n assert_eq(array.len(), 3);\n\n // Clear the same slot, previous data should be gone.\n let fresh: EphemeralArray<Field> = EphemeralArray::at(SLOT).clear();\n assert_eq(fresh.len(), 0);\n fresh.push(4);\n assert_eq(fresh.get(0), 4);\n });\n }\n}\n"
|
|
3454
3466
|
},
|
|
3455
3467
|
"77": {
|
|
3456
3468
|
"function_locations": [
|
|
@@ -3471,7 +3483,7 @@
|
|
|
3471
3483
|
"start": 2814
|
|
3472
3484
|
}
|
|
3473
3485
|
],
|
|
3474
|
-
"path": "/home/
|
|
3486
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/event/event_interface.nr",
|
|
3475
3487
|
"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"
|
|
3476
3488
|
},
|
|
3477
3489
|
"79": {
|
|
@@ -3501,7 +3513,7 @@
|
|
|
3501
3513
|
"start": 985
|
|
3502
3514
|
}
|
|
3503
3515
|
],
|
|
3504
|
-
"path": "/home/
|
|
3516
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/event/event_selector.nr",
|
|
3505
3517
|
"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"
|
|
3506
3518
|
},
|
|
3507
3519
|
"92": {
|
|
@@ -3539,7 +3551,7 @@
|
|
|
3539
3551
|
"start": 5055
|
|
3540
3552
|
}
|
|
3541
3553
|
],
|
|
3542
|
-
"path": "/home/
|
|
3554
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/keys/ecdh_shared_secret.nr",
|
|
3543
3555
|
"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"
|
|
3544
3556
|
},
|
|
3545
3557
|
"97": {
|
|
@@ -3609,7 +3621,7 @@
|
|
|
3609
3621
|
"start": 4151
|
|
3610
3622
|
}
|
|
3611
3623
|
],
|
|
3612
|
-
"path": "/home/
|
|
3624
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/logging.nr",
|
|
3613
3625
|
"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"
|
|
3614
3626
|
},
|
|
3615
3627
|
"99": {
|
|
@@ -3627,7 +3639,7 @@
|
|
|
3627
3639
|
"start": 7724
|
|
3628
3640
|
}
|
|
3629
3641
|
],
|
|
3630
|
-
"path": "/home/
|
|
3642
|
+
"path": "/home/nico-chamo/repos/aztec-packages-oracle-hash-calculation/noir-projects/aztec-nr/aztec/src/macros/aztec/compute_note_hash_and_nullifier.nr",
|
|
3631
3643
|
"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"
|
|
3632
3644
|
}
|
|
3633
3645
|
},
|
|
@@ -3676,7 +3688,7 @@
|
|
|
3676
3688
|
"abi_public",
|
|
3677
3689
|
"abi_view"
|
|
3678
3690
|
],
|
|
3679
|
-
"debug_symbols": "rZfRbuIwEEX/Jc88eMbjsc2vrKqK0rRCQoAorLSq+Pcdp74hVHJUZfeF3FzHxx57PCGf3Wv/cn1/3h3ejh/d+tdn93Le7fe79+f9cbu57I4Hcz87V36I7BJWdg3dOtuV7Z64CDPIm/AOIlUh3oQWUZxoIhQnFWEOOxNqDhewFqc8nNREeTjTl2BXmqwXc2my0VmkW3tXRK5CrcmTiSQQuYoMJ1fHO4GAQ3AIDsNhOB6OhyNwBE4J8EukKhSOwolwYqwiEUSNwmcHESDqEILJi6tAIQ9RgcIMUYHiCaICRRwEgIhCEIUgClEAFUNEACOGSAAmDIEtEGyB5AoMzkNUYCCGqMDABFGAllGh5NiXgCNwSo4NYpj8IGIVw+QHAWeYfBFDtgwiV5Hh5Oqo8xC1uxJBaBUMh+Fgqoqp6jAxMRHLfCznoy8PW87HYQv0dlt1OHrPl3Pfl5M3OYt2Qk+bc3+4dOvDdb9fdb83++vw0Mdpcxiul83ZWu1A9IdXuxrwbbfvi7qt7r1du2twQWvvQBRHAJE+
|
|
3691
|
+
"debug_symbols": "rZfRbuIwEEX/Jc88eMbjsc2vrKqK0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
3694
|
},
|
|
@@ -3724,7 +3736,7 @@
|
|
|
3724
3736
|
"abi_public",
|
|
3725
3737
|
"abi_view"
|
|
3726
3738
|
],
|
|
3727
|
-
"debug_symbols": "rZfRbuIwEEX/
|
|
3739
|
+
"debug_symbols": "rZfRbuIwEEX/Jc88eOzxjN1fqaqK0rRCQoAorLSq+Pcdp74hVHLUze4LubmJjz3OzIR8dq/9y+X9ebt/O3x0D4+f3ctpu9tt3593h836vD3szf3sXPkhskNc2TF2D9mO3s7JF2EGBRPBQaQqOJiQIoqjJmJxUhHmeGdCzPEFLMUpNycxUW7O9CW8K5dslPflks3umbuH4IrIVYhdCmQiMUSuIsPJ1QmOIeAQHILj4Xg4AU6Aw3AYTgnwS6QqBI7AUTiqVSSCqFGE7CAiRJ2CsXh2FcgUICqQvYeoQA4EUYHMDgJARMGIghEFC4CCKRRAxRQJwIQp8AgYj4BzBUYXICowkoeowOgJogAto2LJsS8Bh+GUHBvEsPhBaBXD4gcBZ1h8EUO2DCJXkeHk6ogLEHW4EEFIFR6Oh4OlCpYqw8LYhJb1WM5rKDdbzuvwCOR6XXUovefzqe9L5U1q0Sr0uD71+3P3sL/sdqvu13p3GW76OK73w/G8PtlVK4h+/2pHA75td31R19VttGsPjS5KHR2JdAQQyR2C2gh24iuCyXMT4dsIShkxWBtwTURoI7xjQSSm0w0i6Y7BMwxNIORJHPrjOLxXAsHqvhmHtBHWZGJFBJY4ItTfEfQ/7ET6152YyyvJY16pb+8EzTAC3TLLdAqtQGgmO20cFmIvtbwslpTHWFiascwgkmolpHxbA+f7MGZTUxV5YTpTcy9iGyIZcei01HVBGNMq/RbGzPgc8CxyXDReMD85p819zDM5lRm9yt0S28f0Y4K9bEHwqUnwMympMaNLqNCkvL71GT/XJYjGLkGTrI73iJmGGZwLQLhp2/6GmElKKyjlSXFpK5TZ/eTxiahb9ESiG1tNCMsIitdPzLKIIB6lJXEZQR3WoH4hQZGZOmkyf0NIAVEkaa8hzL0BHdbgJznF9PMgAt48unAjRUCQ1C7x2S4z/hlxge66zJOdrTfb090n07WgTtv1y66vp2+X/WZy9fz7iCv45DqeDpv+9XLqC+n23WV/GR8p8oqEn8rXVzmVaKf6dC2z/wE=",
|
|
3728
3740
|
"is_unconstrained": true,
|
|
3729
3741
|
"name": "check_timestamp"
|
|
3730
3742
|
},
|
|
@@ -3862,7 +3874,7 @@
|
|
|
3862
3874
|
"custom_attributes": [
|
|
3863
3875
|
"abi_utility"
|
|
3864
3876
|
],
|
|
3865
|
-
"debug_symbols": "
|
|
3877
|
+
"debug_symbols": "tZnRTiM7DIbfpde9iJM4TngVtFoVKKtKVUFdONIR4t3XZvJnpqwSlZa9IR/Q+ep47CTTvq0etnevv37uDo9Pv1c3t2+ru+Nuv9/9+rl/ut+87J4O+te3lbMfyefVTVjrWFY3Scfg6kh19HUMdYx15DqmOkodcx2rL1ZfrL5YfayvEx2T/r3Y6OuofiIDBug7kIWYBJABpYI4AAE8IAAigAEwC8wCs8CcYc4wZ5gzzBnmDHOGOcOcYc4wF5gLzAXmAnOBuVSzOLuKDQjgAfaaZJAAAtB3986gVCAHIIAHBIC+u7fLiQEJIAAzi0Gp4B3AzMVAzcGC9wEQAQxIAAFkQKlgtTkBAWAOMAeYrUCDpcUqdAIBmNkitCL9AKvSCexyiznqiyMZ6IujCWOpwA6gYcRo4AEBEAEMSAABmNni4VIhOQABzGyBpQCIADNngwQQQAaUCtYgExDAzDZTa5AJIoABamZLgjXIBBmgZvYK1iATEMADAiACGGBmy6E1yAQZUCpYg7AlyhqErdisQSYIADNbNqxBJkgAAWRAmSBbE01g5mzgAQEQAbbSOYMEEIAtdmRQKlhbJW9AAA8IAFtCk4GZ7S2srSYQQAaUCtZWExDAzMUgANQsFoa1ldh7WVtNoGYJBhlQKlhbTUAADwgAM0cDBiSAAMzMBqWCtdUEBLCrbO7WXxNkgF1ls7D+moAAGk+2hFt/TRABDEgAAWSAmrOlxfprAgJ4gM1U3t/XK2ySP1+O263tkYtdU/fS581xe3hZ3R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|
"is_unconstrained": true,
|
|
3867
3879
|
"name": "offchain_receive"
|
|
3868
3880
|
},
|
|
@@ -3915,7 +3927,7 @@
|
|
|
3915
3927
|
"custom_attributes": [
|
|
3916
3928
|
"abi_public"
|
|
3917
3929
|
],
|
|
3918
|
-
"debug_symbols": "
|
|
3930
|
+
"debug_symbols": "tVlbbls5DN2Lv/OhBylK2UpRFGnqFgYMJ3CTAQZF9j7klQ5tB9BFeqf9KY/o6vAhUqKdX7tv+6+vP74cTt+ffu7uP/3afT0fjsfDjy/Hp8eHl8PTSbW/dsH+iRR39/FuFzkMybv7pLKEIcdaxlpoyNZlHes61i0PWReZQhpSuiTlIZM0ZOuSx5rHuoy16H4xKV1W9beaLF22sW66juFul0MEUM+jhpRjADCNkuRkwZgmWXRqJmfTsIE6AFkg1YBpmgJWTTZmrgOUBFAGsDR1QABtgApNxfZm29UNCgGgZ5tCzyZFGtK2ZAUpA8gAOQFAYw4bGUuXwksqSXpqqdKQY93GuvU1h55qjmnInmpOccixzrrObKAMYIebiwEeYCkrI1nqSr3hpbDMzFJZtksygEWpmeaqGgoGVEO2y8qqA+mg2Dl3wABtAMtaB9CkDGDbNaMl8wDUC7sQDdlTX3hkuvDIfSkJYGS6CDTmcLZdy9kaaNC0oZGQAaCJ0ERoUgKQATI0GRqChsoAluQOGKANYG3UAUwIjAoIKwgrCK2pOhiENQQAAhgmKqKoiKIiioooao4Aw0QlEBJMEAgZJhiEBSYKCAUmBIQVJioIG0w0ELZhouEsGs6ixQQwTLQUAYaJlgMAA4CQCACEDBMMwgITBYQCEwLCChNLk5KBNkAbmhjsTh1IgGJ0VICS6+ye68jut47sghvIdew6dubiLMVZ7JobyHXVddU9hfMxNGdusBbtGiZekLJwMGQ5ZnuIonnF9pRE86ojs8vZkDUaG0sKGi8bS7IcdJTs02LImqQjjo5cV1xXXCeuE9dZbAMxUHNdgy6H4IgcwZdsnTKQAFmvDARrOUdHzkzOTM5sHdMROzO7teLMxa15bNljyx5b9thydebm1hqYK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@@ -4059,11 +4071,11 @@
|
|
|
4059
4071
|
],
|
|
4060
4072
|
"return_type": null
|
|
4061
4073
|
},
|
|
4062
|
-
"bytecode": "H4sIAAAAAAAA/+19aYAdRbXwzN33ucvcZebeWZIgCBggIURAVCCEzSQgCSQEMBmSIYlMZoZZYsIiSZgsxGT2BJLoQ2UxLriigE95ggg+5PKh7z2XJzxFVHws6nNHRb8J3Nu3uqvOqa6+1ZNupvPrZrrr1Omz16lTp9yjI/s+1bupc9WK3r62vvaRLZ8+u2ddR8e6NfPaOjrGa0a23LN4Xeeajvax4ZHRR1tr8H+1NdxXaobHhof5gEZqhocnZiQwe2bGVVvuntfV2ds3tuWec9b1tK/qc235xAWdfe1r2nvuvPTk2Xyg2vG1QuM336EdXyM2/x1b7jpM1JGIAufQJe0dbX3rNrS7jX6JAsEjBqFmy2cO47K6ra9tXlf3JuWTnvwXEikC+p0LuzaMVv7gIga88VVraZxcovSpli41W+5a3NfVPaJClACm4d+8u89d196xegLss6tO6tqxt/3VQ1e8d3jj7rXFBZ9a7Hv5P075691rn//3r33td9qB5ygDh+M/P/HZWS+++pXvzDntf0YX/9uKX8y7MF2z7IHPn7f/ro994CntwPnKwPjnLuhc9Y7PnXbS+PgHj7nk8due+Le/PNJ/1Uj36DcP3nHfote0A88lCDF3DocQtes/qh1/njL+45eeyqUjRanzhYb7tMMvUD77Xfe7l6/9wl+7wufd8rkP/PePFvVHC22PtOy8e/m3Rlr+d8V27cALlYG/2n3w5rrPjX609fjiH33nDb284vcXeE/97+KNDd/c+vf//e2YduB7lIHfW/73Z++rG7t+454Hbzj1ram2z4z94P9efPw7n637/XP3XveDU7QDF1RpUxYKja8d1Y5fJDZ/XDv+IhFBmfinHX+x2Hjq+98rNt6lHX+JkKDT+C9WGL/lrkPPnrWneNLzfw/tWtg2sPHkD/3H0leuz33iLb94/72FzyS0A5eIEf5M7fhLyxPnZh9zWvftT9c/89bpPz7zG585YbzhD0ed8cwD53/st3/9978wKH5ZeWAtZ0rtw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aJwzF9ew+GTwtEnjYvksagsqotkUTjmLxdb5Ivaor5oXKSPRWVRXSSLlkOXQ5dDl2O2V5m7UZ39ddBssJOmY+5AdbbY89hwkizSRbbIF7VFfdG4yKPeHFOXRbrIFvmitqgvGhe1x6KyaDnacrTlaMvRlqMtR1uOthx9Ofpy9OXoy9GXoy9HX46+HH05+nKM5RjLMZZjLMdYjrEcYznGcozlGJfDHo9FZVFdJIt0kS3yRW1RX7QcZTnKcpTlKMtRlqMsR1mOshxlOcpy1OWoy1GXoy5HXY66HHU56nLU5ajLIcshyyHLIcshyyHLIcshyyHLIcuhy6HLocuhy6HLocuhy6HLocuhy2HLYcthy2HLYcthy2HLYcthy2HL4cvhy7H63Faf2+pzW31uq89t9bmtPrfV57b63Faf2+pzW31uq89t9bmtPrfV57b63Faf2+pzW31uq89t9bmtPrfV57b63Faf2+pzW31uq89t9bmtPrfV57b63Faf2+pzW31uq89t9bmvPvfV57763Fef++pzX33uq8999bmvPvfV57763Fef++pzX33uq8999bmvPvfV57763Fef++pzX33uq8999bkffd4m2SJf1Bb1ReOio8+DyqK6SBYthyyHLIcshyyHLIcuhy6HLocuhy6HLocuhy6HLocuhy2HLYcthy2HLYcthy2HLYcthy2HL4cvhy+HL4cvhy+HL4cvhy+HL0dbjrYcbTnacrTlaMvRlqMtR1uOthx9Ofpy9OXoy9GXoy9HX46+HH05+nKM5RjLMZZjLMdYjrEcYznGcozlGJejPR6LyqK6SBbpIlvki9qivmg5ynKU5SjLUZajLEdZjrIcZTnKcpTlqMtRl6MuR12O1edt9Xlbfd5Wn7fV5231eVt93laft9XnbfV5W33eVp+31edt9Xlbfd5Wn7fV5231eVt93laft9XnbfV5W33eVp+31ect+nxekWrR5weVRdOhMkkW6SJb5IvaounQPmlcFH1+UFlUF8kiXWSLfFFbtBy+HG05os/nxbEWfX7QdNj8bdHnB9lF0b9WJ8Xfm78jevUgW+SL5rKYTuqLxkXRqwfFsvikukgW6aJwzKWPXj2oLeqLxkk9evWgcIxJd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xmXOGICSvfY+mIPeaKAeqI9Htdxqj0eFRQw/m4PNNDBBnZwLIz924kFrKCA2Aq2gq1gK9gKtoqtYqvYKraKrWKr2Cq2iq1iE2yCTbAJNsEm2ASbYBNsgk2xKTbFptgUm2JTbIpNsSk2w2bYDJthM2yGzbAZNsNm2BybY3Nsjs2xOTbH5tgcm2Nr2Bq2hq1ha9gatoatYWvYGraOrWPr2Dq2jq1j69g6to6tYxvYBraBbWAb2Aa2gW1gG9jGssUH4y4sYAUFVNBABxvYQWxkSSFLCllSyJJClhSypJAlhSwpZEkhSwpZUsiSQpYUsqSQJYUsKWRJIUsKWVLIkkKWFLKkkCWFLClkSSFLCllSyJJClhSypJAlhSwpZEnMh+nzPe8WLyK60MCpmFexLabGXDgWRoDMBz8spsb0eUHbYmrMhQIqOBXz0rXF1JjewxYB0o+6HZy2+X5oiy/V9R6LHgFy4rSNKBYBMqJYBMiJs9h8s7LFjJpzGSIfTmTRIwlGiKPnR/y26PkRyxA9f2D0/IkFrKCACtrC6NgR4ujYExWMvxs/Mzr2xAZ2cFwYc1wuLGAFBVTQQAcb2EFsBVvBVrAVbAVbwVawFWwFW8FWsVVsFVvFVrFVbBVbxVaxVWyCTbAJNsEm2ASbYBNsgk2wKTbFptgUm2JTbIpNsSk2xWbYDJthM2yGzbAZNsNm2AybY3Nsjs2xOTbH5tgcm2NzbA1bw9awNWwNW8PWsDVsDVvD1rF1bB1bx9axdWwdW8fWsXVsA9vANrANbAMbWVLJkkqWVLKkkiVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVClghZImSJkCVKlihZomSJkiVKlihZomSJkiVKlihZomSJki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ecorT3nlKa885ZWnvPKUV57yylNeecorT3nlKa885ZWnvPKUV57yylNeecorP/JqvrLR/cirk2vicMWRoB8ZdbInDtf8hoT7kVEnD/jIqJNL4po4fuN895/7kVEnW2JPHN4ay3Bk1MkDPjJqTnVwPzJq3oB3PzLqZEkcXon6R0ad7Ilb4p54wEdGnVwS18SSOHl78vbk7cnbk7cn75FRosGHN8b2yKiTJbEmtsSeuCXuicfidmTUySVxTSyJNbEl9sQtcU+cvCV5S/KW5C3JW5K3JG9J3pK8JXlL8tbkrcl7ZFTcUWtHRp18eHuwJfbELXF4tQaHd75d39uRUSeXxDWxJNbElji8cbepHRl18jzjbIFxzeXEAlZQQAUNdLCBHcRm2AybYTNshs2wGTbDZtgMm2NzbI7NsTk2x+bYHJtjc2wNW8PWsDVsDVvD1rA1bA1bw9axdWwdW8fWsXVsHVvH1rF1bAPbwDawDWwD28A2sA1sA9tYtmNK6IkFrKCAChroYAM7iK1gK9gKtoKtYCvYCraCrWAr2OL6bVyUOaaEnlhBuS7KxJTQCw0Mmwc2sINHkgSfidGDJbEmtsSeuCXuiQd8HNWcXBInryavJq8mryavJq8mryavJa8lryXvcWQS98T7cWRycvz9uEHejyOTk2M550sZvR9HJifHcsad8X4cmZzcEsdyxi3zfhyZHHwcmZxcEtfEklgTW+LDG5vQcWRyck884OPIJG5d9+PIJO7k9uPI5GRJrPBxFBG3e/txFHGyJo5li/vA/TiKOLkl7onH4nEcRZxcEtfEklgTW2JP3BL3xMlbkrckb0nekrwleUvyluQtyVuStyRvTd6avDV5a/LW5K3JW5O3Jm9N3pq8krySvJK8krySvJK8krySvJK8kryavJq8mryavJq8mryavJq8mryavJa8lryWvJa8lryWvJa8lryWvJa8nryevJ68nryevJ68nryevJ68nrwteVvytuRtyduStyVvS96WvC15W/L25O3J25O3J29P3p68PXl78vbk7ck7knck70jekbwjeVNejZRXI+XVSHk1yKv2IK/ag7xqD/KqPcir9iCv2oO8ag/y6sktcU+cvCV5S/KW5C3JW5K3JG9J3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ilj/vnF+tjPnJzE0h06U9J9/+p9/+R//8b//5a9//1//9n//9M//7T//9D/+8de//e2v//tf/vZv//rnf//rv/398b/+55+O8R/lsD/9s/zT40//0z/b+DPOP9v5Z59/luP8s5x/1vNPOf/U8087/zzrlbNeOeuVs14969WzXj3r1bNePevVs14969WzXj3r1bOenPXkrCdnPTnryVlPznpy1pOznpz15KynZz096+lZT896etbTs56e9fSsp2c9PevZWc/OenbWs7OenfXsrGdnPTvr2VnPznp+1vOznp/1/KznZz0/6/lZz896ftbzs16c9eKsF2e9OOvFWS/OenHWi7NenPXirNfOeu2s18567azXznrtrNfOeu2s18567azXz3r9rNfPev2s1896/azXz3r9US/Gn+38s+ef9TjOPx/1ShlQL5ALHiWLDnjULD7gUbT0B4xuqMeAx1+u4++M7b+OgqMBJP8vvyAuaBf0E0YXTHgshgzF6IMJcoFeMCoPxeiFCXHC2OqlDXj8ZR0Fx3audcDjL6sMiAvaBf2EsbHrUIytWEfB3GxHndxex2jkBmoD7AK/IC5oF/QTxmbq45+P7XRCvUAueFT2sahjW53wqOxjwcbWOqFd0E8YG+yEckG9YFQe9rHRTrAL/IK4oF3QTxib7oRyQb3gqtyuyu2q3K7K7arcrsrtqtyvyv2q3K/K/arcr8r9qtyvyv2q3K/K/awsx3FBuaBeIBfoBXaBXxAXtAuuyuWqXK7K5apcrsrlqlyuyuWqXK7K5apcrsr1qlyvyvWqXK/K9apcr8r1qlyvyvWqXK/KclWWq7JcleWqLFdluSrLVVmuynJVlquyXpX1qqxXZb0q61VZr8p6Vdar8tg9eB/QTxg7iAmPyiED6gVygV5gF/gFI+fyn7cL+gmjByc8KrdjQL1ALnj88/ZoRhlt1UbB0VZtLOpoqxYDHn+5j7882mqCXeAXxAXtgsdi9Ee2yGirCeWCesGoPBSjrSbYBaNyGxAXtAv6CaOtyjGWfnRROeqgEdXHWP7RNY/DmkFt0GMkdLTL45BmUFlUF8misQsodZAt8kWxqC3qF5V06KCyKB1jCYos0kW2yBfFouGoNqhfNF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yosbTWyj//fFf/vyvf/3Hv/zt3/71z//+13/7+/99/Lv/GqX+8dc//4+//eX8r//rP/7+r/T//vv/9/9c/8//+Mdf//a3v/7vf/k///i3f/3L//yPf/xlVBr/35+O8z/+m4z5JOJR/vs//ak8/vvjqnb9p36YPv67jP9/PEEgj8vK4/8v+Q8etz8e/6H//b/GEv7/AA==",
|
|
4067
4079
|
"is_unconstrained": true,
|
|
4068
4080
|
"name": "sync_state"
|
|
4069
4081
|
}
|
|
@@ -4286,5 +4298,5 @@
|
|
|
4286
4298
|
}
|
|
4287
4299
|
},
|
|
4288
4300
|
"transpiled": true,
|
|
4289
|
-
"aztec_version": "0.0.1-commit.
|
|
4301
|
+
"aztec_version": "0.0.1-commit.b9865e97"
|
|
4290
4302
|
}
|