Clients submit solutions (c,d,e,f) for the equation:
a∗b=c∗d+e+f
to a smart contract, which counts the number of solutions it has seen. Elements a and b are not published on-chain, and instead a ZK proof is used to show know knowledge of them.
Client changes
Before UPA: The client directly submits their solution publicInputs, along with a proof:
awaitdemoApp.submitSolution(proof,publicInputs);
After UPA: The client first submits their solution and proof to the UPA contract. Then the client waits for UPA to verify the proof before submitting the solution to the simple-app contract: