Skip to content

Commit 0e941ef

Browse files
authored
chore: remove pcs vk from vk (#13638)
The PCS verification key did not need to be part of the VK (except maybe for ECCVM). I've removed it from the base class VerificationKey_ which allows for the removal of a lot of boilerplate and defaulting. Closes AztecProtocol/barretenberg#1335
1 parent 9d941b6 commit 0e941ef

33 files changed

+40
-95
lines changed

barretenberg/cpp/src/barretenberg/api/api_client_ivc.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,6 @@ bool ClientIVCAPI::verify([[maybe_unused]] const Flags& flags,
301301
const auto proof = ClientIVC::Proof::from_file_msgpack(proof_path);
302302
const auto vk = from_buffer<ClientIVC::VerificationKey>(read_file(vk_path));
303303

304-
// TODO(https://github.com/AztecProtocol/barretenberg/issues/1335): Should be able to remove this.
305-
vk.mega->pcs_verification_key = std::make_shared<VerifierCommitmentKey<curve::BN254>>();
306-
307304
const bool verified = ClientIVC::verify(proof, vk);
308305
return verified;
309306
}

barretenberg/cpp/src/barretenberg/api/api_ultra_honk.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ bool _verify(const bool ipa_accumulation,
110110
srs::init_crs_factory({}, g2_data);
111111

112112
auto vk = std::make_shared<VerificationKey>(from_buffer<VerificationKey>(read_file(vk_path)));
113-
vk->pcs_verification_key = std::make_shared<VerifierCommitmentKey<curve::BN254>>();
114113
auto public_inputs = many_from_buffer<bb::fr>(read_file(public_inputs_path));
115114
auto proof = many_from_buffer<bb::fr>(read_file(proof_path));
116115
// concatenate public inputs and proof

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,7 @@ TEST_F(ClientIVCTests, VKIndependenceTest)
314314
auto ivc_vk = ivc.get_vk();
315315

316316
// PCS verification keys will not match so set to null before comparing
317-
ivc_vk.mega->pcs_verification_key = nullptr;
318317
ivc_vk.eccvm->pcs_verification_key = nullptr;
319-
ivc_vk.translator->pcs_verification_key = nullptr;
320318

321319
return ivc_vk;
322320
};

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,6 @@ TEST_F(AcirAvm2RecursionConstraint, TestGenerateVKFromConstraintsWithoutWitness)
193193
actual_vk = std::make_shared<OuterVerificationKey>(prover.proving_key->proving_key);
194194
}
195195

196-
// PCS verification key adresses will in general not match so set to null before comparing
197-
expected_vk->pcs_verification_key = nullptr;
198-
actual_vk->pcs_verification_key = nullptr;
199-
200196
// Compare the VK constructed via running the IVC with the one constructed via mocking
201197
EXPECT_EQ(*actual_vk.get(), *expected_vk.get());
202198
}

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

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,6 @@ TEST_F(IvcRecursionConstraintTest, GenerateVK)
316316
kernel_vk = std::make_shared<MegaFlavor::VerificationKey>(prover.proving_key->proving_key);
317317
}
318318

319-
// PCS verification keys will not match so set to null before comparing
320-
kernel_vk->pcs_verification_key = nullptr;
321-
expected_kernel_vk->pcs_verification_key = nullptr;
322-
323319
EXPECT_EQ(*kernel_vk.get(), *expected_kernel_vk.get());
324320
}
325321

@@ -358,10 +354,6 @@ TEST_F(IvcRecursionConstraintTest, GenerateInitKernelVKFromConstraints)
358354
kernel_vk = construct_kernel_vk_from_acir_program(program, trace_settings);
359355
}
360356

361-
// PCS verification keys will not match so set to null before comparing
362-
kernel_vk->pcs_verification_key = nullptr;
363-
expected_kernel_vk->pcs_verification_key = nullptr;
364-
365357
// Compare the VK constructed via running the IVc with the one constructed via mocking
366358
EXPECT_EQ(*kernel_vk.get(), *expected_kernel_vk.get());
367359
}
@@ -411,10 +403,6 @@ TEST_F(IvcRecursionConstraintTest, GenerateResetKernelVKFromConstraints)
411403
kernel_vk = construct_kernel_vk_from_acir_program(program, trace_settings);
412404
}
413405

