|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Sets up gadgets and instance managers to provide a context for fuzzing. NOTE: rudimentary set up for testing, should likely be merged with TestSimulator in fuzz_lib in future. More...
#include <context_helper.hpp>
Public Member Functions | |
| GadgetFuzzerContextHelper (AztecAddress contract_address=AztecAddress(0), bool is_static=false, uint32_t start_clk=0) | |
| std::unique_ptr< simulation::ContextInterface > | make_enqueued_fuzzing_context (AztecAddress address=AztecAddress(0), AztecAddress msg_sender=AztecAddress(0), bool is_static=false, FF transaction_fee=FF(0), std::span< const FF > calldata={}, Gas gas_limit=GAS_LIMIT, Gas gas_used=GAS_USED_BY_PRIVATE, TransactionPhase phase=TransactionPhase::APP_LOGIC) |
| std::unique_ptr< simulation::ContextInterface > | make_nested_fuzzing_context (AztecAddress address, AztecAddress msg_sender, ContextInterface &parent_context, bool is_static=false, Gas gas_limit=GAS_LIMIT) |
Private Member Functions | |
| PureMerkleDB | make_empty_merkle_db () |
Sets up gadgets and instance managers to provide a context for fuzzing. NOTE: rudimentary set up for testing, should likely be merged with TestSimulator in fuzz_lib in future.
TODO(MW): I just set the ones I needed to be accessed as public, with others in private and gadgets in the constructor - will clean this up
| contract_address | The address to be configured in the context |
| is_static | Whether this call is static (defaults to false) |
| phase | The phase (defaults to APP_LOGIC) |
| start_clk | The starting clk (defaults to 0) |
Definition at line 42 of file context_helper.hpp.
| bb::avm2::fuzzing::GadgetFuzzerContextHelper::GadgetFuzzerContextHelper | ( | AztecAddress | contract_address = AztecAddress(0), |
| bool | is_static = false, |
||
| uint32_t | start_clk = 0 |
||
| ) |
Definition at line 19 of file context_helper.cpp.
|
private |
Definition at line 141 of file context_helper.cpp.
| std::unique_ptr< ContextInterface > bb::avm2::fuzzing::GadgetFuzzerContextHelper::make_enqueued_fuzzing_context | ( | AztecAddress | address = AztecAddress(0), |
| AztecAddress | msg_sender = AztecAddress(0), |
||
| bool | is_static = false, |
||
| FF | transaction_fee = FF(0), |
||
| std::span< const FF > | calldata = {}, |
||
| Gas | gas_limit = GAS_LIMIT, |
||
| Gas | gas_used = GAS_USED_BY_PRIVATE, |
||
| TransactionPhase | phase = TransactionPhase::APP_LOGIC |
||
| ) |
Definition at line 76 of file context_helper.cpp.
| std::unique_ptr< ContextInterface > bb::avm2::fuzzing::GadgetFuzzerContextHelper::make_nested_fuzzing_context | ( | AztecAddress | address, |
| AztecAddress | msg_sender, | ||
| ContextInterface & | parent_context, | ||
| bool | is_static = false, |
||
| Gas | gas_limit = GAS_LIMIT |
||
| ) |
Definition at line 109 of file context_helper.cpp.
|
private |
Definition at line 93 of file context_helper.hpp.
|
private |
Definition at line 92 of file context_helper.hpp.
|
private |
Definition at line 91 of file context_helper.hpp.
|
private |
Definition at line 95 of file context_helper.hpp.
| std::unique_ptr<simulation::ContextProvider> bb::avm2::fuzzing::GadgetFuzzerContextHelper::context_provider |
Definition at line 63 of file context_helper.hpp.
|
private |
Definition at line 89 of file context_helper.hpp.
| ExecutionIdManager bb::avm2::fuzzing::GadgetFuzzerContextHelper::execution_id_manager |
Definition at line 54 of file context_helper.hpp.
| FieldGreaterThan bb::avm2::fuzzing::GadgetFuzzerContextHelper::field_gt |
Definition at line 56 of file context_helper.hpp.
| DeduplicatingEventEmitter<FieldGreaterThanEvent> bb::avm2::fuzzing::GadgetFuzzerContextHelper::field_gt_emitter |
Definition at line 50 of file context_helper.hpp.
|
private |
Definition at line 106 of file context_helper.hpp.
| GreaterThan bb::avm2::fuzzing::GadgetFuzzerContextHelper::greater_than |
Definition at line 57 of file context_helper.hpp.
| DeduplicatingEventEmitter<GreaterThanEvent> bb::avm2::fuzzing::GadgetFuzzerContextHelper::greater_than_emitter |
Definition at line 49 of file context_helper.hpp.
|
private |
Definition at line 84 of file context_helper.hpp.
|
private |
Definition at line 107 of file context_helper.hpp.
|
private |
Definition at line 96 of file context_helper.hpp.
| EventEmitter<InternalCallStackEvent> bb::avm2::fuzzing::GadgetFuzzerContextHelper::internal_call_stack_emitter |
Definition at line 51 of file context_helper.hpp.
|
private |
Definition at line 83 of file context_helper.hpp.
| MemoryProvider bb::avm2::fuzzing::GadgetFuzzerContextHelper::memory_provider |
Definition at line 61 of file context_helper.hpp.
|
private |
Definition at line 99 of file context_helper.hpp.
|
private |
Definition at line 88 of file context_helper.hpp.
|
private |
Definition at line 85 of file context_helper.hpp.
|
private |
Definition at line 86 of file context_helper.hpp.
|
private |
Definition at line 100 of file context_helper.hpp.
| RangeCheck bb::avm2::fuzzing::GadgetFuzzerContextHelper::range_check |
Definition at line 55 of file context_helper.hpp.
| DeduplicatingEventEmitter<RangeCheckEvent> bb::avm2::fuzzing::GadgetFuzzerContextHelper::range_check_emitter |
Definition at line 48 of file context_helper.hpp.
|
private |
Definition at line 102 of file context_helper.hpp.
|
private |
Definition at line 94 of file context_helper.hpp.
| SideEffectTracker bb::avm2::fuzzing::GadgetFuzzerContextHelper::side_effect_tracker |
Definition at line 59 of file context_helper.hpp.
|
private |
Definition at line 103 of file context_helper.hpp.
|
private |
Definition at line 87 of file context_helper.hpp.
|
private |
Definition at line 101 of file context_helper.hpp.
|
private |
Definition at line 90 of file context_helper.hpp.