Skip to content

Better handling of PCS verification key in Mega VK #1335

Closed
AztecProtocol/aztec-packages
#13638
@ledwards2225

Description

@ledwards2225

The Mega Verification key stores a VerifierCommitmentKey via inheritance from VerificationKey_ in flavor.hpp. Initialization of this member is not handled uniformly and some constructors don't initialize it at all. This seems to lead to the need to explicitly set it (using the default std::make_shared<VerifierCommitmentKey<curve::BN254>>()) in locations that should not need to know about such details (e.g. ClientIvcAPI, c_binds). At the time of writing it seemed that adding default initialization to the the msgpack constructor should fix the problem but it did not.

Resolving this issue should include (1) clarifying the Mega VK constructors (can some be removed? can initialization of all members be made more robust?), and (2) removing the need to initialize the Mega VK pcs_verification_key outside of the VerificationKey class itself.

EDIT: It would be nice to remove the pcs_verification_key from the VK altogether. AFAICT It's default initialized for everything but the eccvm (IPA). If this is possible, it would allow the == operator on VerificationKey_ to be default and we could get rid of hacks to set the pcs_verification_key to null in VK consistency checks.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions