31 .current_contract_class_id =
instance->current_contract_class_id,
32 .original_contract_class_id =
instance->original_contract_class_id,
33 .initialization_hash =
instance->initialization_hash,
34 .immutables_hash =
instance->immutables_hash,
36 .ivpk_m =
instance->public_keys.incoming_viewing_key,
37 .ovpk_m_hash =
instance->public_keys.outgoing_viewing_key_hash,
38 .tpk_m_hash =
instance->public_keys.tagging_key_hash,
39 .mspk_m_hash =
instance->public_keys.message_signing_key_hash,
40 .fbpk_m_hash =
instance->public_keys.fallback_key_hash }
53 if (klass.has_value()) {
58 .artifact_hash = klass->artifact_hash,
59 .private_functions_root = klass->private_functions_root,
61 .packed_bytecode = klass->packed_bytecode,
71 if (commitment.has_value()) {
75 .commitment = commitment.value() };
85 if (name.has_value()) {
110 .old_checkpoint_id = old_checkpoint_id,
128 .old_checkpoint_id = old_checkpoint_id,
146 .old_checkpoint_id = old_checkpoint_id,
163 [](
const auto& mapped_contract_instance) { return mapped_contract_instance.second; });
167 [](
const auto& mapped_contract_class) { return mapped_contract_class.second; });
171 [](
const auto& mapped_bytecode_commitment) { return mapped_bytecode_commitment.second; });
175 [](
const auto& mapped_debug_function_name) { return mapped_debug_function_name.second; });
177 std::ranges::transform(
180 [](
const auto& mapped_create_checkpoint_hint) { return mapped_create_checkpoint_hint.second; });
182 std::ranges::transform(
185 [](
const auto& mapped_commit_checkpoint_hint) { return mapped_commit_checkpoint_hint.second; });
187 std::ranges::transform(
190 [](
const auto& mapped_revert_checkpoint_hint) { return mapped_revert_checkpoint_hint.second; });
244 .
hint_key = tree_info, .index = leaf_index, .leaf_preimage = preimage
255 .
hint_key = tree_info, .index = leaf_index, .leaf_preimage = preimage
277 .state_after = state_after
301 .state_after = state_after
317 .old_checkpoint_id = old_checkpoint_id,
333 .old_checkpoint_id = old_checkpoint_id,
351 .old_checkpoint_id = old_checkpoint_id,
353 .state_before = state_before,
354 .state_after = state_after,
370 AppendLeavesHintKey append_key = { state_before, tree_id, std::vector<FF>(leaves.begin(), leaves.end()) };
379 .leaves = std::vector<FF>(leaves.begin(), leaves.end()) };
384 std::ranges::transform(
387 [](
const auto& mapped_get_sibling_path_hint) { return mapped_get_sibling_path_hint.second; });
389 std::ranges::transform(
392 [](
const auto& mapped_get_previous_value_index_hint) { return mapped_get_previous_value_index_hint.second; });
394 std::ranges::transform(
397 [](
const auto& mapped_get_leaf_preimage_hint) { return mapped_get_leaf_preimage_hint.second; });
399 std::ranges::transform(
402 [](
const auto& mapped_get_leaf_preimage_hint) { return mapped_get_leaf_preimage_hint.second; });
406 [](
const auto& mapped_get_leaf_value_hint) { return mapped_get_leaf_value_hint.second; });
408 std::ranges::transform(
411 [](
const auto& mapped_sequential_insert_hint) { return mapped_sequential_insert_hint.second; });
413 std::ranges::transform(
416 [](
const auto& mapped_sequential_insert_hint) { return mapped_sequential_insert_hint.second; });
420 [](
const auto& mapped_append_leaves_hint) { return mapped_append_leaves_hint.second; });
422 std::ranges::transform(
425 [](
const auto& mapped_create_checkpoint_hint) { return mapped_create_checkpoint_hint.second; });
427 std::ranges::transform(
430 [](
const auto& mapped_commit_checkpoint_hint) { return mapped_commit_checkpoint_hint.second; });
432 std::ranges::transform(
435 [](
const auto& mapped_revert_checkpoint_hint) { return mapped_revert_checkpoint_hint.second; });
#define BB_ASSERT(expression,...)
std::shared_ptr< Napi::ThreadSafeFunction > instance
virtual void commit_checkpoint()=0
virtual void revert_checkpoint()=0
virtual void add_contracts(const ContractDeploymentData &contract_deployment_data)=0
virtual std::optional< FF > get_bytecode_commitment(const ContractClassId &class_id) const =0
virtual std::optional< std::string > get_debug_function_name(const AztecAddress &address, const FunctionSelector &selector) const =0
virtual void create_checkpoint()=0
virtual std::optional< ContractInstance > get_contract_instance(const AztecAddress &address) const =0
virtual std::optional< ContractClass > get_contract_class(const ContractClassId &class_id) const =0
std::optional< std::string > get_debug_function_name(const AztecAddress &address, const FunctionSelector &selector) const override
std::optional< ContractClass > get_contract_class(const ContractClassId &class_id) const override
uint32_t get_checkpoint_id() const
uint32_t next_checkpoint_id
void commit_checkpoint() override
std::optional< FF > get_bytecode_commitment(const ContractClassId &class_id) const override
void add_contracts(const ContractDeploymentData &contract_deployment_data) override
MappedContractHints contract_hints
void create_checkpoint() override
uint32_t checkpoint_action_counter
void dump_hints(ExecutionHints &hints)
std::optional< ContractInstance > get_contract_instance(const AztecAddress &address) const override
void revert_checkpoint() override
std::stack< uint32_t > checkpoint_stack
void create_checkpoint() override
void dump_hints(ExecutionHints &hints)
SequentialInsertionResult< NullifierLeafValue > insert_indexed_leaves_nullifier_tree(const NullifierLeafValue &leaf_value) override
IndexedLeaf< NullifierLeafValue > get_leaf_preimage_nullifier_tree(index_t leaf_index) const override
SiblingPath get_sibling_path(MerkleTreeId tree_id, index_t leaf_index) const override
GetLowIndexedLeafResponse get_low_indexed_leaf(MerkleTreeId tree_id, const FF &value) const override
LowLevelMerkleDBInterface & db
void revert_checkpoint() override
void commit_checkpoint() override
MappedMerkleHints merkle_hints
void append_leaves(MerkleTreeId tree_id, std::span< const FF > leaves) override
uint32_t checkpoint_action_counter
FF get_leaf_value(MerkleTreeId tree_id, index_t leaf_index) const override
IndexedLeaf< PublicDataLeafValue > get_leaf_preimage_public_data_tree(index_t leaf_index) const override
SequentialInsertionResult< PublicDataLeafValue > insert_indexed_leaves_public_data_tree(const PublicDataLeafValue &leaf_value) override
AppendOnlyTreeSnapshot get_tree_info(MerkleTreeId tree_id) const
void pad_tree(MerkleTreeId tree_id, size_t num_leaves) override
virtual IndexedLeaf< PublicDataLeafValue > get_leaf_preimage_public_data_tree(index_t leaf_index) const =0
virtual void revert_checkpoint()=0
virtual void commit_checkpoint()=0
virtual void create_checkpoint()=0
virtual TreeSnapshots get_tree_roots() const =0
virtual void pad_tree(MerkleTreeId tree_id, size_t num_leaves)=0
virtual IndexedLeaf< NullifierLeafValue > get_leaf_preimage_nullifier_tree(index_t leaf_index) const =0
virtual SequentialInsertionResult< NullifierLeafValue > insert_indexed_leaves_nullifier_tree(const NullifierLeafValue &leaf_value)=0
virtual GetLowIndexedLeafResponse get_low_indexed_leaf(MerkleTreeId tree_id, const FF &value) const =0
virtual SiblingPath get_sibling_path(MerkleTreeId tree_id, index_t leaf_index) const =0
virtual uint32_t get_checkpoint_id() const =0
virtual SequentialInsertionResult< PublicDataLeafValue > insert_indexed_leaves_public_data_tree(const PublicDataLeafValue &leaf_value)=0
virtual void append_leaves(MerkleTreeId tree_id, std::span< const FF > leaves)=0
virtual FF get_leaf_value(MerkleTreeId tree_id, index_t leaf_index) const =0
auto & get_tree_info_helper(world_state::MerkleTreeId tree_id, auto &tree_roots)
AVM range check gadget for witness generation.
::bb::crypto::merkle_tree::fr_sibling_path SiblingPath
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
::bb::crypto::merkle_tree::index_t index_t
std::tuple< uint32_t, ContractClassId > GetContractClassKey
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
AppendOnlyTreeSnapshot hint_key
std::vector< SequentialInsertHint< crypto::merkle_tree::NullifierLeafValue > > sequential_insert_hints_nullifier_tree
std::vector< GetSiblingPathHint > get_sibling_path_hints
std::vector< DebugFunctionNameHint > debug_function_names
std::vector< ContractDBCreateCheckpointHint > contract_db_create_checkpoint_hints
std::vector< ContractDBCommitCheckpointHint > contract_db_commit_checkpoint_hints
std::vector< CommitCheckpointHint > commit_checkpoint_hints
std::vector< SequentialInsertHint< crypto::merkle_tree::PublicDataLeafValue > > sequential_insert_hints_public_data_tree
std::vector< RevertCheckpointHint > revert_checkpoint_hints
std::vector< ContractDBRevertCheckpointHint > contract_db_revert_checkpoint_hints
std::vector< GetPreviousValueIndexHint > get_previous_value_index_hints
std::vector< GetLeafPreimageHint< crypto::merkle_tree::IndexedLeaf< crypto::merkle_tree::PublicDataLeafValue > > > get_leaf_preimage_hints_public_data_tree
std::vector< GetLeafPreimageHint< crypto::merkle_tree::IndexedLeaf< crypto::merkle_tree::NullifierLeafValue > > > get_leaf_preimage_hints_nullifier_tree
std::vector< CreateCheckpointHint > create_checkpoint_hints
std::vector< GetLeafValueHint > get_leaf_value_hints
std::vector< AppendLeavesHint > append_leaves_hints
std::vector< ContractInstanceHint > contract_instances
std::vector< ContractClassHint > contract_classes
std::vector< BytecodeCommitmentHint > bytecode_commitments
AppendOnlyTreeSnapshot hint_key
AppendOnlyTreeSnapshot hint_key
AppendOnlyTreeSnapshot hint_key
AppendOnlyTreeSnapshot hint_key
AppendOnlyTreeSnapshot hint_key
AppendOnlyTreeSnapshot public_data_tree
AppendOnlyTreeSnapshot nullifier_tree
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
std::vector< crypto::merkle_tree::LeafUpdateWitnessData< LeafValueType > > low_leaf_witness_data
std::vector< crypto::merkle_tree::LeafUpdateWitnessData< LeafValueType > > insertion_witness_data