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 <span>
5
6
#include "
barretenberg/vm2/common/aztec_types.hpp
"
7
#include "
barretenberg/vm2/common/field.hpp
"
8
#include "
barretenberg/vm2/simulation/events/addressing_event.hpp
"
9
#include "
barretenberg/vm2/simulation/events/context_events.hpp
"
10
#include "
barretenberg/vm2/simulation/events/event_emitter.hpp
"
11
#include "
barretenberg/vm2/simulation/events/memory_event.hpp
"
12
#include "
barretenberg/vm2/simulation/gadgets/addressing.hpp
"
13
#include "
barretenberg/vm2/simulation/gadgets/bytecode_manager.hpp
"
14
#include "
barretenberg/vm2/simulation/gadgets/context.hpp
"
15
#include "
barretenberg/vm2/simulation/gadgets/gas_tracker.hpp
"
16
#include "
barretenberg/vm2/simulation/gadgets/gt.hpp
"
17
#include "
barretenberg/vm2/simulation/gadgets/memory.hpp
"
18
#include "
barretenberg/vm2/simulation/gadgets/range_check.hpp
"
19
#include "
barretenberg/vm2/simulation/interfaces/execution_components.hpp
"
20
21
namespace
bb::avm2::simulation
{
22
23
class
ExecutionComponentsProvider
:
public
ExecutionComponentsProviderInterface
{
24
public
:
25
ExecutionComponentsProvider
(
GreaterThanInterface
&
greater_than
,
26
const
InstructionInfoDBInterface
&
instruction_info_db
)
27
:
greater_than
(
greater_than
)
28
,
instruction_info_db
(
instruction_info_db
)
29
{}
30
std::unique_ptr<AddressingInterface>
make_addressing
(
AddressingEvent
&
event
)
override
;
31
32
std::unique_ptr<GasTrackerInterface>
make_gas_tracker
(
GasEvent
&
gas_event
,
33
const
Instruction
&
instruction
,
34
ContextInterface
&
context
)
override
;
35
36
private
:
37
GreaterThanInterface
&
greater_than
;
38
const
InstructionInfoDBInterface
&
instruction_info_db
;
39
40
// Sadly someone has to own these.
41
// TODO(fcarreiro): We are creating one of these per execution row and only releasing them at
42
// the end of the TX. Ideally we'd improve this.
43
std::vector<std::unique_ptr<EventEmitterInterface<AddressingEvent>
>>
addressing_event_emitters
;
44
};
45
46
}
// namespace bb::avm2::simulation
addressing_event.hpp
aztec_types.hpp
bb::avm2::context
Definition
context.hpp:37
bb::avm2::simulation::ContextInterface
Definition
context.hpp:19
bb::avm2::simulation::ExecutionComponentsProvider
Definition
execution_components.hpp:23
bb::avm2::simulation::ExecutionComponentsProvider::ExecutionComponentsProvider
ExecutionComponentsProvider(GreaterThanInterface &greater_than, const InstructionInfoDBInterface &instruction_info_db)
Definition
execution_components.hpp:25
bb::avm2::simulation::ExecutionComponentsProvider::make_gas_tracker
std::unique_ptr< GasTrackerInterface > make_gas_tracker(GasEvent &gas_event, const Instruction &instruction, ContextInterface &context) override
Definition
execution_components.cpp:18
bb::avm2::simulation::ExecutionComponentsProvider::make_addressing
std::unique_ptr< AddressingInterface > make_addressing(AddressingEvent &event) override
Definition
execution_components.cpp:10
bb::avm2::simulation::ExecutionComponentsProvider::addressing_event_emitters
std::vector< std::unique_ptr< EventEmitterInterface< AddressingEvent > > > addressing_event_emitters
Definition
execution_components.hpp:43
bb::avm2::simulation::ExecutionComponentsProvider::instruction_info_db
const InstructionInfoDBInterface & instruction_info_db
Definition
execution_components.hpp:38
bb::avm2::simulation::ExecutionComponentsProvider::greater_than
GreaterThanInterface & greater_than
Definition
execution_components.hpp:37
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
context_events.hpp
event_emitter.hpp
bytecode_manager.hpp
gas_tracker.hpp
gas_event
GasEvent gas_event
Definition
gas_tracker.test.cpp:34
instruction
Instruction instruction
Definition
gas_tracker.test.cpp:33
execution_components.hpp
memory_event.hpp
bb::avm2::simulation
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:24
addressing.hpp
context.hpp
gt.hpp
memory.hpp
range_check.hpp
bb::avm2::simulation::AddressingEvent
Definition
addressing_event.hpp:52
bb::avm2::simulation::GasEvent
Definition
gas_event.hpp:22
bb::avm2::simulation::Instruction
Definition
serialization.hpp:30
field.hpp
src
barretenberg
vm2
simulation
gadgets
execution_components.hpp
Generated by
1.9.8