Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::avm2::simulation::CallStackMetadataCollector Class Reference

#include <call_stack_metadata_collector.hpp>

Inheritance diagram for bb::avm2::simulation::CallStackMetadataCollector:
bb::avm2::simulation::CallStackMetadataCollectorInterface

Public Member Functions

 CallStackMetadataCollector ()=default
 
 CallStackMetadataCollector (const CollectionLimitsConfig &limits)
 
void set_phase (CoarseTransactionPhase phase) override
 
void notify_enter_call (const AztecAddress &contract_address, uint32_t caller_pc, const CalldataProvider &calldata_provider, bool is_static_call, const Gas &gas_limit) override
 
void notify_exit_call (bool success, uint32_t pc, const std::optional< std::string > &halting_message, const ReturnDataProvider &return_data_provider, const InternalCallStackProvider &internal_call_stack_provider) override
 
void notify_tx_revert (const std::string &revert_message) override
 
std::vector< CallStackMetadatadump_call_stack_metadata () override
 

Private Member Functions

bool should_skip_collection () const
 

Private Attributes

CollectionLimitsConfig limits
 
uint32_t timestamp = 0
 
uint32_t total_call_stack_items = 0
 
std::stack< CallStackMetadatacall_stack_metadata { { {} } }
 
CoarseTransactionPhase current_phase = CoarseTransactionPhase::SETUP
 

Detailed Description

Definition at line 15 of file call_stack_metadata_collector.hpp.

Constructor & Destructor Documentation

◆ CallStackMetadataCollector() [1/2]

bb::avm2::simulation::CallStackMetadataCollector::CallStackMetadataCollector ( )
default

◆ CallStackMetadataCollector() [2/2]

bb::avm2::simulation::CallStackMetadataCollector::CallStackMetadataCollector ( const CollectionLimitsConfig limits)
inlineexplicit

Definition at line 18 of file call_stack_metadata_collector.hpp.

Member Function Documentation

◆ dump_call_stack_metadata()

std::vector< CallStackMetadata > bb::avm2::simulation::CallStackMetadataCollector::dump_call_stack_metadata ( )
overridevirtual

◆ notify_enter_call()

void bb::avm2::simulation::CallStackMetadataCollector::notify_enter_call ( const AztecAddress contract_address,
uint32_t  caller_pc,
const CalldataProvider calldata_provider,
bool  is_static_call,
const Gas gas_limit 
)
overridevirtual

◆ notify_exit_call()

void bb::avm2::simulation::CallStackMetadataCollector::notify_exit_call ( bool  success,
uint32_t  pc,
const std::optional< std::string > &  halting_message,
const ReturnDataProvider return_data_provider,
const InternalCallStackProvider internal_call_stack_provider 
)
overridevirtual

◆ notify_tx_revert()

void bb::avm2::simulation::CallStackMetadataCollector::notify_tx_revert ( const std::string &  revert_message)
overridevirtual

◆ set_phase()

void bb::avm2::simulation::CallStackMetadataCollector::set_phase ( CoarseTransactionPhase  phase)
overridevirtual

◆ should_skip_collection()

bool bb::avm2::simulation::CallStackMetadataCollector::should_skip_collection ( ) const
private

Definition at line 15 of file call_stack_metadata_collector.cpp.

Member Data Documentation

◆ call_stack_metadata

std::stack<CallStackMetadata> bb::avm2::simulation::CallStackMetadataCollector::call_stack_metadata { { {} } }
private

Definition at line 47 of file call_stack_metadata_collector.hpp.

◆ current_phase

CoarseTransactionPhase bb::avm2::simulation::CallStackMetadataCollector::current_phase = CoarseTransactionPhase::SETUP
private

Definition at line 48 of file call_stack_metadata_collector.hpp.

◆ limits

CollectionLimitsConfig bb::avm2::simulation::CallStackMetadataCollector::limits
private

Definition at line 38 of file call_stack_metadata_collector.hpp.

◆ timestamp

uint32_t bb::avm2::simulation::CallStackMetadataCollector::timestamp = 0
private

Definition at line 41 of file call_stack_metadata_collector.hpp.

◆ total_call_stack_items

uint32_t bb::avm2::simulation::CallStackMetadataCollector::total_call_stack_items = 0
private

Definition at line 43 of file call_stack_metadata_collector.hpp.


The documentation for this class was generated from the following files: