Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/voltairelabs/plasma
Ethereum plasma implementation
https://github.com/voltairelabs/plasma
blockchain ethereum plasma
Last synced: 3 months ago
JSON representation
Ethereum plasma implementation
- Host: GitHub
- URL: https://github.com/voltairelabs/plasma
- Owner: voltairelabs
- License: mit
- Created: 2018-01-19T15:12:01.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-21T16:50:02.000Z (over 6 years ago)
- Last Synced: 2024-04-08T02:17:59.728Z (7 months ago)
- Topics: blockchain, ethereum, plasma
- Language: JavaScript
- Homepage:
- Size: 367 KB
- Stars: 50
- Watchers: 14
- Forks: 14
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-plasma - Voltairelabs's Plasma MVP
README
# Plasma MVP
[![Build Status](https://travis-ci.org/voltairelabs/plasma.svg?branch=master)](https://travis-ci.org/voltairelabs/plasma)
Install dependencies with
```
$ npm install
```Run test cases:
```
# start test rpc server (which starts server on localhost:8545)
$ npm run testrpc# run test cases
$ npm run test
```### Development
```
# start test rpc server or you can start `geth`/`parity` node
$ npm run testrpc# deploy contracts
$ npm run deploy# start authority's server
$ npm run authorized-dev# start dev server
$ npm run dev
```### Production
```
# build server
$ npm run build# start server
$ npm start
```### CLI
```
$ npm run testrpc # or use actual ethereum node (check configurations)
$ npm run authorized-node # or simple dev node => npm run dev# start cli (`-p` option provides a way to accept sender's private key)
$ ./src/cli/index.js -p '9b28f36fbd67381120752d6172ecdcf10e06ab2d9a1367aac00cdcd6ac7855d3'
plasma > .help
```#### Configurations
You can override default configurations by creating `config.env` file in root directory and adding following variables:
| Variable | Description | Default |
| --------------------------- | ---------------------------------------------------------------------------------------------------- | ----------------------- |
| APP_NAME | Name shown on UI | Plasma chain |
| APP_PORT | Server port | 8080 |
| CHAIN_DB | Level db location | `./db` |
| CHAIN_BLOCK_PERIOD | Plasma chain block period. After every block period, new plasma block will be created, if necessary. | 6 |
| CHAIN_WEB3_PROVIDER | Web3 http provider URL | `http://localhost:8545` |
| CHAIN_ROOT_CONTRACT | Contract address for root contract | `0xb4ee...a6a` |
| CHAIN_AUTHORITY_ADDRESS | Authority address for PoA | `0x9fB2...791` |
| CHAIN_AUTHORITY_PRIVATE_KEY | Authority's private key for PoA | `0x9b28...5d3` |
| NETWORK_EXTERNAL_HOST | Network's external host (for sync) | `0.0.0.0` |
| NETWORK_PORT | Network's port (for sync) | `8081` |
| NETWORK_PEERS | Pre-defined peers (for sync) | |