Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bytecode_manager.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <memory>
5#include <optional>
6#include <span>
7#include <sys/types.h>
8#include <utility>
9#include <vector>
10
25
26namespace bb::avm2::simulation {
27
29 public:
49
50 BytecodeId get_bytecode(const AztecAddress& address) override;
52 Instruction read_instruction(const BytecodeId& bytecode_id, uint32_t pc) override;
53 Instruction read_instruction(const BytecodeId& bytecode_id,
54 std::shared_ptr<std::vector<uint8_t>> bytecode_ptr,
55 uint32_t pc) override;
56
57 private:
67
69};
70
101
102} // namespace bb::avm2::simulation
TxBytecodeManagerInterface & tx_bytecode_manager
Instruction read_instruction(uint32_t pc) override
BytecodeManager(AztecAddress address, TxBytecodeManagerInterface &tx_bytecode_manager)
std::optional< BytecodeId > bytecode_id
std::optional< BytecodeId > get_retrieved_bytecode_id() override
std::shared_ptr< std::vector< uint8_t > > bytecode_ptr
Core shared component for contract instance retrieval and validation.
HighLevelMerkleDBInterface & merkle_db
EventEmitterInterface< BytecodeDecompositionEvent > & decomposition_events
RetrievedBytecodesTreeCheckInterface & retrieved_bytecodes_tree_check
EventEmitterInterface< BytecodeRetrievalEvent > & retrieval_events
EventEmitterInterface< InstructionFetchingEvent > & fetching_events
unordered_flat_map< BytecodeId, std::shared_ptr< std::vector< uint8_t > > > bytecodes
std::shared_ptr< std::vector< uint8_t > > get_bytecode_data(const BytecodeId &bytecode_id) override
BytecodeHashingInterface & bytecode_hasher
ContractInstanceManagerInterface & contract_instance_manager
TxBytecodeManager(ContractDBInterface &contract_db, HighLevelMerkleDBInterface &merkle_db, BytecodeHashingInterface &bytecode_hasher, RangeCheckInterface &range_check, ContractInstanceManagerInterface &contract_instance_manager, RetrievedBytecodesTreeCheckInterface &retrieved_bytecodes_tree_check, EventEmitterInterface< BytecodeRetrievalEvent > &retrieval_events, EventEmitterInterface< BytecodeDecompositionEvent > &decomposition_events, EventEmitterInterface< InstructionFetchingEvent > &fetching_events)
BytecodeId get_bytecode(const AztecAddress &address) override
Instruction read_instruction(const BytecodeId &bytecode_id, uint32_t pc) override
virtual Instruction read_instruction(const BytecodeId &bytecode_id, uint32_t pc)=0
virtual BytecodeId get_bytecode(const AztecAddress &address)=0
virtual std::shared_ptr< std::vector< uint8_t > > get_bytecode_data(const BytecodeId &bytecode_id)=0
::ankerl::unordered_dense::map< Key, T > unordered_flat_map
Definition map.hpp:15
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13