Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
gas_event.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstdint>
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/instruction_spec.hpp
"
11
#include "
barretenberg/vm2/common/memory_types.hpp
"
12
#include "
barretenberg/vm2/simulation/lib/serialization.hpp
"
13
14
namespace
bb::avm2::simulation
{
15
16
struct
OutOfGasException
:
public
std::runtime_error {
17
explicit
OutOfGasException
(
const
std::string& message)
18
:
std
::runtime_error(message)
19
{}
20
};
21
22
struct
GasEvent
{
23
uint32_t
addressing_gas
= 0;
24
Gas
dynamic_gas_factor
= { 0, 0 };
25
26
uint64_t
limit_used_l2_comparison_witness
;
27
uint64_t
limit_used_da_comparison_witness
;
28
29
bool
oog_l2
=
false
;
30
bool
oog_da
=
false
;
31
32
bool
operator==
(
const
GasEvent
& other)
const
=
default
;
33
};
34
35
}
// namespace bb::avm2::simulation
aztec_types.hpp
instruction_spec.hpp
memory_types.hpp
bb::avm2::simulation
Definition
address_derivation.cpp:8
std
STL namespace.
serialization.hpp
bb::avm2::Gas
Definition
aztec_types.hpp:154
bb::avm2::simulation::GasEvent
Definition
gas_event.hpp:22
bb::avm2::simulation::GasEvent::addressing_gas
uint32_t addressing_gas
Definition
gas_event.hpp:23
bb::avm2::simulation::GasEvent::operator==
bool operator==(const GasEvent &other) const =default
bb::avm2::simulation::GasEvent::dynamic_gas_factor
Gas dynamic_gas_factor
Definition
gas_event.hpp:24
bb::avm2::simulation::GasEvent::limit_used_da_comparison_witness
uint64_t limit_used_da_comparison_witness
Definition
gas_event.hpp:27
bb::avm2::simulation::GasEvent::limit_used_l2_comparison_witness
uint64_t limit_used_l2_comparison_witness
Definition
gas_event.hpp:26
bb::avm2::simulation::GasEvent::oog_da
bool oog_da
Definition
gas_event.hpp:30
bb::avm2::simulation::GasEvent::oog_l2
bool oog_l2
Definition
gas_event.hpp:29
bb::avm2::simulation::OutOfGasException
Definition
gas_event.hpp:16
bb::avm2::simulation::OutOfGasException::OutOfGasException
OutOfGasException(const std::string &message)
Definition
gas_event.hpp:17
src
barretenberg
vm2
simulation
events
gas_event.hpp
Generated by
1.9.8