natalymarcela11 / Rollupszk

Creative Commons Zero v1.0 Universal
1 stars 0 forks source link

#How Do Zk-Rollups Work? #2

Open natalymarcela11 opened 1 year ago

natalymarcela11 commented 1 year ago

Zk-rollups increase scalability as instead of having to post all transaction data on-chain, they only need to periodically provide valid bundled-up transaction batches that are executed using off-chain computation. These bundles are then “rolled up” into one summary of the state changes that are verified by the base layer using a validity proof that proves the correctness of the changes using a zero-knowledge proof, demonstrating with mathematical certainty that the state changes proposed by the layer 2 are correct and are the result of the execution of the given batch of transactions.

natalymarcela11 commented 1 year ago

Zk-rollups typically rely on the base layer for data availability, settlement, and censorship resistance. The rollup’s state is maintained by a smart contract deployed on the layer-1 network. When a user submits a transaction on the rollup, it’s usually submitted to a layer-2 operator for inclusion in the next transaction batch. These operators can be a centralized entity called a sequencer that executes transactions, bundles them up in batches, and submits the batch to the layer-1 network. Zk-rollups can also use a proof-of-stake system where the role of executing and bundling transactions is rotated between a set of validators who have deposited funds into a rollup staking contract.