Skip to content

Commit

Permalink
Upgrade3 genesis and Dockerfile. (lino-network#409)
Browse files Browse the repository at this point in the history
* add docker file

* reset first to clean up genesis cache

* no longer use patches

* update ubuntu bootstrap script go version

* upgrade go version

* update genesis

* typo
  • Loading branch information
Stumble authored Oct 9, 2019
1 parent 1171ace commit 11abf3c
Show file tree
Hide file tree
Showing 19 changed files with 48 additions and 736 deletions.
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM golang:1.12

RUN apt-get update && \
apt-get install -y make tar sudo wget curl

RUN mkdir -p src/github.com/lino-network/lino
WORKDIR src/github.com/lino-network/lino

COPY . .
RUN make get_tools
RUN make install

RUN lino init
COPY genesis/upgrade3/config.toml /root/.lino/config/config.toml
COPY genesis/upgrade3/genesis.json /root/.lino/config/genesis.json
RUN cd /root/.lino && wget https://lino-blockchain-opendata.s3.amazonaws.com/prd/prevstates.tar.gz
RUN cd /root/.lino && tar -xf prevstates.tar.gz

# prometheus if enabled
EXPOSE 26660
# p2p
EXPOSE 26656
# tendermint rpc
EXPOSE 26657
# abci app
EXPOSE 26658

CMD ["lino", "unsafe-reset-all"]
CMD ["lino", "start"]
20 changes: 16 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
NAME=lino
GOPATH ?= $(shell $(GO) env GOPATH)
COMMIT := $(shell git --no-pager describe --tags --always --dirty)
PACKAGES=$(shell go list ./... | grep -v '/vendor/')
Expand All @@ -11,10 +12,6 @@ all: get_tools install build test
get_tools:
cd scripts && ./install_cleveldb.sh

# apply_patch:
# (cd vendor/github.com/tendermint/tendermint && patch -p1 -t < ../../../../patches/fullnode/tendermint-cached-txindexer.patch); exit 0
# (cd vendor/github.com/cosmos/cosmos-sdk && patch -p1 -t < ../../../../patches/fixes/cosmos-cleveldb-close-batch.patch); exit 0

update_mocks:
GO111MODULE=$(GO111MODULE) go generate ./...

Expand Down Expand Up @@ -44,6 +41,21 @@ test:
benchmark:
@go test -bench=. $(PACKAGES)

docker-build:
docker build -t $(NAME) .

docker-build-nc:
docker build --no-cache -t $(NAME) .

docker-run:
docker run --name=$(NAME) -it $(NAME)

docker-up: docker-build docker-run

docker-clean:
docker stop $(NAME)
docker rm $(NAME)

# lint
GOLANGCI_LINT_VERSION := v1.17.1
GOLANGCI_LINT_HASHSUM := f5fa647a12f658924d9f7d6b9628d505ab118e8e049e43272de6526053ebe08d
Expand Down
12 changes: 0 additions & 12 deletions docker-compose.yml

This file was deleted.

28 changes: 0 additions & 28 deletions docker/Dockerfile_lino

This file was deleted.

21 changes: 0 additions & 21 deletions docker/Dockerfile_linocli

This file was deleted.

18 changes: 0 additions & 18 deletions docker/cli_test.sh

This file was deleted.

68 changes: 0 additions & 68 deletions docker/genesis.json

This file was deleted.

14 changes: 0 additions & 14 deletions docker/priv_validator.json

This file was deleted.

3 changes: 1 addition & 2 deletions genesis/upgrade3/genesis.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// TODO: add genesis time
{
"genesis_time": "TODO",
"genesis_time": "2019-10-09T21:12:31.003806668Z",
"chain_id": "lino-testnet-upgrade3",
"consensus_params": {
"block": {
Expand Down
12 changes: 0 additions & 12 deletions patches/fixes/cosmos-cleveldb-close-batch.patch

This file was deleted.

12 changes: 0 additions & 12 deletions patches/fixes/iavl-cleveldb-close-batch.patch

This file was deleted.

Loading

0 comments on commit 11abf3c

Please sign in to comment.