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 <optional>
5
#include <stdexcept>
6
#include <string>
7
#include <vector>
8
9
#include "
barretenberg/vm2/common/aztec_types.hpp
"
10
#include "
barretenberg/vm2/common/field.hpp
"
11
#include "
barretenberg/vm2/common/memory_types.hpp
"
12
13
namespace
bb::avm2::simulation
{
14
15
// Forward declarations
16
class
ContextInterface;
17
18
struct
EnqueuedCallResult
{
19
bool
success
;
20
Gas
gas_used
;
21
};
22
23
class
ExecutionInterface
{
24
public
:
25
virtual
~ExecutionInterface
() =
default
;
26
// Returns the top-level execution result. TODO: This should only be top level enqueud calls
27
virtual
EnqueuedCallResult
execute
(
std::unique_ptr<ContextInterface>
context
) = 0;
28
};
29
30
class
RegisterValidationException
:
public
std::runtime_error {
31
public
:
32
RegisterValidationException
(
const
std::string& message)
33
:
std
::runtime_error(message)
34
{}
35
};
36
37
class
OpcodeExecutionException
:
public
std::runtime_error {
38
public
:
39
OpcodeExecutionException
(
const
std::string& message)
40
:
std
::runtime_error(message)
41
{}
42
};
43
44
}
// namespace bb::avm2::simulation
aztec_types.hpp
bb::avm2::context
Definition
context.hpp:37
bb::avm2::simulation::ExecutionInterface
Definition
execution.hpp:23
bb::avm2::simulation::ExecutionInterface::~ExecutionInterface
virtual ~ExecutionInterface()=default
bb::avm2::simulation::ExecutionInterface::execute
virtual EnqueuedCallResult execute(std::unique_ptr< ContextInterface > context)=0
bb::avm2::simulation::OpcodeExecutionException
Definition
execution.hpp:37
bb::avm2::simulation::OpcodeExecutionException::OpcodeExecutionException
OpcodeExecutionException(const std::string &message)
Definition
execution.hpp:39
bb::avm2::simulation::RegisterValidationException
Definition
execution.hpp:30
bb::avm2::simulation::RegisterValidationException::RegisterValidationException
RegisterValidationException(const std::string &message)
Definition
execution.hpp:32
memory_types.hpp
bb::avm2::simulation
Definition
address_derivation_event.hpp:6
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:317
bb::avm2::simulation::EnqueuedCallResult
Definition
execution.hpp:18
bb::avm2::simulation::EnqueuedCallResult::gas_used
Gas gas_used
Definition
execution.hpp:20
bb::avm2::simulation::EnqueuedCallResult::success
bool success
Definition
execution.hpp:19
field.hpp
src
barretenberg
vm2
simulation
interfaces
execution.hpp
Generated by
1.9.8