74 case world_state::MerkleTreeId::NULLIFIER_TREE:
75 return tree_roots.nullifier_tree;
76 case world_state::MerkleTreeId::PUBLIC_DATA_TREE:
77 return tree_roots.public_data_tree;
78 case world_state::MerkleTreeId::NOTE_HASH_TREE:
79 return tree_roots.note_hash_tree;
80 case world_state::MerkleTreeId::L1_TO_L2_MESSAGE_TREE:
81 return tree_roots.l1_to_l2_message_tree;
83 throw std::runtime_error(
"AVM cannot process tree id: " +
std::to_string(
static_cast<uint64_t
>(tree_id)));
90template <>
struct hash<
std::vector<bb::avm2::FF>> {
91 size_t operator()(
const std::vector<bb::avm2::FF>& vec)
const
93 size_t seed = vec.size();
94 for (
const auto& item : vec) {
auto & get_tree_info_helper(world_state::MerkleTreeId tree_id, auto &tree_roots)
void hash(State &state) noexcept
std::tuple< AppendOnlyTreeSnapshot, MerkleTreeId, index_t > GetSiblingPathKey
std::tuple< AppendOnlyTreeSnapshot, MerkleTreeId, index_t > GetLeafValueKey
std::tuple< uint32_t, ContractClassId > GetBytecodeCommitmentKey
std::tuple< AztecAddress, FunctionSelector > GetDebugFunctionNameKey
std::tuple< AppendOnlyTreeSnapshot, MerkleTreeId, NullifierLeafValue > SequentialInsertHintNullifierTreeKey
std::tuple< AppendOnlyTreeSnapshot, index_t > GetLeafPreimageKey
std::tuple< AppendOnlyTreeSnapshot, MerkleTreeId, PublicDataLeafValue > SequentialInsertHintPublicDataTreeKey
std::tuple< uint32_t, AztecAddress > GetContractInstanceKey
std::tuple< AppendOnlyTreeSnapshot, MerkleTreeId, FF > GetPreviousValueIndexKey
std::tuple< AppendOnlyTreeSnapshot, MerkleTreeId, std::vector< FF > > AppendLeavesHintKey
std::tuple< uint32_t, ContractClassId > GetContractClassKey
::ankerl::unordered_dense::map< Key, T > unordered_flat_map
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
std::string to_string(bb::avm2::ValueTag tag)
unordered_flat_map< GetContractClassKey, ContractClassHint > contract_classes
unordered_flat_map< uint32_t, ContractDBRevertCheckpointHint > revert_checkpoint_hints
unordered_flat_map< uint32_t, ContractDBCreateCheckpointHint > create_checkpoint_hints
unordered_flat_map< uint32_t, ContractDBCommitCheckpointHint > commit_checkpoint_hints
unordered_flat_map< GetDebugFunctionNameKey, DebugFunctionNameHint > debug_function_names
unordered_flat_map< GetContractInstanceKey, ContractInstanceHint > contract_instances
unordered_flat_map< GetBytecodeCommitmentKey, BytecodeCommitmentHint > bytecode_commitments
unordered_flat_map< uint32_t, CreateCheckpointHint > create_checkpoint_hints
unordered_flat_map< uint32_t, CommitCheckpointHint > commit_checkpoint_hints
unordered_flat_map< uint32_t, RevertCheckpointHint > revert_checkpoint_hints
unordered_flat_map< AppendLeavesHintKey, AppendLeavesHint > append_leaves_hints
unordered_flat_map< SequentialInsertHintPublicDataTreeKey, SequentialInsertHint< PublicDataLeafValue > > sequential_insert_hints_public_data_tree
unordered_flat_map< GetLeafPreimageKey, GetLeafPreimageHint< PublicDataTreeLeafPreimage > > get_leaf_preimage_hints_public_data_tree
unordered_flat_map< SequentialInsertHintNullifierTreeKey, SequentialInsertHint< NullifierLeafValue > > sequential_insert_hints_nullifier_tree
unordered_flat_map< GetSiblingPathKey, GetSiblingPathHint > get_sibling_path_hints
unordered_flat_map< GetLeafPreimageKey, GetLeafPreimageHint< NullifierTreeLeafPreimage > > get_leaf_preimage_hints_nullifier_tree
unordered_flat_map< GetLeafValueKey, GetLeafValueHint > get_leaf_value_hints
unordered_flat_map< GetPreviousValueIndexKey, GetPreviousValueIndexHint > get_previous_value_index_hints
uint32_t nullifier_counter
uint32_t l2_to_l1_msg_counter
uint32_t note_hash_counter
bool operator==(const TreeCounters &other) const =default
size_t operator()(const std::vector< bb::avm2::FF > &vec) const