Browse Source

fix for V-SCT-VUL-016

main
Kevin Jue 1 year ago
parent
commit
ac49898dd1
4 changed files with 0 additions and 37 deletions
  1. +0
    -3
      goldilocks/base.go
  2. +0
    -1
      poseidon/goldilocks.go
  3. +0
    -21
      types/utils.go
  4. +0
    -12
      variables/plonk.go

+ 0
- 3
goldilocks/base.go

@ -38,9 +38,6 @@ var POWER_OF_TWO_GENERATOR goldilocks.Element = goldilocks.NewElement(1753635133
// The modulus of the field.
var MODULUS *big.Int = emulated.Goldilocks{}.Modulus()
// The threshold maximum number of bits at which we must reduce the element.
var REDUCE_NB_BITS_THRESHOLD uint8 = 254 - 64
// The number of bits to use for range checks on inner products of field elements.
var RANGE_CHECK_NB_BITS int = 140

+ 0
- 1
poseidon/goldilocks.go

@ -7,7 +7,6 @@ import (
const HALF_N_FULL_ROUNDS = 4
const N_PARTIAL_ROUNDS = 22
const MAX_WIDTH = 12
const SPONGE_WIDTH = 12
const SPONGE_RATE = 8

+ 0
- 21
types/utils.go

@ -1,21 +0,0 @@
package types
func ReductionArityBits(
arityBits uint64,
finalPolyBits uint64,
degreeBits uint64,
rateBits uint64,
capHeight uint64,
) []uint64 {
returnArr := make([]uint64, 0)
for degreeBits > finalPolyBits && degreeBits+rateBits-arityBits >= capHeight {
returnArr = append(returnArr, arityBits)
if degreeBits < arityBits {
panic("degreeBits < arityBits")
}
degreeBits -= arityBits
}
return returnArr
}

+ 0
- 12
variables/plonk.go

@ -12,18 +12,6 @@ type OpeningSet struct {
QuotientPolys []gl.QuadraticExtensionVariable // Length = CommonCircuitData.NumChallenges * CommonCircuitData.QuotientDegreeFactor
}
func NewOpeningSet(numConstants uint64, numRoutedWires uint64, numWires uint64, numChallenges uint64, numPartialProducts uint64, quotientDegreeFactor uint64) OpeningSet {
return OpeningSet{
Constants: make([]gl.QuadraticExtensionVariable, numConstants),
PlonkSigmas: make([]gl.QuadraticExtensionVariable, numRoutedWires),
Wires: make([]gl.QuadraticExtensionVariable, numWires),
PlonkZs: make([]gl.QuadraticExtensionVariable, numChallenges),
PlonkZsNext: make([]gl.QuadraticExtensionVariable, numChallenges),
PartialProducts: make([]gl.QuadraticExtensionVariable, numChallenges*numPartialProducts),
QuotientPolys: make([]gl.QuadraticExtensionVariable, numChallenges*quotientDegreeFactor),
}
}
type ProofChallenges struct {
PlonkBetas []gl.Variable
PlonkGammas []gl.Variable

Loading…
Cancel
Save