Consensys / gnark

gnark is a fast zk-SNARK library that offers a high-level API to design circuits. The library is open source and developed under the Apache 2.0 license
https://hackmd.io/@gnark
Apache License 2.0
1.43k stars 368 forks source link

MiMC Hash Error #642

Closed txaty closed 1 year ago

txaty commented 1 year ago

With the latest version: gnark v0.8.0 and gnark-crypto v0.10.0, the MiMC hash demo in the example directory cannot be successfully executed.

This is my mimc.go in mimchash folder:

package mimchash

import (
    "github.com/consensys/gnark/frontend"
    "github.com/consensys/gnark/std/hash/mimc"
)

// Circuit defines a pre-image knowledge proof
// mimc(secret preImage) = public hash
type Circuit struct {
    // struct tag on a variable is optional
    // default uses variable name and secret visibility.
    PreImage frontend.Variable
    Hash     frontend.Variable `gnark:",public"`
}

// Define declares the circuit's constraints
// Hash = mimc(PreImage)
func (circuit *Circuit) Define(api frontend.API) error {
    // hash function
    mc, _ := mimc.NewMiMC(api)

    // specify constraints
    // mc(preImage) == hash
    mc.Write(circuit.PreImage)
    api.AssertIsEqual(circuit.Hash, mc.Sum())

    return nil
}

And my mimc_test.go in mimchash folder:

package mimchash

import (
    "testing"

    "github.com/consensys/gnark-crypto/ecc"
    "github.com/consensys/gnark/test"
)

func TestPreimage(t *testing.T) {
    assert := test.NewAssert(t)

    var mimcCircuit Circuit

    assert.ProverFailed(&mimcCircuit, &Circuit{
        Hash:     42,
        PreImage: 42,
    })

    assert.ProverSucceeded(&mimcCircuit, &Circuit{
        PreImage: "16130099170765464552823636852555369511329944820189892919423002775646948828469",
        Hash:     "12886436712380113721405259596386800092738845035233065858332878701083870690753",
    }, test.WithCurves(ecc.BN254))

}

The error message:

