From a934e85b416a029ae057e0e70277401fb7cfe4b9 Mon Sep 17 00:00:00 2001 From: Cody Gunton Date: Mon, 9 Sep 2024 11:40:21 -0400 Subject: [PATCH] chore: Rename files relating to what were "instances" (#8383) Follow-up to https://github.com/AztecProtocol/aztec-packages/pull/8362 where I rename files according to the new class names therein. Instances had been with sumcheck, but they don't really belong there, so I move them to ultra_honk. I also rename the recursive versions of things and the instance inspector in place. --- .../cpp/src/barretenberg/aztec_ivc/aztec_ivc.hpp | 2 +- .../protogalaxy_bench/protogalaxy.bench.cpp | 4 ++-- .../protogalaxy_rounds.bench.cpp | 2 +- .../benchmark/relations_bench/relations.bench.cpp | 2 +- .../cpp/src/barretenberg/client_ivc/client_ivc.hpp | 2 +- .../acir_format/honk_recursion_constraint.test.cpp | 2 +- .../acir_format/ivc_recursion_constraint.test.cpp | 2 +- barretenberg/cpp/src/barretenberg/goblin/goblin.hpp | 2 +- .../plonk_honk_shared/instance_inspector.cpp | 3 --- .../plonk_honk_shared/proving_key_inspector.cpp | 3 +++ ...tance_inspector.hpp => proving_key_inspector.hpp} | 0 .../src/barretenberg/protogalaxy/combiner.test.cpp | 2 +- .../src/barretenberg/protogalaxy/folding_result.hpp | 2 +- .../protogalaxy/protogalaxy_prover_mega.cpp | 2 +- .../protogalaxy/protogalaxy_prover_ultra.cpp | 2 +- .../protogalaxy/protogalaxy_verifier.hpp | 2 +- .../honk_verifier/decider_recursive_verifier.hpp | 2 +- .../stdlib/honk_verifier/oink_recursive_verifier.hpp | 2 +- .../stdlib/primitives/databus/databus.hpp | 2 +- .../protogalaxy_recursive_verifier.cpp | 2 +- .../protogalaxy_recursive_verifier.hpp | 2 +- .../protogalaxy_recursive_verifier.test.cpp | 2 +- ...ce.hpp => recursive_decider_verification_key.hpp} | 2 +- ...s.hpp => recursive_decider_verification_keys.hpp} | 2 +- .../stdlib/transcript/transcript.test.cpp | 2 +- .../cpp/src/barretenberg/sumcheck/sumcheck.cpp | 3 +++ .../cpp/src/barretenberg/sumcheck/sumcheck.hpp | 12 +----------- .../cpp/src/barretenberg/ultra_honk/databus.test.cpp | 2 +- .../instances.hpp => ultra_honk/decider_keys.hpp} | 4 ++-- .../src/barretenberg/ultra_honk/decider_prover.cpp | 5 ++++- .../src/barretenberg/ultra_honk/decider_prover.hpp | 2 +- .../decider_proving_key.cpp} | 2 +- .../decider_proving_key.hpp} | 0 .../decider_verification_key.hpp} | 0 .../src/barretenberg/ultra_honk/decider_verifier.cpp | 2 +- .../src/barretenberg/ultra_honk/decider_verifier.hpp | 2 +- .../barretenberg/ultra_honk/mega_transcript.test.cpp | 2 +- .../cpp/src/barretenberg/ultra_honk/oink_prover.cpp | 2 +- .../cpp/src/barretenberg/ultra_honk/oink_prover.hpp | 2 +- .../src/barretenberg/ultra_honk/oink_verifier.hpp | 2 +- .../ultra_honk/relation_correctness.test.cpp | 2 +- .../src/barretenberg/ultra_honk/sumcheck.test.cpp | 5 ++++- .../cpp/src/barretenberg/ultra_honk/ultra_prover.hpp | 2 +- .../ultra_honk/ultra_transcript.test.cpp | 2 +- .../src/barretenberg/ultra_honk/ultra_verifier.hpp | 2 +- .../vm/avm/recursion/avm_recursive_verifier.test.cpp | 2 +- 46 files changed, 54 insertions(+), 55 deletions(-) delete mode 100644 barretenberg/cpp/src/barretenberg/plonk_honk_shared/instance_inspector.cpp create mode 100644 barretenberg/cpp/src/barretenberg/plonk_honk_shared/proving_key_inspector.cpp rename barretenberg/cpp/src/barretenberg/plonk_honk_shared/{instance_inspector.hpp => proving_key_inspector.hpp} (100%) rename barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/{recursive_verifier_instance.hpp => recursive_decider_verification_key.hpp} (99%) rename barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/{recursive_instances.hpp => recursive_decider_verification_keys.hpp} (94%) create mode 100644 barretenberg/cpp/src/barretenberg/sumcheck/sumcheck.cpp rename barretenberg/cpp/src/barretenberg/{sumcheck/instance/instances.hpp => ultra_honk/decider_keys.hpp} (97%) rename barretenberg/cpp/src/barretenberg/{sumcheck/instance/prover_instance.cpp => ultra_honk/decider_proving_key.cpp} (99%) rename barretenberg/cpp/src/barretenberg/{sumcheck/instance/prover_instance.hpp => ultra_honk/decider_proving_key.hpp} (100%) rename barretenberg/cpp/src/barretenberg/{sumcheck/instance/verifier_instance.hpp => ultra_honk/decider_verification_key.hpp} (100%) diff --git a/barretenberg/cpp/src/barretenberg/aztec_ivc/aztec_ivc.hpp b/barretenberg/cpp/src/barretenberg/aztec_ivc/aztec_ivc.hpp index 1d2b60bcded..fcb34fa49ba 100644 --- a/barretenberg/cpp/src/barretenberg/aztec_ivc/aztec_ivc.hpp +++ b/barretenberg/cpp/src/barretenberg/aztec_ivc/aztec_ivc.hpp @@ -6,7 +6,7 @@ #include "barretenberg/protogalaxy/protogalaxy_prover.hpp" #include "barretenberg/protogalaxy/protogalaxy_verifier.hpp" #include "barretenberg/stdlib/primitives/databus/databus.hpp" -#include "barretenberg/sumcheck/instance/instances.hpp" +#include "barretenberg/ultra_honk/decider_keys.hpp" #include "barretenberg/ultra_honk/decider_prover.hpp" #include "barretenberg/ultra_honk/decider_verifier.hpp" #include diff --git a/barretenberg/cpp/src/barretenberg/benchmark/protogalaxy_bench/protogalaxy.bench.cpp b/barretenberg/cpp/src/barretenberg/benchmark/protogalaxy_bench/protogalaxy.bench.cpp index 35dce34f5fa..aad7be68295 100644 --- a/barretenberg/cpp/src/barretenberg/benchmark/protogalaxy_bench/protogalaxy.bench.cpp +++ b/barretenberg/cpp/src/barretenberg/benchmark/protogalaxy_bench/protogalaxy.bench.cpp @@ -4,8 +4,8 @@ #include "barretenberg/protogalaxy/protogalaxy_prover.hpp" #include "barretenberg/stdlib_circuit_builders/mock_circuits.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_circuit_builder.hpp" -#include "barretenberg/sumcheck/instance/instances.hpp" -#include "barretenberg/sumcheck/instance/prover_instance.hpp" +#include "barretenberg/ultra_honk/decider_keys.hpp" +#include "barretenberg/ultra_honk/decider_proving_key.hpp" using namespace benchmark; diff --git a/barretenberg/cpp/src/barretenberg/benchmark/protogalaxy_rounds_bench/protogalaxy_rounds.bench.cpp b/barretenberg/cpp/src/barretenberg/benchmark/protogalaxy_rounds_bench/protogalaxy_rounds.bench.cpp index 650b4a8727e..da79a67adb5 100644 --- a/barretenberg/cpp/src/barretenberg/benchmark/protogalaxy_rounds_bench/protogalaxy_rounds.bench.cpp +++ b/barretenberg/cpp/src/barretenberg/benchmark/protogalaxy_rounds_bench/protogalaxy_rounds.bench.cpp @@ -3,7 +3,7 @@ #include "barretenberg/protogalaxy/protogalaxy_prover.hpp" #include "barretenberg/stdlib_circuit_builders/mock_circuits.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_circuit_builder.hpp" -#include "barretenberg/sumcheck/instance/instances.hpp" +#include "barretenberg/ultra_honk/decider_keys.hpp" using namespace benchmark; diff --git a/barretenberg/cpp/src/barretenberg/benchmark/relations_bench/relations.bench.cpp b/barretenberg/cpp/src/barretenberg/benchmark/relations_bench/relations.bench.cpp index 501f39a5f10..6ea39cbc4ae 100644 --- a/barretenberg/cpp/src/barretenberg/benchmark/relations_bench/relations.bench.cpp +++ b/barretenberg/cpp/src/barretenberg/benchmark/relations_bench/relations.bench.cpp @@ -2,8 +2,8 @@ #include "barretenberg/protogalaxy/protogalaxy_prover_internal.hpp" // just for an alias; should perhaps move to prover #include "barretenberg/stdlib_circuit_builders/mega_flavor.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_flavor.hpp" -#include "barretenberg/sumcheck/instance/instances.hpp" #include "barretenberg/translator_vm/translator_flavor.hpp" +#include "barretenberg/ultra_honk/decider_keys.hpp" #include namespace { diff --git a/barretenberg/cpp/src/barretenberg/client_ivc/client_ivc.hpp b/barretenberg/cpp/src/barretenberg/client_ivc/client_ivc.hpp index ec7d5dcc6b0..078e8fa98ca 100644 --- a/barretenberg/cpp/src/barretenberg/client_ivc/client_ivc.hpp +++ b/barretenberg/cpp/src/barretenberg/client_ivc/client_ivc.hpp @@ -5,7 +5,7 @@ #include "barretenberg/plonk_honk_shared/arithmetization/max_block_size_tracker.hpp" #include "barretenberg/protogalaxy/protogalaxy_prover.hpp" #include "barretenberg/protogalaxy/protogalaxy_verifier.hpp" -#include "barretenberg/sumcheck/instance/instances.hpp" +#include "barretenberg/ultra_honk/decider_keys.hpp" #include "barretenberg/ultra_honk/decider_prover.hpp" #include "barretenberg/ultra_honk/decider_verifier.hpp" #include diff --git a/barretenberg/cpp/src/barretenberg/dsl/acir_format/honk_recursion_constraint.test.cpp b/barretenberg/cpp/src/barretenberg/dsl/acir_format/honk_recursion_constraint.test.cpp index b101c814140..20eebf67b60 100644 --- a/barretenberg/cpp/src/barretenberg/dsl/acir_format/honk_recursion_constraint.test.cpp +++ b/barretenberg/cpp/src/barretenberg/dsl/acir_format/honk_recursion_constraint.test.cpp @@ -1,7 +1,7 @@ #include "honk_recursion_constraint.hpp" #include "acir_format.hpp" #include "acir_format_mocks.hpp" -#include "barretenberg/sumcheck/instance/prover_instance.hpp" +#include "barretenberg/ultra_honk/decider_proving_key.hpp" #include "barretenberg/ultra_honk/ultra_prover.hpp" #include "barretenberg/ultra_honk/ultra_verifier.hpp" #include "proof_surgeon.hpp" diff --git a/barretenberg/cpp/src/barretenberg/dsl/acir_format/ivc_recursion_constraint.test.cpp b/barretenberg/cpp/src/barretenberg/dsl/acir_format/ivc_recursion_constraint.test.cpp index 981992accc1..bee50c74aa7 100644 --- a/barretenberg/cpp/src/barretenberg/dsl/acir_format/ivc_recursion_constraint.test.cpp +++ b/barretenberg/cpp/src/barretenberg/dsl/acir_format/ivc_recursion_constraint.test.cpp @@ -2,7 +2,7 @@ #include "acir_format_mocks.hpp" #include "barretenberg/aztec_ivc/aztec_ivc.hpp" #include "barretenberg/goblin/mock_circuits.hpp" -#include "barretenberg/sumcheck/instance/prover_instance.hpp" +#include "barretenberg/ultra_honk/decider_proving_key.hpp" #include "barretenberg/ultra_honk/ultra_prover.hpp" #include "barretenberg/ultra_honk/ultra_verifier.hpp" #include "honk_recursion_constraint.hpp" diff --git a/barretenberg/cpp/src/barretenberg/goblin/goblin.hpp b/barretenberg/cpp/src/barretenberg/goblin/goblin.hpp index 55336db7f0b..18415c42637 100644 --- a/barretenberg/cpp/src/barretenberg/goblin/goblin.hpp +++ b/barretenberg/cpp/src/barretenberg/goblin/goblin.hpp @@ -6,7 +6,7 @@ #include "barretenberg/eccvm/eccvm_verifier.hpp" #include "barretenberg/goblin/mock_circuits.hpp" #include "barretenberg/goblin/types.hpp" -#include "barretenberg/plonk_honk_shared/instance_inspector.hpp" +#include "barretenberg/plonk_honk_shared/proving_key_inspector.hpp" #include "barretenberg/polynomials/polynomial.hpp" #include "barretenberg/stdlib/goblin_verifier/merge_recursive_verifier.hpp" #include "barretenberg/stdlib_circuit_builders/mega_circuit_builder.hpp" diff --git a/barretenberg/cpp/src/barretenberg/plonk_honk_shared/instance_inspector.cpp b/barretenberg/cpp/src/barretenberg/plonk_honk_shared/instance_inspector.cpp deleted file mode 100644 index 529a3b46b02..00000000000 --- a/barretenberg/cpp/src/barretenberg/plonk_honk_shared/instance_inspector.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#include "instance_inspector.hpp" - -// Hack to make the module compile. \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/plonk_honk_shared/proving_key_inspector.cpp b/barretenberg/cpp/src/barretenberg/plonk_honk_shared/proving_key_inspector.cpp new file mode 100644 index 00000000000..ca6a446e8bd --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/plonk_honk_shared/proving_key_inspector.cpp @@ -0,0 +1,3 @@ +#include "proving_key_inspector.hpp" + +// Hack to make the module compile. \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/plonk_honk_shared/instance_inspector.hpp b/barretenberg/cpp/src/barretenberg/plonk_honk_shared/proving_key_inspector.hpp similarity index 100% rename from barretenberg/cpp/src/barretenberg/plonk_honk_shared/instance_inspector.hpp rename to barretenberg/cpp/src/barretenberg/plonk_honk_shared/proving_key_inspector.hpp diff --git a/barretenberg/cpp/src/barretenberg/protogalaxy/combiner.test.cpp b/barretenberg/cpp/src/barretenberg/protogalaxy/combiner.test.cpp index 966fb045273..3568b32f05c 100644 --- a/barretenberg/cpp/src/barretenberg/protogalaxy/combiner.test.cpp +++ b/barretenberg/cpp/src/barretenberg/protogalaxy/combiner.test.cpp @@ -2,7 +2,7 @@ #include "barretenberg/protogalaxy/protogalaxy_prover_internal.hpp" #include "barretenberg/relations/ultra_arithmetic_relation.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_flavor.hpp" -#include "barretenberg/sumcheck/instance/instances.hpp" +#include "barretenberg/ultra_honk/decider_keys.hpp" #include using namespace bb; diff --git a/barretenberg/cpp/src/barretenberg/protogalaxy/folding_result.hpp b/barretenberg/cpp/src/barretenberg/protogalaxy/folding_result.hpp index 016668440f2..cad8fcf7844 100644 --- a/barretenberg/cpp/src/barretenberg/protogalaxy/folding_result.hpp +++ b/barretenberg/cpp/src/barretenberg/protogalaxy/folding_result.hpp @@ -1,7 +1,7 @@ #pragma once #include "barretenberg/flavor/flavor.hpp" #include "barretenberg/relations/relation_parameters.hpp" -#include "barretenberg/sumcheck/instance/prover_instance.hpp" +#include "barretenberg/ultra_honk/decider_proving_key.hpp" namespace bb { /** * @brief The result of running the Protogalaxy prover containing a new accumulator as well as the proof data to diff --git a/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_prover_mega.cpp b/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_prover_mega.cpp index b87d837a995..3e6afdda97c 100644 --- a/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_prover_mega.cpp +++ b/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_prover_mega.cpp @@ -1,6 +1,6 @@ // Note: this is split up from protogalaxy_prover_impl.hpp for compile performance reasons #include "barretenberg/flavor/flavor.hpp" -#include "barretenberg/sumcheck/instance/instances.hpp" +#include "barretenberg/ultra_honk/decider_keys.hpp" #include "barretenberg/ultra_honk/oink_prover.hpp" #include "protogalaxy_prover_impl.hpp" namespace bb { diff --git a/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_prover_ultra.cpp b/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_prover_ultra.cpp index 16d6d3a6ee9..22882e27693 100644 --- a/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_prover_ultra.cpp +++ b/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_prover_ultra.cpp @@ -1,5 +1,5 @@ // Note: this is split up from protogalaxy_prover_impl.hpp for compile performance reasons -#include "barretenberg/sumcheck/instance/instances.hpp" +#include "barretenberg/ultra_honk/decider_keys.hpp" #include "protogalaxy_prover_impl.hpp" // TODO(https://github.com/AztecProtocol/barretenberg/issues/1076) Remove this instantiation. diff --git a/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_verifier.hpp b/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_verifier.hpp index 62cb343940a..41b7e7d0dd4 100644 --- a/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_verifier.hpp @@ -3,8 +3,8 @@ #include "barretenberg/protogalaxy/folding_result.hpp" #include "barretenberg/stdlib_circuit_builders/mega_flavor.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_flavor.hpp" -#include "barretenberg/sumcheck/instance/instances.hpp" #include "barretenberg/transcript/transcript.hpp" +#include "barretenberg/ultra_honk/decider_keys.hpp" namespace bb { template class ProtogalaxyVerifier_ { diff --git a/barretenberg/cpp/src/barretenberg/stdlib/honk_verifier/decider_recursive_verifier.hpp b/barretenberg/cpp/src/barretenberg/stdlib/honk_verifier/decider_recursive_verifier.hpp index 57b128601bd..b4b8cec6690 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/honk_verifier/decider_recursive_verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/honk_verifier/decider_recursive_verifier.hpp @@ -1,6 +1,6 @@ #pragma once #include "barretenberg/honk/proof_system/types/proof.hpp" -#include "barretenberg/stdlib/protogalaxy_verifier/recursive_verifier_instance.hpp" +#include "barretenberg/stdlib/protogalaxy_verifier/recursive_decider_verification_key.hpp" #include "barretenberg/stdlib/transcript/transcript.hpp" #include "barretenberg/stdlib_circuit_builders/mega_recursive_flavor.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_recursive_flavor.hpp" diff --git a/barretenberg/cpp/src/barretenberg/stdlib/honk_verifier/oink_recursive_verifier.hpp b/barretenberg/cpp/src/barretenberg/stdlib/honk_verifier/oink_recursive_verifier.hpp index a2e4bb0b6a3..5b021062313 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/honk_verifier/oink_recursive_verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/honk_verifier/oink_recursive_verifier.hpp @@ -1,5 +1,5 @@ #pragma once -#include "barretenberg/stdlib/protogalaxy_verifier/recursive_verifier_instance.hpp" +#include "barretenberg/stdlib/protogalaxy_verifier/recursive_decider_verification_key.hpp" #include "barretenberg/stdlib/transcript/transcript.hpp" #include "barretenberg/stdlib_circuit_builders/mega_recursive_flavor.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_recursive_flavor.hpp" diff --git a/barretenberg/cpp/src/barretenberg/stdlib/primitives/databus/databus.hpp b/barretenberg/cpp/src/barretenberg/stdlib/primitives/databus/databus.hpp index 427e09e8fa1..b8bc065e463 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/primitives/databus/databus.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/primitives/databus/databus.hpp @@ -2,7 +2,7 @@ #include "../circuit_builders/circuit_builders_fwd.hpp" #include "../field/field.hpp" #include "barretenberg/stdlib/primitives/curves/bn254.hpp" -#include "barretenberg/stdlib/protogalaxy_verifier/recursive_instances.hpp" +#include "barretenberg/stdlib/protogalaxy_verifier/recursive_decider_verification_keys.hpp" #include "barretenberg/stdlib_circuit_builders/databus.hpp" namespace bb::stdlib { diff --git a/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/protogalaxy_recursive_verifier.cpp b/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/protogalaxy_recursive_verifier.cpp index ad19ca6a681..b64d0b09f38 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/protogalaxy_recursive_verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/protogalaxy_recursive_verifier.cpp @@ -1,6 +1,6 @@ #include "protogalaxy_recursive_verifier.hpp" #include "barretenberg/plonk_honk_shared/library/grand_product_delta.hpp" -#include "barretenberg/stdlib/protogalaxy_verifier/recursive_instances.hpp" +#include "barretenberg/stdlib/protogalaxy_verifier/recursive_decider_verification_keys.hpp" namespace bb::stdlib::recursion::honk { diff --git a/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/protogalaxy_recursive_verifier.hpp b/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/protogalaxy_recursive_verifier.hpp index 31935f8c561..fc1202cc071 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/protogalaxy_recursive_verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/protogalaxy_recursive_verifier.hpp @@ -3,7 +3,7 @@ #include "barretenberg/honk/proof_system/types/proof.hpp" #include "barretenberg/protogalaxy/folding_result.hpp" #include "barretenberg/stdlib/honk_verifier/oink_recursive_verifier.hpp" -#include "barretenberg/stdlib/protogalaxy_verifier/recursive_instances.hpp" +#include "barretenberg/stdlib/protogalaxy_verifier/recursive_decider_verification_keys.hpp" #include "barretenberg/stdlib/transcript/transcript.hpp" #include "barretenberg/stdlib_circuit_builders/mega_recursive_flavor.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_recursive_flavor.hpp" diff --git a/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/protogalaxy_recursive_verifier.test.cpp b/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/protogalaxy_recursive_verifier.test.cpp index 88ff343ab79..9e633c35b10 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/protogalaxy_recursive_verifier.test.cpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/protogalaxy_recursive_verifier.test.cpp @@ -8,7 +8,7 @@ #include "barretenberg/stdlib/honk_verifier/decider_recursive_verifier.hpp" #include "barretenberg/stdlib/primitives/curves/bn254.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_recursive_flavor.hpp" -#include "barretenberg/sumcheck/instance/instances.hpp" +#include "barretenberg/ultra_honk/decider_keys.hpp" #include "barretenberg/ultra_honk/decider_prover.hpp" #include "barretenberg/ultra_honk/decider_verifier.hpp" #include "barretenberg/ultra_honk/ultra_prover.hpp" diff --git a/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/recursive_verifier_instance.hpp b/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/recursive_decider_verification_key.hpp similarity index 99% rename from barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/recursive_verifier_instance.hpp rename to barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/recursive_decider_verification_key.hpp index bc536d781c1..9f08c708adc 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/recursive_verifier_instance.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/recursive_decider_verification_key.hpp @@ -2,7 +2,7 @@ #include "barretenberg/commitment_schemes/verification_key.hpp" #include "barretenberg/flavor/flavor.hpp" #include "barretenberg/relations/relation_parameters.hpp" -#include "barretenberg/sumcheck/instance/verifier_instance.hpp" +#include "barretenberg/ultra_honk/decider_verification_key.hpp" namespace bb::stdlib::recursion::honk { diff --git a/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/recursive_instances.hpp b/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/recursive_decider_verification_keys.hpp similarity index 94% rename from barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/recursive_instances.hpp rename to barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/recursive_decider_verification_keys.hpp index c168fdd3b12..eadd7d8a656 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/recursive_instances.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/recursive_decider_verification_keys.hpp @@ -1,7 +1,7 @@ #pragma once #include "barretenberg/flavor/flavor.hpp" #include "barretenberg/relations/relation_parameters.hpp" -#include "barretenberg/stdlib/protogalaxy_verifier/recursive_verifier_instance.hpp" +#include "barretenberg/stdlib/protogalaxy_verifier/recursive_decider_verification_key.hpp" namespace bb::stdlib::recursion::honk { template struct RecursiveDeciderVerificationKeys_ { diff --git a/barretenberg/cpp/src/barretenberg/stdlib/transcript/transcript.test.cpp b/barretenberg/cpp/src/barretenberg/stdlib/transcript/transcript.test.cpp index 6369a7149a2..0344b1f8835 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/transcript/transcript.test.cpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/transcript/transcript.test.cpp @@ -6,8 +6,8 @@ #include "barretenberg/polynomials/univariate.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_flavor.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_recursive_flavor.hpp" -#include "barretenberg/sumcheck/instance/prover_instance.hpp" #include "barretenberg/transcript/transcript.hpp" +#include "barretenberg/ultra_honk/decider_proving_key.hpp" #include "barretenberg/ultra_honk/ultra_prover.hpp" #include "barretenberg/ultra_honk/ultra_verifier.hpp" diff --git a/barretenberg/cpp/src/barretenberg/sumcheck/sumcheck.cpp b/barretenberg/cpp/src/barretenberg/sumcheck/sumcheck.cpp new file mode 100644 index 00000000000..fad82be3874 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/sumcheck/sumcheck.cpp @@ -0,0 +1,3 @@ +#include "sumcheck.hpp" + +// Hack to make the module compile. diff --git a/barretenberg/cpp/src/barretenberg/sumcheck/sumcheck.hpp b/barretenberg/cpp/src/barretenberg/sumcheck/sumcheck.hpp index 10e580cf810..2b9d01072f3 100644 --- a/barretenberg/cpp/src/barretenberg/sumcheck/sumcheck.hpp +++ b/barretenberg/cpp/src/barretenberg/sumcheck/sumcheck.hpp @@ -1,9 +1,9 @@ #pragma once #include "barretenberg/plonk_honk_shared/library/grand_product_delta.hpp" #include "barretenberg/polynomials/polynomial_arithmetic.hpp" -#include "barretenberg/sumcheck/instance/prover_instance.hpp" #include "barretenberg/sumcheck/sumcheck_output.hpp" #include "barretenberg/transcript/transcript.hpp" +#include "barretenberg/ultra_honk/decider_proving_key.hpp" #include "sumcheck_round.hpp" namespace bb { @@ -123,7 +123,6 @@ template class SumcheckProver { using ClaimedEvaluations = typename Flavor::AllValues; using Transcript = typename Flavor::Transcript; - using DeciderPK = DeciderProvingKey_; using RelationSeparator = typename Flavor::RelationSeparator; /** * @brief The total algebraic degree of the Sumcheck relation \f$ F \f$ as a polynomial in Prover Polynomials @@ -178,15 +177,6 @@ template class SumcheckProver { , round(multivariate_n) , partially_evaluated_polynomials(multivariate_n){}; - /** - * @brief Compute round univariate, place it in transcript, compute challenge, partially evaluate. Repeat - * until final round, then get full evaluations of prover polynomials, and place them in transcript. - */ - SumcheckOutput prove(std::shared_ptr key) - { - return prove(key->proving_key.polynomials, key->relation_parameters, key->alphas, key->gate_challenges); - }; - /** * @brief Compute round univariate, place it in transcript, compute challenge, partially evaluate. Repeat * until final round, then get full evaluations of prover polynomials, and place them in transcript. diff --git a/barretenberg/cpp/src/barretenberg/ultra_honk/databus.test.cpp b/barretenberg/cpp/src/barretenberg/ultra_honk/databus.test.cpp index 57f0a88dee1..01fad4e3974 100644 --- a/barretenberg/cpp/src/barretenberg/ultra_honk/databus.test.cpp +++ b/barretenberg/cpp/src/barretenberg/ultra_honk/databus.test.cpp @@ -4,7 +4,7 @@ #include "barretenberg/common/log.hpp" #include "barretenberg/goblin/mock_circuits.hpp" -#include "barretenberg/plonk_honk_shared/instance_inspector.hpp" +#include "barretenberg/plonk_honk_shared/proving_key_inspector.hpp" #include "barretenberg/stdlib_circuit_builders/mega_circuit_builder.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_circuit_builder.hpp" diff --git a/barretenberg/cpp/src/barretenberg/sumcheck/instance/instances.hpp b/barretenberg/cpp/src/barretenberg/ultra_honk/decider_keys.hpp similarity index 97% rename from barretenberg/cpp/src/barretenberg/sumcheck/instance/instances.hpp rename to barretenberg/cpp/src/barretenberg/ultra_honk/decider_keys.hpp index ae07e38a471..882950d95db 100644 --- a/barretenberg/cpp/src/barretenberg/sumcheck/instance/instances.hpp +++ b/barretenberg/cpp/src/barretenberg/ultra_honk/decider_keys.hpp @@ -1,6 +1,6 @@ #pragma once -#include "barretenberg/sumcheck/instance/prover_instance.hpp" -#include "barretenberg/sumcheck/instance/verifier_instance.hpp" +#include "barretenberg/ultra_honk/decider_proving_key.hpp" +#include "barretenberg/ultra_honk/decider_verification_key.hpp" namespace bb { diff --git a/barretenberg/cpp/src/barretenberg/ultra_honk/decider_prover.cpp b/barretenberg/cpp/src/barretenberg/ultra_honk/decider_prover.cpp index 0f19b78e6ce..5d8defd5036 100644 --- a/barretenberg/cpp/src/barretenberg/ultra_honk/decider_prover.cpp +++ b/barretenberg/cpp/src/barretenberg/ultra_honk/decider_prover.cpp @@ -32,7 +32,10 @@ template void DeciderProver_::execute_relation_ch auto sumcheck = Sumcheck(polynomial_size, transcript); { ZoneScopedN("sumcheck.prove"); - sumcheck_output = sumcheck.prove(proving_key); + sumcheck_output = sumcheck.prove(proving_key->proving_key.polynomials, + proving_key->relation_parameters, + proving_key->alphas, + proving_key->gate_challenges); } } diff --git a/barretenberg/cpp/src/barretenberg/ultra_honk/decider_prover.hpp b/barretenberg/cpp/src/barretenberg/ultra_honk/decider_prover.hpp index a03519c2abc..c85a9520d47 100644 --- a/barretenberg/cpp/src/barretenberg/ultra_honk/decider_prover.hpp +++ b/barretenberg/cpp/src/barretenberg/ultra_honk/decider_prover.hpp @@ -4,9 +4,9 @@ #include "barretenberg/relations/relation_parameters.hpp" #include "barretenberg/stdlib_circuit_builders/mega_flavor.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_flavor.hpp" -#include "barretenberg/sumcheck/instance/prover_instance.hpp" #include "barretenberg/sumcheck/sumcheck_output.hpp" #include "barretenberg/transcript/transcript.hpp" +#include "barretenberg/ultra_honk/decider_proving_key.hpp" namespace bb { diff --git a/barretenberg/cpp/src/barretenberg/sumcheck/instance/prover_instance.cpp b/barretenberg/cpp/src/barretenberg/ultra_honk/decider_proving_key.cpp similarity index 99% rename from barretenberg/cpp/src/barretenberg/sumcheck/instance/prover_instance.cpp rename to barretenberg/cpp/src/barretenberg/ultra_honk/decider_proving_key.cpp index 555239874fd..47e282ecf2f 100644 --- a/barretenberg/cpp/src/barretenberg/sumcheck/instance/prover_instance.cpp +++ b/barretenberg/cpp/src/barretenberg/ultra_honk/decider_proving_key.cpp @@ -1,4 +1,4 @@ -#include "prover_instance.hpp" +#include "decider_proving_key.hpp" #include "barretenberg/honk/proof_system/logderivative_library.hpp" #include "barretenberg/plonk_honk_shared/composer/permutation_lib.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_circuit_builder.hpp" diff --git a/barretenberg/cpp/src/barretenberg/sumcheck/instance/prover_instance.hpp b/barretenberg/cpp/src/barretenberg/ultra_honk/decider_proving_key.hpp similarity index 100% rename from barretenberg/cpp/src/barretenberg/sumcheck/instance/prover_instance.hpp rename to barretenberg/cpp/src/barretenberg/ultra_honk/decider_proving_key.hpp diff --git a/barretenberg/cpp/src/barretenberg/sumcheck/instance/verifier_instance.hpp b/barretenberg/cpp/src/barretenberg/ultra_honk/decider_verification_key.hpp similarity index 100% rename from barretenberg/cpp/src/barretenberg/sumcheck/instance/verifier_instance.hpp rename to barretenberg/cpp/src/barretenberg/ultra_honk/decider_verification_key.hpp diff --git a/barretenberg/cpp/src/barretenberg/ultra_honk/decider_verifier.cpp b/barretenberg/cpp/src/barretenberg/ultra_honk/decider_verifier.cpp index 19021e83e4c..8fb81f8749c 100644 --- a/barretenberg/cpp/src/barretenberg/ultra_honk/decider_verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/ultra_honk/decider_verifier.cpp @@ -1,8 +1,8 @@ #include "decider_verifier.hpp" #include "barretenberg/commitment_schemes/zeromorph/zeromorph.hpp" #include "barretenberg/numeric/bitop/get_msb.hpp" -#include "barretenberg/sumcheck/instance/verifier_instance.hpp" #include "barretenberg/transcript/transcript.hpp" +#include "barretenberg/ultra_honk/decider_verification_key.hpp" namespace bb { diff --git a/barretenberg/cpp/src/barretenberg/ultra_honk/decider_verifier.hpp b/barretenberg/cpp/src/barretenberg/ultra_honk/decider_verifier.hpp index af8615d4e6f..904b0a8b968 100644 --- a/barretenberg/cpp/src/barretenberg/ultra_honk/decider_verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/ultra_honk/decider_verifier.hpp @@ -3,8 +3,8 @@ #include "barretenberg/srs/global_crs.hpp" #include "barretenberg/stdlib_circuit_builders/mega_flavor.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_flavor.hpp" -#include "barretenberg/sumcheck/instance/verifier_instance.hpp" #include "barretenberg/sumcheck/sumcheck.hpp" +#include "barretenberg/ultra_honk/decider_verification_key.hpp" namespace bb { template class DeciderVerifier_ { diff --git a/barretenberg/cpp/src/barretenberg/ultra_honk/mega_transcript.test.cpp b/barretenberg/cpp/src/barretenberg/ultra_honk/mega_transcript.test.cpp index aac1f5fe906..abce1f324ac 100644 --- a/barretenberg/cpp/src/barretenberg/ultra_honk/mega_transcript.test.cpp +++ b/barretenberg/cpp/src/barretenberg/ultra_honk/mega_transcript.test.cpp @@ -2,8 +2,8 @@ #include "barretenberg/flavor/flavor.hpp" #include "barretenberg/numeric/bitop/get_msb.hpp" #include "barretenberg/polynomials/univariate.hpp" -#include "barretenberg/sumcheck/instance/prover_instance.hpp" #include "barretenberg/transcript/transcript.hpp" +#include "barretenberg/ultra_honk/decider_proving_key.hpp" #include "barretenberg/ultra_honk/ultra_prover.hpp" #include "barretenberg/ultra_honk/ultra_verifier.hpp" diff --git a/barretenberg/cpp/src/barretenberg/ultra_honk/oink_prover.cpp b/barretenberg/cpp/src/barretenberg/ultra_honk/oink_prover.cpp index 6fdbf6a3835..9e7a2091841 100644 --- a/barretenberg/cpp/src/barretenberg/ultra_honk/oink_prover.cpp +++ b/barretenberg/cpp/src/barretenberg/ultra_honk/oink_prover.cpp @@ -1,5 +1,5 @@ #include "barretenberg/ultra_honk/oink_prover.hpp" -#include "barretenberg/plonk_honk_shared/instance_inspector.hpp" +#include "barretenberg/plonk_honk_shared/proving_key_inspector.hpp" #include "barretenberg/relations/logderiv_lookup_relation.hpp" namespace bb { diff --git a/barretenberg/cpp/src/barretenberg/ultra_honk/oink_prover.hpp b/barretenberg/cpp/src/barretenberg/ultra_honk/oink_prover.hpp index f51ae3476c6..e252f7d904d 100644 --- a/barretenberg/cpp/src/barretenberg/ultra_honk/oink_prover.hpp +++ b/barretenberg/cpp/src/barretenberg/ultra_honk/oink_prover.hpp @@ -22,8 +22,8 @@ #include "barretenberg/stdlib_circuit_builders/mega_flavor.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_flavor.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_keccak_flavor.hpp" -#include "barretenberg/sumcheck/instance/prover_instance.hpp" #include "barretenberg/transcript/transcript.hpp" +#include "barretenberg/ultra_honk/decider_proving_key.hpp" namespace bb { /** diff --git a/barretenberg/cpp/src/barretenberg/ultra_honk/oink_verifier.hpp b/barretenberg/cpp/src/barretenberg/ultra_honk/oink_verifier.hpp index d4d2925cff3..fab7bcdff19 100644 --- a/barretenberg/cpp/src/barretenberg/ultra_honk/oink_verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/ultra_honk/oink_verifier.hpp @@ -6,7 +6,7 @@ #include "barretenberg/stdlib_circuit_builders/mega_flavor.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_flavor.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_keccak_flavor.hpp" -#include "barretenberg/sumcheck/instance/verifier_instance.hpp" +#include "barretenberg/ultra_honk/decider_verification_key.hpp" namespace bb { diff --git a/barretenberg/cpp/src/barretenberg/ultra_honk/relation_correctness.test.cpp b/barretenberg/cpp/src/barretenberg/ultra_honk/relation_correctness.test.cpp index aa8805b5389..0a07331bd10 100644 --- a/barretenberg/cpp/src/barretenberg/ultra_honk/relation_correctness.test.cpp +++ b/barretenberg/cpp/src/barretenberg/ultra_honk/relation_correctness.test.cpp @@ -11,7 +11,7 @@ #include "barretenberg/stdlib_circuit_builders/mega_flavor.hpp" #include "barretenberg/stdlib_circuit_builders/plookup_tables/fixed_base/fixed_base.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_flavor.hpp" -#include "barretenberg/sumcheck/instance/prover_instance.hpp" +#include "barretenberg/ultra_honk/decider_proving_key.hpp" #include using namespace bb; diff --git a/barretenberg/cpp/src/barretenberg/ultra_honk/sumcheck.test.cpp b/barretenberg/cpp/src/barretenberg/ultra_honk/sumcheck.test.cpp index d1c0e06573a..45f5a78c4d3 100644 --- a/barretenberg/cpp/src/barretenberg/ultra_honk/sumcheck.test.cpp +++ b/barretenberg/cpp/src/barretenberg/ultra_honk/sumcheck.test.cpp @@ -179,7 +179,10 @@ TEST_F(SumcheckTestsRealCircuit, Ultra) prover_transcript->template get_challenge("Sumcheck:gate_challenge_" + std::to_string(idx)); } decider_pk->gate_challenges = prover_gate_challenges; - auto prover_output = sumcheck_prover.prove(decider_pk); + auto prover_output = sumcheck_prover.prove(decider_pk->proving_key.polynomials, + decider_pk->relation_parameters, + decider_pk->alphas, + decider_pk->gate_challenges); auto verifier_transcript = Transcript::verifier_init_empty(prover_transcript); diff --git a/barretenberg/cpp/src/barretenberg/ultra_honk/ultra_prover.hpp b/barretenberg/cpp/src/barretenberg/ultra_honk/ultra_prover.hpp index 61837b11a76..6ab19509eb6 100644 --- a/barretenberg/cpp/src/barretenberg/ultra_honk/ultra_prover.hpp +++ b/barretenberg/cpp/src/barretenberg/ultra_honk/ultra_prover.hpp @@ -4,9 +4,9 @@ #include "barretenberg/relations/relation_parameters.hpp" #include "barretenberg/stdlib_circuit_builders/mega_flavor.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_flavor.hpp" -#include "barretenberg/sumcheck/instance/prover_instance.hpp" #include "barretenberg/sumcheck/sumcheck_output.hpp" #include "barretenberg/transcript/transcript.hpp" +#include "barretenberg/ultra_honk/decider_proving_key.hpp" namespace bb { diff --git a/barretenberg/cpp/src/barretenberg/ultra_honk/ultra_transcript.test.cpp b/barretenberg/cpp/src/barretenberg/ultra_honk/ultra_transcript.test.cpp index c1cd6ff054a..0c7f44893fa 100644 --- a/barretenberg/cpp/src/barretenberg/ultra_honk/ultra_transcript.test.cpp +++ b/barretenberg/cpp/src/barretenberg/ultra_honk/ultra_transcript.test.cpp @@ -3,8 +3,8 @@ #include "barretenberg/numeric/bitop/get_msb.hpp" #include "barretenberg/polynomials/univariate.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_flavor.hpp" -#include "barretenberg/sumcheck/instance/prover_instance.hpp" #include "barretenberg/transcript/transcript.hpp" +#include "barretenberg/ultra_honk/decider_proving_key.hpp" #include "barretenberg/ultra_honk/ultra_prover.hpp" #include "barretenberg/ultra_honk/ultra_verifier.hpp" diff --git a/barretenberg/cpp/src/barretenberg/ultra_honk/ultra_verifier.hpp b/barretenberg/cpp/src/barretenberg/ultra_honk/ultra_verifier.hpp index 2aeb11326a3..71bebc42cf4 100644 --- a/barretenberg/cpp/src/barretenberg/ultra_honk/ultra_verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/ultra_honk/ultra_verifier.hpp @@ -3,8 +3,8 @@ #include "barretenberg/srs/global_crs.hpp" #include "barretenberg/stdlib_circuit_builders/mega_flavor.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_flavor.hpp" -#include "barretenberg/sumcheck/instance//verifier_instance.hpp" #include "barretenberg/sumcheck/sumcheck.hpp" +#include "barretenberg/ultra_honk/decider_verification_key.hpp" #include "barretenberg/ultra_honk/decider_verifier.hpp" namespace bb { diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp index 7f9a7fd2674..368830f881d 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp @@ -2,7 +2,7 @@ #include "barretenberg/circuit_checker/circuit_checker.hpp" #include "barretenberg/numeric/random/engine.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_flavor.hpp" -#include "barretenberg/sumcheck/instance/prover_instance.hpp" +#include "barretenberg/ultra_honk/decider_proving_key.hpp" #include "barretenberg/ultra_honk/ultra_prover.hpp" #include "barretenberg/ultra_honk/ultra_verifier.hpp" #include "barretenberg/vm/avm/generated/circuit_builder.hpp"