Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
class_id_derivation.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
barretenberg/vm2/common/aztec_types.hpp
"
4
#include "
barretenberg/vm2/common/set.hpp
"
5
#include "
barretenberg/vm2/simulation/events/class_id_derivation_event.hpp
"
6
#include "
barretenberg/vm2/simulation/events/event_emitter.hpp
"
7
#include "
barretenberg/vm2/simulation/gadgets/poseidon2.hpp
"
8
#include "
barretenberg/vm2/simulation/interfaces/class_id_derivation.hpp
"
9
10
namespace
bb::avm2::simulation
{
11
12
class
ClassIdDerivation
:
public
ClassIdDerivationInterface
{
13
public
:
14
ClassIdDerivation
(
Poseidon2Interface
&
poseidon2
,
EventEmitterInterface<ClassIdDerivationEvent>
&
events
)
15
:
events
(
events
)
16
,
poseidon2
(
poseidon2
)
17
{}
18
19
void
assert_derivation
(
const
ContractClassId
&
class_id
,
const
ContractClass
& klass)
override
;
20
21
private
:
22
EventEmitterInterface<ClassIdDerivationEvent>
&
events
;
23
Poseidon2Interface
&
poseidon2
;
24
25
// Cache for class ID derivations to avoid repeating derivations
26
unordered_flat_set<ContractClassId>
cached_derivations
;
27
};
28
29
}
// namespace bb::avm2::simulation
aztec_types.hpp
class_id_derivation_event.hpp
bb::avm2::simulation::ClassIdDerivation
Definition
class_id_derivation.hpp:12
bb::avm2::simulation::ClassIdDerivation::events
EventEmitterInterface< ClassIdDerivationEvent > & events
Definition
class_id_derivation.hpp:22
bb::avm2::simulation::ClassIdDerivation::ClassIdDerivation
ClassIdDerivation(Poseidon2Interface &poseidon2, EventEmitterInterface< ClassIdDerivationEvent > &events)
Definition
class_id_derivation.hpp:14
bb::avm2::simulation::ClassIdDerivation::assert_derivation
void assert_derivation(const ContractClassId &class_id, const ContractClass &klass) override
Definition
class_id_derivation.cpp:11
bb::avm2::simulation::ClassIdDerivation::poseidon2
Poseidon2Interface & poseidon2
Definition
class_id_derivation.hpp:23
bb::avm2::simulation::ClassIdDerivation::cached_derivations
unordered_flat_set< ContractClassId > cached_derivations
Definition
class_id_derivation.hpp:26
bb::avm2::simulation::ClassIdDerivationInterface
Definition
class_id_derivation.hpp:7
bb::avm2::simulation::EventEmitterInterface
Definition
event_emitter.hpp:10
bb::avm2::simulation::Poseidon2Interface
Definition
poseidon2.hpp:14
bb::crypto::Poseidon2< crypto::Poseidon2Bn254ScalarFieldParams >
class_id
FF class_id
Definition
retrieved_bytecodes_tree_check.test.cpp:90
event_emitter.hpp
bb::avm2::simulation
Definition
address_derivation_event.hpp:6
bb::avm2::unordered_flat_set
::ankerl::unordered_dense::set< Key > unordered_flat_set
Definition
set.hpp:11
bb::avm2::ContractClassId
FF ContractClassId
Definition
aztec_types.hpp:14
set.hpp
class_id_derivation.hpp
bb::avm2::ContractClass
Definition
aztec_types.hpp:96
poseidon2.hpp
src
barretenberg
vm2
simulation
gadgets
class_id_derivation.hpp
Generated by
1.9.8