Thanks to visit codestin.com
Credit goes to github.com

Skip to content

open-rollup/pallet-open-rollup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open rollup Pallet

Open rollup pallet provides a general zk-rollup framework for all substrate-based blockchains.

Features

  • There is no central operator here, developers can freely register their zkapp on the chain, implement their own offline program, and submit their ZK Proofs and state changes for their batch transactions.

  • Support Currency, Fungible, Nonfungible tokens in Substrate.

  • Miden verifier has been integrated to support the verification of the miden program.

Protocol

  • Zkapp registration. Developers use a program-hash to register a zkapp. The program-hash is derived from the bytecode of the zkapp. If the zkapp is open source, users can verify that the program-hash is indeed corresponding to the zkapp.
  • User deposit. Users who want to participate in a zkapp deposit to this zkapp, and the batch submitted by this zkapp needs to include it.
  • User withdraw. Users can submit an withdraw transaction, and this zkapp include it in the next submission.
  • User Move Asset. Users move their assets from a zkapp to another zkapp, and this zkapp include it in the next submission.
  • User full exit. If the zkapp status is inactive, the user can exit the zkapp fully and withdraw their assets.
  • Zkapp batch submit. Submit a batch for a zkapp, can only be called by submitter of the zkapp.

Tests

Use Rust's native cargo command

cargo test --all-features

or in docker:

docker build -t open-rollup .
docker run --rm open-rollup

Documentation

The in-code documentation can be opened with:

cargo doc --no-deps --open --package pallet-open-rollup

A demo off-chain miden program of computing Fibonacci sequence.

First, install the required compiler and tools: https://docs.substrate.io/install/

Then use https://github.com/open-rollup/fib-miden-example to try out the pallet.

About

Substrate pallet of Open Rollup

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors