Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
serialization.hpp File Reference
#include "barretenberg/vm2/common/memory_types.hpp"
#include "barretenberg/vm2/common/opcodes.hpp"
#include "barretenberg/vm2/common/tagged_value.hpp"
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <variant>
#include <vector>

Go to the source code of this file.

Classes

struct  bb::avm2::simulation::Instruction
 
struct  bb::avm2::simulation::InstrDeserializationError
 

Namespaces

namespace  bb
 Entry point for Barretenberg command-line interface.
 
namespace  bb::avm2
 
namespace  bb::avm2::simulation
 AVM range check gadget for witness generation.
 
namespace  bb::avm2::simulation::testonly
 

Typedefs

using bb::avm2::simulation::Operand = TaggedValue
 

Enumerations

enum class  bb::avm2::simulation::OperandType : uint8_t {
  bb::avm2::simulation::INDIRECT8 , bb::avm2::simulation::INDIRECT16 , bb::avm2::simulation::TAG , bb::avm2::simulation::UINT8 ,
  bb::avm2::simulation::UINT16 , bb::avm2::simulation::UINT32 , bb::avm2::simulation::UINT64 , bb::avm2::simulation::UINT128 ,
  bb::avm2::simulation::FF
}
 
enum class  bb::avm2::simulation::InstrDeserializationEventError : uint8_t { bb::avm2::simulation::PC_OUT_OF_RANGE , bb::avm2::simulation::OPCODE_OUT_OF_RANGE , bb::avm2::simulation::INSTRUCTION_OUT_OF_RANGE , bb::avm2::simulation::TAG_OUT_OF_RANGE }
 

Functions

const std::unordered_map< WireOpCode, std::vector< OperandType > > & bb::avm2::simulation::testonly::get_instruction_wire_formats ()
 
const std::unordered_map< OperandType, uint32_t > & bb::avm2::simulation::testonly::get_operand_type_sizes ()
 
Instruction bb::avm2::simulation::deserialize_instruction (std::span< const uint8_t > bytecode, size_t pos)
 Attempts to deserialize the instruction at position pos in bytecode. Called by bytecode managers during instruction fetching to extract and check for parse errors.
 
bool bb::avm2::simulation::check_tag (const Instruction &instruction)
 Checks whether the tag operand of an instruction is a valid MemoryTag. Called by bytecode managers during instruction fetching to check tag operands.