Skip to content

ZK Rollups pallet implementation

License

Apache-2.0, GPL-3.0 licenses found

Licenses found

Apache-2.0
LICENSE-APACHE2
GPL-3.0
LICENSE-GPL3
Notifications You must be signed in to change notification settings

AstarNetwork/ZKRollups

Repository files navigation

Project Overview 📄

Build Integration

Diclaimer

As a first step, we use Matter Labs' ZK Rollups contracts. Regarding the contracts, all credits goes to Matter Labs. What makes this implementation unique is that we will make a ZK Rollups Substrate pallet.

Introduction

We believe that ZK Rollup is the killer layer2 solution in the coming months and some of the top projects will use this technology to make DApps scalable.

ZK Rollup is valuable for Polkadot Parachain as described below.

  1. Bringing vertical off-chain scalability without sacrificing on-chain data availability, security and privacy (×3-10 scalability).
  2. Handling smart contracts on layer2.
  3. Sharding plus Rollups will be the future. Polkadot has the sharding ish architecture but it doesn't have Rollups yet.
  4. Some of the great Ethereum projects have already started using Rollups. If we could build Rollups on Substeate/Polkadot, we would help them build applications on Polkdot Parachain like Plasm Network.

Integration Test on Substrate

Premise

Software Version
docker-compose 1.27.4
docker 19.03.13
git 2.24.1
yarn 1.21.1
git 14.15.4

And there is private key file $HOME/.ssh/id_rsa.

Test

Execute following command in this project root directory.

$ sh scripts/integration.sh

This script executes the following sequence.

  1. Build Zk Rollup contracts code
  2. Build operator and prover containers code
  3. Run substrate-based chain, operator, and prover, database containers code
  4. Run integration test container code

Containers

Name Description
substrate substrate based chain
test integration test
setup setup Zksync env to deploy contract and fund coinbase account
operator sidechain operator
prover zk prover
postgres sidechain db

yarn setup

$ yarn setup executes test/src/setup-contract.ts and test/src/setup-wallet.ts.

  • test/src/setup-contract.ts
    Deploy all Zk Rollup contracts to the substrate-based chain(substrate)
  • test/src/setup-wallet.ts
    Fund some tokens to the tester wallet.

yarn integration

$ yarn integration executes zksync integration test.
The zksync integration test tests

  • Depositing ETH
  • Changing public key
  • Transfering ETH
  • Collecting transaction fee
  • Exiting ETH

About

ZK Rollups pallet implementation

Resources

License

Apache-2.0, GPL-3.0 licenses found

Licenses found

Apache-2.0
LICENSE-APACHE2
GPL-3.0
LICENSE-GPL3

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 3

  •  
  •  
  •