
Figure 1: Prover workflow: perform FRI and PoW
Prove
As you can see, there is only a single line of code added to create the proof. Theprove function performs the FRI and PoW operations under the hood, although technically, the constraint related steps were not performed in the previous section and are only performed once prove is called.
Verify
In order to verify our proof, we need to check that the constraints are satisfied using the commitments from the proof. In order to do that, we need to set up aBlake2sChannel and CommitmentSchemeVerifier<Blake2sMerkleChannel>, along with the same PcsConfig that we used when creating the proof.
Then, we need to recreate the running hash channel by passing the merkle tree commitments and the log_num_rows to the CommitmentSchemeVerifier instance by calling commit (remember, the order is important!).
Then, we can verify the proof using the verify function.