diff --git a/docs/docs/migration_notes.md b/docs/docs/migration_notes.md index f2fbe583693..6bc9c03d5f0 100644 --- a/docs/docs/migration_notes.md +++ b/docs/docs/migration_notes.md @@ -6,7 +6,35 @@ keywords: [sandbox, aztec, notes, migration, updating, upgrading] Aztec is in full-speed development. Literally every version breaks compatibility with the previous ones. This page attempts to target errors and difficulties you might encounter when upgrading, and how to resolve them. -### TBD +## TBD + +### The tree of protocol contract addresses is now an indexed tree + +This is to allow for non-membership proofs for non-protocol contract addresses. As before, the canonical protocol contract addresses point to the index of the leaf of the 'real' computed protocol address. + +For example, the canonical `DEPLOYER_CONTRACT_ADDRESS` is a constant `= 2`. This is used in the kernels as the `contract_address`. We calculate the `computed_address` (currently `0x1665c5fbc1e58ba19c82f64c0402d29e8bbf94b1fde1a056280d081c15b0dac1`) and check that this value exists in the indexed tree at index `2`. This check already existed and ensures that the call cannot do 'special' protocol contract things unless it is a real protocol contract. + +The new check an indexed tree allows is non-membership of addresses of non protocol contracts. This ensures that if a call is from a protocol contract, it must use the canonical address. For example, before this check a call could be from the deployer contract and use `0x1665c5fbc1e58ba19c82f64c0402d29e8bbf94b1fde1a056280d081c15b0dac1` as the `contract_address`, but be incorrectly treated as a 'normal' call. + +```diff +- let computed_protocol_contract_tree_root = if is_protocol_contract { +- 0 +- } else { +- root_from_sibling_path( +- computed_address.to_field(), +- protocol_contract_index, +- private_call_data.protocol_contract_sibling_path, +- ) +- }; + ++ conditionally_assert_check_membership( ++ computed_address.to_field(), ++ is_protocol_contract, ++ private_call_data.protocol_contract_leaf, ++ private_call_data.protocol_contract_membership_witness, ++ protocol_contract_tree_root, ++ ); +``` ### [Aztec.nr] Changes to `NoteInterface` We are in a process of discontinuing `NoteHeader` from notes. @@ -61,7 +89,7 @@ impl NullifiableNote for EcdsaPublicKeyNote { } ``` -### 0.75.0 +## 0.75.0 ### Changes to `TokenBridge` interface diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-init/Prover.toml b/noir-projects/noir-protocol-circuits/crates/private-kernel-init/Prover.toml index 9877bddbb29..ec6914bf68b 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-init/Prover.toml +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-init/Prover.toml @@ -1,13 +1,13 @@ -vk_tree_root = "0x130ae70545763dadb59caeb820400cffc41df59bcc2b8731917644f247717686" -protocol_contract_tree_root = "0x2f9edcbdd0cfc67764aa32cdef9ea44f2914b44bfd9cf77d518a5ac172e7f9e4" +vk_tree_root = "0x090a6edbf45a7a953c0f356db0ffd532e057797163ef6dc5d4cfa852cb0aaa2c" +protocol_contract_tree_root = "0x2d5d4db09f9cead586c3d27ff21023e98615d9afc7740037a3d411f7aa3c1e96" is_private_only = false first_nullifier_hint = "0x0000000000000000000000000000000000000000000000000000000000000000" [tx_request] -args_hash = "0x0af1cbd9eb90baf47ec9d1306eb8877ea38b9a383a2ab2145c04cae5ac01048d" +args_hash = "0x14706f5a771b436a4124cb9651fa7a023273fddb092778f2b6c508e60e539cb0" [tx_request.origin] - inner = "0x238db6644a299b7b33993c163a0b3f3f3aaeca32f9d0f9d0328c1615d7efb8a5" + inner = "0x261174ae4897ef34adb44dc66d962b6780504d1b1067c0b61e54e80de220d2d0" [tx_request.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" @@ -23,7 +23,7 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000005b8d80" [tx_request.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" -fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000c9bd0959c" +fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000012e9bb9bf7" [tx_request.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -36,13 +36,8 @@ fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000000000 inner = "0x0000000000000000000000000000000000000000000000000000000027e740b2" [private_call] -contract_class_artifact_hash = "0x12101840a1f7fa6ea7c71191b979c27a590371482158e8464922a3c0684a7f5a" +contract_class_artifact_hash = "0x093b3ef6aa64f87b0ebe1f85916850de67ca43a883c2f1916706dc7e02236f38" contract_class_public_bytecode_commitment = "0x0000000000000000000000000000000000000000000000000000000000000000" -protocol_contract_sibling_path = [ - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000" -] acir_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" [private_call.vk] @@ -70,30 +65,30 @@ acir_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000004c0088c6304eea8b30f3bc234ba61c5e40", - "0x000000000000000000000000000000000018fe184707f8e3907ddf0a84ab96c9", - "0x000000000000000000000000000000e2e3beba971c1a3c94b236df2fa85e1b8d", - "0x000000000000000000000000000000000014ae8d966f0a7dad8d960083be6ab8", - "0x00000000000000000000000000000025cd859bd60a775d16af86fa82a7438d19", - "0x0000000000000000000000000000000000295a994fbbff1ec0099d5f3b67b9e6", - "0x0000000000000000000000000000007b1565059fd2ef91d75b15e5da56a2d91a", - "0x0000000000000000000000000000000000078bcd82da3c09b65f29f0c8c7bcea", - "0x0000000000000000000000000000002dbc692a31dee00e6a57f09a3d916429e1", - "0x0000000000000000000000000000000000200d4c50030bc07e58990e7ba93af5", - "0x0000000000000000000000000000000a0cc89c14169147a1dd0441312dde067c", - "0x000000000000000000000000000000000025946f08ac4b4019a384f69fc6b251", - "0x000000000000000000000000000000ad7cdd97ad88d7760771cdd0b49e277acd", - "0x0000000000000000000000000000000000218bae9a7c2b611799a9ec996044b2", - "0x0000000000000000000000000000009cb023d832ed90a916bb80d08bdae6d622", - "0x00000000000000000000000000000000003014603281bfb76e1767d49d9c74e1", - "0x00000000000000000000000000000004b0a492dfe5e11656683f5ebb80600409", - "0x00000000000000000000000000000000000a35de998e82206a2bce906a8f83a7", - "0x00000000000000000000000000000015ffdf7657847adcffb798afbd8eb80911", - "0x00000000000000000000000000000000002fe4db1f117da253da2b4a7b92d9f9", - "0x000000000000000000000000000000cf5991517a9828a56e8ea78f14938b152b", - "0x00000000000000000000000000000000002aeb8de879466b711e5797c95c3f19", - "0x000000000000000000000000000000dda34135cb406c7bec366bd0fe0596d963", - "0x0000000000000000000000000000000000165aac32a660f4b3ae1e6dbeaf5f9a", + "0x000000000000000000000000000000775836e31e53bda7e93c53422d1a8e3cd5", + "0x00000000000000000000000000000000000377028cc87fade6f8bcb734568961", + "0x000000000000000000000000000000ca7fd0674a7ba20833295c416420d2e7c1", + "0x0000000000000000000000000000000000265f70ffb78f42ca9db527ccc2a0d9", + "0x0000000000000000000000000000005e0a4cdef34a693652cf33bf776af83c0a", + "0x00000000000000000000000000000000000f776e3a088ddf6cb549da8a207d56", + "0x00000000000000000000000000000071ff3e700b2f8f991decc32319afcfe8c3", + "0x00000000000000000000000000000000000836ec28bbf5e572587cc47c416a2b", + "0x00000000000000000000000000000060d141d024dee23b3a8dd1aa98f224c440", + "0x000000000000000000000000000000000011861e38b0457ea34d870b4f3e4c23", + "0x00000000000000000000000000000048e0200af4523949ed2693783aa68ffc4c", + "0x00000000000000000000000000000000002093f016018e7bb8407e0e76fb1629", + "0x0000000000000000000000000000004cb2c6c83b90ffe5cbec441a7ae6b45bc7", + "0x00000000000000000000000000000000000bc3b6158749fe64e955f1b185f1d0", + "0x000000000000000000000000000000a51a9497905a681a2e9d6215c7a1abaed8", + "0x0000000000000000000000000000000000258d8b8588ce2899dd49549c9ada73", + "0x000000000000000000000000000000ac4f33f32ec385d0efd7bd413754adf63d", + "0x0000000000000000000000000000000000069613efcc8e9d4ee400a06a730118", + "0x0000000000000000000000000000005fcc2a645b50ba1b71326384b2579a8af1", + "0x00000000000000000000000000000000000b27b8419676e7a84a9d38ec798da4", + "0x000000000000000000000000000000657ca0d82735e356b2a5d55b6ac684655b", + "0x00000000000000000000000000000000000dbcd5763887e61277347c404d3980", + "0x0000000000000000000000000000004413809de081762acd74fc88ef5a7c5a99", + "0x0000000000000000000000000000000000052cbb84afbb82c1f5432578e8f7c7", "0x000000000000000000000000000000552393d09533e1b2004bd84e9f8a53a88f", "0x00000000000000000000000000000000000456bb701b5b0b463bbcf0c4fe7190", "0x00000000000000000000000000000074156481e9a3f8f091d30db1003a6daab4", @@ -102,10 +97,10 @@ acir_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x00000000000000000000000000000000000d56bbef147278fdc057f9a336d984", "0x000000000000000000000000000000f11f3eaed8726026211d2ee0f83e32e453", "0x0000000000000000000000000000000000291fbbe0b7f6f2823d5469cf981a1e", - "0x00000000000000000000000000000037d316dad16af640351c394dfaa84aff9c", - "0x00000000000000000000000000000000001c85c5c2ad15dffe02c925482f12f4", - "0x000000000000000000000000000000a896f37773d96a9bf91454a5cf4e060510", - "0x00000000000000000000000000000000001351fb0185f0803b26cc5ad05e04cc", + "0x000000000000000000000000000000ffd28cf9ba1417c1caf418b43a3de9d434", + "0x000000000000000000000000000000000015449830399d0f54c492fcd591732f", + "0x000000000000000000000000000000fd493f730fa26592af1e4c7af7ec5321a5", + "0x00000000000000000000000000000000000bf622ffdd69efded5b1ad1d42d140", "0x000000000000000000000000000000f7a57d8eb28c5d23873376972e0630ac39", "0x00000000000000000000000000000000001b55bec64f61aa2803559d6a766e60", "0x000000000000000000000000000000d20d9a80ac0aa69cbff40f2e4dca6eebce", @@ -126,38 +121,38 @@ acir_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x00000000000000000000000000000000001dad3f4e78044bf6197cbd3e376f67", "0x000000000000000000000000000000d68a49412f45d61ef4fa8a13437267f9de", "0x0000000000000000000000000000000000243adeaa8a631cdf7bc2586150dba2", - "0x00000000000000000000000000000027ae20d03e8284ebed50ab3678a8233766", - "0x000000000000000000000000000000000006dbeac901d1d3f41f95e5035c6705", - "0x000000000000000000000000000000ad3b3291a3169e7ace495a1b5cf3e33cc7", - "0x0000000000000000000000000000000000121859ca70ca69522d832967f8ad6d", - "0x000000000000000000000000000000515888890c39d0400406df1cf1ca98d7f3", - "0x00000000000000000000000000000000000f2058754cee26d7bfa1146e43d42a", - "0x00000000000000000000000000000034dacea200db47dae167a253278b0de20c", - "0x00000000000000000000000000000000002c9303ef3980ffb97e934ad783839b", - "0x000000000000000000000000000000e29d8d89a01e6c58f90ddbe1df06ad7bca", - "0x00000000000000000000000000000000002685373d3ca435751faec65d4088f3", - "0x00000000000000000000000000000097666c7ded9448c11f039d951224aaa41f", - "0x00000000000000000000000000000000002f45f7a3625dd9c7ff1846c21ad892", - "0x00000000000000000000000000000034e5173b2c28747e2a4cbb73440fcdb6f3", - "0x0000000000000000000000000000000000217ab01a6641c33b74eceb662735a7", - "0x000000000000000000000000000000e6cb0f0c0475b4f5a0d2a3343d63427f6b", - "0x000000000000000000000000000000000016ad961279ad0b14b65851d17475af", - "0x000000000000000000000000000000e9e95800ed53e815d4da8e3ca853cdde0b", - "0x00000000000000000000000000000000001fcf583d7e8f26d95fa14471ab5c24", - "0x000000000000000000000000000000b3c8aa401c870791e6fff92dd7c359af78", - "0x000000000000000000000000000000000010e505ea341011c73456a4ebbadce0", - "0x00000000000000000000000000000031d83fc6b03a4e6ce7fdf44ea6864d6e9c", - "0x0000000000000000000000000000000000012604b18752180b6907e717aec25f", - "0x000000000000000000000000000000d7e8a71216707d312d6c0b3e00d3640074", - "0x0000000000000000000000000000000000169f0c41f9894810eb34bab4bd7542", - "0x0000000000000000000000000000001cb162d604ac88bd1f831d3965d5a512a9", - "0x000000000000000000000000000000000002a2199182adc8326da8b7a7afa479", - "0x000000000000000000000000000000ed232a9b53a3bd2f9a07072f01ca8cead3", - "0x00000000000000000000000000000000001bb5b1d09a76524b5117c8840cb9cf", - "0x0000000000000000000000000000001e3da8bfd595ead94cfa4b6fa2233d4d67", - "0x00000000000000000000000000000000001c678f6e902335b652843f66c18a73", - "0x000000000000000000000000000000036e7402769cf31acb416b162dd64767ca", - "0x00000000000000000000000000000000001c50319d4b4f116bc857b94f714bb8", + "0x00000000000000000000000000000004b49a102241618edbd23c93ecba625dc6", + "0x00000000000000000000000000000000002abb2d064545acb95c5e80977c818a", + "0x000000000000000000000000000000c5c6b09b6c8bf03488b12695e8fc70fe22", + "0x00000000000000000000000000000000001b15326a839c5e7c221e480720c36b", + "0x000000000000000000000000000000662c2473f0e8ab59f734804c9a69ae121f", + "0x0000000000000000000000000000000000199ef1eb9b40bb93923a40577d95e5", + "0x0000000000000000000000000000009cf99efb8d678b82439fbbaf7774e32c4e", + "0x00000000000000000000000000000000000c46231fdc6142f2f2533fa6eabbc2", + "0x000000000000000000000000000000b639d851190c1f37fd178a03add2725676", + "0x00000000000000000000000000000000000e1aa64856c9d51fdee716f00ec474", + "0x00000000000000000000000000000052bbc13d7f0dd3f0760ac75330f189b904", + "0x00000000000000000000000000000000000d50e12d34b1fea28df38785df176b", + "0x000000000000000000000000000000b7c5fa0eab0e9af427251a0f0e90d4390f", + "0x00000000000000000000000000000000000d4b6c7df437152d9f4950640b838a", + "0x000000000000000000000000000000f69d8a955bc29d1e73873aaf4f41e26ab9", + "0x00000000000000000000000000000000002ecda78bf9dd30a78b5c3ba5684e12", + "0x000000000000000000000000000000ea75e11432b4e3d2184225704fb2643f11", + "0x00000000000000000000000000000000000b2eda7abe3b05d227567bd9eb64c1", + "0x0000000000000000000000000000005c2d319d1d8c43fdb524437ca0747c4800", + "0x00000000000000000000000000000000002dc52732b4471ab1e0484dcbde4702", + "0x000000000000000000000000000000b6f7b03b7de4cbe83ec0cec7d17859931c", + "0x000000000000000000000000000000000014f079a015f56c9f46ad5957d9b7e8", + "0x0000000000000000000000000000000d70afaf2f2379249a103b2ef8632c7c8e", + "0x00000000000000000000000000000000000e949a273b7740556f42964e79538c", + "0x000000000000000000000000000000f486b1eeaf7647aae37ddaf8f9617c1eec", + "0x00000000000000000000000000000000000a50e99a1f25f251463473bcc377c2", + "0x0000000000000000000000000000004bc3f9da26310273537951a19b31c298fa", + "0x000000000000000000000000000000000017faa947354da834c133db980f5462", + "0x00000000000000000000000000000062018fbe858d3180b2d04e56911a792ffb", + "0x00000000000000000000000000000000002b1262a9a690c3eb425dbe84386d28", + "0x0000000000000000000000000000004e05d50aa0f686d76358ce7e2ce23897a3", + "0x00000000000000000000000000000000000528a2c0f2014cdf1b535f8f663d86", "0x00000000000000000000000000000084a9b3527cd2ebff62b245a04aab258f92", "0x00000000000000000000000000000000000a85019e1252699312cbd5ec6a23b2", "0x00000000000000000000000000000000b5eee72336430c3feb7da6b8b57e1551", @@ -166,10 +161,10 @@ acir_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x000000000000000000000000000000000000b34e0082bc5aed819a81bb36744c", "0x000000000000000000000000000000beb969e0f2c7856270dc5fda2c5d399dcc", "0x00000000000000000000000000000000000013aea3bcc0841ec6d94b285f1beb", - "0x000000000000000000000000000000b64bcb23012aef7421ae1b97a9a33f941b", - "0x000000000000000000000000000000000005aa1eeb4d3694a5063763f82318fd", - "0x000000000000000000000000000000b8d3152c9ac8136776bbd21b731aefc643", - "0x00000000000000000000000000000000001b3938ba03ad7d153b1ffb7d6a18de", + "0x0000000000000000000000000000002671782a93372aad369530ae4b75c22bdb", + "0x000000000000000000000000000000000002d9f0465ef4b2b116d4b88625344f", + "0x00000000000000000000000000000026e9839942d72920141febdab07e4c20c3", + "0x0000000000000000000000000000000000265f0c70536ec02f7c9be4ce19c29d", "0x0000000000000000000000000000003a339e8cb8c648d07c34ddcb4ef4452783", "0x000000000000000000000000000000000027807a4f7b23d9cc1c865ef9930999", "0x000000000000000000000000000000bc4fd810c781d7b239a47a086361686edc", @@ -191,43 +186,55 @@ acir_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x00000000000000000000000000000078f4b3bc61f19d6e7069359bbf47e7f907", "0x00000000000000000000000000000000002d7c18a93c3dae58809faaeec6a86a" ] - hash = "0x03be9a2387e1b3804b26f02b835f4e67c4cd5ea27134755127dc63d07482da65" + hash = "0x2f8fc4817e72f3df76a1933723114dcfa15854f5fe10178c458bdff5aca6d783" [private_call.function_leaf_membership_witness] leaf_index = "0" sibling_path = [ - "0x0e050f73231cf94fe1f1fe29a407514ec3398942745d44df55ec6ef5b02ae7d5", - "0x2eaf5bf1003f0f97f98a0d49a64cef3c812831098bde3da130ca915b727a48cc", + "0x2c5cf3eba88f6b97be1e9f373f62c5c317ea9693f54ad1b03e826cf14e83c868", + "0x22d0c6ab9e48b1f8fd239d09ff2f5cfbff9501b21033f8c7a46d92b4fb6d0a54", "0x0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "0x1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", "0x2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854" ] [private_call.public_keys.npk_m.inner] -x = "0x2bcd3866b5cfda1e4ec60ac07d18d963d3dc0312565f0bd87c57bee8b11a3d79" -y = "0x2a1698b41b5275c81f388c8197320a7f2c3ea6e00eff1b6fc766d37438813d91" +x = "0x2661813d6be5d3e5bea8100a26875f885511651e75a98a21aff9e9b8becc53c4" +y = "0x1933d05b68e5528f6c8e351e72903e1a3eb0a57cf0d0b6df2804c29c05e313c5" is_infinite = false [private_call.public_keys.ivpk_m.inner] -x = "0x29bf6934ce2dad97372aebc3996999ac75f36861521a7f9e3e4015398b6dae0c" -y = "0x2bad97bc7a60a7eb91f74fcac835078f2d349b76baebb04a4c67ab38f47e7d8d" +x = "0x0affd911ec8a44d1c4b39efe3da80dbb0ee2b628f51bcf2fffe791e60826f4e9" +y = "0x211639aad7e181f09e0253f304c624600aff0fa416550926a8c1f8f4e28cf45e" is_infinite = false [private_call.public_keys.ovpk_m.inner] -x = "0x0466d31125860343f098277c6fb01d8402a0ac4cfccf8acb81eee53b498fe3d4" -y = "0x033776c04e1be74c10a298b4216e5d73961c833bf056e3aabbe8cb14e43345b6" +x = "0x139705b4492d05c89ba39d7a1c2be133ec4d7efa8dcbb6ede73c73476636a21a" +y = "0x10ddecf162bc33ae6251ba2338337f393edc69f2d1461015bfd28826f34e5ccc" is_infinite = false [private_call.public_keys.tpk_m.inner] -x = "0x15383ff9964199e59a676e836d9d05724afc61f29aecbdac4869a346b01716aa" -y = "0x14cc049d171836530ba20dc7e80010b669cb37456031212c57fb8dabaf9bdf3b" +x = "0x17309d0ccead0fb419766fa445df1730e4120171eb19a209dc93d026c1fc4807" +y = "0x16e6ff886c8842da9da88f27693587ecb017bcbfa18f6853175e894b1b615b65" is_infinite = false [private_call.salted_initialization_hash] - inner = "0x072ad0fe9aedb284a12f22f48c156e660f91fc0d318e184d2386f6be5148a15d" + inner = "0x2c8d540eae6c72bde5e440ca90201d275c7ed50e2576ca11991c8643d55f7800" + + [private_call.protocol_contract_membership_witness] + leaf_index = "4" + sibling_path = [ + "0x0a023db51e9a9cb41b0be9faf146bb5094ba54e357af710364633a00ea424d2e", + "0x11efc1ff409140e05eca73a2df30bfbdae0130b92a6ed2f7d7e1a61eb23d3e6d", + "0x0bc88163a1fe70904187f6352ec107398d353293f0e0010f4c615871d679da6a" +] + + [private_call.protocol_contract_leaf] + address = "0x237a0bac451ebac796b96dbe27ccfda5230e8c962b391b84b0304c3775e9e0c0" + next_address = "0x2946115660107c3ca9bea1e486452595999c3677e7aaeaa9ca898e0fbba0051a" [app_public_inputs] -args_hash = "0x0af1cbd9eb90baf47ec9d1306eb8877ea38b9a383a2ab2145c04cae5ac01048d" +args_hash = "0x14706f5a771b436a4124cb9651fa7a023273fddb092778f2b6c508e60e539cb0" returns_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000001" end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000004" @@ -245,13 +252,13 @@ _value = "0x0000000000000000000000000000000000000000000000000000000000000000" inner = "0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000000" [app_public_inputs.call_context.contract_address] - inner = "0x238db6644a299b7b33993c163a0b3f3f3aaeca32f9d0f9d0328c1615d7efb8a5" + inner = "0x261174ae4897ef34adb44dc66d962b6780504d1b1067c0b61e54e80de220d2d0" [app_public_inputs.call_context.function_selector] inner = "0x0000000000000000000000000000000000000000000000000000000027e740b2" [[app_public_inputs.note_hash_read_requests]] - value = "0x0493504d7e2628c6f4c13f91240ac2aeff1175f772039af764ebced0da4326e4" + value = "0x0c47e69105b67dbd03e93f15fe5df88c538b68152d54ebe3bf44d35a538b9d36" counter = "0x0000000000000000000000000000000000000000000000000000000000000002" [[app_public_inputs.note_hash_read_requests]] @@ -793,13 +800,13 @@ _value = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs.public_call_requests.inner] is_static_call = true - args_hash = "0x0f0616825d1d1592b7dfa8ac06c7ddeaeadc7d34a61a1632604c73588bd09ea1" + args_hash = "0x123a2a06304cb31bf6e98c71b2b8ee12f3225dfcaa0d242512537056632962a6" [app_public_inputs.public_call_requests.inner.msg_sender] - inner = "0x238db6644a299b7b33993c163a0b3f3f3aaeca32f9d0f9d0328c1615d7efb8a5" + inner = "0x261174ae4897ef34adb44dc66d962b6780504d1b1067c0b61e54e80de220d2d0" [app_public_inputs.public_call_requests.inner.contract_address] - inner = "0x1f3f85b45ea6c7be79b6e4948002182167732a202d83e1dba67b53f676583c83" + inner = "0x27581b7f11d6e97d5aa29a88c9d06d5fd073e619af7da445d51619956fde6c68" [app_public_inputs.public_call_requests.inner.function_selector] inner = "0x00000000000000000000000000000000000000000000000000000000d5441b0d" @@ -1493,16 +1500,16 @@ _value = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs.historical_header] - total_fees = "0x0000000000000000000000000000000000000000000000000003a83222de8a00" + total_fees = "0x0000000000000000000000000000000000000000000000000003a831c6a84280" total_mana_used = "0x0000000000000000000000000000000000000000000000000000000000004a40" [app_public_inputs.historical_header.last_archive] - root = "0x082bf9a6382021ca9fa204bdbc71fd5536d84358e57a61f129fdf5bfb228c06f" + root = "0x26539d26af96d95bbb572600a75cac167b3d1c1b1463d7a37f36a17a8d06ed6a" next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000008" [app_public_inputs.historical_header.content_commitment] num_txs = "0x0000000000000000000000000000000000000000000000000000000000000001" - blobs_hash = "0x00310bb50f2202183669b8a85c09986fd69c203fee7d32e06dd1b46c84b20a7d" + blobs_hash = "0x00766b5deaa18a777a6519ed05b5ab8360ac4c4b8ba6b207d8cabb2ff48d8c4b" in_hash = "0x00089a9d421a82c4a25f7acbebe69e638d5b064fa8a60e018793dcb0be53752c" out_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -1511,33 +1518,33 @@ root = "0x2e33ee2008411c04b99c24b313513d097a0d21a5040b6193d1f978b8226892d6" next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000080" [app_public_inputs.historical_header.state.partial.note_hash_tree] -root = "0x2596f3d6b05b7055c3c5ab89de6e270b653cb30c3dd6b9cfd230ff41b5ffa623" +root = "0x00893d1239f1319771e840ed89e26356efb7a175b5d14215f16d2f3f73b61de0" next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000240" [app_public_inputs.historical_header.state.partial.nullifier_tree] -root = "0x15205da8ec6fc0317cee4482de04084768078d73397e7f466c11c45c2cb66bac" +root = "0x0cf60cbdd1d63166e082dafba02571914ee2e2b63f16a0088f4bc35f9141063f" next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000002c0" [app_public_inputs.historical_header.state.partial.public_data_tree] -root = "0x2841d0ae135bd8bf3761f919c16b9e5cf7ad4b3035328f65bf84ee2dc599aed6" -next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000097" +root = "0x21adba011a03e24b92611d690dcc4d6b77d39beddf5d2ec763554cc2e96d8b87" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000009a" [app_public_inputs.historical_header.global_variables] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x0000000000000000000000000000000000000000000000000000000000000001" block_number = "0x0000000000000000000000000000000000000000000000000000000000000008" slot_number = "0x0000000000000000000000000000000000000000000000000000000000000022" - timestamp = "0x00000000000000000000000000000000000000000000000000000000678ac01a" + timestamp = "0x0000000000000000000000000000000000000000000000000000000067aa83d7" [app_public_inputs.historical_header.global_variables.coinbase] - inner = "0x00000000000000000000000017ad47b9f14dc201975cca47fea765e5d42f0b72" + inner = "0x000000000000000000000000510b7559c009aa23c667441544126add2fded29c" [app_public_inputs.historical_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs.historical_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" - fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000c9bd3a5e8" + fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000c9bd267fa" [app_public_inputs.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" @@ -1553,7 +1560,7 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000005b8d80" [app_public_inputs.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" -fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000c9bd0959c" +fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000012e9bb9bf7" [app_public_inputs.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-inner/Prover.toml b/noir-projects/noir-protocol-circuits/crates/private-kernel-inner/Prover.toml index 00bc295c0d2..0aae2d46f0d 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-inner/Prover.toml +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-inner/Prover.toml @@ -1,12 +1,12 @@ [previous_kernel] vk_index = "0x0000000000000000000000000000000000000000000000000000000000000000" vk_path = [ - "0x16cdb92a1804137932723311e0102e917f249e2d8a96faeed8aad4d04a5249c5", - "0x03325592c83286ae329c189ebf786a670f3e725ee33f2d3f1b896d42cff8bc2d", - "0x1055d2be8c827009ac1c36a3d984a543c20c6c6783d9783fb57c63c544a3f539", - "0x2c8b742477af94eb3d371b8aeef0f9a8d930466cfe240ca1b7c504b0b4492d22", - "0x126bb13ce4b07681f511f3a23d88cb7cfe082a76730abd5b4be5c4da3b5c51fb", - "0x050dc6390aace9c6e873b762c65e7d6a21e78e64e5ad6cc7c8fd5e69315ab5fe" + "0x2686e39eed3e405a2a1162208acadd6be9448cdb96d9a72c0bef2dd5152a5da5", + "0x19275c3c902286390bf9165a8a58adfa82283972fbb5d8c55d8faf01ec3e5a0e", + "0x2b556b4625c4c544d7841613ad6820d136b75fccb8b7baf79ef456bce4cdce46", + "0x2b3e3f6a09e7f29f50fd57b6861a71a4837ca5794f7023c2b08c9108f4019110", + "0x085de27a70b1e644dba1f38475bc3cf44d2db93e32296c875e1b4e7435720caa", + "0x059405994b0e8b49eeccac51801f92d8adbc42fd48c9dd274f888e910168794e" ] [previous_kernel.vk] @@ -34,30 +34,30 @@ vk_path = [ "0x0000000000000000000000000000000000000000000000000000000000000008", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x00000000000000000000000000000047fcf1905cfb9c15a4cf70e2bcfd474d85", - "0x000000000000000000000000000000000024d65dcb0bd8a5858d952683a41b77", - "0x00000000000000000000000000000012ec744073c90ffacde9920ccdc9b2ec0c", - "0x00000000000000000000000000000000001589f6176d7c3b522e247839d03c3c", - "0x000000000000000000000000000000f2a1b1acf4189cd49f4a5621f649e70870", - "0x0000000000000000000000000000000000052ebbf58f8e639679198d151b9ed7", - "0x000000000000000000000000000000cf7e43a131550b37eaade38d7b0521b004", - "0x00000000000000000000000000000000002e036dc7f8d6d060d82040cd9d17be", - "0x000000000000000000000000000000852848d65f65174efa0fd5533a5f54e65d", - "0x00000000000000000000000000000000001df16fa41488410eb321659295e2e1", - "0x000000000000000000000000000000bdb6e51c038cb89f317934188b2959cdcf", - "0x000000000000000000000000000000000012b4a41976ae7bcbcb13e27cb62c13", - "0x000000000000000000000000000000f45eb660bbfeb050d079dd5693bf1942ae", - "0x000000000000000000000000000000000029d01e5ed21019197b196f53354af7", - "0x0000000000000000000000000000006191a44843f17c60653513a8462479c7ea", - "0x00000000000000000000000000000000002245e7005b195c0e7f3524024a87dc", - "0x0000000000000000000000000000004cda575acbeb954f0ee0ef8114ab658cfe", - "0x0000000000000000000000000000000000071a841a527e4215805092bb03036f", - "0x0000000000000000000000000000005a57318d58fa61e0c9b7d9f4c3a80f1b20", - "0x000000000000000000000000000000000004e664896b1a21bf4df731f29b5e44", - "0x00000000000000000000000000000083c78dce9ac7a4d3ffc740f892b01ece3e", - "0x000000000000000000000000000000000011a474b8cb53bcbd0a24dcf4aecc7f", - "0x0000000000000000000000000000009f919ddbe27224277b03efa993b9871e09", - "0x00000000000000000000000000000000000af8c7f638b0d1fd03695f158eb1f8", + "0x000000000000000000000000000000f3f4ff6224dbcf3360733d15b18fa8f270", + "0x00000000000000000000000000000000001d10baf86b2b9ebd05fad360f7e212", + "0x000000000000000000000000000000f12401f8a5114bf9b5e17b6c598c6af074", + "0x00000000000000000000000000000000002132e40157a8a5564a28ad11912354", + "0x000000000000000000000000000000d81a0980aef468cd0580a76dc2192fd538", + "0x000000000000000000000000000000000019d1e7df034994219282dc7b3589bd", + "0x00000000000000000000000000000089af208b330cc40c199a2fd42e7b019b02", + "0x0000000000000000000000000000000000245a41a779ce3b841a3245fe27b472", + "0x00000000000000000000000000000019f70281d95b9bb5ab75ba6cce6715b727", + "0x000000000000000000000000000000000000f6b154e6130b6aa2f2385a2b4379", + "0x0000000000000000000000000000007a765390d53e6547d29f2522600e206c06", + "0x00000000000000000000000000000000002ea28b388879a5d486ee070ef9a837", + "0x0000000000000000000000000000002ddc5da7b6321c08de84d084eac0b3c2c6", + "0x00000000000000000000000000000000000dfa3f29d2ee6bb6967d38d9485ceb", + "0x0000000000000000000000000000009a33f9bd7cb70c797937f984837829d6cf", + "0x000000000000000000000000000000000000e31b2cc54d234d571d5ecdc3adb5", + "0x000000000000000000000000000000b0be3158b78d8f97fde7d4afe8ed080a06", + "0x00000000000000000000000000000000002e90bab16e5931fa48d0b89b8942ca", + "0x0000000000000000000000000000008b8d9dae14d07519f9554cb18cf4abdffb", + "0x00000000000000000000000000000000000a7c47013f027336161e7552a19739", + "0x0000000000000000000000000000009b01dea55cbbb889b38aaaa65914209650", + "0x000000000000000000000000000000000016c6c85338b8b9a6bd8679c2c21d61", + "0x000000000000000000000000000000eba166b1b51c4a7ed781d7822b24549d93", + "0x0000000000000000000000000000000000296720a58920cc4e77bab97595e1de", "0x000000000000000000000000000000cf3f0cf483e3b60ac46e2580628429291f", "0x0000000000000000000000000000000000179a988d2f894ba4cc456686236e49", "0x00000000000000000000000000000041c39c0b069ca7761686f7caf8bd51c343", @@ -66,14 +66,14 @@ vk_path = [ "0x0000000000000000000000000000000000298c3311fc9170f92de940b042aab9", "0x000000000000000000000000000000bf37537eb196b05c1d98fa51016a9bacbb", "0x000000000000000000000000000000000007b05f408a612847259016b9204ae4", - "0x000000000000000000000000000000f670252c93ae136d88595e191d4128b02a", - "0x00000000000000000000000000000000001c425066f305565a4c7cd5db7af8de", - "0x0000000000000000000000000000009088c10942bb491838d082350343bfba5f", - "0x000000000000000000000000000000000001a1083740b17399823e9dde69f9ab", - "0x000000000000000000000000000000a5be3bce0a3fa922de3e7c8e61540fbd94", - "0x00000000000000000000000000000000002b627b9dcf54b342237a640f0379f3", - "0x000000000000000000000000000000d9f6b4eec34dbfac3c49b2e9efbb60c04a", - "0x00000000000000000000000000000000000f3e556b4b04370af11386f427cba1", + "0x0000000000000000000000000000006002eb0ee9dc08582484e977e03196c529", + "0x00000000000000000000000000000000001986039b806bd540833e855272e3b1", + "0x00000000000000000000000000000010e983ce0b34ff06e7215d9a1181fbea75", + "0x0000000000000000000000000000000000076541e77c745b8c754679809fd595", + "0x0000000000000000000000000000001278bd6ce77d1088282dfe2d116ce93e86", + "0x00000000000000000000000000000000001961cb0dc239b81e2967aee689b398", + "0x0000000000000000000000000000006e600ee691a1c930789354702db97364e7", + "0x00000000000000000000000000000000000d4d30185b4070455a8113616e0519", "0x00000000000000000000000000000035c9cb5f001915ccb707544d8295b4e4f8", "0x00000000000000000000000000000000002451c090209c18e440624b96591a23", "0x000000000000000000000000000000381694f1ab41bc30edb347a4618bbcb253", @@ -82,46 +82,46 @@ vk_path = [ "0x0000000000000000000000000000000000172c855547ef1cf358b1193059ab94", "0x000000000000000000000000000000c746ba121a8412b23d1a54c2679b7fcb42", "0x0000000000000000000000000000000000188578f3213bb6dba81fc0826a77f1", - "0x00000000000000000000000000000017f1ad5a36d1d27be395a245b27103333d", - "0x000000000000000000000000000000000004aaea2a12bbe7658d9ebb39bcc49c", - "0x0000000000000000000000000000003d5674ba283399f8ff8e9a4a54ef04f90b", - "0x0000000000000000000000000000000000085ced78b3c248687e55753187ae1a", - "0x000000000000000000000000000000c3f69116b99bc6ffe2ea33348aedab107f", - "0x00000000000000000000000000000000002ac3afb3486a8008fe304176553b8f", - "0x0000000000000000000000000000002b2112dd48e799d1264079e8ef0d1bcaa9", - "0x00000000000000000000000000000000002c9560a53e0bded7eeda7efc3128ce", - "0x00000000000000000000000000000016078a51c3eba292cf5db78ca1a10302a0", - "0x00000000000000000000000000000000002b45bd8d7deeb00c5dd28950fe8663", - "0x000000000000000000000000000000c6b10731458f7591b2f2054fa35130d3d7", - "0x000000000000000000000000000000000021bc70d2c7a3e3778eb03692800f0b", - "0x0000000000000000000000000000002250c4d7f459e91ac8a90146ea1bd57b17", - "0x0000000000000000000000000000000000166328613b357e3f52b0a324ce9bbc", - "0x000000000000000000000000000000d6865b1299db5db396a4b6a83884374bcf", - "0x00000000000000000000000000000000001a294f3d8c5a65e3ffa26b30cd48fa", - "0x0000000000000000000000000000006a4397a48841d23ba00fbca0938310b285", - "0x00000000000000000000000000000000001d5f058d9f8d9ec1215ec97fa5301a", - "0x00000000000000000000000000000010f0a48520cc4a265730c3c253896592d9", - "0x00000000000000000000000000000000000c18a511c4a55a638137ab511d6b59", - "0x000000000000000000000000000000c26ef47b8d2648c3a6fe2e90d56acc1080", - "0x00000000000000000000000000000000000c2cfe2c3d862f0c3c783129b30f4a", - "0x00000000000000000000000000000078b499a64139eb4b9c3a35de09abd9f325", - "0x00000000000000000000000000000000001a97475ec4b37efa29c0672d0900bd", - "0x000000000000000000000000000000c7f3136538eda650068d285385c9377bf3", - "0x00000000000000000000000000000000002eea440707e0ae65d1619ec3a5164d", - "0x000000000000000000000000000000f10f12e5d7d6458c7378e61545241d48bc", - "0x000000000000000000000000000000000011d7f193dc021ba1f70a356d076b5b", - "0x000000000000000000000000000000b74efab19101de5bd968ebeae34d83671d", - "0x00000000000000000000000000000000001e2aa317e8b7bff29a3b77fc5c3899", - "0x0000000000000000000000000000007f89d35cce826817315ef179bb8c271021", - "0x000000000000000000000000000000000017793433109d3e74b4e23c99ff852a", - "0x00000000000000000000000000000037e7f362482e126278c998278d38361479", - "0x000000000000000000000000000000000003e0b3732d506db0c7d4cd2aa72059", - "0x000000000000000000000000000000064c3c62ab0bcad8ddc92d3f417b19103a", - "0x0000000000000000000000000000000000160df69c00c0175d5529c05f51fad1", - "0x000000000000000000000000000000aed90b6927439a7d2642ca7486fa7a7ada", - "0x00000000000000000000000000000000002730c29b29642172ff9349cd2a93d6", - "0x00000000000000000000000000000029ef0b340cfe7aebd25e9d138f3f152124", - "0x000000000000000000000000000000000009578e1e7edcc86fce5d6da67e403a", + "0x00000000000000000000000000000055926d768ed25d3b2defe81966ebc71493", + "0x00000000000000000000000000000000000af1160b73d0b5240cc20c893721df", + "0x000000000000000000000000000000385fccaee44be830c74f63fb5ba03500bb", + "0x00000000000000000000000000000000000268e31a0c93ba93c9232a6052f859", + "0x000000000000000000000000000000132e7c81960e83db0e4e4e683463aa4849", + "0x000000000000000000000000000000000010cf59ed4bbce8322dc58b3b941981", + "0x0000000000000000000000000000004109a283617ab5dc58c7037562a29620d5", + "0x0000000000000000000000000000000000181037f396d13373172d5a5aafa63f", + "0x000000000000000000000000000000565b139d3d21793ded0fcca0b185e4673e", + "0x00000000000000000000000000000000001afe1b2b72463256f855f26972531b", + "0x000000000000000000000000000000867f8acfc668750f6c431e22dd014e1248", + "0x00000000000000000000000000000000002b2e383876ac33c90b7286ec179dc2", + "0x000000000000000000000000000000a28875204e10ee16cbb80ebcab595599cf", + "0x000000000000000000000000000000000000b21f3504f3f7d148c43d9679b961", + "0x0000000000000000000000000000006874e58cb76cb3bddf1c8945296301a0dd", + "0x0000000000000000000000000000000000117ff987fcdff1fc91aacd947aead9", + "0x00000000000000000000000000000022cf659dfdd4a8e261323b19a7d2846ba5", + "0x00000000000000000000000000000000000c9267f43f30df04a999d044c33b85", + "0x00000000000000000000000000000067ae9252b2f1d89930b65476c56af5e585", + "0x00000000000000000000000000000000000da686230a47442f5dc71bab3484bc", + "0x0000000000000000000000000000005ab50efbf650e5ba56f20399380b31c219", + "0x00000000000000000000000000000000002100d364a1d7fc0420097febeded32", + "0x000000000000000000000000000000c4b432bb0018b4192eacf5c10750706bfe", + "0x000000000000000000000000000000000008b5819a61fd63e29489a4346ddf3d", + "0x000000000000000000000000000000d5f739273dd051e70911e0e89fb8e533f1", + "0x00000000000000000000000000000000000e38c177e35547f579bc64ea719f1e", + "0x0000000000000000000000000000008c86cf2d45c8a269e03c67eaf214cf268c", + "0x0000000000000000000000000000000000041017301b67a2fb51d0ec892638a4", + "0x00000000000000000000000000000070d65da45584727f08de25b0e3b2343de0", + "0x00000000000000000000000000000000002faacc9081fbe227bbebd8f827b244", + "0x000000000000000000000000000000a428301bbc43dd3b2f3f538dfb08c6a9b0", + "0x00000000000000000000000000000000000f892311c20078c907f200220434da", + "0x000000000000000000000000000000e3082a102709e7202a4f6f2d313c8d4749", + "0x000000000000000000000000000000000019d7019a3b54245a52e1b34bbc028d", + "0x000000000000000000000000000000b0906d4f6548cf528e5a6d273924c43c69", + "0x00000000000000000000000000000000002a4166f5fc5f8d924d7b869b9ffe33", + "0x000000000000000000000000000000b8dbc03ede13c008e2ed30936c34617c26", + "0x00000000000000000000000000000000000ed66d8dea1f18e5066ede28f30a1f", + "0x00000000000000000000000000000092f801292d7e184fc9aff8f493ff6bb189", + "0x000000000000000000000000000000000011ed17d0077f095ecaca415b60e2d7", "0x000000000000000000000000000000f6f4596202301b6ae4eb0ebbeadd203340", "0x00000000000000000000000000000000000adc89c48d75b571636f5bbeb4a806", "0x00000000000000000000000000000000034e3e27454ef992b4bf84b97baa7471", @@ -130,10 +130,10 @@ vk_path = [ "0x00000000000000000000000000000000002e25783551df50c004ec7cd1f4dd8b", "0x000000000000000000000000000000e8258f84477c1b62565a559ba7bb38832e", "0x000000000000000000000000000000000018f76cf0ceeccb4798de741ae89b64", - "0x0000000000000000000000000000001583b176f599e192d7119354034419e8f9", - "0x000000000000000000000000000000000004706a0e23ac32a3566907fb872362", - "0x000000000000000000000000000000d1b9992279342fce9a883849693fcda22a", - "0x000000000000000000000000000000000029046b299293cb09c593372eb6b3e6", + "0x000000000000000000000000000000353d43fa70e99239c1c1c67e271a0eeac5", + "0x00000000000000000000000000000000002d299fb68678d0150bcc5b16dc8252", + "0x0000000000000000000000000000002814ede7cd27daed00c33c12860bc4b046", + "0x000000000000000000000000000000000015d3ac5a199abb74933a4efc98c59b", "0x000000000000000000000000000000469680c270e551515344592f59188fa765", "0x00000000000000000000000000000000002d38d6d4ba1e4763a74ecdb11ca1f3", "0x000000000000000000000000000000fce917c0d5dca019477c52f6075332b612", @@ -142,10 +142,10 @@ vk_path = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000000000c77bfd4e323bf4b587a765f94fd95a8b79", - "0x000000000000000000000000000000000024009f6e07ac7a3b6be0bb489fbecc", - "0x00000000000000000000000000000057a8b3aca5f0c3ee69ebb7065f7ad49d24", - "0x00000000000000000000000000000000001cbb1e4420739c580a8ddde8b93cf6", + "0x000000000000000000000000000000ec3268d2915a5187af550434e44aa25dcb", + "0x00000000000000000000000000000000000228a28a4c8ca7f74996a8c6984697", + "0x000000000000000000000000000000efc73380fcc3f615a0358041e5b4d28ae6", + "0x00000000000000000000000000000000002d515e1a139718d91e5728b118e629", "0x0000000000000000000000000000006241ca0c75be2d15e6b9188983d6b41e2d", "0x00000000000000000000000000000000001a71ab9767b295f9337074850d2d40", "0x000000000000000000000000000000ec7f970d2da2ca7f41836eb044f5a75b01", @@ -155,28 +155,28 @@ vk_path = [ "0x00000000000000000000000000000078f4b3bc61f19d6e7069359bbf47e7f907", "0x00000000000000000000000000000000002d7c18a93c3dae58809faaeec6a86a" ] - hash = "0x23a2a161bf6411223041b53e3dfc9b62249771587188adefd16695b0361456ce" + hash = "0x2a8d97659dc393aead47ffc8bcc582fa8446c7c2cc7b32b57028dea23ecb9166" [previous_kernel_public_inputs] min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000003" is_private_only = true -claimed_first_nullifier = "0x281fee20d8354147ce54e1186a5312d51ef0d7bf7a6f40f61ed5e150948b79c0" +claimed_first_nullifier = "0x25f17738bb49817d35b62766c4029c7358c66663cf81eb2fc79e99eb98adc9c0" [previous_kernel_public_inputs.constants] - vk_tree_root = "0x130ae70545763dadb59caeb820400cffc41df59bcc2b8731917644f247717686" - protocol_contract_tree_root = "0x2f9edcbdd0cfc67764aa32cdef9ea44f2914b44bfd9cf77d518a5ac172e7f9e4" + vk_tree_root = "0x090a6edbf45a7a953c0f356db0ffd532e057797163ef6dc5d4cfa852cb0aaa2c" + protocol_contract_tree_root = "0x2d5d4db09f9cead586c3d27ff21023e98615d9afc7740037a3d411f7aa3c1e96" [previous_kernel_public_inputs.constants.historical_header] - total_fees = "0x0000000000000000000000000000000000000000000000000003a83222de8a00" + total_fees = "0x0000000000000000000000000000000000000000000000000003a831c6a84280" total_mana_used = "0x0000000000000000000000000000000000000000000000000000000000004a40" [previous_kernel_public_inputs.constants.historical_header.last_archive] - root = "0x082bf9a6382021ca9fa204bdbc71fd5536d84358e57a61f129fdf5bfb228c06f" + root = "0x26539d26af96d95bbb572600a75cac167b3d1c1b1463d7a37f36a17a8d06ed6a" next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000008" [previous_kernel_public_inputs.constants.historical_header.content_commitment] num_txs = "0x0000000000000000000000000000000000000000000000000000000000000001" - blobs_hash = "0x00310bb50f2202183669b8a85c09986fd69c203fee7d32e06dd1b46c84b20a7d" + blobs_hash = "0x00766b5deaa18a777a6519ed05b5ab8360ac4c4b8ba6b207d8cabb2ff48d8c4b" in_hash = "0x00089a9d421a82c4a25f7acbebe69e638d5b064fa8a60e018793dcb0be53752c" out_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -185,33 +185,33 @@ root = "0x2e33ee2008411c04b99c24b313513d097a0d21a5040b6193d1f978b8226892d6" next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000080" [previous_kernel_public_inputs.constants.historical_header.state.partial.note_hash_tree] -root = "0x2596f3d6b05b7055c3c5ab89de6e270b653cb30c3dd6b9cfd230ff41b5ffa623" +root = "0x00893d1239f1319771e840ed89e26356efb7a175b5d14215f16d2f3f73b61de0" next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000240" [previous_kernel_public_inputs.constants.historical_header.state.partial.nullifier_tree] -root = "0x15205da8ec6fc0317cee4482de04084768078d73397e7f466c11c45c2cb66bac" +root = "0x0cf60cbdd1d63166e082dafba02571914ee2e2b63f16a0088f4bc35f9141063f" next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000002c0" [previous_kernel_public_inputs.constants.historical_header.state.partial.public_data_tree] -root = "0x2841d0ae135bd8bf3761f919c16b9e5cf7ad4b3035328f65bf84ee2dc599aed6" -next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000097" +root = "0x21adba011a03e24b92611d690dcc4d6b77d39beddf5d2ec763554cc2e96d8b87" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000009a" [previous_kernel_public_inputs.constants.historical_header.global_variables] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x0000000000000000000000000000000000000000000000000000000000000001" block_number = "0x0000000000000000000000000000000000000000000000000000000000000008" slot_number = "0x0000000000000000000000000000000000000000000000000000000000000022" - timestamp = "0x00000000000000000000000000000000000000000000000000000000678ac01a" + timestamp = "0x0000000000000000000000000000000000000000000000000000000067aa83d7" [previous_kernel_public_inputs.constants.historical_header.global_variables.coinbase] - inner = "0x00000000000000000000000017ad47b9f14dc201975cca47fea765e5d42f0b72" + inner = "0x000000000000000000000000510b7559c009aa23c667441544126add2fded29c" [previous_kernel_public_inputs.constants.historical_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.constants.historical_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" - fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000c9bd3a5e8" + fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000c9bd267fa" [previous_kernel_public_inputs.constants.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" @@ -227,7 +227,7 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000005b8d80" [previous_kernel_public_inputs.constants.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" -fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000c9bd0959c" +fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000012e9bb9bf7" [previous_kernel_public_inputs.constants.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -239,11 +239,11 @@ _value = "0x0000000000000000000000000000000000000000000000000000000000000000" [[previous_kernel_public_inputs.validation_requests.note_hash_read_requests]] [previous_kernel_public_inputs.validation_requests.note_hash_read_requests.read_request] -value = "0x0493504d7e2628c6f4c13f91240ac2aeff1175f772039af764ebced0da4326e4" +value = "0x0c47e69105b67dbd03e93f15fe5df88c538b68152d54ebe3bf44d35a538b9d36" counter = "0x0000000000000000000000000000000000000000000000000000000000000002" [previous_kernel_public_inputs.validation_requests.note_hash_read_requests.contract_address] -inner = "0x238db6644a299b7b33993c163a0b3f3f3aaeca32f9d0f9d0328c1615d7efb8a5" +inner = "0x261174ae4897ef34adb44dc66d962b6780504d1b1067c0b61e54e80de220d2d0" [[previous_kernel_public_inputs.validation_requests.note_hash_read_requests]] [previous_kernel_public_inputs.validation_requests.note_hash_read_requests.read_request] @@ -2739,7 +2739,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [[previous_kernel_public_inputs.end.nullifiers]] [previous_kernel_public_inputs.end.nullifiers.nullifier] -value = "0x281fee20d8354147ce54e1186a5312d51ef0d7bf7a6f40f61ed5e150948b79c0" +value = "0x25f17738bb49817d35b62766c4029c7358c66663cf81eb2fc79e99eb98adc9c0" counter = "0x0000000000000000000000000000000000000000000000000000000000000000" note_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -4883,7 +4883,7 @@ counter = "0x0000000000000000000000000000000000000000000000000000000000000000" inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [[previous_kernel_public_inputs.end.private_call_stack]] -args_hash = "0x166e357b48d9e320bc83c169c41e4beb5635fa0adf7634bf88e326caf1d6500c" +args_hash = "0x1cac5c4f1f80be5521468340086ab60a9aa24629d06fbc3575bdbb8397371f94" returns_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000003" end_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000c" @@ -4892,13 +4892,13 @@ end_side_effect_counter = "0x000000000000000000000000000000000000000000000000000 is_static_call = false [previous_kernel_public_inputs.end.private_call_stack.call_context.msg_sender] - inner = "0x238db6644a299b7b33993c163a0b3f3f3aaeca32f9d0f9d0328c1615d7efb8a5" + inner = "0x261174ae4897ef34adb44dc66d962b6780504d1b1067c0b61e54e80de220d2d0" [previous_kernel_public_inputs.end.private_call_stack.call_context.contract_address] - inner = "0x1f3f85b45ea6c7be79b6e4948002182167732a202d83e1dba67b53f676583c83" + inner = "0x27581b7f11d6e97d5aa29a88c9d06d5fd073e619af7da445d51619956fde6c68" [previous_kernel_public_inputs.end.private_call_stack.call_context.function_selector] - inner = "0x000000000000000000000000000000000000000000000000000000009462d279" + inner = "0x000000000000000000000000000000000000000000000000000000000c508454" [[previous_kernel_public_inputs.end.private_call_stack]] args_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -5043,13 +5043,8 @@ end_side_effect_counter = "0x000000000000000000000000000000000000000000000000000 inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [private_call] -contract_class_artifact_hash = "0x15414f6e022d2a3762d8c41f5a6e75b7f3e26efe3ba13e6600c7f89e048a5ad6" -contract_class_public_bytecode_commitment = "0x304f7153a18c819c6c02dfeb305a78fd590e90f6025cd590c247f90550c6fa88" -protocol_contract_sibling_path = [ - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000" -] +contract_class_artifact_hash = "0x2afacaaea7c332e3c765b32d69e4e0b98c1a89151372048ff76aa250ff302645" +contract_class_public_bytecode_commitment = "0x1d991be1124ab8654b93432ca1c6345e2dd272d018b57f9355b90e75b8e691ba" acir_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" [private_call.vk] @@ -5077,30 +5072,30 @@ acir_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000003bdf7db1ff2537303be867170cd4f20949", - "0x00000000000000000000000000000000000e249c643ba2cc9ce795e6a48c9014", - "0x000000000000000000000000000000933343a82c3246a8c6eedd7d4848da5b3a", - "0x000000000000000000000000000000000019eb16c922d67c482bb3675011f001", - "0x0000000000000000000000000000009bc0e6e0876d1e77c66c1e0dac0ac406cb", - "0x000000000000000000000000000000000006001c1053b3d2f54571a3d120c6e8", - "0x000000000000000000000000000000f925cdc9eeb2a03bcfae68ba87d419a64e", - "0x00000000000000000000000000000000001a17bc96707562869ede7b03eab1ee", - "0x00000000000000000000000000000074a721ef95c5c96e50c80bb4510583766c", - "0x00000000000000000000000000000000002ae7f9faf5fc385ae8adac3ecb4d38", - "0x0000000000000000000000000000006a47b624e274bab5652785eb8f7484341f", - "0x00000000000000000000000000000000002a7a550eec650f34dfda3cc3db02a4", - "0x000000000000000000000000000000913a686c5615f6cb8af07d2a77c8615235", - "0x000000000000000000000000000000000007c76949ec83c3137d67296f72cd48", - "0x000000000000000000000000000000ea2349c07364d4e7887d07ff5eb2391daa", - "0x0000000000000000000000000000000000088fd727a67a4993308b04d3f11522", - "0x0000000000000000000000000000001384c0f821f019503c4fc5f1fb2118f5d6", - "0x00000000000000000000000000000000001786c4b865cfc9c4405712e13e695c", - "0x00000000000000000000000000000037f48c686d003ee7c1665b2b28bf8affef", - "0x000000000000000000000000000000000023b7a1f2b950a2717a9fbe02a0ed22", - "0x000000000000000000000000000000b871965291f4912fd8526f10fe4a317052", - "0x0000000000000000000000000000000000200b4c60a6ca7471776ffd99f0abe3", - "0x00000000000000000000000000000046a17d69acd4e67fbe993aeeb6706bf751", - "0x000000000000000000000000000000000024b83c337969a1e73f0e9d5e0e7c55", + "0x000000000000000000000000000000ba17c246b3c6daca90edb0c9ce41c111da", + "0x000000000000000000000000000000000008cee1e4bf6a75a00437d71577496b", + "0x000000000000000000000000000000f09480d76662107c123881d6b90fb512a2", + "0x000000000000000000000000000000000003fbd9cbd151ae4101fc070fc18e9d", + "0x0000000000000000000000000000000304eccc6b1a39c66cdf1fa0a59f22448e", + "0x000000000000000000000000000000000011bf15ce7adbc3b63127ac28664011", + "0x00000000000000000000000000000012e5d2e1a8dc5ac7dff8215dd13a5e2709", + "0x00000000000000000000000000000000002f28afcb501fd28f4abd1bbb1444eb", + "0x000000000000000000000000000000d3d5c80d5dcb852524cc5ffd828ab1ed63", + "0x000000000000000000000000000000000014cd140237dc4b1f933f278c5d92db", + "0x000000000000000000000000000000601e3021acb959cc4d9b5dde91cc70b543", + "0x00000000000000000000000000000000001c64290aadfaac3a0d277cfdd8c4c0", + "0x000000000000000000000000000000155c05b4114764261c6f7d2059b28357a0", + "0x0000000000000000000000000000000000138870f9d38994a12e44e43ce580a4", + "0x000000000000000000000000000000c72db81b6ca89afa144d921df87de656dc", + "0x000000000000000000000000000000000013c4546a63b009286df117ce76f2a0", + "0x000000000000000000000000000000a32b8e8b55f7d95c945f9118a7fac61b68", + "0x0000000000000000000000000000000000161441f405c774e696eabe792a7586", + "0x00000000000000000000000000000038d3d6cb581fe64ae791587b602a4faa73", + "0x0000000000000000000000000000000000292e29ef496f338bed5ff6dcbaa065", + "0x000000000000000000000000000000350e6ad9be45ffdd7b78c4fc9c034604d5", + "0x00000000000000000000000000000000000d80d89c7f09837129f90bf7dc0895", + "0x000000000000000000000000000000b3580f0ad362117183fb5a59ece9f2bb10", + "0x00000000000000000000000000000000001e92536aa2e57ef09a922e091fcbc5", "0x000000000000000000000000000000552393d09533e1b2004bd84e9f8a53a88f", "0x00000000000000000000000000000000000456bb701b5b0b463bbcf0c4fe7190", "0x00000000000000000000000000000074156481e9a3f8f091d30db1003a6daab4", @@ -5109,62 +5104,62 @@ acir_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x0000000000000000000000000000000000298c3311fc9170f92de940b042aab9", "0x000000000000000000000000000000bf37537eb196b05c1d98fa51016a9bacbb", "0x000000000000000000000000000000000007b05f408a612847259016b9204ae4", - "0x000000000000000000000000000000bf7fa9c277c8b0222f5741a5bf95ab65fa", - "0x0000000000000000000000000000000000057554fc0b3da260f08fe4d1dc736e", - "0x000000000000000000000000000000659ebab7bc9c53a3ae317a50ffb57326ec", - "0x0000000000000000000000000000000000083d9fb556aff1dc091afcbc4e3e87", - "0x000000000000000000000000000000027b52191c8aca7a5be9b82c40ef4fc75a", - "0x00000000000000000000000000000000001abeeca613b18d4232b379345a81e0", - "0x00000000000000000000000000000089b585c8587baadcbcb83d7b9ddf0c475a", - "0x000000000000000000000000000000000004d0bf2c341ef5362969078cb4c087", - "0x00000000000000000000000000000051a87cef6fc1fc139c638070eeb6332e56", - "0x00000000000000000000000000000000002f54bb0062b7d1188f56014b559e12", - "0x0000000000000000000000000000008b54df63e7e28a33d41f9da53348df041e", - "0x000000000000000000000000000000000012e92e36a0c7a2bcdf5fc5556a4359", - "0x00000000000000000000000000000094cbf780f4134b698bf7f5b1fcdcad4218", - "0x0000000000000000000000000000000000113ca8d354541fa79cad64fcedbc88", - "0x000000000000000000000000000000df5a0e52dee5b07510fef30dc58ecacf15", - "0x000000000000000000000000000000000006c8fa942e2eec5728e8ff33fff291", - "0x0000000000000000000000000000001a11657db53c31cd6a8fcec994a3158927", - "0x00000000000000000000000000000000002613389312f17bf8200d7417eaf411", - "0x000000000000000000000000000000c15d6ac79bcca289a93da1a9ac6fdb27ea", - "0x000000000000000000000000000000000012e0eb64e8ecd9386e72ff809830cf", - "0x000000000000000000000000000000c99eaa58fe0c7882af7a4362d48b1f38ae", - "0x000000000000000000000000000000000007b22301f910a411020601992dd510", - "0x0000000000000000000000000000005a902f70f203e3f78a3d386e76063e9342", - "0x00000000000000000000000000000000002c5386267d0dc48fde623519d73f6f", - "0x000000000000000000000000000000a8b8826ddefdec361c493b85e80af5e818", - "0x000000000000000000000000000000000010a01f3102e35e8dfe664efdc09c9e", - "0x000000000000000000000000000000efd8f11cd513ffb019426cdebcbe0c0a02", - "0x000000000000000000000000000000000009401fc4a3743c8417f2735f7b1a14", - "0x000000000000000000000000000000857c369073bf2d97f6e80d1df5bf336ad5", - "0x00000000000000000000000000000000000d479d048221d823f196f0cf6e462b", - "0x0000000000000000000000000000007b07b5028dbfe2a9ca4af2867fa142a3ea", - "0x0000000000000000000000000000000000041f7963140cf6900ddf687bb85e52", - "0x0000000000000000000000000000005a160094e4af7ff1564fd8830634bdf888", - "0x00000000000000000000000000000000000eb846b83b2ac3275a04e3e0e28203", - "0x0000000000000000000000000000004e60a98a3b99be5bde12cecf3a56b65c61", - "0x0000000000000000000000000000000000077acc807b84e48d68f261b3ecfb1e", - "0x0000000000000000000000000000001e937a7281020a557d906e9ac9f221a17a", - "0x0000000000000000000000000000000000291f84227889d040b7a6e739c890ed", - "0x00000000000000000000000000000053c118a34b4851610d80e50083b98272e5", - "0x000000000000000000000000000000000013ecdb14d48a8852d009fb403bc1ca", - "0x0000000000000000000000000000003cabfec95eed026483a697f8790150af7f", - "0x00000000000000000000000000000000001f4374d8e970c4898226e6e58feb74", - "0x0000000000000000000000000000000541e71410607a56d161f6b6c96cce96d7", - "0x00000000000000000000000000000000001c4881d7a7db6937a443981d951910", - "0x0000000000000000000000000000005060492f10be18b4455cb07a8b31ac7456", - "0x0000000000000000000000000000000000054763cb2b5fd4fbe3fac8526365f1", - "0x000000000000000000000000000000e67471001887b1154781b45f00083eab69", - "0x00000000000000000000000000000000001241c629327270322eddf420334224", - "0x000000000000000000000000000000ea0f153b38032c5b76433c2a0b8e38bc8f", - "0x00000000000000000000000000000000001e6d72c8d8ebc142e892a8eda4a52a", - "0x000000000000000000000000000000c0817f2462bd4fb3224670822255612822", - "0x00000000000000000000000000000000001b27509da5b256524a89816419bac9", - "0x0000000000000000000000000000004a235a960857ae76c2fd5da68e619b06ae", - "0x00000000000000000000000000000000001c76a05a30fbf6653a46db5fa4c467", - "0x0000000000000000000000000000005eaaa79d85433cb15a3ac41b49a4df2383", - "0x000000000000000000000000000000000020472c312cba098038a94fdfc52fbd", + "0x000000000000000000000000000000939bf1a5b7809d8b01f3644d25320c1057", + "0x00000000000000000000000000000000000bb9c327c5c46150d6a9f881da3f97", + "0x000000000000000000000000000000373deb6abda4cbd0aeb599f5e2cbc8c7d0", + "0x000000000000000000000000000000000008853658bb9a976b9c5759f6e4a7a7", + "0x000000000000000000000000000000c0dde24b40843332cba16e5819b70252e8", + "0x000000000000000000000000000000000028d8801d55f465e503ea406c01aba5", + "0x000000000000000000000000000000948b3a2c03a15b1cefaf61a304e4a719da", + "0x000000000000000000000000000000000003b7cfd2b82a92094655eebf43f587", + "0x00000000000000000000000000000027e9ad698de14515bc8d1b6cae9fbad57f", + "0x00000000000000000000000000000000001c0a8b31ac9b62bed2b663095c7c6d", + "0x00000000000000000000000000000032be17a5c7ec6f478466d2a20658a26691", + "0x00000000000000000000000000000000000ad876deed75f59e602b4310acca72", + "0x000000000000000000000000000000823ca734148f958a26e328b3f7742ea48c", + "0x00000000000000000000000000000000000327674919840515cc9adc69a08fca", + "0x0000000000000000000000000000003b11524c9317fca9485e116204c763b8b4", + "0x00000000000000000000000000000000001bfe8c3873c37bf972dcc81e0f31f9", + "0x0000000000000000000000000000002ac5cca6118d139ec7f25a9b76a5ddcafe", + "0x0000000000000000000000000000000000234c4d5c9182f86728981254d9b542", + "0x00000000000000000000000000000073e9bec3d89f0a089185e5c495abc03f49", + "0x00000000000000000000000000000000000e8e66e8280d22daafda145be28759", + "0x000000000000000000000000000000fdf638672b651ed51efc005c104462f0e6", + "0x0000000000000000000000000000000000080352ea8b7367481b2706ade1e8dd", + "0x0000000000000000000000000000000fb762794564a807d2fe4f1796aeb91374", + "0x00000000000000000000000000000000002fb18b04275219efb2d8b9993ac5a4", + "0x000000000000000000000000000000de088cc8c0527b80157b779e36b5584684", + "0x00000000000000000000000000000000002b2479dba4b8536cad4536a76772eb", + "0x00000000000000000000000000000088f079ceae5b612632d0f90ff9870eb518", + "0x000000000000000000000000000000000012dc0d37f799f65987161df01f2725", + "0x00000000000000000000000000000035dbe3c0ad6adec423daf4f4d006fc2107", + "0x000000000000000000000000000000000013be267471ce48c6fc419ed2c4f448", + "0x00000000000000000000000000000058f3c8b2d3fa8d27c7e9d00a30ab43cc10", + "0x0000000000000000000000000000000000013c74cd0d5d7b5b5d5c9efe463700", + "0x000000000000000000000000000000cc57f7a6fd16721223c06423fe824d808b", + "0x00000000000000000000000000000000002b7ed029a6fd2bb3aea57c910f4ce5", + "0x000000000000000000000000000000e160b523de9603e839cde7f13fa3b33f01", + "0x000000000000000000000000000000000026d602349ce611d3a0a13e99ff39f1", + "0x0000000000000000000000000000009a937ef599676d703f16e420f8ff58bf67", + "0x00000000000000000000000000000000000953bb1e7b32d830c5287273593692", + "0x000000000000000000000000000000ec2a55268e5541e16ef75936b7ef712da4", + "0x00000000000000000000000000000000002fb62718859b835874d34b239520a6", + "0x000000000000000000000000000000f0e554bf0a57474980d6587c90240108df", + "0x00000000000000000000000000000000001b59c63da545cf00a79032128aad3b", + "0x000000000000000000000000000000a96e68b12d0a7e2b6f8ce543e2bb429461", + "0x00000000000000000000000000000000000a7bc231143365bea08a875a15ae48", + "0x00000000000000000000000000000041faf11f15be8c711e2d6788919ca8a678", + "0x00000000000000000000000000000000001765e8b8b608510cac4df5441fee72", + "0x00000000000000000000000000000080166245f4c87e53148ccee1e5b9df2e64", + "0x000000000000000000000000000000000009580fbf9ea8ea3f770c1319f80570", + "0x000000000000000000000000000000a29e551e64e61881d2ab207e14e541fa97", + "0x00000000000000000000000000000000002e5d31bfdd37c018b0b3044580e4b3", + "0x0000000000000000000000000000007bf40e2a38bcfcea5c03729bb156a3e737", + "0x00000000000000000000000000000000000d5cb0eea228961fe7367c81bea0f7", + "0x0000000000000000000000000000007b6209c1a43ffce20c3fac25735bf423bc", + "0x00000000000000000000000000000000000d03c063cb3753b1fd740dc307ef61", + "0x00000000000000000000000000000067acda10350e2f21b2cf23eb60638577ae", + "0x00000000000000000000000000000000000324b34c98af03b9a5a00231efa4b8", "0x000000000000000000000000000000f6f4596202301b6ae4eb0ebbeadd203340", "0x00000000000000000000000000000000000adc89c48d75b571636f5bbeb4a806", "0x00000000000000000000000000000000034e3e27454ef992b4bf84b97baa7471", @@ -5173,10 +5168,10 @@ acir_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x00000000000000000000000000000000002e25783551df50c004ec7cd1f4dd8b", "0x000000000000000000000000000000e8258f84477c1b62565a559ba7bb38832e", "0x000000000000000000000000000000000018f76cf0ceeccb4798de741ae89b64", - "0x0000000000000000000000000000001583b176f599e192d7119354034419e8f9", - "0x000000000000000000000000000000000004706a0e23ac32a3566907fb872362", - "0x000000000000000000000000000000d1b9992279342fce9a883849693fcda22a", - "0x000000000000000000000000000000000029046b299293cb09c593372eb6b3e6", + "0x000000000000000000000000000000353d43fa70e99239c1c1c67e271a0eeac5", + "0x00000000000000000000000000000000002d299fb68678d0150bcc5b16dc8252", + "0x0000000000000000000000000000002814ede7cd27daed00c33c12860bc4b046", + "0x000000000000000000000000000000000015d3ac5a199abb74933a4efc98c59b", "0x000000000000000000000000000000469680c270e551515344592f59188fa765", "0x00000000000000000000000000000000002d38d6d4ba1e4763a74ecdb11ca1f3", "0x000000000000000000000000000000fce917c0d5dca019477c52f6075332b612", @@ -5185,10 +5180,10 @@ acir_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x00000000000000000000000000000075f2056228f93bf0d873a60a684060bac7", - "0x00000000000000000000000000000000000ed6a9d48ed84a9718a64975641bc6", - "0x0000000000000000000000000000009698bf13611dd2109f6494f3e1a33c6383", - "0x0000000000000000000000000000000000116b3f49fd12a2708f94254c90529e", + "0x000000000000000000000000000000ba6eceb4a88fd5005334c5194c00506c85", + "0x00000000000000000000000000000000002fcc8b2bd2f3a85f1929b70c55add2", + "0x000000000000000000000000000000603adb125ea1222b105d309b4e151b3f67", + "0x000000000000000000000000000000000016acc112d291730189e913ba819edf", "0x000000000000000000000000000000b5c1eac95b264c302dc854e6f22d7330df", "0x00000000000000000000000000000000000fcbbf9d3cf402baa3eeda5f0a9e49", "0x000000000000000000000000000000def9d58fc2920836194261f7b163fefbaf", @@ -5198,15 +5193,15 @@ acir_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x00000000000000000000000000000078f4b3bc61f19d6e7069359bbf47e7f907", "0x00000000000000000000000000000000002d7c18a93c3dae58809faaeec6a86a" ] - hash = "0x0357b1c540f5af4835a03e641e58f894fd8cae860097f0525cb52fb35ca59f75" + hash = "0x1f136008f15076069fefca2d3d5aef5cf09266b34ac5a0d5aa1f2bb3db3d5f83" [private_call.function_leaf_membership_witness] - leaf_index = "6" + leaf_index = "1" sibling_path = [ - "0x1a9373cc06d328dbb65d4da16d226ed8537ae2bc7c72840f10906095000e7541", - "0x17fa0fe6dbc546b83cd4c651d2b13a4fed404f198edff542128745b162413615", - "0x11763591ea4405c8e7d6c73b334fe4bab9e00287a58522b8bd7424e46e73e7fe", - "0x182358ea0fc90d11dbd0cd2d57a39099441f17abd2b7c084f99af71f51f80c83", + "0x1ad6f5048722d3b1d70eb9fc3134002fd74631a10f404b3b88a11fbea98b8c81", + "0x1cd3f5bd4a2737ce75dc0909b13078f90df57ba65c204ad9dec43a7d453a4946", + "0x0775cab0d259e9759af58a730f46a8edc0ef0d8c5cb42a7e591893f79b2574bf", + "0x3012fd3ea84e29e5ab0c6c4ddc1a5654faeb5ff9a4970babc8e01f48cbb4862a", "0x2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854" ] @@ -5231,10 +5226,22 @@ y = "0x2039907fe37f08d10739255141bb066c506a12f7d1e8dfec21abc58494705b6f" is_infinite = false [private_call.salted_initialization_hash] - inner = "0x298ab83b1d9ebb322d2a8acebe7c4ed7be5cacabc4e96cbee49db1962a0ab3ae" + inner = "0x0477be87dc567110841df2d0210e046e53001ef02159517957ec8196d77b2064" + + [private_call.protocol_contract_membership_witness] + leaf_index = "4" + sibling_path = [ + "0x0a023db51e9a9cb41b0be9faf146bb5094ba54e357af710364633a00ea424d2e", + "0x11efc1ff409140e05eca73a2df30bfbdae0130b92a6ed2f7d7e1a61eb23d3e6d", + "0x0bc88163a1fe70904187f6352ec107398d353293f0e0010f4c615871d679da6a" +] + + [private_call.protocol_contract_leaf] + address = "0x237a0bac451ebac796b96dbe27ccfda5230e8c962b391b84b0304c3775e9e0c0" + next_address = "0x2946115660107c3ca9bea1e486452595999c3677e7aaeaa9ca898e0fbba0051a" [app_public_inputs] -args_hash = "0x166e357b48d9e320bc83c169c41e4beb5635fa0adf7634bf88e326caf1d6500c" +args_hash = "0x1cac5c4f1f80be5521468340086ab60a9aa24629d06fbc3575bdbb8397371f94" returns_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000003" end_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000c" @@ -5249,16 +5256,16 @@ _value = "0x0000000000000000000000000000000000000000000000000000000000000000" is_static_call = false [app_public_inputs.call_context.msg_sender] - inner = "0x238db6644a299b7b33993c163a0b3f3f3aaeca32f9d0f9d0328c1615d7efb8a5" + inner = "0x261174ae4897ef34adb44dc66d962b6780504d1b1067c0b61e54e80de220d2d0" [app_public_inputs.call_context.contract_address] - inner = "0x1f3f85b45ea6c7be79b6e4948002182167732a202d83e1dba67b53f676583c83" + inner = "0x27581b7f11d6e97d5aa29a88c9d06d5fd073e619af7da445d51619956fde6c68" [app_public_inputs.call_context.function_selector] - inner = "0x000000000000000000000000000000000000000000000000000000009462d279" + inner = "0x000000000000000000000000000000000000000000000000000000000c508454" [[app_public_inputs.note_hash_read_requests]] - value = "0x28fbb2cacdbe2324a0235f00f1ec191464ffb328d57e20c900cfb6bc12fd319a" + value = "0x08f8781e274eb24375d79f0c416592d1ab0a2efb7d98de7df34e02b79a6e606c" counter = "0x0000000000000000000000000000000000000000000000000000000000000005" [[app_public_inputs.note_hash_read_requests]] @@ -5322,7 +5329,7 @@ _value = "0x0000000000000000000000000000000000000000000000000000000000000000" counter = "0x0000000000000000000000000000000000000000000000000000000000000000" [[app_public_inputs.nullifier_read_requests]] - value = "0x1f3f85b45ea6c7be79b6e4948002182167732a202d83e1dba67b53f676583c83" + value = "0x27581b7f11d6e97d5aa29a88c9d06d5fd073e619af7da445d51619956fde6c68" counter = "0x0000000000000000000000000000000000000000000000000000000000000004" [[app_public_inputs.nullifier_read_requests]] @@ -5389,11 +5396,11 @@ _value = "0x0000000000000000000000000000000000000000000000000000000000000000" sk_app_generator = "0x0000000000000000000000000000000000000000000000000000000000000030" [app_public_inputs.key_validation_requests_and_generators.request] - sk_app = "0x15be083e9b2c85b0a8cc2a0712dcc938823ab5f6b869847c1e994435632a38b6" + sk_app = "0x1d53532e5fda4a97d8a4b38b69a3b49cbc1931494e79f2ad6208f6de19fc2ca7" [app_public_inputs.key_validation_requests_and_generators.request.pk_m] - x = "0x2bcd3866b5cfda1e4ec60ac07d18d963d3dc0312565f0bd87c57bee8b11a3d79" - y = "0x2a1698b41b5275c81f388c8197320a7f2c3ea6e00eff1b6fc766d37438813d91" + x = "0x2661813d6be5d3e5bea8100a26875f885511651e75a98a21aff9e9b8becc53c4" + y = "0x1933d05b68e5528f6c8e351e72903e1a3eb0a57cf0d0b6df2804c29c05e313c5" is_infinite = false [[app_public_inputs.key_validation_requests_and_generators]] @@ -5562,11 +5569,11 @@ _value = "0x0000000000000000000000000000000000000000000000000000000000000000" is_infinite = false [[app_public_inputs.note_hashes]] - value = "0x2cafbfeb3e7c909004b904102aac2a9582d346f0f6ada422f486492196051233" + value = "0x0d0bcf1778b423fa448569abe884025bdb00003af281644a46dc62a69cb5678e" counter = "0x0000000000000000000000000000000000000000000000000000000000000007" [[app_public_inputs.note_hashes]] - value = "0x04c273cbaf5afd1382819de56f33c8fb6e960bc09176f37a5dec40d502f12c62" + value = "0x1112b6e1a435c69a059ee937434a2910ebd291d0577b16351218ed9d55715035" counter = "0x0000000000000000000000000000000000000000000000000000000000000009" [[app_public_inputs.note_hashes]] @@ -5626,7 +5633,7 @@ _value = "0x0000000000000000000000000000000000000000000000000000000000000000" counter = "0x0000000000000000000000000000000000000000000000000000000000000000" [[app_public_inputs.nullifiers]] - value = "0x122ee8c7874eabb5cf1f69f00db2d410b655f0bcc53afa708021706364afd7ef" + value = "0x1bcf6d2a87ab8a04be01a1a4d580633f8e695b2e39953626dadc56baaa3c9551" counter = "0x0000000000000000000000000000000000000000000000000000000000000006" note_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -6084,24 +6091,24 @@ _value = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs.private_logs.log] fields = [ - "0x2e32a1bf9721ea7ac582e3b35e774ab60094ecc3fc2c5fbf0dcf5f7d6cee6698", - "0x0082cacdc0883affca92b2dcdb9af956f6192ef05474bc86076801abe666822d", - "0x00d1801f9babbb3bf5292c117d047dc797e5550d804a89c52184ffd0a935f86e", - "0x00b60ac0e97815ae9a3408cf73bd6adc29f81600000000000000000000000000", - "0x000000e356dd076944646a7d0d9b399c4729cbb98d26a8ffbe6e7c8c501f2963", - "0x00ee59e34e8f118e4708c1528c76cd147fabab02e60e4d2d217913e10f00cf2e", - "0x00cf8d899c4944ba06dcfc39316959288f7395416c20085969bf8e588bcd1fd7", - "0x00924f2f0452218bebfdf2b5c0444b4a0ef9f9a660f9aaee507e17cedded6fd2", - "0x0097264a024e3cfb8cceaef83f8f397ecca3289e2e3e9d00107bc4e2481eb661", - "0x003768fe926d5020575afa09cb17699ccc253f08d1e1a7ac978a04ba6b97f4b9", - "0x00b8e731bbd83bd780754094b6c9938ee6d0cc04dee604813bd725b2977d1bea", - "0x000c5f6307e12ee0744767333e0ca0648b4e2cf6650adf7153237e1087ceee46", - "0x00e20263558e8d451cd095bfa601a75224117229863974b73d4f5426474922cc", - "0x00f3e0caf71bf7f2aa33b92208a05524126aff183f9294c54ef463122672fcba", - "0x0096accd0b9908f8369cc1bc28fc54a759ca8d1ce0af0654513a7ecc1d50d271", - "0x00b69328094a64c3552d1728db429bcd73340cfa9459c6ce1ad6c56166a37dcd", - "0x00830ef479a9e5cc4e1b75f5589a0e2417f3a4cbc68ef1b370c4156b6d9a5f74", - "0x005bd7224a7f39b063c6e992ebe154e12281a01aebeffafd16d8577580e17d69" + "0x2f1a4571bbecb3e5a94b413bb949991e4b9f8dbf8b037ff79938bf66c824772f", + "0x2e7e6db25ca199941b566c81011b678ac55ed9ec7db1a8ade41681501416fbb1", + "0x000192d3aa0c6f18329790b83eec92467c0169560119b3f957f4e8daf0256c66", + "0x004d609dc5c37f07675e820d083f0d732d6ab4b6421f1252e15170aa20dee808", + "0x00646c903459c5e15f2c167dfc5820ef9d2b10b1ca3ab352aa2ae6f4da97576d", + "0x008777ab04c5f20472be4ee8f8dd42ba1f563fe204f22e8f21ef9e9b37290d4f", + "0x004701f4fda200cb91bf8f0dc9af531f99eb13455953bc15de0495568811fbf8", + "0x00e543b40ae4da5b350ae90178dc56f06084866a32f3066c70bd3b1b55ee98cc", + "0x00e0316bc8af8abb6980bd305d86980c1c471f6a512c4e13e839a4695116cb44", + "0x004cb6b1b5aa17a09f1ef466ef7e009e6ff8b21ab9705b7ffe8725a7a8fb7bea", + "0x288d372209bdfe1453fcbe658e90970e4930663e0800330e0845d585a1fbdc7e", + "0x1c80b5060ebd134a47e8d3e94d5865c63307257927c805348a9a64c6abd8ca4a", + "0x180afa1695d0a7330c94fc9aa246223bc6aa592780d10a40ada4ef3b6c9b1ba9", + "0x1cfdb5ea00b7ddc43eca05bbf11a1ea7e56cdffdc11a65911806e394484f66c2", + "0x02e04f6038a54b39481c1ea71206f0d0d54607d7186fbefd53ef54883ce5ef23", + "0x2b45382ee4d94cd5d861d46374f3f701a7408d895ee3df15172aff0fc49d8c59", + "0x161c269e7b16f27b20580ec7e4ee82c4327489759d24751246b395b58d1d8a26", + "0x29ff1d63ef709d8f352c4f432d1104e21d42ff7645a505f0838e4d1425f412b1" ] [[app_public_inputs.private_logs]] @@ -6110,24 +6117,24 @@ _value = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs.private_logs.log] fields = [ - "0x0a570547eb3932bde8012946db288e43d15b2b6201c4a8c24dcdc31e74317f07", - "0x00986014aa0a16f4050f9b72f252ad67e1ab7e54aefdd50024de0fbca090b7bd", - "0x00b83ab21999d102e579e42acd2ccb20eab1908950d6699b3055de76ddd747df", - "0x00f024650d7a651cea573bf424bca297e10d7800000000000000000000000000", - "0x0000002a523111425aa81aaadb0b44bf69b379981d2533f9c612c4e9a6fa5deb", - "0x009c9d8bc4a68e4492251e9ca642e5a2e5cd9a160a7f57e5e46cd98e8a505808", - "0x00de7309e6a91b41088b1a47e9552b8e451b6f43e96a5673218c634ab1c40133", - "0x007613a8fec9d559e9dafbf39b03a32a7ee26a4b25f25d9b9b91f1ce51282e0e", - "0x00161afa20c5fdeea686e623050f648706ff62faac4db9f29c3c93d118aaa8bf", - "0x00fcc00ff46b7169a3248e9db2abfe2eac468189ce75d99969e7e8a790975de9", - "0x00c37cf06c06b68337a440ce015dc36820269afc7c457b8ec73434fe68deb5c6", - "0x00ab73a1669860e535c58239484d1ef16a4212f773b247d244f4d5dbaa7a24d8", - "0x00e68f2b1ce5b4cd53193c1a530f771cc5c59763cbf5fd8f58d0d57403ebccd0", - "0x00ebf20948171df2bfecad0de722795ddc75b15937329af62e07e12e9e3114e6", - "0x00b5960ae83493a99bfbcad07b07e591604c5c78c0ea780089aaab639cdd677d", - "0x00e6e800c329d9ce3f246e256a1fe5fffe39728ec323130d530f40ced22148e4", - "0x00a62c81f757682c09e637fb6649a7ad1e8efc8ff594f4adaabca94ef67f9e21", - "0x005dfd4efd18389adce33c361be54c715d285c1022408a988813aa59ec2111df" + "0x20a27490917a65f3584e9de9a53cf94ed27d2985713e3fd92b1964155a5aa941", + "0x0cfb0c06e39a98be0cad6bdd87d6c4f72e69e50078661d9dda8a277e6be144b6", + "0x0000cb266e70b5e72397c6782ebffd1473d40a0c690f0c1fd8e7eb47901ff973", + "0x001c177d95cf9ed9d7984e0727b2cdf3b06e0b0b680483195a289845f72d6f62", + "0x00313dc69a806e1c4962266802a785e44ed643b53faaedbe56208591d1ed2217", + "0x00877f90361f0ccfb9997500d8728e34f32681c2699ba63407e86ad69e1857f4", + "0x005b6187563530deb9daa6f9a83a5d433ec43ef1be7b1513e7277a87fd91a154", + "0x007e388c05177f193f98b3c76b9d41cb4ccef040b60baffc43dd1eef57e5e5e0", + "0x00764be23ba7af2158dd7e6f7322edea051dc304322679a5bbc5c2f2ae6be1f1", + "0x00adb04b8f41f467ecf986b6aca54290931ac41e97d35eaa7596be00aa032dee", + "0x139d6cc6964570781f4358b6c80ac9ec692f9c4e6110a1fbc15642a21ec29dc7", + "0x254eab6ab95b59c502a0bba222073b4c9d2b1425564839a4367cfaa296329c71", + "0x203f8ae6dd34b9f317a2410dd96cb76f06ec1493561a5310dd94e2a8c60b7b23", + "0x2c77bb56250b2ad0b409bd2e99ee79c4ee090b0598ee201b39ee15c185b1fd1a", + "0x2252dc49994e710dd9089cafa3c3840fec26f6ad6df53b770fcdbff96ae71547", + "0x2a02170269e3b2ab57129b355b2e5fd05320c6f75ccba51a2b2bcdf944ca4551", + "0x2c59670c74189b47634fd078d42b0507b2a37ebdae83ba9dcdcd595f9a7857ad", + "0x2e0d6ec1e43b83f2e04f29701a9e62e48f13306b8155125e0328c481781a82d7" ] [[app_public_inputs.private_logs]] @@ -6136,24 +6143,24 @@ _value = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs.private_logs.log] fields = [ - "0x120392bb7b0f8a8074677a0ec94e240a1acee0d9907cd821664152e60c93ded7", - "0x000a6c12926cca2912dbb8ff8fda8181b0243de560be01d928228b9b3f1a3eaa", - "0x002382c13dba0643828b98521b34734036d3bfc97066aa008c6ccb06888be3f9", - "0x00611e40f1e790fe462bd800e2ba4f335997c000000000000000000000000000", - "0x000000410f6d6eafd70ac039270f357c36b0beb38cd7ef63c986a435473d0ed0", - "0x0080e268092c9b5762fa283d78988a06fc2f9c1aa35d5c10b0b4280028488f28", - "0x0089ae8feb56e222b42652d8e7a97aacff3a140a98c61cc4044698943665e1e2", - "0x002a2cb08a5146da9f6caddc991e623123a007f0603889dc0e212a94fd801cdc", - "0x0045cff3d9fd6cf35c993c420d998713e19a8c007decddec14f21c32fb5afc8b", - "0x000182adbb07469facd7de4ba531dc0ed7d5db96d5084de633dead278bab965e", - "0x00c63292d155b9d917e885f2b414d83f91c360334d6b22872b52ea1c023f4ee4", - "0x00534cffc48b9572de519f01c60f8e5e1f56007259230a461334d69767f92918", - "0x0087e035599cff2dc997de9f2dacd0f3e124834cd8af2f1e8aea643c58f04022", - "0x00cb91a242d997379360dfa4a194fdfa6e6055034c39978f5d569228b0f3059b", - "0x007ce93f5450d7bc0a8993a7a74fe1818e2dacce5c85c0dc453c63143a0f75ac", - "0x00c90b6bcb9ab012e79c6d3e847d1c1240f0be071e79aadb45da9af31831f945", - "0x0081b31045ee003463012d3ad5e35d8337ea5dd43ed60a77c8d1acdb6bd60446", - "0x004654374e9340c5024063ff6109dce7ea7bd88a834317d1e0a1a91435c13d0f" + "0x1e9e65c5548eda81eb560271e16bdc8b7226c4977fcca5b6f98785ca3a72aaae", + "0x00e201b276065a38c29239dc9aa9f9b83464e5644e20c6b86269ee51b5d85c3e", + "0x000108fc4c4d38edc45eec9395d983d9d18f7484f8dc381d36db48d0fddf2686", + "0x002ad850990f5b1eca9c7fd42cd800c669d188cb5e4ce7bb5b184e1bccfb7187", + "0x005447a194644dbf8cf8eb4ea7fa89da74e919aa8a4752384d07ad2a5250026c", + "0x00e12db84842df7d813f229483a799bfa5a5f96a67b4a9e36ef3652372d11a46", + "0x0061e3882c550f540391a8df29644855818e8ebcfbbbc7bdf9c083dc8bac1092", + "0x00873f73d9574fc2d7e603737e69c7e996a32f4bba7033372f8cdbbf88ca15fa", + "0x0081b20f8367c8590b13ca7051334dc524c6e095763bfb7211494fd8aa707b78", + "0x00bf647749d536e58dd19ff6c1826be7246c346ed26ab28d895f1cdcafe984b5", + "0x1e428ad029bdafd8ab8529db7ca7cd622e98a5dd0e3ea9ee380e8c06f2ee2607", + "0x16652f6254eae25950403464559440d5a730acf90d04744f70429f1c6576df5f", + "0x18732b50e18ec638f6340cd255ba6faf37f1d1bfdf03499735db311d58145e83", + "0x15dd7deccaca06ad53f1bd7559d0bc5e5adab25daadf611136113f6b1f6bb1bb", + "0x22cf7e85aac30fb819042ba11decd3df34aa8215d3963be43e95625362c8f3f5", + "0x05f79e7f32387f4505f023c22a7e457a7e78c407ace400ee8f82baf09cfbd293", + "0x0ed4f4286764d6a609cfea38082a0851331063604aca10ac483dfcf1711490c0", + "0x0501fd500c67848714d556c7f407b9f373aa13795e4fdbc096112f76aaac9502" ] [[app_public_inputs.private_logs]] @@ -6500,16 +6507,16 @@ _value = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs.historical_header] - total_fees = "0x0000000000000000000000000000000000000000000000000003a83222de8a00" + total_fees = "0x0000000000000000000000000000000000000000000000000003a831c6a84280" total_mana_used = "0x0000000000000000000000000000000000000000000000000000000000004a40" [app_public_inputs.historical_header.last_archive] - root = "0x082bf9a6382021ca9fa204bdbc71fd5536d84358e57a61f129fdf5bfb228c06f" + root = "0x26539d26af96d95bbb572600a75cac167b3d1c1b1463d7a37f36a17a8d06ed6a" next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000008" [app_public_inputs.historical_header.content_commitment] num_txs = "0x0000000000000000000000000000000000000000000000000000000000000001" - blobs_hash = "0x00310bb50f2202183669b8a85c09986fd69c203fee7d32e06dd1b46c84b20a7d" + blobs_hash = "0x00766b5deaa18a777a6519ed05b5ab8360ac4c4b8ba6b207d8cabb2ff48d8c4b" in_hash = "0x00089a9d421a82c4a25f7acbebe69e638d5b064fa8a60e018793dcb0be53752c" out_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -6518,33 +6525,33 @@ root = "0x2e33ee2008411c04b99c24b313513d097a0d21a5040b6193d1f978b8226892d6" next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000080" [app_public_inputs.historical_header.state.partial.note_hash_tree] -root = "0x2596f3d6b05b7055c3c5ab89de6e270b653cb30c3dd6b9cfd230ff41b5ffa623" +root = "0x00893d1239f1319771e840ed89e26356efb7a175b5d14215f16d2f3f73b61de0" next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000240" [app_public_inputs.historical_header.state.partial.nullifier_tree] -root = "0x15205da8ec6fc0317cee4482de04084768078d73397e7f466c11c45c2cb66bac" +root = "0x0cf60cbdd1d63166e082dafba02571914ee2e2b63f16a0088f4bc35f9141063f" next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000002c0" [app_public_inputs.historical_header.state.partial.public_data_tree] -root = "0x2841d0ae135bd8bf3761f919c16b9e5cf7ad4b3035328f65bf84ee2dc599aed6" -next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000097" +root = "0x21adba011a03e24b92611d690dcc4d6b77d39beddf5d2ec763554cc2e96d8b87" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000009a" [app_public_inputs.historical_header.global_variables] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x0000000000000000000000000000000000000000000000000000000000000001" block_number = "0x0000000000000000000000000000000000000000000000000000000000000008" slot_number = "0x0000000000000000000000000000000000000000000000000000000000000022" - timestamp = "0x00000000000000000000000000000000000000000000000000000000678ac01a" + timestamp = "0x0000000000000000000000000000000000000000000000000000000067aa83d7" [app_public_inputs.historical_header.global_variables.coinbase] - inner = "0x00000000000000000000000017ad47b9f14dc201975cca47fea765e5d42f0b72" + inner = "0x000000000000000000000000510b7559c009aa23c667441544126add2fded29c" [app_public_inputs.historical_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs.historical_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" - fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000c9bd3a5e8" + fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000c9bd267fa" [app_public_inputs.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" @@ -6560,7 +6567,7 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000005b8d80" [app_public_inputs.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" -fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000c9bd0959c" +fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000012e9bb9bf7" [app_public_inputs.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/private_call_data_validator/validate_contract_address.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/private_call_data_validator/validate_contract_address.nr index 09dbe9c9a01..2b1778572c3 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/private_call_data_validator/validate_contract_address.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/private_call_data_validator/validate_contract_address.nr @@ -1,6 +1,7 @@ use dep::types::{ abis::private_kernel::private_call_data::PrivateCallData, address::AztecAddress, - constants::MAX_PROTOCOL_CONTRACTS, merkle_tree::root::root_from_sibling_path, traits::ToField, + constants::MAX_PROTOCOL_CONTRACTS, merkle_tree::conditionally_assert_check_membership, + traits::ToField, }; pub fn validate_contract_address( @@ -22,23 +23,30 @@ pub fn validate_contract_address( private_call_data.public_keys, ); - let protocol_contract_index = contract_address.to_field(); - - let computed_protocol_contract_tree_root = if (MAX_PROTOCOL_CONTRACTS as Field).lt( - protocol_contract_index, - ) { - 0 - } else { - root_from_sibling_path( - computed_address.to_field(), - protocol_contract_index, - private_call_data.protocol_contract_sibling_path, - ) - }; + let contract_address_field = contract_address.to_field(); + let is_protocol_contract = contract_address_field.lt(MAX_PROTOCOL_CONTRACTS as Field); + // We either have a normal contract address, which must match the calculated address, or + // A computed protocol contract address which exists at the index held in call_context.contract_address. assert( - computed_address.eq(contract_address) - | computed_protocol_contract_tree_root.eq(protocol_contract_tree_root), + (!is_protocol_contract & computed_address.eq(contract_address)) + | ( + is_protocol_contract + & private_call_data.protocol_contract_membership_witness.leaf_index.eq( + contract_address_field, + ) + ), "computed contract address does not match expected one", ); + + // A non-protocol computed contract address is checked for non-membership below using protocol_contract_leaf as a low leaf. + // A protocol contract address is checked for membership below where protocol_contract_leaf contains the + // computed_address at the index given by contract_address. + conditionally_assert_check_membership( + computed_address.to_field(), + is_protocol_contract, + private_call_data.protocol_contract_leaf, + private_call_data.protocol_contract_membership_witness, + protocol_contract_tree_root, + ); } diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_init.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_init.nr index aabf248ca7d..59395030cbb 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_init.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_init.nr @@ -116,7 +116,7 @@ mod tests { tx_request: self.tx_request, private_call, vk_tree_root: FixtureBuilder::vk_tree_root(), - protocol_contract_tree_root: 0, + protocol_contract_tree_root: self.private_call.protocol_contract_tree_root, is_private_only: false, first_nullifier_hint: 0, } diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_call.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_call.nr index 75472d34de4..ccae9d794cc 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_call.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_call.nr @@ -59,11 +59,10 @@ fn validate_call_is_static_creating_contract_class_logs_hashes_fails() { #[test(should_fail_with = "only the class registerer may emit contract class logs")] fn validate_call_is_from_class_registerer_fails() { + // the default bulder address != REGISTERER_CONTRACT_ADDRESS let mut builder = PrivateCallDataValidatorBuilder::new(); builder.private_call.add_contract_class_log_hash(1, 2); - // set the contract address to be some msg sender (!= REGISTERER_CONTRACT_ADDRESS) - builder.private_call.contract_address = builder.private_call.msg_sender; builder.validate(); } diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_contract_address.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_contract_address.nr index dd7a5df1268..4c4a7f3c6d1 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_contract_address.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_call_data_validator_builder/validate_contract_address.nr @@ -85,6 +85,16 @@ fn validate_contract_address_protocol_contract_succeeds() { builder.validate(); } +#[test(should_fail)] +fn validate_contract_address_protocol_contract_computed_address_fails() { + let mut builder = PrivateCallDataValidatorBuilder::new_with_protocol_contract(); + // Swap the special address (0x01) with the computed address + builder.private_call.contract_address = + AztecAddress { inner: builder.private_call.protocol_contract_leaf.address }; + // Validate may fail with either one of the low leaf membership errors + builder.validate(); +} + #[test(should_fail_with = "computed contract address does not match expected one")] fn validate_contract_address_protocol_contract_wrong_index_fails() { let mut builder = PrivateCallDataValidatorBuilder::new_with_protocol_contract(); @@ -94,7 +104,7 @@ fn validate_contract_address_protocol_contract_wrong_index_fails() { builder.validate(); } -#[test(should_fail_with = "computed contract address does not match expected one")] +#[test(should_fail_with = "Key does not match the key of the leaf preimage")] fn validate_contract_address_protocol_contract_wrong_computed_address_fails() { let mut builder = PrivateCallDataValidatorBuilder::new_with_protocol_contract(); @@ -103,6 +113,24 @@ fn validate_contract_address_protocol_contract_wrong_computed_address_fails() { builder.validate(); } +#[test(should_fail_with = "Key does not match the key of the leaf preimage")] +fn validate_contract_address_protocol_address_wrong_low_leaf_key() { + let mut builder = PrivateCallDataValidatorBuilder::new_with_protocol_contract(); + + builder.private_call.protocol_contract_leaf.address += 1; + + builder.validate(); +} + +#[test(should_fail_with = "membership check failed")] +fn validate_contract_address_protocol_address_wrong_low_leaf_next_key() { + let mut builder = PrivateCallDataValidatorBuilder::new_with_protocol_contract(); + + builder.private_call.protocol_contract_leaf.next_address += 1; + + builder.validate(); +} + #[test(should_fail_with = "Invalid VK hash")] fn validate_contract_address_wrong_vk_hash_fails() { let mut builder = PrivateCallDataValidatorBuilder::new_with_regular_contract(); @@ -124,3 +152,12 @@ fn validate_contract_address_wrong_vk_fails() { builder.validate(); } + +#[test(should_fail_with = "membership check failed")] +fn validate_contract_address_regular_address_wrong_low_leaf() { + let mut builder = PrivateCallDataValidatorBuilder::new_with_regular_contract(); + + builder.private_call.protocol_contract_leaf.address += 1; + + builder.validate(); +} diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/private_base_rollup.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/private_base_rollup.nr index c2b379aa5ed..327da2273f4 100644 --- a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/private_base_rollup.nr +++ b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/private_base_rollup.nr @@ -340,6 +340,8 @@ mod tests { inputs.constants.global_variables.chain_id = fixtures::CHAIN_ID; inputs.constants.global_variables.version = fixtures::VERSION; inputs.constants.vk_tree_root = inputs.tube_data.vk_tree_root; + inputs.constants.protocol_contract_tree_root = + inputs.tube_data.protocol_contract_tree_root; inputs.pre_existing_blocks[0] = inputs.tube_data.historical_header.hash(); diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/public_base_rollup.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/public_base_rollup.nr index c8759045f9b..e3d8c499bca 100644 --- a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/public_base_rollup.nr +++ b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/public_base_rollup.nr @@ -224,6 +224,8 @@ mod tests { inputs.constants.global_variables.version = fixtures::VERSION; inputs.avm_data.global_variables = inputs.constants.global_variables; inputs.constants.vk_tree_root = inputs.tube_data.vk_tree_root; + inputs.constants.protocol_contract_tree_root = + inputs.tube_data.protocol_contract_tree_root; inputs.pre_existing_blocks[0] = inputs.tube_data.historical_header.hash(); diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/abis/mod.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/mod.nr index 76d414f3a99..8f2b3c32120 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/abis/mod.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/abis/mod.nr @@ -10,6 +10,7 @@ pub mod function_data; pub mod global_variables; pub mod note_hash_leaf_preimage; pub mod nullifier_leaf_preimage; +pub mod protocol_contract_leaf_preimage; pub mod tx_constant_data; pub mod combined_constant_data; diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/abis/private_kernel/private_call_data.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/private_kernel/private_call_data.nr index 37c1b1dca94..6dea5bcc94d 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/abis/private_kernel/private_call_data.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/abis/private_kernel/private_call_data.nr @@ -1,5 +1,8 @@ use crate::{ - abis::private_circuit_public_inputs::PrivateCircuitPublicInputs, + abis::{ + private_circuit_public_inputs::PrivateCircuitPublicInputs, + protocol_contract_leaf_preimage::ProtocolContractLeafPreimage, + }, address::SaltedInitializationHash, constants::{ FUNCTION_TREE_HEIGHT, PROOF_TYPE_OINK, PROOF_TYPE_PG, PROTOCOL_CONTRACT_TREE_HEIGHT, @@ -19,8 +22,8 @@ pub struct PrivateCallData { pub contract_class_artifact_hash: Field, pub contract_class_public_bytecode_commitment: Field, pub function_leaf_membership_witness: MembershipWitness, - pub protocol_contract_sibling_path: [Field; PROTOCOL_CONTRACT_TREE_HEIGHT], - + pub protocol_contract_membership_witness: MembershipWitness, + pub protocol_contract_leaf: ProtocolContractLeafPreimage, pub acir_hash: Field, } @@ -44,8 +47,8 @@ pub struct PrivateCallDataWithoutPublicInputs { pub contract_class_artifact_hash: Field, pub contract_class_public_bytecode_commitment: Field, pub function_leaf_membership_witness: MembershipWitness, - pub protocol_contract_sibling_path: [Field; PROTOCOL_CONTRACT_TREE_HEIGHT], - + pub protocol_contract_membership_witness: MembershipWitness, + pub protocol_contract_leaf: ProtocolContractLeafPreimage, pub acir_hash: Field, } @@ -63,7 +66,8 @@ impl PrivateCallDataWithoutPublicInputs { contract_class_public_bytecode_commitment: self .contract_class_public_bytecode_commitment, function_leaf_membership_witness: self.function_leaf_membership_witness, - protocol_contract_sibling_path: self.protocol_contract_sibling_path, + protocol_contract_membership_witness: self.protocol_contract_membership_witness, + protocol_contract_leaf: self.protocol_contract_leaf, acir_hash: self.acir_hash, } } diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/abis/protocol_contract_leaf_preimage.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/protocol_contract_leaf_preimage.nr new file mode 100644 index 00000000000..792a802a424 --- /dev/null +++ b/noir-projects/noir-protocol-circuits/crates/types/src/abis/protocol_contract_leaf_preimage.nr @@ -0,0 +1,66 @@ +use crate::{ + hash::poseidon2_hash, + merkle_tree::leaf_preimage::{IndexedTreeLeafPreimage, LeafPreimage}, + traits::Empty, +}; + +/** + Exists to show: + - Membership of a computed protocol contract address in the tree, or + - Non-membership of a computed non-protocol contract address in the tree + in private_call_data_validator/validate_contract_address.nr. + The tree is created never updated within the kernels, so we don't need the functions which update leaves. +*/ + +pub struct ProtocolContractLeafPreimage { + pub address: Field, + pub next_address: Field, +} + +impl Empty for ProtocolContractLeafPreimage { + fn empty() -> Self { + Self { address: 0, next_address: 0 } + } +} + +impl LeafPreimage for ProtocolContractLeafPreimage { + fn get_key(self) -> Field { + self.address + } + + fn as_leaf(self) -> Field { + poseidon2_hash([self.address, self.next_address]) + } +} + +impl IndexedTreeLeafPreimage for ProtocolContractLeafPreimage { + fn get_next_key(self) -> Field { + self.next_address + } + + fn points_to_infinity(self) -> bool { + // Unimplemented, not required + false + } + + fn update_pointers(self, _next_key: Field, _next_index: u32) -> Self { + assert(false, "Tried to update a static protocol contract index"); + Self::empty() + } + + fn update_value(self, _value: Field) -> Self { + assert(false, "Tried to update a static protocol contract address"); + Self::empty() + } + + fn build_insertion_leaf(_value: Field, _low_leaf: Self) -> Self { + assert(false, "Tried to update a static protocol contract address"); + Self::empty() + } +} + +impl Eq for ProtocolContractLeafPreimage { + fn eq(self, other: Self) -> bool { + (self.address == other.address) & (self.next_address == other.next_address) + } +} diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixture_builder.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixture_builder.nr index 55638754a9b..c6aa52b1a80 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixture_builder.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixture_builder.nr @@ -28,6 +28,7 @@ use crate::{ private_kernel::private_call_data::PrivateCallData, private_kernel_data::PrivateKernelData, private_log::PrivateLogData, + protocol_contract_leaf_preimage::ProtocolContractLeafPreimage, public_call_request::PublicCallRequest, public_data_write::PublicDataWrite, public_log::PublicLog, @@ -68,7 +69,7 @@ use crate::{ }, public_keys::PublicKeys, tests::fixtures::{self, contract_functions::ContractFunction, contracts::ContractData}, - traits::{Deserialize, Empty, FromField}, + traits::{Deserialize, Empty, FromField, ToField}, transaction::{tx_context::TxContext, tx_request::TxRequest}, }; @@ -160,7 +161,8 @@ pub struct FixtureBuilder { // Protocol contracts. pub protocol_contract_tree_root: Field, - pub protocol_contract_sibling_path: [Field; PROTOCOL_CONTRACT_TREE_HEIGHT], + pub protocol_contract_membership_witness: MembershipWitness, + pub protocol_contract_leaf: ProtocolContractLeafPreimage, // Tree snapshots. pub archive_tree: AppendOnlyTreeSnapshot, @@ -231,16 +233,37 @@ impl FixtureBuilder { } pub fn set_protocol_contract_root(&mut self) { - let tree = fixtures::protocol_contract_tree::get_protocol_contract_tree(); + let (tree, protocol_contract_leaves) = + fixtures::protocol_contract_tree::get_protocol_contract_tree(); + let contract_address_field = self.contract_address.to_field(); self.protocol_contract_tree_root = tree.get_root(); + for i in 0..protocol_contract_leaves.len() { + let leaf = protocol_contract_leaves[i]; + // The below is true if leaf is a valid low_leaf for self.contract_address + // This is used in validate_contract_address where is_protocol_contract = false. + if (leaf.address != 0) + & (leaf.address.lt(contract_address_field)) + & ((contract_address_field.lt(leaf.next_address)) | (leaf.next_address == 0)) { + self.protocol_contract_leaf = leaf; + self.protocol_contract_membership_witness = MembershipWitness { + leaf_index: i as Field, + sibling_path: tree.get_sibling_path(i), + }; + } + } } pub fn use_protocol_contract(&mut self) -> Self { let contract_index = 1; - - let tree = fixtures::protocol_contract_tree::get_protocol_contract_tree(); + let (tree, protocol_contract_leaves) = + fixtures::protocol_contract_tree::get_protocol_contract_tree(); self.protocol_contract_tree_root = tree.get_root(); - self.protocol_contract_sibling_path = tree.get_sibling_path(contract_index); + // This is used in validate_contract_address where is_protocol_contract = true. + self.protocol_contract_membership_witness = MembershipWitness { + leaf_index: contract_index as Field, + sibling_path: tree.get_sibling_path(contract_index), + }; + self.protocol_contract_leaf = protocol_contract_leaves[contract_index]; let contract_data = fixtures::contracts::get_protocol_contract(contract_index); let function_data = @@ -258,6 +281,7 @@ impl FixtureBuilder { self.public_keys = contract_data.public_keys; self.contract_class_artifact_hash = contract_data.artifact_hash; self.contract_class_public_bytecode_commitment = contract_data.public_bytecode_commitment; + self.set_protocol_contract_root(); *self } @@ -393,7 +417,8 @@ impl FixtureBuilder { contract_class_artifact_hash: self.contract_class_artifact_hash, contract_class_public_bytecode_commitment: self .contract_class_public_bytecode_commitment, - protocol_contract_sibling_path: self.protocol_contract_sibling_path, + protocol_contract_membership_witness: self.protocol_contract_membership_witness, + protocol_contract_leaf: self.protocol_contract_leaf, acir_hash: self.acir_hash, } } @@ -1141,7 +1166,8 @@ impl Empty for FixtureBuilder { vk_path: [0; VK_TREE_HEIGHT], vk_tree_root: FixtureBuilder::vk_tree_root(), protocol_contract_tree_root: 0, - protocol_contract_sibling_path: [0; PROTOCOL_CONTRACT_TREE_HEIGHT], + protocol_contract_membership_witness: MembershipWitness::empty(), + protocol_contract_leaf: ProtocolContractLeafPreimage::empty(), archive_tree: AppendOnlyTreeSnapshot::zero(), start_snapshots: TreeSnapshots::empty(), end_snapshots: TreeSnapshots::empty(), diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/contract_functions.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/contract_functions.nr index a2df67e162e..4536f4c8462 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/contract_functions.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/contract_functions.nr @@ -19,7 +19,7 @@ pub global default_private_function: ContractFunction = ContractFunction { membership_witness: MembershipWitness { leaf_index: 0, sibling_path: [ - 0x1eca11cd2abe68905eab86bc4f207cde29eb7c2b4c2c9b27e3d8c2f8b8234c87, + 0x1bf05aedcca6b9682341475d1edb718df1485e4071c6c2f3c4576eeb3f9988a6, 0x233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357, 0x0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614, 0x1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937, diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/contracts.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/contracts.nr index d5ce931c51f..cdb8708c373 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/contracts.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/contracts.nr @@ -23,16 +23,16 @@ pub struct ContractData { pub global default_contract: ContractData = ContractData { contract_address_salt: 0x000000000000000000000000000000000000000000000000000000000000ddd5, artifact_hash: 0x0000000000000000000000000000000000000000000000000000000000003039, - public_bytecode_commitment: 0x0000000000000000000000000000000000000000000000000000000000000005, - private_functions_root: 0x25d76df45434ec75a83321daf941cfc667ff3a9027942e17105da4f50d1d13f9, + public_bytecode_commitment: 0x2e018d154e7faf1ddf8400a4b3605574e69afc04425f3e662e054dc094fb0428, + private_functions_root: 0x168e5e38b7ad3da147014b180e32c133ebce0e11d6f021ab988404f5af466eac, address: AztecAddress { - inner: 0x0e66d7cd9692428c550b93c9ef5f49ca9f02c03e98cb3c922d8c773f78f79fed, + inner: 0x238cc30e81019daff2f0c67463c2c237afb6835cd0c365fdb6777a16bbe0a321, }, partial_address: PartialAddress { - inner: 0x0cf203c94c91bed28440b00ecd888d88cce1f86ddf2aa8d33acbb9b6fc06d382, + inner: 0x27d6fb74b2267a1a380da93091fceeb7724ecdd36a6770756b63002e577d9071, }, contract_class_id: ContractClassId { - inner: 0x28e91aaf764bc6083e2796ff884079ad895d4b948d6ce8f37f01b29d0bc95a21, + inner: 0x2788df97c3c49128ebd4bd4cc4819cca7877dc1a4f069e9b415d51c4b329e3b1, }, public_keys: PublicKeys::default(), salted_initialization_hash: SaltedInitializationHash { @@ -47,16 +47,16 @@ pub global default_contract: ContractData = ContractData { pub global parent_contract: ContractData = ContractData { contract_address_salt: 0x0000000000000000000000000000000000000000000000000000000000001618, artifact_hash: 0x00000000000000000000000000000000000000000000000000000000000004bc, - public_bytecode_commitment: 0x0000000000000000000000000000000000000000000000000000000000000005, - private_functions_root: 0x1228b39ba6702af03e595300e8484c6373f00790d0148cc3d4ff0fd1c778a83a, + public_bytecode_commitment: 0x258ed5ce21c3a9c15a1c6108ef0e759bb0617f2b505b8d64e927027d30e71791, + private_functions_root: 0x21ac15d1c4c74eb5ceb674a971451a6a314f00ee17571605d88555ebf6dc61c6, address: AztecAddress { - inner: 0x24415b2e716d6c7099580ab8e383fd5b16dc9fb441aa308571d8e24a2257da24, + inner: 0x0652e43af6645a9e5d9f370c30e0679e9933ca6db61e8e8892a2c8caf1742b22, }, partial_address: PartialAddress { - inner: 0x245df9f519d616473880260dd64b19a838081bb44dc17cd6ea5d870a63d2bf57, + inner: 0x0af7fac4aad94b9f6142b45730616d34bf28d0b310376d2d144d0828df56e585, }, contract_class_id: ContractClassId { - inner: 0x00236b0dc6c537d5106543053c5b85c4cbe95b0474f8238b094bae63f1cbcfee, + inner: 0x03112baad91c865ba6d7d431703935f852934379a80932b8713ee5e5f17bb594, }, public_keys: PublicKeys::default(), salted_initialization_hash: SaltedInitializationHash { diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/protocol_contract_tree.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/protocol_contract_tree.nr index 9ee173a1b7b..4339eb4e061 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/protocol_contract_tree.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixtures/protocol_contract_tree.nr @@ -1,16 +1,30 @@ use crate::{ - constants::PROTOCOL_CONTRACT_TREE_HEIGHT, merkle_tree::merkle_tree::MerkleTree, - tests::fixtures::contracts::get_protocol_contract, traits::ToField, + abis::protocol_contract_leaf_preimage::ProtocolContractLeafPreimage, + constants::PROTOCOL_CONTRACT_TREE_HEIGHT, + merkle_tree::{leaf_preimage::LeafPreimage, merkle_tree::MerkleTree}, + tests::fixtures::contracts::get_protocol_contract, + traits::{Empty, ToField}, }; global PROTOCOL_CONTRACT_TREE_WIDTH: u32 = 1 << PROTOCOL_CONTRACT_TREE_HEIGHT as u8; -pub fn get_protocol_contract_tree() -> MerkleTree { - let mut leaves = [0; PROTOCOL_CONTRACT_TREE_WIDTH]; +pub fn get_protocol_contract_tree() -> (MerkleTree, [ProtocolContractLeafPreimage; PROTOCOL_CONTRACT_TREE_WIDTH]) { + let mut leaf_preimages = [ProtocolContractLeafPreimage::empty(); PROTOCOL_CONTRACT_TREE_WIDTH]; - // Fake protocol contract addresses for testing purposes. - leaves[1] = get_protocol_contract(1).address.to_field(); - leaves[2] = 12341234; - - MerkleTree::new(leaves) + let contracts = + [get_protocol_contract(1).address.to_field(), get_protocol_contract(2).address.to_field()]; + let next_addresses = if contracts[0].lt(contracts[1]) { + [contracts[1], 0] + } else { + [0, contracts[1]] + }; + leaf_preimages[1] = + ProtocolContractLeafPreimage { address: contracts[0], next_address: next_addresses[0] }; + leaf_preimages[2] = + ProtocolContractLeafPreimage { address: contracts[1], next_address: next_addresses[1] }; + ( + MerkleTree::new( + leaf_preimages.map(|l: ProtocolContractLeafPreimage| l.as_leaf()), + ), leaf_preimages, + ) } diff --git a/yarn-project/circuits.js/src/merkle/index.ts b/yarn-project/circuits.js/src/merkle/index.ts index 87b32526900..a5b3e086389 100644 --- a/yarn-project/circuits.js/src/merkle/index.ts +++ b/yarn-project/circuits.js/src/merkle/index.ts @@ -1,3 +1,5 @@ export * from './merkle_tree_calculator.js'; export * from './merkle_tree.js'; +export * from './indexed_merkle_tree_calculator.js'; +export * from './indexed_merkle_tree.js'; export * from './sibling_path.js'; diff --git a/yarn-project/circuits.js/src/merkle/indexed_merkle_tree.ts b/yarn-project/circuits.js/src/merkle/indexed_merkle_tree.ts new file mode 100644 index 00000000000..2e8d0992518 --- /dev/null +++ b/yarn-project/circuits.js/src/merkle/indexed_merkle_tree.ts @@ -0,0 +1,37 @@ +import { Fr } from '@aztec/foundation/fields'; +import { assertLength } from '@aztec/foundation/serialize'; +import { type IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; + +import { MembershipWitness } from '../structs/membership_witness.js'; +import { MerkleTree } from './merkle_tree.js'; + +/** A simple immutable indexed merkle tree container. Use a IndexedMerkleTreeCalculator to create a new instance from a set of leaves. */ +export class IndexedMerkleTree extends MerkleTree { + constructor(height: N, nodes: Buffer[], public readonly leafPreimages: T[]) { + super(height, nodes); + } + + public getLowLeaf(value: bigint): T { + let lowLeaf: T | undefined; + this.leafPreimages.forEach(leaf => { + if (leaf.getKey() < value && (leaf.getNextKey() > value || leaf.getNextKey() == BigInt(0))) { + lowLeaf = leaf; + } + }); + if (!lowLeaf) { + throw new Error(`Couldn't find low leaf for ${value}`); + } + + return lowLeaf; + } + + public getMembershipWitness(leafIndexOrLeaf: number | Buffer): MembershipWitness { + const index = Buffer.isBuffer(leafIndexOrLeaf) ? this.getIndex(leafIndexOrLeaf) : leafIndexOrLeaf; + const siblingPath = this.getSiblingPath(index); + return new MembershipWitness( + this.height as N, + BigInt(index), + assertLength(siblingPath.map(Fr.fromBuffer), this.height as N), + ); + } +} diff --git a/yarn-project/circuits.js/src/merkle/indexed_merkle_tree_calculator.test.ts b/yarn-project/circuits.js/src/merkle/indexed_merkle_tree_calculator.test.ts new file mode 100644 index 00000000000..281863646a0 --- /dev/null +++ b/yarn-project/circuits.js/src/merkle/indexed_merkle_tree_calculator.test.ts @@ -0,0 +1,201 @@ +import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { poseidon2Hash } from '@aztec/foundation/crypto'; +import { Fr } from '@aztec/foundation/fields'; + +import { MAX_PROTOCOL_CONTRACTS, PROTOCOL_CONTRACT_TREE_HEIGHT } from '../constants.js'; +import { type MembershipWitness } from '../index.js'; +import { ProtocolContractLeafPreimage } from '../structs/trees/index.js'; +import { type IndexedMerkleTree } from './indexed_merkle_tree.js'; +import { IndexedMerkleTreeCalculator } from './indexed_merkle_tree_calculator.js'; + +// Note: this is currently only used for the static protocol contract tree, so I'm using ProtocolContractLeafPreimage +// rather than a test preimage. +class TestHasher { + public async hash(lhs: Buffer, rhs: Buffer): Promise { + return (await poseidon2Hash([lhs, rhs])).toBuffer(); + } + public async hashInputs(inputs: Buffer[]): Promise { + const inputFields = inputs.map(i => Fr.fromBuffer(i)); + return (await poseidon2Hash(inputFields)).toBuffer(); + } +} + +async function checkSiblingPath( + witness: MembershipWitness, + tree: IndexedMerkleTree, +) { + let index = Number(witness.leafIndex); + let currentValue = tree.leaves[index]; + const hasher = new TestHasher(); + for (let i = 0; i < tree.height; i++) { + const node = witness.siblingPath[i]; + const isRight = index % 2; + const [l, r] = isRight ? [node.toBuffer(), currentValue] : [currentValue, node.toBuffer()]; + currentValue = await hasher.hash(l, r); + index >>= 1; + } + expect(tree.root).toEqual(currentValue); +} + +describe('indexed merkle tree root calculator', () => { + it('should correctly handle no leaves', async () => { + // Height of 3 is 8 leaves. + const calculator = await IndexedMerkleTreeCalculator.create(4, new TestHasher(), ProtocolContractLeafPreimage); + const expected = await calculator.computeTreeRoot(new Array(8).fill(new Fr(0)).map(fr => fr.toBuffer())); + await expect(calculator.computeTreeRoot()).resolves.toEqual(expected); + }); + + it('should compute entire tree', async () => { + const hasher = new TestHasher(); + const calculator = await IndexedMerkleTreeCalculator.create(4, hasher, ProtocolContractLeafPreimage); + const values = Array.from({ length: 5 }).map((_, i) => new Fr(i).toBuffer()); + const result = await calculator.computeTree(values); + + const expectedLeafPreimages = values.map( + (l, i) => + new ProtocolContractLeafPreimage( + new Fr(l), + i == 4 ? Fr.ZERO : new Fr(l).add(Fr.ONE), + i == 4 ? BigInt(0) : BigInt(i), + ), + ); + const leaves = await Promise.all(expectedLeafPreimages.map(l => hasher.hashInputs(l.toHashInputs()))); + const expectedRoot = await calculator.computeTreeRoot(leaves); + expect(result.nodes.length).toEqual(31); + expect(result.root).toEqual(expectedRoot); + }); + + it('should correctly get a membership witness', async () => { + const hasher = new TestHasher(); + const calculator = await IndexedMerkleTreeCalculator.create(3, hasher, ProtocolContractLeafPreimage); + const values = Array.from({ length: 5 }).map((_, i) => new Fr(i + 1).toBuffer()); + const tree = await calculator.computeTree(values); + + // We will have the below leaf at index 2. + const testLeaf = new ProtocolContractLeafPreimage(new Fr(2), new Fr(3), 3n); + const testLeafHash = await hasher.hashInputs(testLeaf.toHashInputs()); + const index = tree.getIndex(testLeafHash); + expect(index).toEqual(2); + // We will have the below leaf at index 3 => is the right sibling of testLeaf. + const rightSibling = new ProtocolContractLeafPreimage(new Fr(3), new Fr(4), 4n); + const rightSiblingHash = await hasher.hashInputs(rightSibling.toHashInputs()); + + const witness = tree.getMembershipWitness(index); + await checkSiblingPath(witness, tree); + expect(witness.leafIndex).toEqual(BigInt(index)); + expect(witness.siblingPath[0]).toEqual(Fr.fromBuffer(rightSiblingHash)); + }); + + it('should correctly get a non membership witness', async () => { + const hasher = new TestHasher(); + const calculator = await IndexedMerkleTreeCalculator.create(3, hasher, ProtocolContractLeafPreimage); + const values = Array.from({ length: 5 }).map((_, i) => new Fr(i * 2).toBuffer()); + const tree = await calculator.computeTree(values); + + // Choose an odd value which will not be in the tree. + const testValue = 5n; + // Its low leaf will exist at index 2 in the tree.f + const expectedLowLeaf = new ProtocolContractLeafPreimage(new Fr(4), new Fr(6), 3n); + + const lowLeaf = tree.getLowLeaf(testValue); + expect(lowLeaf).toEqual(expectedLowLeaf); + + const lowLeafHash = await hasher.hashInputs(lowLeaf.toHashInputs()); + const lowLeafIndex = tree.getIndex(lowLeafHash); + expect(lowLeafIndex).toEqual(2); + + const witness = tree.getMembershipWitness(lowLeafIndex); + await checkSiblingPath(witness, tree); + expect(witness).toEqual(tree.getMembershipWitness(lowLeafHash)); + // The low leaf is at index 2 => it has a right sibling. + const expectedSibling = tree.leaves[lowLeafIndex + 1]; + expect(witness.siblingPath[0]).toEqual(Fr.fromBuffer(expectedSibling)); + }); + + it('should correctly get a membership witness for addresses', async () => { + const hasher = new TestHasher(); + const calculator = await IndexedMerkleTreeCalculator.create( + PROTOCOL_CONTRACT_TREE_HEIGHT, + hasher, + ProtocolContractLeafPreimage, + ); + let values: AztecAddress[] = await Promise.all( + Array.from({ length: MAX_PROTOCOL_CONTRACTS }).map(() => AztecAddress.random()), + ); + // Manually add the zero leaf here, so the below recalcs are easier. + values = [AztecAddress.ZERO, ...values]; + const tree = await calculator.computeTree(values.map(a => a.toBuffer())); + + // Pick some value to find a witness for... + const testIndex = 2; + const testValue = values[testIndex]; + const sortedValues = [...values].sort((a, b) => Number(a.toBigInt() - b.toBigInt())); + // ...and find its next value. + const nextValue = sortedValues[sortedValues.indexOf(testValue) + 1] || AztecAddress.ZERO; + + // Reconstruct its leaf preimage. + const testLeafPreimage = new ProtocolContractLeafPreimage( + testValue.toField(), + nextValue.toField(), + BigInt(values.indexOf(nextValue) || 0), + ); + expect(tree.leafPreimages[testIndex]).toEqual(testLeafPreimage); + + // Get the membership witness and expected sibling. + const witness = tree.getMembershipWitness(testIndex); + await checkSiblingPath(witness, tree); + const expectedSibling = testIndex % 2 ? tree.leafPreimages[testIndex - 1] : tree.leafPreimages[testIndex + 1]; + expect(witness.leafIndex).toEqual(BigInt(testIndex)); + expect(witness.siblingPath[0]).toEqual(Fr.fromBuffer(await hasher.hashInputs(expectedSibling.toHashInputs()))); + }); + + it('should correctly get a non membership witness for addresses', async () => { + const hasher = new TestHasher(); + const calculator = await IndexedMerkleTreeCalculator.create( + PROTOCOL_CONTRACT_TREE_HEIGHT, + hasher, + ProtocolContractLeafPreimage, + ); + let values: AztecAddress[] = await Promise.all( + Array.from({ length: MAX_PROTOCOL_CONTRACTS }).map(() => AztecAddress.random()), + ); + // Manually add the zero leaf here, so the below recalcs are easier. + values = [AztecAddress.ZERO, ...values]; + const tree = await calculator.computeTree(values.map(a => a.toBuffer())); + + // Pick some value to find a low leaf for... + const testValue = await AztecAddress.random(); + const sortedValues = [...values].sort((a, b) => Number(a.toBigInt() - b.toBigInt())); + // ...and find its 'sandwich' values. + const previousIndex = sortedValues.findIndex( + (a, i) => + a.toBigInt() <= testValue.toBigInt() && + (i == sortedValues.length - 1 || sortedValues[i + 1].toBigInt() > testValue.toBigInt()), + ); + const [previousValue, nextValue] = [ + sortedValues[previousIndex], + sortedValues[previousIndex + 1] || AztecAddress.ZERO, + ]; + + // Reconstruct the low leaf preimage. + const expectedLowLeaf = new ProtocolContractLeafPreimage( + previousValue.toField(), + nextValue.toField(), + BigInt(values.indexOf(nextValue)), + ); + const lowLeaf = tree.getLowLeaf(testValue.toBigInt()); + const hashedLowLeaf = await hasher.hashInputs(lowLeaf.toHashInputs()); + const lowLeafIndex = tree.getIndex(hashedLowLeaf); + expect(lowLeaf).toEqual(expectedLowLeaf); + expect(tree.leafPreimages[lowLeafIndex]).toEqual(lowLeaf); + + // Get the membership witness of the low leaf and expected sibling. + const witness = tree.getMembershipWitness(lowLeafIndex); + await checkSiblingPath(witness, tree); + expect(witness).toEqual(tree.getMembershipWitness(hashedLowLeaf)); + const expectedSibling = + lowLeafIndex % 2 ? tree.leafPreimages[lowLeafIndex - 1] : tree.leafPreimages[lowLeafIndex + 1]; + expect(witness.leafIndex).toEqual(BigInt(lowLeafIndex)); + expect(witness.siblingPath[0]).toEqual(Fr.fromBuffer(await hasher.hashInputs(expectedSibling.toHashInputs()))); + }); +}); diff --git a/yarn-project/circuits.js/src/merkle/indexed_merkle_tree_calculator.ts b/yarn-project/circuits.js/src/merkle/indexed_merkle_tree_calculator.ts new file mode 100644 index 00000000000..445bbc4f830 --- /dev/null +++ b/yarn-project/circuits.js/src/merkle/indexed_merkle_tree_calculator.ts @@ -0,0 +1,98 @@ +import { toBigIntBE } from '@aztec/foundation/bigint-buffer'; +import { numToUInt32BE } from '@aztec/foundation/serialize'; +import { type IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; + +import { IndexedMerkleTree } from './indexed_merkle_tree.js'; + +interface LeafPreimageFactory { + fromBuffer(buffer: Buffer): T; +} + +interface Hasher { + hash(lhs: Buffer, rhs: Buffer): Promise; + hashInputs(inputs: Buffer[]): Promise; +} + +/** + * Indexed merkle tree calculator. + */ +export class IndexedMerkleTreeCalculator { + private constructor( + private height: N, + private zeroHashes: Buffer[], + private hasher: Hasher, + private factory: LeafPreimageFactory, + ) {} + + static async create( + height: N, + hasher: Hasher, + factory: LeafPreimageFactory, + zeroLeaf = Buffer.alloc(32), + ) { + const zeroHashes = [zeroLeaf]; + for (let i = 0; i < height; i++) { + zeroHashes.push(await hasher.hash(zeroHashes[i], zeroHashes[i])); + } + return new IndexedMerkleTreeCalculator(height, zeroHashes, hasher, factory); + } + + async computeTree(values: Buffer[]): Promise> { + if (!values.find(v => toBigIntBE(v) == BigInt(0))) { + // If we have no zero value, add one to form the zero leaf + values = [Buffer.alloc(32), ...values]; + } + const sorted = values + .map((v, i) => ({ value: v, index: i })) + .sort((a, b) => Number(toBigIntBE(b.value) - toBigIntBE(a.value))); + const indexedLeaves = sorted.map((item, i) => ({ + leaf: this.factory.fromBuffer( + Buffer.concat([ + item.value, + ...(i == 0 + ? [Buffer.alloc(32), Buffer.alloc(32)] + : [sorted[i - 1].value, numToUInt32BE(sorted[i - 1].index, 32)]), + ]), + ), + index: item.index, + })); + const resortedIndexedLeaves = indexedLeaves.sort((a, b) => a.index - b.index).map(item => item.leaf); + let leaves = await Promise.all(resortedIndexedLeaves.map(l => this.hasher.hashInputs(l.toHashInputs()))); + + let result = leaves.slice(); + + for (let i = 0; i < this.height; ++i) { + const numLeaves = 2 ** (this.height - i); + const newLeaves: Buffer[] = []; + for (let j = 0; j < leaves.length / 2; ++j) { + const l = leaves[j * 2]; + const r = leaves[j * 2 + 1] || this.zeroHashes[i]; + newLeaves[j] = await this.hasher.hash(l, r); + } + result = result.concat(new Array(numLeaves - leaves.length).fill(this.zeroHashes[i]), newLeaves); + leaves = newLeaves; + } + + return new IndexedMerkleTree(this.height, result, resortedIndexedLeaves); + } + + async computeTreeRoot(leaves: Buffer[] = []): Promise { + if (leaves.length === 0) { + return this.zeroHashes[this.zeroHashes.length - 1]; + } + + leaves = leaves.slice(); + + for (let i = 0; i < this.height; ++i) { + let j = 0; + for (; j < leaves.length / 2; ++j) { + const l = leaves[j * 2]; + const r = leaves[j * 2 + 1] || this.zeroHashes[i]; + leaves[j] = await this.hasher.hash(l, r); + } + leaves = leaves.slice(0, j); + } + + return leaves[0]; + } +} diff --git a/yarn-project/circuits.js/src/structs/kernel/private_call_data.ts b/yarn-project/circuits.js/src/structs/kernel/private_call_data.ts index e46fec69cd1..94033661632 100644 --- a/yarn-project/circuits.js/src/structs/kernel/private_call_data.ts +++ b/yarn-project/circuits.js/src/structs/kernel/private_call_data.ts @@ -1,11 +1,12 @@ import { Fr } from '@aztec/foundation/fields'; -import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize'; import { type FieldsOf } from '@aztec/foundation/types'; import { FUNCTION_TREE_HEIGHT, PROTOCOL_CONTRACT_TREE_HEIGHT } from '../../constants.gen.js'; import { PublicKeys } from '../../types/public_keys.js'; import { MembershipWitness } from '../membership_witness.js'; import { PrivateCircuitPublicInputs } from '../private_circuit_public_inputs.js'; +import { ProtocolContractLeafPreimage } from '../trees/index.js'; import { VerificationKeyAsFields } from '../verification_key.js'; /** @@ -41,7 +42,16 @@ export class PrivateCallData { * The membership witness for the function leaf corresponding to the function being invoked. */ public functionLeafMembershipWitness: MembershipWitness, - public protocolContractSiblingPath: Tuple, + /** + * The membership witness for the protocolContractLeaf. + */ + public protocolContractMembershipWitness: MembershipWitness, + /** + * The leaf of the protocol contract tree, of either: + * The protocol contract being called. + * The low leaf showing that the address of the contract being called is not in the tree. + */ + public protocolContractLeaf: ProtocolContractLeafPreimage, /** * The hash of the ACIR of the function being invoked. */ @@ -62,7 +72,8 @@ export class PrivateCallData { fields.publicKeys, fields.saltedInitializationHash, fields.functionLeafMembershipWitness, - fields.protocolContractSiblingPath, + fields.protocolContractMembershipWitness, + fields.protocolContractLeaf, fields.acirHash, ] as const; } @@ -94,7 +105,8 @@ export class PrivateCallData { reader.readObject(PublicKeys), reader.readObject(Fr), reader.readObject(MembershipWitness.deserializer(FUNCTION_TREE_HEIGHT)), - reader.readArray(PROTOCOL_CONTRACT_TREE_HEIGHT, Fr), + reader.readObject(MembershipWitness.deserializer(PROTOCOL_CONTRACT_TREE_HEIGHT)), + reader.readObject(ProtocolContractLeafPreimage), reader.readObject(Fr), ); } diff --git a/yarn-project/circuits.js/src/structs/trees/index.ts b/yarn-project/circuits.js/src/structs/trees/index.ts index 5d2659eec7c..aa621148e94 100644 --- a/yarn-project/circuits.js/src/structs/trees/index.ts +++ b/yarn-project/circuits.js/src/structs/trees/index.ts @@ -1,3 +1,4 @@ export * from './nullifier_leaf.js'; +export * from './protocol_contract_leaf.js'; export * from './public_data_leaf.js'; export * from './append_only_tree_snapshot.js'; diff --git a/yarn-project/circuits.js/src/structs/trees/protocol_contract_leaf.ts b/yarn-project/circuits.js/src/structs/trees/protocol_contract_leaf.ts new file mode 100644 index 00000000000..ed14ab63e6d --- /dev/null +++ b/yarn-project/circuits.js/src/structs/trees/protocol_contract_leaf.ts @@ -0,0 +1,133 @@ +import { toBigIntBE } from '@aztec/foundation/bigint-buffer'; +import { Fr } from '@aztec/foundation/fields'; +import { schemas } from '@aztec/foundation/schemas'; +import { BufferReader } from '@aztec/foundation/serialize'; +import { type IndexedTreeLeaf, type IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; + +import { z } from 'zod'; + +import { MAX_PROTOCOL_CONTRACTS } from '../../constants.gen.js'; + +/** + * Class containing the data of a preimage of a single leaf in the protocol contract tree. + * Note: It's called preimage because this data gets hashed before being inserted as a node into the `IndexedTree`. + * Note: Though this tree contains addresses, they are converted to fields to avoid unnecessary conversions in the tree. + */ +export class ProtocolContractLeafPreimage implements IndexedTreeLeafPreimage { + constructor( + /** + * Leaf value inside the indexed tree's linked list. + */ + public address: Fr, + /** + * Next value inside the indexed tree's linked list. + */ + public nextAddress: Fr, + /** + * Index of the next leaf in the indexed tree's linked list. + */ + public nextIndex: bigint, + ) {} + + static get schema() { + return z + .object({ + address: schemas.Fr, + nextAddress: schemas.Fr, + nextIndex: schemas.BigInt, + }) + .transform( + ({ address, nextAddress, nextIndex }) => new ProtocolContractLeafPreimage(address, nextAddress, nextIndex), + ); + } + + getKey(): bigint { + return this.address.toBigInt(); + } + + getNextKey(): bigint { + return this.nextAddress.toBigInt(); + } + + getNextIndex(): bigint { + return this.nextIndex; + } + + asLeaf(): ProtocolContractLeaf { + return new ProtocolContractLeaf(this.address); + } + + toBuffer(): Buffer { + return Buffer.concat(this.toHashInputs()); + } + + toHashInputs(): Buffer[] { + // Note: the protocol contract leaves only hash the value and next value. + return [Buffer.from(this.address.toBuffer()), Buffer.from(this.nextAddress.toBuffer())]; + } + + toFields(): Fr[] { + return [this.address, this.nextAddress, new Fr(this.nextIndex)]; + } + + static random() { + return new ProtocolContractLeafPreimage( + Fr.random(), + Fr.random(), + BigInt(Math.floor(Math.random() * 1000) % MAX_PROTOCOL_CONTRACTS), + ); + } + + static empty(): ProtocolContractLeafPreimage { + return new ProtocolContractLeafPreimage(Fr.ZERO, Fr.ZERO, 0n); + } + + static fromBuffer(buffer: Buffer | BufferReader): ProtocolContractLeafPreimage { + const reader = BufferReader.asReader(buffer); + return new ProtocolContractLeafPreimage( + reader.readObject(Fr), + reader.readObject(Fr), + toBigIntBE(reader.readBytes(32)), + ); + } + + static fromLeaf(leaf: ProtocolContractLeaf, nextKey: bigint, nextIndex: bigint): ProtocolContractLeafPreimage { + return new ProtocolContractLeafPreimage(leaf.address, new Fr(nextKey), nextIndex); + } +} + +/** + * An address to be inserted or checked in the protocol contract tree. + */ +export class ProtocolContractLeaf implements IndexedTreeLeaf { + constructor( + /** + * Address value. + */ + public address: Fr, + ) {} + + getKey(): bigint { + return this.address.toBigInt(); + } + + toBuffer(): Buffer { + return this.address.toBuffer(); + } + + isEmpty(): boolean { + return this.address.isZero(); + } + + updateTo(_another: ProtocolContractLeaf): ProtocolContractLeaf { + throw new Error('Protocol contract tree is insert only'); + } + + static buildDummy(key: bigint): ProtocolContractLeaf { + return new ProtocolContractLeaf(new Fr(key)); + } + + static fromBuffer(buf: Buffer): ProtocolContractLeaf { + return new ProtocolContractLeaf(Fr.fromBuffer(buf)); + } +} diff --git a/yarn-project/noir-protocol-circuits-types/src/__snapshots__/noir_test_gen.test.ts.snap b/yarn-project/noir-protocol-circuits-types/src/__snapshots__/noir_test_gen.test.ts.snap index fea366471cd..d21c46a412c 100644 --- a/yarn-project/noir-protocol-circuits-types/src/__snapshots__/noir_test_gen.test.ts.snap +++ b/yarn-project/noir-protocol-circuits-types/src/__snapshots__/noir_test_gen.test.ts.snap @@ -5,10 +5,10 @@ exports[`Data generation for noir tests Computes contract info for defaultContra contract_address_salt: 0x000000000000000000000000000000000000000000000000000000000000ddd5, artifact_hash: 0x0000000000000000000000000000000000000000000000000000000000003039, public_bytecode_commitment: 0x2e018d154e7faf1ddf8400a4b3605574e69afc04425f3e662e054dc094fb0428, - private_functions_root: 0x25d76df45434ec75a83321daf941cfc667ff3a9027942e17105da4f50d1d13f9, - address: AztecAddress { inner: 0x0d4379385723a3f96a0d9d59be7dc869e042a9f5b832749039a993e5ee6b91b8 }, - partial_address: PartialAddress { inner: 0x0b419abfd8ca509592b671ed9808138dced1df38835cbf3b3b693ad71623c90d }, - contract_class_id: ContractClassId { inner: 0x23b90310794d8e4ee1f13c0b97b4f5d11ddfa1642ad60e46169c3d3b2c6e03a6 }, + private_functions_root: 0x168e5e38b7ad3da147014b180e32c133ebce0e11d6f021ab988404f5af466eac, + address: AztecAddress { inner: 0x238cc30e81019daff2f0c67463c2c237afb6835cd0c365fdb6777a16bbe0a321 }, + partial_address: PartialAddress { inner: 0x27d6fb74b2267a1a380da93091fceeb7724ecdd36a6770756b63002e577d9071 }, + contract_class_id: ContractClassId { inner: 0x2788df97c3c49128ebd4bd4cc4819cca7877dc1a4f069e9b415d51c4b329e3b1 }, public_keys: PublicKeys { inner: 0x01498945581e0eb9f8427ad6021184c700ef091d570892c437d12c7d90364bbd170ae506787c5c43d6ca9255d571c10fa9ffa9d141666e290c347c5c9ab7e34400c044b05b6ca83b9c2dbae79cc1135155956a64e136819136e9947fe5e5866c1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb1511b00316144359e9a3ec8e49c1cdb7eeb0cedd190dfd9dc90eea5115aa779e287080ffc74d7a8b0bccb88ac11f45874172f3847eb8b92654aaa58a3d2b8dc7833019c111f36ad3fc1d9b7a7a14344314d2864b94f030594cd67f753ef774a1efb2039907fe37f08d10739255141bb066c506a12f7d1e8dfec21abc58494705b6f }, salted_initialization_hash: SaltedInitializationHash { inner: 0x13a939daa511233e5446905ed2cadbee14948fa75df183b53b5c14b612bffe88 }, deployer: AztecAddress { inner: 0x0000000000000000000000000000000000000000000000000000000000000000 } @@ -20,10 +20,10 @@ exports[`Data generation for noir tests Computes contract info for parentContrac contract_address_salt: 0x0000000000000000000000000000000000000000000000000000000000001618, artifact_hash: 0x00000000000000000000000000000000000000000000000000000000000004bc, public_bytecode_commitment: 0x258ed5ce21c3a9c15a1c6108ef0e759bb0617f2b505b8d64e927027d30e71791, - private_functions_root: 0x1228b39ba6702af03e595300e8484c6373f00790d0148cc3d4ff0fd1c778a83a, - address: AztecAddress { inner: 0x0907b0edaac863b283132ee3a4781395ace64ff8cec244f1c5235e88c320cca1 }, - partial_address: PartialAddress { inner: 0x00906eed7cc361cc78056365c5ddbb94fd8fa05c5fed118bd4033585914cda92 }, - contract_class_id: ContractClassId { inner: 0x1ffddcc4c6d113ae695384e3bae42cb0c4c6d8ba7edbb80c8c23848b55cd37f3 }, + private_functions_root: 0x21ac15d1c4c74eb5ceb674a971451a6a314f00ee17571605d88555ebf6dc61c6, + address: AztecAddress { inner: 0x0652e43af6645a9e5d9f370c30e0679e9933ca6db61e8e8892a2c8caf1742b22 }, + partial_address: PartialAddress { inner: 0x0af7fac4aad94b9f6142b45730616d34bf28d0b310376d2d144d0828df56e585 }, + contract_class_id: ContractClassId { inner: 0x03112baad91c865ba6d7d431703935f852934379a80932b8713ee5e5f17bb594 }, public_keys: PublicKeys { inner: 0x01498945581e0eb9f8427ad6021184c700ef091d570892c437d12c7d90364bbd170ae506787c5c43d6ca9255d571c10fa9ffa9d141666e290c347c5c9ab7e34400c044b05b6ca83b9c2dbae79cc1135155956a64e136819136e9947fe5e5866c1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb1511b00316144359e9a3ec8e49c1cdb7eeb0cedd190dfd9dc90eea5115aa779e287080ffc74d7a8b0bccb88ac11f45874172f3847eb8b92654aaa58a3d2b8dc7833019c111f36ad3fc1d9b7a7a14344314d2864b94f030594cd67f753ef774a1efb2039907fe37f08d10739255141bb066c506a12f7d1e8dfec21abc58494705b6f }, salted_initialization_hash: SaltedInitializationHash { inner: 0x24bd6ac7a182e2cf25e437c72f53544ef81dfd97d9afee23abb07a638e7be749 }, deployer: AztecAddress { inner: 0x0000000000000000000000000000000000000000000000000000000000000000 } @@ -34,9 +34,9 @@ exports[`Data generation for noir tests Computes function tree for defaultContra [ { "index": 0, - "leaf": "0be91a61ae34b803eda7f42a012617acabe2d5442311a009db68ac12db3f4edb", + "leaf": "0c65b955d4a0c9caa0d2232bab14da9b752d7b6ac0258c81ad810d9b036382f6", "siblingPath": [ - "1eca11cd2abe68905eab86bc4f207cde29eb7c2b4c2c9b27e3d8c2f8b8234c87", + "1bf05aedcca6b9682341475d1edb718df1485e4071c6c2f3c4576eeb3f9988a6", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", @@ -45,9 +45,9 @@ exports[`Data generation for noir tests Computes function tree for defaultContra }, { "index": 1, - "leaf": "1eca11cd2abe68905eab86bc4f207cde29eb7c2b4c2c9b27e3d8c2f8b8234c87", + "leaf": "1bf05aedcca6b9682341475d1edb718df1485e4071c6c2f3c4576eeb3f9988a6", "siblingPath": [ - "0be91a61ae34b803eda7f42a012617acabe2d5442311a009db68ac12db3f4edb", + "0c65b955d4a0c9caa0d2232bab14da9b752d7b6ac0258c81ad810d9b036382f6", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", @@ -59,7 +59,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "leaf": "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "siblingPath": [ "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", - "1204fec45a58f11be9981f153319860aea2ece9152efab01885006e53dd70a79", + "086c9f6f241df20a9ef00d5c4a61a0f2bc2843aaac7b1c37789a48326daf4c49", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", @@ -70,7 +70,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "leaf": "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "siblingPath": [ "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", - "1204fec45a58f11be9981f153319860aea2ece9152efab01885006e53dd70a79", + "086c9f6f241df20a9ef00d5c4a61a0f2bc2843aaac7b1c37789a48326daf4c49", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", @@ -82,7 +82,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "siblingPath": [ "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", - "0983f08659e1fa22c506ff1a3a9e0f1e878926e31148240e95713ba24ad07317", + "26095b3876bbbe1ca9f5f9d260b29f9bd202db90cfb79549ff05ddc476fa7cf3", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], @@ -93,7 +93,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "siblingPath": [ "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", - "0983f08659e1fa22c506ff1a3a9e0f1e878926e31148240e95713ba24ad07317", + "26095b3876bbbe1ca9f5f9d260b29f9bd202db90cfb79549ff05ddc476fa7cf3", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], @@ -104,7 +104,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "siblingPath": [ "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", - "0983f08659e1fa22c506ff1a3a9e0f1e878926e31148240e95713ba24ad07317", + "26095b3876bbbe1ca9f5f9d260b29f9bd202db90cfb79549ff05ddc476fa7cf3", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], @@ -115,7 +115,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "siblingPath": [ "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", - "0983f08659e1fa22c506ff1a3a9e0f1e878926e31148240e95713ba24ad07317", + "26095b3876bbbe1ca9f5f9d260b29f9bd202db90cfb79549ff05ddc476fa7cf3", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], @@ -127,7 +127,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", - "297ba9c74be6e902b5c01e3cd8571c5b4c55ec4604ba69d3f4ea3918ed2f774d", + "1c86ac98f9504836704e7be2209742eb174c8b0f92d2302a5fd070e71d53d84d", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], }, @@ -138,7 +138,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", - "297ba9c74be6e902b5c01e3cd8571c5b4c55ec4604ba69d3f4ea3918ed2f774d", + "1c86ac98f9504836704e7be2209742eb174c8b0f92d2302a5fd070e71d53d84d", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], }, @@ -149,7 +149,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", - "297ba9c74be6e902b5c01e3cd8571c5b4c55ec4604ba69d3f4ea3918ed2f774d", + "1c86ac98f9504836704e7be2209742eb174c8b0f92d2302a5fd070e71d53d84d", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], }, @@ -160,7 +160,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", - "297ba9c74be6e902b5c01e3cd8571c5b4c55ec4604ba69d3f4ea3918ed2f774d", + "1c86ac98f9504836704e7be2209742eb174c8b0f92d2302a5fd070e71d53d84d", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], }, @@ -171,7 +171,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", - "297ba9c74be6e902b5c01e3cd8571c5b4c55ec4604ba69d3f4ea3918ed2f774d", + "1c86ac98f9504836704e7be2209742eb174c8b0f92d2302a5fd070e71d53d84d", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], }, @@ -182,7 +182,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", - "297ba9c74be6e902b5c01e3cd8571c5b4c55ec4604ba69d3f4ea3918ed2f774d", + "1c86ac98f9504836704e7be2209742eb174c8b0f92d2302a5fd070e71d53d84d", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], }, @@ -193,7 +193,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", - "297ba9c74be6e902b5c01e3cd8571c5b4c55ec4604ba69d3f4ea3918ed2f774d", + "1c86ac98f9504836704e7be2209742eb174c8b0f92d2302a5fd070e71d53d84d", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], }, @@ -204,7 +204,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", - "297ba9c74be6e902b5c01e3cd8571c5b4c55ec4604ba69d3f4ea3918ed2f774d", + "1c86ac98f9504836704e7be2209742eb174c8b0f92d2302a5fd070e71d53d84d", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], }, @@ -216,7 +216,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "2efc9b3a3a683ffc3ad9c789bae66e43272ffa3663bc9d9580f0207c4192fada", + "14afcd7fd98280b59b9e12a3d89294012e9960af0e4e6553539b5ba1d09b7681", ], }, { @@ -227,7 +227,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "2efc9b3a3a683ffc3ad9c789bae66e43272ffa3663bc9d9580f0207c4192fada", + "14afcd7fd98280b59b9e12a3d89294012e9960af0e4e6553539b5ba1d09b7681", ], }, { @@ -238,7 +238,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "2efc9b3a3a683ffc3ad9c789bae66e43272ffa3663bc9d9580f0207c4192fada", + "14afcd7fd98280b59b9e12a3d89294012e9960af0e4e6553539b5ba1d09b7681", ], }, { @@ -249,7 +249,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "2efc9b3a3a683ffc3ad9c789bae66e43272ffa3663bc9d9580f0207c4192fada", + "14afcd7fd98280b59b9e12a3d89294012e9960af0e4e6553539b5ba1d09b7681", ], }, { @@ -260,7 +260,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "2efc9b3a3a683ffc3ad9c789bae66e43272ffa3663bc9d9580f0207c4192fada", + "14afcd7fd98280b59b9e12a3d89294012e9960af0e4e6553539b5ba1d09b7681", ], }, { @@ -271,7 +271,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "2efc9b3a3a683ffc3ad9c789bae66e43272ffa3663bc9d9580f0207c4192fada", + "14afcd7fd98280b59b9e12a3d89294012e9960af0e4e6553539b5ba1d09b7681", ], }, { @@ -282,7 +282,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "2efc9b3a3a683ffc3ad9c789bae66e43272ffa3663bc9d9580f0207c4192fada", + "14afcd7fd98280b59b9e12a3d89294012e9960af0e4e6553539b5ba1d09b7681", ], }, { @@ -293,7 +293,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "2efc9b3a3a683ffc3ad9c789bae66e43272ffa3663bc9d9580f0207c4192fada", + "14afcd7fd98280b59b9e12a3d89294012e9960af0e4e6553539b5ba1d09b7681", ], }, { @@ -304,7 +304,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "2efc9b3a3a683ffc3ad9c789bae66e43272ffa3663bc9d9580f0207c4192fada", + "14afcd7fd98280b59b9e12a3d89294012e9960af0e4e6553539b5ba1d09b7681", ], }, { @@ -315,7 +315,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "2efc9b3a3a683ffc3ad9c789bae66e43272ffa3663bc9d9580f0207c4192fada", + "14afcd7fd98280b59b9e12a3d89294012e9960af0e4e6553539b5ba1d09b7681", ], }, { @@ -326,7 +326,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "2efc9b3a3a683ffc3ad9c789bae66e43272ffa3663bc9d9580f0207c4192fada", + "14afcd7fd98280b59b9e12a3d89294012e9960af0e4e6553539b5ba1d09b7681", ], }, { @@ -337,7 +337,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "2efc9b3a3a683ffc3ad9c789bae66e43272ffa3663bc9d9580f0207c4192fada", + "14afcd7fd98280b59b9e12a3d89294012e9960af0e4e6553539b5ba1d09b7681", ], }, { @@ -348,7 +348,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "2efc9b3a3a683ffc3ad9c789bae66e43272ffa3663bc9d9580f0207c4192fada", + "14afcd7fd98280b59b9e12a3d89294012e9960af0e4e6553539b5ba1d09b7681", ], }, { @@ -359,7 +359,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "2efc9b3a3a683ffc3ad9c789bae66e43272ffa3663bc9d9580f0207c4192fada", + "14afcd7fd98280b59b9e12a3d89294012e9960af0e4e6553539b5ba1d09b7681", ], }, { @@ -370,7 +370,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "2efc9b3a3a683ffc3ad9c789bae66e43272ffa3663bc9d9580f0207c4192fada", + "14afcd7fd98280b59b9e12a3d89294012e9960af0e4e6553539b5ba1d09b7681", ], }, { @@ -381,7 +381,7 @@ exports[`Data generation for noir tests Computes function tree for defaultContra "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "2efc9b3a3a683ffc3ad9c789bae66e43272ffa3663bc9d9580f0207c4192fada", + "14afcd7fd98280b59b9e12a3d89294012e9960af0e4e6553539b5ba1d09b7681", ], }, ] @@ -391,7 +391,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac [ { "index": 0, - "leaf": "1ee8cc7be382b517559b55384a8a19eb75801364df37f14ef21c29f49ee2f018", + "leaf": "28f221b985c113ae9da3887e64bd78fb5d96967d5cefe83d396f762e0e404a10", "siblingPath": [ "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", @@ -404,7 +404,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "index": 1, "leaf": "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "siblingPath": [ - "1ee8cc7be382b517559b55384a8a19eb75801364df37f14ef21c29f49ee2f018", + "28f221b985c113ae9da3887e64bd78fb5d96967d5cefe83d396f762e0e404a10", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", @@ -416,7 +416,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "leaf": "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "siblingPath": [ "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", - "033e01e76f5aadb4344103cc8a554c8455a12d34b36337a77f15e6a48d41095f", + "0f6fe0f4f6eaf2113729d07508eee0d65fdabd07d925691907b642491f1e6acb", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", @@ -427,7 +427,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "leaf": "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "siblingPath": [ "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", - "033e01e76f5aadb4344103cc8a554c8455a12d34b36337a77f15e6a48d41095f", + "0f6fe0f4f6eaf2113729d07508eee0d65fdabd07d925691907b642491f1e6acb", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", @@ -439,7 +439,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "siblingPath": [ "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", - "04da68bbc138397c8d1790778ff4bd4c26a71135f4c195cd774cc48790583825", + "16e48653a314369b9d240e38e9bf46d40f89dcb952a48060c427034fb1c14340", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], @@ -450,7 +450,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "siblingPath": [ "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", - "04da68bbc138397c8d1790778ff4bd4c26a71135f4c195cd774cc48790583825", + "16e48653a314369b9d240e38e9bf46d40f89dcb952a48060c427034fb1c14340", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], @@ -461,7 +461,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "siblingPath": [ "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", - "04da68bbc138397c8d1790778ff4bd4c26a71135f4c195cd774cc48790583825", + "16e48653a314369b9d240e38e9bf46d40f89dcb952a48060c427034fb1c14340", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], @@ -472,7 +472,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "siblingPath": [ "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", - "04da68bbc138397c8d1790778ff4bd4c26a71135f4c195cd774cc48790583825", + "16e48653a314369b9d240e38e9bf46d40f89dcb952a48060c427034fb1c14340", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], @@ -484,7 +484,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", - "17b636794aa372b6e21da48898c075d66d6cff677d455788343325d7360c3a23", + "1c9b9933cc611962a7a55d4a71a6dc57f530186ffd410841c954a84fe99b7cb7", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], }, @@ -495,7 +495,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", - "17b636794aa372b6e21da48898c075d66d6cff677d455788343325d7360c3a23", + "1c9b9933cc611962a7a55d4a71a6dc57f530186ffd410841c954a84fe99b7cb7", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], }, @@ -506,7 +506,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", - "17b636794aa372b6e21da48898c075d66d6cff677d455788343325d7360c3a23", + "1c9b9933cc611962a7a55d4a71a6dc57f530186ffd410841c954a84fe99b7cb7", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], }, @@ -517,7 +517,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", - "17b636794aa372b6e21da48898c075d66d6cff677d455788343325d7360c3a23", + "1c9b9933cc611962a7a55d4a71a6dc57f530186ffd410841c954a84fe99b7cb7", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], }, @@ -528,7 +528,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", - "17b636794aa372b6e21da48898c075d66d6cff677d455788343325d7360c3a23", + "1c9b9933cc611962a7a55d4a71a6dc57f530186ffd410841c954a84fe99b7cb7", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], }, @@ -539,7 +539,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", - "17b636794aa372b6e21da48898c075d66d6cff677d455788343325d7360c3a23", + "1c9b9933cc611962a7a55d4a71a6dc57f530186ffd410841c954a84fe99b7cb7", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], }, @@ -550,7 +550,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", - "17b636794aa372b6e21da48898c075d66d6cff677d455788343325d7360c3a23", + "1c9b9933cc611962a7a55d4a71a6dc57f530186ffd410841c954a84fe99b7cb7", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], }, @@ -561,7 +561,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "27b1d0839a5b23baf12a8d195b18ac288fcf401afb2f70b8a4b529ede5fa9fed", "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", - "17b636794aa372b6e21da48898c075d66d6cff677d455788343325d7360c3a23", + "1c9b9933cc611962a7a55d4a71a6dc57f530186ffd410841c954a84fe99b7cb7", "2a6595890719fef7967c209488728aa5342438ba52058a3c770202f55acf6854", ], }, @@ -573,7 +573,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "07a0377a94c889eeb1fdffabe543f3f32f741bb143abecd6cdbe2661558e5a60", + "2221ace56cc7c37c8f80b973d0e65f7fd52067acd7dd5d79632ff6d4036f0d34", ], }, { @@ -584,7 +584,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "07a0377a94c889eeb1fdffabe543f3f32f741bb143abecd6cdbe2661558e5a60", + "2221ace56cc7c37c8f80b973d0e65f7fd52067acd7dd5d79632ff6d4036f0d34", ], }, { @@ -595,7 +595,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "07a0377a94c889eeb1fdffabe543f3f32f741bb143abecd6cdbe2661558e5a60", + "2221ace56cc7c37c8f80b973d0e65f7fd52067acd7dd5d79632ff6d4036f0d34", ], }, { @@ -606,7 +606,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "07a0377a94c889eeb1fdffabe543f3f32f741bb143abecd6cdbe2661558e5a60", + "2221ace56cc7c37c8f80b973d0e65f7fd52067acd7dd5d79632ff6d4036f0d34", ], }, { @@ -617,7 +617,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "07a0377a94c889eeb1fdffabe543f3f32f741bb143abecd6cdbe2661558e5a60", + "2221ace56cc7c37c8f80b973d0e65f7fd52067acd7dd5d79632ff6d4036f0d34", ], }, { @@ -628,7 +628,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "07a0377a94c889eeb1fdffabe543f3f32f741bb143abecd6cdbe2661558e5a60", + "2221ace56cc7c37c8f80b973d0e65f7fd52067acd7dd5d79632ff6d4036f0d34", ], }, { @@ -639,7 +639,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "07a0377a94c889eeb1fdffabe543f3f32f741bb143abecd6cdbe2661558e5a60", + "2221ace56cc7c37c8f80b973d0e65f7fd52067acd7dd5d79632ff6d4036f0d34", ], }, { @@ -650,7 +650,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "07a0377a94c889eeb1fdffabe543f3f32f741bb143abecd6cdbe2661558e5a60", + "2221ace56cc7c37c8f80b973d0e65f7fd52067acd7dd5d79632ff6d4036f0d34", ], }, { @@ -661,7 +661,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "07a0377a94c889eeb1fdffabe543f3f32f741bb143abecd6cdbe2661558e5a60", + "2221ace56cc7c37c8f80b973d0e65f7fd52067acd7dd5d79632ff6d4036f0d34", ], }, { @@ -672,7 +672,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "07a0377a94c889eeb1fdffabe543f3f32f741bb143abecd6cdbe2661558e5a60", + "2221ace56cc7c37c8f80b973d0e65f7fd52067acd7dd5d79632ff6d4036f0d34", ], }, { @@ -683,7 +683,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "07a0377a94c889eeb1fdffabe543f3f32f741bb143abecd6cdbe2661558e5a60", + "2221ace56cc7c37c8f80b973d0e65f7fd52067acd7dd5d79632ff6d4036f0d34", ], }, { @@ -694,7 +694,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "07a0377a94c889eeb1fdffabe543f3f32f741bb143abecd6cdbe2661558e5a60", + "2221ace56cc7c37c8f80b973d0e65f7fd52067acd7dd5d79632ff6d4036f0d34", ], }, { @@ -705,7 +705,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "07a0377a94c889eeb1fdffabe543f3f32f741bb143abecd6cdbe2661558e5a60", + "2221ace56cc7c37c8f80b973d0e65f7fd52067acd7dd5d79632ff6d4036f0d34", ], }, { @@ -716,7 +716,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "07a0377a94c889eeb1fdffabe543f3f32f741bb143abecd6cdbe2661558e5a60", + "2221ace56cc7c37c8f80b973d0e65f7fd52067acd7dd5d79632ff6d4036f0d34", ], }, { @@ -727,7 +727,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "07a0377a94c889eeb1fdffabe543f3f32f741bb143abecd6cdbe2661558e5a60", + "2221ace56cc7c37c8f80b973d0e65f7fd52067acd7dd5d79632ff6d4036f0d34", ], }, { @@ -738,7 +738,7 @@ exports[`Data generation for noir tests Computes function tree for parentContrac "233d10e0c959338e062b1c76fb81e17fcf61643da568eac372bb7feac8bfa357", "0e1ce4f11f4d51a7d3136abbd625315fff3876d322e46ad8401da96f8e43a614", "1a0ca5eecb1430479902264f04e557160a4666fb42bb8b283c6397e3d17ac937", - "07a0377a94c889eeb1fdffabe543f3f32f741bb143abecd6cdbe2661558e5a60", + "2221ace56cc7c37c8f80b973d0e65f7fd52067acd7dd5d79632ff6d4036f0d34", ], }, ] diff --git a/yarn-project/noir-protocol-circuits-types/src/conversion/client.ts b/yarn-project/noir-protocol-circuits-types/src/conversion/client.ts index 0a68d04ca01..bb3db696ef4 100644 --- a/yarn-project/noir-protocol-circuits-types/src/conversion/client.ts +++ b/yarn-project/noir-protocol-circuits-types/src/conversion/client.ts @@ -124,6 +124,7 @@ import { mapPrivateLogFromNoir, mapPrivateLogToNoir, mapPrivateToRollupAccumulatedDataFromNoir, + mapProtocolContractLeafPreimageToNoir, mapPublicCallRequestFromNoir, mapPublicCallRequestToNoir, mapScopedL2ToL1MessageFromNoir, @@ -616,7 +617,8 @@ export function mapPrivateCallDataToNoir(privateCallData: PrivateCallData): Priv contract_class_public_bytecode_commitment: mapFieldToNoir(privateCallData.contractClassPublicBytecodeCommitment), public_keys: mapPublicKeysToNoir(privateCallData.publicKeys), salted_initialization_hash: mapWrappedFieldToNoir(privateCallData.saltedInitializationHash), - protocol_contract_sibling_path: mapTuple(privateCallData.protocolContractSiblingPath, mapFieldToNoir), + protocol_contract_membership_witness: mapMembershipWitnessToNoir(privateCallData.protocolContractMembershipWitness), + protocol_contract_leaf: mapProtocolContractLeafPreimageToNoir(privateCallData.protocolContractLeaf), acir_hash: mapFieldToNoir(privateCallData.acirHash), }; } diff --git a/yarn-project/noir-protocol-circuits-types/src/conversion/common.ts b/yarn-project/noir-protocol-circuits-types/src/conversion/common.ts index 8081f183aa8..ce24f4d3107 100644 --- a/yarn-project/noir-protocol-circuits-types/src/conversion/common.ts +++ b/yarn-project/noir-protocol-circuits-types/src/conversion/common.ts @@ -28,6 +28,7 @@ import { Point, PrivateLog, PrivateToRollupAccumulatedData, + type ProtocolContractLeafPreimage, PublicCallRequest, type PublicDataTreeLeafPreimage, type PublicDataWrite, @@ -66,6 +67,7 @@ import type { Option as OptionalNumberNoir, PartialStateReference as PartialStateReferenceNoir, PrivateToRollupAccumulatedData as PrivateToRollupAccumulatedDataNoir, + ProtocolContractLeafPreimage as ProtocolContractLeafPreimageNoir, PublicCallRequest as PublicCallRequestNoir, PublicDataTreeLeafPreimage as PublicDataTreeLeafPreimageNoir, PublicDataWrite as PublicDataWriteNoir, @@ -561,17 +563,17 @@ export function mapStateReferenceFromNoir(stateReference: StateReferenceNoir): S } /** - * Maps a nullifier leaf preimage to noir - * @param nullifierLeafPreimage - The nullifier leaf preimage. - * @returns The noir nullifier leaf preimage. + * Maps a partial state reference to a noir partial state reference. + * @param partialStateReference - The partial state reference. + * @returns The noir partial state reference. */ -export function mapNullifierLeafPreimageToNoir( - nullifierLeafPreimage: NullifierLeafPreimage, -): NullifierLeafPreimageNoir { +export function mapPartialStateReferenceToNoir( + partialStateReference: PartialStateReference, +): PartialStateReferenceNoir { return { - nullifier: mapFieldToNoir(nullifierLeafPreimage.nullifier), - next_nullifier: mapFieldToNoir(nullifierLeafPreimage.nextNullifier), - next_index: mapNumberToNoir(Number(nullifierLeafPreimage.nextIndex)), + note_hash_tree: mapAppendOnlyTreeSnapshotToNoir(partialStateReference.noteHashTree), + nullifier_tree: mapAppendOnlyTreeSnapshotToNoir(partialStateReference.nullifierTree), + public_data_tree: mapAppendOnlyTreeSnapshotToNoir(partialStateReference.publicDataTree), }; } @@ -590,11 +592,18 @@ export function mapPartialStateReferenceFromNoir( ); } -export function mapMembershipWitnessToNoir(witness: MembershipWitness): MembershipWitnessNoir { - const siblingPath = mapTuple(witness.siblingPath, mapFieldToNoir) as FixedLengthArray; +/** + * Maps a nullifier leaf preimage to noir + * @param nullifierLeafPreimage - The nullifier leaf preimage. + * @returns The noir nullifier leaf preimage. + */ +export function mapNullifierLeafPreimageToNoir( + nullifierLeafPreimage: NullifierLeafPreimage, +): NullifierLeafPreimageNoir { return { - leaf_index: witness.leafIndex.toString(), - sibling_path: siblingPath, + nullifier: mapFieldToNoir(nullifierLeafPreimage.nullifier), + next_nullifier: mapFieldToNoir(nullifierLeafPreimage.nextNullifier), + next_index: mapNumberToNoir(Number(nullifierLeafPreimage.nextIndex)), }; } @@ -611,17 +620,25 @@ export function mapPublicDataTreePreimageToNoir(preimage: PublicDataTreeLeafPrei } /** - * Maps a partial state reference to a noir partial state reference. - * @param partialStateReference - The partial state reference. - * @returns The noir partial state reference. + * Maps a protocol contract leaf preimage to noir + * @param protocolContractPreimage - The protocol contract leaf preimage. + * @returns The noir protocol contract leaf preimage. + * Note: the circuit does not use next_index, so it does not exist in the noir struct. */ -export function mapPartialStateReferenceToNoir( - partialStateReference: PartialStateReference, -): PartialStateReferenceNoir { +export function mapProtocolContractLeafPreimageToNoir( + protocolContractPreimage: ProtocolContractLeafPreimage, +): ProtocolContractLeafPreimageNoir { return { - note_hash_tree: mapAppendOnlyTreeSnapshotToNoir(partialStateReference.noteHashTree), - nullifier_tree: mapAppendOnlyTreeSnapshotToNoir(partialStateReference.nullifierTree), - public_data_tree: mapAppendOnlyTreeSnapshotToNoir(partialStateReference.publicDataTree), + address: mapFieldToNoir(protocolContractPreimage.address), + next_address: mapFieldToNoir(protocolContractPreimage.nextAddress), + }; +} + +export function mapMembershipWitnessToNoir(witness: MembershipWitness): MembershipWitnessNoir { + const siblingPath = mapTuple(witness.siblingPath, mapFieldToNoir) as FixedLengthArray; + return { + leaf_index: witness.leafIndex.toString(), + sibling_path: siblingPath, }; } diff --git a/yarn-project/noir-protocol-circuits-types/src/noir_test_gen.test.ts b/yarn-project/noir-protocol-circuits-types/src/noir_test_gen.test.ts index 2ce0f96fcb3..3616891fd7f 100644 --- a/yarn-project/noir-protocol-circuits-types/src/noir_test_gen.test.ts +++ b/yarn-project/noir-protocol-circuits-types/src/noir_test_gen.test.ts @@ -1,5 +1,6 @@ import { AztecAddress, + CLIENT_IVC_VERIFICATION_KEY_LENGTH_IN_FIELDS, type ContractClass, type ContractInstance, FunctionSelector, @@ -12,6 +13,7 @@ import { computePrivateFunctionsTree, computeSaltedInitializationHash, } from '@aztec/circuits.js'; +import { hashVK } from '@aztec/circuits.js/hash'; import { Fr } from '@aztec/foundation/fields'; import { setupCustomSnapshotSerializers } from '@aztec/foundation/testing'; @@ -50,6 +52,8 @@ describe('Data generation for noir tests', () => { const format = (obj: object) => JSON.stringify(obj, null, 2).replaceAll('"', ''); test.each(contracts)('Computes contract info for %s', async contract => { + const defaultVkHash = await hashVK(new Array(CLIENT_IVC_VERIFICATION_KEY_LENGTH_IN_FIELDS).fill(Fr.ZERO)); + contract.privateFunctions.forEach(p => (p.vkHash = defaultVkHash)); const contractClass: ContractClass = { ...contract, publicFunctions: [], version: 1 }; const contractClassId = await computeContractClassId(contractClass); const initializationHash = await computeInitializationHashFromEncodedArgs(constructorSelector, []); diff --git a/yarn-project/protocol-contracts/src/build_protocol_contract_tree.ts b/yarn-project/protocol-contracts/src/build_protocol_contract_tree.ts index b6f38ff88b3..7adc5c38668 100644 --- a/yarn-project/protocol-contracts/src/build_protocol_contract_tree.ts +++ b/yarn-project/protocol-contracts/src/build_protocol_contract_tree.ts @@ -1,22 +1,32 @@ import { type AztecAddress, type Fr, - type MerkleTree, - MerkleTreeCalculator, + type IndexedMerkleTree, + IndexedMerkleTreeCalculator, + MAX_PROTOCOL_CONTRACTS, PROTOCOL_CONTRACT_TREE_HEIGHT, + ProtocolContractLeafPreimage, } from '@aztec/circuits.js'; import { poseidon2Hash } from '@aztec/foundation/crypto'; -export async function buildProtocolContractTree(contracts: { address: AztecAddress; leaf: Fr }[]): Promise { - const calculator = await MerkleTreeCalculator.create(PROTOCOL_CONTRACT_TREE_HEIGHT, Buffer.alloc(32), async (a, b) => - (await poseidon2Hash([a, b])).toBuffer(), +export async function buildProtocolContractTree( + contracts: { address: AztecAddress; leaf: Fr }[], +): Promise> { + const hasher = { + hash: async (l: Buffer, r: Buffer) => (await poseidon2Hash([l, r])).toBuffer(), + hashInputs: async (i: Buffer[]) => (await poseidon2Hash(i)).toBuffer(), + }; + const calculator = await IndexedMerkleTreeCalculator.create( + PROTOCOL_CONTRACT_TREE_HEIGHT, + hasher, + ProtocolContractLeafPreimage, ); - const leaves = new Array(2 ** PROTOCOL_CONTRACT_TREE_HEIGHT).fill(Buffer.alloc(32)); + const leaves = new Array(MAX_PROTOCOL_CONTRACTS).fill(Buffer.alloc(32)); for (const contract of contracts) { const index = contract.address.toField().toNumber(); - leaves[index] = contract.leaf; + leaves[index] = contract.leaf.toBuffer(); } return calculator.computeTree(leaves); diff --git a/yarn-project/protocol-contracts/src/protocol_contract_tree.ts b/yarn-project/protocol-contracts/src/protocol_contract_tree.ts index 8edc6784544..1dadbf8f563 100644 --- a/yarn-project/protocol-contracts/src/protocol_contract_tree.ts +++ b/yarn-project/protocol-contracts/src/protocol_contract_tree.ts @@ -1,27 +1,42 @@ -import { type AztecAddress, Fr, type MerkleTree, PROTOCOL_CONTRACT_TREE_HEIGHT } from '@aztec/circuits.js'; -import { assertLength } from '@aztec/foundation/serialize'; +import { + type AztecAddress, + type IndexedMerkleTree, + type PROTOCOL_CONTRACT_TREE_HEIGHT, + type ProtocolContractLeafPreimage, +} from '@aztec/circuits.js'; +import { poseidon2Hash } from '@aztec/foundation/crypto'; import { buildProtocolContractTree } from './build_protocol_contract_tree.js'; -import { ProtocolContractAddress, ProtocolContractLeaf, protocolContractNames } from './protocol_contract_data.js'; +import { isProtocolContract } from './protocol_contract.js'; +import { ProtocolContractAddress, ProtocolContractLeaves, protocolContractNames } from './protocol_contract_data.js'; -let protocolContractTree: MerkleTree | undefined; +let protocolContractTree: + | IndexedMerkleTree + | undefined; async function getTree() { if (!protocolContractTree) { const leaves = protocolContractNames.map(name => ({ address: ProtocolContractAddress[name], - leaf: ProtocolContractLeaf[name], + leaf: ProtocolContractLeaves[name], })); protocolContractTree = await buildProtocolContractTree(leaves); } return protocolContractTree; } -export async function getProtocolContractSiblingPath(address: AztecAddress) { +export async function getProtocolContractLeafAndMembershipWitness(address: AztecAddress) { const tree = await getTree(); - const index = address.toField().toNumber(); - return assertLength( - tree.getSiblingPath(index).map(buf => new Fr(buf)), - PROTOCOL_CONTRACT_TREE_HEIGHT, - ); + let lowLeaf; + let witness; + if (isProtocolContract(address)) { + const index = address.toField().toNumber(); + lowLeaf = tree.leafPreimages[index]; + witness = tree.getMembershipWitness(index); + } else { + lowLeaf = tree.getLowLeaf(address.toBigInt()); + const hashed = (await poseidon2Hash(lowLeaf.toHashInputs())).toBuffer(); + witness = tree.getMembershipWitness(hashed); + } + return { lowLeaf, witness }; } diff --git a/yarn-project/protocol-contracts/src/scripts/generate_data.ts b/yarn-project/protocol-contracts/src/scripts/generate_data.ts index fa5b0e6c4b1..d6e405360ea 100644 --- a/yarn-project/protocol-contracts/src/scripts/generate_data.ts +++ b/yarn-project/protocol-contracts/src/scripts/generate_data.ts @@ -116,7 +116,7 @@ function generateContractAddresses(names: string[]) { function generateContractLeaves(names: string[], leaves: Fr[]) { return ` - export const ProtocolContractLeaf = { + export const ProtocolContractLeaves = { ${leaves.map((leaf, i) => `${names[i]}: Fr.fromHexString('${leaf.toString()}')`).join(',\n')} }; `; diff --git a/yarn-project/pxe/src/kernel_prover/kernel_prover.test.ts b/yarn-project/pxe/src/kernel_prover/kernel_prover.test.ts index 2b53c5bc8b7..ced97542f1d 100644 --- a/yarn-project/pxe/src/kernel_prover/kernel_prover.test.ts +++ b/yarn-project/pxe/src/kernel_prover/kernel_prover.test.ts @@ -66,6 +66,7 @@ describe('Kernel Prover', () => { 0, ); publicInputs.callContext.functionSelector = new FunctionSelector(fnName.charCodeAt(0)); + publicInputs.callContext.contractAddress = contractAddress; return new PrivateCallExecutionResult( Buffer.alloc(0), VerificationKey.makeFake().toBuffer(), diff --git a/yarn-project/pxe/src/kernel_prover/kernel_prover.ts b/yarn-project/pxe/src/kernel_prover/kernel_prover.ts index b827eebceee..497c867603a 100644 --- a/yarn-project/pxe/src/kernel_prover/kernel_prover.ts +++ b/yarn-project/pxe/src/kernel_prover/kernel_prover.ts @@ -13,7 +13,6 @@ import { CLIENT_IVC_VERIFICATION_KEY_LENGTH_IN_FIELDS, ClientIvcProof, Fr, - PROTOCOL_CONTRACT_TREE_HEIGHT, PrivateCallData, PrivateKernelCircuitPublicInputs, PrivateKernelData, @@ -28,18 +27,13 @@ import { VerificationKeyAsFields, } from '@aztec/circuits.js'; import { hashVK } from '@aztec/circuits.js/hash'; -import { makeTuple } from '@aztec/foundation/array'; import { vkAsFieldsMegaHonk } from '@aztec/foundation/crypto'; import { createLogger } from '@aztec/foundation/log'; import { assertLength } from '@aztec/foundation/serialize'; import { pushTestData } from '@aztec/foundation/testing'; import { Timer } from '@aztec/foundation/timer'; import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vks'; -import { - getProtocolContractSiblingPath, - isProtocolContract, - protocolContractTreeRoot, -} from '@aztec/protocol-contracts'; +import { getProtocolContractLeafAndMembershipWitness, protocolContractTreeRoot } from '@aztec/protocol-contracts'; import { type WitnessMap } from '@noir-lang/types'; import { strict as assert } from 'assert'; @@ -356,9 +350,8 @@ export class KernelProver { // const acirHash = keccak256(Buffer.from(bytecode, 'hex')); const acirHash = Fr.fromBuffer(Buffer.alloc(32, 0)); - const protocolContractSiblingPath = isProtocolContract(contractAddress) - ? await getProtocolContractSiblingPath(contractAddress) - : makeTuple(PROTOCOL_CONTRACT_TREE_HEIGHT, Fr.zero); + const { lowLeaf: protocolContractLeaf, witness: protocolContractMembershipWitness } = + await getProtocolContractLeafAndMembershipWitness(contractAddress); return PrivateCallData.from({ publicInputs, @@ -368,7 +361,8 @@ export class KernelProver { contractClassPublicBytecodeCommitment, saltedInitializationHash, functionLeafMembershipWitness, - protocolContractSiblingPath, + protocolContractMembershipWitness, + protocolContractLeaf, acirHash, }); }