Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
emit_unencrypted_log.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstdint>
4
5
#include "
barretenberg/vm2/common/aztec_types.hpp
"
6
#include "
barretenberg/vm2/common/field.hpp
"
7
#include "
barretenberg/vm2/common/memory_types.hpp
"
8
#include "
barretenberg/vm2/simulation/context.hpp
"
9
#include "
barretenberg/vm2/simulation/events/emit_unencrypted_log_event.hpp
"
10
#include "
barretenberg/vm2/simulation/events/event_emitter.hpp
"
11
#include "
barretenberg/vm2/simulation/lib/execution_id_manager.hpp
"
12
#include "
barretenberg/vm2/simulation/memory.hpp
"
13
14
namespace
bb::avm2::simulation
{
15
16
class
EmitUnencryptedLogInterface
{
17
public
:
18
virtual
~EmitUnencryptedLogInterface
() =
default
;
19
virtual
void
emit_unencrypted_log
(
MemoryInterface
&
memory
,
20
ContextInterface
&
context
,
21
AztecAddress
contract_address
,
22
MemoryAddress
log_offset,
23
uint32_t log_size) = 0;
24
};
25
26
class
EmitUnencryptedLog
:
public
EmitUnencryptedLogInterface
,
public
CheckpointNotifiable
{
27
public
:
28
EmitUnencryptedLog
(
ExecutionIdManagerInterface
&
execution_id_manager
,
29
GreaterThanInterface
&
greater_than
,
30
EventEmitterInterface<EmitUnencryptedLogEvent>
&
events
)
31
:
execution_id_manager
(
execution_id_manager
)
32
,
greater_than
(
greater_than
)
33
,
events
(
events
)
34
{}
35
36
void
emit_unencrypted_log
(
MemoryInterface
&
memory
,
37
ContextInterface
&
context
,
38
AztecAddress
contract_address
,
39
MemoryAddress
log_offset,
40
uint32_t log_size)
override
;
41
42
void
on_checkpoint_created
()
override
;
43
void
on_checkpoint_committed
()
override
;
44
void
on_checkpoint_reverted
()
override
;
45
46
private
:
47
ExecutionIdManagerInterface
&
execution_id_manager
;
48
GreaterThanInterface
&
greater_than
;
49
EventEmitterInterface<EmitUnencryptedLogEvent>
&
events
;
50
};
51
52
}
// namespace bb::avm2::simulation
aztec_types.hpp
bb::avm2::context
Definition
context.hpp:37
bb::avm2::emit_unencrypted_log
Definition
emit_unencrypted_log.hpp:36
bb::avm2::memory
Definition
memory.hpp:34
bb::avm2::simulation::CheckpointNotifiable
Definition
db_interfaces.hpp:108
bb::avm2::simulation::ContextInterface
Definition
context.hpp:23
bb::avm2::simulation::EmitUnencryptedLog
Definition
emit_unencrypted_log.hpp:26
bb::avm2::simulation::EmitUnencryptedLog::on_checkpoint_reverted
void on_checkpoint_reverted() override
Definition
emit_unencrypted_log.cpp:97
bb::avm2::simulation::EmitUnencryptedLog::greater_than
GreaterThanInterface & greater_than
Definition
emit_unencrypted_log.hpp:48
bb::avm2::simulation::EmitUnencryptedLog::execution_id_manager
ExecutionIdManagerInterface & execution_id_manager
Definition
emit_unencrypted_log.hpp:47
bb::avm2::simulation::EmitUnencryptedLog::on_checkpoint_committed
void on_checkpoint_committed() override
Definition
emit_unencrypted_log.cpp:92
bb::avm2::simulation::EmitUnencryptedLog::events
EventEmitterInterface< EmitUnencryptedLogEvent > & events
Definition
emit_unencrypted_log.hpp:49
bb::avm2::simulation::EmitUnencryptedLog::on_checkpoint_created
void on_checkpoint_created() override
Definition
emit_unencrypted_log.cpp:87
bb::avm2::simulation::EmitUnencryptedLog::EmitUnencryptedLog
EmitUnencryptedLog(ExecutionIdManagerInterface &execution_id_manager, GreaterThanInterface &greater_than, EventEmitterInterface< EmitUnencryptedLogEvent > &events)
Definition
emit_unencrypted_log.hpp:28
bb::avm2::simulation::EmitUnencryptedLogInterface
Definition
emit_unencrypted_log.hpp:16
bb::avm2::simulation::EmitUnencryptedLogInterface::~EmitUnencryptedLogInterface
virtual ~EmitUnencryptedLogInterface()=default
bb::avm2::simulation::EmitUnencryptedLogInterface::emit_unencrypted_log
virtual void emit_unencrypted_log(MemoryInterface &memory, ContextInterface &context, AztecAddress contract_address, MemoryAddress log_offset, uint32_t log_size)=0
bb::avm2::simulation::EventEmitterInterface
Definition
event_emitter.hpp:10
bb::avm2::simulation::ExecutionIdManagerInterface
Definition
execution_id_manager.hpp:13
bb::avm2::simulation::GreaterThanInterface
Definition
gt.hpp:14
bb::avm2::simulation::MemoryInterface
Definition
memory.hpp:14
contract_address
AztecAddress contract_address
Definition
written_public_data_slots_tree_check.test.cpp:96
emit_unencrypted_log_event.hpp
event_emitter.hpp
execution_id_manager.hpp
memory_types.hpp
bb::avm2::simulation
Definition
address_derivation.cpp:8
bb::avm2::AztecAddress
FF AztecAddress
Definition
aztec_types.hpp:11
bb::avm2::MemoryAddress
uint32_t MemoryAddress
Definition
memory_types.hpp:11
context.hpp
memory.hpp
field.hpp
src
barretenberg
vm2
simulation
emit_unencrypted_log.hpp
Generated by
1.9.8