|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Classes | |
| class | FuzzerContext |
| class | FuzzerContractDB |
| class | FuzzerWorldStateManager |
| struct | InstructionBlock |
| class | InstructionMutator |
Enumerations | |
| enum class | ProtocolContractsMutationOptions : uint8_t { Mutate , Remove } |
| enum class | AccumulatedDataMutationOptions : uint8_t { NoteHashes , NoteHashesLimit , Nullifiers , NullifiersLimit , L2ToL1Messages , L2ToL1MessagesLimit } |
| enum class | GasSettingsMutationOptions : uint8_t { GasLimits , TeardownGasLimits , MaxFeesPerGas , MaxPriorityFeesPerGas } |
| enum class | PublicCallRequestMutationOptions : uint8_t { ContractAddress , MsgSender , IsStaticCall , Calldata } |
Variables | |
| constexpr uint16_t | MAX_INSTRUCTION_BLOCK_SIZE_ON_GENERATION = 10 |
| constexpr ProtocolContractsMutationConfig | PROTOCOL_CONTRACTS_MUTATION_CONFIGURATION |
| constexpr AccumulatedDataMutationConfig | ACCUMULATED_DATA_MUTATION_CONFIGURATION |
| constexpr uint128_t | MIN_FEE = 1 |
| constexpr uint128_t | MAX_FEE = 1000 |
| constexpr uint32_t | MIN_GAS = 0 |
| constexpr uint32_t | AVM_MAX_PROCESSABLE_DA_GAS |
| constexpr GasSettingsMutationConfig | GAS_SETTINGS_MUTATION_CONFIGURATION |
| constexpr uint16_t | MAX_CALLDATA_SIZE = 256 |
| constexpr PublicCallRequestMutationConfig | PUB_REQUEST_MUTATION_CONFIGURATION |
FuzzerContext holds environment data for fuzzer instruction generation and contract management. Top-level fuzzers create and modify this context, but it's passed as const& to instruction generation functions (read-only access during generation).
| using bb::avm2::fuzzer::AccumulatedDataMutationConfig = typedef WeightedSelectionConfig<AccumulatedDataMutationOptions, 6> |
Definition at line 20 of file accumulated_data.hpp.
| using bb::avm2::fuzzer::ProtocolContractsMutationConfig = typedef WeightedSelectionConfig<ProtocolContractsMutationOptions, 2> |
Definition at line 16 of file protocol_contracts.hpp.
| using bb::avm2::fuzzer::PublicCallRequestMutationConfig = typedef WeightedSelectionConfig<PublicCallRequestMutationOptions, 4> |
Definition at line 21 of file public_call_request.hpp.
| using bb::avm2::fuzzer::ValueTag = typedef bb::avm2::ValueTag |
Definition at line 15 of file fuzzer_data.cpp.
|
strong |
| Enumerator | |
|---|---|
| NoteHashes | |
| NoteHashesLimit | |
| Nullifiers | |
| NullifiersLimit | |
| L2ToL1Messages | |
| L2ToL1MessagesLimit | |
Definition at line 11 of file accumulated_data.hpp.
|
strong |
|
strong |
| Enumerator | |
|---|---|
| Mutate | |
| Remove | |
Definition at line 11 of file protocol_contracts.hpp.
|
strong |
| Enumerator | |
|---|---|
| ContractAddress | |
| MsgSender | |
| IsStaticCall | |
| Calldata | |
Definition at line 14 of file public_call_request.hpp.
| void bb::avm2::fuzzer::add_default_instruction_block_if_empty | ( | FuzzerData & | fuzzer_data, |
| std::mt19937_64 & | rng, | ||
| const FuzzerContext & | context | ||
| ) |
Definition at line 52 of file fuzzer_data.cpp.
| GasFees bb::avm2::fuzzer::compute_effective_gas_fees | ( | const GasFees & | gas_fees, |
| const GasSettings & | gas_settings | ||
| ) |
| FuzzerData bb::avm2::fuzzer::generate_fuzzer_data | ( | std::mt19937_64 & | rng, |
| const FuzzerContext & | context | ||
| ) |
Definition at line 78 of file fuzzer_data.cpp.
| Gas bb::avm2::fuzzer::generate_gas | ( | std::mt19937_64 & | rng | ) |
| GasFees bb::avm2::fuzzer::generate_gas_fees | ( | std::mt19937_64 & | rng | ) |
| GasSettings bb::avm2::fuzzer::generate_gas_settings | ( | std::mt19937_64 & | rng | ) |
| InstructionBlock bb::avm2::fuzzer::generate_instruction_block | ( | std::mt19937_64 & | rng, |
| const FuzzerContext & | context | ||
| ) |
Definition at line 14 of file instruction_block.cpp.
| AccumulatedData bb::avm2::fuzzer::generate_non_revertible_accumulated_data | ( | std::mt19937_64 & | rng | ) |
Definition at line 167 of file accumulated_data.cpp.
| PublicCallRequestWithCalldata bb::avm2::fuzzer::generate_public_call_request | ( | std::vector< AztecAddress > & | contract_addresses, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 74 of file public_call_request.cpp.
| AccumulatedData bb::avm2::fuzzer::generate_revertible_accumulated_data | ( | std::mt19937_64 & | rng | ) |
Definition at line 185 of file accumulated_data.cpp.
| void bb::avm2::fuzzer::mutate_bytecode | ( | std::vector< ContractClassWithCommitment > & | contract_classes, |
| std::vector< ContractInstance > & | contract_instances, | ||
| const std::vector< AztecAddress > & | contract_addresses, | ||
| std::vector< bb::crypto::merkle_tree::PublicDataLeafValue > & | public_data_writes, | ||
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 43 of file bytecode.cpp.
| void bb::avm2::fuzzer::mutate_contract_classes | ( | std::vector< ContractClassWithCommitment > & | contract_classes, |
| std::vector< ContractInstance > & | contract_instances, | ||
| std::vector< AztecAddress > & | contract_addresses, | ||
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 115 of file bytecode.cpp.
| void bb::avm2::fuzzer::mutate_contract_instances | ( | std::vector< ContractInstance > & | contract_instances, |
| std::vector< AztecAddress > & | contract_addresses, | ||
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 175 of file bytecode.cpp.
| void bb::avm2::fuzzer::mutate_fuzzer_data | ( | FuzzerData & | fuzzer_data, |
| std::mt19937_64 & | rng, | ||
| const FuzzerContext & | context | ||
| ) |
Definition at line 17 of file fuzzer_data.cpp.
| void bb::avm2::fuzzer::mutate_fuzzer_data_vec | ( | const FuzzerContext & | context, |
| std::vector< FuzzerData > & | enqueued_calls, | ||
| std::mt19937_64 & | rng, | ||
| size_t | max_size | ||
| ) |
Definition at line 125 of file tx_data.cpp.
| void bb::avm2::fuzzer::mutate_gas | ( | Gas & | gas, |
| std::mt19937_64 & | rng, | ||
| const Gas & | max | ||
| ) |
| void bb::avm2::fuzzer::mutate_gas_fees | ( | GasFees & | fees, |
| std::mt19937_64 & | rng | ||
| ) |
| void bb::avm2::fuzzer::mutate_gas_settings | ( | GasSettings & | gas_settings, |
| std::mt19937_64 & | rng | ||
| ) |
| void bb::avm2::fuzzer::mutate_instruction_block | ( | InstructionBlock & | instruction_block, |
| std::mt19937_64 & | rng, | ||
| const FuzzerContext & | context | ||
| ) |
Definition at line 28 of file instruction_block.cpp.
| void bb::avm2::fuzzer::mutate_non_revertible_accumulated_data | ( | AccumulatedData & | data, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 176 of file accumulated_data.cpp.
| void bb::avm2::fuzzer::mutate_protocol_contracts | ( | ProtocolContracts & | protocol_contracts, |
| Tx & | tx, | ||
| const std::vector< AztecAddress > & | contract_addresses, | ||
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 34 of file protocol_contracts.cpp.
| void bb::avm2::fuzzer::mutate_public_call_request | ( | PublicCallRequestWithCalldata & | request, |
| std::vector< AztecAddress > & | contract_addresses, | ||
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 47 of file public_call_request.cpp.
| void bb::avm2::fuzzer::mutate_revertible_accumulated_data | ( | AccumulatedData & | data, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 190 of file accumulated_data.cpp.
| void bb::avm2::fuzzer::mutate_tx | ( | Tx & | tx, |
| std::vector< AztecAddress > & | contract_addresses, | ||
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 62 of file tx_data.cpp.
| void bb::avm2::fuzzer::mutate_vec_with_limit | ( | std::vector< T > & | vec, |
| std::mt19937_64 & | rng, | ||
| const std::function< void(T &, std::mt19937_64 &)> & | mutate_element_function, | ||
| const std::function< T(std::mt19937_64 &)> & | generate_random_element_function, | ||
| const VecMutationConfig & | config, | ||
| size_t | vec_limit | ||
| ) |
Definition at line 32 of file accumulated_data.hpp.
|
inline |
Definition at line 18 of file instruction_block.hpp.
|
constexpr |
Definition at line 22 of file accumulated_data.hpp.
|
constexpr |
|
constexpr |
|
constexpr |
Definition at line 12 of file public_call_request.hpp.
|
constexpr |
|
constexpr |
Definition at line 12 of file instruction_block.cpp.
|
constexpr |
Definition at line 18 of file protocol_contracts.hpp.
|
constexpr |
Definition at line 23 of file public_call_request.hpp.