ZK Rollups are an interesting scaling mechanism, and over the past couple weeks I’ve been considering how we might bring them to Polkadot as well. Here is a description of an MVP supporting ZK Rollups at the consensus layer by changing the execution cores mechanism slightly.
While I don’t think that ZK rollups are a one-size-fits-all (proving is expensive, blockspace not as flexible as Wasm), this is an interesting experiment worth prototyping.
Execution cores in Polkadot currently work as follows:
- assignments of parachains to cores are determined in advance
- collators for assigned parachains create blocks, sending them to backing validators
- backing validators check the blocks, and then produce a quorum allowing the parablock + metadata to be posted on-chain
- data is made available
- approval-checking leads to further checks for finality
This mechanism could be slightly modified to support ZK-Parachains
- same
- same
- the parablock is posted on-chain, and the ZK circuit encapsulating the parachain logic evaluates the parablock and checks its outputs
- data is made available
- ZK parablocks are skipped, as the parablock is already valid
With further improvements, such as exposing the Data-Availability layer as a service independent of execution cores, this flow could be further minimized and would easily enable things such as L3s.