GithubHelp home page GithubHelp logo

kjaylee / plasma-mvp-sidechain Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fourthstate/plasma-mvp-sidechain

0.0 3.0 0.0 13.14 MB

Cosmos sdk (Tendermint consensus) side-chain implementation for plasma

License: Apache License 2.0

Go 100.00%

plasma-mvp-sidechain's Introduction

Plasma MVP Sidechain

license

Branch Tests Coverage
develop Build Status codecov
master Build Status codecov

This is the latest Minimum Viable Plasma version.

Note: This sidechain is being constructed to be compatible with our rootchain contract

Overview

As a layer 2 scaling solution, Plasma has two major components: verification and computation. Verification is handled by the rootchain contract which resolves any disputes and distributes funds accordingly.

Computation is handled separately by a sidechain. This sidechain leverages the Cosmos SDK to create a scalable and flexible blockchain, that can maintain it's security through reporting merkle roots to the root chain. We will be using Tendermint for consensus on this blockchain.

We are using a UTXO model for this blockchain. This allows us to do secure and compact proofs when interacting with the rootchain contract.

Starting a sidechain

In order to run a sidechain with tendermint consensus and a client to form transaction, a plasma node and light client will need to be initialized.

Note: The following assumes you have golang properly setup and all dependecies have already been installed. See Contribution Guidelines for more information.

Plasma Node:

  • Navigate to client/plasmad/ directory
  • Run go install via command line

The plasma node (plasmad) is now installed and can be called from any directory with plasmad

Run plasmad init via command line to start an instance of a plasma node with a connection to a tendermint validator.

Run plasmad start via command line to begin running the plasma node. You should see empty blocks being proposed and committed.

Plasma Light Client:

  • Navigate to client/plasmacli/ directory
  • Run go install via command line

Use plasmacli to run any of the commands for this light client

The light client uses the Ethereum keystore to create and store passphrase encrypted keys in $HOME/.plasmacli/keys/

dep ensure

When building the sidechain, go dep is used to manage dependencies. Running dep ensure followed by go build will result in the following output:

# github.com/FourthState/plasma-mvp-sidechain/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1
../vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/curve.go:42:44: fatal error: libsecp256k1/include/secp256k1.h: No such file or directory

This is caused by a go dep issue outlined here. To fix this locally, add the following in Gopkg.lock under crypto/secp256k1 and above crypto/sha3:

"crypto/secp256k1/libsecp256k1",
"crypto/secp256k1/libsecp256k1/include",
"crypto/secp256k1/libsecp256k1/src",
"crypto/secp256k1/libsecp256k1/src/modules/recovery",

Run dep ensure -vendor-only

Your vendor folder should now contain all the necessary dependencies, there is no need to run dep ensure again.

Plasma Architecture

See our research repository for architectural explanations of our Plasma implementation.

Documentation

See our documentation

Contributing

See our contributing guidelines

plasma-mvp-sidechain's People

Contributors

adityasripal avatar colin-axner avatar legengliu avatar hamdiallam avatar paulrberg avatar p0n1 avatar

Watchers

Jay avatar James Cloos avatar  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.