Skip to main content

zkBTC Full Nodes

zkBTC Full Nodes bridge the gap between the Bitcoin network and the zero-knowledge proof system used in BeL2. These nodes monitors the Bitcoin blockchain and generate the proofs necessary for cross-chain operations.

Diagram

Purpose and Functionality

The primary purpose of zkBTC Full Nodes is to provide a secure and efficient way to verify Bitcoin transactions within the BeL2 ecosystem.

zkBTC Full Nodes continuously monitor the Bitcoin network for new transactions and blocks. They verify Bitcoin transactions according to the Bitcoin protocol rules.

For relevant transactions, zkBTC Full Nodes generate zero-knowledge proofs that can be efficiently verified on EVM-compatible chains. They relay transaction data and generated proofs for further processing and submission to EVM chains.

Importance in the BeL2 Ecosystem

zkBTC Full Nodes are essential for several reasons:

  • They serve as the primary interface between the Bitcoin network and the BeL2 system, enabling with EVM-compatible chains.

  • By generating compact zero-knowledge proofs, zkBTC Full Nodes allow for efficient verification of Bitcoin transactions on other chains without requiring full Bitcoin node capabilities on those chains.

  • They maintain the security properties of the Bitcoin network while enabling interoperability with other blockchain ecosystems.

Technical Implementation

zkBTC Full Nodes are implemented as specialized Bitcoin full nodes with additional capabilities for generating zero-knowledge proofs. Here's a simplified example of how a zkBTC Full Node might process transactions:

class zkBTCFullNode:
def __init__(self):
self.bitcoin_node = BitcoinNode()
self.zk_prover = ZKProver()

def process_new_block(self, block):
# Verify the block according to Bitcoin rules
if self.bitcoin_node.verify_block(block):
# Process relevant transactions
for tx in block.transactions:
if self.is_relevant_transaction(tx):
proof = self.generate_zk_proof(tx)
self.relay_to_arbitrator_network(tx, proof)

def is_relevant_transaction(self, tx):
# Logic to determine if a transaction is relevant for BeL2
# ...

def generate_zk_proof(self, tx):
# Generate a zero-knowledge proof for the transaction
return self.zk_prover.create_proof(tx)

def relay_to_arbitrator_network(self, tx, proof):
# Logic to relay transaction and proof to the Arbitrator Network
# ...

This example demonstrates a basic structure for a zkBTC Full Node. The actual implementation would include more complex Bitcoin protocol handling, proof generation algorithms, and network communication features.

How It Works with Other Components

zkBTC Full Nodes interact with several other components in the BeL2 architecture:

  1. zkBTC Full Nodes directly interface with the Bitcoin network, monitoring transactions and blocks.
  2. The zero-knowledge proofs generated by zkBTC Full Nodes use the Cairo Circuit, ensuring efficient and verifiable proof generation.
  3. zkBTC Full Nodes relay the generated proofs and relevant transaction data to the Arbitrator Network for further processing.
  4. Individual Arbitrator Nodes receive and verify the proofs generated by zkBTC Full Nodes.