Wholesum network: Towards decentralization of ETH L2 zkRollups' sequencer proving

gm gang :bat:

Project Description:
TLDR; Parallel proving of Risc0 zkVM programs on computationally weak nodes, towards decentralization of ETH L2 sequencer proving.

A full note is also provided here on our Github

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 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.
zkVM proving is only feasible on strong hardware. With weak specced hardware as worker nodes, hopes for generating ZK proofs start to fade away quickly. But not completely! The solution turns out, 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.
zkVM proving finds and important application in scaling the Ethereum network. L2 zkRollups need to generate proofs that ensure their transactions are valid. Each proof is then posted to the Ethereum network(the L1) for verification. This scheme is a promising approach to scale Ethereum’s transaction throughput. The agent responsible for generating proofs in zkRollups is called the sequencer. Its main role is to batch L2 transactions and have them sent for L1 verification. Being a critical part of zkRollups, the sequencer routines require strong computers to run as expected. Right now, almost all of the mainstream L2 zkRollups use centralized infra(e.g. strong AWS instances) to generate proofs. We, however, would like to test a scenario where the proving is done on stock hardware(i.e. 8+ years old CPU, 8 GB RAM). Our goal is close on in/beat 5 minutes finality of Linea sequencer proving(as a L2 zkRollup example). If successful, we expect to secure big performance gains while enjoying decentralization guarantees obtained by proving jobs on a p2p network.

Public Repository: [WholesumNet · GitHub]

Budget Breakdown

We hope to raise at least 4 * $5,000 = $20,000 that would support 1 full-time developer for the duration of the test(~4 months).

Milestone 1:
Duration: 45 days
Budget: $7,500
Goals:

  • Design a network protocol for proving zkVM programs
  • Reach out to Golem, Swarm, … for node(worker) inclusion and partnering with them

Deliverables:
The action plan and protocol specifications ready for implementation

Milestone 2:
Duration: 45 days
Budget: $7,500
Goals:

  • Come up with Risc0 transformers that emulate Linea/… sequencer proving

Deliverables:
A protocol implemented into client and server applications, written in Rust

Milestone 3:
Duration: 30 days
Budget: $5,000
Goals:

  • To test the whole setup and see if it works

Deliverables:
Results and reports of how the test went

Funding Requested: $20,000

Plans should you fall below, reach or exceed funding goals:
Fall below:
We are grateful for any amount we raise here and won’t quit.

Reach:
We go as planned.

Exceed:
We would bring in additional brains.

Impact Measurement and Reporting

Inputs > Activities > Outputs > Outcomes > Long Term Impact

Short-term Outcomes (0-3 months):

  • We expect to have transformed a typical Linea(or other L2 zkRollup) sequencer proving job to the format Risc0 zkVM accepts by the end of milestone 2. This includes the templates and scripts that make the grand test ready to be conducted.
  • Another important goal is to attract and form a network with at least 1000 nodes. We plan to contact any network be it compute or storage and ask them to jump in.

Mid-term Outcomes (3-6+ months):

  • By the end of milestone 3, we hope to have favourable results that support our initial hunches about obtaining decentralization guarantees + lower proving times compared to the centralized sequencer provers currently in use by L2 zkRollups.

Long-term Impact (5+ years):

  • Finally, should everything goes as planned, we would have decentralized away all L2 zkRollups and beaten centralized proving infra. Ain’t easy but won’t hurt to test.

Outcomes Measurement:

  • Success in our case can be measured pretty simply. We either prove faster or die miserably, that’s it. If we failed, there will be lessons for everyone not to repeat our mistakes.

Interim Reporting

Regular Updates:

  • We would write mothly reports/progress updates and share them with the community.

Milestone Verification:

  • Our goal is simple and so believe that the community would be able to vet our claims. At the end of milestone 1, we should have a protocol specification. By the end of milestone 2, we are required to provide MVPs for client and server(prover) nodes. And finally, by the end of milestone 3, we are expected to share the results of the grand test. So, each milestone has a clear goal and deliverables. It is however not generally easy for any community to vet any projects’ claims. We promise to stay as transparent as we can but any sound community needs to stay alert and verify claims accordingly.

Sustainability Plan

If our tests ended up to fruit favourable results, we would then start to expand into the entire L2 zkRollup space, ask and act as a decentralized verifiable network that proves sequencer jobs and in return earns fees.

Case Studies and Testimonials

Gathering Feedback:

  • Users: since we are an open-source p2p network, our main means of reaching out to node operators(end users) is via our public social handles(Github issues, Twitter, …). Moreover, we would provide our nodes with options to contribute stats by letting our applications to send us anonymous data collected in a privacy preserving manner.
  • L2 zkRollups: it is not easy to reach out to established networks(eg Polygon, …) unless one has something incentivizing for them. Our surprise for them is the test results we hope to be favourable.

Showcasing Success:

  • We prefer the format of formal reports put in our Github repositories and shared on our Twitter account. One such report is already provided here at the top of this note.

Advancing Values of Freedom and Privacy

We are a crypto startup and are trying to achieve our goals. Yes, decentralization advances freedom and expands the reach of the people in a privacy preserving manner. But our project is nowhere close to claim such outreach yet. All we can do is to develop tools that respect privacy and hope to be of value for everyone in the form of a public good.

Supporting Decentralization

We are a p2p network and so every bit of compute that gets spit out of our network, is the result of some decentralized effort. We plan to retire centralized infra of zkRollups and swap them out for decentralized equivalents. We do compute on a decentralized network and store interim + final results on decentralized storage.

Team Information

We are a team of a solo developer Reza:
I have a BEng in computer engineering. Generally, I consider myself someone interested in computers. I have been active in computing industry since 2010. I have worked on a variety of projects ranging from computer vision to UX research. I got into crypto in 2020 when I found myself in need of raising funds for my EBook reading software called “readaratus”. Ran out of money and so decided to do freelance jobs and there I found out about Gitcoin grants and hackathoons. Jumped in and won some hackatoons(some Golem ones too) and got myself partially fed for a year or so. Meanwhile, I joined a Gitcoin workstream project called “dCompass” in late 2021 that aimed to revamp Gitcoin Quests. At dCompass, I did studies about user experience of Quests and wrote technical reports and laid out a vision for an interactive learning environment. dCompass failed to raise funding and was shut down in Q2 2022. It was then in summer 2022 that I was offered a grant from the Swarm team to join forces of dStorage(Swarm) and dCompute(Golem) networks in an interoperability attempt to create a world computer called “Sovr project”. Sovr was shut down later in Q2 2023 due to lack of interest from developers to use our tooling. Then I started Wholesum network and have been working on it full-time ever since.

Social Proof

Well, no one has endorsed us yet. And everything about us is available on our Github. Our work is the result of a two year journey of playing around decentralized compute and testing different setups. Swarm network team has helped us a lot on this initiative, both intellectually and financially. To find out more about us, you are more than welcomed to contact them but this does not mean that they endorse us.

Transparency

Any funding raised from the Octant round(s) will be used to pay for developer time and other expenses like storage plans, on-off testing VPS instances, … If anything remained, we won’t say no to a “Mac studio + Apple studio display” :wink:

Other funding

  • $25,000 from Swarm association in 2022-2023

Send it :saluting_face: