Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
acir_to_constraint_buf.cpp File Reference

Go to the source code of this file.

Namespaces

namespace  acir_format
 

Functions

template<typename T >
acir_format::deserialize_any_format (std::vector< uint8_t > &&buf, std::function< T(msgpack::object const &)> decode_msgpack, std::function< T(std::vector< uint8_t >)> decode_bincode)
 Deserialize buf either based on the first byte interpreted as a Noir serialization format byte, or falling back to bincode if the format cannot be recognized. Currently only msgpack format is expected, or the legacy bincode format.
 
Acir::Program acir_format::deserialize_program (std::vector< uint8_t > &&buf)
 Deserializes a Program from bytes, trying msgpack or bincode formats.
 
Witnesses::WitnessStack acir_format::deserialize_witness_stack (std::vector< uint8_t > &&buf)
 Deserializes a WitnessStack from bytes, trying msgpack or bincode formats.
 
poly_triple acir_format::serialize_arithmetic_gate (Acir::Expression const &arg)
 Construct a poly_tuple for a standard width-3 arithmetic gate from its acir representation.
 
void acir_format::assign_linear_term (mul_quad_< fr > &gate, int index, uint32_t witness_index, fr const &scaling)
 Assigns a linear term to a specific index in a mul_quad_ gate.
 
std::vector< mul_quad_< fr > > acir_format::split_into_mul_quad_gates (Acir::Expression const &arg)
 Accumulate the input expression into a serie of quad gates.
 
mul_quad_< fracir_format::serialize_mul_quad_gate (Acir::Expression const &arg)
 
void acir_format::constrain_witnesses (Acir::Opcode::AssertZero const &arg, AcirFormat &af)
 
std::pair< uint32_t, uint32_t > acir_format::is_assert_equal (Acir::Opcode::AssertZero const &arg, poly_triple const &pt, AcirFormat const &af)
 
void acir_format::handle_arithmetic (Acir::Opcode::AssertZero const &arg, AcirFormat &af, size_t opcode_index)
 
uint32_t acir_format::get_witness_from_function_input (Acir::FunctionInput input)
 
WitnessOrConstant< bb::fracir_format::parse_input (Acir::FunctionInput input)
 
void acir_format::handle_blackbox_func_call (Acir::Opcode::BlackBoxFuncCall const &arg, AcirFormat &af, size_t opcode_index)
 
BlockConstraint acir_format::handle_memory_init (Acir::Opcode::MemoryInit const &mem_init)
 
bool acir_format::is_rom (Acir::MemOp const &mem_op)
 
uint32_t acir_format::poly_to_witness (const poly_triple poly)
 
void acir_format::handle_memory_op (Acir::Opcode::MemoryOp const &mem_op, AcirFormat &af, BlockConstraint &block)
 
AcirFormat acir_format::circuit_serde_to_acir_format (Acir::Circuit const &circuit)
 
AcirFormat acir_format::circuit_buf_to_acir_format (std::vector< uint8_t > &&buf)
 
WitnessVector acir_format::witness_map_to_witness_vector (Witnesses::WitnessMap const &witness_map)
 Converts from the ACIR-native WitnessMap format to Barretenberg's internal WitnessVector format.
 
WitnessVector acir_format::witness_buf_to_witness_data (std::vector< uint8_t > &&buf)
 Converts from the ACIR-native WitnessStack format to Barretenberg's internal WitnessVector format.
 
std::vector< AcirFormatacir_format::program_buf_to_acir_format (std::vector< uint8_t > &&buf)
 
WitnessVectorStack acir_format::witness_buf_to_witness_stack (std::vector< uint8_t > &&buf)
 
AcirProgramStack acir_format::get_acir_program_stack (std::string const &bytecode_path, std::string const &witness_path)