|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Classes | |
| class | FuzzerContext |
| class | FuzzerContractDB |
| class | FuzzerWorldStateManager |
Typedefs | |
| using | ValueTag = bb::avm2::ValueTag |
| using | AccumulatedDataMutationConfig = WeightedSelectionConfig< AccumulatedDataMutationOptions, 6 > |
| using | PublicCallRequestMutationConfig = WeightedSelectionConfig< PublicCallRequestMutationOptions, 4 > |
Enumerations | |
| enum class | AccumulatedDataMutationOptions : uint8_t { NoteHashes , NoteHashesLimit , Nullifiers , NullifiersLimit , L2ToL1Messages , L2ToL1MessagesLimit } |
| enum class | PublicCallRequestMutationOptions : uint8_t { ContractAddress , MsgSender , IsStaticCall , Calldata } |
Variables | |
| constexpr uint16_t | MAX_INSTRUCTION_BLOCK_SIZE_ON_GENERATION = 10 |
| constexpr uint32_t | MIN_GAS = 1000 |
| constexpr uint32_t | MAX_GAS = 10000000 |
| constexpr uint128_t | MIN_FEE = 1 |
| constexpr uint128_t | MAX_FEE = 1000 |
| constexpr uint32_t | AVM_MAX_PROCESSABLE_DA_GAS |
| constexpr AccumulatedDataMutationConfig | ACCUMULATED_DATA_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::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 |
| 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.
| FuzzerData bb::avm2::fuzzer::generate_fuzzer_data | ( | std::mt19937_64 & | rng, |
| const FuzzerContext & | context | ||
| ) |
Definition at line 78 of file fuzzer_data.cpp.
| std::vector< FuzzInstruction > bb::avm2::fuzzer::generate_instruction | ( | std::mt19937_64 & | rng, |
| const FuzzerContext & | context | ||
| ) |
Generate one instruction and optionally backfill.
Definition at line 537 of file instruction.cpp.
| std::vector< FuzzInstruction > 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 159 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 177 of file accumulated_data.cpp.
| std::optional< MemoryTag > bb::avm2::fuzzer::get_param_ref_tag | ( | const ParamRef & | param | ) |
Definition at line 793 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_address_ref | ( | AddressRef & | address, |
| std::mt19937_64 & | rng, | ||
| uint32_t | max_operand_value | ||
| ) |
Definition at line 756 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_binary_instruction_16 | ( | BinaryInstructionType & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 818 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_binary_instruction_8 | ( | BinaryInstructionType & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 801 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_call_instruction | ( | CALL_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1192 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_calldatacopy_instruction | ( | CALLDATACOPY_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1138 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_cast_16_instruction | ( | CAST_16_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1007 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_cast_8_instruction | ( | CAST_8_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 991 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_ecadd_instruction | ( | ECADD_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1264 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_emit_note_hash_instruction | ( | EMITNOTEHASH_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1107 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_emit_nullifier_instruction | ( | EMITNULLIFIER_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1068 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_emitunencryptedlog_instruction | ( | EMITUNENCRYPTEDLOG_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1179 of file instruction.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 201 of file tx_data.cpp.
| void bb::avm2::fuzzer::mutate_gas | ( | Gas & | gas, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 156 of file tx_data.cpp.
| void bb::avm2::fuzzer::mutate_gas_fees | ( | GasFees & | fees, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 176 of file tx_data.cpp.
| void bb::avm2::fuzzer::mutate_gas_settings | ( | GasSettings & | gas_settings, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 127 of file tx_data.cpp.
| void bb::avm2::fuzzer::mutate_getcontractinstance_instruction | ( | GETCONTRACTINSTANCE_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1238 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_getenvvar_instruction | ( | GETENVVAR_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1055 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_instruction | ( | FuzzInstruction & | instruction, |
| std::mt19937_64 & | rng, | ||
| const FuzzerContext & | context | ||
| ) |
Definition at line 1360 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_instruction_block | ( | std::vector< FuzzInstruction > & | instruction_block, |
| std::mt19937_64 & | rng, | ||
| const FuzzerContext & | context | ||
| ) |
Definition at line 25 of file instruction_block.cpp.
| void bb::avm2::fuzzer::mutate_keccakf1600_instruction | ( | KECCAKF1600_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1306 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_l1tol2msgexists_instruction | ( | L1TOL2MSGEXISTS_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1091 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_mov_16_instruction | ( | MOV_16_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 962 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_mov_8_instruction | ( | MOV_8_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 946 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_non_revertible_accumulated_data | ( | AccumulatedData & | data, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 168 of file accumulated_data.cpp.
| void bb::avm2::fuzzer::mutate_not_16_instruction | ( | NOT_16_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 978 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_not_8_instruction | ( | NOT_8_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 834 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_note_hash_exists_instruction | ( | NOTEHASHEXISTS_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1119 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_nullifier_exists_instruction | ( | NULLIFIEREXISTS_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1075 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_param_ref | ( | ParamRef & | param, |
| std::mt19937_64 & | rng, | ||
| std::optional< MemoryTag > | default_tag, | ||
| uint32_t | max_operand_value | ||
| ) |
Definition at line 783 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_poseidon2perm_instruction | ( | POSEIDON2PERM_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1293 of file instruction.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_returndatasize_with_returndatacopy_instruction | ( | RETURNDATASIZE_WITH_RETURNDATACOPY_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1220 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_revertible_accumulated_data | ( | AccumulatedData & | data, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 182 of file accumulated_data.cpp.
| void bb::avm2::fuzzer::mutate_sendl2tol1msg_instruction | ( | SENDL2TOL1MSG_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1160 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_set_128_instruction | ( | SET_128_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 911 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_set_16_instruction | ( | SET_16_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 863 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_set_32_instruction | ( | SET_32_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 879 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_set_64_instruction | ( | SET_64_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 895 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_set_8_instruction | ( | SET_8_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 847 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_set_ff_instruction | ( | SET_FF_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 930 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_sha256compression_instruction | ( | SHA256COMPRESSION_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1319 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_sload_instruction | ( | SLOAD_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1039 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_sstore_instruction | ( | SSTORE_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1023 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_successcopy_instruction | ( | SUCCESSCOPY_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1254 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_toradixbe_instruction | ( | TORADIXBE_Instruction & | instruction, |
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 1335 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_tx | ( | Tx & | tx, |
| std::vector< AztecAddress > & | contract_addresses, | ||
| std::mt19937_64 & | rng | ||
| ) |
Definition at line 75 of file tx_data.cpp.
| void bb::avm2::fuzzer::mutate_variable_ref | ( | VariableRef & | variable, |
| std::mt19937_64 & | rng, | ||
| std::optional< MemoryTag > | default_tag | ||
| ) |
Most of the tags will be equal to the default tag.
Definition at line 730 of file instruction.cpp.
| void bb::avm2::fuzzer::mutate_vec_with_limit | ( | std::vector< T > & | vec, |
| std::mt19937_64 & | rng, | ||
| std::function< void(T &, std::mt19937_64 &)> | mutate_element_function, | ||
| 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.
|
constexpr |
Definition at line 22 of file accumulated_data.hpp.
|
constexpr |
Definition at line 69 of file tx_data.cpp.
|
constexpr |
Definition at line 12 of file public_call_request.hpp.
|
constexpr |
Definition at line 67 of file tx_data.cpp.
|
constexpr |
Definition at line 63 of file tx_data.cpp.
|
constexpr |
Definition at line 12 of file instruction_block.cpp.
|
constexpr |
Definition at line 66 of file tx_data.cpp.
|
constexpr |
Definition at line 62 of file tx_data.cpp.
|
constexpr |
Definition at line 23 of file public_call_request.hpp.