-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Rationale for this change The setups in Dory are somewhat unwieldy, in particular, there isn't a separation between the public parameters, the precomputed setups, and the parameters for a particular proofs. # What changes are included in this PR? The major change involves `PublicParameters`, `ProverSetup`, `VerifierSetup`, `DoryProverPublicSetup`, and `DoryVerifierPublicSetup`. The code for constructing these was made more explicit and broken apart better. ### Old ``` let dory_prover_setup = DoryProverPublicSetup::rand(4, 3, &mut test_rng()); let dory_verifier_setup = (&dory_prover_setup).into(); ``` ### New ``` let public_parameters = PublicParameters::rand(4, &mut test_rng()); // This can be stored on disc and is the actual data from which everything else is generated. let prover_setup = ProverSetup::from(&public_parameters); // This largely is just a reference to `PublicParameters`, but also contains a blitzar handle, which takes significant computation to obtain. let verifier_setup = VerifierSetup::from(&public_parameters); // This can be stored on disc, and contains only the digest of `PublicParameters` that is needed to do verification. let dory_prover_setup = DoryProverPublicSetup::new(&prover_setup, 3); // This is essentially just a tuple `(&ProverSetup, sigma)` let dory_verifier_setup = DoryVerifierPublicSetup::new(&verifier_setup, 3); // This is essentially just a tuple `(&VerifierSetup, sigma)` ``` In order to achieve this, several changes were needed: * The `CommitmentEvaluationProof::ProverPublicSetup` and `CommitmentEvaluationProof::VerifierPublicSetup` have lifetime generics added because `DoryProverPublicSetup` and `DoryVerifierPublicSetup` now have lifetime generics. * `rand` and `from` methods are removed in some places to enforce the above flow. * Tests are refactored. This is the majority of the LOC. # Are these changes tested? They are tested by existing tests.
- Loading branch information
1 parent
2dbd966
commit 153e647
Showing
24 changed files
with
383 additions
and
465 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.