
Building with Eden zkVM at the Assembly Hackathon
Starting now and ending Sunday October 29th 2023, we invite all Hooners to try out the Eden zkVM, the best general verifiable computing platform in the world. Build any application that utilizes Zorp’s Eden zkVM for a chance to win two Urbit stars.
You have 2 months to build the most wild, functional, and fun program or hack on top of our zkVM. Your creation will be demonstrated and evaluated live at Urbit Assembly Lisboa 2023.
If you need inspiration or help defining/refining your concept, 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.)
- Create a new desk on your ship -
|merge %zkvm our %base
- Mount it -
|mount %zkvm
- Then, clone the repository -
git clone git@github.com:zorp-corp/verifier.git
- Copy in files into desk -
cp -LR ./verifier/* ./<your ship>/zkvm/
- Commit the changes -
|commit %zkvm
- 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:
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.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.