Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg
Submodule barretenberg updated 35 files
+1 −1 cpp/.aztec-packages-commit
+1 −0 cpp/src/CMakeLists.txt
+74 −0 cpp/src/barretenberg/barretenberg.hpp
+1 −0 cpp/src/barretenberg/common/container.hpp
+1 −0 cpp/src/barretenberg/common/map.hpp
+11 −7 cpp/src/barretenberg/ecc/curves/bn254/scalar_multiplication/scalar_multiplication.cpp
+12 −11 cpp/src/barretenberg/honk/composer/composer_helper/standard_honk_composer_helper.cpp
+2 −1 cpp/src/barretenberg/honk/composer/composer_helper/standard_honk_composer_helper.hpp
+11 −9 cpp/src/barretenberg/honk/composer/composer_helper/ultra_honk_composer_helper.cpp
+4 −0 cpp/src/barretenberg/honk/composer/composer_helper/ultra_honk_composer_helper.hpp
+2 −0 cpp/src/barretenberg/honk/flavor/standard.hpp
+6 −1 cpp/src/barretenberg/honk/flavor/ultra.hpp
+6 −6 cpp/src/barretenberg/honk/pcs/claim.hpp
+179 −220 cpp/src/barretenberg/honk/pcs/commitment_key.hpp
+20 −18 cpp/src/barretenberg/honk/pcs/commitment_key.test.hpp
+11 −11 cpp/src/barretenberg/honk/pcs/gemini/gemini.hpp
+17 −17 cpp/src/barretenberg/honk/pcs/gemini/gemini.test.cpp
+65 −77 cpp/src/barretenberg/honk/pcs/ipa/ipa.hpp
+41 −21 cpp/src/barretenberg/honk/pcs/ipa/ipa.test.cpp
+35 −60 cpp/src/barretenberg/honk/pcs/kzg/kzg.hpp
+18 −21 cpp/src/barretenberg/honk/pcs/kzg/kzg.test.cpp
+7 −6 cpp/src/barretenberg/honk/pcs/shplonk/shplonk_single.hpp
+1 −1 cpp/src/barretenberg/honk/proof_system/composer_helper.lib.hpp
+8 −8 cpp/src/barretenberg/honk/proof_system/prover.cpp
+6 −4 cpp/src/barretenberg/honk/proof_system/prover.hpp
+8 −9 cpp/src/barretenberg/honk/proof_system/ultra_prover.cpp
+5 −4 cpp/src/barretenberg/honk/proof_system/ultra_prover.hpp
+10 −12 cpp/src/barretenberg/honk/proof_system/ultra_verifier.cpp
+4 −4 cpp/src/barretenberg/honk/proof_system/ultra_verifier.hpp
+10 −12 cpp/src/barretenberg/honk/proof_system/verifier.cpp
+4 −4 cpp/src/barretenberg/honk/proof_system/verifier.hpp
+2 −2 cpp/src/barretenberg/honk/proof_system/work_queue.hpp
+19 −2 cpp/src/barretenberg/honk/transcript/transcript.test.cpp
+1 −1 cpp/src/barretenberg/plonk/composer/composer_helper/composer_helper_lib.cpp
+1 −7 cpp/src/barretenberg/proof_system/flavor/flavor.hpp
3 changes: 1 addition & 2 deletions circuits/cpp/src/aztec3/circuits/abis/.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

#include "aztec3/circuits/abis/combined_accumulated_data.hpp"

#include <barretenberg/common/serialize.hpp>
#include <barretenberg/serialize/cbind.hpp>
#include <barretenberg/barretenberg.hpp>

#include <gtest/gtest.h>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
#pragma once

#include "aztec3/utils/types/circuit_types.hpp"

#include <barretenberg/serialize/msgpack.hpp>
#include <barretenberg/barretenberg.hpp>

