-
Notifications
You must be signed in to change notification settings - Fork 43
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
base: prover/limitless-top-level
Are you sure you want to change the base?
Prover/Adding Initial Compiler for Permutation Query #386
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
*This pull request uses carry forward flags. Click here to find out more. |
prover/protocol/distributed/compiler/permutation/permutation.go
Outdated
Show resolved
Hide resolved
"github.com/consensys/linea-monorepo/prover/utils" | ||
) | ||
|
||
type GrandProduct struct { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
16fbcd9
to
2cae000
Compare
"github.com/consensys/linea-monorepo/prover/protocol/wizard" | ||
) | ||
|
||
func IntoGrandProduct(comp *wizard.CompiledIOP) { |
There was a problem hiding this comment.
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)
3cec11b
to
08b8b32
Compare
This PR implements issue(s) #383
Checklist