ZetaGrid: A Scalable Protocol for Permissionless State Proof Verification on Polkadot
Abstract
ZetaGrid is an innovative protocol designed to empower light clients with extensive on-chain functionality, enabling them to execute high-compute tasks off-chain and propose valid blocks directly to the chain through zkSNARK-enabled state proofs. Utilizing a custom Substrate-based light client, ZetaGrid introduces the concept of Light Chains, which allows light nodes to handle transaction processing, sequencing, and state transitions independently. This approach reduces the computational burden on collators or validators while ensuring the integrity of the proposed blocks. ZetaGrid establishes a protocol in which light clients act as block producers, forming a system analogous to a rollup but with increased decentralization and minimal reliance on network resources.
Within the bounds of Polkadot, ZetaGrid leverages the flexibility of Substrate to implement an independent p2p messaging layer, a decentralized transaction pool, and a unique consensus layer for nominating block proposers from a set of augmented light nodes. The architecture includes custom modules for transaction pooling, zkSNARK verification, and runtime integration, alongside a consensus mechanism that coordinates block production among light clients. This approach not only offers a scalable solution for permissionless verification but also introduces an innovative paradigm for leveraging light clients within a parachain ecosystem.
Unique Selling Points (USPs)
-
Permissionless Block Proposals: Light nodes propose blocks through zkSNARK-enabled proofs, enabling a decentralized block production process without compromising network security.
-
Low Computational Overhead: ZetaGrid reduces the computational burden on validators and collators by offloading transaction processing to light nodes, achieving faster block finalization and greater network efficiency.
-
Enhanced Off-Chain Computing: Enables light clients to execute high-compute tasks off-chain while maintaining integrity through zkSNARKs, ensuring that block proposals are always verifiable by validators.
-
Decentralized Transaction Pool: A unique transaction pool managed by light clients in a p2p environment enables decentralized transaction processing and ordering, further enhancing scalability.
-
Custom Consensus Mechanism: Utilizes a separate consensus mechanism for block proposer nomination among light nodes, allowing for flexible and dynamic participation in the block production process.
-
Interoperability with Polkadot: Fully compatible with Polkadotās parachain architecture, enabling seamless integration with other parachains and decentralized applications across the ecosystem.
System Architecture
The ZetaGrid architecture is comprised of the following modules, each integral to the protocolās functionality:
1. Light Node Binary
- A custom light client binary built on Substrate, designed to perform all critical operations off-chain. The light node handles transaction pooling, execution, state transitions, and proof generation, enabling it to act as a mini-validator in the network.
2. Transaction Pooling
- A decentralized transaction pool allowing light nodes to pool, sequence, and prioritize transactions off-chain. The transaction pool operates within a peer-to-peer messaging network, enabling efficient sharing and distribution of transactions among light nodes.
3. Transaction Execution Logic
- Responsible for executing transactions off-chain, using the latest Merkle root of the Substrate chain. This module validates transactions locally, applies them to the state, and prepares the modified state for proof generation.
4. zkSNARK Specification
- Defines the zkSNARKs structure and protocols used to generate proofs for state transitions. This module leverages cryptographic libraries like Arkworks to create efficient proofs, ensuring that only valid state transitions are submitted to the chain.
5. Submission Logic
- Manages the submission of state proofs and transaction results from the light node to collators or validators. Upon submission, the proof and updated state are validated by the on-chain authority before including the block in the chain.
6. Proposal Pallet
- A Substrate pallet that coordinates the integration of light nodes with the parachain runtime. The pallet enforces protocol rules, processes submitted proofs, and facilitates the nomination of block proposers.
7. LN P2P Messaging Layer
- A custom peer-to-peer messaging network dedicated to light nodes, enabling them to share transaction data, synchronize state information, and broadcast proof submissions in real-time.
8. Runtime Calls
- Functions in the parachain runtime to manage state updates, verify zkSNARK proofs, and apply transactions from light nodes. Runtime calls also handle reward mechanisms, ensuring that light nodes are incentivized for their participation.
9. Consensus and Protocol Regulation
- A consensus mechanism tailored to the ZetaGrid protocol, which nominates block proposers among light nodes based on predetermined conditions. The protocol regulation enforces security, redundancy, and accuracy in block proposals, aligning with the parachainās main consensus layer.
Workflow
The workflow in ZetaGrid allows light clients to handle transaction processing, state transitions, and proof submission independently from validators, creating a parallel block production process with minimal overhead.
-
Transaction Collection and Pooling:
- Light nodes collect transactions from the network and pool them within the p2p messaging layer.
- Transactions are prioritized based on predefined criteria, such as gas fees or specific application requirements.
-
Execution and State Transition:
- Each light node executes the pooled transactions off-chain using the latest Merkle root.
- The light node computes the new state and prepares a zkSNARK proof to verify the state transition.
-
Proof Generation and Submission:
- Light nodes generate a zkSNARK proof to certify the validity of the state transition.
- The proof and updated state are submitted to the Proposal Pallet, where the on-chain authority validates the proof and includes the block if it is correct.
-
Consensus and Proposer Nomination:
- The protocolās consensus mechanism selects the next block proposer from a set of eligible light nodes.
- Nominated nodes submit their proofs to the validator, which verifies and includes them in the chain.
-
Verification and Finalization:
- Validators or collators verify the zkSNARK proof and validate the transaction state, finalizing the block in the chain.
- Rewards are distributed to the light nodes for their participation in the block production process.
System Design
The system design leverages Substrateās modularity and Polkadotās cross-chain capabilities, creating a permissionless environment where light nodes act as decentralized co-processors within the Polkadot ecosystem.
Key Components:
-
Substrate Framework:
- Enables modular integration of custom light node binaries and runtime calls.
- Provides the base layer for the Proposal Pallet and consensus management.
-
zkSNARK-enabled Verification:
- The protocol relies on zkSNARKs for secure, scalable, and efficient proof generation, facilitating permissionless state transitions and validation.
-
Decentralized Messaging and Consensus:
- The light node p2p layer and dedicated consensus mechanism allow for scalable, decentralized transaction handling and proposer nomination.
-
Incentivized Participation:
- The Proposal Pallet includes reward mechanisms to incentivize light nodes to process and propose blocks.
-
Inter-Parachain Operability:
- Designed to be interoperable with other parachains, allowing for secure, zk-enabled cross-chain transfers and compatibility within Polkadotās relay chain.