Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
execution_components.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <memory>
4
#include <vector>
5
6
#include "
barretenberg/vm2/simulation/events/event_emitter.hpp
"
7
#include "
barretenberg/vm2/simulation/interfaces/execution_components.hpp
"
8
#include "
barretenberg/vm2/simulation/interfaces/gt.hpp
"
9
#include "
barretenberg/vm2/simulation/lib/instruction_info.hpp
"
10
11
namespace
bb::avm2::simulation
{
12
13
class
ExecutionComponentsProvider
:
public
ExecutionComponentsProviderInterface
{
14
public
:
15
ExecutionComponentsProvider
(
GreaterThanInterface
&
greater_than
,
16
const
InstructionInfoDBInterface
&
instruction_info_db
)
17
:
greater_than
(
greater_than
)
18
,
instruction_info_db
(
instruction_info_db
)
19
{}
20
std::unique_ptr<AddressingInterface>
make_addressing
(
AddressingEvent
&
event
)
override
;
21
22
std::unique_ptr<GasTrackerInterface>
make_gas_tracker
(
GasEvent
&
gas_event
,
23
const
Instruction
&
instruction
,
24
ContextInterface
&
context
)
override
;
25
26
private
:
27
GreaterThanInterface
&
greater_than
;
28
const
InstructionInfoDBInterface
&
instruction_info_db
;
29
30
// Improvement candidate AVM-265: We are creating one of these per execution row and only
31
// releasing them at the end of the TX.
32
std::vector<std::unique_ptr<EventEmitterInterface<AddressingEvent>
>>
addressing_event_emitters
;
33
};
34
35
}
// namespace bb::avm2::simulation
bb::avm2::context
Definition
context.hpp:37
bb::avm2::simulation::ContextInterface
Definition
context.hpp:21
bb::avm2::simulation::ExecutionComponentsProvider
Definition
execution_components.hpp:13
bb::avm2::simulation::ExecutionComponentsProvider::ExecutionComponentsProvider
ExecutionComponentsProvider(GreaterThanInterface &greater_than, const InstructionInfoDBInterface &instruction_info_db)
Definition
execution_components.hpp:15
bb::avm2::simulation::ExecutionComponentsProvider::make_gas_tracker
std::unique_ptr< GasTrackerInterface > make_gas_tracker(GasEvent &gas_event, const Instruction &instruction, ContextInterface &context) override
Create a gas tracker bound to the given event, instruction, and context.
Definition
execution_components.cpp:32
bb::avm2::simulation::ExecutionComponentsProvider::make_addressing
std::unique_ptr< AddressingInterface > make_addressing(AddressingEvent &event) override
Create an addressing resolver that writes its resolution results into the given event.
Definition
execution_components.cpp:16
bb::avm2::simulation::ExecutionComponentsProvider::addressing_event_emitters
std::vector< std::unique_ptr< EventEmitterInterface< AddressingEvent > > > addressing_event_emitters
Definition
execution_components.hpp:32
bb::avm2::simulation::ExecutionComponentsProvider::instruction_info_db
const InstructionInfoDBInterface & instruction_info_db
Definition
execution_components.hpp:28
bb::avm2::simulation::ExecutionComponentsProvider::greater_than
GreaterThanInterface & greater_than
Definition
execution_components.hpp:27
bb::avm2::simulation::ExecutionComponentsProviderInterface
Definition
execution_components.hpp:21
bb::avm2::simulation::GreaterThanInterface
Definition
gt.hpp:9
bb::avm2::simulation::InstructionInfoDBInterface
Definition
instruction_info.hpp:11
event_emitter.hpp
gas_event
GasEvent gas_event
Definition
gas_tracker.test.cpp:34
instruction
Instruction instruction
Definition
gas_tracker.test.cpp:33
instruction_info.hpp
execution_components.hpp
bb::avm2::simulation
AVM range check gadget for witness generation.
Definition
address_derivation_event.hpp:6
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
event
simulation::PublicDataTreeReadWriteEvent event
Definition
public_data_tree_trace.cpp:33
gt.hpp
bb::avm2::simulation::AddressingEvent
Definition
addressing_event.hpp:61
bb::avm2::simulation::GasEvent
Definition
gas_event.hpp:17
bb::avm2::simulation::Instruction
Definition
serialization.hpp:30
src
barretenberg
vm2
simulation
gadgets
execution_components.hpp
Generated by
1.9.8