diff --git a/barretenberg/cpp/pil/vm2/constants_gen.pil b/barretenberg/cpp/pil/vm2/constants_gen.pil index 61022e721c4f..7f7595955527 100644 --- a/barretenberg/cpp/pil/vm2/constants_gen.pil +++ b/barretenberg/cpp/pil/vm2/constants_gen.pil @@ -3,6 +3,7 @@ namespace constants; pol NOTE_HASH_TREE_HEIGHT = 40; pol PUBLIC_DATA_TREE_HEIGHT = 40; pol NULLIFIER_TREE_HEIGHT = 40; + pol NOTE_HASH_TREE_LEAF_COUNT = 1099511627776; pol MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX = 63; pol MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS = 3000; pol CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS = 2; @@ -54,6 +55,7 @@ namespace constants; pol AVM_EXEC_OP_ID_DEBUGLOG = 8192; pol AVM_EXEC_OP_ID_SLOAD = 16384; pol AVM_EXEC_OP_ID_SSTORE = 32768; + pol AVM_EXEC_OP_ID_NOTEHASH_EXISTS = 65536; pol AVM_EXEC_OP_ID_ALU_ADD = 1; pol AVM_EXEC_OP_ID_ALU_SUB = 2; pol AVM_EXEC_OP_ID_ALU_MUL = 4; diff --git a/barretenberg/cpp/pil/vm2/execution.pil b/barretenberg/cpp/pil/vm2/execution.pil index 0fb6a62f1ff1..22c50789f1e8 100644 --- a/barretenberg/cpp/pil/vm2/execution.pil +++ b/barretenberg/cpp/pil/vm2/execution.pil @@ -43,6 +43,7 @@ include "opcodes/internal_call.pil"; include "opcodes/external_call.pil"; include "opcodes/sload.pil"; include "opcodes/sstore.pil"; +include "opcodes/notehash_exists.pil"; namespace execution; @@ -377,6 +378,7 @@ pol commit sel_execute_returndata_size; pol commit sel_execute_debug_log; // unused but we are forced to have it pol commit sel_execute_sload; pol commit sel_execute_sstore; +pol commit sel_execute_notehash_exists; sel_execute_get_env_var * (1 - sel_execute_get_env_var) = 0; sel_execute_set * (1 - sel_execute_set) = 0; sel_execute_mov * (1 - sel_execute_mov) = 0; @@ -393,6 +395,7 @@ sel_execute_returndata_size * (1 - sel_execute_returndata_size) = 0; sel_execute_debug_log * (1 - sel_execute_debug_log) = 0; sel_execute_sload * (1 - sel_execute_sload) = 0; sel_execute_sstore * (1 - sel_execute_sstore) = 0; +sel_execute_notehash_exists * (1 - sel_execute_notehash_exists) = 0; #[EXEC_OP_ID_DECOMPOSITION] sel_execute_get_env_var * constants.AVM_EXEC_OP_ID_GETENVVAR + @@ -410,7 +413,8 @@ sel_execute_success_copy * constants.AVM_EXEC_OP_ID_SUCCESSCOPY + sel_execute_returndata_size * constants.AVM_EXEC_OP_ID_RETURNDATASIZE + sel_execute_debug_log * constants.AVM_EXEC_OP_ID_DEBUGLOG + sel_execute_sload * constants.AVM_EXEC_OP_ID_SLOAD + -sel_execute_sstore * constants.AVM_EXEC_OP_ID_SSTORE +sel_execute_sstore * constants.AVM_EXEC_OP_ID_SSTORE + +sel_execute_notehash_exists * constants.AVM_EXEC_OP_ID_NOTEHASH_EXISTS // We force the selectors to be 0 if we are not executing an opcode // or when we are not in the execution subtrace. = sel_should_execute_opcode * sel_execute_execution * subtrace_operation_id; diff --git a/barretenberg/cpp/pil/vm2/opcodes/notehash_exists.pil b/barretenberg/cpp/pil/vm2/opcodes/notehash_exists.pil new file mode 100644 index 000000000000..e0c1bcd1a943 --- /dev/null +++ b/barretenberg/cpp/pil/vm2/opcodes/notehash_exists.pil @@ -0,0 +1,64 @@ +include "../constants_gen.pil"; +include "../range_check.pil"; +include "../trees/note_hash_tree_check.pil"; + +// NOTEHASH_EXISTS opcode: Checks if a note hash exists in the note hash tree at a given leaf index +// +// Register usage: +// - register[0]: Contains the unique_note_hash to check for existence +// - register[1]: Contains the leaf_index where the unique_note_hash is going to be checked +// - register[2]: Boolean output of the opcode indicating whether the note hash exists at the given leaf index +// +// The opcode leverages the note_hash_tree_check gadget to verify the existence check operation +// against the current note hash tree root. The opcode will write false if the +// leaf index is greater than or equal to the total number of leaves in the note hash tree. +// +namespace execution; // this is a virtual gadget that shares rows with the execution trace + + #[skippable_if] + sel_execute_notehash_exists = 0; // from execution.pil. + + pol commit note_hash_leaf_in_range; + note_hash_leaf_in_range * (1 - note_hash_leaf_in_range) = 0; + + // Compare note_hash_leaf_in_range = register[1] (leaf_index) < NOTE_HASH_TREE_LEAF_COUNT + pol LEAF_INDEX_GTE_NOTE_HASH_LEAF_COUNT = register[1] - constants.NOTE_HASH_TREE_LEAF_COUNT; + pol LEAF_INDEX_LT_NOTE_HASH_LEAF_COUNT = constants.NOTE_HASH_TREE_LEAF_COUNT - register[1] - 1; + pol commit note_hash_leaf_index_leaf_count_cmp_diff; + sel_execute_notehash_exists * ((LEAF_INDEX_LT_NOTE_HASH_LEAF_COUNT - LEAF_INDEX_GTE_NOTE_HASH_LEAF_COUNT) * note_hash_leaf_in_range + LEAF_INDEX_GTE_NOTE_HASH_LEAF_COUNT - note_hash_leaf_index_leaf_count_cmp_diff) = 0; + + #[NOTE_HASH_INDEX_RANGE] + sel_execute_notehash_exists { + note_hash_leaf_index_leaf_count_cmp_diff, + constant_64 // From gas.pil + } in range_check.sel { + range_check.value, + range_check.rng_chk_bits + }; + + // If the leaf index is out of range, set the output to false + #[NOTE_HASH_EXISTS_OUT_OF_RANGE_FALSE] + sel_execute_notehash_exists * (1 - note_hash_leaf_in_range) * register[2] = 0; + + // If the leaf index is in range, check if the note hash exists in the note hash tree + #[NOTE_HASH_READ] + note_hash_leaf_in_range { + precomputed.zero, + register[0], // unique_note_hash input + register[1], // leaf_index input + prev_note_hash_tree_root, + register[2] // exists output + } in note_hash_tree_check.sel { + note_hash_tree_check.write, + note_hash_tree_check.note_hash, + note_hash_tree_check.leaf_index, + note_hash_tree_check.prev_root, + note_hash_tree_check.exists + }; + + #[NOTEHASH_EXISTS_U1_OUTPUT_TAG] + sel_execute_notehash_exists * (constants.MEM_TAG_U1 - mem_tag_reg[2]) = 0; + + #[NOTE_HASH_EXISTS_SUCCESS] + sel_execute_notehash_exists * sel_opcode_error = 0; + diff --git a/barretenberg/cpp/pil/vm2/trees/note_hash_tree_check.pil b/barretenberg/cpp/pil/vm2/trees/note_hash_tree_check.pil index c8b01c96443c..f077c348978f 100644 --- a/barretenberg/cpp/pil/vm2/trees/note_hash_tree_check.pil +++ b/barretenberg/cpp/pil/vm2/trees/note_hash_tree_check.pil @@ -14,9 +14,9 @@ include "../public_inputs.pil"; * For reading, we enforce that the note hash is already unique. * * Read usage (lookup): - * sel { precomputed.zero, unique_note_hash, leaf_index, note_hash_tree_root } + * sel { precomputed.zero, unique_note_hash, leaf_index, note_hash_tree_root, exists } * in note_hash_tree_check.sel { note_hash_tree_check.write, note_hash_tree_check.note_hash, - * note_hash_tree_check.leaf_index, note_hash_tree_check.prev_root }; + * note_hash_tree_check.leaf_index, note_hash_tree_check.prev_root, note_hash_tree_check.exists }; * * Write usage (permutation): * sel { note_hash, note_hash_next_available_leaf_index, prev_note_hash_tree_root, @@ -38,6 +38,7 @@ namespace note_hash_tree_check; pol commit write; write * (1 - write) = 0; pol READ = 1 - write; + pol commit exists; pol commit note_hash; pol commit leaf_index; @@ -129,7 +130,11 @@ namespace note_hash_tree_check; // ====== TREE CHECK ====== pol commit prev_leaf_value; - prev_leaf_value = (1 - write) * unique_note_hash; + + // exists = prev_leaf_value == unique_note_hash + pol PREV_LEAF_VALUE_UNIQUE_NOTE_HASH_DIFF = prev_leaf_value - unique_note_hash; + pol commit prev_leaf_value_unique_note_hash_diff_inv; + sel * (PREV_LEAF_VALUE_UNIQUE_NOTE_HASH_DIFF * (exists * (1 - prev_leaf_value_unique_note_hash_diff_inv) + prev_leaf_value_unique_note_hash_diff_inv) - 1 + exists) = 0; pol commit next_leaf_value; // If reading, next_leaf_value is unconstrained diff --git a/barretenberg/cpp/src/barretenberg/vm2/common/aztec_constants.hpp b/barretenberg/cpp/src/barretenberg/vm2/common/aztec_constants.hpp index f62b545a2957..5240bbb90de6 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/common/aztec_constants.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/common/aztec_constants.hpp @@ -4,6 +4,7 @@ #define NOTE_HASH_TREE_HEIGHT 40 #define PUBLIC_DATA_TREE_HEIGHT 40 #define NULLIFIER_TREE_HEIGHT 40 +#define NOTE_HASH_TREE_LEAF_COUNT 0x10000000000 #define MAX_NOTE_HASHES_PER_TX 64 #define MAX_NULLIFIERS_PER_TX 64 #define MAX_ENQUEUED_CALLS_PER_TX 32 @@ -72,6 +73,7 @@ #define AVM_EXEC_OP_ID_DEBUGLOG 8192 #define AVM_EXEC_OP_ID_SLOAD 16384 #define AVM_EXEC_OP_ID_SSTORE 32768 +#define AVM_EXEC_OP_ID_NOTEHASH_EXISTS 65536 #define AVM_EXEC_OP_ID_ALU_ADD 1 #define AVM_EXEC_OP_ID_ALU_SUB 2 #define AVM_EXEC_OP_ID_ALU_MUL 4 diff --git a/barretenberg/cpp/src/barretenberg/vm2/common/instruction_spec.cpp b/barretenberg/cpp/src/barretenberg/vm2/common/instruction_spec.cpp index 4f45a6e41828..6304404fb918 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/common/instruction_spec.cpp +++ b/barretenberg/cpp/src/barretenberg/vm2/common/instruction_spec.cpp @@ -569,6 +569,12 @@ const std::unordered_map EXEC_INSTRUCTION_ .dyn_da = AVM_SSTORE_DYN_DA_GAS }, .dyn_gas_id = AVM_DYN_GAS_ID_SSTORE, .register_info = RegisterInfo().add_inputs({ /*src*/ ValueTag::FF, /*slot*/ ValueTag::FF }) } }, + { ExecutionOpCode::NOTEHASHEXISTS, + { .num_addresses = 3, + .gas_cost = { .opcode_gas = AVM_NOTEHASHEXISTS_BASE_L2_GAS, .base_da = 0, .dyn_l2 = 0, .dyn_da = 0 }, + .register_info = RegisterInfo() + .add_inputs({ /*unique_note_hash*/ ValueTag::FF, /*leaf_index*/ ValueTag::U64 }) + .add_output(/*exists*/) } }, { ExecutionOpCode::GETCONTRACTINSTANCE, { .num_addresses = 2, .gas_cost = { .opcode_gas = AVM_GETCONTRACTINSTANCE_BASE_L2_GAS, .base_da = 0, .dyn_l2 = 0, .dyn_da = 0 }, diff --git a/barretenberg/cpp/src/barretenberg/vm2/constraining/relations/exec_op_id.test.cpp b/barretenberg/cpp/src/barretenberg/vm2/constraining/relations/exec_op_id.test.cpp index b6b8ab10304a..b2d66b811477 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/constraining/relations/exec_op_id.test.cpp +++ b/barretenberg/cpp/src/barretenberg/vm2/constraining/relations/exec_op_id.test.cpp @@ -34,16 +34,16 @@ using FF = AvmFlavorSettings::FF; using C = Column; using execution = bb::avm2::execution; -constexpr std::array WIRE_OPCODES = { +constexpr std::array WIRE_OPCODES = { WireOpCode::GETENVVAR_16, WireOpCode::SET_8, WireOpCode::SET_16, WireOpCode::SET_32, WireOpCode::SET_64, WireOpCode::SET_128, WireOpCode::SET_FF, WireOpCode::MOV_8, WireOpCode::MOV_16, WireOpCode::JUMP_32, WireOpCode::JUMPI_32, WireOpCode::CALL, WireOpCode::INTERNALCALL, WireOpCode::INTERNALRETURN, WireOpCode::RETURN, WireOpCode::SUCCESSCOPY, WireOpCode::STATICCALL, WireOpCode::REVERT_8, WireOpCode::REVERT_16, WireOpCode::RETURNDATASIZE, - WireOpCode::DEBUGLOG, WireOpCode::SLOAD, WireOpCode::SSTORE, + WireOpCode::DEBUGLOG, WireOpCode::SLOAD, WireOpCode::SSTORE, WireOpCode::NOTEHASHEXISTS, }; -constexpr std::array OPERATION_IDS = { +constexpr std::array OPERATION_IDS = { AVM_EXEC_OP_ID_GETENVVAR, AVM_EXEC_OP_ID_SET, AVM_EXEC_OP_ID_SET, AVM_EXEC_OP_ID_SET, AVM_EXEC_OP_ID_SET, AVM_EXEC_OP_ID_SET, @@ -55,10 +55,10 @@ constexpr std::array OPERATION_IDS = { AVM_EXEC_OP_ID_STATICCALL, AVM_EXEC_OP_ID_REVERT, AVM_EXEC_OP_ID_REVERT, AVM_EXEC_OP_ID_RETURNDATASIZE, AVM_EXEC_OP_ID_DEBUGLOG, AVM_EXEC_OP_ID_SLOAD, - AVM_EXEC_OP_ID_SSTORE, + AVM_EXEC_OP_ID_SSTORE, AVM_EXEC_OP_ID_NOTEHASH_EXISTS, }; -constexpr std::array SELECTOR_COLUMNS = { +constexpr std::array SELECTOR_COLUMNS = { C::execution_sel_execute_get_env_var, C::execution_sel_execute_set, C::execution_sel_execute_set, C::execution_sel_execute_set, C::execution_sel_execute_set, C::execution_sel_execute_set, @@ -70,7 +70,7 @@ constexpr std::array SELECTOR_COLUMNS = { C::execution_sel_execute_static_call, C::execution_sel_execute_revert, C::execution_sel_execute_revert, C::execution_sel_execute_returndata_size, C::execution_sel_execute_debug_log, C::execution_sel_execute_sload, - C::execution_sel_execute_sstore, + C::execution_sel_execute_sstore, C::execution_sel_execute_notehash_exists, }; // Ensure that WIRE_OPCODES contains all wire opcodes which have an execution opcode belonging diff --git a/barretenberg/cpp/src/barretenberg/vm2/constraining/relations/note_hash_tree_check.test.cpp b/barretenberg/cpp/src/barretenberg/vm2/constraining/relations/note_hash_tree_check.test.cpp index b47cfffd96b5..5cdb746ce815 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/constraining/relations/note_hash_tree_check.test.cpp +++ b/barretenberg/cpp/src/barretenberg/vm2/constraining/relations/note_hash_tree_check.test.cpp @@ -50,7 +50,7 @@ using C = Column; using note_hash_tree_check = bb::avm2::note_hash_tree_check; using RawPoseidon2 = crypto::Poseidon2; -TEST(NoteHashTreeCheckConstrainingTests, PositiveRead) +TEST(NoteHashTreeCheckConstrainingTests, PositiveExists) { EventEmitter hash_event_emitter; EventEmitter perm_event_emitter; @@ -76,8 +76,59 @@ TEST(NoteHashTreeCheckConstrainingTests, PositiveRead) } FF root = unconstrained_root_from_path(note_hash, leaf_index, sibling_path); - note_hash_tree_check_simulator.assert_read( - note_hash, leaf_index, sibling_path, AppendOnlyTreeSnapshot{ .root = root, .nextAvailableLeafIndex = 128 }); + EXPECT_TRUE(note_hash_tree_check_simulator.note_hash_exists( + note_hash, + note_hash, + leaf_index, + sibling_path, + AppendOnlyTreeSnapshot{ .root = root, .nextAvailableLeafIndex = 128 })); + + note_hash_tree_check_builder.process(note_hash_tree_check_event_emitter.dump_events(), trace); + merkle_check_builder.process(merkle_event_emitter.dump_events(), trace); + + check_relation(trace); + // Not checking all interactions due to the public inputs interaction, which needs to be checked in an e2e test + check_interaction(trace); +} + +TEST(NoteHashTreeCheckConstrainingTests, PositiveNotExists) +{ + EventEmitter hash_event_emitter; + EventEmitter perm_event_emitter; + Poseidon2 poseidon2(hash_event_emitter, perm_event_emitter); + + EventEmitter merkle_event_emitter; + MerkleCheck merkle_check(poseidon2, merkle_event_emitter); + + EventEmitter note_hash_tree_check_event_emitter; + NoteHashTreeCheck note_hash_tree_check_simulator(0, poseidon2, merkle_check, note_hash_tree_check_event_emitter); + + TestTraceContainer trace({ { { C::precomputed_first_row, 1 } } }); + MerkleCheckTraceBuilder merkle_check_builder; + NoteHashTreeCheckTraceBuilder note_hash_tree_check_builder; + + FF requested_note_hash = 42; + FF actual_leaf_value = 43; + + uint64_t leaf_index = 30; + std::vector sibling_path; + sibling_path.reserve(NOTE_HASH_TREE_HEIGHT); + for (size_t i = 0; i < NOTE_HASH_TREE_HEIGHT; ++i) { + sibling_path.emplace_back(i); + } + FF root = unconstrained_root_from_path(actual_leaf_value, leaf_index, sibling_path); + + EXPECT_FALSE(note_hash_tree_check_simulator.note_hash_exists( + requested_note_hash, + actual_leaf_value, + leaf_index, + sibling_path, + AppendOnlyTreeSnapshot{ .root = root, .nextAvailableLeafIndex = 128 })); note_hash_tree_check_builder.process(note_hash_tree_check_event_emitter.dump_events(), trace); merkle_check_builder.process(merkle_event_emitter.dump_events(), trace); diff --git a/barretenberg/cpp/src/barretenberg/vm2/constraining/relations/notehash_exists.test.cpp b/barretenberg/cpp/src/barretenberg/vm2/constraining/relations/notehash_exists.test.cpp new file mode 100644 index 000000000000..57fc3ca1a7a1 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm2/constraining/relations/notehash_exists.test.cpp @@ -0,0 +1,167 @@ +#include +#include + +#include + +#include "barretenberg/vm2/common/memory_types.hpp" +#include "barretenberg/vm2/constraining/flavor_settings.hpp" +#include "barretenberg/vm2/constraining/testing/check_relation.hpp" +#include "barretenberg/vm2/generated/relations/execution.hpp" +#include "barretenberg/vm2/simulation/lib/merkle.hpp" +#include "barretenberg/vm2/simulation/testing/mock_merkle_check.hpp" +#include "barretenberg/vm2/simulation/testing/mock_note_hash_tree_check.hpp" +#include "barretenberg/vm2/simulation/testing/mock_poseidon2.hpp" +#include "barretenberg/vm2/testing/macros.hpp" +#include "barretenberg/vm2/tracegen/execution_trace.hpp" +#include "barretenberg/vm2/tracegen/note_hash_tree_check_trace.hpp" +#include "barretenberg/vm2/tracegen/range_check_trace.hpp" +#include "barretenberg/vm2/tracegen/test_trace_container.hpp" + +namespace bb::avm2::constraining { +namespace { + +using tracegen::ExecutionTraceBuilder; +using tracegen::NoteHashTreeCheckTraceBuilder; +using tracegen::RangeCheckTraceBuilder; +using tracegen::TestTraceContainer; + +using simulation::EventEmitter; +using simulation::MockMerkleCheck; +using simulation::MockPoseidon2; +using simulation::NoteHashTreeCheck; +using simulation::NoteHashTreeCheckEvent; +using simulation::RangeCheck; +using simulation::RangeCheckEvent; + +using testing::NiceMock; + +using FF = AvmFlavorSettings::FF; +using C = Column; +using notehash_exists = bb::avm2::notehash_exists; +using RawPoseidon2 = crypto::Poseidon2; + +TEST(NoteHashExistsConstrainingTest, PositiveExists) +{ + uint64_t leaf_index_leaf_count_cmp_diff = NOTE_HASH_TREE_LEAF_COUNT - 27 - 1; + TestTraceContainer trace({ + { { C::execution_sel_execute_notehash_exists, 1 }, + { C::execution_register_0_, /*unique_note_hash=*/42 }, + { C::execution_register_1_, /*leaf_index=*/27 }, + { C::execution_register_2_, /*dst=*/1 }, + { C::execution_mem_tag_reg_0_, static_cast(MemoryTag::FF) }, + { C::execution_mem_tag_reg_1_, static_cast(MemoryTag::U64) }, + { C::execution_mem_tag_reg_2_, static_cast(MemoryTag::U1) }, + { C::execution_note_hash_leaf_in_range, 1 }, + { C::execution_note_hash_leaf_index_leaf_count_cmp_diff, leaf_index_leaf_count_cmp_diff }, + { C::execution_subtrace_operation_id, AVM_EXEC_OP_ID_NOTEHASH_EXISTS } }, + }); + check_relation(trace); +} + +TEST(NoteHashExistsConstrainingTest, OutOfRange) +{ + uint64_t leaf_index = NOTE_HASH_TREE_LEAF_COUNT + 1; + uint64_t leaf_index_leaf_count_cmp_diff = leaf_index - NOTE_HASH_TREE_LEAF_COUNT; + + TestTraceContainer trace({ + { { C::execution_sel_execute_notehash_exists, 1 }, + { C::execution_register_0_, /*unique_note_hash=*/42 }, + { C::execution_register_1_, /*leaf_index=*/leaf_index }, + { C::execution_register_2_, /*dst=*/0 }, + { C::execution_mem_tag_reg_0_, static_cast(MemoryTag::FF) }, + { C::execution_mem_tag_reg_1_, static_cast(MemoryTag::U64) }, + { C::execution_mem_tag_reg_2_, static_cast(MemoryTag::U1) }, + { C::execution_note_hash_leaf_in_range, 0 }, + { C::execution_note_hash_leaf_index_leaf_count_cmp_diff, leaf_index_leaf_count_cmp_diff }, + { C::execution_subtrace_operation_id, AVM_EXEC_OP_ID_NOTEHASH_EXISTS } }, + }); + + check_relation(trace); + + // Negative test: exists must be false + trace.set(0, { { { C::execution_register_2_, 1 } } }); + EXPECT_THROW_WITH_MESSAGE(check_relation(trace), "NOTE_HASH_EXISTS_OUT_OF_RANGE_FALSE"); +} + +TEST(NoteHashExistsConstrainingTest, NegativeInvalidOutputTag) +{ + TestTraceContainer trace({ { + { C::execution_sel_execute_notehash_exists, 1 }, + { C::execution_register_0_, /*unique_note_hash=*/42 }, + { C::execution_register_1_, /*leaf_index=*/27 }, + { C::execution_register_2_, /*dst=*/1 }, + { C::execution_mem_tag_reg_0_, static_cast(MemoryTag::FF) }, + { C::execution_mem_tag_reg_1_, static_cast(MemoryTag::U64) }, + { C::execution_mem_tag_reg_2_, static_cast(MemoryTag::U8) }, + } }); + EXPECT_THROW_WITH_MESSAGE(check_relation(trace, notehash_exists::SR_NOTEHASH_EXISTS_U1_OUTPUT_TAG), + "NOTEHASH_EXISTS_U1_OUTPUT_TAG"); +} + +TEST(NoteHashExistsConstrainingTest, NegativeNoteHashExistsSuccess) +{ + TestTraceContainer trace({ { + { C::execution_sel_execute_notehash_exists, 1 }, + { C::execution_sel_opcode_error, 1 }, + } }); + + EXPECT_THROW_WITH_MESSAGE(check_relation(trace, notehash_exists::SR_NOTE_HASH_EXISTS_SUCCESS), + "NOTE_HASH_EXISTS_SUCCESS"); +} + +TEST(NoteHashExistsConstrainingTest, Interactions) +{ + NiceMock poseidon2; + NiceMock merkle_check; + + EventEmitter range_check_event_emitter; + RangeCheck range_check(range_check_event_emitter); + EventEmitter note_hash_tree_check_event_emitter; + NoteHashTreeCheck note_hash_tree_check(27, poseidon2, merkle_check, note_hash_tree_check_event_emitter); + + FF requested_note_hash = 42; + FF actual_leaf_value = 43; + + uint64_t leaf_index = 27; + uint64_t leaf_index_leaf_count_cmp_diff = NOTE_HASH_TREE_LEAF_COUNT - leaf_index - 1; + + AppendOnlyTreeSnapshot note_hash_tree_snapshot = AppendOnlyTreeSnapshot{ + .root = 42, + .nextAvailableLeafIndex = 128, + }; + + range_check.assert_range(leaf_index_leaf_count_cmp_diff, 64); + note_hash_tree_check.note_hash_exists( + requested_note_hash, actual_leaf_value, leaf_index, {}, note_hash_tree_snapshot); + + TestTraceContainer trace({ { + { C::execution_sel_execute_notehash_exists, 1 }, + { C::execution_register_0_, requested_note_hash }, + { C::execution_register_1_, leaf_index }, + { C::execution_register_2_, /*result=*/0 }, + { C::execution_mem_tag_reg_0_, static_cast(MemoryTag::FF) }, + { C::execution_mem_tag_reg_1_, static_cast(MemoryTag::U64) }, + { C::execution_mem_tag_reg_2_, static_cast(MemoryTag::U1) }, + { C::execution_note_hash_leaf_in_range, 1 }, + { C::execution_sel_opcode_error, 0 }, + { C::execution_note_hash_leaf_index_leaf_count_cmp_diff, leaf_index_leaf_count_cmp_diff }, + { C::execution_subtrace_operation_id, AVM_EXEC_OP_ID_NOTEHASH_EXISTS }, + { C::execution_prev_note_hash_tree_root, note_hash_tree_snapshot.root }, + { C::execution_constant_64, 64 }, + } }); + + NoteHashTreeCheckTraceBuilder note_hash_tree_check_trace_builder; + note_hash_tree_check_trace_builder.process(note_hash_tree_check_event_emitter.dump_events(), trace); + + RangeCheckTraceBuilder range_check_trace_builder; + range_check_trace_builder.process(range_check_event_emitter.dump_events(), trace); + + check_relation(trace); + + check_interaction(trace); +} + +} // namespace +} // namespace bb::avm2::constraining diff --git a/barretenberg/cpp/src/barretenberg/vm2/constraining/relations/storage_write.test.cpp b/barretenberg/cpp/src/barretenberg/vm2/constraining/relations/storage_write.test.cpp index 82a571feafca..59bcc8d5b92a 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/constraining/relations/storage_write.test.cpp +++ b/barretenberg/cpp/src/barretenberg/vm2/constraining/relations/storage_write.test.cpp @@ -36,13 +36,9 @@ using tracegen::WrittenPublicDataSlotsTreeCheckTraceBuilder; using simulation::build_public_data_slots_tree; using simulation::EventEmitter; -using simulation::MerkleDB; using simulation::MockExecutionIdManager; using simulation::MockFieldGreaterThan; -using simulation::MockLowLevelMerkleDB; using simulation::MockMerkleCheck; -using simulation::MockNoteHashTreeCheck; -using simulation::MockNullifierTreeCheck; using simulation::MockPoseidon2; using simulation::PublicDataTreeCheck; using simulation::PublicDataTreeCheckEvent; @@ -54,8 +50,6 @@ using simulation::WrittenPublicDataSlotsTreeCheckEvent; using testing::_; using testing::NiceMock; -using testing::Return; -using testing::ReturnRef; using FF = AvmFlavorSettings::FF; using C = Column; diff --git a/barretenberg/cpp/src/barretenberg/vm2/generated/columns.hpp b/barretenberg/cpp/src/barretenberg/vm2/generated/columns.hpp index e564d12d609c..1213aadef10e 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/generated/columns.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/generated/columns.hpp @@ -9,8 +9,8 @@ namespace bb::avm2 { // clang-format off #define AVM2_PRECOMPUTED_ENTITIES_E(e) e precomputed_addressing_gas, e precomputed_bitwise_input_a, e precomputed_bitwise_input_b, e precomputed_bitwise_op_id, e precomputed_bitwise_output, e precomputed_clk, e precomputed_dyn_gas_id, e precomputed_envvar_pi_row_idx, e precomputed_exec_opcode, e precomputed_exec_opcode_base_da_gas, e precomputed_exec_opcode_dynamic_da_gas, e precomputed_exec_opcode_dynamic_l2_gas, e precomputed_exec_opcode_opcode_gas, e precomputed_expected_tag_reg_0_, e precomputed_expected_tag_reg_1_, e precomputed_expected_tag_reg_2_, e precomputed_expected_tag_reg_3_, e precomputed_expected_tag_reg_4_, e precomputed_expected_tag_reg_5_, e precomputed_expected_tag_reg_6_, e precomputed_first_row, e precomputed_instr_size, e precomputed_invalid_envvar_enum, e precomputed_is_address, e precomputed_is_class_id, e precomputed_is_dagasleft, e precomputed_is_deployer, e precomputed_is_feeperl2gas, e precomputed_is_init_hash, e precomputed_is_isstaticcall, e precomputed_is_l2_l1_message_phase, e precomputed_is_l2gasleft, e precomputed_is_public_call_request_phase, e precomputed_is_revertible, e precomputed_is_sender, e precomputed_is_transactionfee, e precomputed_is_valid_member_enum, e precomputed_keccak_round_constant, e precomputed_next_phase_on_revert, e precomputed_opcode_out_of_range, e precomputed_out_tag, e precomputed_p_decomposition_limb, e precomputed_p_decomposition_limb_index, e precomputed_p_decomposition_radix, e precomputed_phase_value, e precomputed_power_of_2, e precomputed_read_public_input_length_offset, e precomputed_read_public_input_offset, e precomputed_rw_reg_0_, e precomputed_rw_reg_1_, e precomputed_rw_reg_2_, e precomputed_rw_reg_3_, e precomputed_rw_reg_4_, e precomputed_rw_reg_5_, e precomputed_rw_reg_6_, e precomputed_sel_addressing_gas, e precomputed_sel_bitwise, e precomputed_sel_collect_fee, e precomputed_sel_envvar_pi_lookup_col0, e precomputed_sel_envvar_pi_lookup_col1, e precomputed_sel_exec_spec, e precomputed_sel_has_tag, e precomputed_sel_keccak, e precomputed_sel_mem_op_reg_0_, e precomputed_sel_mem_op_reg_1_, e precomputed_sel_mem_op_reg_2_, e precomputed_sel_mem_op_reg_3_, e precomputed_sel_mem_op_reg_4_, e precomputed_sel_mem_op_reg_5_, e precomputed_sel_mem_op_reg_6_, e precomputed_sel_mem_tag_out_of_range, e precomputed_sel_non_revertible_append_note_hash, e precomputed_sel_non_revertible_append_nullifier, e precomputed_sel_op_dc_0, e precomputed_sel_op_dc_1, e precomputed_sel_op_dc_10, e precomputed_sel_op_dc_11, e precomputed_sel_op_dc_12, e precomputed_sel_op_dc_13, e precomputed_sel_op_dc_14, e precomputed_sel_op_dc_15, e precomputed_sel_op_dc_16, e precomputed_sel_op_dc_17, e precomputed_sel_op_dc_2, e precomputed_sel_op_dc_3, e precomputed_sel_op_dc_4, e precomputed_sel_op_dc_5, e precomputed_sel_op_dc_6, e precomputed_sel_op_dc_7, e precomputed_sel_op_dc_8, e precomputed_sel_op_dc_9, e precomputed_sel_op_is_address_0_, e precomputed_sel_op_is_address_1_, e precomputed_sel_op_is_address_2_, e precomputed_sel_op_is_address_3_, e precomputed_sel_op_is_address_4_, e precomputed_sel_op_is_address_5_, e precomputed_sel_op_is_address_6_, e precomputed_sel_p_decomposition, e precomputed_sel_phase, e precomputed_sel_range_16, e precomputed_sel_range_8, e precomputed_sel_revertible_append_note_hash, e precomputed_sel_revertible_append_nullifier, e precomputed_sel_sha256_compression, e precomputed_sel_tag_check_reg_0_, e precomputed_sel_tag_check_reg_1_, e precomputed_sel_tag_check_reg_2_, e precomputed_sel_tag_check_reg_3_, e precomputed_sel_tag_check_reg_4_, e precomputed_sel_tag_check_reg_5_, e precomputed_sel_tag_check_reg_6_, e precomputed_sel_tag_is_op2, e precomputed_sel_tag_parameters, e precomputed_sel_to_radix_safe_limbs, e precomputed_sha256_compression_round_constant, e precomputed_subtrace_id, e precomputed_subtrace_operation_id, e precomputed_tag_byte_length, e precomputed_tag_max_bits, e precomputed_tag_max_value, e precomputed_to_radix_safe_limbs, e precomputed_write_public_input_offset, e precomputed_zero, e public_inputs_sel -#define AVM2_WIRE_ENTITIES_E(e) e public_inputs_cols_0_, e public_inputs_cols_1_, e public_inputs_cols_2_, e public_inputs_cols_3_, e address_derivation_address, e address_derivation_address_y, e address_derivation_class_id, e address_derivation_deployer_addr, e address_derivation_g1_x, e address_derivation_g1_y, e address_derivation_incoming_viewing_key_x, e address_derivation_incoming_viewing_key_y, e address_derivation_init_hash, e address_derivation_nullifier_key_x, e address_derivation_nullifier_key_y, e address_derivation_outgoing_viewing_key_x, e address_derivation_outgoing_viewing_key_y, e address_derivation_partial_address, e address_derivation_partial_address_domain_separator, e address_derivation_preaddress, e address_derivation_preaddress_domain_separator, e address_derivation_preaddress_public_key_x, e address_derivation_preaddress_public_key_y, e address_derivation_public_keys_hash, e address_derivation_public_keys_hash_domain_separator, e address_derivation_salt, e address_derivation_salted_init_hash, e address_derivation_sel, e address_derivation_tagging_key_x, e address_derivation_tagging_key_y, e alu_ab_tags_diff_inv, e alu_cf, e alu_helper1, e alu_ia, e alu_ia_tag, e alu_ib, e alu_ib_tag, e alu_ic, e alu_ic_tag, e alu_lt_ops_input_a, e alu_lt_ops_input_b, e alu_lt_ops_result_c, e alu_max_bits, e alu_max_value, e alu_op_id, e alu_sel, e alu_sel_ff_lt_ops, e alu_sel_int_lt_ops, e alu_sel_is_ff, e alu_sel_lt_ops, e alu_sel_op_add, e alu_sel_op_eq, e alu_sel_op_lt, e alu_sel_op_lte, e alu_sel_op_not, e alu_sel_op_shl, e alu_sel_op_shr, e alu_sel_tag_err, e alu_tag_ff_diff_inv, e bc_decomposition_abs_diff, e bc_decomposition_bytes, e bc_decomposition_bytes_pc_plus_1, e bc_decomposition_bytes_pc_plus_10, e bc_decomposition_bytes_pc_plus_11, e bc_decomposition_bytes_pc_plus_12, e bc_decomposition_bytes_pc_plus_13, e bc_decomposition_bytes_pc_plus_14, e bc_decomposition_bytes_pc_plus_15, e bc_decomposition_bytes_pc_plus_16, e bc_decomposition_bytes_pc_plus_17, e bc_decomposition_bytes_pc_plus_18, e bc_decomposition_bytes_pc_plus_19, e bc_decomposition_bytes_pc_plus_2, e bc_decomposition_bytes_pc_plus_20, e bc_decomposition_bytes_pc_plus_21, e bc_decomposition_bytes_pc_plus_22, e bc_decomposition_bytes_pc_plus_23, e bc_decomposition_bytes_pc_plus_24, e bc_decomposition_bytes_pc_plus_25, e bc_decomposition_bytes_pc_plus_26, e bc_decomposition_bytes_pc_plus_27, e bc_decomposition_bytes_pc_plus_28, e bc_decomposition_bytes_pc_plus_29, e bc_decomposition_bytes_pc_plus_3, e bc_decomposition_bytes_pc_plus_30, e bc_decomposition_bytes_pc_plus_31, e bc_decomposition_bytes_pc_plus_32, e bc_decomposition_bytes_pc_plus_33, e bc_decomposition_bytes_pc_plus_34, e bc_decomposition_bytes_pc_plus_35, e bc_decomposition_bytes_pc_plus_36, e bc_decomposition_bytes_pc_plus_4, e bc_decomposition_bytes_pc_plus_5, e bc_decomposition_bytes_pc_plus_6, e bc_decomposition_bytes_pc_plus_7, e bc_decomposition_bytes_pc_plus_8, e bc_decomposition_bytes_pc_plus_9, e bc_decomposition_bytes_rem_inv, e bc_decomposition_bytes_rem_min_one_inv, e bc_decomposition_bytes_remaining, e bc_decomposition_bytes_to_read, e bc_decomposition_id, e bc_decomposition_last_of_contract, e bc_decomposition_packed_field, e bc_decomposition_pc, e bc_decomposition_sel, e bc_decomposition_sel_overflow_correction_needed, e bc_decomposition_sel_packed, e bc_hashing_bytecode_id, e bc_hashing_incremental_hash, e bc_hashing_latch, e bc_hashing_output_hash, e bc_hashing_packed_field, e bc_hashing_pc_index, e bc_hashing_sel, e bc_hashing_start, e bc_retrieval_address, e bc_retrieval_artifact_hash, e bc_retrieval_bytecode_id, e bc_retrieval_current_class_id, e bc_retrieval_error, e bc_retrieval_instance_exists, e bc_retrieval_nullifier_tree_root, e bc_retrieval_private_function_root, e bc_retrieval_public_bytecode_commitment, e bc_retrieval_public_data_tree_root, e bc_retrieval_sel, e bitwise_acc_ia, e bitwise_acc_ib, e bitwise_acc_ic, e bitwise_ctr, e bitwise_ctr_inv, e bitwise_ctr_min_one_inv, e bitwise_err, e bitwise_ia_byte, e bitwise_ib_byte, e bitwise_ic_byte, e bitwise_last, e bitwise_op_id, e bitwise_sel, e bitwise_sel_get_ctr, e bitwise_sel_tag_ff_err, e bitwise_sel_tag_mismatch_err, e bitwise_start, e bitwise_tag_a, e bitwise_tag_a_inv, e bitwise_tag_ab_diff_inv, e bitwise_tag_b, e bitwise_tag_c, e calldata_context_id, e calldata_index, e calldata_latch, e calldata_sel, e calldata_value, e cd_hashing_context_id, e cd_hashing_input_0_, e cd_hashing_input_1_, e cd_hashing_input_2_, e cd_hashing_latch, e cd_hashing_length_remaining, e cd_hashing_output_hash, e cd_hashing_sel, e class_id_derivation_artifact_hash, e class_id_derivation_class_id, e class_id_derivation_private_function_root, e class_id_derivation_public_bytecode_commitment, e class_id_derivation_sel, e class_id_derivation_temp_constant_for_lookup, e context_stack_context_id, e context_stack_context_id_inv, e context_stack_contract_address, e context_stack_entered_context_id, e context_stack_is_static, e context_stack_msg_sender, e context_stack_next_pc, e context_stack_parent_calldata_addr, e context_stack_parent_calldata_size, e context_stack_parent_da_gas_limit, e context_stack_parent_da_gas_used, e context_stack_parent_id, e context_stack_parent_l2_gas_limit, e context_stack_parent_l2_gas_used, e context_stack_sel, e contract_instance_retrieval_address, e contract_instance_retrieval_current_class_id, e contract_instance_retrieval_deployer_addr, e contract_instance_retrieval_deployer_protocol_contract_address, e contract_instance_retrieval_exists, e contract_instance_retrieval_incoming_viewing_key_x, e contract_instance_retrieval_incoming_viewing_key_y, e contract_instance_retrieval_init_hash, e contract_instance_retrieval_nullifier_key_x, e contract_instance_retrieval_nullifier_key_y, e contract_instance_retrieval_nullifier_tree_root, e contract_instance_retrieval_original_class_id, e contract_instance_retrieval_outgoing_viewing_key_x, e contract_instance_retrieval_outgoing_viewing_key_y, e contract_instance_retrieval_public_data_tree_root, e contract_instance_retrieval_salt, e contract_instance_retrieval_sel, e contract_instance_retrieval_tagging_key_x, e contract_instance_retrieval_tagging_key_y, e data_copy_abs_diff_max_read_index, e data_copy_abs_max_read_offset, e data_copy_abs_read_diff, e data_copy_abs_write_diff, e data_copy_cd_copy_col_read, e data_copy_clk, e data_copy_copy_size, e data_copy_dst_addr, e data_copy_dst_context_id, e data_copy_dst_out_of_range_err, e data_copy_err, e data_copy_is_top_level, e data_copy_offset, e data_copy_operation_id, e data_copy_padding, e data_copy_parent_id_inv, e data_copy_read_addr, e data_copy_reads_left, e data_copy_reads_left_inv, e data_copy_sel_cd_copy, e data_copy_sel_end, e data_copy_sel_mem_read, e data_copy_sel_mem_write, e data_copy_sel_offset_gt_max_read, e data_copy_sel_rd_copy, e data_copy_sel_start, e data_copy_sel_start_no_err, e data_copy_src_addr, e data_copy_src_context_id, e data_copy_src_data_size, e data_copy_src_data_size_is_lt, e data_copy_src_out_of_range_err, e data_copy_thirty_two, e data_copy_value, e data_copy_write_count_minus_one_inv, e ecc_add_op, e ecc_double_op, e ecc_inv_2_p_y, e ecc_inv_x_diff, e ecc_inv_y_diff, e ecc_lambda, e ecc_p_is_inf, e ecc_p_x, e ecc_p_y, e ecc_q_is_inf, e ecc_q_x, e ecc_q_y, e ecc_r_is_inf, e ecc_r_x, e ecc_r_y, e ecc_result_infinity, e ecc_sel, e ecc_use_computed_result, e ecc_x_match, e ecc_y_match, e execution_addressing_error_collection_inv, e execution_addressing_gas, e execution_base_address_tag, e execution_base_address_tag_diff_inv, e execution_base_address_val, e execution_base_da_gas, e execution_batched_tags_diff_inv, e execution_batched_tags_diff_inv_reg, e execution_bytecode_id, e execution_call_allocated_left_da_cmp_diff, e execution_call_allocated_left_l2_cmp_diff, e execution_call_is_da_gas_allocated_lt_left, e execution_call_is_l2_gas_allocated_lt_left, e execution_constant_32, e execution_constant_64, e execution_context_id, e execution_contract_address, e execution_da_gas_limit, e execution_da_gas_used, e execution_discard, e execution_dying_context_diff_inv, e execution_dying_context_id, e execution_dying_context_id_inv, e execution_dyn_gas_id, e execution_dynamic_da_gas, e execution_dynamic_da_gas_factor, e execution_dynamic_l2_gas, e execution_dynamic_l2_gas_factor, e execution_enqueued_call_end, e execution_enqueued_call_start, e execution_envvar_pi_row_idx, e execution_ex_opcode, e execution_expected_tag_reg_0_, e execution_expected_tag_reg_1_, e execution_expected_tag_reg_2_, e execution_expected_tag_reg_3_, e execution_expected_tag_reg_4_, e execution_expected_tag_reg_5_, e execution_expected_tag_reg_6_, e execution_has_parent_ctx, e execution_indirect, e execution_instr_length, e execution_internal_call_id, e execution_internal_call_return_id, e execution_internal_call_return_id_inv, e execution_is_address, e execution_is_dagasleft, e execution_is_dying_context, e execution_is_isstaticcall, e execution_is_l2gasleft, e execution_is_parent_id_inv, e execution_is_sender, e execution_is_static, e execution_is_transactionfee, e execution_l1_l2_tree_root, e execution_l1_l2_tree_size, e execution_l2_gas_limit, e execution_l2_gas_used, e execution_last, e execution_last_child_returndata_addr, e execution_last_child_returndata_size, e execution_last_child_success, e execution_limit_used_da_cmp_diff, e execution_limit_used_l2_cmp_diff, e execution_max_data_writes_reached, e execution_mem_tag_reg_0_, e execution_mem_tag_reg_1_, e execution_mem_tag_reg_2_, e execution_mem_tag_reg_3_, e execution_mem_tag_reg_4_, e execution_mem_tag_reg_5_, e execution_mem_tag_reg_6_, e execution_msg_sender, e execution_nested_call_from_undiscarded_context, e execution_nested_exit_call, e execution_nested_return, e execution_next_context_id, e execution_next_internal_call_id, e execution_next_pc, e execution_note_hash_tree_root, e execution_note_hash_tree_size, e execution_nullifier_tree_root, e execution_nullifier_tree_size, e execution_num_note_hashes_emitted, e execution_num_nullifiers_emitted, e execution_num_relative_operands_inv, e execution_op_0_, e execution_op_1_, e execution_op_2_, e execution_op_3_, e execution_op_4_, e execution_op_5_, e execution_op_6_, e execution_op_after_relative_0_, e execution_op_after_relative_1_, e execution_op_after_relative_2_, e execution_op_after_relative_3_, e execution_op_after_relative_4_, e execution_op_after_relative_5_, e execution_op_after_relative_6_, e execution_opcode_gas, e execution_out_of_gas_da, e execution_out_of_gas_l2, e execution_overflow_range_check_result_0_, e execution_overflow_range_check_result_1_, e execution_overflow_range_check_result_2_, e execution_overflow_range_check_result_3_, e execution_overflow_range_check_result_4_, e execution_overflow_range_check_result_5_, e execution_overflow_range_check_result_6_, e execution_parent_calldata_addr, e execution_parent_calldata_size, e execution_parent_da_gas_limit, e execution_parent_da_gas_used, e execution_parent_id, e execution_parent_l2_gas_limit, e execution_parent_l2_gas_used, e execution_pc, e execution_prev_da_gas_used, e execution_prev_l1_l2_tree_root, e execution_prev_l1_l2_tree_size, e execution_prev_l2_gas_used, e execution_prev_note_hash_tree_root, e execution_prev_note_hash_tree_size, e execution_prev_nullifier_tree_root, e execution_prev_nullifier_tree_size, e execution_prev_num_note_hashes_emitted, e execution_prev_num_nullifiers_emitted, e execution_prev_public_data_tree_root, e execution_prev_public_data_tree_size, e execution_prev_written_public_data_slots_tree_root, e execution_prev_written_public_data_slots_tree_size, e execution_propagate_discard, e execution_public_data_tree_root, e execution_public_data_tree_size, e execution_register_0_, e execution_register_1_, e execution_register_2_, e execution_register_3_, e execution_register_4_, e execution_register_5_, e execution_register_6_, e execution_remaining_data_writes_inv, e execution_resolves_dying_context, e execution_rollback_context, e execution_rop_0_, e execution_rop_1_, e execution_rop_2_, e execution_rop_3_, e execution_rop_4_, e execution_rop_5_, e execution_rop_6_, e execution_rop_tag_0_, e execution_rop_tag_1_, e execution_rop_tag_2_, e execution_rop_tag_3_, e execution_rop_tag_4_, e execution_rop_tag_5_, e execution_rop_tag_6_, e execution_rw_reg_0_, e execution_rw_reg_1_, e execution_rw_reg_2_, e execution_rw_reg_3_, e execution_rw_reg_4_, e execution_rw_reg_5_, e execution_rw_reg_6_, e execution_sel, e execution_sel_addressing_error, e execution_sel_base_address_failure, e execution_sel_bytecode_retrieval_failure, e execution_sel_bytecode_retrieval_success, e execution_sel_do_base_check, e execution_sel_enter_call, e execution_sel_envvar_pi_lookup_col0, e execution_sel_envvar_pi_lookup_col1, e execution_sel_error, e execution_sel_execute_alu, e execution_sel_execute_bitwise, e execution_sel_execute_call, e execution_sel_execute_data_copy, e execution_sel_execute_debug_log, e execution_sel_execute_ecc_add, e execution_sel_execute_execution, e execution_sel_execute_get_contract_instance, e execution_sel_execute_get_env_var, e execution_sel_execute_internal_call, e execution_sel_execute_internal_return, e execution_sel_execute_jump, e execution_sel_execute_jumpi, e execution_sel_execute_keccakf1600, e execution_sel_execute_mov, e execution_sel_execute_poseidon2_perm, e execution_sel_execute_return, e execution_sel_execute_returndata_size, e execution_sel_execute_revert, e execution_sel_execute_set, e execution_sel_execute_sload, e execution_sel_execute_sstore, e execution_sel_execute_static_call, e execution_sel_execute_success_copy, e execution_sel_execute_to_radix, e execution_sel_exit_call, e execution_sel_failure, e execution_sel_gas_bitwise, e execution_sel_gas_calldata_copy, e execution_sel_gas_emit_unencrypted_log, e execution_sel_gas_returndata_copy, e execution_sel_gas_sstore, e execution_sel_gas_to_radix, e execution_sel_instruction_fetching_failure, e execution_sel_instruction_fetching_success, e execution_sel_mem_op_reg_0_, e execution_sel_mem_op_reg_1_, e execution_sel_mem_op_reg_2_, e execution_sel_mem_op_reg_3_, e execution_sel_mem_op_reg_4_, e execution_sel_mem_op_reg_5_, e execution_sel_mem_op_reg_6_, e execution_sel_op_is_address_0_, e execution_sel_op_is_address_1_, e execution_sel_op_is_address_2_, e execution_sel_op_is_address_3_, e execution_sel_op_is_address_4_, e execution_sel_op_is_address_5_, e execution_sel_op_is_address_6_, e execution_sel_op_is_indirect_wire_0_, e execution_sel_op_is_indirect_wire_1_, e execution_sel_op_is_indirect_wire_2_, e execution_sel_op_is_indirect_wire_3_, e execution_sel_op_is_indirect_wire_4_, e execution_sel_op_is_indirect_wire_5_, e execution_sel_op_is_indirect_wire_6_, e execution_sel_op_is_indirect_wire_7_, e execution_sel_op_is_relative_effective_0_, e execution_sel_op_is_relative_effective_1_, e execution_sel_op_is_relative_effective_2_, e execution_sel_op_is_relative_effective_3_, e execution_sel_op_is_relative_effective_4_, e execution_sel_op_is_relative_effective_5_, e execution_sel_op_is_relative_effective_6_, e execution_sel_op_is_relative_wire_0_, e execution_sel_op_is_relative_wire_1_, e execution_sel_op_is_relative_wire_2_, e execution_sel_op_is_relative_wire_3_, e execution_sel_op_is_relative_wire_4_, e execution_sel_op_is_relative_wire_5_, e execution_sel_op_is_relative_wire_6_, e execution_sel_op_is_relative_wire_7_, e execution_sel_op_reg_effective_0_, e execution_sel_op_reg_effective_1_, e execution_sel_op_reg_effective_2_, e execution_sel_op_reg_effective_3_, e execution_sel_op_reg_effective_4_, e execution_sel_op_reg_effective_5_, e execution_sel_op_reg_effective_6_, e execution_sel_opcode_error, e execution_sel_opcode_failure, e execution_sel_out_of_gas, e execution_sel_register_read_error, e execution_sel_relative_overflow_0_, e execution_sel_relative_overflow_1_, e execution_sel_relative_overflow_2_, e execution_sel_relative_overflow_3_, e execution_sel_relative_overflow_4_, e execution_sel_relative_overflow_5_, e execution_sel_relative_overflow_6_, e execution_sel_should_apply_indirection_0_, e execution_sel_should_apply_indirection_1_, e execution_sel_should_apply_indirection_2_, e execution_sel_should_apply_indirection_3_, e execution_sel_should_apply_indirection_4_, e execution_sel_should_apply_indirection_5_, e execution_sel_should_apply_indirection_6_, e execution_sel_should_check_gas, e execution_sel_should_execute_opcode, e execution_sel_should_read_registers, e execution_sel_should_write_registers, e execution_sel_some_final_check_failed, e execution_sel_tag_check_reg_0_, e execution_sel_tag_check_reg_1_, e execution_sel_tag_check_reg_2_, e execution_sel_tag_check_reg_3_, e execution_sel_tag_check_reg_4_, e execution_sel_tag_check_reg_5_, e execution_sel_tag_check_reg_6_, e execution_sel_write_public_data, e execution_subtrace_id, e execution_subtrace_operation_id, e execution_transaction_fee, e execution_two_to_32, e execution_value_from_pi, e execution_written_public_data_slots_tree_root, e execution_written_public_data_slots_tree_size, e ff_gt_a, e ff_gt_a_hi, e ff_gt_a_lo, e ff_gt_b, e ff_gt_b_hi, e ff_gt_b_lo, e ff_gt_borrow, e ff_gt_cmp_rng_ctr, e ff_gt_cmp_rng_ctr_inv, e ff_gt_constant_128, e ff_gt_p_a_borrow, e ff_gt_p_b_borrow, e ff_gt_p_sub_a_hi, e ff_gt_p_sub_a_lo, e ff_gt_p_sub_b_hi, e ff_gt_p_sub_b_lo, e ff_gt_res_hi, e ff_gt_res_lo, e ff_gt_result, e ff_gt_sel, e ff_gt_sel_gt, e ff_gt_sel_shift_rng, e get_contract_instance_clk, e get_contract_instance_contract_address, e get_contract_instance_dst_offset, e get_contract_instance_dst_offset_diff_max_inv, e get_contract_instance_exists_tag, e get_contract_instance_instance_exists, e get_contract_instance_is_class_id, e get_contract_instance_is_deployer, e get_contract_instance_is_init_hash, e get_contract_instance_is_valid_member_enum, e get_contract_instance_is_valid_writes_in_bounds, e get_contract_instance_member_enum, e get_contract_instance_member_tag, e get_contract_instance_member_write_offset, e get_contract_instance_nullifier_tree_root, e get_contract_instance_public_data_tree_root, e get_contract_instance_retrieved_class_id, e get_contract_instance_retrieved_deployer_addr, e get_contract_instance_retrieved_init_hash, e get_contract_instance_sel, e get_contract_instance_sel_error, e get_contract_instance_selected_member, e get_contract_instance_space_id, e gt_abs_diff, e gt_constant_128, e gt_input_a, e gt_input_b, e gt_res, e gt_sel, e instr_fetching_bd0, e instr_fetching_bd1, e instr_fetching_bd10, e instr_fetching_bd11, e instr_fetching_bd12, e instr_fetching_bd13, e instr_fetching_bd14, e instr_fetching_bd15, e instr_fetching_bd16, e instr_fetching_bd17, e instr_fetching_bd18, e instr_fetching_bd19, e instr_fetching_bd2, e instr_fetching_bd20, e instr_fetching_bd21, e instr_fetching_bd22, e instr_fetching_bd23, e instr_fetching_bd24, e instr_fetching_bd25, e instr_fetching_bd26, e instr_fetching_bd27, e instr_fetching_bd28, e instr_fetching_bd29, e instr_fetching_bd3, e instr_fetching_bd30, e instr_fetching_bd31, e instr_fetching_bd32, e instr_fetching_bd33, e instr_fetching_bd34, e instr_fetching_bd35, e instr_fetching_bd36, e instr_fetching_bd4, e instr_fetching_bd5, e instr_fetching_bd6, e instr_fetching_bd7, e instr_fetching_bd8, e instr_fetching_bd9, e instr_fetching_bytecode_id, e instr_fetching_bytecode_size, e instr_fetching_bytes_to_read, e instr_fetching_exec_opcode, e instr_fetching_indirect, e instr_fetching_instr_abs_diff, e instr_fetching_instr_out_of_range, e instr_fetching_instr_size, e instr_fetching_op1, e instr_fetching_op2, e instr_fetching_op3, e instr_fetching_op4, e instr_fetching_op5, e instr_fetching_op6, e instr_fetching_op7, e instr_fetching_opcode_out_of_range, e instr_fetching_pc, e instr_fetching_pc_abs_diff, e instr_fetching_pc_out_of_range, e instr_fetching_pc_size_in_bits, e instr_fetching_sel, e instr_fetching_sel_has_tag, e instr_fetching_sel_op_dc_0, e instr_fetching_sel_op_dc_1, e instr_fetching_sel_op_dc_10, e instr_fetching_sel_op_dc_11, e instr_fetching_sel_op_dc_12, e instr_fetching_sel_op_dc_13, e instr_fetching_sel_op_dc_14, e instr_fetching_sel_op_dc_15, e instr_fetching_sel_op_dc_16, e instr_fetching_sel_op_dc_2, e instr_fetching_sel_op_dc_3, e instr_fetching_sel_op_dc_4, e instr_fetching_sel_op_dc_5, e instr_fetching_sel_op_dc_6, e instr_fetching_sel_op_dc_7, e instr_fetching_sel_op_dc_8, e instr_fetching_sel_op_dc_9, e instr_fetching_sel_parsing_err, e instr_fetching_sel_pc_in_range, e instr_fetching_sel_tag_is_op2, e instr_fetching_tag_out_of_range, e instr_fetching_tag_value, e internal_call_stack_context_id, e internal_call_stack_entered_call_id, e internal_call_stack_id, e internal_call_stack_return_id, e internal_call_stack_return_pc, e internal_call_stack_sel, e keccak_memory_addr, e keccak_memory_clk, e keccak_memory_ctr, e keccak_memory_ctr_end, e keccak_memory_ctr_inv, e keccak_memory_ctr_min_state_size_inv, e keccak_memory_last, e keccak_memory_num_rounds, e keccak_memory_rw, e keccak_memory_sel, e keccak_memory_single_tag_error, e keccak_memory_space_id, e keccak_memory_start_read, e keccak_memory_start_write, e keccak_memory_tag, e keccak_memory_tag_error, e keccak_memory_tag_min_u64_inv, e keccak_memory_val00, e keccak_memory_val01, e keccak_memory_val02, e keccak_memory_val03, e keccak_memory_val04, e keccak_memory_val10, e keccak_memory_val11, e keccak_memory_val12, e keccak_memory_val13, e keccak_memory_val14, e keccak_memory_val20, e keccak_memory_val21, e keccak_memory_val22, e keccak_memory_val23, e keccak_memory_val24, e keccak_memory_val30, e keccak_memory_val31, e keccak_memory_val32, e keccak_memory_val33, e keccak_memory_val34, e keccak_memory_val40, e keccak_memory_val41, e keccak_memory_val42, e keccak_memory_val43, e keccak_memory_val44, e keccakf1600_bitwise_and_op_id, e keccakf1600_bitwise_xor_op_id, e keccakf1600_clk, e keccakf1600_dst_abs_diff, e keccakf1600_dst_addr, e keccakf1600_dst_out_of_range_error, e keccakf1600_error, e keccakf1600_last, e keccakf1600_rot_64_min_len_01, e keccakf1600_rot_64_min_len_03, e keccakf1600_rot_64_min_len_11, e keccakf1600_rot_64_min_len_13, e keccakf1600_rot_64_min_len_20, e keccakf1600_rot_64_min_len_22, e keccakf1600_rot_64_min_len_24, e keccakf1600_rot_64_min_len_31, e keccakf1600_rot_64_min_len_34, e keccakf1600_rot_64_min_len_42, e keccakf1600_rot_len_02, e keccakf1600_rot_len_04, e keccakf1600_rot_len_10, e keccakf1600_rot_len_12, e keccakf1600_rot_len_14, e keccakf1600_rot_len_21, e keccakf1600_rot_len_23, e keccakf1600_rot_len_30, e keccakf1600_rot_len_32, e keccakf1600_rot_len_33, e keccakf1600_rot_len_40, e keccakf1600_rot_len_41, e keccakf1600_rot_len_43, e keccakf1600_rot_len_44, e keccakf1600_round, e keccakf1600_round_cst, e keccakf1600_round_inv, e keccakf1600_sel, e keccakf1600_sel_no_error, e keccakf1600_sel_slice_read, e keccakf1600_sel_slice_write, e keccakf1600_space_id, e keccakf1600_src_abs_diff, e keccakf1600_src_addr, e keccakf1600_src_out_of_range_error, e keccakf1600_start, e keccakf1600_state_chi_00, e keccakf1600_state_chi_01, e keccakf1600_state_chi_02, e keccakf1600_state_chi_03, e keccakf1600_state_chi_04, e keccakf1600_state_chi_10, e keccakf1600_state_chi_11, e keccakf1600_state_chi_12, e keccakf1600_state_chi_13, e keccakf1600_state_chi_14, e keccakf1600_state_chi_20, e keccakf1600_state_chi_21, e keccakf1600_state_chi_22, e keccakf1600_state_chi_23, e keccakf1600_state_chi_24, e keccakf1600_state_chi_30, e keccakf1600_state_chi_31, e keccakf1600_state_chi_32, e keccakf1600_state_chi_33, e keccakf1600_state_chi_34, e keccakf1600_state_chi_40, e keccakf1600_state_chi_41, e keccakf1600_state_chi_42, e keccakf1600_state_chi_43, e keccakf1600_state_chi_44, e keccakf1600_state_in_00, e keccakf1600_state_in_01, e keccakf1600_state_in_02, e keccakf1600_state_in_03, e keccakf1600_state_in_04, e keccakf1600_state_in_10, e keccakf1600_state_in_11, e keccakf1600_state_in_12, e keccakf1600_state_in_13, e keccakf1600_state_in_14, e keccakf1600_state_in_20, e keccakf1600_state_in_21, e keccakf1600_state_in_22, e keccakf1600_state_in_23, e keccakf1600_state_in_24, e keccakf1600_state_in_30, e keccakf1600_state_in_31, e keccakf1600_state_in_32, e keccakf1600_state_in_33, e keccakf1600_state_in_34, e keccakf1600_state_in_40, e keccakf1600_state_in_41, e keccakf1600_state_in_42, e keccakf1600_state_in_43, e keccakf1600_state_in_44, e keccakf1600_state_iota_00, e keccakf1600_state_pi_and_00, e keccakf1600_state_pi_and_01, e keccakf1600_state_pi_and_02, e keccakf1600_state_pi_and_03, e keccakf1600_state_pi_and_04, e keccakf1600_state_pi_and_10, e keccakf1600_state_pi_and_11, e keccakf1600_state_pi_and_12, e keccakf1600_state_pi_and_13, e keccakf1600_state_pi_and_14, e keccakf1600_state_pi_and_20, e keccakf1600_state_pi_and_21, e keccakf1600_state_pi_and_22, e keccakf1600_state_pi_and_23, e keccakf1600_state_pi_and_24, e keccakf1600_state_pi_and_30, e keccakf1600_state_pi_and_31, e keccakf1600_state_pi_and_32, e keccakf1600_state_pi_and_33, e keccakf1600_state_pi_and_34, e keccakf1600_state_pi_and_40, e keccakf1600_state_pi_and_41, e keccakf1600_state_pi_and_42, e keccakf1600_state_pi_and_43, e keccakf1600_state_pi_and_44, e keccakf1600_state_pi_not_00, e keccakf1600_state_pi_not_01, e keccakf1600_state_pi_not_02, e keccakf1600_state_pi_not_03, e keccakf1600_state_pi_not_04, e keccakf1600_state_pi_not_10, e keccakf1600_state_pi_not_11, e keccakf1600_state_pi_not_12, e keccakf1600_state_pi_not_13, e keccakf1600_state_pi_not_14, e keccakf1600_state_pi_not_20, e keccakf1600_state_pi_not_21, e keccakf1600_state_pi_not_22, e keccakf1600_state_pi_not_23, e keccakf1600_state_pi_not_24, e keccakf1600_state_pi_not_30, e keccakf1600_state_pi_not_31, e keccakf1600_state_pi_not_32, e keccakf1600_state_pi_not_33, e keccakf1600_state_pi_not_34, e keccakf1600_state_pi_not_40, e keccakf1600_state_pi_not_41, e keccakf1600_state_pi_not_42, e keccakf1600_state_pi_not_43, e keccakf1600_state_pi_not_44, e keccakf1600_state_rho_01, e keccakf1600_state_rho_02, e keccakf1600_state_rho_03, e keccakf1600_state_rho_04, e keccakf1600_state_rho_10, e keccakf1600_state_rho_11, e keccakf1600_state_rho_12, e keccakf1600_state_rho_13, e keccakf1600_state_rho_14, e keccakf1600_state_rho_20, e keccakf1600_state_rho_21, e keccakf1600_state_rho_22, e keccakf1600_state_rho_23, e keccakf1600_state_rho_24, e keccakf1600_state_rho_30, e keccakf1600_state_rho_31, e keccakf1600_state_rho_32, e keccakf1600_state_rho_33, e keccakf1600_state_rho_34, e keccakf1600_state_rho_40, e keccakf1600_state_rho_41, e keccakf1600_state_rho_42, e keccakf1600_state_rho_43, e keccakf1600_state_rho_44, e keccakf1600_state_theta_00, e keccakf1600_state_theta_01, e keccakf1600_state_theta_02, e keccakf1600_state_theta_03, e keccakf1600_state_theta_04, e keccakf1600_state_theta_10, e keccakf1600_state_theta_11, e keccakf1600_state_theta_12, e keccakf1600_state_theta_13, e keccakf1600_state_theta_14, e keccakf1600_state_theta_20, e keccakf1600_state_theta_21, e keccakf1600_state_theta_22, e keccakf1600_state_theta_23, e keccakf1600_state_theta_24, e keccakf1600_state_theta_30, e keccakf1600_state_theta_31, e keccakf1600_state_theta_32, e keccakf1600_state_theta_33, e keccakf1600_state_theta_34, e keccakf1600_state_theta_40, e keccakf1600_state_theta_41, e keccakf1600_state_theta_42, e keccakf1600_state_theta_43, e keccakf1600_state_theta_44, e keccakf1600_state_theta_hi_01, e keccakf1600_state_theta_hi_02, e keccakf1600_state_theta_hi_03, e keccakf1600_state_theta_hi_04, e keccakf1600_state_theta_hi_10, e keccakf1600_state_theta_hi_11, e keccakf1600_state_theta_hi_12, e keccakf1600_state_theta_hi_13, e keccakf1600_state_theta_hi_14, e keccakf1600_state_theta_hi_20, e keccakf1600_state_theta_hi_21, e keccakf1600_state_theta_hi_22, e keccakf1600_state_theta_hi_23, e keccakf1600_state_theta_hi_24, e keccakf1600_state_theta_hi_30, e keccakf1600_state_theta_hi_31, e keccakf1600_state_theta_hi_32, e keccakf1600_state_theta_hi_33, e keccakf1600_state_theta_hi_34, e keccakf1600_state_theta_hi_40, e keccakf1600_state_theta_hi_41, e keccakf1600_state_theta_hi_42, e keccakf1600_state_theta_hi_43, e keccakf1600_state_theta_hi_44, e keccakf1600_state_theta_low_01, e keccakf1600_state_theta_low_02, e keccakf1600_state_theta_low_03, e keccakf1600_state_theta_low_04, e keccakf1600_state_theta_low_10, e keccakf1600_state_theta_low_11, e keccakf1600_state_theta_low_12, e keccakf1600_state_theta_low_13, e keccakf1600_state_theta_low_14, e keccakf1600_state_theta_low_20, e keccakf1600_state_theta_low_21, e keccakf1600_state_theta_low_22, e keccakf1600_state_theta_low_23, e keccakf1600_state_theta_low_24, e keccakf1600_state_theta_low_30, e keccakf1600_state_theta_low_31, e keccakf1600_state_theta_low_32, e keccakf1600_state_theta_low_33, e keccakf1600_state_theta_low_34, e keccakf1600_state_theta_low_40, e keccakf1600_state_theta_low_41, e keccakf1600_state_theta_low_42, e keccakf1600_state_theta_low_43, e keccakf1600_state_theta_low_44, e keccakf1600_tag_error, e keccakf1600_theta_combined_xor_0, e keccakf1600_theta_combined_xor_1, e keccakf1600_theta_combined_xor_2, e keccakf1600_theta_combined_xor_3, e keccakf1600_theta_combined_xor_4, e keccakf1600_theta_xor_01, e keccakf1600_theta_xor_02, e keccakf1600_theta_xor_03, e keccakf1600_theta_xor_11, e keccakf1600_theta_xor_12, e keccakf1600_theta_xor_13, e keccakf1600_theta_xor_21, e keccakf1600_theta_xor_22, e keccakf1600_theta_xor_23, e keccakf1600_theta_xor_31, e keccakf1600_theta_xor_32, e keccakf1600_theta_xor_33, e keccakf1600_theta_xor_41, e keccakf1600_theta_xor_42, e keccakf1600_theta_xor_43, e keccakf1600_theta_xor_row_0, e keccakf1600_theta_xor_row_1, e keccakf1600_theta_xor_row_2, e keccakf1600_theta_xor_row_3, e keccakf1600_theta_xor_row_4, e keccakf1600_theta_xor_row_low63_0, e keccakf1600_theta_xor_row_low63_1, e keccakf1600_theta_xor_row_low63_2, e keccakf1600_theta_xor_row_low63_3, e keccakf1600_theta_xor_row_low63_4, e keccakf1600_theta_xor_row_msb_0, e keccakf1600_theta_xor_row_msb_1, e keccakf1600_theta_xor_row_msb_2, e keccakf1600_theta_xor_row_msb_3, e keccakf1600_theta_xor_row_msb_4, e keccakf1600_theta_xor_row_rotl1_0, e keccakf1600_theta_xor_row_rotl1_1, e keccakf1600_theta_xor_row_rotl1_2, e keccakf1600_theta_xor_row_rotl1_3, e keccakf1600_theta_xor_row_rotl1_4, e keccakf1600_thirty_two, e memory_address, e memory_clk, e memory_rw, e memory_sel, e memory_space_id, e memory_tag, e memory_value, e merkle_check_constant_2, e merkle_check_end, e merkle_check_index, e merkle_check_index_is_even, e merkle_check_path_len, e merkle_check_read_left_node, e merkle_check_read_node, e merkle_check_read_output_hash, e merkle_check_read_right_node, e merkle_check_read_root, e merkle_check_remaining_path_len_inv, e merkle_check_sel, e merkle_check_sibling, e merkle_check_start, e merkle_check_write, e merkle_check_write_left_node, e merkle_check_write_node, e merkle_check_write_output_hash, e merkle_check_write_right_node, e merkle_check_write_root, e note_hash_tree_check_address, e note_hash_tree_check_discard, e note_hash_tree_check_first_nullifier, e note_hash_tree_check_first_nullifier_pi_index, e note_hash_tree_check_leaf_index, e note_hash_tree_check_next_leaf_value, e note_hash_tree_check_next_root, e note_hash_tree_check_nonce, e note_hash_tree_check_nonce_separator, e note_hash_tree_check_note_hash, e note_hash_tree_check_note_hash_index, e note_hash_tree_check_note_hash_tree_height, e note_hash_tree_check_prev_leaf_value, e note_hash_tree_check_prev_root, e note_hash_tree_check_public_inputs_index, e note_hash_tree_check_sel, e note_hash_tree_check_should_silo, e note_hash_tree_check_should_unique, e note_hash_tree_check_should_write_to_public_inputs, e note_hash_tree_check_siloed_note_hash, e note_hash_tree_check_siloing_separator, e note_hash_tree_check_unique_note_hash, e note_hash_tree_check_unique_note_hash_separator, e note_hash_tree_check_write, e nullifier_check_address, e nullifier_check_discard, e nullifier_check_exists, e nullifier_check_intermediate_root, e nullifier_check_leaf_not_exists, e nullifier_check_low_leaf_hash, e nullifier_check_low_leaf_index, e nullifier_check_low_leaf_next_index, e nullifier_check_low_leaf_next_nullifier, e nullifier_check_low_leaf_nullifier, e nullifier_check_new_leaf_hash, e nullifier_check_next_nullifier_inv, e nullifier_check_next_nullifier_is_nonzero, e nullifier_check_nullifier, e nullifier_check_nullifier_index, e nullifier_check_nullifier_low_leaf_nullifier_diff_inv, e nullifier_check_public_inputs_index, e nullifier_check_root, e nullifier_check_sel, e nullifier_check_should_insert, e nullifier_check_should_silo, e nullifier_check_should_write_to_public_inputs, e nullifier_check_siloed_nullifier, e nullifier_check_siloing_separator, e nullifier_check_tree_height, e nullifier_check_tree_size_before_write, e nullifier_check_updated_low_leaf_hash, e nullifier_check_updated_low_leaf_next_index, e nullifier_check_updated_low_leaf_next_nullifier, e nullifier_check_write, e nullifier_check_write_root, e poseidon2_hash_a_0, e poseidon2_hash_a_1, e poseidon2_hash_a_2, e poseidon2_hash_a_3, e poseidon2_hash_b_0, e poseidon2_hash_b_1, e poseidon2_hash_b_2, e poseidon2_hash_b_3, e poseidon2_hash_end, e poseidon2_hash_input_0, e poseidon2_hash_input_1, e poseidon2_hash_input_2, e poseidon2_hash_input_len, e poseidon2_hash_num_perm_rounds_rem, e poseidon2_hash_num_perm_rounds_rem_inv, e poseidon2_hash_output, e poseidon2_hash_padding, e poseidon2_hash_sel, e poseidon2_hash_start, e poseidon2_perm_B_10_0, e poseidon2_perm_B_10_1, e poseidon2_perm_B_10_2, e poseidon2_perm_B_10_3, e poseidon2_perm_B_11_0, e poseidon2_perm_B_11_1, e poseidon2_perm_B_11_2, e poseidon2_perm_B_11_3, e poseidon2_perm_B_12_0, e poseidon2_perm_B_12_1, e poseidon2_perm_B_12_2, e poseidon2_perm_B_12_3, e poseidon2_perm_B_13_0, e poseidon2_perm_B_13_1, e poseidon2_perm_B_13_2, e poseidon2_perm_B_13_3, e poseidon2_perm_B_14_0, e poseidon2_perm_B_14_1, e poseidon2_perm_B_14_2, e poseidon2_perm_B_14_3, e poseidon2_perm_B_15_0, e poseidon2_perm_B_15_1, e poseidon2_perm_B_15_2, e poseidon2_perm_B_15_3, e poseidon2_perm_B_16_0, e poseidon2_perm_B_16_1, e poseidon2_perm_B_16_2, e poseidon2_perm_B_16_3, e poseidon2_perm_B_17_0, e poseidon2_perm_B_17_1, e poseidon2_perm_B_17_2, e poseidon2_perm_B_17_3, e poseidon2_perm_B_18_0, e poseidon2_perm_B_18_1, e poseidon2_perm_B_18_2, e poseidon2_perm_B_18_3, e poseidon2_perm_B_19_0, e poseidon2_perm_B_19_1, e poseidon2_perm_B_19_2, e poseidon2_perm_B_19_3, e poseidon2_perm_B_20_0, e poseidon2_perm_B_20_1, e poseidon2_perm_B_20_2, e poseidon2_perm_B_20_3, e poseidon2_perm_B_21_0, e poseidon2_perm_B_21_1, e poseidon2_perm_B_21_2, e poseidon2_perm_B_21_3, e poseidon2_perm_B_22_0, e poseidon2_perm_B_22_1, e poseidon2_perm_B_22_2, e poseidon2_perm_B_22_3, e poseidon2_perm_B_23_0, e poseidon2_perm_B_23_1, e poseidon2_perm_B_23_2, e poseidon2_perm_B_23_3, e poseidon2_perm_B_24_0, e poseidon2_perm_B_24_1, e poseidon2_perm_B_24_2, e poseidon2_perm_B_24_3, e poseidon2_perm_B_25_0, e poseidon2_perm_B_25_1, e poseidon2_perm_B_25_2, e poseidon2_perm_B_25_3, e poseidon2_perm_B_26_0, e poseidon2_perm_B_26_1, e poseidon2_perm_B_26_2, e poseidon2_perm_B_26_3, e poseidon2_perm_B_27_0, e poseidon2_perm_B_27_1, e poseidon2_perm_B_27_2, e poseidon2_perm_B_27_3, e poseidon2_perm_B_28_0, e poseidon2_perm_B_28_1, e poseidon2_perm_B_28_2, e poseidon2_perm_B_28_3, e poseidon2_perm_B_29_0, e poseidon2_perm_B_29_1, e poseidon2_perm_B_29_2, e poseidon2_perm_B_29_3, e poseidon2_perm_B_30_0, e poseidon2_perm_B_30_1, e poseidon2_perm_B_30_2, e poseidon2_perm_B_30_3, e poseidon2_perm_B_31_0, e poseidon2_perm_B_31_1, e poseidon2_perm_B_31_2, e poseidon2_perm_B_31_3, e poseidon2_perm_B_32_0, e poseidon2_perm_B_32_1, e poseidon2_perm_B_32_2, e poseidon2_perm_B_32_3, e poseidon2_perm_B_33_0, e poseidon2_perm_B_33_1, e poseidon2_perm_B_33_2, e poseidon2_perm_B_33_3, e poseidon2_perm_B_34_0, e poseidon2_perm_B_34_1, e poseidon2_perm_B_34_2, e poseidon2_perm_B_34_3, e poseidon2_perm_B_35_0, e poseidon2_perm_B_35_1, e poseidon2_perm_B_35_2, e poseidon2_perm_B_35_3, e poseidon2_perm_B_36_0, e poseidon2_perm_B_36_1, e poseidon2_perm_B_36_2, e poseidon2_perm_B_36_3, e poseidon2_perm_B_37_0, e poseidon2_perm_B_37_1, e poseidon2_perm_B_37_2, e poseidon2_perm_B_37_3, e poseidon2_perm_B_38_0, e poseidon2_perm_B_38_1, e poseidon2_perm_B_38_2, e poseidon2_perm_B_38_3, e poseidon2_perm_B_39_0, e poseidon2_perm_B_39_1, e poseidon2_perm_B_39_2, e poseidon2_perm_B_39_3, e poseidon2_perm_B_40_0, e poseidon2_perm_B_40_1, e poseidon2_perm_B_40_2, e poseidon2_perm_B_40_3, e poseidon2_perm_B_41_0, e poseidon2_perm_B_41_1, e poseidon2_perm_B_41_2, e poseidon2_perm_B_41_3, e poseidon2_perm_B_42_0, e poseidon2_perm_B_42_1, e poseidon2_perm_B_42_2, e poseidon2_perm_B_42_3, e poseidon2_perm_B_43_0, e poseidon2_perm_B_43_1, e poseidon2_perm_B_43_2, e poseidon2_perm_B_43_3, e poseidon2_perm_B_44_0, e poseidon2_perm_B_44_1, e poseidon2_perm_B_44_2, e poseidon2_perm_B_44_3, e poseidon2_perm_B_45_0, e poseidon2_perm_B_45_1, e poseidon2_perm_B_45_2, e poseidon2_perm_B_45_3, e poseidon2_perm_B_46_0, e poseidon2_perm_B_46_1, e poseidon2_perm_B_46_2, e poseidon2_perm_B_46_3, e poseidon2_perm_B_47_0, e poseidon2_perm_B_47_1, e poseidon2_perm_B_47_2, e poseidon2_perm_B_47_3, e poseidon2_perm_B_48_0, e poseidon2_perm_B_48_1, e poseidon2_perm_B_48_2, e poseidon2_perm_B_48_3, e poseidon2_perm_B_49_0, e poseidon2_perm_B_49_1, e poseidon2_perm_B_49_2, e poseidon2_perm_B_49_3, e poseidon2_perm_B_4_0, e poseidon2_perm_B_4_1, e poseidon2_perm_B_4_2, e poseidon2_perm_B_4_3, e poseidon2_perm_B_50_0, e poseidon2_perm_B_50_1, e poseidon2_perm_B_50_2, e poseidon2_perm_B_50_3, e poseidon2_perm_B_51_0, e poseidon2_perm_B_51_1, e poseidon2_perm_B_51_2, e poseidon2_perm_B_51_3, e poseidon2_perm_B_52_0, e poseidon2_perm_B_52_1, e poseidon2_perm_B_52_2, e poseidon2_perm_B_52_3, e poseidon2_perm_B_53_0, e poseidon2_perm_B_53_1, e poseidon2_perm_B_53_2, e poseidon2_perm_B_53_3, e poseidon2_perm_B_54_0, e poseidon2_perm_B_54_1, e poseidon2_perm_B_54_2, e poseidon2_perm_B_54_3, e poseidon2_perm_B_55_0, e poseidon2_perm_B_55_1, e poseidon2_perm_B_55_2, e poseidon2_perm_B_55_3, e poseidon2_perm_B_56_0, e poseidon2_perm_B_56_1, e poseidon2_perm_B_56_2, e poseidon2_perm_B_56_3, e poseidon2_perm_B_57_0, e poseidon2_perm_B_57_1, e poseidon2_perm_B_57_2, e poseidon2_perm_B_57_3, e poseidon2_perm_B_58_0, e poseidon2_perm_B_58_1, e poseidon2_perm_B_58_2, e poseidon2_perm_B_58_3, e poseidon2_perm_B_59_0, e poseidon2_perm_B_59_1, e poseidon2_perm_B_59_2, e poseidon2_perm_B_59_3, e poseidon2_perm_B_5_0, e poseidon2_perm_B_5_1, e poseidon2_perm_B_5_2, e poseidon2_perm_B_5_3, e poseidon2_perm_B_6_0, e poseidon2_perm_B_6_1, e poseidon2_perm_B_6_2, e poseidon2_perm_B_6_3, e poseidon2_perm_B_7_0, e poseidon2_perm_B_7_1, e poseidon2_perm_B_7_2, e poseidon2_perm_B_7_3, e poseidon2_perm_B_8_0, e poseidon2_perm_B_8_1, e poseidon2_perm_B_8_2, e poseidon2_perm_B_8_3, e poseidon2_perm_B_9_0, e poseidon2_perm_B_9_1, e poseidon2_perm_B_9_2, e poseidon2_perm_B_9_3, e poseidon2_perm_EXT_LAYER_4, e poseidon2_perm_EXT_LAYER_5, e poseidon2_perm_EXT_LAYER_6, e poseidon2_perm_EXT_LAYER_7, e poseidon2_perm_T_0_4, e poseidon2_perm_T_0_5, e poseidon2_perm_T_0_6, e poseidon2_perm_T_0_7, e poseidon2_perm_T_1_4, e poseidon2_perm_T_1_5, e poseidon2_perm_T_1_6, e poseidon2_perm_T_1_7, e poseidon2_perm_T_2_4, e poseidon2_perm_T_2_5, e poseidon2_perm_T_2_6, e poseidon2_perm_T_2_7, e poseidon2_perm_T_3_4, e poseidon2_perm_T_3_5, e poseidon2_perm_T_3_6, e poseidon2_perm_T_3_7, e poseidon2_perm_T_60_4, e poseidon2_perm_T_60_5, e poseidon2_perm_T_60_6, e poseidon2_perm_T_60_7, e poseidon2_perm_T_61_4, e poseidon2_perm_T_61_5, e poseidon2_perm_T_61_6, e poseidon2_perm_T_61_7, e poseidon2_perm_T_62_4, e poseidon2_perm_T_62_5, e poseidon2_perm_T_62_6, e poseidon2_perm_T_62_7, e poseidon2_perm_T_63_4, e poseidon2_perm_T_63_5, e poseidon2_perm_T_63_6, e poseidon2_perm_T_63_7, e poseidon2_perm_a_0, e poseidon2_perm_a_1, e poseidon2_perm_a_2, e poseidon2_perm_a_3, e poseidon2_perm_b_0, e poseidon2_perm_b_1, e poseidon2_perm_b_2, e poseidon2_perm_b_3, e poseidon2_perm_sel, e public_data_check_address, e public_data_check_clk, e public_data_check_clk_diff, e public_data_check_constant_32, e public_data_check_discard, e public_data_check_end, e public_data_check_intermediate_root, e public_data_check_leaf_not_exists, e public_data_check_leaf_slot, e public_data_check_leaf_slot_low_leaf_slot_diff_inv, e public_data_check_length_pi_idx, e public_data_check_low_leaf_hash, e public_data_check_low_leaf_index, e public_data_check_low_leaf_next_index, e public_data_check_low_leaf_next_slot, e public_data_check_low_leaf_slot, e public_data_check_low_leaf_value, e public_data_check_new_leaf_hash, e public_data_check_next_slot_inv, e public_data_check_next_slot_is_nonzero, e public_data_check_nondiscaded_write, e public_data_check_not_end, e public_data_check_public_data_writes_length, e public_data_check_root, e public_data_check_sel, e public_data_check_should_insert, e public_data_check_should_write_to_public_inputs, e public_data_check_siloing_separator, e public_data_check_slot, e public_data_check_tree_height, e public_data_check_tree_size_after_write, e public_data_check_tree_size_before_write, e public_data_check_updated_low_leaf_hash, e public_data_check_updated_low_leaf_next_index, e public_data_check_updated_low_leaf_next_slot, e public_data_check_updated_low_leaf_value, e public_data_check_value, e public_data_check_write, e public_data_check_write_idx, e public_data_check_write_root, e public_data_squash_check_clock, e public_data_squash_clk, e public_data_squash_clk_diff, e public_data_squash_constant_32, e public_data_squash_leaf_slot, e public_data_squash_leaf_slot_increase, e public_data_squash_sel, e public_data_squash_write_to_public_inputs, e range_check_dyn_diff, e range_check_dyn_rng_chk_bits, e range_check_dyn_rng_chk_pow_2, e range_check_is_lte_u112, e range_check_is_lte_u128, e range_check_is_lte_u16, e range_check_is_lte_u32, e range_check_is_lte_u48, e range_check_is_lte_u64, e range_check_is_lte_u80, e range_check_is_lte_u96, e range_check_rng_chk_bits, e range_check_sel, e range_check_sel_r0_16_bit_rng_lookup, e range_check_sel_r1_16_bit_rng_lookup, e range_check_sel_r2_16_bit_rng_lookup, e range_check_sel_r3_16_bit_rng_lookup, e range_check_sel_r4_16_bit_rng_lookup, e range_check_sel_r5_16_bit_rng_lookup, e range_check_sel_r6_16_bit_rng_lookup, e range_check_u16_r0, e range_check_u16_r1, e range_check_u16_r2, e range_check_u16_r3, e range_check_u16_r4, e range_check_u16_r5, e range_check_u16_r6, e range_check_u16_r7, e range_check_value, e scalar_mul_bit, e scalar_mul_bit_idx, e scalar_mul_bit_radix, e scalar_mul_end, e scalar_mul_not_end, e scalar_mul_point_inf, e scalar_mul_point_x, e scalar_mul_point_y, e scalar_mul_res_inf, e scalar_mul_res_x, e scalar_mul_res_y, e scalar_mul_scalar, e scalar_mul_sel, e scalar_mul_should_add, e scalar_mul_start, e scalar_mul_temp_inf, e scalar_mul_temp_x, e scalar_mul_temp_y, e sha256_a, e sha256_a_and_b, e sha256_a_and_b_xor_a_and_c, e sha256_a_and_c, e sha256_a_rotr_13, e sha256_a_rotr_2, e sha256_a_rotr_22, e sha256_a_rotr_2_xor_a_rotr_13, e sha256_and_sel, e sha256_b, e sha256_b_and_c, e sha256_c, e sha256_ch, e sha256_clk, e sha256_computed_w_lhs, e sha256_computed_w_rhs, e sha256_d, e sha256_e, e sha256_e_and_f, e sha256_e_rotr_11, e sha256_e_rotr_25, e sha256_e_rotr_6, e sha256_e_rotr_6_xor_e_rotr_11, e sha256_f, e sha256_g, e sha256_h, e sha256_helper_w0, e sha256_helper_w1, e sha256_helper_w10, e sha256_helper_w11, e sha256_helper_w12, e sha256_helper_w13, e sha256_helper_w14, e sha256_helper_w15, e sha256_helper_w2, e sha256_helper_w3, e sha256_helper_w4, e sha256_helper_w5, e sha256_helper_w6, e sha256_helper_w7, e sha256_helper_w8, e sha256_helper_w9, e sha256_init_a, e sha256_init_b, e sha256_init_c, e sha256_init_d, e sha256_init_e, e sha256_init_f, e sha256_init_g, e sha256_init_h, e sha256_input_offset, e sha256_is_input_round, e sha256_latch, e sha256_lhs_a_13, e sha256_lhs_a_2, e sha256_lhs_a_22, e sha256_lhs_e_11, e sha256_lhs_e_25, e sha256_lhs_e_6, e sha256_lhs_w_10, e sha256_lhs_w_17, e sha256_lhs_w_18, e sha256_lhs_w_19, e sha256_lhs_w_3, e sha256_lhs_w_7, e sha256_maj, e sha256_next_a_lhs, e sha256_next_a_rhs, e sha256_next_e_lhs, e sha256_next_e_rhs, e sha256_not_e, e sha256_not_e_and_g, e sha256_output_a_lhs, e sha256_output_a_rhs, e sha256_output_b_lhs, e sha256_output_b_rhs, e sha256_output_c_lhs, e sha256_output_c_rhs, e sha256_output_d_lhs, e sha256_output_d_rhs, e sha256_output_e_lhs, e sha256_output_e_rhs, e sha256_output_f_lhs, e sha256_output_f_rhs, e sha256_output_g_lhs, e sha256_output_g_rhs, e sha256_output_h_lhs, e sha256_output_h_rhs, e sha256_output_offset, e sha256_perform_round, e sha256_rhs_a_13, e sha256_rhs_a_2, e sha256_rhs_a_22, e sha256_rhs_e_11, e sha256_rhs_e_25, e sha256_rhs_e_6, e sha256_rhs_w_10, e sha256_rhs_w_17, e sha256_rhs_w_18, e sha256_rhs_w_19, e sha256_rhs_w_3, e sha256_rhs_w_7, e sha256_round_constant, e sha256_round_count, e sha256_rounds_remaining, e sha256_rounds_remaining_inv, e sha256_s_0, e sha256_s_1, e sha256_sel, e sha256_start, e sha256_state_offset, e sha256_w, e sha256_w_15_rotr_18, e sha256_w_15_rotr_7, e sha256_w_15_rotr_7_xor_w_15_rotr_18, e sha256_w_15_rshift_3, e sha256_w_2_rotr_17, e sha256_w_2_rotr_17_xor_w_2_rotr_19, e sha256_w_2_rotr_19, e sha256_w_2_rshift_10, e sha256_w_s_0, e sha256_w_s_1, e sha256_xor_sel, e to_radix_acc, e to_radix_acc_under_p, e to_radix_end, e to_radix_exponent, e to_radix_found, e to_radix_is_unsafe_limb, e to_radix_limb, e to_radix_limb_eq_p, e to_radix_limb_index, e to_radix_limb_lt_p, e to_radix_limb_p_diff, e to_radix_limb_radix_diff, e to_radix_not_end, e to_radix_not_padding_limb, e to_radix_p_limb, e to_radix_radix, e to_radix_rem_inverse, e to_radix_safe_limbs, e to_radix_safety_diff_inverse, e to_radix_sel, e to_radix_start, e to_radix_value, e tx_calldata_hash, e tx_context_id, e tx_contract_addr, e tx_da_gas_limit, e tx_discard, e tx_effective_fee_per_da_gas, e tx_effective_fee_per_l2_gas, e tx_end_gas_used_pi_offset, e tx_end_phase, e tx_fee, e tx_fee_juice_balance_slot, e tx_fee_juice_balances_slot, e tx_fee_juice_contract_address, e tx_fee_payer, e tx_fee_payer_balance, e tx_fee_payer_new_balance, e tx_fee_payer_pi_offset, e tx_is_collect_fee, e tx_is_l2_l1_msg_phase, e tx_is_padded, e tx_is_public_call_request, e tx_is_revertible, e tx_is_static, e tx_is_teardown_phase, e tx_is_tree_insert_phase, e tx_l2_gas_limit, e tx_l2_l1_msg_content, e tx_l2_l1_msg_contract_address, e tx_l2_l1_msg_recipient, e tx_leaf_value, e tx_msg_sender, e tx_next_context_id, e tx_next_da_gas_used, e tx_next_da_gas_used_sent_to_enqueued_call, e tx_next_l1_l2_tree_root, e tx_next_l1_l2_tree_size, e tx_next_l2_gas_used, e tx_next_l2_gas_used_sent_to_enqueued_call, e tx_next_note_hash_tree_root, e tx_next_note_hash_tree_size, e tx_next_nullifier_tree_root, e tx_next_nullifier_tree_size, e tx_next_num_note_hashes_emitted, e tx_next_num_nullifiers_emitted, e tx_next_public_data_tree_root, e tx_next_public_data_tree_size, e tx_next_written_public_data_slots_tree_root, e tx_next_written_public_data_slots_tree_size, e tx_num_l2_l1_msg_emitted, e tx_phase_value, e tx_prev_da_gas_used, e tx_prev_da_gas_used_sent_to_enqueued_call, e tx_prev_l1_l2_tree_root, e tx_prev_l1_l2_tree_size, e tx_prev_l2_gas_used, e tx_prev_l2_gas_used_sent_to_enqueued_call, e tx_prev_note_hash_tree_root, e tx_prev_note_hash_tree_size, e tx_prev_nullifier_tree_root, e tx_prev_nullifier_tree_size, e tx_prev_num_note_hashes_emitted, e tx_prev_num_nullifiers_emitted, e tx_prev_public_data_tree_root, e tx_prev_public_data_tree_size, e tx_prev_written_public_data_slots_tree_root, e tx_prev_written_public_data_slots_tree_size, e tx_read_pi_length_offset, e tx_read_pi_offset, e tx_remaining_phase_counter, e tx_remaining_phase_inv, e tx_remaining_phase_minus_one_inv, e tx_reverted, e tx_sel, e tx_sel_non_revertible_append_note_hash, e tx_sel_non_revertible_append_nullifier, e tx_sel_read_phase_length, e tx_sel_revertible_append_note_hash, e tx_sel_revertible_append_nullifier, e tx_should_note_hash_append, e tx_should_nullifier_append, e tx_start_phase, e tx_successful_msg_emit, e tx_uint32_max, e tx_write_pi_offset, e update_check_address, e update_check_current_class_id, e update_check_deployer_protocol_contract_address, e update_check_hash_not_zero, e update_check_original_class_id, e update_check_public_data_tree_root, e update_check_public_leaf_index_domain_separator, e update_check_sel, e update_check_shared_mutable_hash_slot, e update_check_shared_mutable_slot, e update_check_timestamp, e update_check_timestamp_is_lt_timestamp_of_change, e update_check_timestamp_of_change, e update_check_timestamp_of_change_bit_size, e update_check_timestamp_of_change_subtraction, e update_check_timestamp_pi_offset, e update_check_update_hash, e update_check_update_hash_inv, e update_check_update_hi_metadata, e update_check_update_hi_metadata_bit_size, e update_check_update_post_class_id_is_zero, e update_check_update_post_class_inv, e update_check_update_pre_class_id_is_zero, e update_check_update_pre_class_inv, e update_check_update_preimage_metadata, e update_check_update_preimage_post_class_id, e update_check_update_preimage_pre_class_id, e update_check_updated_class_ids_slot, e written_public_data_slots_tree_check_address, e written_public_data_slots_tree_check_intermediate_root, e written_public_data_slots_tree_check_leaf_not_exists, e written_public_data_slots_tree_check_leaf_slot, e written_public_data_slots_tree_check_low_leaf_hash, e written_public_data_slots_tree_check_low_leaf_index, e written_public_data_slots_tree_check_low_leaf_next_index, e written_public_data_slots_tree_check_low_leaf_next_slot, e written_public_data_slots_tree_check_low_leaf_slot, e written_public_data_slots_tree_check_new_leaf_hash, e written_public_data_slots_tree_check_next_slot_inv, e written_public_data_slots_tree_check_next_slot_is_nonzero, e written_public_data_slots_tree_check_root, e written_public_data_slots_tree_check_sel, e written_public_data_slots_tree_check_should_insert, e written_public_data_slots_tree_check_siloing_separator, e written_public_data_slots_tree_check_slot, e written_public_data_slots_tree_check_slot_low_leaf_slot_diff_inv, e written_public_data_slots_tree_check_tree_height, e written_public_data_slots_tree_check_tree_size_after_write, e written_public_data_slots_tree_check_tree_size_before_write, e written_public_data_slots_tree_check_updated_low_leaf_hash, e written_public_data_slots_tree_check_updated_low_leaf_next_index, e written_public_data_slots_tree_check_updated_low_leaf_next_slot, e written_public_data_slots_tree_check_write, e written_public_data_slots_tree_check_write_root, e lookup_range_check_dyn_rng_chk_pow_2_counts, e lookup_range_check_dyn_diff_is_u16_counts, e lookup_range_check_r0_is_u16_counts, e lookup_range_check_r1_is_u16_counts, e lookup_range_check_r2_is_u16_counts, e lookup_range_check_r3_is_u16_counts, e lookup_range_check_r4_is_u16_counts, e lookup_range_check_r5_is_u16_counts, e lookup_range_check_r6_is_u16_counts, e lookup_range_check_r7_is_u16_counts, e lookup_ff_gt_a_lo_range_counts, e lookup_ff_gt_a_hi_range_counts, e lookup_gt_gt_range_counts, e lookup_alu_register_tag_value_counts, e lookup_alu_tag_max_bits_value_counts, e lookup_alu_ff_gt_counts, e lookup_alu_int_gt_counts, e lookup_bitwise_integral_tag_length_counts, e lookup_bitwise_byte_operations_counts, e lookup_bitwise_dispatch_exec_bitwise_counts, e lookup_keccak_memory_slice_to_mem_counts, e lookup_keccakf1600_theta_xor_01_counts, e lookup_keccakf1600_theta_xor_02_counts, e lookup_keccakf1600_theta_xor_03_counts, e lookup_keccakf1600_theta_xor_row_0_counts, e lookup_keccakf1600_theta_xor_11_counts, e lookup_keccakf1600_theta_xor_12_counts, e lookup_keccakf1600_theta_xor_13_counts, e lookup_keccakf1600_theta_xor_row_1_counts, e lookup_keccakf1600_theta_xor_21_counts, e lookup_keccakf1600_theta_xor_22_counts, e lookup_keccakf1600_theta_xor_23_counts, e lookup_keccakf1600_theta_xor_row_2_counts, e lookup_keccakf1600_theta_xor_31_counts, e lookup_keccakf1600_theta_xor_32_counts, e lookup_keccakf1600_theta_xor_33_counts, e lookup_keccakf1600_theta_xor_row_3_counts, e lookup_keccakf1600_theta_xor_41_counts, e lookup_keccakf1600_theta_xor_42_counts, e lookup_keccakf1600_theta_xor_43_counts, e lookup_keccakf1600_theta_xor_row_4_counts, e lookup_keccakf1600_theta_combined_xor_0_counts, e lookup_keccakf1600_theta_combined_xor_1_counts, e lookup_keccakf1600_theta_combined_xor_2_counts, e lookup_keccakf1600_theta_combined_xor_3_counts, e lookup_keccakf1600_theta_combined_xor_4_counts, e lookup_keccakf1600_state_theta_00_counts, e lookup_keccakf1600_state_theta_01_counts, e lookup_keccakf1600_state_theta_02_counts, e lookup_keccakf1600_state_theta_03_counts, e lookup_keccakf1600_state_theta_04_counts, e lookup_keccakf1600_state_theta_10_counts, e lookup_keccakf1600_state_theta_11_counts, e lookup_keccakf1600_state_theta_12_counts, e lookup_keccakf1600_state_theta_13_counts, e lookup_keccakf1600_state_theta_14_counts, e lookup_keccakf1600_state_theta_20_counts, e lookup_keccakf1600_state_theta_21_counts, e lookup_keccakf1600_state_theta_22_counts, e lookup_keccakf1600_state_theta_23_counts, e lookup_keccakf1600_state_theta_24_counts, e lookup_keccakf1600_state_theta_30_counts, e lookup_keccakf1600_state_theta_31_counts, e lookup_keccakf1600_state_theta_32_counts, e lookup_keccakf1600_state_theta_33_counts, e lookup_keccakf1600_state_theta_34_counts, e lookup_keccakf1600_state_theta_40_counts, e lookup_keccakf1600_state_theta_41_counts, e lookup_keccakf1600_state_theta_42_counts, e lookup_keccakf1600_state_theta_43_counts, e lookup_keccakf1600_state_theta_44_counts, e lookup_keccakf1600_theta_limb_02_range_counts, e lookup_keccakf1600_theta_limb_04_range_counts, e lookup_keccakf1600_theta_limb_10_range_counts, e lookup_keccakf1600_theta_limb_12_range_counts, e lookup_keccakf1600_theta_limb_14_range_counts, e lookup_keccakf1600_theta_limb_21_range_counts, e lookup_keccakf1600_theta_limb_23_range_counts, e lookup_keccakf1600_theta_limb_30_range_counts, e lookup_keccakf1600_theta_limb_32_range_counts, e lookup_keccakf1600_theta_limb_33_range_counts, e lookup_keccakf1600_theta_limb_40_range_counts, e lookup_keccakf1600_theta_limb_41_range_counts, e lookup_keccakf1600_theta_limb_43_range_counts, e lookup_keccakf1600_theta_limb_44_range_counts, e lookup_keccakf1600_theta_limb_01_range_counts, e lookup_keccakf1600_theta_limb_03_range_counts, e lookup_keccakf1600_theta_limb_11_range_counts, e lookup_keccakf1600_theta_limb_13_range_counts, e lookup_keccakf1600_theta_limb_20_range_counts, e lookup_keccakf1600_theta_limb_22_range_counts, e lookup_keccakf1600_theta_limb_24_range_counts, e lookup_keccakf1600_theta_limb_31_range_counts, e lookup_keccakf1600_theta_limb_34_range_counts, e lookup_keccakf1600_theta_limb_42_range_counts, e lookup_keccakf1600_state_pi_and_00_counts, e lookup_keccakf1600_state_pi_and_01_counts, e lookup_keccakf1600_state_pi_and_02_counts, e lookup_keccakf1600_state_pi_and_03_counts, e lookup_keccakf1600_state_pi_and_04_counts, e lookup_keccakf1600_state_pi_and_10_counts, e lookup_keccakf1600_state_pi_and_11_counts, e lookup_keccakf1600_state_pi_and_12_counts, e lookup_keccakf1600_state_pi_and_13_counts, e lookup_keccakf1600_state_pi_and_14_counts, e lookup_keccakf1600_state_pi_and_20_counts, e lookup_keccakf1600_state_pi_and_21_counts, e lookup_keccakf1600_state_pi_and_22_counts, e lookup_keccakf1600_state_pi_and_23_counts, e lookup_keccakf1600_state_pi_and_24_counts, e lookup_keccakf1600_state_pi_and_30_counts, e lookup_keccakf1600_state_pi_and_31_counts, e lookup_keccakf1600_state_pi_and_32_counts, e lookup_keccakf1600_state_pi_and_33_counts, e lookup_keccakf1600_state_pi_and_34_counts, e lookup_keccakf1600_state_pi_and_40_counts, e lookup_keccakf1600_state_pi_and_41_counts, e lookup_keccakf1600_state_pi_and_42_counts, e lookup_keccakf1600_state_pi_and_43_counts, e lookup_keccakf1600_state_pi_and_44_counts, e lookup_keccakf1600_state_chi_00_counts, e lookup_keccakf1600_state_chi_01_counts, e lookup_keccakf1600_state_chi_02_counts, e lookup_keccakf1600_state_chi_03_counts, e lookup_keccakf1600_state_chi_04_counts, e lookup_keccakf1600_state_chi_10_counts, e lookup_keccakf1600_state_chi_11_counts, e lookup_keccakf1600_state_chi_12_counts, e lookup_keccakf1600_state_chi_13_counts, e lookup_keccakf1600_state_chi_14_counts, e lookup_keccakf1600_state_chi_20_counts, e lookup_keccakf1600_state_chi_21_counts, e lookup_keccakf1600_state_chi_22_counts, e lookup_keccakf1600_state_chi_23_counts, e lookup_keccakf1600_state_chi_24_counts, e lookup_keccakf1600_state_chi_30_counts, e lookup_keccakf1600_state_chi_31_counts, e lookup_keccakf1600_state_chi_32_counts, e lookup_keccakf1600_state_chi_33_counts, e lookup_keccakf1600_state_chi_34_counts, e lookup_keccakf1600_state_chi_40_counts, e lookup_keccakf1600_state_chi_41_counts, e lookup_keccakf1600_state_chi_42_counts, e lookup_keccakf1600_state_chi_43_counts, e lookup_keccakf1600_state_chi_44_counts, e lookup_keccakf1600_round_cst_counts, e lookup_keccakf1600_state_iota_00_counts, e lookup_keccakf1600_src_abs_diff_positive_counts, e lookup_keccakf1600_dst_abs_diff_positive_counts, e lookup_sha256_round_constant_counts, e lookup_poseidon2_hash_poseidon2_perm_counts, e lookup_to_radix_limb_range_counts, e lookup_to_radix_limb_less_than_radix_range_counts, e lookup_to_radix_fetch_safe_limbs_counts, e lookup_to_radix_fetch_p_limb_counts, e lookup_to_radix_limb_p_diff_range_counts, e lookup_scalar_mul_to_radix_counts, e lookup_scalar_mul_double_counts, e lookup_scalar_mul_add_counts, e lookup_context_ctx_stack_call_counts, e lookup_context_ctx_stack_rollback_counts, e lookup_context_ctx_stack_return_counts, e lookup_calldata_hashing_cd_hash_counts, e lookup_calldata_hashing_cd_hash_end_counts, e lookup_data_copy_range_max_read_size_diff_counts, e lookup_data_copy_range_read_counts, e lookup_data_copy_range_write_counts, e lookup_data_copy_range_reads_left_counts, e lookup_data_copy_mem_write_counts, e lookup_data_copy_mem_read_counts, e lookup_data_copy_col_read_counts, e lookup_addressing_base_address_from_memory_counts, e lookup_addressing_relative_overflow_range_0_counts, e lookup_addressing_relative_overflow_range_1_counts, e lookup_addressing_relative_overflow_range_2_counts, e lookup_addressing_relative_overflow_range_3_counts, e lookup_addressing_relative_overflow_range_4_counts, e lookup_addressing_relative_overflow_range_5_counts, e lookup_addressing_relative_overflow_range_6_counts, e lookup_addressing_indirect_from_memory_0_counts, e lookup_addressing_indirect_from_memory_1_counts, e lookup_addressing_indirect_from_memory_2_counts, e lookup_addressing_indirect_from_memory_3_counts, e lookup_addressing_indirect_from_memory_4_counts, e lookup_addressing_indirect_from_memory_5_counts, e lookup_addressing_indirect_from_memory_6_counts, e lookup_registers_mem_op_0_counts, e lookup_registers_mem_op_1_counts, e lookup_registers_mem_op_2_counts, e lookup_registers_mem_op_3_counts, e lookup_registers_mem_op_4_counts, e lookup_registers_mem_op_5_counts, e lookup_registers_mem_op_6_counts, e lookup_gas_addressing_gas_read_counts, e lookup_gas_limit_used_l2_range_counts, e lookup_gas_limit_used_da_range_counts, e lookup_merkle_check_merkle_poseidon2_read_counts, e lookup_merkle_check_merkle_poseidon2_write_counts, e lookup_nullifier_check_silo_poseidon2_counts, e lookup_nullifier_check_low_leaf_poseidon2_counts, e lookup_nullifier_check_updated_low_leaf_poseidon2_counts, e lookup_nullifier_check_low_leaf_merkle_check_counts, e lookup_nullifier_check_low_leaf_nullifier_validation_counts, e lookup_nullifier_check_low_leaf_next_nullifier_validation_counts, e lookup_nullifier_check_new_leaf_poseidon2_counts, e lookup_nullifier_check_new_leaf_merkle_check_counts, e lookup_nullifier_check_write_nullifier_to_public_inputs_counts, e lookup_public_data_check_silo_poseidon2_counts, e lookup_public_data_check_low_leaf_slot_validation_counts, e lookup_public_data_check_low_leaf_next_slot_validation_counts, e lookup_public_data_check_low_leaf_poseidon2_0_counts, e lookup_public_data_check_low_leaf_poseidon2_1_counts, e lookup_public_data_check_updated_low_leaf_poseidon2_0_counts, e lookup_public_data_check_updated_low_leaf_poseidon2_1_counts, e lookup_public_data_check_low_leaf_merkle_check_counts, e lookup_public_data_check_new_leaf_poseidon2_0_counts, e lookup_public_data_check_new_leaf_poseidon2_1_counts, e lookup_public_data_check_new_leaf_merkle_check_counts, e lookup_public_data_check_write_public_data_to_public_inputs_counts, e lookup_written_public_data_slots_tree_check_silo_poseidon2_counts, e lookup_written_public_data_slots_tree_check_low_leaf_poseidon2_counts, e lookup_written_public_data_slots_tree_check_updated_low_leaf_poseidon2_counts, e lookup_written_public_data_slots_tree_check_low_leaf_merkle_check_counts, e lookup_written_public_data_slots_tree_check_low_leaf_slot_validation_counts, e lookup_written_public_data_slots_tree_check_low_leaf_next_slot_validation_counts, e lookup_written_public_data_slots_tree_check_new_leaf_poseidon2_counts, e lookup_written_public_data_slots_tree_check_new_leaf_merkle_check_counts, e lookup_address_derivation_salted_initialization_hash_poseidon2_0_counts, e lookup_address_derivation_salted_initialization_hash_poseidon2_1_counts, e lookup_address_derivation_partial_address_poseidon2_counts, e lookup_address_derivation_public_keys_hash_poseidon2_0_counts, e lookup_address_derivation_public_keys_hash_poseidon2_1_counts, e lookup_address_derivation_public_keys_hash_poseidon2_2_counts, e lookup_address_derivation_public_keys_hash_poseidon2_3_counts, e lookup_address_derivation_public_keys_hash_poseidon2_4_counts, e lookup_address_derivation_preaddress_poseidon2_counts, e lookup_address_derivation_preaddress_scalar_mul_counts, e lookup_address_derivation_address_ecadd_counts, e lookup_bc_decomposition_bytes_are_bytes_counts, e lookup_bc_decomposition_abs_diff_is_u16_counts, e lookup_bc_hashing_get_packed_field_counts, e lookup_bc_hashing_iv_is_len_counts, e lookup_update_check_timestamp_from_public_inputs_counts, e lookup_update_check_shared_mutable_slot_poseidon2_counts, e lookup_update_check_update_hash_public_data_read_counts, e lookup_update_check_update_hash_poseidon2_counts, e lookup_update_check_update_hi_metadata_range_counts, e lookup_update_check_update_lo_metadata_range_counts, e lookup_update_check_timestamp_of_change_cmp_range_counts, e lookup_contract_instance_retrieval_deployment_nullifier_read_counts, e lookup_contract_instance_retrieval_address_derivation_counts, e lookup_contract_instance_retrieval_update_check_counts, e lookup_bc_retrieval_contract_instance_retrieval_counts, e lookup_bc_retrieval_class_id_derivation_counts, e lookup_instr_fetching_pc_abs_diff_positive_counts, e lookup_instr_fetching_instr_abs_diff_positive_counts, e lookup_instr_fetching_tag_value_validation_counts, e lookup_instr_fetching_bytecode_size_from_bc_dec_counts, e lookup_instr_fetching_bytes_from_bc_dec_counts, e lookup_instr_fetching_wire_instruction_info_counts, e lookup_class_id_derivation_class_id_poseidon2_0_counts, e lookup_class_id_derivation_class_id_poseidon2_1_counts, e lookup_get_env_var_precomputed_info_counts, e lookup_get_env_var_read_from_public_inputs_col0_counts, e lookup_get_env_var_read_from_public_inputs_col1_counts, e lookup_get_contract_instance_precomputed_info_counts, e lookup_get_contract_instance_contract_instance_retrieval_counts, e lookup_get_contract_instance_mem_write_contract_instance_exists_counts, e lookup_get_contract_instance_mem_write_contract_instance_member_counts, e lookup_internal_call_push_call_stack_counts, e lookup_internal_call_unwind_call_stack_counts, e lookup_external_call_call_allocated_left_l2_range_counts, e lookup_external_call_call_allocated_left_da_range_counts, e lookup_sload_storage_read_counts, e lookup_sstore_record_written_storage_slot_counts, e lookup_sstore_storage_write_counts, e lookup_execution_bytecode_retrieval_result_counts, e lookup_execution_instruction_fetching_result_counts, e lookup_execution_instruction_fetching_body_counts, e lookup_execution_exec_spec_read_counts, e lookup_execution_dyn_l2_factor_bitwise_counts, e lookup_execution_check_written_storage_slot_counts, e lookup_note_hash_tree_check_silo_poseidon2_counts, e lookup_note_hash_tree_check_read_first_nullifier_counts, e lookup_note_hash_tree_check_nonce_computation_poseidon2_counts, e lookup_note_hash_tree_check_unique_note_hash_poseidon2_counts, e lookup_note_hash_tree_check_merkle_check_counts, e lookup_note_hash_tree_check_write_note_hash_to_public_inputs_counts, e lookup_tx_read_phase_table_counts, e lookup_tx_phase_jump_on_revert_counts, e lookup_tx_read_phase_length_counts, e lookup_tx_read_public_call_request_phase_counts, e lookup_tx_read_tree_insert_value_counts, e lookup_tx_note_hash_append_counts, e lookup_tx_nullifier_append_counts, e lookup_tx_read_l2_l1_msg_counts, e lookup_tx_write_l2_l1_msg_counts, e lookup_tx_read_effective_fee_public_inputs_counts, e lookup_tx_read_fee_payer_public_inputs_counts, e lookup_tx_balance_slot_poseidon2_counts, e lookup_tx_balance_validation_counts -#define AVM2_DERIVED_WITNESS_ENTITIES_E(e) e perm_keccakf1600_read_to_slice_inv, e perm_keccakf1600_write_to_slice_inv, e perm_public_data_check_squashing_inv, e perm_execution_dispatch_keccakf1600_inv, e perm_execution_dispatch_get_contract_instance_inv, e lookup_range_check_dyn_rng_chk_pow_2_inv, e lookup_range_check_dyn_diff_is_u16_inv, e lookup_range_check_r0_is_u16_inv, e lookup_range_check_r1_is_u16_inv, e lookup_range_check_r2_is_u16_inv, e lookup_range_check_r3_is_u16_inv, e lookup_range_check_r4_is_u16_inv, e lookup_range_check_r5_is_u16_inv, e lookup_range_check_r6_is_u16_inv, e lookup_range_check_r7_is_u16_inv, e lookup_ff_gt_a_lo_range_inv, e lookup_ff_gt_a_hi_range_inv, e lookup_gt_gt_range_inv, e lookup_alu_register_tag_value_inv, e lookup_alu_tag_max_bits_value_inv, e lookup_alu_ff_gt_inv, e lookup_alu_int_gt_inv, e lookup_bitwise_integral_tag_length_inv, e lookup_bitwise_byte_operations_inv, e lookup_bitwise_dispatch_exec_bitwise_inv, e lookup_keccak_memory_slice_to_mem_inv, e lookup_keccakf1600_theta_xor_01_inv, e lookup_keccakf1600_theta_xor_02_inv, e lookup_keccakf1600_theta_xor_03_inv, e lookup_keccakf1600_theta_xor_row_0_inv, e lookup_keccakf1600_theta_xor_11_inv, e lookup_keccakf1600_theta_xor_12_inv, e lookup_keccakf1600_theta_xor_13_inv, e lookup_keccakf1600_theta_xor_row_1_inv, e lookup_keccakf1600_theta_xor_21_inv, e lookup_keccakf1600_theta_xor_22_inv, e lookup_keccakf1600_theta_xor_23_inv, e lookup_keccakf1600_theta_xor_row_2_inv, e lookup_keccakf1600_theta_xor_31_inv, e lookup_keccakf1600_theta_xor_32_inv, e lookup_keccakf1600_theta_xor_33_inv, e lookup_keccakf1600_theta_xor_row_3_inv, e lookup_keccakf1600_theta_xor_41_inv, e lookup_keccakf1600_theta_xor_42_inv, e lookup_keccakf1600_theta_xor_43_inv, e lookup_keccakf1600_theta_xor_row_4_inv, e lookup_keccakf1600_theta_combined_xor_0_inv, e lookup_keccakf1600_theta_combined_xor_1_inv, e lookup_keccakf1600_theta_combined_xor_2_inv, e lookup_keccakf1600_theta_combined_xor_3_inv, e lookup_keccakf1600_theta_combined_xor_4_inv, e lookup_keccakf1600_state_theta_00_inv, e lookup_keccakf1600_state_theta_01_inv, e lookup_keccakf1600_state_theta_02_inv, e lookup_keccakf1600_state_theta_03_inv, e lookup_keccakf1600_state_theta_04_inv, e lookup_keccakf1600_state_theta_10_inv, e lookup_keccakf1600_state_theta_11_inv, e lookup_keccakf1600_state_theta_12_inv, e lookup_keccakf1600_state_theta_13_inv, e lookup_keccakf1600_state_theta_14_inv, e lookup_keccakf1600_state_theta_20_inv, e lookup_keccakf1600_state_theta_21_inv, e lookup_keccakf1600_state_theta_22_inv, e lookup_keccakf1600_state_theta_23_inv, e lookup_keccakf1600_state_theta_24_inv, e lookup_keccakf1600_state_theta_30_inv, e lookup_keccakf1600_state_theta_31_inv, e lookup_keccakf1600_state_theta_32_inv, e lookup_keccakf1600_state_theta_33_inv, e lookup_keccakf1600_state_theta_34_inv, e lookup_keccakf1600_state_theta_40_inv, e lookup_keccakf1600_state_theta_41_inv, e lookup_keccakf1600_state_theta_42_inv, e lookup_keccakf1600_state_theta_43_inv, e lookup_keccakf1600_state_theta_44_inv, e lookup_keccakf1600_theta_limb_02_range_inv, e lookup_keccakf1600_theta_limb_04_range_inv, e lookup_keccakf1600_theta_limb_10_range_inv, e lookup_keccakf1600_theta_limb_12_range_inv, e lookup_keccakf1600_theta_limb_14_range_inv, e lookup_keccakf1600_theta_limb_21_range_inv, e lookup_keccakf1600_theta_limb_23_range_inv, e lookup_keccakf1600_theta_limb_30_range_inv, e lookup_keccakf1600_theta_limb_32_range_inv, e lookup_keccakf1600_theta_limb_33_range_inv, e lookup_keccakf1600_theta_limb_40_range_inv, e lookup_keccakf1600_theta_limb_41_range_inv, e lookup_keccakf1600_theta_limb_43_range_inv, e lookup_keccakf1600_theta_limb_44_range_inv, e lookup_keccakf1600_theta_limb_01_range_inv, e lookup_keccakf1600_theta_limb_03_range_inv, e lookup_keccakf1600_theta_limb_11_range_inv, e lookup_keccakf1600_theta_limb_13_range_inv, e lookup_keccakf1600_theta_limb_20_range_inv, e lookup_keccakf1600_theta_limb_22_range_inv, e lookup_keccakf1600_theta_limb_24_range_inv, e lookup_keccakf1600_theta_limb_31_range_inv, e lookup_keccakf1600_theta_limb_34_range_inv, e lookup_keccakf1600_theta_limb_42_range_inv, e lookup_keccakf1600_state_pi_and_00_inv, e lookup_keccakf1600_state_pi_and_01_inv, e lookup_keccakf1600_state_pi_and_02_inv, e lookup_keccakf1600_state_pi_and_03_inv, e lookup_keccakf1600_state_pi_and_04_inv, e lookup_keccakf1600_state_pi_and_10_inv, e lookup_keccakf1600_state_pi_and_11_inv, e lookup_keccakf1600_state_pi_and_12_inv, e lookup_keccakf1600_state_pi_and_13_inv, e lookup_keccakf1600_state_pi_and_14_inv, e lookup_keccakf1600_state_pi_and_20_inv, e lookup_keccakf1600_state_pi_and_21_inv, e lookup_keccakf1600_state_pi_and_22_inv, e lookup_keccakf1600_state_pi_and_23_inv, e lookup_keccakf1600_state_pi_and_24_inv, e lookup_keccakf1600_state_pi_and_30_inv, e lookup_keccakf1600_state_pi_and_31_inv, e lookup_keccakf1600_state_pi_and_32_inv, e lookup_keccakf1600_state_pi_and_33_inv, e lookup_keccakf1600_state_pi_and_34_inv, e lookup_keccakf1600_state_pi_and_40_inv, e lookup_keccakf1600_state_pi_and_41_inv, e lookup_keccakf1600_state_pi_and_42_inv, e lookup_keccakf1600_state_pi_and_43_inv, e lookup_keccakf1600_state_pi_and_44_inv, e lookup_keccakf1600_state_chi_00_inv, e lookup_keccakf1600_state_chi_01_inv, e lookup_keccakf1600_state_chi_02_inv, e lookup_keccakf1600_state_chi_03_inv, e lookup_keccakf1600_state_chi_04_inv, e lookup_keccakf1600_state_chi_10_inv, e lookup_keccakf1600_state_chi_11_inv, e lookup_keccakf1600_state_chi_12_inv, e lookup_keccakf1600_state_chi_13_inv, e lookup_keccakf1600_state_chi_14_inv, e lookup_keccakf1600_state_chi_20_inv, e lookup_keccakf1600_state_chi_21_inv, e lookup_keccakf1600_state_chi_22_inv, e lookup_keccakf1600_state_chi_23_inv, e lookup_keccakf1600_state_chi_24_inv, e lookup_keccakf1600_state_chi_30_inv, e lookup_keccakf1600_state_chi_31_inv, e lookup_keccakf1600_state_chi_32_inv, e lookup_keccakf1600_state_chi_33_inv, e lookup_keccakf1600_state_chi_34_inv, e lookup_keccakf1600_state_chi_40_inv, e lookup_keccakf1600_state_chi_41_inv, e lookup_keccakf1600_state_chi_42_inv, e lookup_keccakf1600_state_chi_43_inv, e lookup_keccakf1600_state_chi_44_inv, e lookup_keccakf1600_round_cst_inv, e lookup_keccakf1600_state_iota_00_inv, e lookup_keccakf1600_src_abs_diff_positive_inv, e lookup_keccakf1600_dst_abs_diff_positive_inv, e lookup_sha256_round_constant_inv, e lookup_poseidon2_hash_poseidon2_perm_inv, e lookup_to_radix_limb_range_inv, e lookup_to_radix_limb_less_than_radix_range_inv, e lookup_to_radix_fetch_safe_limbs_inv, e lookup_to_radix_fetch_p_limb_inv, e lookup_to_radix_limb_p_diff_range_inv, e lookup_scalar_mul_to_radix_inv, e lookup_scalar_mul_double_inv, e lookup_scalar_mul_add_inv, e lookup_context_ctx_stack_call_inv, e lookup_context_ctx_stack_rollback_inv, e lookup_context_ctx_stack_return_inv, e lookup_calldata_hashing_cd_hash_inv, e lookup_calldata_hashing_cd_hash_end_inv, e lookup_data_copy_range_max_read_size_diff_inv, e lookup_data_copy_range_read_inv, e lookup_data_copy_range_write_inv, e lookup_data_copy_range_reads_left_inv, e lookup_data_copy_mem_write_inv, e lookup_data_copy_mem_read_inv, e lookup_data_copy_col_read_inv, e lookup_addressing_base_address_from_memory_inv, e lookup_addressing_relative_overflow_range_0_inv, e lookup_addressing_relative_overflow_range_1_inv, e lookup_addressing_relative_overflow_range_2_inv, e lookup_addressing_relative_overflow_range_3_inv, e lookup_addressing_relative_overflow_range_4_inv, e lookup_addressing_relative_overflow_range_5_inv, e lookup_addressing_relative_overflow_range_6_inv, e lookup_addressing_indirect_from_memory_0_inv, e lookup_addressing_indirect_from_memory_1_inv, e lookup_addressing_indirect_from_memory_2_inv, e lookup_addressing_indirect_from_memory_3_inv, e lookup_addressing_indirect_from_memory_4_inv, e lookup_addressing_indirect_from_memory_5_inv, e lookup_addressing_indirect_from_memory_6_inv, e lookup_registers_mem_op_0_inv, e lookup_registers_mem_op_1_inv, e lookup_registers_mem_op_2_inv, e lookup_registers_mem_op_3_inv, e lookup_registers_mem_op_4_inv, e lookup_registers_mem_op_5_inv, e lookup_registers_mem_op_6_inv, e lookup_gas_addressing_gas_read_inv, e lookup_gas_limit_used_l2_range_inv, e lookup_gas_limit_used_da_range_inv, e lookup_merkle_check_merkle_poseidon2_read_inv, e lookup_merkle_check_merkle_poseidon2_write_inv, e lookup_nullifier_check_silo_poseidon2_inv, e lookup_nullifier_check_low_leaf_poseidon2_inv, e lookup_nullifier_check_updated_low_leaf_poseidon2_inv, e lookup_nullifier_check_low_leaf_merkle_check_inv, e lookup_nullifier_check_low_leaf_nullifier_validation_inv, e lookup_nullifier_check_low_leaf_next_nullifier_validation_inv, e lookup_nullifier_check_new_leaf_poseidon2_inv, e lookup_nullifier_check_new_leaf_merkle_check_inv, e lookup_nullifier_check_write_nullifier_to_public_inputs_inv, e lookup_public_data_check_silo_poseidon2_inv, e lookup_public_data_check_low_leaf_slot_validation_inv, e lookup_public_data_check_low_leaf_next_slot_validation_inv, e lookup_public_data_check_low_leaf_poseidon2_0_inv, e lookup_public_data_check_low_leaf_poseidon2_1_inv, e lookup_public_data_check_updated_low_leaf_poseidon2_0_inv, e lookup_public_data_check_updated_low_leaf_poseidon2_1_inv, e lookup_public_data_check_low_leaf_merkle_check_inv, e lookup_public_data_check_new_leaf_poseidon2_0_inv, e lookup_public_data_check_new_leaf_poseidon2_1_inv, e lookup_public_data_check_new_leaf_merkle_check_inv, e lookup_public_data_check_write_public_data_to_public_inputs_inv, e lookup_written_public_data_slots_tree_check_silo_poseidon2_inv, e lookup_written_public_data_slots_tree_check_low_leaf_poseidon2_inv, e lookup_written_public_data_slots_tree_check_updated_low_leaf_poseidon2_inv, e lookup_written_public_data_slots_tree_check_low_leaf_merkle_check_inv, e lookup_written_public_data_slots_tree_check_low_leaf_slot_validation_inv, e lookup_written_public_data_slots_tree_check_low_leaf_next_slot_validation_inv, e lookup_written_public_data_slots_tree_check_new_leaf_poseidon2_inv, e lookup_written_public_data_slots_tree_check_new_leaf_merkle_check_inv, e lookup_address_derivation_salted_initialization_hash_poseidon2_0_inv, e lookup_address_derivation_salted_initialization_hash_poseidon2_1_inv, e lookup_address_derivation_partial_address_poseidon2_inv, e lookup_address_derivation_public_keys_hash_poseidon2_0_inv, e lookup_address_derivation_public_keys_hash_poseidon2_1_inv, e lookup_address_derivation_public_keys_hash_poseidon2_2_inv, e lookup_address_derivation_public_keys_hash_poseidon2_3_inv, e lookup_address_derivation_public_keys_hash_poseidon2_4_inv, e lookup_address_derivation_preaddress_poseidon2_inv, e lookup_address_derivation_preaddress_scalar_mul_inv, e lookup_address_derivation_address_ecadd_inv, e lookup_bc_decomposition_bytes_are_bytes_inv, e lookup_bc_decomposition_abs_diff_is_u16_inv, e lookup_bc_hashing_get_packed_field_inv, e lookup_bc_hashing_iv_is_len_inv, e lookup_update_check_timestamp_from_public_inputs_inv, e lookup_update_check_shared_mutable_slot_poseidon2_inv, e lookup_update_check_update_hash_public_data_read_inv, e lookup_update_check_update_hash_poseidon2_inv, e lookup_update_check_update_hi_metadata_range_inv, e lookup_update_check_update_lo_metadata_range_inv, e lookup_update_check_timestamp_of_change_cmp_range_inv, e lookup_contract_instance_retrieval_deployment_nullifier_read_inv, e lookup_contract_instance_retrieval_address_derivation_inv, e lookup_contract_instance_retrieval_update_check_inv, e lookup_bc_retrieval_contract_instance_retrieval_inv, e lookup_bc_retrieval_class_id_derivation_inv, e lookup_instr_fetching_pc_abs_diff_positive_inv, e lookup_instr_fetching_instr_abs_diff_positive_inv, e lookup_instr_fetching_tag_value_validation_inv, e lookup_instr_fetching_bytecode_size_from_bc_dec_inv, e lookup_instr_fetching_bytes_from_bc_dec_inv, e lookup_instr_fetching_wire_instruction_info_inv, e lookup_class_id_derivation_class_id_poseidon2_0_inv, e lookup_class_id_derivation_class_id_poseidon2_1_inv, e lookup_get_env_var_precomputed_info_inv, e lookup_get_env_var_read_from_public_inputs_col0_inv, e lookup_get_env_var_read_from_public_inputs_col1_inv, e lookup_get_contract_instance_precomputed_info_inv, e lookup_get_contract_instance_contract_instance_retrieval_inv, e lookup_get_contract_instance_mem_write_contract_instance_exists_inv, e lookup_get_contract_instance_mem_write_contract_instance_member_inv, e lookup_internal_call_push_call_stack_inv, e lookup_internal_call_unwind_call_stack_inv, e lookup_external_call_call_allocated_left_l2_range_inv, e lookup_external_call_call_allocated_left_da_range_inv, e lookup_sload_storage_read_inv, e lookup_sstore_record_written_storage_slot_inv, e lookup_sstore_storage_write_inv, e lookup_execution_bytecode_retrieval_result_inv, e lookup_execution_instruction_fetching_result_inv, e lookup_execution_instruction_fetching_body_inv, e lookup_execution_exec_spec_read_inv, e lookup_execution_dyn_l2_factor_bitwise_inv, e lookup_execution_check_written_storage_slot_inv, e lookup_note_hash_tree_check_silo_poseidon2_inv, e lookup_note_hash_tree_check_read_first_nullifier_inv, e lookup_note_hash_tree_check_nonce_computation_poseidon2_inv, e lookup_note_hash_tree_check_unique_note_hash_poseidon2_inv, e lookup_note_hash_tree_check_merkle_check_inv, e lookup_note_hash_tree_check_write_note_hash_to_public_inputs_inv, e lookup_tx_read_phase_table_inv, e lookup_tx_phase_jump_on_revert_inv, e lookup_tx_read_phase_length_inv, e lookup_tx_read_public_call_request_phase_inv, e lookup_tx_read_tree_insert_value_inv, e lookup_tx_note_hash_append_inv, e lookup_tx_nullifier_append_inv, e lookup_tx_read_l2_l1_msg_inv, e lookup_tx_write_l2_l1_msg_inv, e lookup_tx_read_effective_fee_public_inputs_inv, e lookup_tx_read_fee_payer_public_inputs_inv, e lookup_tx_balance_slot_poseidon2_inv, e lookup_tx_balance_validation_inv +#define AVM2_WIRE_ENTITIES_E(e) e public_inputs_cols_0_, e public_inputs_cols_1_, e public_inputs_cols_2_, e public_inputs_cols_3_, e address_derivation_address, e address_derivation_address_y, e address_derivation_class_id, e address_derivation_deployer_addr, e address_derivation_g1_x, e address_derivation_g1_y, e address_derivation_incoming_viewing_key_x, e address_derivation_incoming_viewing_key_y, e address_derivation_init_hash, e address_derivation_nullifier_key_x, e address_derivation_nullifier_key_y, e address_derivation_outgoing_viewing_key_x, e address_derivation_outgoing_viewing_key_y, e address_derivation_partial_address, e address_derivation_partial_address_domain_separator, e address_derivation_preaddress, e address_derivation_preaddress_domain_separator, e address_derivation_preaddress_public_key_x, e address_derivation_preaddress_public_key_y, e address_derivation_public_keys_hash, e address_derivation_public_keys_hash_domain_separator, e address_derivation_salt, e address_derivation_salted_init_hash, e address_derivation_sel, e address_derivation_tagging_key_x, e address_derivation_tagging_key_y, e alu_ab_tags_diff_inv, e alu_cf, e alu_helper1, e alu_ia, e alu_ia_tag, e alu_ib, e alu_ib_tag, e alu_ic, e alu_ic_tag, e alu_lt_ops_input_a, e alu_lt_ops_input_b, e alu_lt_ops_result_c, e alu_max_bits, e alu_max_value, e alu_op_id, e alu_sel, e alu_sel_ff_lt_ops, e alu_sel_int_lt_ops, e alu_sel_is_ff, e alu_sel_lt_ops, e alu_sel_op_add, e alu_sel_op_eq, e alu_sel_op_lt, e alu_sel_op_lte, e alu_sel_op_not, e alu_sel_op_shl, e alu_sel_op_shr, e alu_sel_tag_err, e alu_tag_ff_diff_inv, e bc_decomposition_abs_diff, e bc_decomposition_bytes, e bc_decomposition_bytes_pc_plus_1, e bc_decomposition_bytes_pc_plus_10, e bc_decomposition_bytes_pc_plus_11, e bc_decomposition_bytes_pc_plus_12, e bc_decomposition_bytes_pc_plus_13, e bc_decomposition_bytes_pc_plus_14, e bc_decomposition_bytes_pc_plus_15, e bc_decomposition_bytes_pc_plus_16, e bc_decomposition_bytes_pc_plus_17, e bc_decomposition_bytes_pc_plus_18, e bc_decomposition_bytes_pc_plus_19, e bc_decomposition_bytes_pc_plus_2, e bc_decomposition_bytes_pc_plus_20, e bc_decomposition_bytes_pc_plus_21, e bc_decomposition_bytes_pc_plus_22, e bc_decomposition_bytes_pc_plus_23, e bc_decomposition_bytes_pc_plus_24, e bc_decomposition_bytes_pc_plus_25, e bc_decomposition_bytes_pc_plus_26, e bc_decomposition_bytes_pc_plus_27, e bc_decomposition_bytes_pc_plus_28, e bc_decomposition_bytes_pc_plus_29, e bc_decomposition_bytes_pc_plus_3, e bc_decomposition_bytes_pc_plus_30, e bc_decomposition_bytes_pc_plus_31, e bc_decomposition_bytes_pc_plus_32, e bc_decomposition_bytes_pc_plus_33, e bc_decomposition_bytes_pc_plus_34, e bc_decomposition_bytes_pc_plus_35, e bc_decomposition_bytes_pc_plus_36, e bc_decomposition_bytes_pc_plus_4, e bc_decomposition_bytes_pc_plus_5, e bc_decomposition_bytes_pc_plus_6, e bc_decomposition_bytes_pc_plus_7, e bc_decomposition_bytes_pc_plus_8, e bc_decomposition_bytes_pc_plus_9, e bc_decomposition_bytes_rem_inv, e bc_decomposition_bytes_rem_min_one_inv, e bc_decomposition_bytes_remaining, e bc_decomposition_bytes_to_read, e bc_decomposition_id, e bc_decomposition_last_of_contract, e bc_decomposition_packed_field, e bc_decomposition_pc, e bc_decomposition_sel, e bc_decomposition_sel_overflow_correction_needed, e bc_decomposition_sel_packed, e bc_hashing_bytecode_id, e bc_hashing_incremental_hash, e bc_hashing_latch, e bc_hashing_output_hash, e bc_hashing_packed_field, e bc_hashing_pc_index, e bc_hashing_sel, e bc_hashing_start, e bc_retrieval_address, e bc_retrieval_artifact_hash, e bc_retrieval_bytecode_id, e bc_retrieval_current_class_id, e bc_retrieval_error, e bc_retrieval_instance_exists, e bc_retrieval_nullifier_tree_root, e bc_retrieval_private_function_root, e bc_retrieval_public_bytecode_commitment, e bc_retrieval_public_data_tree_root, e bc_retrieval_sel, e bitwise_acc_ia, e bitwise_acc_ib, e bitwise_acc_ic, e bitwise_ctr, e bitwise_ctr_inv, e bitwise_ctr_min_one_inv, e bitwise_err, e bitwise_ia_byte, e bitwise_ib_byte, e bitwise_ic_byte, e bitwise_last, e bitwise_op_id, e bitwise_sel, e bitwise_sel_get_ctr, e bitwise_sel_tag_ff_err, e bitwise_sel_tag_mismatch_err, e bitwise_start, e bitwise_tag_a, e bitwise_tag_a_inv, e bitwise_tag_ab_diff_inv, e bitwise_tag_b, e bitwise_tag_c, e calldata_context_id, e calldata_index, e calldata_latch, e calldata_sel, e calldata_value, e cd_hashing_context_id, e cd_hashing_input_0_, e cd_hashing_input_1_, e cd_hashing_input_2_, e cd_hashing_latch, e cd_hashing_length_remaining, e cd_hashing_output_hash, e cd_hashing_sel, e class_id_derivation_artifact_hash, e class_id_derivation_class_id, e class_id_derivation_private_function_root, e class_id_derivation_public_bytecode_commitment, e class_id_derivation_sel, e class_id_derivation_temp_constant_for_lookup, e context_stack_context_id, e context_stack_context_id_inv, e context_stack_contract_address, e context_stack_entered_context_id, e context_stack_is_static, e context_stack_msg_sender, e context_stack_next_pc, e context_stack_parent_calldata_addr, e context_stack_parent_calldata_size, e context_stack_parent_da_gas_limit, e context_stack_parent_da_gas_used, e context_stack_parent_id, e context_stack_parent_l2_gas_limit, e context_stack_parent_l2_gas_used, e context_stack_sel, e contract_instance_retrieval_address, e contract_instance_retrieval_current_class_id, e contract_instance_retrieval_deployer_addr, e contract_instance_retrieval_deployer_protocol_contract_address, e contract_instance_retrieval_exists, e contract_instance_retrieval_incoming_viewing_key_x, e contract_instance_retrieval_incoming_viewing_key_y, e contract_instance_retrieval_init_hash, e contract_instance_retrieval_nullifier_key_x, e contract_instance_retrieval_nullifier_key_y, e contract_instance_retrieval_nullifier_tree_root, e contract_instance_retrieval_original_class_id, e contract_instance_retrieval_outgoing_viewing_key_x, e contract_instance_retrieval_outgoing_viewing_key_y, e contract_instance_retrieval_public_data_tree_root, e contract_instance_retrieval_salt, e contract_instance_retrieval_sel, e contract_instance_retrieval_tagging_key_x, e contract_instance_retrieval_tagging_key_y, e data_copy_abs_diff_max_read_index, e data_copy_abs_max_read_offset, e data_copy_abs_read_diff, e data_copy_abs_write_diff, e data_copy_cd_copy_col_read, e data_copy_clk, e data_copy_copy_size, e data_copy_dst_addr, e data_copy_dst_context_id, e data_copy_dst_out_of_range_err, e data_copy_err, e data_copy_is_top_level, e data_copy_offset, e data_copy_operation_id, e data_copy_padding, e data_copy_parent_id_inv, e data_copy_read_addr, e data_copy_reads_left, e data_copy_reads_left_inv, e data_copy_sel_cd_copy, e data_copy_sel_end, e data_copy_sel_mem_read, e data_copy_sel_mem_write, e data_copy_sel_offset_gt_max_read, e data_copy_sel_rd_copy, e data_copy_sel_start, e data_copy_sel_start_no_err, e data_copy_src_addr, e data_copy_src_context_id, e data_copy_src_data_size, e data_copy_src_data_size_is_lt, e data_copy_src_out_of_range_err, e data_copy_thirty_two, e data_copy_value, e data_copy_write_count_minus_one_inv, e ecc_add_op, e ecc_double_op, e ecc_inv_2_p_y, e ecc_inv_x_diff, e ecc_inv_y_diff, e ecc_lambda, e ecc_p_is_inf, e ecc_p_x, e ecc_p_y, e ecc_q_is_inf, e ecc_q_x, e ecc_q_y, e ecc_r_is_inf, e ecc_r_x, e ecc_r_y, e ecc_result_infinity, e ecc_sel, e ecc_use_computed_result, e ecc_x_match, e ecc_y_match, e execution_addressing_error_collection_inv, e execution_addressing_gas, e execution_base_address_tag, e execution_base_address_tag_diff_inv, e execution_base_address_val, e execution_base_da_gas, e execution_batched_tags_diff_inv, e execution_batched_tags_diff_inv_reg, e execution_bytecode_id, e execution_call_allocated_left_da_cmp_diff, e execution_call_allocated_left_l2_cmp_diff, e execution_call_is_da_gas_allocated_lt_left, e execution_call_is_l2_gas_allocated_lt_left, e execution_constant_32, e execution_constant_64, e execution_context_id, e execution_contract_address, e execution_da_gas_limit, e execution_da_gas_used, e execution_discard, e execution_dying_context_diff_inv, e execution_dying_context_id, e execution_dying_context_id_inv, e execution_dyn_gas_id, e execution_dynamic_da_gas, e execution_dynamic_da_gas_factor, e execution_dynamic_l2_gas, e execution_dynamic_l2_gas_factor, e execution_enqueued_call_end, e execution_enqueued_call_start, e execution_envvar_pi_row_idx, e execution_ex_opcode, e execution_expected_tag_reg_0_, e execution_expected_tag_reg_1_, e execution_expected_tag_reg_2_, e execution_expected_tag_reg_3_, e execution_expected_tag_reg_4_, e execution_expected_tag_reg_5_, e execution_expected_tag_reg_6_, e execution_has_parent_ctx, e execution_indirect, e execution_instr_length, e execution_internal_call_id, e execution_internal_call_return_id, e execution_internal_call_return_id_inv, e execution_is_address, e execution_is_dagasleft, e execution_is_dying_context, e execution_is_isstaticcall, e execution_is_l2gasleft, e execution_is_parent_id_inv, e execution_is_sender, e execution_is_static, e execution_is_transactionfee, e execution_l1_l2_tree_root, e execution_l1_l2_tree_size, e execution_l2_gas_limit, e execution_l2_gas_used, e execution_last, e execution_last_child_returndata_addr, e execution_last_child_returndata_size, e execution_last_child_success, e execution_limit_used_da_cmp_diff, e execution_limit_used_l2_cmp_diff, e execution_max_data_writes_reached, e execution_mem_tag_reg_0_, e execution_mem_tag_reg_1_, e execution_mem_tag_reg_2_, e execution_mem_tag_reg_3_, e execution_mem_tag_reg_4_, e execution_mem_tag_reg_5_, e execution_mem_tag_reg_6_, e execution_msg_sender, e execution_nested_call_from_undiscarded_context, e execution_nested_exit_call, e execution_nested_return, e execution_next_context_id, e execution_next_internal_call_id, e execution_next_pc, e execution_note_hash_leaf_in_range, e execution_note_hash_leaf_index_leaf_count_cmp_diff, e execution_note_hash_tree_root, e execution_note_hash_tree_size, e execution_nullifier_tree_root, e execution_nullifier_tree_size, e execution_num_note_hashes_emitted, e execution_num_nullifiers_emitted, e execution_num_relative_operands_inv, e execution_op_0_, e execution_op_1_, e execution_op_2_, e execution_op_3_, e execution_op_4_, e execution_op_5_, e execution_op_6_, e execution_op_after_relative_0_, e execution_op_after_relative_1_, e execution_op_after_relative_2_, e execution_op_after_relative_3_, e execution_op_after_relative_4_, e execution_op_after_relative_5_, e execution_op_after_relative_6_, e execution_opcode_gas, e execution_out_of_gas_da, e execution_out_of_gas_l2, e execution_overflow_range_check_result_0_, e execution_overflow_range_check_result_1_, e execution_overflow_range_check_result_2_, e execution_overflow_range_check_result_3_, e execution_overflow_range_check_result_4_, e execution_overflow_range_check_result_5_, e execution_overflow_range_check_result_6_, e execution_parent_calldata_addr, e execution_parent_calldata_size, e execution_parent_da_gas_limit, e execution_parent_da_gas_used, e execution_parent_id, e execution_parent_l2_gas_limit, e execution_parent_l2_gas_used, e execution_pc, e execution_prev_da_gas_used, e execution_prev_l1_l2_tree_root, e execution_prev_l1_l2_tree_size, e execution_prev_l2_gas_used, e execution_prev_note_hash_tree_root, e execution_prev_note_hash_tree_size, e execution_prev_nullifier_tree_root, e execution_prev_nullifier_tree_size, e execution_prev_num_note_hashes_emitted, e execution_prev_num_nullifiers_emitted, e execution_prev_public_data_tree_root, e execution_prev_public_data_tree_size, e execution_prev_written_public_data_slots_tree_root, e execution_prev_written_public_data_slots_tree_size, e execution_propagate_discard, e execution_public_data_tree_root, e execution_public_data_tree_size, e execution_register_0_, e execution_register_1_, e execution_register_2_, e execution_register_3_, e execution_register_4_, e execution_register_5_, e execution_register_6_, e execution_remaining_data_writes_inv, e execution_resolves_dying_context, e execution_rollback_context, e execution_rop_0_, e execution_rop_1_, e execution_rop_2_, e execution_rop_3_, e execution_rop_4_, e execution_rop_5_, e execution_rop_6_, e execution_rop_tag_0_, e execution_rop_tag_1_, e execution_rop_tag_2_, e execution_rop_tag_3_, e execution_rop_tag_4_, e execution_rop_tag_5_, e execution_rop_tag_6_, e execution_rw_reg_0_, e execution_rw_reg_1_, e execution_rw_reg_2_, e execution_rw_reg_3_, e execution_rw_reg_4_, e execution_rw_reg_5_, e execution_rw_reg_6_, e execution_sel, e execution_sel_addressing_error, e execution_sel_base_address_failure, e execution_sel_bytecode_retrieval_failure, e execution_sel_bytecode_retrieval_success, e execution_sel_do_base_check, e execution_sel_enter_call, e execution_sel_envvar_pi_lookup_col0, e execution_sel_envvar_pi_lookup_col1, e execution_sel_error, e execution_sel_execute_alu, e execution_sel_execute_bitwise, e execution_sel_execute_call, e execution_sel_execute_data_copy, e execution_sel_execute_debug_log, e execution_sel_execute_ecc_add, e execution_sel_execute_execution, e execution_sel_execute_get_contract_instance, e execution_sel_execute_get_env_var, e execution_sel_execute_internal_call, e execution_sel_execute_internal_return, e execution_sel_execute_jump, e execution_sel_execute_jumpi, e execution_sel_execute_keccakf1600, e execution_sel_execute_mov, e execution_sel_execute_notehash_exists, e execution_sel_execute_poseidon2_perm, e execution_sel_execute_return, e execution_sel_execute_returndata_size, e execution_sel_execute_revert, e execution_sel_execute_set, e execution_sel_execute_sload, e execution_sel_execute_sstore, e execution_sel_execute_static_call, e execution_sel_execute_success_copy, e execution_sel_execute_to_radix, e execution_sel_exit_call, e execution_sel_failure, e execution_sel_gas_bitwise, e execution_sel_gas_calldata_copy, e execution_sel_gas_emit_unencrypted_log, e execution_sel_gas_returndata_copy, e execution_sel_gas_sstore, e execution_sel_gas_to_radix, e execution_sel_instruction_fetching_failure, e execution_sel_instruction_fetching_success, e execution_sel_mem_op_reg_0_, e execution_sel_mem_op_reg_1_, e execution_sel_mem_op_reg_2_, e execution_sel_mem_op_reg_3_, e execution_sel_mem_op_reg_4_, e execution_sel_mem_op_reg_5_, e execution_sel_mem_op_reg_6_, e execution_sel_op_is_address_0_, e execution_sel_op_is_address_1_, e execution_sel_op_is_address_2_, e execution_sel_op_is_address_3_, e execution_sel_op_is_address_4_, e execution_sel_op_is_address_5_, e execution_sel_op_is_address_6_, e execution_sel_op_is_indirect_wire_0_, e execution_sel_op_is_indirect_wire_1_, e execution_sel_op_is_indirect_wire_2_, e execution_sel_op_is_indirect_wire_3_, e execution_sel_op_is_indirect_wire_4_, e execution_sel_op_is_indirect_wire_5_, e execution_sel_op_is_indirect_wire_6_, e execution_sel_op_is_indirect_wire_7_, e execution_sel_op_is_relative_effective_0_, e execution_sel_op_is_relative_effective_1_, e execution_sel_op_is_relative_effective_2_, e execution_sel_op_is_relative_effective_3_, e execution_sel_op_is_relative_effective_4_, e execution_sel_op_is_relative_effective_5_, e execution_sel_op_is_relative_effective_6_, e execution_sel_op_is_relative_wire_0_, e execution_sel_op_is_relative_wire_1_, e execution_sel_op_is_relative_wire_2_, e execution_sel_op_is_relative_wire_3_, e execution_sel_op_is_relative_wire_4_, e execution_sel_op_is_relative_wire_5_, e execution_sel_op_is_relative_wire_6_, e execution_sel_op_is_relative_wire_7_, e execution_sel_op_reg_effective_0_, e execution_sel_op_reg_effective_1_, e execution_sel_op_reg_effective_2_, e execution_sel_op_reg_effective_3_, e execution_sel_op_reg_effective_4_, e execution_sel_op_reg_effective_5_, e execution_sel_op_reg_effective_6_, e execution_sel_opcode_error, e execution_sel_opcode_failure, e execution_sel_out_of_gas, e execution_sel_register_read_error, e execution_sel_relative_overflow_0_, e execution_sel_relative_overflow_1_, e execution_sel_relative_overflow_2_, e execution_sel_relative_overflow_3_, e execution_sel_relative_overflow_4_, e execution_sel_relative_overflow_5_, e execution_sel_relative_overflow_6_, e execution_sel_should_apply_indirection_0_, e execution_sel_should_apply_indirection_1_, e execution_sel_should_apply_indirection_2_, e execution_sel_should_apply_indirection_3_, e execution_sel_should_apply_indirection_4_, e execution_sel_should_apply_indirection_5_, e execution_sel_should_apply_indirection_6_, e execution_sel_should_check_gas, e execution_sel_should_execute_opcode, e execution_sel_should_read_registers, e execution_sel_should_write_registers, e execution_sel_some_final_check_failed, e execution_sel_tag_check_reg_0_, e execution_sel_tag_check_reg_1_, e execution_sel_tag_check_reg_2_, e execution_sel_tag_check_reg_3_, e execution_sel_tag_check_reg_4_, e execution_sel_tag_check_reg_5_, e execution_sel_tag_check_reg_6_, e execution_sel_write_public_data, e execution_subtrace_id, e execution_subtrace_operation_id, e execution_transaction_fee, e execution_two_to_32, e execution_value_from_pi, e execution_written_public_data_slots_tree_root, e execution_written_public_data_slots_tree_size, e ff_gt_a, e ff_gt_a_hi, e ff_gt_a_lo, e ff_gt_b, e ff_gt_b_hi, e ff_gt_b_lo, e ff_gt_borrow, e ff_gt_cmp_rng_ctr, e ff_gt_cmp_rng_ctr_inv, e ff_gt_constant_128, e ff_gt_p_a_borrow, e ff_gt_p_b_borrow, e ff_gt_p_sub_a_hi, e ff_gt_p_sub_a_lo, e ff_gt_p_sub_b_hi, e ff_gt_p_sub_b_lo, e ff_gt_res_hi, e ff_gt_res_lo, e ff_gt_result, e ff_gt_sel, e ff_gt_sel_gt, e ff_gt_sel_shift_rng, e get_contract_instance_clk, e get_contract_instance_contract_address, e get_contract_instance_dst_offset, e get_contract_instance_dst_offset_diff_max_inv, e get_contract_instance_exists_tag, e get_contract_instance_instance_exists, e get_contract_instance_is_class_id, e get_contract_instance_is_deployer, e get_contract_instance_is_init_hash, e get_contract_instance_is_valid_member_enum, e get_contract_instance_is_valid_writes_in_bounds, e get_contract_instance_member_enum, e get_contract_instance_member_tag, e get_contract_instance_member_write_offset, e get_contract_instance_nullifier_tree_root, e get_contract_instance_public_data_tree_root, e get_contract_instance_retrieved_class_id, e get_contract_instance_retrieved_deployer_addr, e get_contract_instance_retrieved_init_hash, e get_contract_instance_sel, e get_contract_instance_sel_error, e get_contract_instance_selected_member, e get_contract_instance_space_id, e gt_abs_diff, e gt_constant_128, e gt_input_a, e gt_input_b, e gt_res, e gt_sel, e instr_fetching_bd0, e instr_fetching_bd1, e instr_fetching_bd10, e instr_fetching_bd11, e instr_fetching_bd12, e instr_fetching_bd13, e instr_fetching_bd14, e instr_fetching_bd15, e instr_fetching_bd16, e instr_fetching_bd17, e instr_fetching_bd18, e instr_fetching_bd19, e instr_fetching_bd2, e instr_fetching_bd20, e instr_fetching_bd21, e instr_fetching_bd22, e instr_fetching_bd23, e instr_fetching_bd24, e instr_fetching_bd25, e instr_fetching_bd26, e instr_fetching_bd27, e instr_fetching_bd28, e instr_fetching_bd29, e instr_fetching_bd3, e instr_fetching_bd30, e instr_fetching_bd31, e instr_fetching_bd32, e instr_fetching_bd33, e instr_fetching_bd34, e instr_fetching_bd35, e instr_fetching_bd36, e instr_fetching_bd4, e instr_fetching_bd5, e instr_fetching_bd6, e instr_fetching_bd7, e instr_fetching_bd8, e instr_fetching_bd9, e instr_fetching_bytecode_id, e instr_fetching_bytecode_size, e instr_fetching_bytes_to_read, e instr_fetching_exec_opcode, e instr_fetching_indirect, e instr_fetching_instr_abs_diff, e instr_fetching_instr_out_of_range, e instr_fetching_instr_size, e instr_fetching_op1, e instr_fetching_op2, e instr_fetching_op3, e instr_fetching_op4, e instr_fetching_op5, e instr_fetching_op6, e instr_fetching_op7, e instr_fetching_opcode_out_of_range, e instr_fetching_pc, e instr_fetching_pc_abs_diff, e instr_fetching_pc_out_of_range, e instr_fetching_pc_size_in_bits, e instr_fetching_sel, e instr_fetching_sel_has_tag, e instr_fetching_sel_op_dc_0, e instr_fetching_sel_op_dc_1, e instr_fetching_sel_op_dc_10, e instr_fetching_sel_op_dc_11, e instr_fetching_sel_op_dc_12, e instr_fetching_sel_op_dc_13, e instr_fetching_sel_op_dc_14, e instr_fetching_sel_op_dc_15, e instr_fetching_sel_op_dc_16, e instr_fetching_sel_op_dc_2, e instr_fetching_sel_op_dc_3, e instr_fetching_sel_op_dc_4, e instr_fetching_sel_op_dc_5, e instr_fetching_sel_op_dc_6, e instr_fetching_sel_op_dc_7, e instr_fetching_sel_op_dc_8, e instr_fetching_sel_op_dc_9, e instr_fetching_sel_parsing_err, e instr_fetching_sel_pc_in_range, e instr_fetching_sel_tag_is_op2, e instr_fetching_tag_out_of_range, e instr_fetching_tag_value, e internal_call_stack_context_id, e internal_call_stack_entered_call_id, e internal_call_stack_id, e internal_call_stack_return_id, e internal_call_stack_return_pc, e internal_call_stack_sel, e keccak_memory_addr, e keccak_memory_clk, e keccak_memory_ctr, e keccak_memory_ctr_end, e keccak_memory_ctr_inv, e keccak_memory_ctr_min_state_size_inv, e keccak_memory_last, e keccak_memory_num_rounds, e keccak_memory_rw, e keccak_memory_sel, e keccak_memory_single_tag_error, e keccak_memory_space_id, e keccak_memory_start_read, e keccak_memory_start_write, e keccak_memory_tag, e keccak_memory_tag_error, e keccak_memory_tag_min_u64_inv, e keccak_memory_val00, e keccak_memory_val01, e keccak_memory_val02, e keccak_memory_val03, e keccak_memory_val04, e keccak_memory_val10, e keccak_memory_val11, e keccak_memory_val12, e keccak_memory_val13, e keccak_memory_val14, e keccak_memory_val20, e keccak_memory_val21, e keccak_memory_val22, e keccak_memory_val23, e keccak_memory_val24, e keccak_memory_val30, e keccak_memory_val31, e keccak_memory_val32, e keccak_memory_val33, e keccak_memory_val34, e keccak_memory_val40, e keccak_memory_val41, e keccak_memory_val42, e keccak_memory_val43, e keccak_memory_val44, e keccakf1600_bitwise_and_op_id, e keccakf1600_bitwise_xor_op_id, e keccakf1600_clk, e keccakf1600_dst_abs_diff, e keccakf1600_dst_addr, e keccakf1600_dst_out_of_range_error, e keccakf1600_error, e keccakf1600_last, e keccakf1600_rot_64_min_len_01, e keccakf1600_rot_64_min_len_03, e keccakf1600_rot_64_min_len_11, e keccakf1600_rot_64_min_len_13, e keccakf1600_rot_64_min_len_20, e keccakf1600_rot_64_min_len_22, e keccakf1600_rot_64_min_len_24, e keccakf1600_rot_64_min_len_31, e keccakf1600_rot_64_min_len_34, e keccakf1600_rot_64_min_len_42, e keccakf1600_rot_len_02, e keccakf1600_rot_len_04, e keccakf1600_rot_len_10, e keccakf1600_rot_len_12, e keccakf1600_rot_len_14, e keccakf1600_rot_len_21, e keccakf1600_rot_len_23, e keccakf1600_rot_len_30, e keccakf1600_rot_len_32, e keccakf1600_rot_len_33, e keccakf1600_rot_len_40, e keccakf1600_rot_len_41, e keccakf1600_rot_len_43, e keccakf1600_rot_len_44, e keccakf1600_round, e keccakf1600_round_cst, e keccakf1600_round_inv, e keccakf1600_sel, e keccakf1600_sel_no_error, e keccakf1600_sel_slice_read, e keccakf1600_sel_slice_write, e keccakf1600_space_id, e keccakf1600_src_abs_diff, e keccakf1600_src_addr, e keccakf1600_src_out_of_range_error, e keccakf1600_start, e keccakf1600_state_chi_00, e keccakf1600_state_chi_01, e keccakf1600_state_chi_02, e keccakf1600_state_chi_03, e keccakf1600_state_chi_04, e keccakf1600_state_chi_10, e keccakf1600_state_chi_11, e keccakf1600_state_chi_12, e keccakf1600_state_chi_13, e keccakf1600_state_chi_14, e keccakf1600_state_chi_20, e keccakf1600_state_chi_21, e keccakf1600_state_chi_22, e keccakf1600_state_chi_23, e keccakf1600_state_chi_24, e keccakf1600_state_chi_30, e keccakf1600_state_chi_31, e keccakf1600_state_chi_32, e keccakf1600_state_chi_33, e keccakf1600_state_chi_34, e keccakf1600_state_chi_40, e keccakf1600_state_chi_41, e keccakf1600_state_chi_42, e keccakf1600_state_chi_43, e keccakf1600_state_chi_44, e keccakf1600_state_in_00, e keccakf1600_state_in_01, e keccakf1600_state_in_02, e keccakf1600_state_in_03, e keccakf1600_state_in_04, e keccakf1600_state_in_10, e keccakf1600_state_in_11, e keccakf1600_state_in_12, e keccakf1600_state_in_13, e keccakf1600_state_in_14, e keccakf1600_state_in_20, e keccakf1600_state_in_21, e keccakf1600_state_in_22, e keccakf1600_state_in_23, e keccakf1600_state_in_24, e keccakf1600_state_in_30, e keccakf1600_state_in_31, e keccakf1600_state_in_32, e keccakf1600_state_in_33, e keccakf1600_state_in_34, e keccakf1600_state_in_40, e keccakf1600_state_in_41, e keccakf1600_state_in_42, e keccakf1600_state_in_43, e keccakf1600_state_in_44, e keccakf1600_state_iota_00, e keccakf1600_state_pi_and_00, e keccakf1600_state_pi_and_01, e keccakf1600_state_pi_and_02, e keccakf1600_state_pi_and_03, e keccakf1600_state_pi_and_04, e keccakf1600_state_pi_and_10, e keccakf1600_state_pi_and_11, e keccakf1600_state_pi_and_12, e keccakf1600_state_pi_and_13, e keccakf1600_state_pi_and_14, e keccakf1600_state_pi_and_20, e keccakf1600_state_pi_and_21, e keccakf1600_state_pi_and_22, e keccakf1600_state_pi_and_23, e keccakf1600_state_pi_and_24, e keccakf1600_state_pi_and_30, e keccakf1600_state_pi_and_31, e keccakf1600_state_pi_and_32, e keccakf1600_state_pi_and_33, e keccakf1600_state_pi_and_34, e keccakf1600_state_pi_and_40, e keccakf1600_state_pi_and_41, e keccakf1600_state_pi_and_42, e keccakf1600_state_pi_and_43, e keccakf1600_state_pi_and_44, e keccakf1600_state_pi_not_00, e keccakf1600_state_pi_not_01, e keccakf1600_state_pi_not_02, e keccakf1600_state_pi_not_03, e keccakf1600_state_pi_not_04, e keccakf1600_state_pi_not_10, e keccakf1600_state_pi_not_11, e keccakf1600_state_pi_not_12, e keccakf1600_state_pi_not_13, e keccakf1600_state_pi_not_14, e keccakf1600_state_pi_not_20, e keccakf1600_state_pi_not_21, e keccakf1600_state_pi_not_22, e keccakf1600_state_pi_not_23, e keccakf1600_state_pi_not_24, e keccakf1600_state_pi_not_30, e keccakf1600_state_pi_not_31, e keccakf1600_state_pi_not_32, e keccakf1600_state_pi_not_33, e keccakf1600_state_pi_not_34, e keccakf1600_state_pi_not_40, e keccakf1600_state_pi_not_41, e keccakf1600_state_pi_not_42, e keccakf1600_state_pi_not_43, e keccakf1600_state_pi_not_44, e keccakf1600_state_rho_01, e keccakf1600_state_rho_02, e keccakf1600_state_rho_03, e keccakf1600_state_rho_04, e keccakf1600_state_rho_10, e keccakf1600_state_rho_11, e keccakf1600_state_rho_12, e keccakf1600_state_rho_13, e keccakf1600_state_rho_14, e keccakf1600_state_rho_20, e keccakf1600_state_rho_21, e keccakf1600_state_rho_22, e keccakf1600_state_rho_23, e keccakf1600_state_rho_24, e keccakf1600_state_rho_30, e keccakf1600_state_rho_31, e keccakf1600_state_rho_32, e keccakf1600_state_rho_33, e keccakf1600_state_rho_34, e keccakf1600_state_rho_40, e keccakf1600_state_rho_41, e keccakf1600_state_rho_42, e keccakf1600_state_rho_43, e keccakf1600_state_rho_44, e keccakf1600_state_theta_00, e keccakf1600_state_theta_01, e keccakf1600_state_theta_02, e keccakf1600_state_theta_03, e keccakf1600_state_theta_04, e keccakf1600_state_theta_10, e keccakf1600_state_theta_11, e keccakf1600_state_theta_12, e keccakf1600_state_theta_13, e keccakf1600_state_theta_14, e keccakf1600_state_theta_20, e keccakf1600_state_theta_21, e keccakf1600_state_theta_22, e keccakf1600_state_theta_23, e keccakf1600_state_theta_24, e keccakf1600_state_theta_30, e keccakf1600_state_theta_31, e keccakf1600_state_theta_32, e keccakf1600_state_theta_33, e keccakf1600_state_theta_34, e keccakf1600_state_theta_40, e keccakf1600_state_theta_41, e keccakf1600_state_theta_42, e keccakf1600_state_theta_43, e keccakf1600_state_theta_44, e keccakf1600_state_theta_hi_01, e keccakf1600_state_theta_hi_02, e keccakf1600_state_theta_hi_03, e keccakf1600_state_theta_hi_04, e keccakf1600_state_theta_hi_10, e keccakf1600_state_theta_hi_11, e keccakf1600_state_theta_hi_12, e keccakf1600_state_theta_hi_13, e keccakf1600_state_theta_hi_14, e keccakf1600_state_theta_hi_20, e keccakf1600_state_theta_hi_21, e keccakf1600_state_theta_hi_22, e keccakf1600_state_theta_hi_23, e keccakf1600_state_theta_hi_24, e keccakf1600_state_theta_hi_30, e keccakf1600_state_theta_hi_31, e keccakf1600_state_theta_hi_32, e keccakf1600_state_theta_hi_33, e keccakf1600_state_theta_hi_34, e keccakf1600_state_theta_hi_40, e keccakf1600_state_theta_hi_41, e keccakf1600_state_theta_hi_42, e keccakf1600_state_theta_hi_43, e keccakf1600_state_theta_hi_44, e keccakf1600_state_theta_low_01, e keccakf1600_state_theta_low_02, e keccakf1600_state_theta_low_03, e keccakf1600_state_theta_low_04, e keccakf1600_state_theta_low_10, e keccakf1600_state_theta_low_11, e keccakf1600_state_theta_low_12, e keccakf1600_state_theta_low_13, e keccakf1600_state_theta_low_14, e keccakf1600_state_theta_low_20, e keccakf1600_state_theta_low_21, e keccakf1600_state_theta_low_22, e keccakf1600_state_theta_low_23, e keccakf1600_state_theta_low_24, e keccakf1600_state_theta_low_30, e keccakf1600_state_theta_low_31, e keccakf1600_state_theta_low_32, e keccakf1600_state_theta_low_33, e keccakf1600_state_theta_low_34, e keccakf1600_state_theta_low_40, e keccakf1600_state_theta_low_41, e keccakf1600_state_theta_low_42, e keccakf1600_state_theta_low_43, e keccakf1600_state_theta_low_44, e keccakf1600_tag_error, e keccakf1600_theta_combined_xor_0, e keccakf1600_theta_combined_xor_1, e keccakf1600_theta_combined_xor_2, e keccakf1600_theta_combined_xor_3, e keccakf1600_theta_combined_xor_4, e keccakf1600_theta_xor_01, e keccakf1600_theta_xor_02, e keccakf1600_theta_xor_03, e keccakf1600_theta_xor_11, e keccakf1600_theta_xor_12, e keccakf1600_theta_xor_13, e keccakf1600_theta_xor_21, e keccakf1600_theta_xor_22, e keccakf1600_theta_xor_23, e keccakf1600_theta_xor_31, e keccakf1600_theta_xor_32, e keccakf1600_theta_xor_33, e keccakf1600_theta_xor_41, e keccakf1600_theta_xor_42, e keccakf1600_theta_xor_43, e keccakf1600_theta_xor_row_0, e keccakf1600_theta_xor_row_1, e keccakf1600_theta_xor_row_2, e keccakf1600_theta_xor_row_3, e keccakf1600_theta_xor_row_4, e keccakf1600_theta_xor_row_low63_0, e keccakf1600_theta_xor_row_low63_1, e keccakf1600_theta_xor_row_low63_2, e keccakf1600_theta_xor_row_low63_3, e keccakf1600_theta_xor_row_low63_4, e keccakf1600_theta_xor_row_msb_0, e keccakf1600_theta_xor_row_msb_1, e keccakf1600_theta_xor_row_msb_2, e keccakf1600_theta_xor_row_msb_3, e keccakf1600_theta_xor_row_msb_4, e keccakf1600_theta_xor_row_rotl1_0, e keccakf1600_theta_xor_row_rotl1_1, e keccakf1600_theta_xor_row_rotl1_2, e keccakf1600_theta_xor_row_rotl1_3, e keccakf1600_theta_xor_row_rotl1_4, e keccakf1600_thirty_two, e memory_address, e memory_clk, e memory_rw, e memory_sel, e memory_space_id, e memory_tag, e memory_value, e merkle_check_constant_2, e merkle_check_end, e merkle_check_index, e merkle_check_index_is_even, e merkle_check_path_len, e merkle_check_read_left_node, e merkle_check_read_node, e merkle_check_read_output_hash, e merkle_check_read_right_node, e merkle_check_read_root, e merkle_check_remaining_path_len_inv, e merkle_check_sel, e merkle_check_sibling, e merkle_check_start, e merkle_check_write, e merkle_check_write_left_node, e merkle_check_write_node, e merkle_check_write_output_hash, e merkle_check_write_right_node, e merkle_check_write_root, e note_hash_tree_check_address, e note_hash_tree_check_discard, e note_hash_tree_check_exists, e note_hash_tree_check_first_nullifier, e note_hash_tree_check_first_nullifier_pi_index, e note_hash_tree_check_leaf_index, e note_hash_tree_check_next_leaf_value, e note_hash_tree_check_next_root, e note_hash_tree_check_nonce, e note_hash_tree_check_nonce_separator, e note_hash_tree_check_note_hash, e note_hash_tree_check_note_hash_index, e note_hash_tree_check_note_hash_tree_height, e note_hash_tree_check_prev_leaf_value, e note_hash_tree_check_prev_leaf_value_unique_note_hash_diff_inv, e note_hash_tree_check_prev_root, e note_hash_tree_check_public_inputs_index, e note_hash_tree_check_sel, e note_hash_tree_check_should_silo, e note_hash_tree_check_should_unique, e note_hash_tree_check_should_write_to_public_inputs, e note_hash_tree_check_siloed_note_hash, e note_hash_tree_check_siloing_separator, e note_hash_tree_check_unique_note_hash, e note_hash_tree_check_unique_note_hash_separator, e note_hash_tree_check_write, e nullifier_check_address, e nullifier_check_discard, e nullifier_check_exists, e nullifier_check_intermediate_root, e nullifier_check_leaf_not_exists, e nullifier_check_low_leaf_hash, e nullifier_check_low_leaf_index, e nullifier_check_low_leaf_next_index, e nullifier_check_low_leaf_next_nullifier, e nullifier_check_low_leaf_nullifier, e nullifier_check_new_leaf_hash, e nullifier_check_next_nullifier_inv, e nullifier_check_next_nullifier_is_nonzero, e nullifier_check_nullifier, e nullifier_check_nullifier_index, e nullifier_check_nullifier_low_leaf_nullifier_diff_inv, e nullifier_check_public_inputs_index, e nullifier_check_root, e nullifier_check_sel, e nullifier_check_should_insert, e nullifier_check_should_silo, e nullifier_check_should_write_to_public_inputs, e nullifier_check_siloed_nullifier, e nullifier_check_siloing_separator, e nullifier_check_tree_height, e nullifier_check_tree_size_before_write, e nullifier_check_updated_low_leaf_hash, e nullifier_check_updated_low_leaf_next_index, e nullifier_check_updated_low_leaf_next_nullifier, e nullifier_check_write, e nullifier_check_write_root, e poseidon2_hash_a_0, e poseidon2_hash_a_1, e poseidon2_hash_a_2, e poseidon2_hash_a_3, e poseidon2_hash_b_0, e poseidon2_hash_b_1, e poseidon2_hash_b_2, e poseidon2_hash_b_3, e poseidon2_hash_end, e poseidon2_hash_input_0, e poseidon2_hash_input_1, e poseidon2_hash_input_2, e poseidon2_hash_input_len, e poseidon2_hash_num_perm_rounds_rem, e poseidon2_hash_num_perm_rounds_rem_inv, e poseidon2_hash_output, e poseidon2_hash_padding, e poseidon2_hash_sel, e poseidon2_hash_start, e poseidon2_perm_B_10_0, e poseidon2_perm_B_10_1, e poseidon2_perm_B_10_2, e poseidon2_perm_B_10_3, e poseidon2_perm_B_11_0, e poseidon2_perm_B_11_1, e poseidon2_perm_B_11_2, e poseidon2_perm_B_11_3, e poseidon2_perm_B_12_0, e poseidon2_perm_B_12_1, e poseidon2_perm_B_12_2, e poseidon2_perm_B_12_3, e poseidon2_perm_B_13_0, e poseidon2_perm_B_13_1, e poseidon2_perm_B_13_2, e poseidon2_perm_B_13_3, e poseidon2_perm_B_14_0, e poseidon2_perm_B_14_1, e poseidon2_perm_B_14_2, e poseidon2_perm_B_14_3, e poseidon2_perm_B_15_0, e poseidon2_perm_B_15_1, e poseidon2_perm_B_15_2, e poseidon2_perm_B_15_3, e poseidon2_perm_B_16_0, e poseidon2_perm_B_16_1, e poseidon2_perm_B_16_2, e poseidon2_perm_B_16_3, e poseidon2_perm_B_17_0, e poseidon2_perm_B_17_1, e poseidon2_perm_B_17_2, e poseidon2_perm_B_17_3, e poseidon2_perm_B_18_0, e poseidon2_perm_B_18_1, e poseidon2_perm_B_18_2, e poseidon2_perm_B_18_3, e poseidon2_perm_B_19_0, e poseidon2_perm_B_19_1, e poseidon2_perm_B_19_2, e poseidon2_perm_B_19_3, e poseidon2_perm_B_20_0, e poseidon2_perm_B_20_1, e poseidon2_perm_B_20_2, e poseidon2_perm_B_20_3, e poseidon2_perm_B_21_0, e poseidon2_perm_B_21_1, e poseidon2_perm_B_21_2, e poseidon2_perm_B_21_3, e poseidon2_perm_B_22_0, e poseidon2_perm_B_22_1, e poseidon2_perm_B_22_2, e poseidon2_perm_B_22_3, e poseidon2_perm_B_23_0, e poseidon2_perm_B_23_1, e poseidon2_perm_B_23_2, e poseidon2_perm_B_23_3, e poseidon2_perm_B_24_0, e poseidon2_perm_B_24_1, e poseidon2_perm_B_24_2, e poseidon2_perm_B_24_3, e poseidon2_perm_B_25_0, e poseidon2_perm_B_25_1, e poseidon2_perm_B_25_2, e poseidon2_perm_B_25_3, e poseidon2_perm_B_26_0, e poseidon2_perm_B_26_1, e poseidon2_perm_B_26_2, e poseidon2_perm_B_26_3, e poseidon2_perm_B_27_0, e poseidon2_perm_B_27_1, e poseidon2_perm_B_27_2, e poseidon2_perm_B_27_3, e poseidon2_perm_B_28_0, e poseidon2_perm_B_28_1, e poseidon2_perm_B_28_2, e poseidon2_perm_B_28_3, e poseidon2_perm_B_29_0, e poseidon2_perm_B_29_1, e poseidon2_perm_B_29_2, e poseidon2_perm_B_29_3, e poseidon2_perm_B_30_0, e poseidon2_perm_B_30_1, e poseidon2_perm_B_30_2, e poseidon2_perm_B_30_3, e poseidon2_perm_B_31_0, e poseidon2_perm_B_31_1, e poseidon2_perm_B_31_2, e poseidon2_perm_B_31_3, e poseidon2_perm_B_32_0, e poseidon2_perm_B_32_1, e poseidon2_perm_B_32_2, e poseidon2_perm_B_32_3, e poseidon2_perm_B_33_0, e poseidon2_perm_B_33_1, e poseidon2_perm_B_33_2, e poseidon2_perm_B_33_3, e poseidon2_perm_B_34_0, e poseidon2_perm_B_34_1, e poseidon2_perm_B_34_2, e poseidon2_perm_B_34_3, e poseidon2_perm_B_35_0, e poseidon2_perm_B_35_1, e poseidon2_perm_B_35_2, e poseidon2_perm_B_35_3, e poseidon2_perm_B_36_0, e poseidon2_perm_B_36_1, e poseidon2_perm_B_36_2, e poseidon2_perm_B_36_3, e poseidon2_perm_B_37_0, e poseidon2_perm_B_37_1, e poseidon2_perm_B_37_2, e poseidon2_perm_B_37_3, e poseidon2_perm_B_38_0, e poseidon2_perm_B_38_1, e poseidon2_perm_B_38_2, e poseidon2_perm_B_38_3, e poseidon2_perm_B_39_0, e poseidon2_perm_B_39_1, e poseidon2_perm_B_39_2, e poseidon2_perm_B_39_3, e poseidon2_perm_B_40_0, e poseidon2_perm_B_40_1, e poseidon2_perm_B_40_2, e poseidon2_perm_B_40_3, e poseidon2_perm_B_41_0, e poseidon2_perm_B_41_1, e poseidon2_perm_B_41_2, e poseidon2_perm_B_41_3, e poseidon2_perm_B_42_0, e poseidon2_perm_B_42_1, e poseidon2_perm_B_42_2, e poseidon2_perm_B_42_3, e poseidon2_perm_B_43_0, e poseidon2_perm_B_43_1, e poseidon2_perm_B_43_2, e poseidon2_perm_B_43_3, e poseidon2_perm_B_44_0, e poseidon2_perm_B_44_1, e poseidon2_perm_B_44_2, e poseidon2_perm_B_44_3, e poseidon2_perm_B_45_0, e poseidon2_perm_B_45_1, e poseidon2_perm_B_45_2, e poseidon2_perm_B_45_3, e poseidon2_perm_B_46_0, e poseidon2_perm_B_46_1, e poseidon2_perm_B_46_2, e poseidon2_perm_B_46_3, e poseidon2_perm_B_47_0, e poseidon2_perm_B_47_1, e poseidon2_perm_B_47_2, e poseidon2_perm_B_47_3, e poseidon2_perm_B_48_0, e poseidon2_perm_B_48_1, e poseidon2_perm_B_48_2, e poseidon2_perm_B_48_3, e poseidon2_perm_B_49_0, e poseidon2_perm_B_49_1, e poseidon2_perm_B_49_2, e poseidon2_perm_B_49_3, e poseidon2_perm_B_4_0, e poseidon2_perm_B_4_1, e poseidon2_perm_B_4_2, e poseidon2_perm_B_4_3, e poseidon2_perm_B_50_0, e poseidon2_perm_B_50_1, e poseidon2_perm_B_50_2, e poseidon2_perm_B_50_3, e poseidon2_perm_B_51_0, e poseidon2_perm_B_51_1, e poseidon2_perm_B_51_2, e poseidon2_perm_B_51_3, e poseidon2_perm_B_52_0, e poseidon2_perm_B_52_1, e poseidon2_perm_B_52_2, e poseidon2_perm_B_52_3, e poseidon2_perm_B_53_0, e poseidon2_perm_B_53_1, e poseidon2_perm_B_53_2, e poseidon2_perm_B_53_3, e poseidon2_perm_B_54_0, e poseidon2_perm_B_54_1, e poseidon2_perm_B_54_2, e poseidon2_perm_B_54_3, e poseidon2_perm_B_55_0, e poseidon2_perm_B_55_1, e poseidon2_perm_B_55_2, e poseidon2_perm_B_55_3, e poseidon2_perm_B_56_0, e poseidon2_perm_B_56_1, e poseidon2_perm_B_56_2, e poseidon2_perm_B_56_3, e poseidon2_perm_B_57_0, e poseidon2_perm_B_57_1, e poseidon2_perm_B_57_2, e poseidon2_perm_B_57_3, e poseidon2_perm_B_58_0, e poseidon2_perm_B_58_1, e poseidon2_perm_B_58_2, e poseidon2_perm_B_58_3, e poseidon2_perm_B_59_0, e poseidon2_perm_B_59_1, e poseidon2_perm_B_59_2, e poseidon2_perm_B_59_3, e poseidon2_perm_B_5_0, e poseidon2_perm_B_5_1, e poseidon2_perm_B_5_2, e poseidon2_perm_B_5_3, e poseidon2_perm_B_6_0, e poseidon2_perm_B_6_1, e poseidon2_perm_B_6_2, e poseidon2_perm_B_6_3, e poseidon2_perm_B_7_0, e poseidon2_perm_B_7_1, e poseidon2_perm_B_7_2, e poseidon2_perm_B_7_3, e poseidon2_perm_B_8_0, e poseidon2_perm_B_8_1, e poseidon2_perm_B_8_2, e poseidon2_perm_B_8_3, e poseidon2_perm_B_9_0, e poseidon2_perm_B_9_1, e poseidon2_perm_B_9_2, e poseidon2_perm_B_9_3, e poseidon2_perm_EXT_LAYER_4, e poseidon2_perm_EXT_LAYER_5, e poseidon2_perm_EXT_LAYER_6, e poseidon2_perm_EXT_LAYER_7, e poseidon2_perm_T_0_4, e poseidon2_perm_T_0_5, e poseidon2_perm_T_0_6, e poseidon2_perm_T_0_7, e poseidon2_perm_T_1_4, e poseidon2_perm_T_1_5, e poseidon2_perm_T_1_6, e poseidon2_perm_T_1_7, e poseidon2_perm_T_2_4, e poseidon2_perm_T_2_5, e poseidon2_perm_T_2_6, e poseidon2_perm_T_2_7, e poseidon2_perm_T_3_4, e poseidon2_perm_T_3_5, e poseidon2_perm_T_3_6, e poseidon2_perm_T_3_7, e poseidon2_perm_T_60_4, e poseidon2_perm_T_60_5, e poseidon2_perm_T_60_6, e poseidon2_perm_T_60_7, e poseidon2_perm_T_61_4, e poseidon2_perm_T_61_5, e poseidon2_perm_T_61_6, e poseidon2_perm_T_61_7, e poseidon2_perm_T_62_4, e poseidon2_perm_T_62_5, e poseidon2_perm_T_62_6, e poseidon2_perm_T_62_7, e poseidon2_perm_T_63_4, e poseidon2_perm_T_63_5, e poseidon2_perm_T_63_6, e poseidon2_perm_T_63_7, e poseidon2_perm_a_0, e poseidon2_perm_a_1, e poseidon2_perm_a_2, e poseidon2_perm_a_3, e poseidon2_perm_b_0, e poseidon2_perm_b_1, e poseidon2_perm_b_2, e poseidon2_perm_b_3, e poseidon2_perm_sel, e public_data_check_address, e public_data_check_clk, e public_data_check_clk_diff, e public_data_check_constant_32, e public_data_check_discard, e public_data_check_end, e public_data_check_intermediate_root, e public_data_check_leaf_not_exists, e public_data_check_leaf_slot, e public_data_check_leaf_slot_low_leaf_slot_diff_inv, e public_data_check_length_pi_idx, e public_data_check_low_leaf_hash, e public_data_check_low_leaf_index, e public_data_check_low_leaf_next_index, e public_data_check_low_leaf_next_slot, e public_data_check_low_leaf_slot, e public_data_check_low_leaf_value, e public_data_check_new_leaf_hash, e public_data_check_next_slot_inv, e public_data_check_next_slot_is_nonzero, e public_data_check_nondiscaded_write, e public_data_check_not_end, e public_data_check_public_data_writes_length, e public_data_check_root, e public_data_check_sel, e public_data_check_should_insert, e public_data_check_should_write_to_public_inputs, e public_data_check_siloing_separator, e public_data_check_slot, e public_data_check_tree_height, e public_data_check_tree_size_after_write, e public_data_check_tree_size_before_write, e public_data_check_updated_low_leaf_hash, e public_data_check_updated_low_leaf_next_index, e public_data_check_updated_low_leaf_next_slot, e public_data_check_updated_low_leaf_value, e public_data_check_value, e public_data_check_write, e public_data_check_write_idx, e public_data_check_write_root, e public_data_squash_check_clock, e public_data_squash_clk, e public_data_squash_clk_diff, e public_data_squash_constant_32, e public_data_squash_leaf_slot, e public_data_squash_leaf_slot_increase, e public_data_squash_sel, e public_data_squash_write_to_public_inputs, e range_check_dyn_diff, e range_check_dyn_rng_chk_bits, e range_check_dyn_rng_chk_pow_2, e range_check_is_lte_u112, e range_check_is_lte_u128, e range_check_is_lte_u16, e range_check_is_lte_u32, e range_check_is_lte_u48, e range_check_is_lte_u64, e range_check_is_lte_u80, e range_check_is_lte_u96, e range_check_rng_chk_bits, e range_check_sel, e range_check_sel_r0_16_bit_rng_lookup, e range_check_sel_r1_16_bit_rng_lookup, e range_check_sel_r2_16_bit_rng_lookup, e range_check_sel_r3_16_bit_rng_lookup, e range_check_sel_r4_16_bit_rng_lookup, e range_check_sel_r5_16_bit_rng_lookup, e range_check_sel_r6_16_bit_rng_lookup, e range_check_u16_r0, e range_check_u16_r1, e range_check_u16_r2, e range_check_u16_r3, e range_check_u16_r4, e range_check_u16_r5, e range_check_u16_r6, e range_check_u16_r7, e range_check_value, e scalar_mul_bit, e scalar_mul_bit_idx, e scalar_mul_bit_radix, e scalar_mul_end, e scalar_mul_not_end, e scalar_mul_point_inf, e scalar_mul_point_x, e scalar_mul_point_y, e scalar_mul_res_inf, e scalar_mul_res_x, e scalar_mul_res_y, e scalar_mul_scalar, e scalar_mul_sel, e scalar_mul_should_add, e scalar_mul_start, e scalar_mul_temp_inf, e scalar_mul_temp_x, e scalar_mul_temp_y, e sha256_a, e sha256_a_and_b, e sha256_a_and_b_xor_a_and_c, e sha256_a_and_c, e sha256_a_rotr_13, e sha256_a_rotr_2, e sha256_a_rotr_22, e sha256_a_rotr_2_xor_a_rotr_13, e sha256_and_sel, e sha256_b, e sha256_b_and_c, e sha256_c, e sha256_ch, e sha256_clk, e sha256_computed_w_lhs, e sha256_computed_w_rhs, e sha256_d, e sha256_e, e sha256_e_and_f, e sha256_e_rotr_11, e sha256_e_rotr_25, e sha256_e_rotr_6, e sha256_e_rotr_6_xor_e_rotr_11, e sha256_f, e sha256_g, e sha256_h, e sha256_helper_w0, e sha256_helper_w1, e sha256_helper_w10, e sha256_helper_w11, e sha256_helper_w12, e sha256_helper_w13, e sha256_helper_w14, e sha256_helper_w15, e sha256_helper_w2, e sha256_helper_w3, e sha256_helper_w4, e sha256_helper_w5, e sha256_helper_w6, e sha256_helper_w7, e sha256_helper_w8, e sha256_helper_w9, e sha256_init_a, e sha256_init_b, e sha256_init_c, e sha256_init_d, e sha256_init_e, e sha256_init_f, e sha256_init_g, e sha256_init_h, e sha256_input_offset, e sha256_is_input_round, e sha256_latch, e sha256_lhs_a_13, e sha256_lhs_a_2, e sha256_lhs_a_22, e sha256_lhs_e_11, e sha256_lhs_e_25, e sha256_lhs_e_6, e sha256_lhs_w_10, e sha256_lhs_w_17, e sha256_lhs_w_18, e sha256_lhs_w_19, e sha256_lhs_w_3, e sha256_lhs_w_7, e sha256_maj, e sha256_next_a_lhs, e sha256_next_a_rhs, e sha256_next_e_lhs, e sha256_next_e_rhs, e sha256_not_e, e sha256_not_e_and_g, e sha256_output_a_lhs, e sha256_output_a_rhs, e sha256_output_b_lhs, e sha256_output_b_rhs, e sha256_output_c_lhs, e sha256_output_c_rhs, e sha256_output_d_lhs, e sha256_output_d_rhs, e sha256_output_e_lhs, e sha256_output_e_rhs, e sha256_output_f_lhs, e sha256_output_f_rhs, e sha256_output_g_lhs, e sha256_output_g_rhs, e sha256_output_h_lhs, e sha256_output_h_rhs, e sha256_output_offset, e sha256_perform_round, e sha256_rhs_a_13, e sha256_rhs_a_2, e sha256_rhs_a_22, e sha256_rhs_e_11, e sha256_rhs_e_25, e sha256_rhs_e_6, e sha256_rhs_w_10, e sha256_rhs_w_17, e sha256_rhs_w_18, e sha256_rhs_w_19, e sha256_rhs_w_3, e sha256_rhs_w_7, e sha256_round_constant, e sha256_round_count, e sha256_rounds_remaining, e sha256_rounds_remaining_inv, e sha256_s_0, e sha256_s_1, e sha256_sel, e sha256_start, e sha256_state_offset, e sha256_w, e sha256_w_15_rotr_18, e sha256_w_15_rotr_7, e sha256_w_15_rotr_7_xor_w_15_rotr_18, e sha256_w_15_rshift_3, e sha256_w_2_rotr_17, e sha256_w_2_rotr_17_xor_w_2_rotr_19, e sha256_w_2_rotr_19, e sha256_w_2_rshift_10, e sha256_w_s_0, e sha256_w_s_1, e sha256_xor_sel, e to_radix_acc, e to_radix_acc_under_p, e to_radix_end, e to_radix_exponent, e to_radix_found, e to_radix_is_unsafe_limb, e to_radix_limb, e to_radix_limb_eq_p, e to_radix_limb_index, e to_radix_limb_lt_p, e to_radix_limb_p_diff, e to_radix_limb_radix_diff, e to_radix_not_end, e to_radix_not_padding_limb, e to_radix_p_limb, e to_radix_radix, e to_radix_rem_inverse, e to_radix_safe_limbs, e to_radix_safety_diff_inverse, e to_radix_sel, e to_radix_start, e to_radix_value, e tx_calldata_hash, e tx_context_id, e tx_contract_addr, e tx_da_gas_limit, e tx_discard, e tx_effective_fee_per_da_gas, e tx_effective_fee_per_l2_gas, e tx_end_gas_used_pi_offset, e tx_end_phase, e tx_fee, e tx_fee_juice_balance_slot, e tx_fee_juice_balances_slot, e tx_fee_juice_contract_address, e tx_fee_payer, e tx_fee_payer_balance, e tx_fee_payer_new_balance, e tx_fee_payer_pi_offset, e tx_is_collect_fee, e tx_is_l2_l1_msg_phase, e tx_is_padded, e tx_is_public_call_request, e tx_is_revertible, e tx_is_static, e tx_is_teardown_phase, e tx_is_tree_insert_phase, e tx_l2_gas_limit, e tx_l2_l1_msg_content, e tx_l2_l1_msg_contract_address, e tx_l2_l1_msg_recipient, e tx_leaf_value, e tx_msg_sender, e tx_next_context_id, e tx_next_da_gas_used, e tx_next_da_gas_used_sent_to_enqueued_call, e tx_next_l1_l2_tree_root, e tx_next_l1_l2_tree_size, e tx_next_l2_gas_used, e tx_next_l2_gas_used_sent_to_enqueued_call, e tx_next_note_hash_tree_root, e tx_next_note_hash_tree_size, e tx_next_nullifier_tree_root, e tx_next_nullifier_tree_size, e tx_next_num_note_hashes_emitted, e tx_next_num_nullifiers_emitted, e tx_next_public_data_tree_root, e tx_next_public_data_tree_size, e tx_next_written_public_data_slots_tree_root, e tx_next_written_public_data_slots_tree_size, e tx_num_l2_l1_msg_emitted, e tx_phase_value, e tx_prev_da_gas_used, e tx_prev_da_gas_used_sent_to_enqueued_call, e tx_prev_l1_l2_tree_root, e tx_prev_l1_l2_tree_size, e tx_prev_l2_gas_used, e tx_prev_l2_gas_used_sent_to_enqueued_call, e tx_prev_note_hash_tree_root, e tx_prev_note_hash_tree_size, e tx_prev_nullifier_tree_root, e tx_prev_nullifier_tree_size, e tx_prev_num_note_hashes_emitted, e tx_prev_num_nullifiers_emitted, e tx_prev_public_data_tree_root, e tx_prev_public_data_tree_size, e tx_prev_written_public_data_slots_tree_root, e tx_prev_written_public_data_slots_tree_size, e tx_read_pi_length_offset, e tx_read_pi_offset, e tx_remaining_phase_counter, e tx_remaining_phase_inv, e tx_remaining_phase_minus_one_inv, e tx_reverted, e tx_sel, e tx_sel_non_revertible_append_note_hash, e tx_sel_non_revertible_append_nullifier, e tx_sel_read_phase_length, e tx_sel_revertible_append_note_hash, e tx_sel_revertible_append_nullifier, e tx_should_note_hash_append, e tx_should_nullifier_append, e tx_start_phase, e tx_successful_msg_emit, e tx_uint32_max, e tx_write_pi_offset, e update_check_address, e update_check_current_class_id, e update_check_deployer_protocol_contract_address, e update_check_hash_not_zero, e update_check_original_class_id, e update_check_public_data_tree_root, e update_check_public_leaf_index_domain_separator, e update_check_sel, e update_check_shared_mutable_hash_slot, e update_check_shared_mutable_slot, e update_check_timestamp, e update_check_timestamp_is_lt_timestamp_of_change, e update_check_timestamp_of_change, e update_check_timestamp_of_change_bit_size, e update_check_timestamp_of_change_subtraction, e update_check_timestamp_pi_offset, e update_check_update_hash, e update_check_update_hash_inv, e update_check_update_hi_metadata, e update_check_update_hi_metadata_bit_size, e update_check_update_post_class_id_is_zero, e update_check_update_post_class_inv, e update_check_update_pre_class_id_is_zero, e update_check_update_pre_class_inv, e update_check_update_preimage_metadata, e update_check_update_preimage_post_class_id, e update_check_update_preimage_pre_class_id, e update_check_updated_class_ids_slot, e written_public_data_slots_tree_check_address, e written_public_data_slots_tree_check_intermediate_root, e written_public_data_slots_tree_check_leaf_not_exists, e written_public_data_slots_tree_check_leaf_slot, e written_public_data_slots_tree_check_low_leaf_hash, e written_public_data_slots_tree_check_low_leaf_index, e written_public_data_slots_tree_check_low_leaf_next_index, e written_public_data_slots_tree_check_low_leaf_next_slot, e written_public_data_slots_tree_check_low_leaf_slot, e written_public_data_slots_tree_check_new_leaf_hash, e written_public_data_slots_tree_check_next_slot_inv, e written_public_data_slots_tree_check_next_slot_is_nonzero, e written_public_data_slots_tree_check_root, e written_public_data_slots_tree_check_sel, e written_public_data_slots_tree_check_should_insert, e written_public_data_slots_tree_check_siloing_separator, e written_public_data_slots_tree_check_slot, e written_public_data_slots_tree_check_slot_low_leaf_slot_diff_inv, e written_public_data_slots_tree_check_tree_height, e written_public_data_slots_tree_check_tree_size_after_write, e written_public_data_slots_tree_check_tree_size_before_write, e written_public_data_slots_tree_check_updated_low_leaf_hash, e written_public_data_slots_tree_check_updated_low_leaf_next_index, e written_public_data_slots_tree_check_updated_low_leaf_next_slot, e written_public_data_slots_tree_check_write, e written_public_data_slots_tree_check_write_root, e lookup_range_check_dyn_rng_chk_pow_2_counts, e lookup_range_check_dyn_diff_is_u16_counts, e lookup_range_check_r0_is_u16_counts, e lookup_range_check_r1_is_u16_counts, e lookup_range_check_r2_is_u16_counts, e lookup_range_check_r3_is_u16_counts, e lookup_range_check_r4_is_u16_counts, e lookup_range_check_r5_is_u16_counts, e lookup_range_check_r6_is_u16_counts, e lookup_range_check_r7_is_u16_counts, e lookup_ff_gt_a_lo_range_counts, e lookup_ff_gt_a_hi_range_counts, e lookup_gt_gt_range_counts, e lookup_alu_register_tag_value_counts, e lookup_alu_tag_max_bits_value_counts, e lookup_alu_ff_gt_counts, e lookup_alu_int_gt_counts, e lookup_bitwise_integral_tag_length_counts, e lookup_bitwise_byte_operations_counts, e lookup_bitwise_dispatch_exec_bitwise_counts, e lookup_keccak_memory_slice_to_mem_counts, e lookup_keccakf1600_theta_xor_01_counts, e lookup_keccakf1600_theta_xor_02_counts, e lookup_keccakf1600_theta_xor_03_counts, e lookup_keccakf1600_theta_xor_row_0_counts, e lookup_keccakf1600_theta_xor_11_counts, e lookup_keccakf1600_theta_xor_12_counts, e lookup_keccakf1600_theta_xor_13_counts, e lookup_keccakf1600_theta_xor_row_1_counts, e lookup_keccakf1600_theta_xor_21_counts, e lookup_keccakf1600_theta_xor_22_counts, e lookup_keccakf1600_theta_xor_23_counts, e lookup_keccakf1600_theta_xor_row_2_counts, e lookup_keccakf1600_theta_xor_31_counts, e lookup_keccakf1600_theta_xor_32_counts, e lookup_keccakf1600_theta_xor_33_counts, e lookup_keccakf1600_theta_xor_row_3_counts, e lookup_keccakf1600_theta_xor_41_counts, e lookup_keccakf1600_theta_xor_42_counts, e lookup_keccakf1600_theta_xor_43_counts, e lookup_keccakf1600_theta_xor_row_4_counts, e lookup_keccakf1600_theta_combined_xor_0_counts, e lookup_keccakf1600_theta_combined_xor_1_counts, e lookup_keccakf1600_theta_combined_xor_2_counts, e lookup_keccakf1600_theta_combined_xor_3_counts, e lookup_keccakf1600_theta_combined_xor_4_counts, e lookup_keccakf1600_state_theta_00_counts, e lookup_keccakf1600_state_theta_01_counts, e lookup_keccakf1600_state_theta_02_counts, e lookup_keccakf1600_state_theta_03_counts, e lookup_keccakf1600_state_theta_04_counts, e lookup_keccakf1600_state_theta_10_counts, e lookup_keccakf1600_state_theta_11_counts, e lookup_keccakf1600_state_theta_12_counts, e lookup_keccakf1600_state_theta_13_counts, e lookup_keccakf1600_state_theta_14_counts, e lookup_keccakf1600_state_theta_20_counts, e lookup_keccakf1600_state_theta_21_counts, e lookup_keccakf1600_state_theta_22_counts, e lookup_keccakf1600_state_theta_23_counts, e lookup_keccakf1600_state_theta_24_counts, e lookup_keccakf1600_state_theta_30_counts, e lookup_keccakf1600_state_theta_31_counts, e lookup_keccakf1600_state_theta_32_counts, e lookup_keccakf1600_state_theta_33_counts, e lookup_keccakf1600_state_theta_34_counts, e lookup_keccakf1600_state_theta_40_counts, e lookup_keccakf1600_state_theta_41_counts, e lookup_keccakf1600_state_theta_42_counts, e lookup_keccakf1600_state_theta_43_counts, e lookup_keccakf1600_state_theta_44_counts, e lookup_keccakf1600_theta_limb_02_range_counts, e lookup_keccakf1600_theta_limb_04_range_counts, e lookup_keccakf1600_theta_limb_10_range_counts, e lookup_keccakf1600_theta_limb_12_range_counts, e lookup_keccakf1600_theta_limb_14_range_counts, e lookup_keccakf1600_theta_limb_21_range_counts, e lookup_keccakf1600_theta_limb_23_range_counts, e lookup_keccakf1600_theta_limb_30_range_counts, e lookup_keccakf1600_theta_limb_32_range_counts, e lookup_keccakf1600_theta_limb_33_range_counts, e lookup_keccakf1600_theta_limb_40_range_counts, e lookup_keccakf1600_theta_limb_41_range_counts, e lookup_keccakf1600_theta_limb_43_range_counts, e lookup_keccakf1600_theta_limb_44_range_counts, e lookup_keccakf1600_theta_limb_01_range_counts, e lookup_keccakf1600_theta_limb_03_range_counts, e lookup_keccakf1600_theta_limb_11_range_counts, e lookup_keccakf1600_theta_limb_13_range_counts, e lookup_keccakf1600_theta_limb_20_range_counts, e lookup_keccakf1600_theta_limb_22_range_counts, e lookup_keccakf1600_theta_limb_24_range_counts, e lookup_keccakf1600_theta_limb_31_range_counts, e lookup_keccakf1600_theta_limb_34_range_counts, e lookup_keccakf1600_theta_limb_42_range_counts, e lookup_keccakf1600_state_pi_and_00_counts, e lookup_keccakf1600_state_pi_and_01_counts, e lookup_keccakf1600_state_pi_and_02_counts, e lookup_keccakf1600_state_pi_and_03_counts, e lookup_keccakf1600_state_pi_and_04_counts, e lookup_keccakf1600_state_pi_and_10_counts, e lookup_keccakf1600_state_pi_and_11_counts, e lookup_keccakf1600_state_pi_and_12_counts, e lookup_keccakf1600_state_pi_and_13_counts, e lookup_keccakf1600_state_pi_and_14_counts, e lookup_keccakf1600_state_pi_and_20_counts, e lookup_keccakf1600_state_pi_and_21_counts, e lookup_keccakf1600_state_pi_and_22_counts, e lookup_keccakf1600_state_pi_and_23_counts, e lookup_keccakf1600_state_pi_and_24_counts, e lookup_keccakf1600_state_pi_and_30_counts, e lookup_keccakf1600_state_pi_and_31_counts, e lookup_keccakf1600_state_pi_and_32_counts, e lookup_keccakf1600_state_pi_and_33_counts, e lookup_keccakf1600_state_pi_and_34_counts, e lookup_keccakf1600_state_pi_and_40_counts, e lookup_keccakf1600_state_pi_and_41_counts, e lookup_keccakf1600_state_pi_and_42_counts, e lookup_keccakf1600_state_pi_and_43_counts, e lookup_keccakf1600_state_pi_and_44_counts, e lookup_keccakf1600_state_chi_00_counts, e lookup_keccakf1600_state_chi_01_counts, e lookup_keccakf1600_state_chi_02_counts, e lookup_keccakf1600_state_chi_03_counts, e lookup_keccakf1600_state_chi_04_counts, e lookup_keccakf1600_state_chi_10_counts, e lookup_keccakf1600_state_chi_11_counts, e lookup_keccakf1600_state_chi_12_counts, e lookup_keccakf1600_state_chi_13_counts, e lookup_keccakf1600_state_chi_14_counts, e lookup_keccakf1600_state_chi_20_counts, e lookup_keccakf1600_state_chi_21_counts, e lookup_keccakf1600_state_chi_22_counts, e lookup_keccakf1600_state_chi_23_counts, e lookup_keccakf1600_state_chi_24_counts, e lookup_keccakf1600_state_chi_30_counts, e lookup_keccakf1600_state_chi_31_counts, e lookup_keccakf1600_state_chi_32_counts, e lookup_keccakf1600_state_chi_33_counts, e lookup_keccakf1600_state_chi_34_counts, e lookup_keccakf1600_state_chi_40_counts, e lookup_keccakf1600_state_chi_41_counts, e lookup_keccakf1600_state_chi_42_counts, e lookup_keccakf1600_state_chi_43_counts, e lookup_keccakf1600_state_chi_44_counts, e lookup_keccakf1600_round_cst_counts, e lookup_keccakf1600_state_iota_00_counts, e lookup_keccakf1600_src_abs_diff_positive_counts, e lookup_keccakf1600_dst_abs_diff_positive_counts, e lookup_sha256_round_constant_counts, e lookup_poseidon2_hash_poseidon2_perm_counts, e lookup_to_radix_limb_range_counts, e lookup_to_radix_limb_less_than_radix_range_counts, e lookup_to_radix_fetch_safe_limbs_counts, e lookup_to_radix_fetch_p_limb_counts, e lookup_to_radix_limb_p_diff_range_counts, e lookup_scalar_mul_to_radix_counts, e lookup_scalar_mul_double_counts, e lookup_scalar_mul_add_counts, e lookup_context_ctx_stack_call_counts, e lookup_context_ctx_stack_rollback_counts, e lookup_context_ctx_stack_return_counts, e lookup_calldata_hashing_cd_hash_counts, e lookup_calldata_hashing_cd_hash_end_counts, e lookup_data_copy_range_max_read_size_diff_counts, e lookup_data_copy_range_read_counts, e lookup_data_copy_range_write_counts, e lookup_data_copy_range_reads_left_counts, e lookup_data_copy_mem_write_counts, e lookup_data_copy_mem_read_counts, e lookup_data_copy_col_read_counts, e lookup_addressing_base_address_from_memory_counts, e lookup_addressing_relative_overflow_range_0_counts, e lookup_addressing_relative_overflow_range_1_counts, e lookup_addressing_relative_overflow_range_2_counts, e lookup_addressing_relative_overflow_range_3_counts, e lookup_addressing_relative_overflow_range_4_counts, e lookup_addressing_relative_overflow_range_5_counts, e lookup_addressing_relative_overflow_range_6_counts, e lookup_addressing_indirect_from_memory_0_counts, e lookup_addressing_indirect_from_memory_1_counts, e lookup_addressing_indirect_from_memory_2_counts, e lookup_addressing_indirect_from_memory_3_counts, e lookup_addressing_indirect_from_memory_4_counts, e lookup_addressing_indirect_from_memory_5_counts, e lookup_addressing_indirect_from_memory_6_counts, e lookup_registers_mem_op_0_counts, e lookup_registers_mem_op_1_counts, e lookup_registers_mem_op_2_counts, e lookup_registers_mem_op_3_counts, e lookup_registers_mem_op_4_counts, e lookup_registers_mem_op_5_counts, e lookup_registers_mem_op_6_counts, e lookup_gas_addressing_gas_read_counts, e lookup_gas_limit_used_l2_range_counts, e lookup_gas_limit_used_da_range_counts, e lookup_merkle_check_merkle_poseidon2_read_counts, e lookup_merkle_check_merkle_poseidon2_write_counts, e lookup_nullifier_check_silo_poseidon2_counts, e lookup_nullifier_check_low_leaf_poseidon2_counts, e lookup_nullifier_check_updated_low_leaf_poseidon2_counts, e lookup_nullifier_check_low_leaf_merkle_check_counts, e lookup_nullifier_check_low_leaf_nullifier_validation_counts, e lookup_nullifier_check_low_leaf_next_nullifier_validation_counts, e lookup_nullifier_check_new_leaf_poseidon2_counts, e lookup_nullifier_check_new_leaf_merkle_check_counts, e lookup_nullifier_check_write_nullifier_to_public_inputs_counts, e lookup_public_data_check_silo_poseidon2_counts, e lookup_public_data_check_low_leaf_slot_validation_counts, e lookup_public_data_check_low_leaf_next_slot_validation_counts, e lookup_public_data_check_low_leaf_poseidon2_0_counts, e lookup_public_data_check_low_leaf_poseidon2_1_counts, e lookup_public_data_check_updated_low_leaf_poseidon2_0_counts, e lookup_public_data_check_updated_low_leaf_poseidon2_1_counts, e lookup_public_data_check_low_leaf_merkle_check_counts, e lookup_public_data_check_new_leaf_poseidon2_0_counts, e lookup_public_data_check_new_leaf_poseidon2_1_counts, e lookup_public_data_check_new_leaf_merkle_check_counts, e lookup_public_data_check_write_public_data_to_public_inputs_counts, e lookup_written_public_data_slots_tree_check_silo_poseidon2_counts, e lookup_written_public_data_slots_tree_check_low_leaf_poseidon2_counts, e lookup_written_public_data_slots_tree_check_updated_low_leaf_poseidon2_counts, e lookup_written_public_data_slots_tree_check_low_leaf_merkle_check_counts, e lookup_written_public_data_slots_tree_check_low_leaf_slot_validation_counts, e lookup_written_public_data_slots_tree_check_low_leaf_next_slot_validation_counts, e lookup_written_public_data_slots_tree_check_new_leaf_poseidon2_counts, e lookup_written_public_data_slots_tree_check_new_leaf_merkle_check_counts, e lookup_address_derivation_salted_initialization_hash_poseidon2_0_counts, e lookup_address_derivation_salted_initialization_hash_poseidon2_1_counts, e lookup_address_derivation_partial_address_poseidon2_counts, e lookup_address_derivation_public_keys_hash_poseidon2_0_counts, e lookup_address_derivation_public_keys_hash_poseidon2_1_counts, e lookup_address_derivation_public_keys_hash_poseidon2_2_counts, e lookup_address_derivation_public_keys_hash_poseidon2_3_counts, e lookup_address_derivation_public_keys_hash_poseidon2_4_counts, e lookup_address_derivation_preaddress_poseidon2_counts, e lookup_address_derivation_preaddress_scalar_mul_counts, e lookup_address_derivation_address_ecadd_counts, e lookup_bc_decomposition_bytes_are_bytes_counts, e lookup_bc_decomposition_abs_diff_is_u16_counts, e lookup_bc_hashing_get_packed_field_counts, e lookup_bc_hashing_iv_is_len_counts, e lookup_update_check_timestamp_from_public_inputs_counts, e lookup_update_check_shared_mutable_slot_poseidon2_counts, e lookup_update_check_update_hash_public_data_read_counts, e lookup_update_check_update_hash_poseidon2_counts, e lookup_update_check_update_hi_metadata_range_counts, e lookup_update_check_update_lo_metadata_range_counts, e lookup_update_check_timestamp_of_change_cmp_range_counts, e lookup_contract_instance_retrieval_deployment_nullifier_read_counts, e lookup_contract_instance_retrieval_address_derivation_counts, e lookup_contract_instance_retrieval_update_check_counts, e lookup_bc_retrieval_contract_instance_retrieval_counts, e lookup_bc_retrieval_class_id_derivation_counts, e lookup_instr_fetching_pc_abs_diff_positive_counts, e lookup_instr_fetching_instr_abs_diff_positive_counts, e lookup_instr_fetching_tag_value_validation_counts, e lookup_instr_fetching_bytecode_size_from_bc_dec_counts, e lookup_instr_fetching_bytes_from_bc_dec_counts, e lookup_instr_fetching_wire_instruction_info_counts, e lookup_class_id_derivation_class_id_poseidon2_0_counts, e lookup_class_id_derivation_class_id_poseidon2_1_counts, e lookup_get_env_var_precomputed_info_counts, e lookup_get_env_var_read_from_public_inputs_col0_counts, e lookup_get_env_var_read_from_public_inputs_col1_counts, e lookup_get_contract_instance_precomputed_info_counts, e lookup_get_contract_instance_contract_instance_retrieval_counts, e lookup_get_contract_instance_mem_write_contract_instance_exists_counts, e lookup_get_contract_instance_mem_write_contract_instance_member_counts, e lookup_internal_call_push_call_stack_counts, e lookup_internal_call_unwind_call_stack_counts, e lookup_external_call_call_allocated_left_l2_range_counts, e lookup_external_call_call_allocated_left_da_range_counts, e lookup_sload_storage_read_counts, e lookup_sstore_record_written_storage_slot_counts, e lookup_sstore_storage_write_counts, e lookup_note_hash_tree_check_silo_poseidon2_counts, e lookup_note_hash_tree_check_read_first_nullifier_counts, e lookup_note_hash_tree_check_nonce_computation_poseidon2_counts, e lookup_note_hash_tree_check_unique_note_hash_poseidon2_counts, e lookup_note_hash_tree_check_merkle_check_counts, e lookup_note_hash_tree_check_write_note_hash_to_public_inputs_counts, e lookup_notehash_exists_note_hash_index_range_counts, e lookup_notehash_exists_note_hash_read_counts, e lookup_execution_bytecode_retrieval_result_counts, e lookup_execution_instruction_fetching_result_counts, e lookup_execution_instruction_fetching_body_counts, e lookup_execution_exec_spec_read_counts, e lookup_execution_dyn_l2_factor_bitwise_counts, e lookup_execution_check_written_storage_slot_counts, e lookup_tx_read_phase_table_counts, e lookup_tx_phase_jump_on_revert_counts, e lookup_tx_read_phase_length_counts, e lookup_tx_read_public_call_request_phase_counts, e lookup_tx_read_tree_insert_value_counts, e lookup_tx_note_hash_append_counts, e lookup_tx_nullifier_append_counts, e lookup_tx_read_l2_l1_msg_counts, e lookup_tx_write_l2_l1_msg_counts, e lookup_tx_read_effective_fee_public_inputs_counts, e lookup_tx_read_fee_payer_public_inputs_counts, e lookup_tx_balance_slot_poseidon2_counts, e lookup_tx_balance_validation_counts +#define AVM2_DERIVED_WITNESS_ENTITIES_E(e) e perm_keccakf1600_read_to_slice_inv, e perm_keccakf1600_write_to_slice_inv, e perm_public_data_check_squashing_inv, e perm_execution_dispatch_keccakf1600_inv, e perm_execution_dispatch_get_contract_instance_inv, e lookup_range_check_dyn_rng_chk_pow_2_inv, e lookup_range_check_dyn_diff_is_u16_inv, e lookup_range_check_r0_is_u16_inv, e lookup_range_check_r1_is_u16_inv, e lookup_range_check_r2_is_u16_inv, e lookup_range_check_r3_is_u16_inv, e lookup_range_check_r4_is_u16_inv, e lookup_range_check_r5_is_u16_inv, e lookup_range_check_r6_is_u16_inv, e lookup_range_check_r7_is_u16_inv, e lookup_ff_gt_a_lo_range_inv, e lookup_ff_gt_a_hi_range_inv, e lookup_gt_gt_range_inv, e lookup_alu_register_tag_value_inv, e lookup_alu_tag_max_bits_value_inv, e lookup_alu_ff_gt_inv, e lookup_alu_int_gt_inv, e lookup_bitwise_integral_tag_length_inv, e lookup_bitwise_byte_operations_inv, e lookup_bitwise_dispatch_exec_bitwise_inv, e lookup_keccak_memory_slice_to_mem_inv, e lookup_keccakf1600_theta_xor_01_inv, e lookup_keccakf1600_theta_xor_02_inv, e lookup_keccakf1600_theta_xor_03_inv, e lookup_keccakf1600_theta_xor_row_0_inv, e lookup_keccakf1600_theta_xor_11_inv, e lookup_keccakf1600_theta_xor_12_inv, e lookup_keccakf1600_theta_xor_13_inv, e lookup_keccakf1600_theta_xor_row_1_inv, e lookup_keccakf1600_theta_xor_21_inv, e lookup_keccakf1600_theta_xor_22_inv, e lookup_keccakf1600_theta_xor_23_inv, e lookup_keccakf1600_theta_xor_row_2_inv, e lookup_keccakf1600_theta_xor_31_inv, e lookup_keccakf1600_theta_xor_32_inv, e lookup_keccakf1600_theta_xor_33_inv, e lookup_keccakf1600_theta_xor_row_3_inv, e lookup_keccakf1600_theta_xor_41_inv, e lookup_keccakf1600_theta_xor_42_inv, e lookup_keccakf1600_theta_xor_43_inv, e lookup_keccakf1600_theta_xor_row_4_inv, e lookup_keccakf1600_theta_combined_xor_0_inv, e lookup_keccakf1600_theta_combined_xor_1_inv, e lookup_keccakf1600_theta_combined_xor_2_inv, e lookup_keccakf1600_theta_combined_xor_3_inv, e lookup_keccakf1600_theta_combined_xor_4_inv, e lookup_keccakf1600_state_theta_00_inv, e lookup_keccakf1600_state_theta_01_inv, e lookup_keccakf1600_state_theta_02_inv, e lookup_keccakf1600_state_theta_03_inv, e lookup_keccakf1600_state_theta_04_inv, e lookup_keccakf1600_state_theta_10_inv, e lookup_keccakf1600_state_theta_11_inv, e lookup_keccakf1600_state_theta_12_inv, e lookup_keccakf1600_state_theta_13_inv, e lookup_keccakf1600_state_theta_14_inv, e lookup_keccakf1600_state_theta_20_inv, e lookup_keccakf1600_state_theta_21_inv, e lookup_keccakf1600_state_theta_22_inv, e lookup_keccakf1600_state_theta_23_inv, e lookup_keccakf1600_state_theta_24_inv, e lookup_keccakf1600_state_theta_30_inv, e lookup_keccakf1600_state_theta_31_inv, e lookup_keccakf1600_state_theta_32_inv, e lookup_keccakf1600_state_theta_33_inv, e lookup_keccakf1600_state_theta_34_inv, e lookup_keccakf1600_state_theta_40_inv, e lookup_keccakf1600_state_theta_41_inv, e lookup_keccakf1600_state_theta_42_inv, e lookup_keccakf1600_state_theta_43_inv, e lookup_keccakf1600_state_theta_44_inv, e lookup_keccakf1600_theta_limb_02_range_inv, e lookup_keccakf1600_theta_limb_04_range_inv, e lookup_keccakf1600_theta_limb_10_range_inv, e lookup_keccakf1600_theta_limb_12_range_inv, e lookup_keccakf1600_theta_limb_14_range_inv, e lookup_keccakf1600_theta_limb_21_range_inv, e lookup_keccakf1600_theta_limb_23_range_inv, e lookup_keccakf1600_theta_limb_30_range_inv, e lookup_keccakf1600_theta_limb_32_range_inv, e lookup_keccakf1600_theta_limb_33_range_inv, e lookup_keccakf1600_theta_limb_40_range_inv, e lookup_keccakf1600_theta_limb_41_range_inv, e lookup_keccakf1600_theta_limb_43_range_inv, e lookup_keccakf1600_theta_limb_44_range_inv, e lookup_keccakf1600_theta_limb_01_range_inv, e lookup_keccakf1600_theta_limb_03_range_inv, e lookup_keccakf1600_theta_limb_11_range_inv, e lookup_keccakf1600_theta_limb_13_range_inv, e lookup_keccakf1600_theta_limb_20_range_inv, e lookup_keccakf1600_theta_limb_22_range_inv, e lookup_keccakf1600_theta_limb_24_range_inv, e lookup_keccakf1600_theta_limb_31_range_inv, e lookup_keccakf1600_theta_limb_34_range_inv, e lookup_keccakf1600_theta_limb_42_range_inv, e lookup_keccakf1600_state_pi_and_00_inv, e lookup_keccakf1600_state_pi_and_01_inv, e lookup_keccakf1600_state_pi_and_02_inv, e lookup_keccakf1600_state_pi_and_03_inv, e lookup_keccakf1600_state_pi_and_04_inv, e lookup_keccakf1600_state_pi_and_10_inv, e lookup_keccakf1600_state_pi_and_11_inv, e lookup_keccakf1600_state_pi_and_12_inv, e lookup_keccakf1600_state_pi_and_13_inv, e lookup_keccakf1600_state_pi_and_14_inv, e lookup_keccakf1600_state_pi_and_20_inv, e lookup_keccakf1600_state_pi_and_21_inv, e lookup_keccakf1600_state_pi_and_22_inv, e lookup_keccakf1600_state_pi_and_23_inv, e lookup_keccakf1600_state_pi_and_24_inv, e lookup_keccakf1600_state_pi_and_30_inv, e lookup_keccakf1600_state_pi_and_31_inv, e lookup_keccakf1600_state_pi_and_32_inv, e lookup_keccakf1600_state_pi_and_33_inv, e lookup_keccakf1600_state_pi_and_34_inv, e lookup_keccakf1600_state_pi_and_40_inv, e lookup_keccakf1600_state_pi_and_41_inv, e lookup_keccakf1600_state_pi_and_42_inv, e lookup_keccakf1600_state_pi_and_43_inv, e lookup_keccakf1600_state_pi_and_44_inv, e lookup_keccakf1600_state_chi_00_inv, e lookup_keccakf1600_state_chi_01_inv, e lookup_keccakf1600_state_chi_02_inv, e lookup_keccakf1600_state_chi_03_inv, e lookup_keccakf1600_state_chi_04_inv, e lookup_keccakf1600_state_chi_10_inv, e lookup_keccakf1600_state_chi_11_inv, e lookup_keccakf1600_state_chi_12_inv, e lookup_keccakf1600_state_chi_13_inv, e lookup_keccakf1600_state_chi_14_inv, e lookup_keccakf1600_state_chi_20_inv, e lookup_keccakf1600_state_chi_21_inv, e lookup_keccakf1600_state_chi_22_inv, e lookup_keccakf1600_state_chi_23_inv, e lookup_keccakf1600_state_chi_24_inv, e lookup_keccakf1600_state_chi_30_inv, e lookup_keccakf1600_state_chi_31_inv, e lookup_keccakf1600_state_chi_32_inv, e lookup_keccakf1600_state_chi_33_inv, e lookup_keccakf1600_state_chi_34_inv, e lookup_keccakf1600_state_chi_40_inv, e lookup_keccakf1600_state_chi_41_inv, e lookup_keccakf1600_state_chi_42_inv, e lookup_keccakf1600_state_chi_43_inv, e lookup_keccakf1600_state_chi_44_inv, e lookup_keccakf1600_round_cst_inv, e lookup_keccakf1600_state_iota_00_inv, e lookup_keccakf1600_src_abs_diff_positive_inv, e lookup_keccakf1600_dst_abs_diff_positive_inv, e lookup_sha256_round_constant_inv, e lookup_poseidon2_hash_poseidon2_perm_inv, e lookup_to_radix_limb_range_inv, e lookup_to_radix_limb_less_than_radix_range_inv, e lookup_to_radix_fetch_safe_limbs_inv, e lookup_to_radix_fetch_p_limb_inv, e lookup_to_radix_limb_p_diff_range_inv, e lookup_scalar_mul_to_radix_inv, e lookup_scalar_mul_double_inv, e lookup_scalar_mul_add_inv, e lookup_context_ctx_stack_call_inv, e lookup_context_ctx_stack_rollback_inv, e lookup_context_ctx_stack_return_inv, e lookup_calldata_hashing_cd_hash_inv, e lookup_calldata_hashing_cd_hash_end_inv, e lookup_data_copy_range_max_read_size_diff_inv, e lookup_data_copy_range_read_inv, e lookup_data_copy_range_write_inv, e lookup_data_copy_range_reads_left_inv, e lookup_data_copy_mem_write_inv, e lookup_data_copy_mem_read_inv, e lookup_data_copy_col_read_inv, e lookup_addressing_base_address_from_memory_inv, e lookup_addressing_relative_overflow_range_0_inv, e lookup_addressing_relative_overflow_range_1_inv, e lookup_addressing_relative_overflow_range_2_inv, e lookup_addressing_relative_overflow_range_3_inv, e lookup_addressing_relative_overflow_range_4_inv, e lookup_addressing_relative_overflow_range_5_inv, e lookup_addressing_relative_overflow_range_6_inv, e lookup_addressing_indirect_from_memory_0_inv, e lookup_addressing_indirect_from_memory_1_inv, e lookup_addressing_indirect_from_memory_2_inv, e lookup_addressing_indirect_from_memory_3_inv, e lookup_addressing_indirect_from_memory_4_inv, e lookup_addressing_indirect_from_memory_5_inv, e lookup_addressing_indirect_from_memory_6_inv, e lookup_registers_mem_op_0_inv, e lookup_registers_mem_op_1_inv, e lookup_registers_mem_op_2_inv, e lookup_registers_mem_op_3_inv, e lookup_registers_mem_op_4_inv, e lookup_registers_mem_op_5_inv, e lookup_registers_mem_op_6_inv, e lookup_gas_addressing_gas_read_inv, e lookup_gas_limit_used_l2_range_inv, e lookup_gas_limit_used_da_range_inv, e lookup_merkle_check_merkle_poseidon2_read_inv, e lookup_merkle_check_merkle_poseidon2_write_inv, e lookup_nullifier_check_silo_poseidon2_inv, e lookup_nullifier_check_low_leaf_poseidon2_inv, e lookup_nullifier_check_updated_low_leaf_poseidon2_inv, e lookup_nullifier_check_low_leaf_merkle_check_inv, e lookup_nullifier_check_low_leaf_nullifier_validation_inv, e lookup_nullifier_check_low_leaf_next_nullifier_validation_inv, e lookup_nullifier_check_new_leaf_poseidon2_inv, e lookup_nullifier_check_new_leaf_merkle_check_inv, e lookup_nullifier_check_write_nullifier_to_public_inputs_inv, e lookup_public_data_check_silo_poseidon2_inv, e lookup_public_data_check_low_leaf_slot_validation_inv, e lookup_public_data_check_low_leaf_next_slot_validation_inv, e lookup_public_data_check_low_leaf_poseidon2_0_inv, e lookup_public_data_check_low_leaf_poseidon2_1_inv, e lookup_public_data_check_updated_low_leaf_poseidon2_0_inv, e lookup_public_data_check_updated_low_leaf_poseidon2_1_inv, e lookup_public_data_check_low_leaf_merkle_check_inv, e lookup_public_data_check_new_leaf_poseidon2_0_inv, e lookup_public_data_check_new_leaf_poseidon2_1_inv, e lookup_public_data_check_new_leaf_merkle_check_inv, e lookup_public_data_check_write_public_data_to_public_inputs_inv, e lookup_written_public_data_slots_tree_check_silo_poseidon2_inv, e lookup_written_public_data_slots_tree_check_low_leaf_poseidon2_inv, e lookup_written_public_data_slots_tree_check_updated_low_leaf_poseidon2_inv, e lookup_written_public_data_slots_tree_check_low_leaf_merkle_check_inv, e lookup_written_public_data_slots_tree_check_low_leaf_slot_validation_inv, e lookup_written_public_data_slots_tree_check_low_leaf_next_slot_validation_inv, e lookup_written_public_data_slots_tree_check_new_leaf_poseidon2_inv, e lookup_written_public_data_slots_tree_check_new_leaf_merkle_check_inv, e lookup_address_derivation_salted_initialization_hash_poseidon2_0_inv, e lookup_address_derivation_salted_initialization_hash_poseidon2_1_inv, e lookup_address_derivation_partial_address_poseidon2_inv, e lookup_address_derivation_public_keys_hash_poseidon2_0_inv, e lookup_address_derivation_public_keys_hash_poseidon2_1_inv, e lookup_address_derivation_public_keys_hash_poseidon2_2_inv, e lookup_address_derivation_public_keys_hash_poseidon2_3_inv, e lookup_address_derivation_public_keys_hash_poseidon2_4_inv, e lookup_address_derivation_preaddress_poseidon2_inv, e lookup_address_derivation_preaddress_scalar_mul_inv, e lookup_address_derivation_address_ecadd_inv, e lookup_bc_decomposition_bytes_are_bytes_inv, e lookup_bc_decomposition_abs_diff_is_u16_inv, e lookup_bc_hashing_get_packed_field_inv, e lookup_bc_hashing_iv_is_len_inv, e lookup_update_check_timestamp_from_public_inputs_inv, e lookup_update_check_shared_mutable_slot_poseidon2_inv, e lookup_update_check_update_hash_public_data_read_inv, e lookup_update_check_update_hash_poseidon2_inv, e lookup_update_check_update_hi_metadata_range_inv, e lookup_update_check_update_lo_metadata_range_inv, e lookup_update_check_timestamp_of_change_cmp_range_inv, e lookup_contract_instance_retrieval_deployment_nullifier_read_inv, e lookup_contract_instance_retrieval_address_derivation_inv, e lookup_contract_instance_retrieval_update_check_inv, e lookup_bc_retrieval_contract_instance_retrieval_inv, e lookup_bc_retrieval_class_id_derivation_inv, e lookup_instr_fetching_pc_abs_diff_positive_inv, e lookup_instr_fetching_instr_abs_diff_positive_inv, e lookup_instr_fetching_tag_value_validation_inv, e lookup_instr_fetching_bytecode_size_from_bc_dec_inv, e lookup_instr_fetching_bytes_from_bc_dec_inv, e lookup_instr_fetching_wire_instruction_info_inv, e lookup_class_id_derivation_class_id_poseidon2_0_inv, e lookup_class_id_derivation_class_id_poseidon2_1_inv, e lookup_get_env_var_precomputed_info_inv, e lookup_get_env_var_read_from_public_inputs_col0_inv, e lookup_get_env_var_read_from_public_inputs_col1_inv, e lookup_get_contract_instance_precomputed_info_inv, e lookup_get_contract_instance_contract_instance_retrieval_inv, e lookup_get_contract_instance_mem_write_contract_instance_exists_inv, e lookup_get_contract_instance_mem_write_contract_instance_member_inv, e lookup_internal_call_push_call_stack_inv, e lookup_internal_call_unwind_call_stack_inv, e lookup_external_call_call_allocated_left_l2_range_inv, e lookup_external_call_call_allocated_left_da_range_inv, e lookup_sload_storage_read_inv, e lookup_sstore_record_written_storage_slot_inv, e lookup_sstore_storage_write_inv, e lookup_note_hash_tree_check_silo_poseidon2_inv, e lookup_note_hash_tree_check_read_first_nullifier_inv, e lookup_note_hash_tree_check_nonce_computation_poseidon2_inv, e lookup_note_hash_tree_check_unique_note_hash_poseidon2_inv, e lookup_note_hash_tree_check_merkle_check_inv, e lookup_note_hash_tree_check_write_note_hash_to_public_inputs_inv, e lookup_notehash_exists_note_hash_index_range_inv, e lookup_notehash_exists_note_hash_read_inv, e lookup_execution_bytecode_retrieval_result_inv, e lookup_execution_instruction_fetching_result_inv, e lookup_execution_instruction_fetching_body_inv, e lookup_execution_exec_spec_read_inv, e lookup_execution_dyn_l2_factor_bitwise_inv, e lookup_execution_check_written_storage_slot_inv, e lookup_tx_read_phase_table_inv, e lookup_tx_phase_jump_on_revert_inv, e lookup_tx_read_phase_length_inv, e lookup_tx_read_public_call_request_phase_inv, e lookup_tx_read_tree_insert_value_inv, e lookup_tx_note_hash_append_inv, e lookup_tx_nullifier_append_inv, e lookup_tx_read_l2_l1_msg_inv, e lookup_tx_write_l2_l1_msg_inv, e lookup_tx_read_effective_fee_public_inputs_inv, e lookup_tx_read_fee_payer_public_inputs_inv, e lookup_tx_balance_slot_poseidon2_inv, e lookup_tx_balance_validation_inv #define AVM2_SHIFTED_ENTITIES_E(e) e bc_decomposition_bytes_shift, e bc_decomposition_bytes_pc_plus_1_shift, e bc_decomposition_bytes_pc_plus_10_shift, e bc_decomposition_bytes_pc_plus_11_shift, e bc_decomposition_bytes_pc_plus_12_shift, e bc_decomposition_bytes_pc_plus_13_shift, e bc_decomposition_bytes_pc_plus_14_shift, e bc_decomposition_bytes_pc_plus_15_shift, e bc_decomposition_bytes_pc_plus_16_shift, e bc_decomposition_bytes_pc_plus_17_shift, e bc_decomposition_bytes_pc_plus_18_shift, e bc_decomposition_bytes_pc_plus_19_shift, e bc_decomposition_bytes_pc_plus_2_shift, e bc_decomposition_bytes_pc_plus_20_shift, e bc_decomposition_bytes_pc_plus_21_shift, e bc_decomposition_bytes_pc_plus_22_shift, e bc_decomposition_bytes_pc_plus_23_shift, e bc_decomposition_bytes_pc_plus_24_shift, e bc_decomposition_bytes_pc_plus_25_shift, e bc_decomposition_bytes_pc_plus_26_shift, e bc_decomposition_bytes_pc_plus_27_shift, e bc_decomposition_bytes_pc_plus_28_shift, e bc_decomposition_bytes_pc_plus_29_shift, e bc_decomposition_bytes_pc_plus_3_shift, e bc_decomposition_bytes_pc_plus_30_shift, e bc_decomposition_bytes_pc_plus_31_shift, e bc_decomposition_bytes_pc_plus_32_shift, e bc_decomposition_bytes_pc_plus_33_shift, e bc_decomposition_bytes_pc_plus_34_shift, e bc_decomposition_bytes_pc_plus_35_shift, e bc_decomposition_bytes_pc_plus_4_shift, e bc_decomposition_bytes_pc_plus_5_shift, e bc_decomposition_bytes_pc_plus_6_shift, e bc_decomposition_bytes_pc_plus_7_shift, e bc_decomposition_bytes_pc_plus_8_shift, e bc_decomposition_bytes_pc_plus_9_shift, e bc_decomposition_bytes_remaining_shift, e bc_decomposition_id_shift, e bc_decomposition_pc_shift, e bc_decomposition_sel_shift, e bc_hashing_bytecode_id_shift, e bc_hashing_incremental_hash_shift, e bc_hashing_pc_index_shift, e bc_hashing_sel_shift, e bc_hashing_start_shift, e bc_retrieval_bytecode_id_shift, e bc_retrieval_sel_shift, e bitwise_acc_ia_shift, e bitwise_acc_ib_shift, e bitwise_acc_ic_shift, e bitwise_ctr_shift, e bitwise_op_id_shift, e calldata_context_id_shift, e calldata_index_shift, e calldata_sel_shift, e cd_hashing_sel_shift, e data_copy_copy_size_shift, e data_copy_dst_addr_shift, e data_copy_read_addr_shift, e data_copy_reads_left_shift, e data_copy_sel_cd_copy_shift, e data_copy_sel_rd_copy_shift, e data_copy_sel_start_shift, e execution_context_id_shift, e execution_contract_address_shift, e execution_da_gas_limit_shift, e execution_discard_shift, e execution_dying_context_id_shift, e execution_enqueued_call_start_shift, e execution_internal_call_id_shift, e execution_internal_call_return_id_shift, e execution_is_static_shift, e execution_l2_gas_limit_shift, e execution_last_child_returndata_addr_shift, e execution_last_child_returndata_size_shift, e execution_msg_sender_shift, e execution_next_context_id_shift, e execution_next_internal_call_id_shift, e execution_parent_calldata_addr_shift, e execution_parent_calldata_size_shift, e execution_parent_da_gas_limit_shift, e execution_parent_da_gas_used_shift, e execution_parent_id_shift, e execution_parent_l2_gas_limit_shift, e execution_parent_l2_gas_used_shift, e execution_pc_shift, e execution_prev_da_gas_used_shift, e execution_prev_l2_gas_used_shift, e execution_sel_shift, e execution_transaction_fee_shift, e ff_gt_a_hi_shift, e ff_gt_a_lo_shift, e ff_gt_b_hi_shift, e ff_gt_b_lo_shift, e ff_gt_cmp_rng_ctr_shift, e ff_gt_p_sub_a_hi_shift, e ff_gt_p_sub_a_lo_shift, e ff_gt_p_sub_b_hi_shift, e ff_gt_p_sub_b_lo_shift, e ff_gt_sel_shift, e ff_gt_sel_gt_shift, e keccak_memory_addr_shift, e keccak_memory_clk_shift, e keccak_memory_ctr_shift, e keccak_memory_rw_shift, e keccak_memory_space_id_shift, e keccak_memory_tag_error_shift, e keccak_memory_val00_shift, e keccak_memory_val01_shift, e keccak_memory_val02_shift, e keccak_memory_val03_shift, e keccak_memory_val04_shift, e keccak_memory_val10_shift, e keccak_memory_val11_shift, e keccak_memory_val12_shift, e keccak_memory_val13_shift, e keccak_memory_val14_shift, e keccak_memory_val20_shift, e keccak_memory_val21_shift, e keccak_memory_val22_shift, e keccak_memory_val23_shift, e keccak_memory_val24_shift, e keccak_memory_val30_shift, e keccak_memory_val31_shift, e keccak_memory_val32_shift, e keccak_memory_val33_shift, e keccak_memory_val34_shift, e keccak_memory_val40_shift, e keccak_memory_val41_shift, e keccak_memory_val42_shift, e keccak_memory_val43_shift, e keccakf1600_clk_shift, e keccakf1600_dst_addr_shift, e keccakf1600_round_shift, e keccakf1600_sel_no_error_shift, e keccakf1600_space_id_shift, e keccakf1600_state_in_00_shift, e keccakf1600_state_in_01_shift, e keccakf1600_state_in_02_shift, e keccakf1600_state_in_03_shift, e keccakf1600_state_in_04_shift, e keccakf1600_state_in_10_shift, e keccakf1600_state_in_11_shift, e keccakf1600_state_in_12_shift, e keccakf1600_state_in_13_shift, e keccakf1600_state_in_14_shift, e keccakf1600_state_in_20_shift, e keccakf1600_state_in_21_shift, e keccakf1600_state_in_22_shift, e keccakf1600_state_in_23_shift, e keccakf1600_state_in_24_shift, e keccakf1600_state_in_30_shift, e keccakf1600_state_in_31_shift, e keccakf1600_state_in_32_shift, e keccakf1600_state_in_33_shift, e keccakf1600_state_in_34_shift, e keccakf1600_state_in_40_shift, e keccakf1600_state_in_41_shift, e keccakf1600_state_in_42_shift, e keccakf1600_state_in_43_shift, e keccakf1600_state_in_44_shift, e merkle_check_index_shift, e merkle_check_path_len_shift, e merkle_check_read_node_shift, e merkle_check_read_root_shift, e merkle_check_sel_shift, e merkle_check_start_shift, e merkle_check_write_shift, e merkle_check_write_node_shift, e merkle_check_write_root_shift, e poseidon2_hash_a_0_shift, e poseidon2_hash_a_1_shift, e poseidon2_hash_a_2_shift, e poseidon2_hash_a_3_shift, e poseidon2_hash_input_0_shift, e poseidon2_hash_input_1_shift, e poseidon2_hash_input_2_shift, e poseidon2_hash_num_perm_rounds_rem_shift, e poseidon2_hash_output_shift, e poseidon2_hash_sel_shift, e poseidon2_hash_start_shift, e public_data_check_clk_shift, e public_data_check_sel_shift, e public_data_check_write_idx_shift, e public_data_squash_clk_shift, e public_data_squash_leaf_slot_shift, e public_data_squash_sel_shift, e scalar_mul_bit_idx_shift, e scalar_mul_point_inf_shift, e scalar_mul_point_x_shift, e scalar_mul_point_y_shift, e scalar_mul_res_inf_shift, e scalar_mul_res_x_shift, e scalar_mul_res_y_shift, e scalar_mul_scalar_shift, e scalar_mul_sel_shift, e scalar_mul_start_shift, e scalar_mul_temp_inf_shift, e scalar_mul_temp_x_shift, e scalar_mul_temp_y_shift, e sha256_a_shift, e sha256_b_shift, e sha256_c_shift, e sha256_d_shift, e sha256_e_shift, e sha256_f_shift, e sha256_g_shift, e sha256_h_shift, e sha256_helper_w0_shift, e sha256_helper_w1_shift, e sha256_helper_w10_shift, e sha256_helper_w11_shift, e sha256_helper_w12_shift, e sha256_helper_w13_shift, e sha256_helper_w14_shift, e sha256_helper_w15_shift, e sha256_helper_w2_shift, e sha256_helper_w3_shift, e sha256_helper_w4_shift, e sha256_helper_w5_shift, e sha256_helper_w6_shift, e sha256_helper_w7_shift, e sha256_helper_w8_shift, e sha256_helper_w9_shift, e sha256_rounds_remaining_shift, e sha256_sel_shift, e sha256_start_shift, e to_radix_acc_shift, e to_radix_acc_under_p_shift, e to_radix_exponent_shift, e to_radix_limb_shift, e to_radix_limb_eq_p_shift, e to_radix_limb_index_shift, e to_radix_limb_lt_p_shift, e to_radix_not_padding_limb_shift, e to_radix_radix_shift, e to_radix_safe_limbs_shift, e to_radix_sel_shift, e to_radix_start_shift, e to_radix_value_shift, e tx_fee_shift, e tx_phase_value_shift, e tx_prev_da_gas_used_shift, e tx_prev_l2_gas_used_shift, e tx_read_pi_offset_shift, e tx_remaining_phase_counter_shift, e tx_sel_shift, e tx_start_phase_shift #define AVM2_TO_BE_SHIFTED_E(e) e bc_decomposition_bytes, e bc_decomposition_bytes_pc_plus_1, e bc_decomposition_bytes_pc_plus_10, e bc_decomposition_bytes_pc_plus_11, e bc_decomposition_bytes_pc_plus_12, e bc_decomposition_bytes_pc_plus_13, e bc_decomposition_bytes_pc_plus_14, e bc_decomposition_bytes_pc_plus_15, e bc_decomposition_bytes_pc_plus_16, e bc_decomposition_bytes_pc_plus_17, e bc_decomposition_bytes_pc_plus_18, e bc_decomposition_bytes_pc_plus_19, e bc_decomposition_bytes_pc_plus_2, e bc_decomposition_bytes_pc_plus_20, e bc_decomposition_bytes_pc_plus_21, e bc_decomposition_bytes_pc_plus_22, e bc_decomposition_bytes_pc_plus_23, e bc_decomposition_bytes_pc_plus_24, e bc_decomposition_bytes_pc_plus_25, e bc_decomposition_bytes_pc_plus_26, e bc_decomposition_bytes_pc_plus_27, e bc_decomposition_bytes_pc_plus_28, e bc_decomposition_bytes_pc_plus_29, e bc_decomposition_bytes_pc_plus_3, e bc_decomposition_bytes_pc_plus_30, e bc_decomposition_bytes_pc_plus_31, e bc_decomposition_bytes_pc_plus_32, e bc_decomposition_bytes_pc_plus_33, e bc_decomposition_bytes_pc_plus_34, e bc_decomposition_bytes_pc_plus_35, e bc_decomposition_bytes_pc_plus_4, e bc_decomposition_bytes_pc_plus_5, e bc_decomposition_bytes_pc_plus_6, e bc_decomposition_bytes_pc_plus_7, e bc_decomposition_bytes_pc_plus_8, e bc_decomposition_bytes_pc_plus_9, e bc_decomposition_bytes_remaining, e bc_decomposition_id, e bc_decomposition_pc, e bc_decomposition_sel, e bc_hashing_bytecode_id, e bc_hashing_incremental_hash, e bc_hashing_pc_index, e bc_hashing_sel, e bc_hashing_start, e bc_retrieval_bytecode_id, e bc_retrieval_sel, e bitwise_acc_ia, e bitwise_acc_ib, e bitwise_acc_ic, e bitwise_ctr, e bitwise_op_id, e calldata_context_id, e calldata_index, e calldata_sel, e cd_hashing_sel, e data_copy_copy_size, e data_copy_dst_addr, e data_copy_read_addr, e data_copy_reads_left, e data_copy_sel_cd_copy, e data_copy_sel_rd_copy, e data_copy_sel_start, e execution_context_id, e execution_contract_address, e execution_da_gas_limit, e execution_discard, e execution_dying_context_id, e execution_enqueued_call_start, e execution_internal_call_id, e execution_internal_call_return_id, e execution_is_static, e execution_l2_gas_limit, e execution_last_child_returndata_addr, e execution_last_child_returndata_size, e execution_msg_sender, e execution_next_context_id, e execution_next_internal_call_id, e execution_parent_calldata_addr, e execution_parent_calldata_size, e execution_parent_da_gas_limit, e execution_parent_da_gas_used, e execution_parent_id, e execution_parent_l2_gas_limit, e execution_parent_l2_gas_used, e execution_pc, e execution_prev_da_gas_used, e execution_prev_l2_gas_used, e execution_sel, e execution_transaction_fee, e ff_gt_a_hi, e ff_gt_a_lo, e ff_gt_b_hi, e ff_gt_b_lo, e ff_gt_cmp_rng_ctr, e ff_gt_p_sub_a_hi, e ff_gt_p_sub_a_lo, e ff_gt_p_sub_b_hi, e ff_gt_p_sub_b_lo, e ff_gt_sel, e ff_gt_sel_gt, e keccak_memory_addr, e keccak_memory_clk, e keccak_memory_ctr, e keccak_memory_rw, e keccak_memory_space_id, e keccak_memory_tag_error, e keccak_memory_val00, e keccak_memory_val01, e keccak_memory_val02, e keccak_memory_val03, e keccak_memory_val04, e keccak_memory_val10, e keccak_memory_val11, e keccak_memory_val12, e keccak_memory_val13, e keccak_memory_val14, e keccak_memory_val20, e keccak_memory_val21, e keccak_memory_val22, e keccak_memory_val23, e keccak_memory_val24, e keccak_memory_val30, e keccak_memory_val31, e keccak_memory_val32, e keccak_memory_val33, e keccak_memory_val34, e keccak_memory_val40, e keccak_memory_val41, e keccak_memory_val42, e keccak_memory_val43, e keccakf1600_clk, e keccakf1600_dst_addr, e keccakf1600_round, e keccakf1600_sel_no_error, e keccakf1600_space_id, e keccakf1600_state_in_00, e keccakf1600_state_in_01, e keccakf1600_state_in_02, e keccakf1600_state_in_03, e keccakf1600_state_in_04, e keccakf1600_state_in_10, e keccakf1600_state_in_11, e keccakf1600_state_in_12, e keccakf1600_state_in_13, e keccakf1600_state_in_14, e keccakf1600_state_in_20, e keccakf1600_state_in_21, e keccakf1600_state_in_22, e keccakf1600_state_in_23, e keccakf1600_state_in_24, e keccakf1600_state_in_30, e keccakf1600_state_in_31, e keccakf1600_state_in_32, e keccakf1600_state_in_33, e keccakf1600_state_in_34, e keccakf1600_state_in_40, e keccakf1600_state_in_41, e keccakf1600_state_in_42, e keccakf1600_state_in_43, e keccakf1600_state_in_44, e merkle_check_index, e merkle_check_path_len, e merkle_check_read_node, e merkle_check_read_root, e merkle_check_sel, e merkle_check_start, e merkle_check_write, e merkle_check_write_node, e merkle_check_write_root, e poseidon2_hash_a_0, e poseidon2_hash_a_1, e poseidon2_hash_a_2, e poseidon2_hash_a_3, e poseidon2_hash_input_0, e poseidon2_hash_input_1, e poseidon2_hash_input_2, e poseidon2_hash_num_perm_rounds_rem, e poseidon2_hash_output, e poseidon2_hash_sel, e poseidon2_hash_start, e public_data_check_clk, e public_data_check_sel, e public_data_check_write_idx, e public_data_squash_clk, e public_data_squash_leaf_slot, e public_data_squash_sel, e scalar_mul_bit_idx, e scalar_mul_point_inf, e scalar_mul_point_x, e scalar_mul_point_y, e scalar_mul_res_inf, e scalar_mul_res_x, e scalar_mul_res_y, e scalar_mul_scalar, e scalar_mul_sel, e scalar_mul_start, e scalar_mul_temp_inf, e scalar_mul_temp_x, e scalar_mul_temp_y, e sha256_a, e sha256_b, e sha256_c, e sha256_d, e sha256_e, e sha256_f, e sha256_g, e sha256_h, e sha256_helper_w0, e sha256_helper_w1, e sha256_helper_w10, e sha256_helper_w11, e sha256_helper_w12, e sha256_helper_w13, e sha256_helper_w14, e sha256_helper_w15, e sha256_helper_w2, e sha256_helper_w3, e sha256_helper_w4, e sha256_helper_w5, e sha256_helper_w6, e sha256_helper_w7, e sha256_helper_w8, e sha256_helper_w9, e sha256_rounds_remaining, e sha256_sel, e sha256_start, e to_radix_acc, e to_radix_acc_under_p, e to_radix_exponent, e to_radix_limb, e to_radix_limb_eq_p, e to_radix_limb_index, e to_radix_limb_lt_p, e to_radix_not_padding_limb, e to_radix_radix, e to_radix_safe_limbs, e to_radix_sel, e to_radix_start, e to_radix_value, e tx_fee, e tx_phase_value, e tx_prev_da_gas_used, e tx_prev_l2_gas_used, e tx_read_pi_offset, e tx_remaining_phase_counter, e tx_sel, e tx_start_phase #define AVM2_ALL_ENTITIES_E(e) AVM2_PRECOMPUTED_ENTITIES_E(e), AVM2_WIRE_ENTITIES_E(e), AVM2_DERIVED_WITNESS_ENTITIES_E(e), AVM2_SHIFTED_ENTITIES_E(e) @@ -37,8 +37,8 @@ enum class ColumnAndShifts { SENTINEL_DO_NOT_USE, }; -constexpr auto NUM_COLUMNS_WITH_SHIFTS = 2742; -constexpr auto NUM_COLUMNS_WITHOUT_SHIFTS = 2494; +constexpr auto NUM_COLUMNS_WITH_SHIFTS = 2751; +constexpr auto NUM_COLUMNS_WITHOUT_SHIFTS = 2503; constexpr auto TO_BE_SHIFTED_COLUMNS_ARRAY = []() { return std::array{ AVM2_TO_BE_SHIFTED_COLUMNS }; }(); constexpr auto SHIFTED_COLUMNS_ARRAY = []() { return std::array{ AVM2_SHIFTED_COLUMNS }; }(); static_assert(TO_BE_SHIFTED_COLUMNS_ARRAY.size() == SHIFTED_COLUMNS_ARRAY.size()); diff --git a/barretenberg/cpp/src/barretenberg/vm2/generated/flavor_variables.hpp b/barretenberg/cpp/src/barretenberg/vm2/generated/flavor_variables.hpp index e93265bae513..fd3e58423883 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/generated/flavor_variables.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/generated/flavor_variables.hpp @@ -33,6 +33,7 @@ #include "relations/memory.hpp" #include "relations/merkle_check.hpp" #include "relations/note_hash_tree_check.hpp" +#include "relations/notehash_exists.hpp" #include "relations/nullifier_check.hpp" #include "relations/poseidon2_hash.hpp" #include "relations/poseidon2_perm.hpp" @@ -75,6 +76,7 @@ #include "relations/lookups_keccakf1600.hpp" #include "relations/lookups_merkle_check.hpp" #include "relations/lookups_note_hash_tree_check.hpp" +#include "relations/lookups_notehash_exists.hpp" #include "relations/lookups_nullifier_check.hpp" #include "relations/lookups_poseidon2_hash.hpp" #include "relations/lookups_public_data_check.hpp" @@ -96,10 +98,10 @@ namespace bb::avm2 { struct AvmFlavorVariables { static constexpr size_t NUM_PRECOMPUTED_ENTITIES = 125; - static constexpr size_t NUM_WITNESS_ENTITIES = 2369; + static constexpr size_t NUM_WITNESS_ENTITIES = 2378; static constexpr size_t NUM_SHIFTED_ENTITIES = 248; static constexpr size_t NUM_WIRES = NUM_WITNESS_ENTITIES + NUM_PRECOMPUTED_ENTITIES; - static constexpr size_t NUM_ALL_ENTITIES = 2742; + static constexpr size_t NUM_ALL_ENTITIES = 2751; // Need to be templated for recursive verifier template @@ -136,6 +138,7 @@ struct AvmFlavorVariables { avm2::memory, avm2::merkle_check, avm2::note_hash_tree_check, + avm2::notehash_exists, avm2::nullifier_check, avm2::poseidon2_hash, avm2::poseidon2_perm, @@ -378,6 +381,8 @@ struct AvmFlavorVariables { lookup_note_hash_tree_check_silo_poseidon2_relation, lookup_note_hash_tree_check_unique_note_hash_poseidon2_relation, lookup_note_hash_tree_check_write_note_hash_to_public_inputs_relation, + lookup_notehash_exists_note_hash_index_range_relation, + lookup_notehash_exists_note_hash_read_relation, lookup_nullifier_check_low_leaf_merkle_check_relation, lookup_nullifier_check_low_leaf_next_nullifier_validation_relation, lookup_nullifier_check_low_leaf_nullifier_validation_relation, diff --git a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/execution.hpp b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/execution.hpp index 0e3bcbfd05af..01f293f563c6 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/execution.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/execution.hpp @@ -13,10 +13,10 @@ template class executionImpl { public: using FF = FF_; - static constexpr std::array SUBRELATION_PARTIAL_LENGTHS = { 3, 3, 3, 3, 4, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, + static constexpr std::array SUBRELATION_PARTIAL_LENGTHS = { 3, 3, 3, 3, 4, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, - 3, 4, 3, 5, 6, 3, 3, 3, 3, 3, 3, 3, 2 }; + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, + 3, 3, 4, 3, 5, 6, 3, 3, 3, 3, 3, 3, 3, 2 }; template inline static bool skip(const AllEntities& in) { @@ -66,6 +66,7 @@ template class executionImpl { const auto constants_AVM_EXEC_OP_ID_DEBUGLOG = FF(8192); const auto constants_AVM_EXEC_OP_ID_SLOAD = FF(16384); const auto constants_AVM_EXEC_OP_ID_SSTORE = FF(32768); + const auto constants_AVM_EXEC_OP_ID_NOTEHASH_EXISTS = FF(65536); const auto execution_NOT_LAST_EXEC = in.get(C::execution_sel) * in.get(C::execution_sel_shift); const auto execution_SEL_SHOULD_RESOLVE_ADDRESS = in.get(C::execution_sel_bytecode_retrieval_success) * in.get(C::execution_sel_instruction_fetching_success); @@ -337,8 +338,15 @@ template class executionImpl { tmp *= scaling_factor; std::get<38>(evals) += typename Accumulator::View(tmp); } - { // EXEC_OP_ID_DECOMPOSITION + { using Accumulator = typename std::tuple_element_t<39, ContainerOverSubrelations>; + auto tmp = in.get(C::execution_sel_execute_notehash_exists) * + (FF(1) - in.get(C::execution_sel_execute_notehash_exists)); + tmp *= scaling_factor; + std::get<39>(evals) += typename Accumulator::View(tmp); + } + { // EXEC_OP_ID_DECOMPOSITION + using Accumulator = typename std::tuple_element_t<40, ContainerOverSubrelations>; auto tmp = ((in.get(C::execution_sel_execute_get_env_var) * constants_AVM_EXEC_OP_ID_GETENVVAR + in.get(C::execution_sel_execute_set) * constants_AVM_EXEC_OP_ID_SET + in.get(C::execution_sel_execute_mov) * constants_AVM_EXEC_OP_ID_MOV + @@ -354,53 +362,54 @@ template class executionImpl { in.get(C::execution_sel_execute_returndata_size) * constants_AVM_EXEC_OP_ID_RETURNDATASIZE + in.get(C::execution_sel_execute_debug_log) * constants_AVM_EXEC_OP_ID_DEBUGLOG + in.get(C::execution_sel_execute_sload) * constants_AVM_EXEC_OP_ID_SLOAD + - in.get(C::execution_sel_execute_sstore) * constants_AVM_EXEC_OP_ID_SSTORE) - + in.get(C::execution_sel_execute_sstore) * constants_AVM_EXEC_OP_ID_SSTORE + + in.get(C::execution_sel_execute_notehash_exists) * constants_AVM_EXEC_OP_ID_NOTEHASH_EXISTS) - in.get(C::execution_sel_should_execute_opcode) * in.get(C::execution_sel_execute_execution) * in.get(C::execution_subtrace_operation_id)); tmp *= scaling_factor; - std::get<39>(evals) += typename Accumulator::View(tmp); - } - { - using Accumulator = typename std::tuple_element_t<40, ContainerOverSubrelations>; - auto tmp = - in.get(C::execution_sel_gas_calldata_copy) * (FF(1) - in.get(C::execution_sel_gas_calldata_copy)); - tmp *= scaling_factor; std::get<40>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<41, ContainerOverSubrelations>; auto tmp = - in.get(C::execution_sel_gas_returndata_copy) * (FF(1) - in.get(C::execution_sel_gas_returndata_copy)); + in.get(C::execution_sel_gas_calldata_copy) * (FF(1) - in.get(C::execution_sel_gas_calldata_copy)); tmp *= scaling_factor; std::get<41>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<42, ContainerOverSubrelations>; - auto tmp = in.get(C::execution_sel_gas_to_radix) * (FF(1) - in.get(C::execution_sel_gas_to_radix)); + auto tmp = + in.get(C::execution_sel_gas_returndata_copy) * (FF(1) - in.get(C::execution_sel_gas_returndata_copy)); tmp *= scaling_factor; std::get<42>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<43, ContainerOverSubrelations>; - auto tmp = in.get(C::execution_sel_gas_bitwise) * (FF(1) - in.get(C::execution_sel_gas_bitwise)); + auto tmp = in.get(C::execution_sel_gas_to_radix) * (FF(1) - in.get(C::execution_sel_gas_to_radix)); tmp *= scaling_factor; std::get<43>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<44, ContainerOverSubrelations>; - auto tmp = in.get(C::execution_sel_gas_emit_unencrypted_log) * - (FF(1) - in.get(C::execution_sel_gas_emit_unencrypted_log)); + auto tmp = in.get(C::execution_sel_gas_bitwise) * (FF(1) - in.get(C::execution_sel_gas_bitwise)); tmp *= scaling_factor; std::get<44>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<45, ContainerOverSubrelations>; - auto tmp = in.get(C::execution_sel_gas_sstore) * (FF(1) - in.get(C::execution_sel_gas_sstore)); + auto tmp = in.get(C::execution_sel_gas_emit_unencrypted_log) * + (FF(1) - in.get(C::execution_sel_gas_emit_unencrypted_log)); tmp *= scaling_factor; std::get<45>(evals) += typename Accumulator::View(tmp); } - { // DYN_GAS_ID_DECOMPOSITION + { using Accumulator = typename std::tuple_element_t<46, ContainerOverSubrelations>; + auto tmp = in.get(C::execution_sel_gas_sstore) * (FF(1) - in.get(C::execution_sel_gas_sstore)); + tmp *= scaling_factor; + std::get<46>(evals) += typename Accumulator::View(tmp); + } + { // DYN_GAS_ID_DECOMPOSITION + using Accumulator = typename std::tuple_element_t<47, ContainerOverSubrelations>; auto tmp = ((in.get(C::execution_sel_gas_calldata_copy) * constants_AVM_DYN_GAS_ID_CALLDATACOPY + in.get(C::execution_sel_gas_returndata_copy) * constants_AVM_DYN_GAS_ID_RETURNDATACOPY + @@ -411,91 +420,91 @@ template class executionImpl { in.get(C::execution_sel_should_check_gas) * in.get(C::execution_sel) * in.get(C::execution_dyn_gas_id)); tmp *= scaling_factor; - std::get<46>(evals) += typename Accumulator::View(tmp); + std::get<47>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<47, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<48, ContainerOverSubrelations>; auto tmp = in.get(C::execution_sel_opcode_failure) * (FF(1) - in.get(C::execution_sel_opcode_failure)); tmp *= scaling_factor; - std::get<47>(evals) += typename Accumulator::View(tmp); + std::get<48>(evals) += typename Accumulator::View(tmp); } { // PC_NEXT_ROW_INT_CALL_JUMP - using Accumulator = typename std::tuple_element_t<48, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<49, ContainerOverSubrelations>; auto tmp = execution_NOT_LAST_EXEC * (in.get(C::execution_sel_execute_internal_call) + in.get(C::execution_sel_execute_jump)) * (in.get(C::execution_pc_shift) - in.get(C::execution_rop_0_)); tmp *= scaling_factor; - std::get<48>(evals) += typename Accumulator::View(tmp); + std::get<49>(evals) += typename Accumulator::View(tmp); } { // PC_NEXT_ROW_JUMPI - using Accumulator = typename std::tuple_element_t<49, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<50, ContainerOverSubrelations>; auto tmp = execution_NOT_LAST_EXEC * in.get(C::execution_sel_execute_jumpi) * ((in.get(C::execution_register_0_) * (in.get(C::execution_rop_1_) - in.get(C::execution_next_pc)) + in.get(C::execution_next_pc)) - in.get(C::execution_pc_shift)); tmp *= scaling_factor; - std::get<49>(evals) += typename Accumulator::View(tmp); + std::get<50>(evals) += typename Accumulator::View(tmp); } { // MOV_SAME_VALUE - using Accumulator = typename std::tuple_element_t<50, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<51, ContainerOverSubrelations>; auto tmp = in.get(C::execution_sel_execute_mov) * (in.get(C::execution_register_0_) - in.get(C::execution_register_1_)); tmp *= scaling_factor; - std::get<50>(evals) += typename Accumulator::View(tmp); + std::get<51>(evals) += typename Accumulator::View(tmp); } { // MOV_SAME_TAG - using Accumulator = typename std::tuple_element_t<51, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<52, ContainerOverSubrelations>; auto tmp = in.get(C::execution_sel_execute_mov) * (in.get(C::execution_mem_tag_reg_0_) - in.get(C::execution_mem_tag_reg_1_)); tmp *= scaling_factor; - std::get<51>(evals) += typename Accumulator::View(tmp); + std::get<52>(evals) += typename Accumulator::View(tmp); } { // SUCCESS_COPY_WRITE_REG - using Accumulator = typename std::tuple_element_t<52, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<53, ContainerOverSubrelations>; auto tmp = in.get(C::execution_sel_execute_success_copy) * (in.get(C::execution_register_0_) - in.get(C::execution_last_child_success)); tmp *= scaling_factor; - std::get<52>(evals) += typename Accumulator::View(tmp); + std::get<53>(evals) += typename Accumulator::View(tmp); } { // SUCCESS_COPY_U1_TAG - using Accumulator = typename std::tuple_element_t<53, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<54, ContainerOverSubrelations>; auto tmp = in.get(C::execution_sel_execute_success_copy) * (in.get(C::execution_mem_tag_reg_0_) - constants_MEM_TAG_U1); tmp *= scaling_factor; - std::get<53>(evals) += typename Accumulator::View(tmp); + std::get<54>(evals) += typename Accumulator::View(tmp); } { // RETURNDATA_SIZE_WRITE_REG - using Accumulator = typename std::tuple_element_t<54, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<55, ContainerOverSubrelations>; auto tmp = in.get(C::execution_sel_execute_returndata_size) * (in.get(C::execution_register_0_) - in.get(C::execution_last_child_returndata_size)); tmp *= scaling_factor; - std::get<54>(evals) += typename Accumulator::View(tmp); + std::get<55>(evals) += typename Accumulator::View(tmp); } { // RETURNDATA_SIZE_U32_TAG - using Accumulator = typename std::tuple_element_t<55, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<56, ContainerOverSubrelations>; auto tmp = in.get(C::execution_sel_execute_returndata_size) * (in.get(C::execution_mem_tag_reg_0_) - constants_MEM_TAG_U32); tmp *= scaling_factor; - std::get<55>(evals) += typename Accumulator::View(tmp); + std::get<56>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<56, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<57, ContainerOverSubrelations>; auto tmp = (in.get(C::execution_sel_should_write_registers) - in.get(C::execution_sel_should_execute_opcode) * (FF(1) - in.get(C::execution_sel_opcode_error))); tmp *= scaling_factor; - std::get<56>(evals) += typename Accumulator::View(tmp); + std::get<57>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<57, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<58, ContainerOverSubrelations>; auto tmp = (in.get(C::execution_sel_error) - (in.get(C::execution_sel_bytecode_retrieval_failure) + in.get(C::execution_sel_instruction_fetching_failure) + in.get(C::execution_sel_addressing_error) + in.get(C::execution_sel_register_read_error) + in.get(C::execution_sel_out_of_gas) + in.get(C::execution_sel_opcode_error))); tmp *= scaling_factor; - std::get<57>(evals) += typename Accumulator::View(tmp); + std::get<58>(evals) += typename Accumulator::View(tmp); } } }; @@ -519,25 +528,25 @@ template class execution : public Relation> { return "SSTORE_DYN_L2_GAS_IS_ZERO"; case 22: return "SUBTRACE_ID_DECOMPOSITION"; - case 39: + case 40: return "EXEC_OP_ID_DECOMPOSITION"; - case 46: + case 47: return "DYN_GAS_ID_DECOMPOSITION"; - case 48: - return "PC_NEXT_ROW_INT_CALL_JUMP"; case 49: - return "PC_NEXT_ROW_JUMPI"; + return "PC_NEXT_ROW_INT_CALL_JUMP"; case 50: - return "MOV_SAME_VALUE"; + return "PC_NEXT_ROW_JUMPI"; case 51: - return "MOV_SAME_TAG"; + return "MOV_SAME_VALUE"; case 52: - return "SUCCESS_COPY_WRITE_REG"; + return "MOV_SAME_TAG"; case 53: - return "SUCCESS_COPY_U1_TAG"; + return "SUCCESS_COPY_WRITE_REG"; case 54: - return "RETURNDATA_SIZE_WRITE_REG"; + return "SUCCESS_COPY_U1_TAG"; case 55: + return "RETURNDATA_SIZE_WRITE_REG"; + case 56: return "RETURNDATA_SIZE_U32_TAG"; } return std::to_string(index); @@ -550,16 +559,16 @@ template class execution : public Relation> { static constexpr size_t SR_LAST_IS_LAST = 5; static constexpr size_t SR_SSTORE_DYN_L2_GAS_IS_ZERO = 10; static constexpr size_t SR_SUBTRACE_ID_DECOMPOSITION = 22; - static constexpr size_t SR_EXEC_OP_ID_DECOMPOSITION = 39; - static constexpr size_t SR_DYN_GAS_ID_DECOMPOSITION = 46; - static constexpr size_t SR_PC_NEXT_ROW_INT_CALL_JUMP = 48; - static constexpr size_t SR_PC_NEXT_ROW_JUMPI = 49; - static constexpr size_t SR_MOV_SAME_VALUE = 50; - static constexpr size_t SR_MOV_SAME_TAG = 51; - static constexpr size_t SR_SUCCESS_COPY_WRITE_REG = 52; - static constexpr size_t SR_SUCCESS_COPY_U1_TAG = 53; - static constexpr size_t SR_RETURNDATA_SIZE_WRITE_REG = 54; - static constexpr size_t SR_RETURNDATA_SIZE_U32_TAG = 55; + static constexpr size_t SR_EXEC_OP_ID_DECOMPOSITION = 40; + static constexpr size_t SR_DYN_GAS_ID_DECOMPOSITION = 47; + static constexpr size_t SR_PC_NEXT_ROW_INT_CALL_JUMP = 49; + static constexpr size_t SR_PC_NEXT_ROW_JUMPI = 50; + static constexpr size_t SR_MOV_SAME_VALUE = 51; + static constexpr size_t SR_MOV_SAME_TAG = 52; + static constexpr size_t SR_SUCCESS_COPY_WRITE_REG = 53; + static constexpr size_t SR_SUCCESS_COPY_U1_TAG = 54; + static constexpr size_t SR_RETURNDATA_SIZE_WRITE_REG = 55; + static constexpr size_t SR_RETURNDATA_SIZE_U32_TAG = 56; }; } // namespace bb::avm2 diff --git a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_notehash_exists.hpp b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_notehash_exists.hpp new file mode 100644 index 000000000000..58b3d296a73c --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_notehash_exists.hpp @@ -0,0 +1,69 @@ +// AUTOGENERATED FILE +#pragma once + +#include +#include +#include + +#include "../columns.hpp" +#include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" +#include "barretenberg/vm2/constraining/relations/interactions_base.hpp" + +namespace bb::avm2 { + +/////////////////// lookup_notehash_exists_note_hash_index_range /////////////////// + +struct lookup_notehash_exists_note_hash_index_range_settings_ { + static constexpr std::string_view NAME = "LOOKUP_NOTEHASH_EXISTS_NOTE_HASH_INDEX_RANGE"; + static constexpr std::string_view RELATION_NAME = "notehash_exists"; + static constexpr size_t LOOKUP_TUPLE_SIZE = 2; + static constexpr Column SRC_SELECTOR = Column::execution_sel_execute_notehash_exists; + static constexpr Column DST_SELECTOR = Column::range_check_sel; + static constexpr Column COUNTS = Column::lookup_notehash_exists_note_hash_index_range_counts; + static constexpr Column INVERSES = Column::lookup_notehash_exists_note_hash_index_range_inv; + static constexpr std::array SRC_COLUMNS = { + ColumnAndShifts::execution_note_hash_leaf_index_leaf_count_cmp_diff, ColumnAndShifts::execution_constant_64 + }; + static constexpr std::array DST_COLUMNS = { + ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits + }; +}; + +using lookup_notehash_exists_note_hash_index_range_settings = + lookup_settings; +template +using lookup_notehash_exists_note_hash_index_range_relation = + lookup_relation_base; + +/////////////////// lookup_notehash_exists_note_hash_read /////////////////// + +struct lookup_notehash_exists_note_hash_read_settings_ { + static constexpr std::string_view NAME = "LOOKUP_NOTEHASH_EXISTS_NOTE_HASH_READ"; + static constexpr std::string_view RELATION_NAME = "notehash_exists"; + static constexpr size_t LOOKUP_TUPLE_SIZE = 5; + static constexpr Column SRC_SELECTOR = Column::execution_note_hash_leaf_in_range; + static constexpr Column DST_SELECTOR = Column::note_hash_tree_check_sel; + static constexpr Column COUNTS = Column::lookup_notehash_exists_note_hash_read_counts; + static constexpr Column INVERSES = Column::lookup_notehash_exists_note_hash_read_inv; + static constexpr std::array SRC_COLUMNS = { + ColumnAndShifts::precomputed_zero, + ColumnAndShifts::execution_register_0_, + ColumnAndShifts::execution_register_1_, + ColumnAndShifts::execution_prev_note_hash_tree_root, + ColumnAndShifts::execution_register_2_ + }; + static constexpr std::array DST_COLUMNS = { + ColumnAndShifts::note_hash_tree_check_write, + ColumnAndShifts::note_hash_tree_check_note_hash, + ColumnAndShifts::note_hash_tree_check_leaf_index, + ColumnAndShifts::note_hash_tree_check_prev_root, + ColumnAndShifts::note_hash_tree_check_exists + }; +}; + +using lookup_notehash_exists_note_hash_read_settings = lookup_settings; +template +using lookup_notehash_exists_note_hash_read_relation = + lookup_relation_base; + +} // namespace bb::avm2 diff --git a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/note_hash_tree_check.hpp b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/note_hash_tree_check.hpp index 294d07803c11..b6bb0041f2c8 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/note_hash_tree_check.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/note_hash_tree_check.hpp @@ -14,7 +14,7 @@ template class note_hash_tree_checkImpl { using FF = FF_; static constexpr std::array SUBRELATION_PARTIAL_LENGTHS = { 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, - 4, 3, 3, 3, 3, 3, 3, 3, 3 }; + 4, 3, 3, 3, 5, 3, 3, 3, 3 }; template inline static bool skip(const AllEntities& in) { @@ -38,6 +38,8 @@ template class note_hash_tree_checkImpl { const auto constants_GENERATOR_INDEX__UNIQUE_NOTE_HASH = FF(3); const auto constants_GENERATOR_INDEX__SILOED_NOTE_HASH = FF(4); const auto note_hash_tree_check_READ = (FF(1) - in.get(C::note_hash_tree_check_write)); + const auto note_hash_tree_check_PREV_LEAF_VALUE_UNIQUE_NOTE_HASH_DIFF = + (in.get(C::note_hash_tree_check_prev_leaf_value) - in.get(C::note_hash_tree_check_unique_note_hash)); { using Accumulator = typename std::tuple_element_t<0, ContainerOverSubrelations>; @@ -137,9 +139,13 @@ template class note_hash_tree_checkImpl { } { using Accumulator = typename std::tuple_element_t<14, ContainerOverSubrelations>; - auto tmp = - (in.get(C::note_hash_tree_check_prev_leaf_value) - - (FF(1) - in.get(C::note_hash_tree_check_write)) * in.get(C::note_hash_tree_check_unique_note_hash)); + auto tmp = in.get(C::note_hash_tree_check_sel) * + ((note_hash_tree_check_PREV_LEAF_VALUE_UNIQUE_NOTE_HASH_DIFF * + (in.get(C::note_hash_tree_check_exists) * + (FF(1) - in.get(C::note_hash_tree_check_prev_leaf_value_unique_note_hash_diff_inv)) + + in.get(C::note_hash_tree_check_prev_leaf_value_unique_note_hash_diff_inv)) - + FF(1)) + + in.get(C::note_hash_tree_check_exists)); tmp *= scaling_factor; std::get<14>(evals) += typename Accumulator::View(tmp); } diff --git a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/notehash_exists.hpp b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/notehash_exists.hpp new file mode 100644 index 000000000000..72c60ae7224a --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/notehash_exists.hpp @@ -0,0 +1,104 @@ +// AUTOGENERATED FILE +#pragma once + +#include + +#include "barretenberg/relations/relation_parameters.hpp" +#include "barretenberg/relations/relation_types.hpp" +#include "barretenberg/vm2/generated/columns.hpp" + +namespace bb::avm2 { + +template class notehash_existsImpl { + public: + using FF = FF_; + + static constexpr std::array SUBRELATION_PARTIAL_LENGTHS = { 3, 4, 4, 3, 3 }; + + template inline static bool skip(const AllEntities& in) + { + using C = ColumnAndShifts; + + return (in.get(C::execution_sel_execute_notehash_exists)).is_zero(); + } + + template + void static accumulate(ContainerOverSubrelations& evals, + const AllEntities& in, + [[maybe_unused]] const RelationParameters&, + [[maybe_unused]] const FF& scaling_factor) + { + using C = ColumnAndShifts; + + const auto constants_NOTE_HASH_TREE_LEAF_COUNT = FF(1099511627776UL); + const auto constants_MEM_TAG_U1 = FF(1); + const auto execution_LEAF_INDEX_GTE_NOTE_HASH_LEAF_COUNT = + (in.get(C::execution_register_1_) - constants_NOTE_HASH_TREE_LEAF_COUNT); + const auto execution_LEAF_INDEX_LT_NOTE_HASH_LEAF_COUNT = + ((constants_NOTE_HASH_TREE_LEAF_COUNT - in.get(C::execution_register_1_)) - FF(1)); + + { + using Accumulator = typename std::tuple_element_t<0, ContainerOverSubrelations>; + auto tmp = + in.get(C::execution_note_hash_leaf_in_range) * (FF(1) - in.get(C::execution_note_hash_leaf_in_range)); + tmp *= scaling_factor; + std::get<0>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<1, ContainerOverSubrelations>; + auto tmp = + in.get(C::execution_sel_execute_notehash_exists) * + (((execution_LEAF_INDEX_LT_NOTE_HASH_LEAF_COUNT - execution_LEAF_INDEX_GTE_NOTE_HASH_LEAF_COUNT) * + in.get(C::execution_note_hash_leaf_in_range) + + execution_LEAF_INDEX_GTE_NOTE_HASH_LEAF_COUNT) - + in.get(C::execution_note_hash_leaf_index_leaf_count_cmp_diff)); + tmp *= scaling_factor; + std::get<1>(evals) += typename Accumulator::View(tmp); + } + { // NOTE_HASH_EXISTS_OUT_OF_RANGE_FALSE + using Accumulator = typename std::tuple_element_t<2, ContainerOverSubrelations>; + auto tmp = in.get(C::execution_sel_execute_notehash_exists) * + (FF(1) - in.get(C::execution_note_hash_leaf_in_range)) * in.get(C::execution_register_2_); + tmp *= scaling_factor; + std::get<2>(evals) += typename Accumulator::View(tmp); + } + { // NOTEHASH_EXISTS_U1_OUTPUT_TAG + using Accumulator = typename std::tuple_element_t<3, ContainerOverSubrelations>; + auto tmp = in.get(C::execution_sel_execute_notehash_exists) * + (constants_MEM_TAG_U1 - in.get(C::execution_mem_tag_reg_2_)); + tmp *= scaling_factor; + std::get<3>(evals) += typename Accumulator::View(tmp); + } + { // NOTE_HASH_EXISTS_SUCCESS + using Accumulator = typename std::tuple_element_t<4, ContainerOverSubrelations>; + auto tmp = in.get(C::execution_sel_execute_notehash_exists) * in.get(C::execution_sel_opcode_error); + tmp *= scaling_factor; + std::get<4>(evals) += typename Accumulator::View(tmp); + } + } +}; + +template class notehash_exists : public Relation> { + public: + static constexpr const std::string_view NAME = "notehash_exists"; + + static std::string get_subrelation_label(size_t index) + { + switch (index) { + case 2: + return "NOTE_HASH_EXISTS_OUT_OF_RANGE_FALSE"; + case 3: + return "NOTEHASH_EXISTS_U1_OUTPUT_TAG"; + case 4: + return "NOTE_HASH_EXISTS_SUCCESS"; + } + return std::to_string(index); + } + + // Subrelation indices constants, to be used in tests. + static constexpr size_t SR_NOTE_HASH_EXISTS_OUT_OF_RANGE_FALSE = 2; + static constexpr size_t SR_NOTEHASH_EXISTS_U1_OUTPUT_TAG = 3; + static constexpr size_t SR_NOTE_HASH_EXISTS_SUCCESS = 4; +}; + +} // namespace bb::avm2 diff --git a/barretenberg/cpp/src/barretenberg/vm2/simulation/concrete_dbs.cpp b/barretenberg/cpp/src/barretenberg/vm2/simulation/concrete_dbs.cpp index 3a6626fb6f40..cef53a0abd45 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/simulation/concrete_dbs.cpp +++ b/barretenberg/cpp/src/barretenberg/vm2/simulation/concrete_dbs.cpp @@ -187,13 +187,12 @@ bool MerkleDB::nullifier_write_internal(std::optional contract_add return !present; } -FF MerkleDB::note_hash_read(index_t leaf_index) const +bool MerkleDB::note_hash_exists(index_t leaf_index, const FF& unique_note_hash) const { - auto note_hash = raw_merkle_db.get_leaf_value(MerkleTreeId::NOTE_HASH_TREE, leaf_index); + auto leaf_value = raw_merkle_db.get_leaf_value(MerkleTreeId::NOTE_HASH_TREE, leaf_index); auto path = raw_merkle_db.get_sibling_path(MerkleTreeId::NOTE_HASH_TREE, leaf_index); - note_hash_tree_check.assert_read(note_hash, leaf_index, path, raw_merkle_db.get_tree_roots().noteHashTree); - - return note_hash; + return note_hash_tree_check.note_hash_exists( + unique_note_hash, leaf_value, leaf_index, path, raw_merkle_db.get_tree_roots().noteHashTree); } void MerkleDB::note_hash_write(const AztecAddress& contract_address, const FF& note_hash) diff --git a/barretenberg/cpp/src/barretenberg/vm2/simulation/concrete_dbs.hpp b/barretenberg/cpp/src/barretenberg/vm2/simulation/concrete_dbs.hpp index 7bc82d58774e..61f21fa98290 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/simulation/concrete_dbs.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/simulation/concrete_dbs.hpp @@ -76,7 +76,7 @@ class MerkleDB final : public HighLevelMerkleDBInterface { bool siloed_nullifier_write(const FF& nullifier) override; // Returns a unique note hash stored in the tree at leaf_index. - FF note_hash_read(index_t leaf_index) const override; + bool note_hash_exists(index_t leaf_index, const FF& unique_note_hash) const override; void note_hash_write(const AztecAddress& contract_address, const FF& note_hash) override; void siloed_note_hash_write(const FF& note_hash) override; void unique_note_hash_write(const FF& note_hash) override; diff --git a/barretenberg/cpp/src/barretenberg/vm2/simulation/events/note_hash_tree_check_event.hpp b/barretenberg/cpp/src/barretenberg/vm2/simulation/events/note_hash_tree_check_event.hpp index 0f8229ef8258..022b239ef867 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/simulation/events/note_hash_tree_check_event.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/simulation/events/note_hash_tree_check_event.hpp @@ -36,6 +36,7 @@ struct NoteHashAppendData { struct NoteHashTreeReadWriteEvent { FF note_hash; + FF existing_leaf_value; uint64_t leaf_index; AppendOnlyTreeSnapshot prev_snapshot; diff --git a/barretenberg/cpp/src/barretenberg/vm2/simulation/execution.cpp b/barretenberg/cpp/src/barretenberg/vm2/simulation/execution.cpp index 0ec334710786..422e0310612b 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/simulation/execution.cpp +++ b/barretenberg/cpp/src/barretenberg/vm2/simulation/execution.cpp @@ -521,11 +521,12 @@ void Execution::sload(ContextInterface& context, MemoryAddress slot_addr, Memory constexpr auto opcode = ExecutionOpCode::SLOAD; auto& memory = context.get_memory(); - get_gas_tracker().consume_gas(); auto slot = memory.get(slot_addr); set_and_validate_inputs(opcode, { slot }); + get_gas_tracker().consume_gas(); + auto value = MemoryValue::from(merkle_db.storage_read(context.get_address(), slot.as())); memory.set(dst_addr, value); @@ -554,6 +555,41 @@ void Execution::sstore(ContextInterface& context, MemoryAddress src_addr, Memory merkle_db.storage_write(context.get_address(), slot.as_ff(), value.as_ff(), false); } +void Execution::note_hash_exists(ContextInterface& context, + MemoryAddress unique_note_hash_addr, + MemoryAddress leaf_index_addr, + MemoryAddress dst_addr) +{ + constexpr auto opcode = ExecutionOpCode::NOTEHASHEXISTS; + + auto& memory = context.get_memory(); + auto unique_note_hash = memory.get(unique_note_hash_addr); + auto leaf_index = memory.get(leaf_index_addr); + set_and_validate_inputs(opcode, { unique_note_hash, leaf_index }); + + get_gas_tracker().consume_gas(); + + uint64_t leaf_index_value = leaf_index.as(); + + bool out_of_range = leaf_index_value >= NOTE_HASH_TREE_LEAF_COUNT; + // Circuit information leak to call range check + uint64_t note_hash_leaf_index_leaf_count_cmp_diff = + out_of_range ? leaf_index_value - NOTE_HASH_TREE_LEAF_COUNT : NOTE_HASH_TREE_LEAF_COUNT - leaf_index_value - 1; + + range_check.assert_range(note_hash_leaf_index_leaf_count_cmp_diff, 64); + + MemoryValue value; + + if (out_of_range) { + value = MemoryValue::from(0); + } else { + value = MemoryValue::from(merkle_db.note_hash_exists(leaf_index_value, unique_note_hash.as())); + } + + memory.set(dst_addr, value); + set_output(opcode, value); +} + void Execution::get_contract_instance(ContextInterface& context, MemoryAddress address_offset, MemoryAddress dst_offset, @@ -808,6 +844,9 @@ void Execution::dispatch_opcode(ExecutionOpCode opcode, case ExecutionOpCode::SSTORE: call_with_operands(&Execution::sstore, context, resolved_operands); break; + case ExecutionOpCode::NOTEHASHEXISTS: + call_with_operands(&Execution::note_hash_exists, context, resolved_operands); + break; case ExecutionOpCode::GETCONTRACTINSTANCE: call_with_operands(&Execution::get_contract_instance, context, resolved_operands); break; diff --git a/barretenberg/cpp/src/barretenberg/vm2/simulation/execution.hpp b/barretenberg/cpp/src/barretenberg/vm2/simulation/execution.hpp index c4ee30fb60fb..2fa9cd1382fb 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/simulation/execution.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/simulation/execution.hpp @@ -59,6 +59,7 @@ class Execution : public ExecutionInterface { EventEmitterInterface& event_emitter, EventEmitterInterface& ctx_stack_emitter, KeccakF1600Interface& keccakf1600, + RangeCheckInterface& range_check, GetContractInstanceInterface& get_contract_instance_component, HighLevelMerkleDBInterface& merkle_db) : execution_components(execution_components) @@ -69,6 +70,7 @@ class Execution : public ExecutionInterface { , execution_id_manager(execution_id_manager) , data_copy(data_copy) , keccakf1600(keccakf1600) + , range_check(range_check) , get_contract_instance_component(get_contract_instance_component) , merkle_db(merkle_db) , events(event_emitter) @@ -120,6 +122,10 @@ class Execution : public ExecutionInterface { void xor_op(ContextInterface& context, MemoryAddress a_addr, MemoryAddress b_addr, MemoryAddress dst_addr); void sload(ContextInterface& context, MemoryAddress slot_addr, MemoryAddress dst_addr); void sstore(ContextInterface& context, MemoryAddress src_addr, MemoryAddress slot_addr); + void note_hash_exists(ContextInterface& context, + MemoryAddress unique_note_hash_addr, + MemoryAddress leaf_index_addr, + MemoryAddress dst_addr); void get_contract_instance(ContextInterface& context, MemoryAddress address_offset, MemoryAddress dst_offset, @@ -160,6 +166,7 @@ class Execution : public ExecutionInterface { ExecutionIdManagerInterface& execution_id_manager; DataCopyInterface& data_copy; KeccakF1600Interface& keccakf1600; + RangeCheckInterface& range_check; GetContractInstanceInterface& get_contract_instance_component; HighLevelMerkleDBInterface& merkle_db; diff --git a/barretenberg/cpp/src/barretenberg/vm2/simulation/execution.test.cpp b/barretenberg/cpp/src/barretenberg/vm2/simulation/execution.test.cpp index 21b302f31148..ecd2e917f2ad 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/simulation/execution.test.cpp +++ b/barretenberg/cpp/src/barretenberg/vm2/simulation/execution.test.cpp @@ -80,6 +80,7 @@ class ExecutionSimulationTest : public ::testing::Test { StrictMock execution_id_manager; StrictMock gas_tracker; StrictMock merkle_db; + StrictMock range_check; TestingExecution execution = TestingExecution(alu, bitwise, data_copy, @@ -90,6 +91,7 @@ class ExecutionSimulationTest : public ::testing::Test { execution_event_emitter, context_stack_event_emitter, keccakf1600, + range_check, get_contract_instance, merkle_db); }; @@ -454,6 +456,53 @@ TEST_F(ExecutionSimulationTest, SStoreLimitReachedSquashed) execution.sstore(context, value_addr, slot_addr); } +TEST_F(ExecutionSimulationTest, NoteHashExists) +{ + MemoryAddress unique_note_hash_addr = 10; + MemoryAddress leaf_index_addr = 11; + MemoryAddress dst_addr = 12; + + auto unique_note_hash = MemoryValue::from(42); + auto leaf_index = MemoryValue::from(7); + + EXPECT_CALL(context, get_memory); + EXPECT_CALL(memory, get(unique_note_hash_addr)).WillOnce(ReturnRef(unique_note_hash)); + EXPECT_CALL(memory, get(leaf_index_addr)).WillOnce(ReturnRef(leaf_index)); + + EXPECT_CALL(gas_tracker, consume_gas(Gas{ 0, 0 })); + + EXPECT_CALL(range_check, assert_range(NOTE_HASH_TREE_LEAF_COUNT - 1 - leaf_index.as(), 64)); + + EXPECT_CALL(merkle_db, note_hash_exists(leaf_index.as(), unique_note_hash.as())) + .WillOnce(Return(true)); + + EXPECT_CALL(memory, set(dst_addr, MemoryValue::from(1))); + + execution.note_hash_exists(context, unique_note_hash_addr, leaf_index_addr, dst_addr); +} + +TEST_F(ExecutionSimulationTest, NoteHashExistsOutOfRange) +{ + MemoryAddress unique_note_hash_addr = 10; + MemoryAddress leaf_index_addr = 11; + MemoryAddress dst_addr = 12; + + auto unique_note_hash = MemoryValue::from(42); + auto leaf_index = MemoryValue::from(NOTE_HASH_TREE_LEAF_COUNT + 1); + + EXPECT_CALL(context, get_memory); + EXPECT_CALL(memory, get(unique_note_hash_addr)).WillOnce(ReturnRef(unique_note_hash)); + EXPECT_CALL(memory, get(leaf_index_addr)).WillOnce(ReturnRef(leaf_index)); + + EXPECT_CALL(gas_tracker, consume_gas(Gas{ 0, 0 })); + + EXPECT_CALL(range_check, assert_range(leaf_index.as() - NOTE_HASH_TREE_LEAF_COUNT, 64)); + + EXPECT_CALL(memory, set(dst_addr, MemoryValue::from(0))); + + execution.note_hash_exists(context, unique_note_hash_addr, leaf_index_addr, dst_addr); +} + } // namespace } // namespace bb::avm2::simulation diff --git a/barretenberg/cpp/src/barretenberg/vm2/simulation/lib/db_interfaces.hpp b/barretenberg/cpp/src/barretenberg/vm2/simulation/lib/db_interfaces.hpp index 66ce6dfb5424..49f436a9e4f1 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/simulation/lib/db_interfaces.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/simulation/lib/db_interfaces.hpp @@ -86,7 +86,7 @@ class HighLevelMerkleDBInterface { virtual bool nullifier_write(const AztecAddress& contract_address, const FF& nullifier) = 0; virtual bool siloed_nullifier_write(const FF& nullifier) = 0; - virtual FF note_hash_read(index_t leaf_index) const = 0; + virtual bool note_hash_exists(index_t leaf_index, const FF& unique_note_hash) const = 0; virtual void note_hash_write(const AztecAddress& contract_address, const FF& note_hash) = 0; virtual void siloed_note_hash_write(const FF& note_hash) = 0; virtual void unique_note_hash_write(const FF& note_hash) = 0; diff --git a/barretenberg/cpp/src/barretenberg/vm2/simulation/note_hash_tree_check.cpp b/barretenberg/cpp/src/barretenberg/vm2/simulation/note_hash_tree_check.cpp index fc589f2a6528..8930c0c2d25d 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/simulation/note_hash_tree_check.cpp +++ b/barretenberg/cpp/src/barretenberg/vm2/simulation/note_hash_tree_check.cpp @@ -4,14 +4,18 @@ namespace bb::avm2::simulation { -void NoteHashTreeCheck::assert_read(const FF& note_hash, - index_t leaf_index, - std::span sibling_path, - const AppendOnlyTreeSnapshot& snapshot) +bool NoteHashTreeCheck::note_hash_exists(const FF& unique_note_hash, + const FF& leaf_value, + index_t leaf_index, + std::span sibling_path, + const AppendOnlyTreeSnapshot& snapshot) { - merkle_check.assert_membership(note_hash, leaf_index, sibling_path, snapshot.root); - events.emit( - NoteHashTreeReadWriteEvent{ .note_hash = note_hash, .leaf_index = leaf_index, .prev_snapshot = snapshot }); + merkle_check.assert_membership(leaf_value, leaf_index, sibling_path, snapshot.root); + events.emit(NoteHashTreeReadWriteEvent{ .note_hash = unique_note_hash, + .existing_leaf_value = leaf_value, + .leaf_index = leaf_index, + .prev_snapshot = snapshot }); + return unique_note_hash == leaf_value; } FF NoteHashTreeCheck::make_siloed(AztecAddress contract_address, const FF& note_hash) const @@ -94,6 +98,7 @@ AppendOnlyTreeSnapshot NoteHashTreeCheck::append_note_hash_internal(FF note_hash .nextAvailableLeafIndex = prev_snapshot.nextAvailableLeafIndex + 1, }; events.emit(NoteHashTreeReadWriteEvent{ .note_hash = original_note_hash, + .existing_leaf_value = 0, .leaf_index = prev_snapshot.nextAvailableLeafIndex, .prev_snapshot = prev_snapshot, .append_data = NoteHashAppendData{ diff --git a/barretenberg/cpp/src/barretenberg/vm2/simulation/note_hash_tree_check.hpp b/barretenberg/cpp/src/barretenberg/vm2/simulation/note_hash_tree_check.hpp index 05a42b3a6051..6fab53514697 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/simulation/note_hash_tree_check.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/simulation/note_hash_tree_check.hpp @@ -12,10 +12,11 @@ class NoteHashTreeCheckInterface { public: virtual ~NoteHashTreeCheckInterface() = default; - virtual void assert_read(const FF& note_hash, - index_t leaf_index, - std::span sibling_path, - const AppendOnlyTreeSnapshot& snapshot) = 0; + virtual bool note_hash_exists(const FF& unique_note_hash, + const FF& leaf_value, + index_t leaf_index, + std::span sibling_path, + const AppendOnlyTreeSnapshot& snapshot) = 0; virtual FF get_first_nullifier() const = 0; virtual AppendOnlyTreeSnapshot append_note_hash(const FF& note_hash, AztecAddress contract_address, @@ -46,10 +47,11 @@ class NoteHashTreeCheck : public NoteHashTreeCheckInterface, public CheckpointNo FF get_first_nullifier() const override { return first_nullifier; } - void assert_read(const FF& note_hash, - index_t leaf_index, - std::span sibling_path, - const AppendOnlyTreeSnapshot& snapshot) override; + bool note_hash_exists(const FF& unique_note_hash, + const FF& leaf_value, + index_t leaf_index, + std::span sibling_path, + const AppendOnlyTreeSnapshot& snapshot) override; AppendOnlyTreeSnapshot append_note_hash(const FF& note_hash, AztecAddress contract_address, uint64_t note_hash_counter, diff --git a/barretenberg/cpp/src/barretenberg/vm2/simulation/note_hash_tree_check.test.cpp b/barretenberg/cpp/src/barretenberg/vm2/simulation/note_hash_tree_check.test.cpp index cdacb85325b2..a83c9f61d812 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/simulation/note_hash_tree_check.test.cpp +++ b/barretenberg/cpp/src/barretenberg/vm2/simulation/note_hash_tree_check.test.cpp @@ -23,7 +23,7 @@ using RawPoseidon2 = crypto::Poseidon2; namespace { -TEST(AvmSimulationNoteHashTree, Read) +TEST(AvmSimulationNoteHashTree, Exists) { StrictMock poseidon2; StrictMock merkle_check; @@ -40,16 +40,24 @@ TEST(AvmSimulationNoteHashTree, Read) FF note_hash = 42; index_t leaf_index = 30; - EXPECT_CALL(merkle_check, assert_membership(note_hash, leaf_index, _, snapshot.root)).WillOnce(Return()); + EXPECT_CALL(merkle_check, assert_membership(note_hash, leaf_index, _, snapshot.root)).WillRepeatedly(Return()); - note_hash_tree_check.assert_read(note_hash, leaf_index, sibling_path, snapshot); - - NoteHashTreeReadWriteEvent expect_event = { - .note_hash = note_hash, - .leaf_index = leaf_index, - .prev_snapshot = snapshot, - }; - EXPECT_THAT(event_emitter.dump_events(), ElementsAre(expect_event)); + EXPECT_TRUE(note_hash_tree_check.note_hash_exists(note_hash, note_hash, leaf_index, sibling_path, snapshot)); + EXPECT_FALSE(note_hash_tree_check.note_hash_exists(27, note_hash, leaf_index, sibling_path, snapshot)); + EXPECT_THAT(event_emitter.dump_events(), + ElementsAre( + NoteHashTreeReadWriteEvent{ + .note_hash = note_hash, + .existing_leaf_value = note_hash, + .leaf_index = leaf_index, + .prev_snapshot = snapshot, + }, + NoteHashTreeReadWriteEvent{ + .note_hash = 27, + .existing_leaf_value = note_hash, + .leaf_index = leaf_index, + .prev_snapshot = snapshot, + })); } TEST(AvmSimulationNoteHashTree, WriteUnique) diff --git a/barretenberg/cpp/src/barretenberg/vm2/simulation/testing/mock_dbs.hpp b/barretenberg/cpp/src/barretenberg/vm2/simulation/testing/mock_dbs.hpp index 0c2c537cf1d6..f645b7f039da 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/simulation/testing/mock_dbs.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/simulation/testing/mock_dbs.hpp @@ -76,7 +76,7 @@ class MockHighLevelMerkleDB : public HighLevelMerkleDBInterface { MOCK_METHOD(bool, siloed_nullifier_exists, (const FF& nullifier), (const, override)); MOCK_METHOD(bool, nullifier_write, (const AztecAddress& contract_address, const FF& nullifier), (override)); MOCK_METHOD(bool, siloed_nullifier_write, (const FF& nullifier), (override)); - MOCK_METHOD(FF, note_hash_read, (index_t leaf_index), (const, override)); + MOCK_METHOD(bool, note_hash_exists, (index_t leaf_index, const FF& unique_note_hash), (const, override)); MOCK_METHOD(void, note_hash_write, (const AztecAddress& contract_address, const FF& note_hash), (override)); MOCK_METHOD(void, siloed_note_hash_write, (const FF& note_hash), (override)); MOCK_METHOD(void, unique_note_hash_write, (const FF& note_hash), (override)); diff --git a/barretenberg/cpp/src/barretenberg/vm2/simulation/testing/mock_note_hash_tree_check.hpp b/barretenberg/cpp/src/barretenberg/vm2/simulation/testing/mock_note_hash_tree_check.hpp index c24aa99fecb9..025b7d208879 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/simulation/testing/mock_note_hash_tree_check.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/simulation/testing/mock_note_hash_tree_check.hpp @@ -14,9 +14,10 @@ class MockNoteHashTreeCheck : public NoteHashTreeCheckInterface { MockNoteHashTreeCheck(); ~MockNoteHashTreeCheck() override; - MOCK_METHOD(void, - assert_read, - (const FF& note_hash, + MOCK_METHOD(bool, + note_hash_exists, + (const FF& unique_note_hash, + const FF& leaf_value, index_t leaf_index, std::span sibling_path, const AppendOnlyTreeSnapshot& snapshot), diff --git a/barretenberg/cpp/src/barretenberg/vm2/simulation_helper.cpp b/barretenberg/cpp/src/barretenberg/vm2/simulation_helper.cpp index f55d595639f9..8c768667e224 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/simulation_helper.cpp +++ b/barretenberg/cpp/src/barretenberg/vm2/simulation_helper.cpp @@ -200,6 +200,7 @@ template EventsContainer AvmSimulationHelper::simulate_with_setting execution_emitter, context_stack_emitter, keccakf1600, + range_check, get_contract_instance, merkle_db); TxExecution tx_execution(execution, context_provider, merkle_db, field_gt, poseidon2, tx_event_emitter); diff --git a/barretenberg/cpp/src/barretenberg/vm2/tracegen/execution_trace.cpp b/barretenberg/cpp/src/barretenberg/vm2/tracegen/execution_trace.cpp index 180d1cb2a7f9..941bbf8d1c5d 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/tracegen/execution_trace.cpp +++ b/barretenberg/cpp/src/barretenberg/vm2/tracegen/execution_trace.cpp @@ -23,6 +23,7 @@ #include "barretenberg/vm2/generated/relations/lookups_gas.hpp" #include "barretenberg/vm2/generated/relations/lookups_get_env_var.hpp" #include "barretenberg/vm2/generated/relations/lookups_internal_call.hpp" +#include "barretenberg/vm2/generated/relations/lookups_notehash_exists.hpp" #include "barretenberg/vm2/generated/relations/lookups_registers.hpp" #include "barretenberg/vm2/generated/relations/lookups_sload.hpp" #include "barretenberg/vm2/generated/relations/lookups_sstore.hpp" @@ -179,6 +180,8 @@ Column get_execution_opcode_selector(ExecutionOpCode exec_opcode) return C::execution_sel_execute_sload; case ExecutionOpCode::SSTORE: return C::execution_sel_execute_sstore; + case ExecutionOpCode::NOTEHASHEXISTS: + return C::execution_sel_execute_notehash_exists; default: throw std::runtime_error("Execution opcode does not have a corresponding selector"); } @@ -377,6 +380,14 @@ void ExecutionTraceBuilder::process( ex_event.after_context_event.tree_states.publicDataTree.tree.root }, { C::execution_public_data_tree_size, ex_event.after_context_event.tree_states.publicDataTree.tree.nextAvailableLeafIndex }, + // Context - tree states - Note hash tree + { C::execution_prev_note_hash_tree_root, + ex_event.before_context_event.tree_states.noteHashTree.tree.root }, + { C::execution_prev_note_hash_tree_size, + ex_event.before_context_event.tree_states.noteHashTree.tree.nextAvailableLeafIndex }, + { C::execution_note_hash_tree_root, ex_event.after_context_event.tree_states.noteHashTree.tree.root }, + { C::execution_note_hash_tree_size, + ex_event.after_context_event.tree_states.noteHashTree.tree.nextAvailableLeafIndex }, // Other. { C::execution_bytecode_id, ex_event.bytecode_id }, // Helpers for identifying parent context @@ -562,6 +573,20 @@ void ExecutionTraceBuilder::process( remaining_data_writes == 0 ? 0 : FF(remaining_data_writes).invert() }, { C::execution_sel_write_public_data, !opcode_execution_failed }, } }); + } else if (exec_opcode == ExecutionOpCode::NOTEHASHEXISTS) { + uint64_t leaf_index = registers[1].as(); + bool note_hash_leaf_in_range = leaf_index < NOTE_HASH_TREE_LEAF_COUNT; + + FF note_hash_leaf_index_leaf_count_cmp_diff = note_hash_leaf_in_range + ? NOTE_HASH_TREE_LEAF_COUNT - leaf_index - 1 + : leaf_index - NOTE_HASH_TREE_LEAF_COUNT; + + trace.set(row, + { { + { C::execution_note_hash_leaf_in_range, note_hash_leaf_in_range }, + { C::execution_note_hash_leaf_index_leaf_count_cmp_diff, + note_hash_leaf_index_leaf_count_cmp_diff }, + } }); } } @@ -1058,6 +1083,9 @@ const InteractionDefinition ExecutionTraceBuilder::interactions = // Sstore opcode .add() .add() + // NoteHashExists + .add() + .add() // GetContractInstance opcode .add(); diff --git a/barretenberg/cpp/src/barretenberg/vm2/tracegen/execution_trace.test.cpp b/barretenberg/cpp/src/barretenberg/vm2/tracegen/execution_trace.test.cpp index 6c8f9e8b83ee..a19811c06cf5 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/tracegen/execution_trace.test.cpp +++ b/barretenberg/cpp/src/barretenberg/vm2/tracegen/execution_trace.test.cpp @@ -944,5 +944,59 @@ TEST(ExecutionTraceGenTest, SStore) ROW_FIELD_EQ(execution_sel_write_public_data, 1)))); } +TEST(ExecutionTraceGenTest, NoteHashExists) +{ + TestTraceContainer trace; + ExecutionTraceBuilder builder; + + uint16_t unique_note_hash_offset = 1234; + uint16_t leaf_index_offset = 4567; + uint16_t dst_offset = 8901; + + FF unique_note_hash = 42; + uint64_t leaf_index = 27; + uint1_t dst_value = 1; + + const auto instr = InstructionBuilder(WireOpCode::NOTEHASHEXISTS) + .operand(unique_note_hash_offset) + .operand(leaf_index_offset) + .operand(dst_offset) + .build(); + + ExecutionEvent ex_event = { + .wire_instruction = instr, + .inputs = { MemoryValue::from(unique_note_hash), MemoryValue::from(leaf_index) }, + .output = MemoryValue::from(dst_value), + .addressing_event = { .instruction = instr, + .resolution_info = { { .resolved_operand = + MemoryValue::from(unique_note_hash_offset) }, + { .resolved_operand = + MemoryValue::from(leaf_index_offset) }, + { .resolved_operand = MemoryValue::from(dst_offset) } } }, + }; + + builder.process({ ex_event }, trace); + EXPECT_THAT(trace.as_rows(), + ElementsAre( + // First row is empty + AllOf(ROW_FIELD_EQ(execution_sel, 0)), + // Second row is the sload + AllOf(ROW_FIELD_EQ(execution_sel, 1), + ROW_FIELD_EQ(execution_sel_execute_notehash_exists, 1), + ROW_FIELD_EQ(execution_rop_0_, unique_note_hash_offset), + ROW_FIELD_EQ(execution_rop_1_, leaf_index_offset), + ROW_FIELD_EQ(execution_rop_2_, dst_offset), + ROW_FIELD_EQ(execution_register_0_, unique_note_hash), + ROW_FIELD_EQ(execution_register_1_, leaf_index), + ROW_FIELD_EQ(execution_register_2_, FF(dst_value)), + ROW_FIELD_EQ(execution_mem_tag_reg_0_, MEM_TAG_FF), // Memory tag for unique_note_hash + ROW_FIELD_EQ(execution_mem_tag_reg_1_, MEM_TAG_U64), // Memory tag for leaf_index + ROW_FIELD_EQ(execution_mem_tag_reg_2_, MEM_TAG_U1), // Memory tag for dst + ROW_FIELD_EQ(execution_note_hash_leaf_in_range, 1), + ROW_FIELD_EQ(execution_note_hash_leaf_index_leaf_count_cmp_diff, + NOTE_HASH_TREE_LEAF_COUNT - leaf_index - 1), + ROW_FIELD_EQ(execution_subtrace_operation_id, AVM_EXEC_OP_ID_NOTEHASH_EXISTS)))); +} + } // namespace } // namespace bb::avm2::tracegen diff --git a/barretenberg/cpp/src/barretenberg/vm2/tracegen/lib/instruction_spec.cpp b/barretenberg/cpp/src/barretenberg/vm2/tracegen/lib/instruction_spec.cpp index cab24261a938..ec9ba3928cee 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/tracegen/lib/instruction_spec.cpp +++ b/barretenberg/cpp/src/barretenberg/vm2/tracegen/lib/instruction_spec.cpp @@ -83,6 +83,8 @@ const std::unordered_map SUBTRACE_INFO_MAP = { { .subtrace_selector = SubtraceSel::EXECUTION, .subtrace_operation_id = AVM_EXEC_OP_ID_SLOAD } }, { ExecutionOpCode::SSTORE, { .subtrace_selector = SubtraceSel::EXECUTION, .subtrace_operation_id = AVM_EXEC_OP_ID_SSTORE } }, + { ExecutionOpCode::NOTEHASHEXISTS, + { .subtrace_selector = SubtraceSel::EXECUTION, .subtrace_operation_id = AVM_EXEC_OP_ID_NOTEHASH_EXISTS } }, // Misc { ExecutionOpCode::GETCONTRACTINSTANCE, { .subtrace_selector = SubtraceSel::GETCONTRACTINSTANCE, .subtrace_operation_id = 0 } }, diff --git a/barretenberg/cpp/src/barretenberg/vm2/tracegen/note_hash_tree_check_trace.cpp b/barretenberg/cpp/src/barretenberg/vm2/tracegen/note_hash_tree_check_trace.cpp index 9e73c716b995..2a6159bd69ad 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/tracegen/note_hash_tree_check_trace.cpp +++ b/barretenberg/cpp/src/barretenberg/vm2/tracegen/note_hash_tree_check_trace.cpp @@ -38,7 +38,6 @@ void NoteHashTreeCheckTraceBuilder::process( uint64_t note_hash_counter = 0; FF next_root = 0; FF first_nullifier = 0; - FF prev_leaf_value = 0; if (write) { simulation::NoteHashAppendData append_data = event.append_data.value(); @@ -55,13 +54,16 @@ void NoteHashTreeCheckTraceBuilder::process( } note_hash_counter = append_data.note_hash_counter; next_root = append_data.next_snapshot.root; - } else { - prev_leaf_value = unique_note_hash; } + FF prev_leaf_value = event.existing_leaf_value; + bool exists = prev_leaf_value == unique_note_hash; + FF prev_leaf_value_unique_note_hash_diff_inv = exists ? 0 : (prev_leaf_value - unique_note_hash).invert(); + trace.set(row, { { { C::note_hash_tree_check_sel, 1 }, { C::note_hash_tree_check_write, write }, + { C::note_hash_tree_check_exists, exists }, { C::note_hash_tree_check_note_hash, note_hash }, { C::note_hash_tree_check_leaf_index, event.leaf_index }, { C::note_hash_tree_check_prev_root, event.prev_snapshot.root }, @@ -80,7 +82,9 @@ void NoteHashTreeCheckTraceBuilder::process( { C::note_hash_tree_check_nonce, nonce }, { C::note_hash_tree_check_nonce_separator, GENERATOR_INDEX__NOTE_HASH_NONCE }, { C::note_hash_tree_check_unique_note_hash_separator, GENERATOR_INDEX__UNIQUE_NOTE_HASH }, - { C::note_hash_tree_check_prev_leaf_value, write ? 0 : unique_note_hash }, + { C::note_hash_tree_check_prev_leaf_value, prev_leaf_value }, + { C::note_hash_tree_check_prev_leaf_value_unique_note_hash_diff_inv, + prev_leaf_value_unique_note_hash_diff_inv }, { C::note_hash_tree_check_next_leaf_value, write ? unique_note_hash : 0 }, { C::note_hash_tree_check_note_hash_tree_height, NOTE_HASH_TREE_HEIGHT }, { C::note_hash_tree_check_should_write_to_public_inputs, write && (!discard) }, diff --git a/noir-projects/aztec-nr/aztec/src/context/public_context.nr b/noir-projects/aztec-nr/aztec/src/context/public_context.nr index 4ba3714de788..eaef19a06cc6 100644 --- a/noir-projects/aztec-nr/aztec/src/context/public_context.nr +++ b/noir-projects/aztec-nr/aztec/src/context/public_context.nr @@ -32,7 +32,7 @@ impl PublicContext { unsafe { emit_public_log(Serialize::serialize(log).as_slice()) }; } - pub fn note_hash_exists(_self: Self, note_hash: Field, leaf_index: Field) -> bool { + pub fn note_hash_exists(_self: Self, note_hash: Field, leaf_index: u64) -> bool { // Safety: AVM opcodes are constrained by the AVM itself unsafe { note_hash_exists(note_hash, leaf_index) } == 1 } @@ -299,7 +299,7 @@ unconstrained fn da_gas_left() -> u32 { unconstrained fn is_static_call() -> u1 { is_static_call_opcode() } -unconstrained fn note_hash_exists(note_hash: Field, leaf_index: Field) -> u1 { +unconstrained fn note_hash_exists(note_hash: Field, leaf_index: u64) -> u1 { note_hash_exists_opcode(note_hash, leaf_index) } unconstrained fn emit_note_hash(note_hash: Field) { @@ -419,7 +419,7 @@ unconstrained fn da_gas_left_opcode() -> u32 {} unconstrained fn is_static_call_opcode() -> u1 {} #[oracle(avmOpcodeNoteHashExists)] -unconstrained fn note_hash_exists_opcode(note_hash: Field, leaf_index: Field) -> u1 {} +unconstrained fn note_hash_exists_opcode(note_hash: Field, leaf_index: u64) -> u1 {} #[oracle(avmOpcodeEmitNoteHash)] unconstrained fn emit_note_hash_opcode(note_hash: Field) {} diff --git a/noir-projects/noir-contracts/contracts/test/avm_test_contract/src/main.nr b/noir-projects/noir-contracts/contracts/test/avm_test_contract/src/main.nr index 980bc091d779..fa478c35875f 100644 --- a/noir-projects/noir-contracts/contracts/test/avm_test_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/test/avm_test_contract/src/main.nr @@ -444,7 +444,7 @@ pub contract AvmTest { } #[public] - fn note_hash_exists(note_hash: Field, leaf_index: Field) -> bool { + fn note_hash_exists(note_hash: Field, leaf_index: u64) -> bool { context.note_hash_exists(note_hash, leaf_index) } diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr b/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr index fc05d3904ba5..24d3e476f160 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr @@ -60,6 +60,7 @@ pub global NOTE_HASH_TREE_ID: Field = 1; pub global PUBLIC_DATA_TREE_ID: Field = 2; pub global L1_TO_L2_MESSAGE_TREE_ID: Field = 3; pub global ARCHIVE_TREE_ID: Field = 4; +pub global NOTE_HASH_TREE_LEAF_COUNT: u64 = 1 << (NOTE_HASH_TREE_HEIGHT as u8); // SUB-TREES RELATED CONSTANTS pub global NOTE_HASH_SUBTREE_HEIGHT: u32 = 6; @@ -656,6 +657,7 @@ pub global AVM_EXEC_OP_ID_RETURNDATASIZE: u32 = 2 * AVM_EXEC_OP_ID_SUCCESSCOPY; pub global AVM_EXEC_OP_ID_DEBUGLOG: u32 = 2 * AVM_EXEC_OP_ID_RETURNDATASIZE; pub global AVM_EXEC_OP_ID_SLOAD: u32 = 2 * AVM_EXEC_OP_ID_DEBUGLOG; pub global AVM_EXEC_OP_ID_SSTORE: u32 = 2 * AVM_EXEC_OP_ID_SLOAD; +pub global AVM_EXEC_OP_ID_NOTEHASH_EXISTS: u32 = 2 * AVM_EXEC_OP_ID_SSTORE; // Execution Opcode IDs for the ALU subtrace // Note: these are all powers of 2 to allow for binary decomposition. diff --git a/yarn-project/constants/src/constants.gen.ts b/yarn-project/constants/src/constants.gen.ts index 7cd7cd202c57..572c07e9c3d8 100644 --- a/yarn-project/constants/src/constants.gen.ts +++ b/yarn-project/constants/src/constants.gen.ts @@ -34,6 +34,7 @@ export const NOTE_HASH_TREE_ID = 1; export const PUBLIC_DATA_TREE_ID = 2; export const L1_TO_L2_MESSAGE_TREE_ID = 3; export const ARCHIVE_TREE_ID = 4; +export const NOTE_HASH_TREE_LEAF_COUNT = 1099511627776; export const NOTE_HASH_SUBTREE_HEIGHT = 6; export const NULLIFIER_SUBTREE_HEIGHT = 6; export const PUBLIC_DATA_SUBTREE_HEIGHT = 6; @@ -279,6 +280,7 @@ export const AVM_EXEC_OP_ID_RETURNDATASIZE = 4096; export const AVM_EXEC_OP_ID_DEBUGLOG = 8192; export const AVM_EXEC_OP_ID_SLOAD = 16384; export const AVM_EXEC_OP_ID_SSTORE = 32768; +export const AVM_EXEC_OP_ID_NOTEHASH_EXISTS = 65536; export const AVM_EXEC_OP_ID_ALU_ADD = 1; export const AVM_EXEC_OP_ID_ALU_SUB = 2; export const AVM_EXEC_OP_ID_ALU_MUL = 4; diff --git a/yarn-project/constants/src/scripts/constants.in.ts b/yarn-project/constants/src/scripts/constants.in.ts index 9c204e404b82..3c1380eeb29a 100644 --- a/yarn-project/constants/src/scripts/constants.in.ts +++ b/yarn-project/constants/src/scripts/constants.in.ts @@ -100,6 +100,7 @@ const CPP_CONSTANTS = [ 'AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_HEIGHT', 'AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_ROOT', 'AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_SIZE', + 'NOTE_HASH_TREE_LEAF_COUNT', ]; const CPP_GENERATORS: string[] = [ @@ -240,9 +241,11 @@ const PIL_CONSTANTS = [ 'AVM_EXEC_OP_ID_DEBUGLOG', 'AVM_EXEC_OP_ID_SLOAD', 'AVM_EXEC_OP_ID_SSTORE', + 'AVM_EXEC_OP_ID_NOTEHASH_EXISTS', 'AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_HEIGHT', 'AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_ROOT', 'AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_SIZE', + 'NOTE_HASH_TREE_LEAF_COUNT', ]; const PIL_GENERATORS: string[] = [ diff --git a/yarn-project/simulator/src/public/avm/avm_simulator.test.ts b/yarn-project/simulator/src/public/avm/avm_simulator.test.ts index a2368c4914f9..7cb8da48e162 100644 --- a/yarn-project/simulator/src/public/avm/avm_simulator.test.ts +++ b/yarn-project/simulator/src/public/avm/avm_simulator.test.ts @@ -553,7 +553,7 @@ describe('AVM simulator: transpiled Noir contracts', () => { describe('Side effects, world state, nested calls', () => { const address = AztecAddress.fromNumber(1); const sender = AztecAddress.fromNumber(42); - const leafIndex = new Fr(7); + const leafIndex = 7n; const slotNumber = 1; // must update Noir contract if changing this const slot = new Fr(slotNumber); const listSlotNumber0 = 2; // must update Noir contract if changing this @@ -592,16 +592,14 @@ describe('AVM simulator: transpiled Noir contracts', () => { describe.each([ [/*mockAtLeafIndex=*/ undefined], // doesn't exist at all [/*mockAtLeafIndex=*/ leafIndex], // should be found! - [/*mockAtLeafIndex=*/ leafIndex.add(Fr.ONE)], // won't be found! (checking leafIndex+1, but it exists at leafIndex) - ])('Note hash checks', (mockAtLeafIndex?: Fr) => { - const expectFound = mockAtLeafIndex !== undefined && mockAtLeafIndex.equals(leafIndex); - const existsElsewhere = mockAtLeafIndex !== undefined && !mockAtLeafIndex.equals(leafIndex); + [/*mockAtLeafIndex=*/ leafIndex + 1n], // won't be found! (checking leafIndex+1, but it exists at leafIndex) + ])('Note hash checks', (mockAtLeafIndex?: bigint) => { + const expectFound = mockAtLeafIndex !== undefined && mockAtLeafIndex == leafIndex; + const existsElsewhere = mockAtLeafIndex !== undefined && !(mockAtLeafIndex == leafIndex); const existsStr = expectFound ? 'DOES exist' : 'does NOT exist'; - const foundAtStr = existsElsewhere - ? `at leafIndex=${mockAtLeafIndex.toNumber()} (exists at leafIndex=${leafIndex.toNumber()})` - : ''; + const foundAtStr = existsElsewhere ? `at leafIndex=${mockAtLeafIndex} (exists at leafIndex=${leafIndex})` : ''; it(`Should return ${expectFound} (and be traced) when noteHash ${existsStr} ${foundAtStr}`, async () => { - const calldata = [value0, leafIndex]; + const calldata = [value0, new Fr(leafIndex)]; const context = createContext(calldata); const bytecode = getAvmTestContractBytecode('note_hash_exists'); if (mockAtLeafIndex !== undefined) { @@ -635,21 +633,19 @@ describe('AVM simulator: transpiled Noir contracts', () => { describe.each([ [/*mockAtLeafIndex=*/ undefined], // doesn't exist at all [/*mockAtLeafIndex=*/ leafIndex], // should be found! - [/*mockAtLeafIndex=*/ leafIndex.add(Fr.ONE)], // won't be found! (checking leafIndex+1, but it exists at leafIndex) - ])('L1ToL2 message checks', (mockAtLeafIndex?: Fr) => { - const expectFound = mockAtLeafIndex !== undefined && mockAtLeafIndex.equals(leafIndex); - const existsElsewhere = mockAtLeafIndex !== undefined && !mockAtLeafIndex.equals(leafIndex); + [/*mockAtLeafIndex=*/ leafIndex + 1n], // won't be found! (checking leafIndex+1, but it exists at leafIndex) + ])('L1ToL2 message checks', (mockAtLeafIndex?: bigint) => { + const expectFound = mockAtLeafIndex !== undefined && mockAtLeafIndex == leafIndex; + const existsElsewhere = mockAtLeafIndex !== undefined && !(mockAtLeafIndex == leafIndex); const existsStr = expectFound ? 'DOES exist' : 'does NOT exist'; - const foundAtStr = existsElsewhere - ? `at leafIndex=${mockAtLeafIndex.toNumber()} (exists at leafIndex=${leafIndex.toNumber()})` - : ''; + const foundAtStr = existsElsewhere ? `at leafIndex=${mockAtLeafIndex} (exists at leafIndex=${leafIndex})` : ''; it(`Should return ${expectFound} (and be traced) when message ${existsStr} ${foundAtStr}`, async () => { - const calldata = [value0, leafIndex]; + const calldata = [value0, new Fr(leafIndex)]; const context = createContext(calldata); const bytecode = getAvmTestContractBytecode('l1_to_l2_msg_exists'); if (mockAtLeafIndex !== undefined) { - mockL1ToL2MessageExists(treesDB, mockAtLeafIndex, value0, /*valueAtOtherIndices=*/ value1); + mockL1ToL2MessageExists(treesDB, new Fr(mockAtLeafIndex), value0, /*valueAtOtherIndices=*/ value1); } const results = await new AvmSimulator(context).executeBytecode(bytecode); diff --git a/yarn-project/simulator/src/public/avm/opcodes/accrued_substate.test.ts b/yarn-project/simulator/src/public/avm/opcodes/accrued_substate.test.ts index b7e4ed4b1670..f6d8319bcd42 100644 --- a/yarn-project/simulator/src/public/avm/opcodes/accrued_substate.test.ts +++ b/yarn-project/simulator/src/public/avm/opcodes/accrued_substate.test.ts @@ -9,7 +9,7 @@ import type { PublicSideEffectTraceInterface } from '../../../public/side_effect import type { PublicTreesDB } from '../../public_db_sources.js'; import type { PublicPersistableStateManager } from '../../state_manager/state_manager.js'; import type { AvmContext } from '../avm_context.js'; -import { Field, Uint8, Uint32 } from '../avm_memory_types.js'; +import { Field, Uint8, Uint32, Uint64 } from '../avm_memory_types.js'; import { InstructionExecutionError, StaticCallAlterationError } from '../errors.js'; import { initContext, initExecutionEnvironment, initPersistableStateManager } from '../fixtures/initializers.js'; import { @@ -40,7 +40,7 @@ describe('Accrued Substate', () => { const value0Offset = 100; const value1 = new Fr(420); const value1Offset = 200; - const leafIndex = new Fr(7); + const leafIndex = 7n; const leafIndexOffset = 1; const existsOffset = 2; const firstNullifier = new Fr(420000); @@ -81,21 +81,19 @@ describe('Accrued Substate', () => { describe.each([ [/*mockAtLeafIndex=*/ undefined], // doesn't exist at all [/*mockAtLeafIndex=*/ leafIndex], // should be found! - [/*mockAtLeafIndex=*/ leafIndex.add(Fr.ONE)], // won't be found! (checking leafIndex+1, but it exists at leafIndex) - ])('Note hash checks', (mockAtLeafIndex?: Fr) => { - const expectFound = mockAtLeafIndex !== undefined && mockAtLeafIndex.equals(leafIndex); - const existsElsewhere = mockAtLeafIndex !== undefined && !mockAtLeafIndex.equals(leafIndex); + [/*mockAtLeafIndex=*/ leafIndex + 1n], // won't be found! (checking leafIndex+1, but it exists at leafIndex) + ])('Note hash checks', (mockAtLeafIndex?: bigint) => { + const expectFound = mockAtLeafIndex !== undefined && mockAtLeafIndex == leafIndex; + const existsElsewhere = mockAtLeafIndex !== undefined && !(mockAtLeafIndex == leafIndex); const existsStr = expectFound ? 'DOES exist' : 'does NOT exist'; - const foundAtStr = existsElsewhere - ? `at leafIndex=${mockAtLeafIndex.toNumber()} (exists at leafIndex=${leafIndex.toNumber()})` - : ''; + const foundAtStr = existsElsewhere ? `at leafIndex=${mockAtLeafIndex} (exists at leafIndex=${leafIndex})` : ''; it(`Should return ${expectFound} (and be traced) when noteHash ${existsStr} ${foundAtStr}`, async () => { if (mockAtLeafIndex !== undefined) { mockNoteHashExists(treesDB, mockAtLeafIndex, value0); } context.machineState.memory.set(value0Offset, new Field(value0)); // noteHash - context.machineState.memory.set(leafIndexOffset, new Field(leafIndex)); + context.machineState.memory.set(leafIndexOffset, new Uint64(leafIndex)); await new NoteHashExists( /*indirect=*/ 0, /*noteHashOffset=*/ value0Offset, @@ -211,7 +209,7 @@ describe('Accrued Substate', () => { }); it('Nullifier collision reverts (nullifier exists in host state)', async () => { - mockCheckNullifierExists(treesDB, true, leafIndex); + mockCheckNullifierExists(treesDB, true, new Fr(leafIndex)); context.machineState.memory.set(value0Offset, new Field(value0)); await expect(new EmitNullifier(/*indirect=*/ 0, /*offset=*/ value0Offset).execute(context)).rejects.toThrow( new InstructionExecutionError( @@ -246,18 +244,16 @@ describe('Accrued Substate', () => { describe.each([ [/*mockAtLeafIndex=*/ undefined], // doesn't exist at all [/*mockAtLeafIndex=*/ leafIndex], // should be found! - [/*mockAtLeafIndex=*/ leafIndex.add(Fr.ONE)], // won't be found! (checking leafIndex+1, but it exists at leafIndex) - ])('L1ToL2 message checks', (mockAtLeafIndex?: Fr) => { - const expectFound = mockAtLeafIndex !== undefined && mockAtLeafIndex.equals(leafIndex); - const existsElsewhere = mockAtLeafIndex !== undefined && !mockAtLeafIndex.equals(leafIndex); + [/*mockAtLeafIndex=*/ leafIndex + 1n], // won't be found! (checking leafIndex+1, but it exists at leafIndex) + ])('L1ToL2 message checks', (mockAtLeafIndex?: bigint) => { + const expectFound = mockAtLeafIndex !== undefined && mockAtLeafIndex == leafIndex; + const existsElsewhere = mockAtLeafIndex !== undefined && !(mockAtLeafIndex == leafIndex); const existsStr = expectFound ? 'DOES exist' : 'does NOT exist'; - const foundAtStr = existsElsewhere - ? `at leafIndex=${mockAtLeafIndex.toNumber()} (exists at leafIndex=${leafIndex.toNumber()})` - : ''; + const foundAtStr = existsElsewhere ? `at leafIndex=${mockAtLeafIndex} (exists at leafIndex=${leafIndex})` : ''; it(`Should return ${expectFound} (and be traced) when noteHash ${existsStr} ${foundAtStr}`, async () => { if (mockAtLeafIndex !== undefined) { - mockL1ToL2MessageExists(treesDB, mockAtLeafIndex, value0, /*valueAtOtherIndices=*/ value1); + mockL1ToL2MessageExists(treesDB, new Fr(mockAtLeafIndex), value0, /*valueAtOtherIndices=*/ value1); } context.machineState.memory.set(value0Offset, new Field(value0)); // noteHash diff --git a/yarn-project/simulator/src/public/avm/opcodes/accrued_substate.ts b/yarn-project/simulator/src/public/avm/opcodes/accrued_substate.ts index dafd681aab55..408938c4a4e9 100644 --- a/yarn-project/simulator/src/public/avm/opcodes/accrued_substate.ts +++ b/yarn-project/simulator/src/public/avm/opcodes/accrued_substate.ts @@ -36,11 +36,12 @@ export class NoteHashExists extends Instruction { ); const operands = [this.noteHashOffset, this.leafIndexOffset, this.existsOffset]; const [noteHashOffset, leafIndexOffset, existsOffset] = addressing.resolve(operands, memory); - memory.checkTags(TypeTag.FIELD, noteHashOffset, leafIndexOffset); + memory.checkTag(TypeTag.FIELD, noteHashOffset); + memory.checkTag(TypeTag.UINT64, leafIndexOffset); // Note that this instruction accepts any type in memory, and converts to Field. const noteHash = memory.get(noteHashOffset).toFr(); - const leafIndex = memory.get(leafIndexOffset).toFr(); + const leafIndex = memory.get(leafIndexOffset).toBigInt(); const exists = await context.persistableState.checkNoteHashExists(context.environment.address, noteHash, leafIndex); memory.set(existsOffset, exists ? new Uint1(1) : new Uint1(0)); diff --git a/yarn-project/simulator/src/public/avm/test_utils.ts b/yarn-project/simulator/src/public/avm/test_utils.ts index fa05a8fedca0..4026ac11336b 100644 --- a/yarn-project/simulator/src/public/avm/test_utils.ts +++ b/yarn-project/simulator/src/public/avm/test_utils.ts @@ -27,9 +27,9 @@ export function mockStorageReadWithMap(worldStateDB: PublicTreesDB, mockedStorag ); } -export function mockNoteHashExists(worldStateDB: PublicTreesDB, _leafIndex: Fr, value?: Fr) { +export function mockNoteHashExists(worldStateDB: PublicTreesDB, _leafIndex: bigint, value?: Fr) { (worldStateDB as jest.Mocked).getNoteHash.mockImplementation((index: bigint) => { - if (index == _leafIndex.toBigInt()) { + if (index == _leafIndex) { return Promise.resolve(value); } else { // This is ok for now since the traceing functions handle it diff --git a/yarn-project/simulator/src/public/state_manager/state_manager.test.ts b/yarn-project/simulator/src/public/state_manager/state_manager.test.ts index cf5730559a57..c2df94f6d994 100644 --- a/yarn-project/simulator/src/public/state_manager/state_manager.test.ts +++ b/yarn-project/simulator/src/public/state_manager/state_manager.test.ts @@ -1,3 +1,4 @@ +import { randomBigInt } from '@aztec/foundation/crypto'; import { Fr } from '@aztec/foundation/fields'; import { ProtocolContractAddress } from '@aztec/protocol-contracts'; import { AztecAddress } from '@aztec/stdlib/aztec-address'; @@ -25,7 +26,7 @@ import type { PublicPersistableStateManager } from './state_manager.js'; describe('state_manager', () => { let address: AztecAddress; const utxo = Fr.random(); - const leafIndex = Fr.random(); + const leafIndex = randomBigInt(2n << 64n); const firstNullifier = new Fr(4200); let treesDB: PublicTreesDB; @@ -86,13 +87,13 @@ describe('state_manager', () => { }); it('checkNullifierExists works for missing nullifiers', async () => { - mockCheckNullifierExists(treesDB, false, leafIndex); + mockCheckNullifierExists(treesDB, false, new Fr(leafIndex)); const exists = await persistableState.checkNullifierExists(address, utxo); expect(exists).toEqual(false); }); it('checkNullifierExists works for existing nullifiers', async () => { - mockCheckNullifierExists(treesDB, true, leafIndex); + mockCheckNullifierExists(treesDB, true, new Fr(leafIndex)); const exists = await persistableState.checkNullifierExists(address, utxo); expect(exists).toEqual(true); }); @@ -105,13 +106,13 @@ describe('state_manager', () => { }); it('checkL1ToL2MessageExists works for missing message', async () => { - const exists = await persistableState.checkL1ToL2MessageExists(utxo, leafIndex); + const exists = await persistableState.checkL1ToL2MessageExists(utxo, new Fr(leafIndex)); expect(exists).toEqual(false); }); it('checkL1ToL2MessageExists works for existing message', async () => { - mockL1ToL2MessageExists(treesDB, leafIndex, utxo); - const exists = await persistableState.checkL1ToL2MessageExists(utxo, leafIndex); + mockL1ToL2MessageExists(treesDB, new Fr(leafIndex), utxo); + const exists = await persistableState.checkL1ToL2MessageExists(utxo, new Fr(leafIndex)); expect(exists).toEqual(true); }); @@ -129,7 +130,7 @@ describe('state_manager', () => { const siloedNullifier = await siloNullifier(ProtocolContractAddress.ContractInstanceRegistry, address.toField()); mockGetContractInstance(contractsDB, contractInstance.withAddress(address)); - mockCheckNullifierExists(treesDB, true, leafIndex); + mockCheckNullifierExists(treesDB, true, new Fr(leafIndex)); await persistableState.getContractInstance(address); @@ -152,7 +153,7 @@ describe('state_manager', () => { const contractClass = await makeContractClassPublic(); contractClass.packedBytecode = bytecode; - mockCheckNullifierExists(treesDB, true, leafIndex); + mockCheckNullifierExists(treesDB, true, new Fr(leafIndex)); mockGetContractInstance(contractsDB, contractInstance.withAddress(address)); mockGetContractClass(contractsDB, contractClass); mockGetBytecodeCommitment(contractsDB, bytecodeCommitment); diff --git a/yarn-project/simulator/src/public/state_manager/state_manager.ts b/yarn-project/simulator/src/public/state_manager/state_manager.ts index b3f24c2d3605..bd621132dd8b 100644 --- a/yarn-project/simulator/src/public/state_manager/state_manager.ts +++ b/yarn-project/simulator/src/public/state_manager/state_manager.ts @@ -182,8 +182,8 @@ export class PublicPersistableStateManager { * @param leafIndex - the leaf index being checked * @returns true if the note hash exists at the given leaf index, false otherwise */ - public async checkNoteHashExists(contractAddress: AztecAddress, noteHash: Fr, leafIndex: Fr): Promise { - const gotLeafValue = await this.treesDB.getNoteHash(leafIndex.toBigInt()); + public async checkNoteHashExists(contractAddress: AztecAddress, noteHash: Fr, leafIndex: bigint): Promise { + const gotLeafValue = await this.treesDB.getNoteHash(leafIndex); const exists = gotLeafValue !== undefined && gotLeafValue.equals(noteHash); this.log.trace( `noteHashes(${contractAddress})@${noteHash} ?? leafIndex: ${leafIndex} | gotLeafValue: ${gotLeafValue}, exists: ${exists}.`,