|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Go to the source code of this file.
Namespaces | |
| namespace | acir_format |
Functions | |
| WitnessOrConstant< bb::fr > | acir_format::parse_input (Acir::FunctionInput input) |
| ========= HELPERS ========= /// | |
| uint32_t | acir_format::get_witness_from_function_input (Acir::FunctionInput input) |
| Extract the witness index from an Acir::FunctionInput representing a witness. | |
| void | acir_format::update_max_witness_index (uint32_t witness_idx, AcirFormat &af) |
| Update the max_witness_index. | |
| void | acir_format::update_max_witness_index_from_expression (Acir::Expression const &expr, AcirFormat &af) |
| Update max_witness_index by processing all witnesses in an Acir::Expression. | |
| void | acir_format::update_max_witness_index_from_opcode (Acir::Opcode const &opcode, AcirFormat &af) |
| Update the max witness index by processing all the witness indices contained in the Acir::Opcode. | |
| template<typename T > | |
| 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) |
| ========= BYTES TO BARRETENBERG'S REPRESENTATION ========= /// | |
| AcirFormat | acir_format::circuit_serde_to_acir_format (Acir::Circuit const &circuit) |
| Convert an Acir::Circuit into an AcirFormat by processing all the opcodes. | |
| WitnessVector | acir_format::witness_map_to_witness_vector (Witnesses::WitnessMap const &witness_map) |
Convert from the ACIR-native WitnessMap format to Barretenberg's internal WitnessVector format. | |
| AcirFormat | acir_format::circuit_buf_to_acir_format (std::vector< uint8_t > &&buf) |
Convert a buffer representing a circuit into Barretenberg's internal AcirFormat representation. | |
| WitnessVector | acir_format::witness_buf_to_witness_vector (std::vector< uint8_t > &&buf) |
Convert a buffer representing a witness vector into Barretenberg's internal WitnessVector format. | |
| std::map< uint32_t, bb::fr > | acir_format::process_linear_terms (Acir::Expression const &expr) |
| ========= ACIR OPCODE HANDLERS ========= /// | |
| bool | acir_format::is_single_arithmetic_gate (Acir::Expression const &arg, const std::map< uint32_t, bb::fr > &linear_terms) |
| Given an Acir::Expression and its processed linear terms, determine whether it can be represented by a single width-4 arithmetic gate. | |
| std::vector< mul_quad_< fr > > | acir_format::split_into_mul_quad_gates (Acir::Expression const &arg, std::map< uint32_t, bb::fr > &linear_terms) |
| ========= ACIR OPCODE HANDLERS ========= /// | |
| void | acir_format::assert_zero_to_quad_constraints (Acir::Opcode::AssertZero const &arg, AcirFormat &af, size_t opcode_index) |
| Single entrypoint for processing arithmetic (AssertZero) opcodes. | |
| BlockConstraint | acir_format::memory_init_to_block_constraint (Acir::Opcode::MemoryInit const &mem_init) |
| ========= MEMORY OPERATIONS ========== /// | |
| void | acir_format::add_memory_op_to_block_constraint (Acir::Opcode::MemoryOp const &mem_op, BlockConstraint &block) |
| Process memory operation, either read or write, and update the BlockConstraint type accordingly. | |
| void | acir_format::add_blackbox_func_call_to_acir_format (Acir::Opcode::BlackBoxFuncCall const &arg, AcirFormat &af, size_t opcode_index) |