Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::avm Namespace Reference

Classes

struct  AvmErrorResponse
 Error response returned when a command fails. More...
 
struct  AvmRequest
 Context passed to each command's execute() method. Provides access to WSDB and CDB IPC clients. More...
 
struct  AvmShutdown
 
struct  AvmSimulate
 
struct  AvmSimulateWithHints
 
class  WsdbIpcMerkleDB
 

Typedefs

using AvmCommand = NamedUnion< AvmSimulate, AvmSimulateWithHints, AvmShutdown >
 Union of all AVM commands (request types).
 
using AvmCommandResponse = NamedUnion< AvmErrorResponse, AvmSimulate::Response, AvmSimulateWithHints::Response, AvmShutdown::Response >
 Union of all AVM response types.
 

Functions

AvmCommandResponse avm_dispatch (AvmRequest &request, AvmCommand &&command)
 Top-level AVM API entry point. Takes an AvmRequest and dispatches the command.
 
AvmCommandResponse execute (AvmRequest &request, AvmCommand &&command)
 Execute an AVM command using the visitor pattern.
 
int execute_avm_server (const std::string &input_path, const std::string &wsdb_path, const std::string &cdb_path)
 Start the aztec-avm IPC server.
 
int parse_and_run_avm (int argc, char *argv[])
 

Variables

std::atomic< avm2::simulation::CancellationToken * > g_active_cancellation_token { nullptr }
 

Typedef Documentation

◆ AvmCommand

Union of all AVM commands (request types).

Definition at line 43 of file avm_execute.hpp.

◆ AvmCommandResponse

Function Documentation

◆ avm_dispatch()

AvmCommandResponse bb::avm::avm_dispatch ( AvmRequest request,
AvmCommand &&  command 
)

Top-level AVM API entry point. Takes an AvmRequest and dispatches the command.

Definition at line 45 of file avm_execute.cpp.

◆ execute()

AvmCommandResponse bb::avm::execute ( AvmRequest request,
AvmCommand &&  command 
)
inline

Execute an AVM command using the visitor pattern.

Definition at line 54 of file avm_execute.hpp.

◆ execute_avm_server()

int bb::avm::execute_avm_server ( const std::string &  input_path,
const std::string &  wsdb_path,
const std::string &  cdb_path 
)

Start the aztec-avm IPC server.

Connects to WSDB and CDB as IPC clients, then runs the server loop dispatching incoming simulation commands.

Parameters
input_pathIPC socket path for TS client connections.
wsdb_pathSocket path to the running aztec-wsdb server.
cdb_pathSocket path to the running aztec-cdb server.
Returns
0 on success, non-zero on error.

Definition at line 64 of file avm_ipc_server.cpp.

◆ parse_and_run_avm()

int bb::avm::parse_and_run_avm ( int  argc,
char *  argv[] 
)

Definition at line 29 of file cli.cpp.

Variable Documentation

◆ g_active_cancellation_token

std::atomic< avm2::simulation::CancellationToken * > bb::avm::g_active_cancellation_token { nullptr }

Global cancellation token for the active simulation. SIGUSR1 handler uses this.

Definition at line 20 of file avm_execute.cpp.