Skip to content

Commit

Permalink
merge develop to master (#176)
Browse files Browse the repository at this point in the history
* update discord server link, remove public slack link (#93)

* added default validator pubkey (#92)

* added default validator pubkey

* empty fee address

* added print statement to add fee address

* Colin/docs (#95)

* added docs for using sidechain

* fix syntax

* Colin/plasma config (#97)

* added docs for using sidechain

* fix syntax

* added plasma config file, priv key now in child chain struct

* added validator bool and test for setting options

* added rootchain address, removed gas limit, tests reflected

* UTXO Refactor (#96)

* change deleting utxo to invalidating

* colin's comments

* Eth module (#103)

* starter

* testing client with ganache

* Squashed 'contracts/' content from commit ab4fd0e

git-subtree-dir: contracts
git-subtree-split: ab4fd0e

* contract wrappers and bindings

* subscribed to deposits/exists. Some tests

* added wrappers to the contracts folder

* Squashed 'contracts/' changes from ab4fd0e..dc28e6a

dc28e6a [Audit Milestone] No rootchain finality checks (#79)
b7ddf5c Simple Merkle Tree (#77)
62a9462 position in the exit struct. removed helpers (#78)

git-subtree-dir: contracts
git-subtree-split: dc28e6a

* added clean to npm script. temp removed wrappers

* Squashed 'contracts/' changes from dc28e6a..4fcc49e

4fcc49e doc typo (#83)
088adc7 [Audit milestone] Fee withdrawal for validators  (#80)
bc1b116 Finalize Revert (#82)

git-subtree-dir: contracts
git-subtree-split: 4fcc49e

* updated wrappers

* Squashed 'contracts/' changes from 4fcc49e..1b58d54

1b58d54 added eth blocknum to the deposit struct (#85)

git-subtree-dir: contracts
git-subtree-split: 1b58d54

* deposits with finality checks

* removed err from HasTxBeenExited

* refactors and added tests. Fixed deposit encoding/decoding

* typo

* changed rlp to json

* gopkg fix, updated travis

travis

travis fix

rearrange travis

avoid timeout

npm install

longer sleep time

cd back

changed back to sleep 5

* Squashed 'contracts/' changes from 1b58d54..7404701

7404701 Hamdi/fee challenge (#87)

git-subtree-dir: contracts
git-subtree-split: 7404701

* subtree mods

* Squashed 'contracts/' changes from 7404701..c2932c6

c2932c6 renamed docs and fixed a typo (#89)
646fcd9 Colin/deposit priority (#90)

git-subtree-dir: contracts
git-subtree-split: c2932c6

* first revision of the eth module

* hastxbeenexited more robust like getdeposit

* travis

* race condition

* addressed feedback

* MOAR PROGRESS

* papusa, merge

gopkg fix

updated config for block finality and eth priv key default directory

* debugging

save progress

* check if parent is exiting

* save confirmations sigs into app state (#102)

* starter

* testing client with ganache

* Squashed 'contracts/' content from commit ab4fd0e

git-subtree-dir: contracts
git-subtree-split: ab4fd0e

* contract wrappers and bindings

* subscribed to deposits/exists. Some tests

* added wrappers to the contracts folder

* Squashed 'contracts/' changes from ab4fd0e..dc28e6a

dc28e6a [Audit Milestone] No rootchain finality checks (#79)
b7ddf5c Simple Merkle Tree (#77)
62a9462 position in the exit struct. removed helpers (#78)

git-subtree-dir: contracts
git-subtree-split: dc28e6a

* MOAR PROGRESS

* papusa

* gopkg fix

* added clean to npm script. temp removed wrappers

* Squashed 'contracts/' changes from dc28e6a..4fcc49e

4fcc49e doc typo (#83)
088adc7 [Audit milestone] Fee withdrawal for validators  (#80)
bc1b116 Finalize Revert (#82)

git-subtree-dir: contracts
git-subtree-split: 4fcc49e

* updated wrappers

* updated config for block finality and eth priv key default directory

* Squashed 'contracts/' changes from 4fcc49e..1b58d54

1b58d54 added eth blocknum to the deposit struct (#85)

git-subtree-dir: contracts
git-subtree-split: 1b58d54

* deposits with finality checks

* merge conflicts

* removed err from HasTxBeenExited

* refactors and added tests. Fixed deposit encoding/decoding

* typo

* debugging

* changed rlp to json

* save progress

* save confirmations sigs into app state

* added check for fee amount

* added confirmation signatures to prove command

* ante

* adjusted names, load latest version

* remove prints

* merge conflicts

* merge conflicts for contracts

* more merge conflicts

* conflict

* undo merges that didnt delete

* last of conflicts

* fixed build and test issues

* refactored app tests, works around genesis deposit issue

* add simulation test

added exiting test

reflected github comments

* fixed input.ammount bug

* develop2 [major refactor] (#105)

* consolidated plasma types

* txIndex and oIndex do not need to be big ints

* implement spendmsg. redo utils

* abstracted positions

* Signatures encapsulated within inputs. Position can be serialized to bytes. More functions

* no pointers within tx struct. deposit serialization

* priority calculation for position

* tests for position

* eth module uses plasma types

* spendMsg implements sdk.Tx interface

* refactor of the ante handler complete

* implement stores. spend message handler

* a valid spendMsg should not allow the second output to get burned

* removed x/ and types/

* remove auth folder

* update cosmos-sdk dep and codspacetypes to strings

* output serialization and test

* store uses rlp

* spendMsg validation checks for the precense of confirm signatures

* handlers with first set of tests. abstracted position from input struct

* refactored app.go into root dir

* save ethConnection in app struct

* consistent naming

* submit block during endBlocker

* refactored plasmad into server

* app within plasmad and updated dependenceis

* eth module does not persist any information and queries geth node instead

* nop logger for tests

* utxo helpers and deposits are store in app state during ante

* plasmad refactor

* plasmacli refactor underway

* eth module supports non operators

* swapped in amino codec

* only submit blocks if the operator

* confirmsig key creation

* rlp decoding form spendmsg. Position string conversion

* client refactor

* remove binary and update toml

* added crypto libs to Gopkg, keystore and error code fixes

* plasma config options

* check grandparents in antehandler

* extracted validation into the plasma module

* rest of the application reflects validation changes

* fee inputs should not post confirm signatures

* signature validation does not occur in ValidateBasic

* handlers updated to reflect change

* GetSigners() bug, comment for fauxMerkleMode

* utxo serialization test

* removing subtree

* Squashed 'contracts/' content from commit 2922c20

git-subtree-dir: contracts
git-subtree-split: 2922c20

* updated contract wrappers

* naming, updated tests

* fixed bug. tests pass

* i lied. updated truffle in travis

* keystore import directly from the command line

* spendMsg does not need to implement the rlp interface

* progess. plasma config hardcoded for now

* fixed keystore

* progress

* progress

* dependency

* rest routes

* lastest block rest call

* dependecies

* removed rest module

* removed binaries and print statements

* fee bug. state update should not occur in ante

* build error

* fixed handler tests

* fixed plasma toml

* binaries in gitignore

* fixed syncing issues (#106)

* fixed syncing issues

* elaborated on a comment

* Colin/docs (#109)

* Update README

* cleanup

* fix wording

* R4R: Colin/templates (#115)

* add changelog, templates

* update changelog

* Keys Package (#108)

* refactored keys cmd, made query dir

* fixed directory flag issue, add delete list updated

* completed keys command

* adjusted other commands to use keyname

* changes discussed on discord

* build fix

* forgot to adjust account.go

* rm print, 0x modifier

* changed from rlp to []byte

* redundant string casting

* connect query cmd

* code clean, new format

* update changelog

* R4R: added confirm sig client storage (#116)

* added confirm sig client storage

* added test

* Wip adding tests

* upgrade to v0.32.0 sdk

* added tests

* updated dep

* fix dep issues, upgraded to 0.32.0 sdk

* updated deps

* replace deprecated functions

* deprecate exportState

* rm space between import

* update changelog

* Fixed Length TxBytes (#118)

* txBytes length fixed

* decode sigs to nil if zero bytes

* fix decode equal values issue

* fixed 811 txBytes issue

* update changelog

* Update changelog

* add space

* plasmacli eth connection (#110)

* refactored keys cmd, made query dir

* fixed directory flag issue, add delete list updated

* completed keys command

* adjusted other commands to use keyname

* changes discussed on discord

* build fix

* forgot to adjust account.go

* rm print, 0x modifier

* changed from rlp to []byte

* redundant string casting

* connect query cmd

* added eth command, and deposit subcommand

* query cmd for deposits

* added several eth cmds

* code clean up, various bug fixes

* getExit bug

* err/code clean up, gas limit

* syntax fix

* some exit fixes, still needs work

* added finalize/withdraw cmds

* fix error

* Add fee exit, deposit flag

* build fix

* rm contracts

* Squashed 'contracts/' content from commit 2a41203

git-subtree-dir: contracts
git-subtree-split: 2a41203

* update getExits use queue length

* add challenge cmd

* rm import space

* add support for querying by position

* docs, code cleanup

* some feedback changes

* add time format

* added time pending

* updated deposit cmds

* fix errors

* fix exit bugs

* Add support for confirm sig retrieval

* rm non 0 proof size

* update gas for challenge

* IncludeDepositMsg: Explicit deposit inclusion (#120)

* refactored keys cmd, made query dir

* fixed directory flag issue, add delete list updated

* completed keys command

* adjusted other commands to use keyname

* changes discussed on discord

* build fix

* forgot to adjust account.go

* rm print, 0x modifier

* changed from rlp to []byte

* redundant string casting

* connect query cmd

* added eth command, and deposit subcommand

* query cmd for deposits

* added several eth cmds

* code clean up, various bug fixes

* getExit bug

* err/code clean up, gas limit

* syntax fix

* added IncludeDepositMsg to explicitly add deposits into sidechain after they are finalized

* fixed bug in GetDeposit, added basic cli command, and fmt

* Fix bug in threshold calculation

* fix merge errors

* fix txDecoder

* address PR comments

* further comments

* fmt

* retrieve flag with correct value

* Changelog

* fixed issues from manual testing

* Colin/scripts (#126)

* added install script, set defaults

* Update plasma_install.sh

* Update plasma_install.sh

* Update plasma_install.sh

* updated changelog

* Colin/readme (#125)

* update readme

* small changes

* shorten quick start

* update readme

* update readme

* address pr comments

* Update README.md

* update permissions (#131)

* Colin/client (#129)

* init refactor of sign and spend

* updated sign cmd, spend finds inputs to spend

* fix merge issues

* fix test, reorg spend

* various bug fixes in sign/spend

* updated sigs test

* small bug fixes

* spend checks for exitted tx, updated changelog

* updated eth main file

* updated sign

* small fixes

* check pass twice in update

* ante handler fix

* various fixes

* update prove

* reverse from and to

* Colin/docs (#136)

* init work on updating docs

* updated docs up to deposits

* updated exiting and challenging without fees

* current work

* updated docs

* add finalizing example

* updated docs, fix trust-node issue - Set overrides cmd line flag

* Switch to go modules, add Makefile (#141)

* Switch to go modules, add Makefile

* Update Changelog

* fixed dependency issue, updated docs removing dep

* update phony

* Sync check on startup (#142)

* InitEthConn fails if the endpoint is not synced. Refactored errors

* update dependencies

* Colin/exit pos (#144)

* get position from exit calculation

* add print statement

* move calc to position file

* deposit position fixed

* added test

* Fix Syncing Issue (#147)

* continue

* fix sync bug by pegging ETH blocks to TM blocks

* remove unnecessary smart contract field

* fmt

* minor fixes

* address PR comments and add tests

* fmt

* typo fix

* Fix Include-Deposit Issue (#154)

* fix include deposit issue by verifying msg.Owner == deposit.Owner

* add in var

* Fix Changelog

* [WIP] Queriers & Rest Server (#155)

* kvstore is a private member

* query routes for utxo

* message when no utxos are available

* block querier. store utxo already satisfies rlp interface

* file rename. remove resp objects

* wip rest server

* revert spend to original functionality

* query metadata about 10 blocks

* blocks query commond and likewise rest interface

* SubmitBlock test no longer applicable

* abstracted query to its own submodule

* changes to the cli

* async capability when submitting tx

* async tx submission support

* remove shelljs dep (#156)

* Hamdi/[Docker+refactor] (#138)

* fix 404 link

* added testing flag to the the init command

* almost done with the dockerfile

* no need for a mutex in eth.Plasma,double pasted private key in the default settings

* progress

* plasmacli/plasmad dockerfiles seperated

* move docker file back to root directory

* remove dep

* client/server under cmd/

* refactor eth module so it can be used in plasmacli

* removed circular dependency. HasTxExited returns an error. removed func init() from cli. refactors

* updated makefile. prove cmd now under eth

* go.mod tidy

* dockerfile

* removed binaries from git

* Dockerfile

* explicit client context creation

* better error mesasge if operator address is wrong

* better naming

* extract contract connection from the cli cmds

* trust-node to false. small cmd refactors

* custom rest flags. remove init function in include

* remove init functions from base commands

* chain-id as a persistent flag

* removed remaining init functions

* fixed test files

* moved app to the top level

* renamed inner cmd -> subcmd

* revert readme changes

* mixExitBond a constant. challenge cmd should bing flags on prerun

* flags should be bound for balance.go

* finalize should not bind flags until RunE

* misspelled minexitbond

* move tx related cmds to their own folder

* sdk errors are not needed in the cli

* missing returns in rest cmd & typos

* refactor keystore error messages

* allow the account to be an address. uniform errors

* account/address

* tm flags only if required. some eth cmds make use of a --use-node flag

* bug fix in cmd. exits usage string

* Hamdi/config (#157)

* config changes for plasmacli

* persistent flag does not need to be var

* plasmad config

* sigs build err

* extra comments. Flags directory to reduce tendermint imports until the sdk version is updated

* remove flag definition in main

* removed flag changed check

* build error

* R4R: Colin/store (#153)

* kvstore is a private member

* query routes for utxo

* message when no utxos are available

* change to deposit, block, and tx store

* block querier. store utxo already satisfies rlp interface

* adjusting inputs outputs to be variable, updated app

* file rename. remove resp objects

* refactored plasma/, updated tests

* updated msgs/

* refactored handlers/ still need to update tests

* Fix build errors and test issue in store/

* added tests for deposit and block stores

* added tests to store, failing on deep equal

* wip rest server

* revert spend to original functionality

* store test bug fix

* added account, updated querier

* commit current work, prep to merge deposit/tx stores

* updated output store

* deleted depositStore, fixed bugs in outputStore

* refactored handlers/ tests

* added fee support to store/ with tests

* in progress work being committed for review

* query metadata about 10 blocks

* blocks query commond and likewise rest interface

* SubmitBlock test no longer applicable

* reflect some pr comments

* update client query, handler err fixes

* some more refactor on cli

* change account to wallet

* consolidate verifyandsign func

* improves output store and prove

* finish prove and fmt

* revert mistake

* some refactors on comments and pr comments

* updated store querying

* fix various build/merge issue

* cli fixes

* rm todos

* store fee

* validateBasic change

* fix bugs

* Apply suggestions from code review: Doc fixes

* address some pr comments

* build fix

* reflect my own pr comments

* error update

* changelog and updated err in ante

* update changelog

* Hamdi/store (#165)

* ctx as a first param in getProof

* store block type doesnt need to implement the RLP interface

* constant store names

* removed string literal for store names

* remove hardcoded strings

* rename to utxo file to output

* remove utxo file and hardcoded strings within block querier

* output store name changed to data

* naming

* Hamdi/datastore (#170)

* merge the blockstore into the data store. add corresponding keys and lowercase filename

* merged into one datastore. fixed tests

* re-add NextPlasmaBlockHeight into store api

* handlers reflect the changes of the store

* single querier file under the /data/... route

* add the height into the block struct. app reflect changes

* remove hardcoded store name

* fixed errors in the cli

* fixed build errors in test

* datastore arg after context. parseHeight bug and ErrDNE for nonexistent plasma blcok

* Update store/querier.go

* Update godoc (#173)

* update msgs, handlers, and plasmacli docs

* update store godoc

* update more godoc

* add godoc package description

* fix store build issues

* Update handlers/errors.go

Co-Authored-By: Aditya <[email protected]>

* address pr comments

* reflect pr review

* WIP updated readme (#177)

* updated readme

* reword readme

* remove new line

* update readme

* Hamdi/client (#171)

* extract client call and rest routes into a client module

* start tx and info handler

* utils removeHashPrefix also ensures an even length

* statusnotfound instead of statusbadrequest for StoreDNE errors

* tx retrieval and code reuse

* enforce byte length on hashes. consist return styles

* undo strictness

* fix utils

* client Tx query accepts bytes and not a hex string

* fix formatter

* output handler. plasma.Position doesnt need extra internal struct

* easier reasoning

* syntax

* import rename

* build errors

* unneeded string formatting

* restserver needs the tm flags

* added height handler

* first cmd changes

* godoc

* missed the tx cmd
  • Loading branch information
colin-axner authored Dec 11, 2019
1 parent a4da513 commit 536e4ac
Show file tree
Hide file tree
Showing 194 changed files with 15,429 additions and 5,414 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.DS_Store
.gitignore
vendor/
contracts/abi
contracts/node_modules
cmd/plasmad/plasmad
cmd/plasmacli/plasmacli
8 changes: 3 additions & 5 deletions CONTRIBUTING.md → .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,20 @@

Thank you for considering making contributions to Fourth State's Plasma MVP implementation! We welcome contributions from anyone! See the [open issues](https://github.com/FourthState/plasma-mvp-sidechain/issues) for things we need help with!

Contribute to design discussions and conversation by joining the #plasma-dev channel on Blockchain @ Berkeley's [public slack](https://www.berkeleyblockchain.slack.com/).
Contribute to design discussions and conversation by joining our [Discord Server](https://discord.gg/YTB5A4P)

## Prerequisites
* [Golang](https://golang.org/doc/install)

* [dep](https://github.com/golang/dep)

## How to get started:

Add this repository into your $GOPATH/src/github.com/FourthState directory:

`go get "github.com/FourthState/plasma-mvp-sidechain"`

To get dependencies:
Testing:

`dep ensure`
`make test`

### Forking

Expand Down
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Bug Report
about: Create a report to help us squash bugs!

---

<!-- If you are asking a question rather than filing a bug, try asking on our discord server!
- https://discord.gg/YTB5A4P
-->

## Summary of bug
<!-- Concisely describe the issue -->

## Expected behavior
<!-- Example: No error is thrown-->

## Actual behavior
<!-- Example: Error is thrown
Display backtrace or error if possible -->

## Steps to reproduce
<!-- What commands in order should someone run to reproduce your problem -->

## Versions/External Software
<!-- What version/branch are you on?
Are you using other software? (geth, ganache, metamask, etc.) -->
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Feature Request
about: Create a proposal to request a feature or protocol upgrade

---

<!-- If you are asking a question rather than requesting a feature, try asking on our discord server!
- https://discord.gg/YTB5A4P
-->

## Summary
<!-- Short, concise description of the proposed feature -->

## Problem
<!-- Why do we need this feature?
How will our plasma-mvp implementation be improved by this feature?
What security issues arise by introducing this feature?
Are there any disadvantages of including this feature? -->

## Proposal
<!-- Detailed description of requirements of implementation -->
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
vendor/
.DS_Store
vendor/
contracts/abi
contracts/node_modules
cmd/plasmad/plasmad
cmd/plasmacli/plasmacli
24 changes: 12 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
language: go

go:
- 1.10.x

env:
- DEP_VERSION="0.4.1"

before_install:
# Download the binary to bin folder in $GOPATH
- curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep
# Make the binary executable
- chmod +x $GOPATH/bin/dep
- 1.11.x

install:
- dep ensure -vendor-only
- make install

before_script:
- npm install -g [email protected] [email protected]

script:
- go test -race -coverprofile=coverage.txt -covermode=atomic -v ./...
- ganache-cli -m=plasma > /dev/null &
- sleep 5
- cd contracts/
- npm install
- truffle migrate
- cd ../
- make test

after_success:
- bash <(curl -s https://codecov.io/bash)
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Changelog
All notable changes to this project will be documented in this file.

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- [\#141](https://github.com/FourthState/plasma-mvp-sidechain/pull/141) Added Makefile
- [\#126](https://github.com/FourthState/plasma-mvp-sidechain/pull/126) Added installation script
- **plasmacli:** [\#110](https://github.com/FourthState/plasma-mvp-sidechain/pull/110) Added eth subcommand for rootchain interaction
- **plasmacli:** [\#110](https://github.com/FourthState/plasma-mvp-sidechain/pull/110) Added plasma.toml in .plasmacli/ for rootchain connection configuration
- **plasmacli:** [\#108](https://github.com/FourthState/plasma-mvp-sidechain/pull/108) Added keys subcommand with account mapping
- **plasmacli:** [\#116](https://github.com/FourthState/plasma-mvp-sidechain/pull/116) Added local confirmation signature storage
- **plasmacli:** [\#120](https://github.com/FourthState/plasma-mvp-sidechain/pull/120) Added `include-deposit` command to add deposit nonce into sidechain
- Ethereum connection to smart contract
- Implemented Fees
- Unit tests
- Multinode network
- Query sidechain state
- Plasma configuration file
- Added IncludeDepositMsg with handling to allow explicit deposit inclusion into sidechain
### Changed
- [\#153](https://github.com/FourthState/plasma-mvp-sidechain/pull/153) Major refactor of store/, [Store architecture details](https://github.com/FourthState/plasma-mvp-sidechain/tree/develop/docs/architecure/store.md). REST Supported.
- [\#141](https://github.com/FourthState/plasma-mvp-sidechain/pull/141) Dependency management is now handled by go modules instead of Dep
- [\#129](https://github.com/FourthState/plasma-mvp-sidechain/pull/129) Updated sign command to iterate over an account to finalize transactions
- [\#129](https://github.com/FourthState/plasma-mvp-sidechain/pull/129) Updated spend to auto generate transaction for users based on the utxos they own
- [\#120](https://github.com/FourthState/plasma-mvp-sidechain/pull/118) Fixed Length TxBytes (811), compatible with rootchain v1.0.0
- **plasmacli:** [\#108](https://github.com/FourthState/plasma-mvp-sidechain/pull/108) home flag renamed to directory, flags have suffix "F" for local flags, and "Flag" for persistent flags
- **plasmacli:** [\#116](https://github.com/FourthState/plasma-mvp-sidechain/pull/116) client keystore/ renamed to store/
- Made UTXO model modular
- Transaction verification to be compatible with rootchain
- Decrease dependency on amino encoding
- Updated client
- Updated documentation
- Upgrade to v0.32.0 of Cosmos SDK, v0.28.0 of TM
### Fixed
- [\#147](https://github.com/FourthState/plasma-mvp-sidechain/pull/147) Fix Syncing bug where syncing nodes would panic after processing exitted inputs/deposits. Bug is explained in detail here: [\#143](https://github.com/FourthState/plasma-mvp-sidechain/issues/143)
- [\#154](https://github.com/FourthState/plasma-mvp-sidechain/pull/154) Fixes issue where include-Deposit msg.Owner == deposit.Owner not enforced. This is necessary to prevent malicious users from rewriting an already included UTXO in store.
### Deprecated
- Dep is no longer supported

## PreHistory

#### v0.2.0 - July 14th, 2018
- Functional client. Can initialize with genesis UTXOs, start Tendermint daemon, and spend UTXOs using CLI.
- More extensive app tests
- Upgrade to SDK v0.21.0
- Can now retrieve all UTXOs owned by an address.

#### v0.1.1 [HOTFIX] - July 8th, 2018
- Fix double spend bug when same position is spent twice in single tx
- Added documentation

#### v0.1.0 - June 11th, 2018
- Contains base layer of the blockchain.
- Only capable of validating transactions and updating state.


35 changes: 35 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Simple usage with a mounted data directory:
# > docker build -t plasma .
#
# It is important to link the right volume to the container. The volume contains configuration files used to launch the server dameon
#
# plasmad
# > docker run -it -p 26657:26657 -p 26656:26656 -v ~/.plasmad:/root/.plasmad
FROM golang:1.12-alpine3.9 AS builder

RUN apk add git make npm curl gcc libc-dev && \
mkdir -p /root/plasma-mvp-sidechain

# install dependencies
WORKDIR /root/plasma-mvp-sidechain
COPY go.mod go.sum ./
RUN go mod download

COPY . .

# install plasmad and plasmacli
RUN go install -mod=readonly ./cmd/plasmad ./cmd/plasmacli

### Final image
FROM alpine:edge

# Install ca-certificates
RUN apk add --update ca-certificates
WORKDIR /root

# Copy over the plasmad and plasmacli binaries from the build-env
COPY --from=builder /go/bin/plasmad /usr/bin/plasmad
COPY --from=builder /go/bin/plasmacli /usr/bin/plasmacli

# As an executable, the dameon will simply start
CMD ["plasmad", "start"]
Loading

0 comments on commit 536e4ac

Please sign in to comment.