#How to increase Zkprogram recursion speed

6 messages · Page 1 of 1 (latest)

viscid phoenix
#

What are your suggestions for maximizing recursion speed? Current zkprogram works by processing each proof one after the other.

modern furnace
#

if you turn it into a tree structure you can make use of parallel proving across many machines

distant dagger
#

You do as follows:

  1. You run the ZkProgram using rawMethods to calculate the publicOutput for all the recursion steps
  2. You run in parallel using many workers proof generation for all recursion steps using the data from 1)
  3. You run in the parallel merging of the proofs as soon as the adjacent proofs from the 2) and 3) are ready

How zkCloudWorker do it:
https://github.com/zkcloudworker/zkcloudworker-aws/blob/main/src/api/sequencer.ts

If you will use zkCloudWorker, all this will be automatic for you, you will need just define functions create and merge for your ZkProgram as in this example:
https://github.com/zkcloudworker/worker-example/blob/main/src/worker.ts

viscid phoenix
distant dagger
viscid phoenix