Skip to content
This repository was archived by the owner on Jun 12, 2024. It is now read-only.

Commit 11abf3c

Browse files
authored
Upgrade3 genesis and Dockerfile. (#409)
* 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
1 parent 1171ace commit 11abf3c

19 files changed

+48
-736
lines changed

Dockerfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
FROM golang:1.12
2+
3+
RUN apt-get update && \
4+
apt-get install -y make tar sudo wget curl
5+
6+
RUN mkdir -p src/github.com/lino-network/lino
7+
WORKDIR src/github.com/lino-network/lino
8+
9+
COPY . .
10+
RUN make get_tools
11+
RUN make install
12+
13+
RUN lino init
14+
COPY genesis/upgrade3/config.toml /root/.lino/config/config.toml
15+
COPY genesis/upgrade3/genesis.json /root/.lino/config/genesis.json
16+
RUN cd /root/.lino && wget https://lino-blockchain-opendata.s3.amazonaws.com/prd/prevstates.tar.gz
17+
RUN cd /root/.lino && tar -xf prevstates.tar.gz
18+
19+
# prometheus if enabled
20+
EXPOSE 26660
21+
# p2p
22+
EXPOSE 26656
23+
# tendermint rpc
24+
EXPOSE 26657
25+
# abci app
26+
EXPOSE 26658
27+
28+
CMD ["lino", "unsafe-reset-all"]
29+
CMD ["lino", "start"]

Makefile

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
NAME=lino
12
GOPATH ?= $(shell $(GO) env GOPATH)
23
COMMIT := $(shell git --no-pager describe --tags --always --dirty)
34
PACKAGES=$(shell go list ./... | grep -v '/vendor/')
@@ -11,10 +12,6 @@ all: get_tools install build test
1112
get_tools:
1213
cd scripts && ./install_cleveldb.sh
1314

14-
# apply_patch:
15-
# (cd vendor/github.com/tendermint/tendermint && patch -p1 -t < ../../../../patches/fullnode/tendermint-cached-txindexer.patch); exit 0
16-
# (cd vendor/github.com/cosmos/cosmos-sdk && patch -p1 -t < ../../../../patches/fixes/cosmos-cleveldb-close-batch.patch); exit 0
17-
1815
update_mocks:
1916
GO111MODULE=$(GO111MODULE) go generate ./...
2017

@@ -44,6 +41,21 @@ test:
4441
benchmark:
4542
@go test -bench=. $(PACKAGES)
4643

44+
docker-build:
45+
docker build -t $(NAME) .
46+
47+
docker-build-nc:
48+
docker build --no-cache -t $(NAME) .
49+
50+
docker-run:
51+
docker run --name=$(NAME) -it $(NAME)
52+
53+
docker-up: docker-build docker-run
54+
55+
docker-clean:
56+
docker stop $(NAME)
57+
docker rm $(NAME)
58+
4759
# lint
4860
GOLANGCI_LINT_VERSION := v1.17.1
4961
GOLANGCI_LINT_HASHSUM := f5fa647a12f658924d9f7d6b9628d505ab118e8e049e43272de6526053ebe08d

docker-compose.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

docker/Dockerfile_lino

Lines changed: 0 additions & 28 deletions
This file was deleted.

docker/Dockerfile_linocli

Lines changed: 0 additions & 21 deletions
This file was deleted.

docker/cli_test.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

docker/genesis.json

Lines changed: 0 additions & 68 deletions
This file was deleted.

docker/priv_validator.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

genesis/upgrade3/genesis.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
// TODO: add genesis time
21
{
3-
"genesis_time": "TODO",
2+
"genesis_time": "2019-10-09T21:12:31.003806668Z",
43
"chain_id": "lino-testnet-upgrade3",
54
"consensus_params": {
65
"block": {

patches/fixes/cosmos-cleveldb-close-batch.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.

patches/fixes/iavl-cleveldb-close-batch.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)