namespace aztec3::circuits::abis {

using aztec3::utils::types::CircuitTypes;
using aztec3::utils::types::NativeTypes;
using std::is_same;

template <typename NCT> struct AppendOnlyTreeSnapshot {
using fr = typename NCT::fr;
using uint32 = typename NCT::uint32;
Expand Down
16 changes: 5 additions & 11 deletions circuits/cpp/src/aztec3/circuits/abis/c_bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,11 @@
#include "aztec3/circuits/abis/private_kernel/private_kernel_inputs_init.hpp"
#include "aztec3/circuits/abis/signed_tx_request.hpp"
#include "aztec3/circuits/abis/types.hpp"
#include <aztec3/circuits/hash.hpp>
#include <aztec3/constants.hpp>
#include <aztec3/utils/array.hpp>
#include <aztec3/utils/types/native_types.hpp>

#include "barretenberg/crypto/ecdsa/ecdsa.hpp"
#include "barretenberg/srs/reference_string/mem_reference_string.hpp"
#include "barretenberg/stdlib/commitment/pedersen/pedersen_plookup.hpp"
#include <barretenberg/crypto/keccak/keccak.hpp>
#include <barretenberg/serialize/cbind.hpp>
#include <barretenberg/stdlib/merkle_tree/membership.hpp>
#include "aztec3/circuits/hash.hpp"
#include "aztec3/constants.hpp"
#include "aztec3/utils/types/native_types.hpp"

#include <barretenberg/barretenberg.hpp>

namespace {

Expand Down
3 changes: 1 addition & 2 deletions circuits/cpp/src/aztec3/circuits/abis/c_bind.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <barretenberg/serialize/cbind_fwd.hpp>
#include <barretenberg/barretenberg.hpp>

#include <algorithm>
#include <cstddef>
Expand Down Expand Up @@ -27,4 +27,3 @@ WASM_EXPORT void abis__compute_message_secret_hash(uint8_t const* secret, uint8_
WASM_EXPORT void abis__compute_contract_leaf(uint8_t const* contract_leaf_preimage_buf, uint8_t* output);
WASM_EXPORT void abis__compute_transaction_hash(uint8_t const* signed_tx_request_buf, uint8_t* output);
WASM_EXPORT void abis__compute_call_stack_item_hash(uint8_t const* call_stack_item_buf, uint8_t* output);

5 changes: 1 addition & 4 deletions circuits/cpp/src/aztec3/circuits/abis/c_bind.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
#include "aztec3/circuits/abis/signed_tx_request.hpp"
#include "aztec3/circuits/hash.hpp"

#include <barretenberg/common/serialize.hpp>
#include <barretenberg/numeric/random/engine.hpp>
#include <barretenberg/serialize/test_helper.hpp>
#include <barretenberg/stdlib/merkle_tree/membership.hpp>
#include <barretenberg/barretenberg.hpp>

#include <gtest/gtest.h>

Expand Down
19 changes: 8 additions & 11 deletions circuits/cpp/src/aztec3/circuits/abis/call_context.hpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
#pragma once

#include <aztec3/constants.hpp>
#include <aztec3/utils/msgpack_derived_equals.hpp>
#include <aztec3/utils/msgpack_derived_output.hpp>
#include <aztec3/utils/types/circuit_types.hpp>
#include <aztec3/utils/types/convert.hpp>
#include <aztec3/utils/types/native_types.hpp>

#include <barretenberg/crypto/generators/generator_data.hpp>
#include <barretenberg/serialize/msgpack.hpp>
#include <barretenberg/stdlib/hash/pedersen/pedersen.hpp>
#include <barretenberg/stdlib/primitives/witness/witness.hpp>
#include "aztec3/constants.hpp"
#include "aztec3/utils/msgpack_derived_equals.hpp"
#include "aztec3/utils/msgpack_derived_output.hpp"
#include "aztec3/utils/types/circuit_types.hpp"
#include "aztec3/utils/types/convert.hpp"
#include "aztec3/utils/types/native_types.hpp"

#include <barretenberg/barretenberg.hpp>

namespace aztec3::circuits::abis {

Expand Down
10 changes: 4 additions & 6 deletions circuits/cpp/src/aztec3/circuits/abis/call_stack_item.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@
#include "public_circuit_public_inputs.hpp"

#include "aztec3/circuits/abis/types.hpp"
#include <aztec3/utils/types/circuit_types.hpp>
#include <aztec3/utils/types/convert.hpp>
#include <aztec3/utils/types/native_types.hpp>
#include "aztec3/utils/types/circuit_types.hpp"
#include "aztec3/utils/types/convert.hpp"
#include "aztec3/utils/types/native_types.hpp"

#include <barretenberg/serialize/msgpack.hpp>
#include <barretenberg/stdlib/primitives/witness/witness.hpp>
#include <barretenberg/barretenberg.hpp>

namespace aztec3::circuits::abis {

using aztec3::utils::types::CircuitTypes;
using aztec3::utils::types::NativeTypes;
using std::conditional;
using std::is_same;

template <typename NCT, template <class> typename PrivatePublic> struct CallStackItem {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
#include "public_data_update_request.hpp"

#include "aztec3/constants.hpp"
#include <aztec3/utils/array.hpp>
#include <aztec3/utils/types/circuit_types.hpp>
#include <aztec3/utils/types/convert.hpp>
#include <aztec3/utils/types/native_types.hpp>
#include "aztec3/utils/array.hpp"
#include "aztec3/utils/types/circuit_types.hpp"
#include "aztec3/utils/types/convert.hpp"
#include "aztec3/utils/types/native_types.hpp"

#include <barretenberg/common/map.hpp>
#include <barretenberg/stdlib/primitives/witness/witness.hpp>
#include <barretenberg/barretenberg.hpp>

namespace aztec3::circuits::abis {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@
#include "tx_context.hpp"

#include "aztec3/circuits/abis/combined_historic_tree_roots.hpp"
#include <aztec3/utils/types/circuit_types.hpp>
#include <aztec3/utils/types/convert.hpp>
#include <aztec3/utils/types/native_types.hpp>
#include "aztec3/utils/types/circuit_types.hpp"
#include "aztec3/utils/types/convert.hpp"
#include "aztec3/utils/types/native_types.hpp"

#include <barretenberg/stdlib/primitives/witness/witness.hpp>
#include <barretenberg/barretenberg.hpp>

namespace aztec3::circuits::abis {

using aztec3::circuits::abis::CombinedHistoricTreeRoots;
using aztec3::utils::types::CircuitTypes;
using aztec3::utils::types::NativeTypes;
using plonk::stdlib::witness_t;
using std::is_same;

template <typename NCT> struct CombinedConstantData {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
#pragma once
#include "private_historic_tree_roots.hpp"

#include <aztec3/utils/types/circuit_types.hpp>
#include <aztec3/utils/types/convert.hpp>
#include <aztec3/utils/types/native_types.hpp>
#include "aztec3/utils/types/circuit_types.hpp"
#include "aztec3/utils/types/convert.hpp"
#include "aztec3/utils/types/native_types.hpp"

#include <barretenberg/stdlib/primitives/witness/witness.hpp>
#include <barretenberg/barretenberg.hpp>

namespace aztec3::circuits::abis {

using aztec3::circuits::abis::PrivateHistoricTreeRoots;
using aztec3::utils::types::CircuitTypes;
using aztec3::utils::types::NativeTypes;
using plonk::stdlib::witness_t;
using std::is_same;

template <typename NCT> struct CombinedHistoricTreeRoots {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
#pragma once
#include <aztec3/constants.hpp>
#include <aztec3/utils/types/circuit_types.hpp>
#include <aztec3/utils/types/convert.hpp>
#include <aztec3/utils/types/native_types.hpp>
#include "aztec3/constants.hpp"
#include "aztec3/utils/types/circuit_types.hpp"
#include "aztec3/utils/types/convert.hpp"
#include "aztec3/utils/types/native_types.hpp"

#include <barretenberg/crypto/generators/generator_data.hpp>
#include <barretenberg/stdlib/hash/pedersen/pedersen.hpp>
#include <barretenberg/stdlib/primitives/witness/witness.hpp>
#include <barretenberg/barretenberg.hpp>

namespace aztec3::circuits::abis {

using aztec3::utils::types::CircuitTypes;
using aztec3::utils::types::NativeTypes;
using plonk::stdlib::witness_t;
using std::is_same;

template <typename NCT> struct ContractDeploymentData {
Expand Down
11 changes: 5 additions & 6 deletions circuits/cpp/src/aztec3/circuits/abis/contract_storage_read.hpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#pragma once
#include <aztec3/utils/msgpack_derived_output.hpp>
#include <aztec3/utils/types/circuit_types.hpp>
#include <aztec3/utils/types/convert.hpp>
#include <aztec3/utils/types/native_types.hpp>
#include "aztec3/utils/msgpack_derived_output.hpp"
#include "aztec3/utils/types/circuit_types.hpp"
#include "aztec3/utils/types/convert.hpp"
#include "aztec3/utils/types/native_types.hpp"

#include <barretenberg/serialize/msgpack.hpp>
#include <barretenberg/stdlib/primitives/witness/witness.hpp>
#include <barretenberg/barretenberg.hpp>

namespace aztec3::circuits::abis {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#pragma once
#include <aztec3/utils/msgpack_derived_output.hpp>
#include <aztec3/utils/types/circuit_types.hpp>
#include <aztec3/utils/types/convert.hpp>
#include <aztec3/utils/types/native_types.hpp>
#include "aztec3/utils/msgpack_derived_output.hpp"
#include "aztec3/utils/types/circuit_types.hpp"
#include "aztec3/utils/types/convert.hpp"
#include "aztec3/utils/types/native_types.hpp"

#include <barretenberg/serialize/msgpack.hpp>
#include <barretenberg/stdlib/primitives/witness/witness.hpp>
#include <barretenberg/barretenberg.hpp>

namespace aztec3::circuits::abis {

Expand Down
9 changes: 5 additions & 4 deletions circuits/cpp/src/aztec3/circuits/abis/function_data.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#pragma once
#include <aztec3/constants.hpp>
#include <aztec3/utils/types/circuit_types.hpp>
#include <aztec3/utils/types/convert.hpp>
#include <aztec3/utils/types/native_types.hpp>

#include "aztec3/constants.hpp"
#include "aztec3/utils/types/circuit_types.hpp"
#include "aztec3/utils/types/convert.hpp"
#include "aztec3/utils/types/native_types.hpp"

namespace aztec3::circuits::abis {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#pragma once
#include <aztec3/constants.hpp>
#include <aztec3/utils/types/circuit_types.hpp>
#include <aztec3/utils/types/convert.hpp>
#include <aztec3/utils/types/native_types.hpp>

#include "aztec3/constants.hpp"
#include "aztec3/utils/types/circuit_types.hpp"
#include "aztec3/utils/types/convert.hpp"
#include "aztec3/utils/types/native_types.hpp"

namespace aztec3::circuits::abis {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@
#include "combined_accumulated_data.hpp"
#include "combined_constant_data.hpp"

#include <aztec3/utils/types/circuit_types.hpp>
#include <aztec3/utils/types/convert.hpp>
#include <aztec3/utils/types/native_types.hpp>
#include "aztec3/utils/types/circuit_types.hpp"
#include "aztec3/utils/types/convert.hpp"
#include "aztec3/utils/types/native_types.hpp"

#include <barretenberg/stdlib/primitives/witness/witness.hpp>
#include <barretenberg/barretenberg.hpp>

namespace aztec3::circuits::abis {

using aztec3::utils::types::CircuitTypes;
using aztec3::utils::types::NativeTypes;
using plonk::stdlib::witness_t;
using std::conditional;
using std::is_same;

template <typename NCT> struct KernelCircuitPublicInputs {
Expand Down
3 changes: 2 additions & 1 deletion circuits/cpp/src/aztec3/circuits/abis/membership_witness.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#pragma once

#include "aztec3/utils/array.hpp"
#include "aztec3/utils/types/circuit_types.hpp"
#include "aztec3/utils/types/convert.hpp"
#include <aztec3/utils/array.hpp>

namespace aztec3::circuits::abis {

using aztec3::utils::zero_array;
Expand Down
5 changes: 2 additions & 3 deletions circuits/cpp/src/aztec3/circuits/abis/new_contract_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
#include "aztec3/utils/types/circuit_types.hpp"
#include "aztec3/utils/types/convert.hpp"

#include "barretenberg/serialize/msgpack.hpp"
#include "barretenberg/stdlib/primitives/witness/witness.hpp"
#include <barretenberg/barretenberg.hpp>

namespace aztec3::circuits::abis {

using aztec3::utils::types::CircuitTypes;
using aztec3::utils::types::NativeTypes;
using plonk::stdlib::witness_t;
using std::is_same;

template <typename NCT> struct NewContractData {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#pragma once
#include "function_data.hpp"

#include <aztec3/utils/array.hpp>
#include <aztec3/utils/types/circuit_types.hpp>
#include <aztec3/utils/types/convert.hpp>
#include <aztec3/utils/types/native_types.hpp>
#include "aztec3/utils/array.hpp"
#include "aztec3/utils/types/circuit_types.hpp"
#include "aztec3/utils/types/convert.hpp"
#include "aztec3/utils/types/native_types.hpp"

#include <barretenberg/barretenberg.hpp>

#include <barretenberg/stdlib/primitives/witness/witness.hpp>
namespace aztec3::circuits::abis {

using aztec3::utils::zero_array;
Expand Down
10 changes: 4 additions & 6 deletions circuits/cpp/src/aztec3/circuits/abis/previous_kernel_data.hpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#pragma once
#include "aztec3/circuits/abis/kernel_circuit_public_inputs.hpp"
#include <aztec3/utils/types/circuit_types.hpp>
#include <aztec3/utils/types/convert.hpp>
#include <aztec3/utils/types/native_types.hpp>
#include "aztec3/utils/types/circuit_types.hpp"
#include "aztec3/utils/types/convert.hpp"
#include "aztec3/utils/types/native_types.hpp"

#include <barretenberg/plonk/proof_system/types/proof.hpp>
#include <barretenberg/srs/reference_string/env_reference_string.hpp>
#include <barretenberg/stdlib/primitives/witness/witness.hpp>
#include <barretenberg/barretenberg.hpp>

namespace aztec3::circuits::abis {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,20 @@
#include "call_context.hpp"
#include "contract_deployment_data.hpp"

#include <aztec3/constants.hpp>
#include <aztec3/utils/array.hpp>
#include <aztec3/utils/types/circuit_types.hpp>
#include <aztec3/utils/types/convert.hpp>
#include <aztec3/utils/types/native_types.hpp>
#include "aztec3/constants.hpp"
#include "aztec3/utils/array.hpp"
#include "aztec3/utils/types/circuit_types.hpp"
#include "aztec3/utils/types/convert.hpp"
#include "aztec3/utils/types/native_types.hpp"

#include <barretenberg/common/map.hpp>
#include <barretenberg/crypto/generators/generator_data.hpp>
#include <barretenberg/stdlib/hash/pedersen/pedersen.hpp>
#include <barretenberg/stdlib/primitives/witness/witness.hpp>
#include <barretenberg/barretenberg.hpp>

namespace aztec3::circuits::abis {

using aztec3::utils::zero_array;
using aztec3::utils::types::CircuitTypes;
using aztec3::utils::types::NativeTypes;
using plonk::stdlib::witness_t;

template <typename NCT> class PrivateCircuitPublicInputs {
using fr = typename NCT::fr;
Expand Down
Loading