ZKCross Node

The ZKCross node is the main way for applications and users to interact with ZKCross. It consists of four major modules, the Dedicated Sequencer, ZkProver Dispatcher, Data Availability, and Contract Proxy.

Dedicated Sequencer

The Dedicated Sequencer provides a JSON-RPC interface and accepts Wasm host function API requests as mentioned in ZKCross SDK. Every few seconds, it retrieves a batch of Wasm host API calls and executes them to generate a new batch and a new state root.

ZkProver Dispatcher

Once a new batch is generated, the ZkProver dispatcher is notified and receives the execution trace of this batch from the Dedicated Sequencer. It then dispatches the execution trace to a zkWasm prover selected from the prover network for proof generation.

Contract Proxy

The contract proxy watches the Zk Prover and communicates with verification contracts deployed on Layer1 blockchains e.g. Ethereum. It has two main responsibilities. First, it monitors the Zk Prover to keep track of the status of the proving status and result. Second, it posts proofs to the on-chain smart contracts for verification. Contract proxy also watches the deposit and withdraw events from the bridge contracts deployed on Ethereum and relays the messages from one side to the other.

Data Availability

ZKCross DA provides a scalable solution to the data availability problem. We use Merkle tree to store the state of the system and built on top of mongodb. API like kv_setroot(), kv_getroot(), kv_get() and kv_set() will be exported as Wasm host function API. So that Wasm program can have a DA backend for data and state storage.