-
Notifications
You must be signed in to change notification settings - Fork 517
Regarding the meaning of DEBUG content. #1414
Copy link
Copy link
Closed
Description
Hello, I apologize for disturbing you. I am a beginner using gnark. I wrote a test function for the Eddsa proof.
func Prove() {
// compiles our circuit into a R1CS
var circuit eddsaCircuit
ccs, err := frontend.Compile(ecc.BN254.ScalarField(), r1cs.NewBuilder, &circuit)
if err != nil {
fmt.Println("failed to Compile. error:", err)
return
}
// groth16 zkSNARK: Setup
pk, vk, err := groth16.Setup(ccs)
if err != nil {
fmt.Println("failed to Setup. error:", err)
return
}
witness, err := frontend.NewWitness(GetEddsaCircuit(), ecc.BN254.ScalarField())
if err != nil {
fmt.Println("failed to NewWitness. error:", err)
return
}
publicWitness, err := witness.Public()
if err != nil {
fmt.Println("failed to witness.Public. error:", err)
return
}
// groth16: Prove & Verify
proof, err := groth16.Prove(ccs, pk, witness)
if err != nil {
fmt.Println("failed to Prove. error:", err)
return
}
err = groth16.Verify(proof, vk, publicWitness)
if err != nil {
fmt.Println("Prove get invalid signature")
} else {
fmt.Println("Prove get valid signature")
}
}
But I am not very clear about the meanings of symbols in the DEBUG log and would like to obtain an official accurate answer.
I have the following questions:
1.Does constraint system solver done refers to groth16.Setup?
2.Does prover done refers to groth16.Prove?
3.Does verifier done refers to groth16.Verify?
4.Does took refers to the execution time of the function? Is the unit in ms?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
