GithubHelp home page GithubHelp logo

isabella232 / plasma_winter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matter-labs-archive/plasma_winter

0.0 0.0 0.0 154 KB

Plasma Winter - an account model Plasma with with zkSNARK proved state transitions. Started on ETH Singapore

License: Other

Rust 97.93% Shell 0.15% JavaScript 1.92%

plasma_winter's Introduction

Plasma Winter: governed by SNARKs

This work is a demonstration of applying zk-SNARKs to solving blockchain scalability as a Layer 2 Plasma-like solution.

The code is meant to serve as a Proof-of-concept only and is not suitable for use in production apps. Work on the production-grade implementation is currently in progress. If you want to contribute, please contact the authors:

Spec

https://hackmd.io/cY-VP7SDTUGgPOzDiEU3TQ

How to run

  • Generate a proving key
   cargo run --release --bin read_write_keys.rs

It will generate a VerificationKeys.sol and proving key pk.key in a root folder.

  • Copy VerificationKeys.sol into the ./contracts/contracts/ with replacement

  • Replace a EMPTY_TREE_ROOT with value 0x09d809ed651bf1f19906bd7c170e1736176d3fbb2053e702dbbc2a8eed3e929f. It's a root hash of demo server with pregenerated 1000 accounts

  • Run the migration by making a proper adjustments in deploy_example.sh file

  • Run server:

    • Change start_demo_example.sh by inserting proper URLs, addresses and keys
    • Run the script
  • Server has 1000 accounts pregenerated and you can send using

   POST http://127.0.0.1:8080/send

{
   "from": 0,
   "to": 1,
   "amount": 1000
}
  • Valid response is
{
   "accepted": true
}
  • Batch size is 32 transactions, so you need to send this number of txes to start block commitment and proof generation process

  • UI lives here https://github.com/gluk64/gluk64.github.io, you need to change

   const APIserver = 'https://1be52733.ngrok.io/send'

To something else

License

Plasma Winter is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

plasma_winter's People

Contributors

gluk64 avatar shamatar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.