Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
avm_commands.hpp
Go to the documentation of this file.
1#pragma once
12
13#include <cstdint>
14#include <string>
15#include <vector>
16
17namespace bb::avm {
18
19// Forward declaration
20struct AvmRequest;
21
22// ---------------------------------------------------------------------------
23// Simulation commands
24// ---------------------------------------------------------------------------
25
27 static constexpr const char MSGPACK_SCHEMA_NAME[] = "AvmSimulate";
28 struct Response {
29 static constexpr const char MSGPACK_SCHEMA_NAME[] = "AvmSimulateResponse";
30 std::vector<uint8_t> result;
32 bool operator==(const Response&) const = default;
33 };
34 // Msgpack-serialized AvmFastSimulationInputs
35 std::vector<uint8_t> inputs;
37 Response execute(AvmRequest& request) &&;
38 bool operator==(const AvmSimulate&) const = default;
39};
40
42 static constexpr const char MSGPACK_SCHEMA_NAME[] = "AvmSimulateWithHints";
43 struct Response {
44 static constexpr const char MSGPACK_SCHEMA_NAME[] = "AvmSimulateWithHintsResponse";
45 std::vector<uint8_t> result;
47 bool operator==(const Response&) const = default;
48 };
49 // Msgpack-serialized AvmProvingInputs
50 std::vector<uint8_t> inputs;
52 Response execute(AvmRequest& request) &&;
53 bool operator==(const AvmSimulateWithHints&) const = default;
54};
55
57 static constexpr const char MSGPACK_SCHEMA_NAME[] = "AvmShutdown";
58 struct Response {
59 static constexpr const char MSGPACK_SCHEMA_NAME[] = "AvmShutdownResponse";
60 void msgpack(auto&& pack_fn) { pack_fn(); }
61 bool operator==(const Response&) const = default;
62 };
63 void msgpack(auto&& pack_fn) { pack_fn(); }
64 Response execute(AvmRequest& request) &&;
65 bool operator==(const AvmShutdown&) const = default;
66};
67
68} // namespace bb::avm
Context passed to each command's execute() method. Provides access to WSDB and CDB IPC clients.
bool operator==(const Response &) const =default
static constexpr const char MSGPACK_SCHEMA_NAME[]
void msgpack(auto &&pack_fn)
bool operator==(const AvmShutdown &) const =default
static constexpr const char MSGPACK_SCHEMA_NAME[]
Response execute(AvmRequest &request) &&
void msgpack(auto &&pack_fn)
bool operator==(const Response &) const =default
static constexpr const char MSGPACK_SCHEMA_NAME[]
std::vector< uint8_t > result
Response execute(AvmRequest &request) &&
static constexpr const char MSGPACK_SCHEMA_NAME[]
SERIALIZATION_FIELDS(inputs)
std::vector< uint8_t > inputs
bool operator==(const AvmSimulate &) const =default
bool operator==(const Response &) const =default
static constexpr const char MSGPACK_SCHEMA_NAME[]
bool operator==(const AvmSimulateWithHints &) const =default
std::vector< uint8_t > inputs
static constexpr const char MSGPACK_SCHEMA_NAME[]
Response execute(AvmRequest &request) &&