Proof in Solidity format
Following the tutorial, I am able to export my verification function from Go to Solidity. However, I couldn't find how to export the proof (including A,B,C, Commitments, CommitmentPok, and the public inputs) in order to test if a proof is verified in Solidity.
Is there such a function that converts automatically into Solidity?
Sorry for the delay. I'm assuming you're using Groth16 Solidity verifier for now? Unfortunately we don't have a super nice direct interfaces for exporting the proof yet, is is still in the todo list https://github.com/Consensys/gnark/issues/1094.
As a reference meanwhile, you could have a look at the gnark-solidity checker which does the conversion for Groth16 (https://github.com/Consensys/gnark-solidity-checker/blob/main/cmd/templates.go#L43-L124) and for PLONK (https://github.com/Consensys/gnark-solidity-checker/blob/main/cmd/templates.go#L178-L211).
I think I can do a quick patch to output exactly the outputs in expected format so that the users wouldn't have to refer to this template. But for Groth16 at least the long-term solution would be to use proof as serialized bytes and we would deserialize in contract already. And imo if we would like to add BLS12-381 support anyway, then it would be needed as well.
here you have a full implementation ready to use @simonmasson https://github.com/vocdoni/davinci-node/tree/main/solidity