Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bytecode_hashing.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <memory>
4
5
#include "
barretenberg/vm2/simulation/events/bytecode_events.hpp
"
6
#include "
barretenberg/vm2/simulation/events/event_emitter.hpp
"
7
#include "
barretenberg/vm2/simulation/gadgets/poseidon2.hpp
"
8
#include "
barretenberg/vm2/simulation/interfaces/bytecode_hashing.hpp
"
9
10
namespace
bb::avm2::simulation
{
11
12
class
BytecodeHasher
:
public
BytecodeHashingInterface
{
13
public
:
14
BytecodeHasher
(
Poseidon2Interface
&
hasher
,
EventEmitterInterface<BytecodeHashingEvent>
&
events
)
15
:
events
(
events
)
16
,
hasher
(
hasher
)
17
{}
18
19
void
assert_public_bytecode_commitment
(
const
BytecodeId
& bytecode_id,
20
const
std::vector<uint8_t>& bytecode,
21
const
FF
& public_bytecode_commitment)
override
;
22
23
private
:
24
EventEmitterInterface<BytecodeHashingEvent>
&
events
;
25
Poseidon2Interface
&
hasher
;
26
};
27
28
}
// namespace bb::avm2::simulation
bytecode_events.hpp
bb::avm2::simulation::BytecodeHasher
Definition
bytecode_hashing.hpp:12
bb::avm2::simulation::BytecodeHasher::assert_public_bytecode_commitment
void assert_public_bytecode_commitment(const BytecodeId &bytecode_id, const std::vector< uint8_t > &bytecode, const FF &public_bytecode_commitment) override
Definition
bytecode_hashing.cpp:9
bb::avm2::simulation::BytecodeHasher::BytecodeHasher
BytecodeHasher(Poseidon2Interface &hasher, EventEmitterInterface< BytecodeHashingEvent > &events)
Definition
bytecode_hashing.hpp:14
bb::avm2::simulation::BytecodeHasher::events
EventEmitterInterface< BytecodeHashingEvent > & events
Definition
bytecode_hashing.hpp:24
bb::avm2::simulation::BytecodeHasher::hasher
Poseidon2Interface & hasher
Definition
bytecode_hashing.hpp:25
bb::avm2::simulation::BytecodeHashingInterface
Definition
bytecode_hashing.hpp:11
bb::avm2::simulation::EventEmitterInterface
Definition
event_emitter.hpp:10
bb::avm2::simulation::Poseidon2Interface
Definition
poseidon2.hpp:14
event_emitter.hpp
bytecode_hashing.hpp
bb::avm2::simulation
Definition
address_derivation_event.hpp:6
bb::avm2::BytecodeId
FF BytecodeId
Definition
aztec_types.hpp:13
bb::avm2::FF
AvmFlavorSettings::FF FF
Definition
field.hpp:10
poseidon2.hpp
src
barretenberg
vm2
simulation
gadgets
bytecode_hashing.hpp
Generated by
1.9.8