414-
// PCS verification keys will not match so set to null before comparing
415-
kernel_vk->pcs_verification_key = nullptr;
416-
expected_kernel_vk->pcs_verification_key = nullptr;
417-
418406
// Compare the VK constructed via running the IVc with the one constructed via mocking
419407
EXPECT_EQ(*kernel_vk.get(), *expected_kernel_vk.get());
420408
}
@@ -472,10 +460,6 @@ TEST_F(IvcRecursionConstraintTest, GenerateInnerKernelVKFromConstraints)
472460
kernel_vk = construct_kernel_vk_from_acir_program(program, trace_settings);
473461
}
474462

475-
// PCS verification keys will not match so set to null before comparing
476-
kernel_vk->pcs_verification_key = nullptr;
477-
expected_kernel_vk->pcs_verification_key = nullptr;
478-
479463
// Compare the VK constructed via running the IVc with the one constructed via mocking
480464
EXPECT_EQ(*kernel_vk.get(), *expected_kernel_vk.get());
481465
}
@@ -534,4 +518,4 @@ TEST_F(IvcRecursionConstraintTest, BadRecursiveVerifierAppCircuitTest)
534518
// Still expect this to be true since we don't aggregate pairing point objects correctly.
535519
// If we fix aggregation, we should expect this test to fail.
536520
EXPECT_TRUE(ivc->prove_and_verify());
537-
}
521+
}

barretenberg/cpp/src/barretenberg/dsl/acir_proofs/c_bind.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,6 @@ WASM_EXPORT void acir_verify_aztec_client(uint8_t const* proof_buf, uint8_t cons
293293
const auto proof = ClientIVC::Proof::from_msgpack_buffer(proof_buf);
294294
const auto vk = from_buffer<ClientIVC::VerificationKey>(from_buffer<std::vector<uint8_t>>(vk_buf));
295295

296-
// TODO(https://github.com/AztecProtocol/barretenberg/issues/1335): Should be able to remove this.
297-
vk.mega->pcs_verification_key = std::make_shared<VerifierCommitmentKey<curve::BN254>>();
298-
299296
*result = ClientIVC::verify(proof, vk);
300297
}
301298

