BNB Chain has announced the integration of zero-knowledge (zk) fault proofs for its opBNB protocol. This development aims to enhance the performance and robustness of the blockchain, according to the BNB Chain Blog.
Background on zk-Fault Proof
In the past year, Optimism initiated a Foundation Mission Request to develop the Op Stack Zero Knowledge Proof (ZKP) for verifying the correctness of its fault proof program. The ZKP aims to reduce the challenge period from 7 days to 12 hours, avoiding complicated interactive challenge procedures. Optimism funded three proposals from Risc Zero, O(1) Labs, and the ETH Storage team, all of which proposed compiling the fault proof program into a generic instruction set like RISCV, WASM, or MIPS.
The compiled instructions are verified using zkVMs such as zkRISCV, zkWASM, or zkMIPS. This method, known as the generic VM approach, contrasts with a custom circuit approach, which BNB Chain believes offers better performance.
Development and Implementation
Polygon Zero recently developed a highly performant type1 zkEVM, aligning with BNB Chain's expectations for creating a custom circuit for opBNB's fault proof program. Consequently, BNB Chain developed a proof of concept (PoC) based on Polygon Zero’s type1 zkEVM to demonstrate performance advantages over the generic VM approach. The PoC is specific to Optimism and can generate ZKP for its blocks.
The existing fault proof design for Optimism involves off-chain and on-chain components, characterized by a high gas cost and susceptibility to censorship attacks. The zk-fault proof aims to address these issues by enabling challengers to submit just one on-chain transaction, thereby reducing gas costs and shortening the challenge period.
Architecture of ZK Fault Proof
The zk-fault proof design comprises several components:
- Optimism Block Execution Circuit: Processes L2 blocks according to the Optimism state transition protocol.
- Optimism Block Derivation Circuit: Derives L2 blocks from L1 data, verifying the correctness of the derived L2 block.
- Fault Proof Circuit: Validates the execution and derivation proofs, ensuring consistency.
- zkFaultProofVerifier Contract: Resides on the L1 chain to verify the correctness of the ZK fault proof.
Challengers can generate a zk-fault proof for disputed L1 blocks and submit it to the zkFaultProofVerifier contract. If verified, the challenger wins, reducing susceptibility to censorship attacks and improving user experience.
Performance Testing
BNB Chain conducted performance tests comparing the opBNB custom circuit with Zeth developed by Risc Zero. The custom circuit proved more efficient, generating 10 times fewer ZK cycles and proving 5-6 times faster than Zeth, making the opBNB approach 5-6 times cheaper.
Future Work
The type1 zkEVM is still in development, with features like continuations aimed at making proof generation more parallel-friendly. BNB Chain plans to contribute to these improvements, expecting significant performance boosts for the opBNB custom circuit approach.
To complete the ZK fault proof for Optimism or opBNB, additional components like the block derivation circuit, fault proof circuit, and on-chain zkFaultProofVerifier contract need to be implemented. These tasks are slated for the next phase of the PoC.
Upon completion, the opBNB team will contribute their work to the Optimism ecosystem to enhance the security and performance of the multi-proof system.
Image source: Shutterstock