mirror of
https://github.com/arnaucube/gnark-plonky2-verifier.git
synced 2026-01-12 09:01:32 +01:00
finished evaluateGateConstraints
This commit is contained in:
@@ -116,17 +116,6 @@ func (p *PlonkChip) checkPartialProducts(
|
|||||||
return partialProductChecks
|
return partialProductChecks
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PlonkChip) evalFiltered(
|
|
||||||
g gate,
|
|
||||||
vars EvaluationVars,
|
|
||||||
row int,
|
|
||||||
selectorIndex int,
|
|
||||||
groupRange Range,
|
|
||||||
numSelectors int
|
|
||||||
) []QuadraticExtension {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *PlonkChip) evaluateGateConstraints(
|
func (p *PlonkChip) evaluateGateConstraints(
|
||||||
commonData CommonCircuitData,
|
commonData CommonCircuitData,
|
||||||
x QuadraticExtension,
|
x QuadraticExtension,
|
||||||
@@ -142,8 +131,24 @@ func (p *PlonkChip) evaluateGateConstraints(
|
|||||||
constraints := make([]QuadraticExtension, commonData.NumGateConstraints)
|
constraints := make([]QuadraticExtension, commonData.NumGateConstraints)
|
||||||
|
|
||||||
for i, gate := range commonData.Gates {
|
for i, gate := range commonData.Gates {
|
||||||
selectorIndex := commonData.selector
|
selectorIndex := commonData.SelectorsInfo.selectorIndices[i]
|
||||||
|
|
||||||
|
gateConstraints := p.evalFiltered(
|
||||||
|
gate,
|
||||||
|
vars,
|
||||||
|
i,
|
||||||
|
int(selectorIndex),
|
||||||
|
commonData.SelectorsInfo.groups[selectorIndex],
|
||||||
|
commonData.SelectorsInfo.NumSelectors(),
|
||||||
|
)
|
||||||
|
|
||||||
|
for _, constraint := range gateConstraints {
|
||||||
|
// assert j < commonData.NumGateConstraints
|
||||||
|
constraints[i] = p.qeAPI.AddExtension(constraints[i], constraint)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return constraints
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PlonkChip) evalVanishingPoly(proofChallenges ProofChallenges, openings OpeningSet, zetaPowN QuadraticExtension) []QuadraticExtension {
|
func (p *PlonkChip) evalVanishingPoly(proofChallenges ProofChallenges, openings OpeningSet, zetaPowN QuadraticExtension) []QuadraticExtension {
|
||||||
|
|||||||
Reference in New Issue
Block a user