mirror of
https://github.com/arnaucube/gnark-plonky2-verifier.git
synced 2026-01-12 09:01:32 +01:00
uint64
This commit is contained in:
@@ -9,7 +9,7 @@ type gate interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *PlonkChip) computeFilter(
|
func (p *PlonkChip) computeFilter(
|
||||||
row int,
|
row uint64,
|
||||||
groupRange Range,
|
groupRange Range,
|
||||||
s QuadraticExtension,
|
s QuadraticExtension,
|
||||||
manySelector bool,
|
manySelector bool,
|
||||||
@@ -33,10 +33,10 @@ func (p *PlonkChip) computeFilter(
|
|||||||
func (p *PlonkChip) evalFiltered(
|
func (p *PlonkChip) evalFiltered(
|
||||||
g gate,
|
g gate,
|
||||||
vars EvaluationVars,
|
vars EvaluationVars,
|
||||||
row int,
|
row uint64,
|
||||||
selectorIndex int,
|
selectorIndex uint64,
|
||||||
groupRange Range,
|
groupRange Range,
|
||||||
numSelectors int,
|
numSelectors uint64,
|
||||||
) []QuadraticExtension {
|
) []QuadraticExtension {
|
||||||
filter := p.computeFilter(row, groupRange, vars.localConstants[selectorIndex], numSelectors > 1)
|
filter := p.computeFilter(row, groupRange, vars.localConstants[selectorIndex], numSelectors > 1)
|
||||||
|
|
||||||
|
|||||||
@@ -136,8 +136,8 @@ func (p *PlonkChip) evaluateGateConstraints(
|
|||||||
gateConstraints := p.evalFiltered(
|
gateConstraints := p.evalFiltered(
|
||||||
gate,
|
gate,
|
||||||
vars,
|
vars,
|
||||||
i,
|
uint64(i),
|
||||||
int(selectorIndex),
|
selectorIndex,
|
||||||
commonData.SelectorsInfo.groups[selectorIndex],
|
commonData.SelectorsInfo.groups[selectorIndex],
|
||||||
commonData.SelectorsInfo.NumSelectors(),
|
commonData.SelectorsInfo.NumSelectors(),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
type PublicInputGate struct {
|
type PublicInputGate struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PublicInputGate) WiresPublicInputsHash() []int {
|
func (p *PublicInputGate) WiresPublicInputsHash() []uint64 {
|
||||||
return []int{0, 1, 2, 3}
|
return []uint64{0, 1, 2, 3}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PublicInputGate) EvalUnfiltered(pc *PlonkChip, vars EvaluationVars) []QuadraticExtension {
|
func (p *PublicInputGate) EvalUnfiltered(pc *PlonkChip, vars EvaluationVars) []QuadraticExtension {
|
||||||
|
|||||||
@@ -12,6 +12,6 @@ type SelectorsInfo struct {
|
|||||||
groups []Range
|
groups []Range
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SelectorsInfo) NumSelectors() int {
|
func (s *SelectorsInfo) NumSelectors() uint64 {
|
||||||
return len(s.groups)
|
return uint64(len(s.groups))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,6 @@ type EvaluationVars struct {
|
|||||||
publicInputsHash HashOut
|
publicInputsHash HashOut
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *EvaluationVars) RemovePrefix(numSelectors int) {
|
func (e *EvaluationVars) RemovePrefix(numSelectors uint64) {
|
||||||
e.localConstants = e.localConstants[numSelectors:]
|
e.localConstants = e.localConstants[numSelectors:]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user