Content
@
0 reply
0 recast
0 reaction
ncitron.eth
@ncitron.eth
Today we released Jolt, our new zkVM! While we've highlighted its performance characteristics, I want to show off its incredible developer experience. Using Jolt is as simple as adding #[jolt::provable] to your Rust functions. https://warpcast.com/eddy/0xae744eee
5 replies
8 recasts
29 reactions
ncitron.eth
@ncitron.eth
You can create a project with jolt by running "jolt new <name>" and we'll automatically create a template project for you. You'll notice that there is a main project which we refer to as the host, and another package called guest which is where your provable code goes.
1 reply
0 recast
5 reactions
ncitron.eth
@ncitron.eth
Let's jump into the guest to see what's going on. This is just a normal fibonacci function with #[jolt::provable] above it. This tells Jolt that we want to prove this function. Users can add as many provable functions into the guest as they'd like.
1 reply
0 recast
4 reactions
ncitron.eth
@ncitron.eth
Now let's take a look at the host to see how to generate a proof. The provable macro automatically generates a build_function_name function for each provable function in the guest. This returns a prove and verify function.
1 reply
0 recast
3 reactions
ncitron.eth
@ncitron.eth
The prove function takes in the same inputs as the original function, but modifies the output to additionally return a proof. Calling prove_fib is almost the same as calling fib itself! The verifier function takes in a proof and returns a boolean indicating validity.
1 reply
0 recast
3 reactions
ncitron.eth
@ncitron.eth
The provable macro is probably the strangest bit of Rust I've ever written, and you should definitely check it out to see all the tricks we made use of. Regardless, the outcome is simple. Jolt has the best DevEx of any zkVM. We're excited to see what you build with Jolt!
1 reply
0 recast
3 reactions