Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
protocol_contracts.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
barretenberg/avm_fuzzer/common/weighted_selection.hpp
"
4
#include "
barretenberg/vm2/common/avm_io.hpp
"
5
#include "
barretenberg/vm2/common/aztec_types.hpp
"
6
7
#include <random>
8
9
namespace
bb::avm2::fuzzer
{
10
11
enum class
ProtocolContractsMutationOptions
: uint8_t {
12
Mutate
,
13
Remove
,
14
};
15
16
using
ProtocolContractsMutationConfig
=
WeightedSelectionConfig<ProtocolContractsMutationOptions, 2>
;
17
18
constexpr
ProtocolContractsMutationConfig
PROTOCOL_CONTRACTS_MUTATION_CONFIGURATION
=
ProtocolContractsMutationConfig
({
19
{
ProtocolContractsMutationOptions::Mutate
, 3 },
20
{
ProtocolContractsMutationOptions::Remove
, 1 },
21
});
22
23
void
mutate_protocol_contracts
(
bb::avm2::ProtocolContracts
& protocol_contracts,
24
bb::avm2::Tx
&
tx
,
25
const
std::vector<AztecAddress>& contract_addresses,
26
std::mt19937_64
& rng);
27
28
}
// namespace bb::avm2::fuzzer
avm_io.hpp
aztec_types.hpp
WeightedSelectionConfig
Definition
weighted_selection.hpp:8
bb::avm2::tx
Definition
tx.hpp:36
bb::avm2::fuzzer
Definition
dbs.cpp:19
bb::avm2::fuzzer::PROTOCOL_CONTRACTS_MUTATION_CONFIGURATION
constexpr ProtocolContractsMutationConfig PROTOCOL_CONTRACTS_MUTATION_CONFIGURATION
Definition
protocol_contracts.hpp:18
bb::avm2::fuzzer::mutate_protocol_contracts
void mutate_protocol_contracts(ProtocolContracts &protocol_contracts, Tx &tx, const std::vector< AztecAddress > &contract_addresses, std::mt19937_64 &rng)
Definition
protocol_contracts.cpp:34
bb::avm2::fuzzer::ProtocolContractsMutationConfig
WeightedSelectionConfig< ProtocolContractsMutationOptions, 2 > ProtocolContractsMutationConfig
Definition
protocol_contracts.hpp:16
bb::avm2::fuzzer::ProtocolContractsMutationOptions
ProtocolContractsMutationOptions
Definition
protocol_contracts.hpp:11
bb::avm2::fuzzer::ProtocolContractsMutationOptions::Remove
@ Remove
bb::avm2::fuzzer::ProtocolContractsMutationOptions::Mutate
@ Mutate
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
bb::avm2::ProtocolContracts
Definition
aztec_types.hpp:588
bb::avm2::Tx
Definition
avm_io.hpp:329
weighted_selection.hpp
src
barretenberg
avm_fuzzer
mutations
protocol_contracts.hpp
Generated by
1.9.8