Valence ZK is a revolutionary framework that enables trustless cross-blockchain development through zero-knowledge proofs. This repository contains a complete end-to-end demo that serves as a feasibility proof and includes numerous re-usable components for integration with the Valence-coprocessor (our interchain development stack).
- ZK Light Client Integration: Successfully abstracted and verified zk light client proofs, storing output roots as verified chain state in our SMT (Sparse Merkle Tree)
- Universal State Proof System: Implemented comprehensive state proof verification for both:
- EVM (Ethereum) chains with full storage proof verification
- Cosmos (Tendermint) chains with ICS23 compliance
- Cross-Chain Messaging: Built a nearly production-ready mailbox application demonstrating trustless message passing between Ethereum and Neutron
- Modular Architecture: Created a flexible framework that can be extended to support additional blockchain ecosystems
- Ethereum Light Client: SP1-based verification of Ethereum consensus state using Helios
- Tendermint Light Client: SP1-based verification of Tendermint chain state
- SMT State Management: Stores and verifies chain state roots in a Sparse Merkle Tree
- EVM Storage Proofs: Full verification of account and storage proofs
- ICS23 Proofs: Support for Cosmos-style storage proofs
- Block Header Verification: Full storage proof verification against zk light client roots
- Mailbox Application: Nearly production-ready example of cross-chain messaging
- Modular Design: Easy integration of new applications and chains
The framework implements a sophisticated architecture that combines:
-
ZK Light Client Layer:
- SP1-based Ethereum light client (Helios)
- SP1-based Tendermint light client
- Recursive ZK verification of chain state
-
State Proof System:
- Generic Merkle proof interface
- Account and storage proof verification
- Block header verification
-
Coprocessor Layer:
- SMT-based state management
- Batched proof verification
- Recursive ZK circuit implementation
- Rust 1.84.0 or later
- Basic understanding of blockchain concepts and zero-knowledge proofs
- Familiarity with Merkle trees and cryptographic proofs
git clone <repository-url>
cd valence-zk-demo
cp .env.example .env
# Update .env with your configuration
cargo run -p coprocessor --release --features mailbox -- --nocapture
coprocessor/
: Core coprocessor logic and proof generationcoprocessor-proofs/
: ZK circuit implementationscoprocessor-circuit-types/
: Type-safe circuit definitionscoprocessor-circuit-sp1/
: Optimized SP1 implementationcoprocessor-circuit-logic/
: Core verification logic
zk-programs/
: Example ZK applicationszk-mailbox-application/
: Cross-chain messaging
lightclients/
: ZK light client implementationshelios/
: Ethereum light clienttendermint/
: Tendermint light client
Valence ZK implements a robust security model:
- ZK Light Client Roots: Verifies chain state using zk light client proofs
- Recursive ZK Circuits: Verifies Merkle proofs against verified roots
- SMT State Management: Maintains verified chain state in a Sparse Merkle Tree
- Implement ZK light client integration for Ethereum and Neutron
- Build comprehensive state proof system
- Create nearly production-ready mailbox application
- Architectural improvements
- Integration of ZK Lightclient proofs into the Valence coprocessor
- Integration of storage proofs and block header validation into the Valence coprocessor