This cross-chain message verifier is a system designed to process, validate, and verify cross-chain messages securely using zero-knowledge (zkVM) technology. This system ensures message integrity, source/destination verification, and compatibility with blockchain-based smart contracts.
Cross-chain communication is essential in the multi-blockchain ecosystem. This system verifies messages between chains while maintaining security, privacy, and integrity. It employs zkVM proofs for message verification and integrates with Solidity smart contracts for on-chain validation.
- Zero-Knowledge Proofs: Ensures confidentiality and integrity of messages without exposing sensitive data.
- Cross-Chain Compatibility: Supports source and destination chain identification.
- Smart Contract Integration: Verifies proofs on-chain using a Solidity smart contract.
- Rust-Based zkVM: Built with Rust for performance and security.
- Fixture Generation: Provides testing utilities for generating proof fixtures for Solidity validation.
- Clone the Repository:
git clone https://github.com/Lynette7/cross-chain-verification-system.git
cd cross-chain-verification-system/verifier
- Install Dependencies: Ensure you have the following installed:
- Rust
- Foundry for Solidity testing
- Compile the SP1 program
- change directory to program:
cd program
- Compile the program:
cargo prove build
- Execute the program with the RISC-V runtime
cd script
RUST_LOG=info cargo run --release -- --execute --message "Hello, this is my first ZK application" --source-chain-id 1 --destination-chain-id 2
- If the execution of your program succeeds, then proof generation should succeed as well!
- Generate zkVM Proofs
- Run Proof Generation:
cd script
RUST_LOG=info cargo run --release -- --prove --message "Hello, this is my first ZK application" --source-chain-id 1 --destination-chain-id 2
Parameters:
- --message: The cross-chain message to verify.
- --source-chain-id: ID of the source chain.
- --destination-chain-id: ID of the destination chain.