Skip to content

Commit 94e8809

Browse files
authored
feat: merge-train/barretenberg (#17728)
BEGIN_COMMIT_OVERRIDE chore: clean-up `pow`-polynomial handling in `MultilinearBatchingSumcheck` (#17717) chore: Integrate Hypernova into ClientIVC (#17720) chore(bb): remove unused polynomial methods (#17696) fix: tamper heavy-handedly to avoid PG test flake (#17740) delete test of deleted poly method END_COMMIT_OVERRIDE
2 parents 320742d + 72f241c commit 94e8809

32 files changed

+286
-1213
lines changed

barretenberg/cpp/src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ set(BARRETENBERG_TARGET_OBJECTS
160160
$<TARGET_OBJECTS:trace_to_polynomials_objects>
161161
$<TARGET_OBJECTS:flavor_objects>
162162
$<TARGET_OBJECTS:goblin_objects>
163+
$<TARGET_OBJECTS:hypernova_objects>
163164
$<TARGET_OBJECTS:honk>
164165
$<TARGET_OBJECTS:multilinear_batching_objects>
165166
$<TARGET_OBJECTS:numeric_objects>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
barretenberg_module(client_ivc stdlib_protogalaxy_verifier dsl libdeflate::libdeflate_static multilinear_batching)
1+
barretenberg_module(client_ivc stdlib_protogalaxy_verifier dsl libdeflate::libdeflate_static hypernova multilinear_batching)

barretenberg/cpp/src/barretenberg/client_ivc/sumcheck_client_ivc.cpp

Lines changed: 61 additions & 309 deletions
Large diffs are not rendered by default.

barretenberg/cpp/src/barretenberg/client_ivc/sumcheck_client_ivc.hpp

Lines changed: 21 additions & 403 deletions
Large diffs are not rendered by default.

barretenberg/cpp/src/barretenberg/client_ivc/sumcheck_client_ivc.test.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ class SumcheckClientIVCTests : public ::testing::Test {
3030
using Builder = SumcheckClientIVC::ClientCircuit;
3131
using ProverInstance = SumcheckClientIVC::ProverInstance;
3232
using VerifierInstance = SumcheckClientIVC::VerifierInstance;
33-
using FoldProof = SumcheckClientIVC::FoldProof;
3433
using DeciderProver = SumcheckClientIVC::DeciderProver;
35-
using DeciderVerifier = SumcheckClientIVC::DeciderVerifier;
3634
using CircuitProducer = PrivateFunctionExecutionMockCircuitProducer;
3735

3836
public:
@@ -46,9 +44,6 @@ class SumcheckClientIVCTests : public ::testing::Test {
4644
circuit_producer.construct_and_accumulate_next_circuit(ivc);
4745
}
4846

49-
info("Num ecc rows: ", ivc.goblin.op_queue->get_num_rows());
50-
// info("Num ecc ultra ops: ", ivc.goblin.op_queue->get_ultra_ops_table_num_rows());
51-
5247
return { ivc.prove(), ivc.get_vk() };
5348
};
5449
};
@@ -59,8 +54,7 @@ class SumcheckClientIVCTests : public ::testing::Test {
5954
*/
6055
TEST_F(SumcheckClientIVCTests, BasicStructured)
6156
{
62-
// BB_DISABLE_ASSERTS();
63-
const size_t NUM_APP_CIRCUITS = 15;
57+
const size_t NUM_APP_CIRCUITS = 5;
6458
auto [proof, vk] = SumcheckClientIVCTests::accumulate_and_prove_ivc(NUM_APP_CIRCUITS);
6559

6660
EXPECT_TRUE(SumcheckClientIVC::verify(proof, vk));

barretenberg/cpp/src/barretenberg/client_ivc/sumcheck_mock_circuit_producer.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ class PrivateFunctionExecutionMockCircuitProducer {
205205
if (ivc.num_circuits_accumulated == ivc.get_num_circuits() - 1) {
206206
settings = TestSettings{};
207207
}
208-
info("setting gates ", settings.log2_num_gates);
209208
auto circuit = create_next_circuit(ivc, settings.log2_num_gates, settings.num_public_inputs);
210209
return { circuit, get_verification_key(circuit) };
211210
}

barretenberg/cpp/src/barretenberg/dsl/acir_format/pg_recursion_constraint.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,14 +283,16 @@ void mock_sumcheck_ivc_accumulation(const std::shared_ptr<SumcheckClientIVC>& iv
283283
// Initialize verifier accumulator with proper structure
284284
ivc->recursive_verifier_native_accum.challenge =
285285
std::vector<FF>(SumcheckClientIVC::Flavor::VIRTUAL_LOG_N, FF::zero());
286-
ivc->recursive_verifier_native_accum.batched_evaluations = { FF::zero(), FF::zero() };
287-
ivc->recursive_verifier_native_accum.batched_commitments = { Commitment::one(), Commitment::one() };
286+
ivc->recursive_verifier_native_accum.non_shifted_evaluation = FF::zero();
287+
ivc->recursive_verifier_native_accum.shifted_evaluation = FF::zero();
288+
ivc->recursive_verifier_native_accum.non_shifted_commitment = Commitment::one();
289+
ivc->recursive_verifier_native_accum.shifted_commitment = Commitment::one();
288290

289291
SumcheckClientIVC::VerifierInputs entry = acir_format::create_mock_verification_queue_entry_nova(type, is_kernel);
290292
ivc->verification_queue.emplace_back(entry);
291293
ivc->goblin.merge_verification_queue.emplace_back(acir_format::create_mock_merge_proof());
292294
if (type == SumcheckClientIVC::QUEUE_TYPE::PG_FINAL) {
293-
ivc->pcs_proof = acir_format::create_mock_pcs_proof<SumcheckClientIVC::Flavor>();
295+
ivc->decider_proof = acir_format::create_mock_pcs_proof<SumcheckClientIVC::Flavor>();
294296
}
295297
ivc->num_circuits_accumulated++;
296298
}

barretenberg/cpp/src/barretenberg/dsl/acir_format/sumcheck_pg_recursion_constraint.test.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ TEST_F(SumcheckIvcRecursionConstraintTest, AccumulateTwoApps)
359359
// Test generation of "init" kernel VK via dummy IVC data
360360
TEST_F(SumcheckIvcRecursionConstraintTest, GenerateInitKernelVKFromConstraints)
361361
{
362+
BB_DISABLE_ASSERTS();
362363
// First, construct the kernel VK by running the full IVC (accumulate one app and one kernel)
363364
std::shared_ptr<MegaFlavor::VerificationKey> expected_kernel_vk;
364365
{
@@ -392,6 +393,7 @@ TEST_F(SumcheckIvcRecursionConstraintTest, GenerateInitKernelVKFromConstraints)
392393
// Test generation of "reset" kernel VK via dummy IVC data
393394
TEST_F(SumcheckIvcRecursionConstraintTest, GenerateResetKernelVKFromConstraints)
394395
{
396+
BB_DISABLE_ASSERTS();
395397
// First, construct the kernel VK by running the full IVC (accumulate one app and one kernel)
396398
std::shared_ptr<MegaFlavor::VerificationKey> expected_kernel_vk;
397399
{
@@ -431,6 +433,7 @@ TEST_F(SumcheckIvcRecursionConstraintTest, GenerateResetKernelVKFromConstraints)
431433
// Test generation of "tail" kernel VK via dummy IVC data
432434
TEST_F(SumcheckIvcRecursionConstraintTest, GenerateTailKernelVKFromConstraints)
433435
{
436+
BB_DISABLE_ASSERTS();
434437
// First, construct the kernel VK by running the full IVC (accumulate one app and one kernel)
435438
std::shared_ptr<MegaFlavor::VerificationKey> expected_kernel_vk;
436439
{
@@ -475,6 +478,7 @@ TEST_F(SumcheckIvcRecursionConstraintTest, GenerateTailKernelVKFromConstraints)
475478
// Test generation of "inner" kernel VK via dummy IVC data
476479
TEST_F(SumcheckIvcRecursionConstraintTest, GenerateInnerKernelVKFromConstraints)
477480
{
481+
BB_DISABLE_ASSERTS();
478482
// First, construct the kernel VK by running the full IVC (accumulate one app and one kernel)
479483
std::shared_ptr<MegaFlavor::VerificationKey> expected_kernel_vk;
480484
{
@@ -525,6 +529,7 @@ TEST_F(SumcheckIvcRecursionConstraintTest, GenerateInnerKernelVKFromConstraints)
525529
// Test generation of "hiding" kernel VK via dummy IVC data
526530
TEST_F(SumcheckIvcRecursionConstraintTest, GenerateHidingKernelVKFromConstraints)
527531
{
532+
BB_DISABLE_ASSERTS();
528533
// First, construct the kernel VK by running the full IVC
529534
std::shared_ptr<MegaFlavor::VerificationKey> expected_hiding_kernel_vk;
530535
{

barretenberg/cpp/src/barretenberg/flavor/flavor_concepts.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ concept IsRecursiveFlavor = IsAnyOf<T, UltraRecursiveFlavor_<UltraCircuitBuilder
6161
template <typename T>
6262
concept IsKeccakFlavor = IsAnyOf<T, UltraKeccakFlavor, UltraKeccakZKFlavor>;
6363

64+
template <typename T>
65+
concept isMultilinearBatchingFlavor =IsAnyOf<T, MultilinearBatchingFlavor>;
66+
6467
// This concept is relevant for the Sumcheck Prover, where the logic differs between BN254 and Grumpkin
6568
template <typename T> concept IsGrumpkinFlavor = IsAnyOf<T, ECCVMFlavor, ECCVMRecursiveFlavor>;
6669
template <typename Container, typename Element>

barretenberg/cpp/src/barretenberg/hypernova/hypernova_decider_verifier.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ template <typename Flavor_> class HypernovaDeciderVerifier {
3636

3737
std::shared_ptr<Transcript> transcript;
3838

39-
HypernovaDeciderVerifier(std::shared_ptr<Transcript>& transcript)
39+
HypernovaDeciderVerifier(const std::shared_ptr<Transcript>& transcript)
4040
: transcript(transcript) {};
4141

4242
PairingPoints verify_proof(Accumulator& accumulator, const Proof& proof);

0 commit comments

Comments
 (0)