TLDR; Risc0 zkVM proving on computationally weak nodes of Swarm. A full note is also available here: https://github.com/WholesumNet/docs/blob/main/parallelization/parallelized-proving/report.pdf
Overview
Proving zkVM programs is a computationally intensive task and requires capable hardware(e.g. RTX 4090 GPUs, Intel Xeons, ...). Owning such hardware is not feasible for everyone. So, if one is serious about the verifiable computing, she has to either rely on centralized providers(e.g. AWS instances) or start her own prove-maxi network. Centralization has its own drawbacks, so better to focus on decentralized options instead. To meet the compute needs of clients and serve proving jobs, one would need a network of provider PCs whose hardware specs are maxed-out. Getting such a network of expensive gadgets up, however, requires a complex set of incentives to keep the nodes busy. This application entry deviates from the usual solutions and proposes a parallel proving scheme to execute zkVM programs on computationally weak nodes usually found in decentralized storage networks(dStorage from now on). Here the focus is on Risc0
as a tool used for creating zkVM programs, and Swarm
as an example p2p network that has thousands of relax-specced nodes serving their storage space.
We seek 3 goals with proving on weak machines:
1) tap on the compute potential of usually idle storage nodes.
2) derive up resource utilization of nodes to 99%.
3) focus on weak nodes as forming a network off them is straightforward.
Observation shows that nodes of Swarm network, for instance, are idle half of their time. This brings up an interesting opportunity to think about tapping on that pool of idleness. But the idea quickly fades as proving is only feasible on strong PCs. The solution is to divide the task and prove individual sub-tasks parallely. Risc0 allows for the programs building on top of its SDK, to customize the degree to which proving stresses the hardware. The customization follows the natural limitation set by the finite fields used for generating proofs. As you may already know, Risc0 uses STARKs for proof generation and it has to stay efficient while mathematically consistent for yielding provable programs. This forces Risc0 to choose fields whose ability to generate proofs is capped at a certain number of operations(16.78M as of today). But real world programs are larger and so Risc0 team had to find a way to make proving of infinitely size programs possible. This unfortunate(or fortunate in our case) limitation enables dividing a zkVM program into several items(called segments in Risc0 jargon) and proving them one by one. The final proof is then obtained by aggregating individual proofs. We have run experiments and have found out that by customizing the segment size to ranges that make proving possible on systems with 4-8GB of memory, we can capitalize on available stock hardware and prove zkVM programs in a parallel manner while keeping the overhead manageable. This gotcha seems to eliminate the need for forming a network off elite PCs.
Our goal is to close on in/beat 2 minutes finality of Linea sequencer's prover!
Wholesum network History
-
accepted into Asia Round 1 month ago.