Revert "Range check optimizations"

This commit is contained in:
puma314
2023-10-11 17:39:52 -07:00
committed by GitHub
parent c23b174535
commit 0c677ddd0d
50 changed files with 1146 additions and 1089 deletions

View File

@@ -28,7 +28,7 @@ type BN254State = [BN254_SPONGE_WIDTH]frontend.Variable
type BN254HashOut = frontend.Variable
func NewBN254Chip(api frontend.API) *BN254Chip {
return &BN254Chip{api: api, gl: *gl.New(api)}
return &BN254Chip{api: api, gl: *gl.NewChip(api)}
}
func (c *BN254Chip) Poseidon(state BN254State) BN254State {

View File

@@ -21,7 +21,7 @@ type GoldilocksChip struct {
}
func NewGoldilocksChip(api frontend.API) *GoldilocksChip {
return &GoldilocksChip{api: api, gl: *gl.New(api)}
return &GoldilocksChip{api: api, gl: *gl.NewChip(api)}
}
// The permutation function.

View File

@@ -25,7 +25,7 @@ func (circuit *TestPoseidonCircuit) Define(api frontend.API) error {
poseidonChip := NewGoldilocksChip(api)
output := poseidonChip.Poseidon(input)
glApi := gl.New(api)
glApi := gl.NewChip(api)
for i := 0; i < 12; i++ {
glApi.AssertIsEqual(output[i], gl.NewVariable(circuit.Out[i]))

View File

@@ -18,7 +18,7 @@ type TestPublicInputsHashCircuit struct {
}
func (circuit *TestPublicInputsHashCircuit) Define(api frontend.API) error {
glAPI := gl.New(api)
glAPI := gl.NewChip(api)
// BN254 -> Binary(64) -> F
var input [3]gl.Variable
@@ -78,6 +78,6 @@ func TestPublicInputsHashWitness2(t *testing.T) {
test.WithBackends(backend.GROTH16),
test.WithCurves(ecc.BN254),
test.NoFuzzing(),
test.NoSerializationChecks(),
test.NoSerialization(),
)
}