Open nambrot opened 2 months ago
@nambrot @yorhodes I would like to work on this bounty. I have been working with zkVMs for some time now and have good knowledge of the working. Also, I have worked on Hyperlane infrastructure previously so it would be easy for me to integrate both the tech.
Also, I would like to extend a bit more on the ZK side of things, ZKVMs are great to start with but it would make sense if we could bench Plonky2 and Plonky3's performance for the required merkle tree circuits because it will much more optimized.
Go for it @armanthepythonguy, would be very cool to see!
@nambrot here's a basic workflow on what I am implementing. This is just the very first iteration to develop a small POC. Later as suggested I will be working on making the infra solid by attaching relayer as well. Lmk what you think
I would not modify the hyperlane validator to call the prover. Figuring out what off-chain services/data has to be retrieved is the responsability of the relayer
I would not modify the hyperlane validator to call the prover. Figuring out what off-chain services/data has to be retrieved is the responsability of the relayer
Okkk got it ser š«”
Context
Hyperlane messages are currently verified individually, typically by verifying validator signatures on a specific message hash (message ID).
The validator signature also includes the root of a merkle tree on the origin chain that commits to all outbound messages. An alternative verification procedure could be
Without ZK, this would be more gas efficient at some sufficiently large batch size where the calldata costs of providing merkle proofs are offset by the savings from eliminating signature verification. Especially on L2s, where calldata costs are more expensive than on the L1, this is prohibitive.
With ZK, these merkle proofs (and/or signature verification) would have a ~constant gas cost that does not vary with the size of batch.
Options
This bounty suggests the usage of zkVMs like Succincts SP1 or RiscZero. There are 2 approaches to this:
It probably requires figuring out the following problems:
Mailbox.process
function 2.1 (maybe have to have this new ISM use transient storage)Leave any questions, it would be very cool to see Hyperlane's batching (currently with Multicall3) to enjoy even greater effectiveness!
Relevant links: