ZORP

Building with Eden zkVM

08/29/23 | Yaseen Shaikh, Shelby Evans

Starting now, we invite all Hooners to try out the initial release of the Eden zkVM, the best general verifiable computing platform in the world. We’re excited to see the kinds of applications that can be made using our ZKPs.

If you need any assistance, don’t hesitate to contact us at: info@zorp.io

What should I build?

There are endless opportunities, but here are a couple ideas to get the wheels turning:

  • Games that contain hidden information (Poker, Battleship, etc)
  • Zero Knowledge Set Membership (proving in ZK that you own a particular item in a list without revealing which one)

Getting started with the Eden zkVM

Welcome! In this article we’ll step you through the process of getting your first computation proven on urbit.

Initial setup

To start, you’ll need to have a pre-booted ship that is running on the main urbit network in order to access our prover, which itself is a gall agent.

First, head over to this page and grab our custom vere binary with verifier jets and use it to start your ship. It’s MacOS only right now, but we’re doing our best to get builds out for other platforms. (It should work without the custom binary but it won’t be as zippy.)

  1. Create a new desk on your ship - |merge %zkvm our %base
  2. Mount it - |mount %zkvm
  3. Then, clone the repository - git clone git@github.com:zorp-corp/verifier.git
  4. Copy in files into desk - cp -LR ./verifier/* ./<your ship>/zkvm/
  5. Commit the changes - |commit %zkvm
  6. Install the desk - |install our %zkvm

You’ll know it worked when you see gall: booted %verifier in your terminal.

The %verifier agent is the central agent that coordinates interaction between your ship and any prover, and records proofs for later use.

Getting your first proof

It can be a lot of work to prove yourself, but at Zorp we’ve made things easy: just call the -prove-eden thread!

To prove our first computation, this is all we need:

=vr -zkvm!prove-eden [41 [4 0 1]]
vr

If all goes well, you should see something like [~ [valid=%.y code=[s=41 f=[4 0 1]] r=42]] in the terminal.

Hey, look at that, your first Eden ZKP! Not bad. Let’s dig into how it works.

The thread pokes the %verifier agent to request a proof from a prover on your behalf, and then waits until %verifier has both received the desired proof and has finished verifying it.

The thread produces the following result (unit [valid=? code=[s=* f=*] r=*]), which is the verification result. When the valid flag is &, the result represents the statement: The Eden program code produced result r faithfully. Otherwise, it means that the proof was not valid, and we cannot be sure that the claimed result r was in fact produced by code.

Do note a few things:

  1. The thread can sometimes return a unit ~ which indicates that there was some kind of error that occurred during the process. The specific error is available to recover from the state, but we’ll cover this in more detail in a future article.

  2. If there’s a lot of load on the prover, the -prove-eden thread may time out before the proof gets sent to the %verifier agent. As long as the prover eventually succeeds, you can still retrieve the verification result later on, even if the thread is no longer waiting for it. We will cover how to do this in a later article.