Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
execution.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <memory>
4
#include <stdexcept>
5
#include <string>
6
7
#include "
barretenberg/vm2/common/aztec_types.hpp
"
8
#include "
barretenberg/vm2/common/field.hpp
"
9
#include "
barretenberg/vm2/common/memory_types.hpp
"
10
11
namespace
bb::avm2::simulation
{
12
13
// Forward declarations
14
class
ContextInterface;
15
16
struct
ExecutionResult
{
17
MemoryAddress
rd_offset
;
18
MemoryAddress
rd_size
;
19
Gas
gas_used
;
20
SideEffectStates
side_effect_states
;
21
bool
success
;
22
};
23
24
class
ExecutionInterface
{
25
public
:
26
virtual
~ExecutionInterface
() =
default
;
27
// Returns the top-level execution result. TODO: This should only be top level enqueud calls
28
virtual
ExecutionResult
execute
(
std::unique_ptr<ContextInterface>
context
) = 0;
29
};
30
31
class
RegisterValidationException
:
public
std::runtime_error {
32
public
:
33
RegisterValidationException
(
const
std::string& message)
34
:
std
::runtime_error(message)
35
{}
36
};
37
38
class
OpcodeExecutionException
:
public
std::runtime_error {
39
public
:
40
OpcodeExecutionException
(
const
std::string& message)
41
:
std
::runtime_error(message)
42
{}
43
};
44
45
}
// namespace bb::avm2::simulation
aztec_types.hpp
bb::avm2::context
Definition
context.hpp:37
bb::avm2::simulation::ExecutionInterface
Definition
execution.hpp:24
bb::avm2::simulation::ExecutionInterface::execute
virtual ExecutionResult execute(std::unique_ptr< ContextInterface > context)=0
bb::avm2::simulation::ExecutionInterface::~ExecutionInterface
virtual ~ExecutionInterface()=default
bb::avm2::simulation::OpcodeExecutionException
Definition
execution.hpp:38
bb::avm2::simulation::OpcodeExecutionException::OpcodeExecutionException
OpcodeExecutionException(const std::string &message)
Definition
execution.hpp:40
bb::avm2::simulation::RegisterValidationException
Definition
execution.hpp:31
bb::avm2::simulation::RegisterValidationException::RegisterValidationException
RegisterValidationException(const std::string &message)
Definition
execution.hpp:33
memory_types.hpp
bb::avm2::simulation
Definition
address_derivation_event.hpp:6
bb::avm2::MemoryAddress
uint32_t MemoryAddress
Definition
memory_types.hpp:11
std
STL namespace.
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
bb::avm2::Gas
Definition
aztec_types.hpp:175
bb::avm2::SideEffectStates
Definition
aztec_types.hpp:335
bb::avm2::simulation::ExecutionResult
Definition
execution.hpp:16
bb::avm2::simulation::ExecutionResult::success
bool success
Definition
execution.hpp:21
bb::avm2::simulation::ExecutionResult::rd_offset
MemoryAddress rd_offset
Definition
execution.hpp:17
bb::avm2::simulation::ExecutionResult::rd_size
MemoryAddress rd_size
Definition
execution.hpp:18
bb::avm2::simulation::ExecutionResult::side_effect_states
SideEffectStates side_effect_states
Definition
execution.hpp:20
bb::avm2::simulation::ExecutionResult::gas_used
Gas gas_used
Definition
execution.hpp:19
field.hpp
src
barretenberg
vm2
simulation
interfaces
execution.hpp
Generated by
1.9.8