96 static constexpr const char*
DATA_DIR =
"/tmp/avm_fuzzer_ws/world_state";
111 throw std::runtime_error(
"FuzzerWorldStateManager not initialized. Call initialize() first.");
std::shared_ptr< Napi::ThreadSafeFunction > add_contracts
std::optional< ContractClass > get_contract_class(const ContractClassId &class_id) const override
void revert_checkpoint() override
FuzzerContractDB(const std::vector< uint8_t > &bytecode)
void commit_checkpoint() override
void create_checkpoint() override
std::optional< FF > get_bytecode_commitment(const ContractClassId &class_id) const override
std::optional< std::string > get_debug_function_name(const AztecAddress &address, const FunctionSelector &selector) const override
std::vector< uint8_t > bytecode
simulation::SequentialInsertionResult< NullifierLeafValue > insert_indexed_leaves_nullifier_tree(const NullifierLeafValue &leaf_value) override
std::vector< std::pair< FF, index_t > > public_data_slots
uint32_t get_checkpoint_id() const override
TreeSnapshots get_tree_roots() const override
uint64_t next_available_nullifier_index
std::unordered_map< index_t, PublicDataLeafValue > public_data_leaves
std::vector< FF > note_hash_leaves
void create_checkpoint() override
uint64_t next_available_public_data_index
uint64_t next_available_note_hash_index
void pad_tree(simulation::MerkleTreeId tree_id, size_t num_leaves) override
std::vector< simulation::AppendLeafResult > append_leaves(simulation::MerkleTreeId tree_id, std::span< const FF > leaves) override
simulation::SiblingPath get_sibling_path(simulation::MerkleTreeId tree_id, index_t leaf_index) const override
std::unordered_map< index_t, NullifierLeafValue > nullifier_leaves
FF get_leaf_value(simulation::MerkleTreeId tree_id, index_t leaf_index) const override
std::vector< std::pair< FF, index_t > > nullifier_values
void revert_checkpoint() override
void commit_checkpoint() override
GetLowIndexedLeafResponse get_low_indexed_leaf(simulation::MerkleTreeId tree_id, const FF &value) const override
simulation::IndexedLeaf< PublicDataLeafValue > get_leaf_preimage_public_data_tree(index_t leaf_index) const override
simulation::SequentialInsertionResult< PublicDataLeafValue > insert_indexed_leaves_public_data_tree(const PublicDataLeafValue &leaf_value) override
void insert_contract_address(const AztecAddress &contract_address)
simulation::IndexedLeaf< NullifierLeafValue > get_leaf_preimage_nullifier_tree(index_t leaf_index) const override
std::pair< FF, index_t > get_indexed_low_leaf_helper(const std::vector< std::pair< FF, index_t > > &value_sorted_leaves, const FF &value) const
world_state::WorldState & get_world_state()
static constexpr const char * DATA_DIR
std::unique_ptr< world_state::WorldState > ws
void initialize_world_state()
static FuzzerWorldStateManager * getInstance()
world_state::WorldStateRevision fork()
void register_contract_address(const AztecAddress &contract_address)
static constexpr uint64_t MAP_SIZE_KB
static const char * get_data_dir()
std::stack< uint64_t > fork_ids
static FuzzerWorldStateManager * instance
FuzzerWorldStateManager methods.
world_state::WorldStateRevision get_current_revision() const
static uint64_t get_map_size_kb()
Holds the Merkle trees responsible for storing the state of the Aztec protocol.
AztecAddress contract_address
::bb::crypto::merkle_tree::fr_sibling_path SiblingPath
::bb::crypto::merkle_tree::NullifierLeafValue NullifierLeafValue
::bb::crypto::merkle_tree::PublicDataLeafValue PublicDataLeafValue
::bb::crypto::merkle_tree::index_t index_t
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept