Skip to content

Commit

Permalink
Try revert to Ultra CB.
Browse files Browse the repository at this point in the history
  • Loading branch information
codygunton committed Jul 24, 2023
1 parent 4a44add commit e08c8c5
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg
Submodule barretenberg updated 537 files
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
#include "aztec3/utils/types/convert.hpp"
#include "aztec3/utils/types/native_types.hpp"

#include "barretenberg/stdlib/primitives/circuit_builders/circuit_builders_fwd.hpp"

namespace aztec3::circuits::apps::test_apps::basic_contract_deployment {

// Builder

using C = UltraCircuitBuilder;

// Native and circuit types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ TEST_F(escrow_tests, circuit_deposit)
// info("variables: ", builder.variables);
info("failed?: ", builder.failed());
info("err: ", builder.err());
info("n: ", builder.num_gates);
// info("n: ", builder.num_gates);
}

TEST_F(escrow_tests, circuit_transfer)
Expand All @@ -83,7 +83,7 @@ TEST_F(escrow_tests, circuit_transfer)
// info("variables: ", builder.variables);
info("failed?: ", builder.failed());
info("err: ", builder.err());
info("n: ", builder.num_gates);
// info("n: ", builder.num_gates);
}

TEST_F(escrow_tests, circuit_withdraw)
Expand All @@ -107,7 +107,7 @@ TEST_F(escrow_tests, circuit_withdraw)
// info("variables: ", builder.variables);
info("failed?: ", builder.failed());
info("err: ", builder.err());
info("n: ", builder.num_gates);
// info("n: ", builder.num_gates);
}

} // namespace aztec3::circuits::apps::test_apps::escrow
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@
#include "aztec3/utils/types/convert.hpp"
#include "aztec3/utils/types/native_types.hpp"

#include "barretenberg/proof_system/circuit_builder/circuit_simulator.hpp"
#include "barretenberg/stdlib/primitives/circuit_builders/circuit_builders_fwd.hpp"

namespace aztec3::circuits::apps::test_apps::escrow {

// Builder
// WORKTODO: this is coupled to the circuit builder in the private kernel.
using C = UltraCircuitBuilder;

// Native and circuit types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ TEST(private_to_private_function_call_tests, circuit_private_to_private_function
// info("variables: ", fn1_builder.variables);
info("failed?: ", fn1_builder.failed());
info("err: ", fn1_builder.err());
info("n: ", fn1_builder.num_gates);
// info("n: ", fn1_builder.num_gates);
// WORKTODO: this test leads to a failing composer, but there are no expectations in the test.
}

} // namespace aztec3::circuits::apps::test_apps::private_to_private_function_call
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void function_2_1(FunctionExecutionContext& exec_ctx, std::vector<NT::fr> const&

auto product = a * b * c;

CT::address const unique_person_who_may_initialise = 999999;
CT::address const unique_person_who_may_initialise = { msg_sender.context_, 999999 };

unique_person_who_may_initialise.assert_equal(msg_sender);

Expand Down
2 changes: 2 additions & 0 deletions circuits/cpp/src/aztec3/circuits/kernel/private/init.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include "aztec3/utils/types/convert.hpp"
#include "aztec3/utils/types/native_types.hpp"

#include "barretenberg/stdlib/primitives/circuit_builders/circuit_builders_fwd.hpp"

namespace aztec3::circuits::kernel::private_kernel {

using Builder = UltraCircuitBuilder;
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/src/aztec3/circuits/recursion/aggregator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Aggregator {
const CT::AggregationObject& previous_aggregation_output = CT::AggregationObject())
{
CT::AggregationObject result =
verify_proof<plonk::flavor::Ultra>(builder, vk, proof, previous_aggregation_output);
plonk::stdlib::recursion::verify_proof<Flavor>(builder, vk, proof, previous_aggregation_output);

return result;
}
Expand Down
6 changes: 4 additions & 2 deletions circuits/cpp/src/aztec3/circuits/recursion/init.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@
#include "aztec3/utils/types/convert.hpp"
#include "aztec3/utils/types/native_types.hpp"

#include "barretenberg/plonk/flavor/flavor.hpp"
#include <barretenberg/barretenberg.hpp>

namespace aztec3::circuits::recursion {
// Builder
using Builder = UltraCircuitBuilder;
// using Flavor = proof_system::plonk::flavor::SimulatorBN254;
using Flavor = proof_system::plonk::flavor::Ultra;
using Builder = typename Flavor::CircuitBuilder;

// Generic types:
using CT = aztec3::utils::types::CircuitTypes<Builder>;
using NT = aztec3::utils::types::NativeTypes;
using aztec3::utils::types::to_ct;

// Recursion types and methods
using plonk::stdlib::recursion::verify_proof;
using transcript::Manifest;

} // namespace aztec3::circuits::recursion

0 comments on commit e08c8c5

Please sign in to comment.