# github.com/consensys/gnark/internal/backend/bls12-377/plonkfri
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-377/plonkfri/prove.go:490:41: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-377/plonkfri/prove.go:518:38: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFTInverse
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-377/plonkfri/setup.go:212:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-377/plonkfri/setup.go:213:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-377/plonkfri/setup.go:214:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-377/plonkfri/setup.go:215:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-377/plonkfri/setup.go:352:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-377/plonkfri/setup.go:353:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-377/plonkfri/setup.go:354:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-377/plonkfri/setup.go:382:54: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-377/plonkfri/setup.go:382:54: too many errors
# github.com/consensys/gnark/internal/backend/bls12-381/groth16
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-381/groth16/prove.go:337:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-381/groth16/prove.go:338:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-381/groth16/prove.go:339:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-381/groth16/prove.go:357:32: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFTInverse
# github.com/consensys/gnark/internal/backend/bw6-761/groth16
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-761/groth16/prove.go:337:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-761/groth16/prove.go:338:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-761/groth16/prove.go:339:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-761/groth16/prove.go:357:32: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFTInverse
# github.com/consensys/gnark/internal/backend/bls24-317/groth16
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-317/groth16/prove.go:337:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-317/groth16/prove.go:338:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-317/groth16/prove.go:339:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-317/groth16/prove.go:357:32: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFTInverse
# github.com/consensys/gnark/internal/backend/bls24-315/groth16
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-315/groth16/prove.go:337:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-315/groth16/prove.go:338:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-315/groth16/prove.go:339:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-315/groth16/prove.go:357:32: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFTInverse
# github.com/consensys/gnark/internal/backend/bn254/groth16
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bn254/groth16/prove.go:337:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bn254/groth16/prove.go:338:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bn254/groth16/prove.go:339:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bn254/groth16/prove.go:357:32: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFTInverse
# github.com/consensys/gnark/internal/backend/bw6-633/groth16
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-633/groth16/prove.go:337:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-633/groth16/prove.go:338:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-633/groth16/prove.go:339:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-633/groth16/prove.go:357:32: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFTInverse
# github.com/consensys/gnark/internal/backend/bls12-377/groth16
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-377/groth16/prove.go:337:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-377/groth16/prove.go:338:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-377/groth16/prove.go:339:25: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-377/groth16/prove.go:357:32: cannot use true (untyped bool constant) as fft.Option value in argument to domain.FFTInverse
# github.com/consensys/gnark/internal/backend/bls12-381/plonkfri
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-381/plonkfri/prove.go:490:41: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-381/plonkfri/prove.go:518:38: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFTInverse
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-381/plonkfri/setup.go:212:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-381/plonkfri/setup.go:213:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-381/plonkfri/setup.go:214:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-381/plonkfri/setup.go:215:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-381/plonkfri/setup.go:352:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-381/plonkfri/setup.go:353:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-381/plonkfri/setup.go:354:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-381/plonkfri/setup.go:382:54: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls12-381/plonkfri/setup.go:382:54: too many errors
# github.com/consensys/gnark/internal/backend/bls24-315/plonkfri
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-315/plonkfri/prove.go:490:41: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-315/plonkfri/prove.go:518:38: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFTInverse
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-315/plonkfri/setup.go:212:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-315/plonkfri/setup.go:213:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-315/plonkfri/setup.go:214:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-315/plonkfri/setup.go:215:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-315/plonkfri/setup.go:352:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-315/plonkfri/setup.go:353:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-315/plonkfri/setup.go:354:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-315/plonkfri/setup.go:382:54: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-315/plonkfri/setup.go:382:54: too many errors
# github.com/consensys/gnark/internal/backend/bls24-317/plonkfri
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-317/plonkfri/prove.go:490:41: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-317/plonkfri/prove.go:518:38: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFTInverse
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-317/plonkfri/setup.go:212:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-317/plonkfri/setup.go:213:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-317/plonkfri/setup.go:214:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-317/plonkfri/setup.go:215:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-317/plonkfri/setup.go:352:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-317/plonkfri/setup.go:353:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-317/plonkfri/setup.go:354:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-317/plonkfri/setup.go:382:54: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bls24-317/plonkfri/setup.go:382:54: too many errors
# github.com/consensys/gnark/internal/backend/bw6-761/plonkfri
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-761/plonkfri/prove.go:490:41: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-761/plonkfri/prove.go:518:38: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFTInverse
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-761/plonkfri/setup.go:212:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-761/plonkfri/setup.go:213:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-761/plonkfri/setup.go:214:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-761/plonkfri/setup.go:215:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-761/plonkfri/setup.go:352:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-761/plonkfri/setup.go:353:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-761/plonkfri/setup.go:354:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-761/plonkfri/setup.go:382:54: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-761/plonkfri/setup.go:382:54: too many errors
# github.com/consensys/gnark/internal/backend/bn254/plonkfri
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bn254/plonkfri/prove.go:490:41: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bn254/plonkfri/prove.go:518:38: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFTInverse
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bn254/plonkfri/setup.go:212:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bn254/plonkfri/setup.go:213:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bn254/plonkfri/setup.go:214:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bn254/plonkfri/setup.go:215:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bn254/plonkfri/setup.go:352:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bn254/plonkfri/setup.go:353:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bn254/plonkfri/setup.go:354:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bn254/plonkfri/setup.go:382:54: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bn254/plonkfri/setup.go:382:54: too many errors
# github.com/consensys/gnark/internal/backend/bw6-633/plonkfri
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-633/plonkfri/prove.go:490:41: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-633/plonkfri/prove.go:518:38: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFTInverse
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-633/plonkfri/setup.go:212:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-633/plonkfri/setup.go:213:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-633/plonkfri/setup.go:214:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-633/plonkfri/setup.go:215:65: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-633/plonkfri/setup.go:352:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-633/plonkfri/setup.go:353:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-633/plonkfri/setup.go:354:55: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-633/plonkfri/setup.go:382:54: cannot use true (untyped bool constant) as fft.Option value in argument to pk.Domain[1].FFT
../../../go/pkg/mod/github.com/consensys/gnark@v0.8.0/internal/backend/bw6-633/plonkfri/setup.go:382:54: too many errors

Compilation finished with exit code 1

And seems that the Hash of a secret and EdDSA signature examples in the gnark playground are also broken:

image

image

I encountered these issues when I was trying to build a signature proving scheme ten days ago. I hope the information can help address the problems if they exist.

gbotrel commented 1 year ago

these are 2 different issues, thanks for the detail report; the playground examples are broken because the witness doesn't match the underlying mimc impl (we will fix that). The other issue with go dep, see #638

gbotrel commented 1 year ago

playground fixed 👍