Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plonk implementation with updates to Algebra #44

Closed
wants to merge 9 commits into from
Closed

Conversation

ltvvlz
Copy link
Contributor

@ltvvlz ltvvlz commented Jun 3, 2020

This commits the Plonk implementation for review.

This PR is for the review of Plonk implementation that has the following:

  1. Plonk with pairing-based commitment schema supporting polynomial splitting.
  2. Plonk with dlog-based commitment schema supporting polynomial splitting. This implementation, in order to use polysplitting together with the linearization optimization, adds additional polyevaluation (for the quotient polynomial) to the proof. Alternative implementation, not using the linearization optimization, has been committed (with commit b51ffa1) into "plonk" branch. The alternative implementation has proof size larger than the proof size of this implementation.
  3. Unit tests for both Plonk implementations.

This commits the Plonk implementation for review
@ltvvlz ltvvlz requested a review from imeckler June 3, 2020 22:31
@jon-chuang
Copy link

Hi, is this standard plonk or turboPlonk?

Implementing turboplonk in it's most general form requires ripping out the foundations of the circuit builder, I think.

Copy link

@kobigurk kobigurk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I skimmed through it and gave some comments

@@ -0,0 +1,173 @@
/*****************************************************************************************************************

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about using //! comments so the docs will be nicer?

let r =
{
let mut r = domain.sample_element_outside_domain(&mut OsRng);
while r.legendre().is_qnr() == false {r = domain.sample_element_outside_domain(&mut OsRng)}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to pass down an implementer of an Rng trait rather than using OsRng directly.


impl<G: CommitmentCurve> ProverProof<G>
{
// This function verifies the batch of zk-proofs

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/// style comments look nicer in docs

@@ -38,7 +38,7 @@ type Fr = <Affine as AffineCurve>::ScalarField;
const MAX_SIZE: usize = 8;

#[test]
fn group_addition_dlog()
fn dlog_marlin_group_addition()
{
let rng = &mut OsRng;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as rng before

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for the suggestions..!

@github-actions
Copy link

Stale pull request message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants