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

Prover/Adding Initial Compiler for Permutation Query #386

Draft
wants to merge 8 commits into
base: prover/limitless-top-level
Choose a base branch
from

Conversation

arijitdutta67
Copy link
Contributor

This PR implements issue(s) #383

Checklist

  • I wrote new tests for my new core changes.
  • I have successfully ran tests, style checker and build against my new changes locally.
  • I have informed the team of any breaking changes if there are any.

@arijitdutta67 arijitdutta67 added enhancement New feature or request Prover Tag to use for all work impacting the prover labels Dec 3, 2024
@arijitdutta67 arijitdutta67 self-assigned this Dec 3, 2024
@arijitdutta67 arijitdutta67 linked an issue Dec 3, 2024 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.20%. Comparing base (16fbcd9) to head (3afad76).

Additional details and impacted files
@@                      Coverage Diff                      @@
##             prover/limitless-top-level     #386   +/-   ##
=============================================================
  Coverage                         70.20%   70.20%           
  Complexity                         1072     1072           
=============================================================
  Files                               306      306           
  Lines                             12322    12322           
  Branches                           1178     1178           
=============================================================
  Hits                               8651     8651           
  Misses                             3179     3179           
  Partials                            492      492           
Flag Coverage Δ *Carryforward flag
hardhat 98.70% <ø> (ø)
kotlin 67.89% <ø> (ø) Carriedforward from a199f4d

*This pull request uses carry forward flags. Click here to find out more.

"github.com/consensys/linea-monorepo/prover/utils"
)

type GrandProduct struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't forget the document the query

ID ifaces.QueryID
Numerator [][]ifaces.Column // stores A as multi-column
Denominator [][]ifaces.Column // stores B as multi-column
Alpha coin.Info // randomness for random linear combination in case of multi-column, to be provided by the
Copy link
Contributor

Choose a reason for hiding this comment

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

The value of alpha will be different for every term in the product. Same for beta.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My plan was to generate one GrandProduct query for each individual permutation query. As a result, for a particular permutation query, the value of alpha and beta will be the same. These values will be used by the sub-provers.

However, for different queries, the alphas and betas will be different. Later, the aggregator can batch verify these grand product queries by checking $Z_{1,1}\cdotsZ_{1,l_1}Z_{2,1}\cdotsZ_{2,l_2}\cdots = 1$, where ith permutation query -> ith GrandProduct query -> split among l_i sub-provers. Will this work?

// randomness beacon
Beta coin.Info // randomness for the grand product accumulation, to be provided by the
// randomness beacon
Z symbolic.Expression // aimed at storing the expressions (Ai + \beta_i)/(Bi + \beta_i)
Copy link
Contributor

Choose a reason for hiding this comment

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

redundant: Z can be constructed from the other fields

}

// Reduce a permutation query into a GrandProduct query
comp.InsertGrandProduct(round, q.Name(), q.A, q.B, alpha, beta)
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not one per Permutation but one for the whole wizard at once

@Soleimani193 Soleimani193 force-pushed the prover/limitless-top-level branch from 16fbcd9 to 2cae000 Compare December 6, 2024 09:28
"github.com/consensys/linea-monorepo/prover/protocol/wizard"
)

func IntoGrandProduct(comp *wizard.CompiledIOP) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Changes considering that we will skip the preparation phase:

AddGdProductQuery(initialComp, moduleComp, disc, targetModuleName)

@Soleimani193 Soleimani193 force-pushed the prover/limitless-top-level branch from 3cec11b to 08b8b32 Compare December 6, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Prover Tag to use for all work impacting the prover
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prover/Prepare the Initial Wizard for the Permutation Query
4 participants