-
Couldn't load subscription status.
- Fork 64
Description
Describe the feature
Introduction
Current issue introduces the reasoning and structure of a prototype meant to generate a zk proof of the state transition function in collaboration with @unnawut and @x-senpai-x. The implementation of this feature should not interfere with the rest of the codebase and will be initialized with a cli flag. Draft PR #835 hosts the development branch of the present issue and issue #13 provides useful guidelines. The choice of risc0 as a zkVM is temporary and is due to our previous experience with it and useful documentation. We plan to abstract the interface so that the user chooses among various zkVM options. This interface abstraction has been implemented for beacon chain https://github.com/x-senpai-x/Ream-ZKVM-Benchmarks with integration for: SP1, RiscZero, Zisk, Pico, Jolt, (OpenVM is coming soon).
Proof generation
- Cli flag
risc0enabled as--features risc0. ValidatorServicesends a message to lean chain service
LeanChainServiceMessage::ProduceBlockProof{ slot, sender, need_gossip }- For gossiping, we introduce a new p2p request variant
LeanP2PRequest::GossipBlockProof(slot)
Proof verification
-
The proof is verified using
LeanChainServiceMessage::ProcessBlockProof { proof_block, is_trusted: false, need_gossip: true } -
Voting based on block proofs could also be implemented but only after we complete all the above
Metrics
- elapsed (wall-clock) time for proving and verification
Logs
At the beginning, we will include logs for:
- success/failure
- latest block proven, to track the progress of the client
- (time metrics as well?)
Additional context
No response