Ivo Kubjas
Ivo Kubjas
Hmm - indeed. The option should be specific to groth16 and plonk interfaces though, they afaik have different key and circuit interfaces. But I think it could work. Let me...
Ref: https://github.com/Consensys/gnark/discussions/1088
Hmm, I'm not sure this may always be true. We could also use hints for obtaining randomness or potentially I/O. For example lets say we have a hint which returns...
(but the use case is cool! I think we should implement it :)
In my view, a hint is non-deterministic computation by the prover. So if we say that if the input are constant then also outputs are, then we break the assumption...
> Automatically Inferring that the output of a hint is a constant could be a solution that makes development easier. However, I did not consider hints that produce private inputs...
But I do get that differentiating between variables and constants right now in gnark is not perfect. I think long-term better approach would be to have different types and prevent...
> ```go > func Div(api frontend.API, x, y frontend.Variable) frontend.Variable { > q, _ := api.Compiler().NewHint(divHint, 1, x, y) > api.AssertIsEqual(x, api.Mul(y, q)) > return q > } > ```...
Done in #553
@HSG88 - we have implemented Poseidon2 over all supported curves in https://github.com/Consensys/gnark/pull/1300. Is there still need for the current PR? If not, then I would be inclined to close it...