Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency on Tendermint Core #168

Merged
merged 14 commits into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
- uses: golangci/golangci-lint-action@v3.3.1
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.49.0
version: v1.50.1
args: --timeout 10m
github-token: ${{ secrets.github_token }}
4 changes: 1 addition & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version: "1.18"
- run: make build
- run: |
go test ./... -mod=readonly -timeout 8m -race -coverprofile=coverage.txt -covermode=atomic
- run: make integration-test
- uses: codecov/codecov-action@v3.1.1
with:
file: ./coverage.txt
37 changes: 36 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GOPATH ?= $(shell go env GOPATH)
BUILD_DIR ?= ./build
BUILD_DIR ?= $(CURDIR)/build
.DEFAULT_GOAL := build
BUILD_FLAGS ?= -mod=readonly

Expand Down Expand Up @@ -31,6 +31,41 @@ test:
go test -cover -race ./...
.PHONY: test

# Builds a Docker image called "tendermint/localnode", which is based on
# Tendermint Core. Takes the current system user and group ID as the user/group
# IDs for the tmuser user within the container so as to eliminate permissions
# issues when generating testnet files in the localnet target.
localnode:
@docker build -f ./test/localnode/Dockerfile \
--build-arg UID=$(shell id -u) \
--build-arg GID=$(shell id -g) \
-t tendermint/localnode:latest \
./test/localnode/
.PHONY: localnode

localnet: localnode
@if ! [ -f build/node0/config/genesis.json ]; then \
mkdir -p build && \
docker run \
--rm \
-v $(BUILD_DIR):/tendermint:Z \
tendermint/localnode \
testnet --config /etc/tendermint/config-template.toml --o . --starting-ip-address 192.168.10.2; \
fi
.PHONY: localnet

localnet-start: localnet
@docker-compose -f ./test/docker-compose.yml up -d
.PHONY: localnet-start

localnet-stop:
@docker-compose -f ./test/docker-compose.yml down
.PHONY: localnet-stop

integration-test:
@./test/integration-test.sh
.PHONY: integration-test

bench:
go test -bench="Benchmark" -run="notests" ./...
.PHONY: bench
Expand Down
44 changes: 2 additions & 42 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,63 +8,23 @@ require (
github.com/satori/go.uuid v1.2.0
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.6.1
github.com/tendermint/tendermint v0.34.24
golang.org/x/crypto v0.5.0
)

require (
github.com/DataDog/zstd v1.4.1 // indirect
github.com/Workiva/go-datastructures v1.0.53 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/btcsuite/btcd v0.22.1 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/creachadair/taskgroup v0.3.2 // indirect
github.com/dgraph-io/badger/v2 v2.2007.2 // indirect
github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de // indirect
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c // indirect
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 // indirect
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/btree v1.0.0 // indirect
github.com/google/orderedcode v0.0.1 // indirect
github.com/gtank/merlin v0.1.1 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/lib/pq v1.10.6 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect
github.com/minio/highwayhash v1.0.2 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/onsi/gomega v1.20.0 // indirect
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rs/cors v1.8.2 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect
github.com/tendermint/tm-db v0.6.6 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
golang.org/x/net v0.5.0 // indirect
github.com/stretchr/testify v1.8.0 // indirect
golang.org/x/sys v0.4.0 // indirect
golang.org/x/text v0.6.0 // indirect
google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a // indirect
google.golang.org/grpc v1.50.1 // indirect
google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 // indirect
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect
)

replace github.com/tendermint/tendermint => github.com/informalsystems/tendermint v0.34.24
Loading