Demo app: Before and after UPA
Last updated
Last updated
NEBRA Labs
Clients submit solutions for the equation:
to a smart contract, which counts the number of solutions it has seen. Elements and are not published on-chain, and instead a ZK proof is used to show know knowledge of them.
Before UPA: The client directly submits their solution publicInputs
, along with a proof
:
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:
Before UPA: The contract checks that the solution is valid by using this.verifyProof
to directly verify the proof on-chain.
After UPA: this.verifyProof
is replaced by upaVerifier.isVerified
. We don't need to send the proof, only the solution:
Here, the client saves on gas costs as this proof is not verified individually on-chain.