@@ -337,12 +334,10 @@ WASM_EXPORT void acir_prove_ultra_keccak_honk(uint8_t const* acir_vec, uint8_t c
337334
WASM_EXPORT void acir_verify_ultra_honk(uint8_t const* proof_buf, uint8_t const* vk_buf, bool* result)
338335
{
339336
using VerificationKey = UltraFlavor::VerificationKey;
340-
using VerifierCommitmentKey = bb::VerifierCommitmentKey<curve::BN254>;
341337
using Verifier = UltraVerifier_<UltraFlavor>;
342338

343339
auto proof = many_from_buffer<bb::fr>(from_buffer<std::vector<uint8_t>>(proof_buf));
344340
auto verification_key = std::make_shared<VerificationKey>(from_buffer<VerificationKey>(vk_buf));
345-
verification_key->pcs_verification_key = std::make_shared<VerifierCommitmentKey>();
346341

347342
Verifier verifier{ verification_key };
348343

@@ -352,12 +347,10 @@ WASM_EXPORT void acir_verify_ultra_honk(uint8_t const* proof_buf, uint8_t const*
352347
WASM_EXPORT void acir_verify_ultra_keccak_honk(uint8_t const* proof_buf, uint8_t const* vk_buf, bool* result)
353348
{
354349
using VerificationKey = UltraKeccakFlavor::VerificationKey;
355-
using VerifierCommitmentKey = bb::VerifierCommitmentKey<curve::BN254>;
356350
using Verifier = UltraVerifier_<UltraKeccakFlavor>;
357351

358352
auto proof = many_from_buffer<bb::fr>(from_buffer<std::vector<uint8_t>>(proof_buf));
359353
auto verification_key = std::make_shared<VerificationKey>(from_buffer<VerificationKey>(vk_buf));
360-
verification_key->pcs_verification_key = std::make_shared<VerifierCommitmentKey>();
361354

362355
Verifier verifier{ verification_key };
363356

@@ -402,11 +395,9 @@ WASM_EXPORT void acir_write_vk_ultra_keccak_honk(uint8_t const* acir_vec, uint8_
402395
WASM_EXPORT void acir_honk_solidity_verifier(uint8_t const* proof_buf, uint8_t const* vk_buf, uint8_t** out)
403396
{
404397
using VerificationKey = UltraKeccakFlavor::VerificationKey;
405-
using VerifierCommitmentKey = bb::VerifierCommitmentKey<curve::BN254>;
406398

407399
auto proof = many_from_buffer<bb::fr>(from_buffer<std::vector<uint8_t>>(proof_buf));
408400
auto verification_key = from_buffer<VerificationKey>(vk_buf);
409-
verification_key.pcs_verification_key = std::make_shared<VerifierCommitmentKey>();
410401

411402
auto str = get_honk_solidity_verifier(&verification_key);
412403
*out = to_heap_buffer(str);

barretenberg/cpp/src/barretenberg/eccvm/eccvm_flavor.hpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -750,15 +750,15 @@ class ECCVMFlavor {
750750
public:
751751
bool operator==(const VerificationKey&) const = default;
752752

753+
// IPA verification key requires one more point.
754+
std::shared_ptr<VerifierCommitmentKey> pcs_verification_key =
755+
std::make_shared<VerifierCommitmentKey>(ECCVM_FIXED_SIZE + 1);
756+
753757
// Default construct the fixed VK that results from ECCVM_FIXED_SIZE
754758
VerificationKey()
755759
: VerificationKey_(ECCVM_FIXED_SIZE, /*num_public_inputs=*/0)
756760
{
757761
this->pub_inputs_offset = 0;
758-
// IPA verification key requires one more point.
759-
// TODO(https://github.com/AztecProtocol/barretenberg/issues/1025): make it so that PCSs inform the crs of
760-
// how many points they need
761-
this->pcs_verification_key = std::make_shared<VerifierCommitmentKey>(ECCVM_FIXED_SIZE + 1);
762762

763763
// Populate the commitments of the precomputed polynomials using the fixed VK data
764764
for (auto [vk_commitment, fixed_commitment] :
@@ -773,10 +773,6 @@ class ECCVMFlavor {
773773

774774
VerificationKey(const std::shared_ptr<ProvingKey>& proving_key)
775775
{
776-
// IPA verification key requires one more point.
777-
// TODO(https://github.com/AztecProtocol/barretenberg/issues/1025): make it so that PCSs inform the crs of
778-
// how many points they need
779-
this->pcs_verification_key = std::make_shared<VerifierCommitmentKey>(ECCVM_FIXED_SIZE + 1);
780776
this->circuit_size = 1UL << CONST_ECCVM_LOG_N;
781777
this->log_circuit_size = CONST_ECCVM_LOG_N;
782778
this->num_public_inputs = proving_key->num_public_inputs;

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ class VerificationKey_ : public PrecomputedCommitments {
163163
public:
164164
using FF = typename VerifierCommitmentKey::Curve::ScalarField;
165165
using Commitment = typename VerifierCommitmentKey::Commitment;
166-
std::shared_ptr<VerifierCommitmentKey> pcs_verification_key;
167166
FF_ circuit_size;
168167
FF_ log_circuit_size;
169168
FF_ num_public_inputs;

barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/eccvm_recursive_flavor.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,18 @@ template <typename BuilderType> class ECCVMRecursiveFlavor_ {
9292
class VerificationKey
9393
: public VerificationKey_<FF, ECCVMFlavor::PrecomputedEntities<Commitment>, VerifierCommitmentKey> {
9494
public:
95+
std::shared_ptr<VerifierCommitmentKey> pcs_verification_key;
96+
9597
/**
9698
* @brief Construct a new Verification Key with stdlib types from a provided native verification
9799
* key
98100
*
99101
* @param builder
100102
* @param native_key Native verification key from which to extract the precomputed commitments
101103
*/
102-
103104
VerificationKey(CircuitBuilder* builder, const std::shared_ptr<NativeVerificationKey>& native_key)
104105
{
105-
this->pcs_verification_key = std::make_shared<VerifierCommitmentKey>(
106+
pcs_verification_key = std::make_shared<VerifierCommitmentKey>(
106107
builder, 1UL << CONST_ECCVM_LOG_N, native_key->pcs_verification_key);
107108
// TODO(https://github.com/AztecProtocol/barretenberg/issues/1324): Remove `circuit_size` and
108109
// `log_circuit_size` from MSGPACK and the verification key.

barretenberg/cpp/src/barretenberg/stdlib/honk_verifier/ultra_recursive_verifier.test.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ template <typename RecursiveFlavor> class RecursiveVerifierTest : public testing
4545

4646
using AggState = aggregation_state<OuterBuilder>;
4747
using VerifierOutput = bb::stdlib::recursion::honk::UltraRecursiveVerifierOutput<OuterBuilder>;
48+
using NativeVerifierCommitmentKey = typename InnerFlavor::VerifierCommitmentKey;
4849
/**
4950
* @brief Create a non-trivial arbitrary inner circuit, the proof of which will be recursively verified
5051
*
@@ -223,11 +224,10 @@ template <typename RecursiveFlavor> class RecursiveVerifierTest : public testing
223224
} else {
224225
native_result = native_verifier.verify_proof(inner_proof);
225226
}
226-
auto pcs_verification_key = std::make_shared<typename InnerFlavor::VerifierCommitmentKey>();
227-
bool result = pcs_verification_key->pairing_check(pairing_points.P0.get_value(), pairing_points.P1.get_value());
227+
NativeVerifierCommitmentKey pcs_vkey{};
228+
bool result = pcs_vkey.pairing_check(pairing_points.P0.get_value(), pairing_points.P1.get_value());
228229
info("input pairing points result: ", result);
229-
auto recursive_result = native_verifier.verification_key->verification_key->pcs_verification_key->pairing_check(
230-
pairing_points.P0.get_value(), pairing_points.P1.get_value());
230+
auto recursive_result = pcs_vkey.pairing_check(pairing_points.P0.get_value(), pairing_points.P1.get_value());
231231
EXPECT_EQ(recursive_result, native_result);
232232

233233
// Check 2: Ensure that the underlying native and recursive verification algorithms agree by ensuring
@@ -292,10 +292,9 @@ template <typename RecursiveFlavor> class RecursiveVerifierTest : public testing
292292
EXPECT_FALSE(CircuitChecker::check(outer_circuit));
293293
} else {
294294
EXPECT_TRUE(CircuitChecker::check(outer_circuit));
295-
auto pcs_verification_key = std::make_shared<typename InnerFlavor::VerifierCommitmentKey>();
295+
NativeVerifierCommitmentKey pcs_vkey{};
296296
AggState pairing_points = output.agg_obj;
297-
bool result =
298-
pcs_verification_key->pairing_check(pairing_points.P0.get_value(), pairing_points.P1.get_value());
297+
bool result = pcs_vkey.pairing_check(pairing_points.P0.get_value(), pairing_points.P1.get_value());
299298
EXPECT_FALSE(result);
300299
}
301300
}

barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/protogalaxy_recursive_verifier.test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ template <typename RecursiveFlavor> class ProtogalaxyRecursiveTests : public tes
269269
*/
270270
static void test_full_protogalaxy_recursive()
271271
{
272+
using NativeVerifierCommitmentKey = typename InnerFlavor::VerifierCommitmentKey;
272273
// Create two arbitrary circuits for the first round of folding
273274
InnerBuilder builder1;
274275
create_function_circuit(builder1);
@@ -335,9 +336,8 @@ template <typename RecursiveFlavor> class ProtogalaxyRecursiveTests : public tes
335336
// check that the result agrees.
336337
InnerDeciderVerifier native_decider_verifier(verifier_accumulator);
337338
auto native_result = native_decider_verifier.verify_proof(decider_proof);
338-
auto recursive_result =
339-
native_decider_verifier.accumulator->verification_key->pcs_verification_key->pairing_check(
340-
pairing_points.P0.get_value(), pairing_points.P1.get_value());
339+
NativeVerifierCommitmentKey pcs_vkey{};
340+
auto recursive_result = pcs_vkey.pairing_check(pairing_points.P0.get_value(), pairing_points.P1.get_value());
341341
EXPECT_EQ(native_result, recursive_result);
342342

343343
if constexpr (!IsSimulator<OuterBuilder>) {

barretenberg/cpp/src/barretenberg/stdlib/protogalaxy_verifier/recursive_decider_verification_key.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,6 @@ template <IsRecursiveFlavor Flavor> class RecursiveDeciderVerificationKey_ {
103103
auto native_honk_vk = std::make_shared<NativeVerificationKey>(
104104
static_cast<uint64_t>(verification_key->circuit_size.get_value()),
105105
static_cast<uint64_t>(verification_key->num_public_inputs.get_value()));
106-
native_honk_vk->pcs_verification_key = verification_key->pcs_verification_key == nullptr
107-
? std::make_shared<VerifierCommitmentKey>()
108-
: verification_key->pcs_verification_key;
109106
native_honk_vk->pub_inputs_offset = static_cast<uint64_t>(verification_key->pub_inputs_offset.get_value());
110107
native_honk_vk->contains_pairing_point_accumulator = verification_key->contains_pairing_point_accumulator;
111108
native_honk_vk->pairing_point_accumulator_public_input_indices =
@@ -153,4 +150,4 @@ template <IsRecursiveFlavor Flavor> class RecursiveDeciderVerificationKey_ {
153150
return decider_vk;
154151
}
155152
};
156-
} // namespace bb::stdlib::recursion::honk
153+
} // namespace bb::stdlib::recursion::honk

barretenberg/cpp/src/barretenberg/stdlib/translator_vm_verifier/translator_recursive_flavor.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ template <typename BuilderType> class TranslatorRecursiveFlavor_ {
9999
public:
100100
VerificationKey(CircuitBuilder* builder, const std::shared_ptr<NativeVerificationKey>& native_key)
101101
{
102-
this->pcs_verification_key = std::make_shared<VerifierCommitmentKey>(); // ?
103102
// TODO(https://github.com/AztecProtocol/barretenberg/issues/1324): Remove `circuit_size` and
104103
// `log_circuit_size` from MSGPACK and the verification key.
105104
this->circuit_size = FF{ 1UL << TranslatorFlavor::CONST_TRANSLATOR_LOG_N };

barretenberg/cpp/src/barretenberg/stdlib/translator_vm_verifier/translator_recursive_verifier.test.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ template <typename RecursiveFlavor> class TranslatorRecursiveTests : public ::te
6161

6262
static void test_recursive_verification()
6363
{
64+
using NativeVerifierCommitmentKey = typename InnerFlavor::VerifierCommitmentKey;
6465
// Add the same operations to the ECC op queue; the native computation is performed under the hood.
6566
auto op_queue = create_op_queue(500);
6667

@@ -97,8 +98,8 @@ template <typename RecursiveFlavor> class TranslatorRecursiveTests : public ::te
9798
native_verifier_transcript->template receive_from_prover<InnerBF>("init");
9899
InnerVerifier native_verifier(verification_key, native_verifier_transcript);
99100
bool native_result = native_verifier.verify_proof(proof, evaluation_challenge_x, batching_challenge_v);
100-
auto recursive_result = native_verifier.key->pcs_verification_key->pairing_check(pairing_points.P0.get_value(),
101-
pairing_points.P1.get_value());
101+
NativeVerifierCommitmentKey pcs_vkey{};
102+
auto recursive_result = pcs_vkey.pairing_check(pairing_points.P0.get_value(), pairing_points.P1.get_value());
102103
EXPECT_EQ(recursive_result, native_result);
103104

104105
auto recursive_manifest = verifier.transcript->get_manifest();

barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/flavor_serialization.test.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ TYPED_TEST(FlavorSerializationTests, VerificationKeySerialization)
4444
auto proving_key = std::make_shared<DeciderProvingKey>(builder);
4545
VerificationKey original_vkey{ proving_key->proving_key };
4646

47-
// Set the pcs ptr to null since this will not be reconstructed correctly from buffer
48-
original_vkey.pcs_verification_key = nullptr;
49-
5047
// Populate some non-zero values in the databus_propagation_data to ensure its being handled
5148
if constexpr (IsMegaBuilder<Builder>) {
5249
original_vkey.databus_propagation_data.app_return_data_commitment_pub_input_key =

barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/mega_flavor.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,6 @@ class MegaFlavor {
439439

440440
void set_metadata(const ProvingKey& proving_key)
441441
{
442-
this->pcs_verification_key = std::make_shared<VerifierCommitmentKey>();
443442
this->circuit_size = proving_key.circuit_size;
444443
this->log_circuit_size = numeric::get_msb(this->circuit_size);
445444
this->num_public_inputs = proving_key.num_public_inputs;

barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/mega_recursive_flavor.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ template <typename BuilderType> class MegaRecursiveFlavor_ {
120120
*/
121121
VerificationKey(CircuitBuilder* builder, const std::shared_ptr<NativeVerificationKey>& native_key)
122122
{
123-
this->pcs_verification_key = native_key->pcs_verification_key;
124123
this->circuit_size = FF::from_witness(builder, native_key->circuit_size);
125124
// TODO(https://github.com/AztecProtocol/barretenberg/issues/1283): Use stdlib get_msb.
126125
this->log_circuit_size = FF::from_witness(builder, numeric::get_msb(native_key->circuit_size));

barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_flavor.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ class UltraFlavor {
360360
{}
361361
VerificationKey(ProvingKey& proving_key)
362362
{
363-
this->pcs_verification_key = std::make_shared<VerifierCommitmentKey>();
364363
this->circuit_size = proving_key.circuit_size;
365364
this->log_circuit_size = numeric::get_msb(this->circuit_size);
366365
this->num_public_inputs = proving_key.num_public_inputs;

barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_keccak_flavor.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ class UltraKeccakFlavor : public bb::UltraFlavor {
4444
{}
4545
VerificationKey(ProvingKey& proving_key)
4646
{
47-
this->pcs_verification_key = std::make_shared<VerifierCommitmentKey>();
4847
this->circuit_size = proving_key.circuit_size;
4948
this->log_circuit_size = numeric::get_msb(this->circuit_size);
5049
this->num_public_inputs = proving_key.num_public_inputs;

barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_recursive_flavor.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ template <typename BuilderType> class UltraRecursiveFlavor_ {
119119
*/
120120
VerificationKey(CircuitBuilder* builder, const std::shared_ptr<NativeVerificationKey>& native_key)
121121
{
122-
this->pcs_verification_key = native_key->pcs_verification_key;
123122
this->circuit_size = FF::from_witness(builder, native_key->circuit_size);
124123
// TODO(https://github.com/AztecProtocol/barretenberg/issues/1283): Use stdlib get_msb.
125124
this->log_circuit_size = FF::from_witness(builder, numeric::get_msb(native_key->circuit_size));

barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_rollup_flavor.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ class UltraRollupFlavor : public bb::UltraFlavor {
8484
: contains_ipa_claim(proving_key.contains_ipa_claim)
8585
, ipa_claim_public_input_indices(proving_key.ipa_claim_public_input_indices)
8686
{
87-
this->pcs_verification_key = std::make_shared<VerifierCommitmentKey>();
8887
this->circuit_size = proving_key.circuit_size;
8988
this->log_circuit_size = numeric::get_msb(this->circuit_size);
9089
this->num_public_inputs = proving_key.num_public_inputs;

0 commit comments

Comments
 (0)