Zerochain
Zerochain is a generic privacy-protecting layer on top of Substrate. It provides some useful substrate modules and toolkit for protecting user's privacy and sensitive data stored on chain. It is designed to get efficient zero-knowledge proving, reduce the on-chain storage cost and bring the flexibility for developing applications.
Have a look at Zerochain Book for usage and more information about using Zerochain.
Status
WARNING: Zerochain is alpha quality software, improvements and fixes are made frequently.
For now, only supported for the PoC of confidential payment inspired by Zether paper.
- Balance for each account is encrypted
- Transfer amount is encrypted
More features will be added...
Initial Setup
curl https://sh.rustup.rs -sSf | sh
rustup update stable
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
cargo +nightly install --git https://github.com/alexcrichton/wasm-gc
You will also need to install the following packages:
- Mac:
brew install cmake pkg-config openssl git llvm
- Linux:
sudo apt install cmake pkg-config libssl-dev git clang libclang-dev
Building
git clone [email protected]:LayerXcom/zero-chain.git
cd zero-chain
./build.sh
cargo build --release
Usage and Tutorial
Documented in Zerochain Book.
Related Repositories
- polkadot.rs: JSON-RPC Client for Substrate API
- ZFace (in same repo currently): An interface for interacting with Zerochain
- librustzcash for zerochain: zcash's toolchains for Zerochain
Documentations
- (Work in progress) Zerochain Book
- Announcing Zerochain: Applying zk-SNARKs to Substrate
- (Slide) Zerochain: A privacy-protecting layer on top of Substrate
- (Slide) Zerochain: A privacy layer for blockchain
References
- Substrate repo
- Substrate Developer Hub
- Zcash Protocol Specification
- Zether: Towards Privacy in a Smart Contract World
- Sonic: Zero-Knowledge SNARKs from Linear-Size Universal and Updatable Structured Reference Strings
Contributing
- Feel free to submit your own issues and PRs
- For further discussions and questions talk to us on Gitter