From 9404ba8462c5b189bc5f19cec1b5c4fe9680398f Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 11:47:14 +0100 Subject: [PATCH 01/35] replace tmdb with comedb in 0.34 --- .github/workflows/check-generated.yml | 7 +++- .github/workflows/e2e-manual.yml | 9 +++++ .github/workflows/e2e-nightly-34x.yml | 9 +++++ .github/workflows/e2e-nightly-master.yml | 9 +++++ .github/workflows/e2e.yml | 10 +++++ .github/workflows/govulncheck.yml | 5 +++ .github/workflows/lint.yml | 5 +++ .github/workflows/testapp-docker.yml | 5 +++ .github/workflows/tests.yml | 1 + DOCKER/Dockerfile | 9 +++++ DOCKER/build.sh | 6 ++- abci/example/kvstore/kvstore.go | 2 +- abci/example/kvstore/persistent_kvstore.go | 2 +- blockchain/v0/reactor_test.go | 2 +- blockchain/v1/reactor_test.go | 2 +- blockchain/v2/reactor_test.go | 2 +- cmd/tendermint/commands/light.go | 2 +- cmd/tendermint/commands/reindex_event.go | 2 +- cmd/tendermint/commands/reindex_event_test.go | 2 +- cmd/tendermint/commands/rollback.go | 2 +- consensus/byzantine_test.go | 2 +- consensus/common_test.go | 2 +- consensus/mempool_test.go | 2 +- consensus/reactor_test.go | 2 +- consensus/replay_file.go | 2 +- consensus/replay_test.go | 2 +- consensus/wal_generator.go | 2 +- evidence/pool.go | 2 +- evidence/pool_test.go | 2 +- evidence/reactor_test.go | 2 +- evidence/verify_test.go | 2 +- go.mod | 15 ++++---- go.sum | 37 ++++++++++--------- light/client_benchmark_test.go | 2 +- light/client_test.go | 2 +- light/detector_test.go | 2 +- light/example_test.go | 2 +- light/store/db/db.go | 2 +- light/store/db/db_test.go | 2 +- node/node.go | 2 +- node/node_test.go | 2 +- p2p/trust/store.go | 2 +- p2p/trust/store_test.go | 2 +- rpc/core/blocks_test.go | 2 +- state/export_test.go | 2 +- state/helpers_test.go | 2 +- state/indexer/block/kv/kv.go | 2 +- state/indexer/block/kv/kv_test.go | 2 +- state/rollback_test.go | 2 +- state/state_test.go | 2 +- state/store.go | 4 +- state/store_test.go | 2 +- state/tx_filter_test.go | 2 +- state/txindex/indexer_service_test.go | 2 +- state/txindex/kv/kv.go | 2 +- state/txindex/kv/kv_bench_test.go | 2 +- state/txindex/kv/kv_test.go | 2 +- statesync/stateprovider.go | 2 +- store/store.go | 2 +- store/store_test.go | 2 +- test/loadtime/cmd/report/main.go | 2 +- test/maverick/consensus/replay_file.go | 2 +- test/maverick/consensus/wal_generator.go | 2 +- test/maverick/node/node.go | 2 +- 64 files changed, 151 insertions(+), 80 deletions(-) diff --git a/.github/workflows/check-generated.yml b/.github/workflows/check-generated.yml index 3055ba43c89..d3db95a35c0 100644 --- a/.github/workflows/check-generated.yml +++ b/.github/workflows/check-generated.yml @@ -15,13 +15,18 @@ permissions: jobs: check-mocks: runs-on: ubuntu-latest + # TODO (thane): Remove once we make the cometbft-db repository public + env: + GOPRIVATE: github.com/cometbft/cometbft-db steps: - uses: actions/setup-go@v3 with: go-version: '1.18' - uses: actions/checkout@v3 - + + # TODO (thane): Remove once we make the cometbft-db repository public + - run : git config --global url.https://${{ secrets.GO_MODULES_TOKEN }}@github.com/.insteadOf https://github.com/ - name: "Check generated mocks" run: | set -euo pipefail diff --git a/.github/workflows/e2e-manual.yml b/.github/workflows/e2e-manual.yml index 32ebff31947..7da3dd0b14a 100644 --- a/.github/workflows/e2e-manual.yml +++ b/.github/workflows/e2e-manual.yml @@ -13,6 +13,12 @@ jobs: group: ['00', '01', '02', '03'] runs-on: ubuntu-latest timeout-minutes: 60 + # TODO (thane): Remove once we make the cometbft-db repository public. + env: + GOPRIVATE: github.com/cometbft/cometbft-db + # We supply this as an environment variable in order to pass it + # through to the "docker" Makefile target in ./test/e2e + GO_MODULES_TOKEN: ${{ secrets.GO_MODULES_TOKEN }} steps: - uses: actions/setup-go@v3 with: @@ -20,6 +26,9 @@ jobs: - uses: actions/checkout@v3 + # TODO (thane): Remove once we make the cometbft-db repository public. + - run: git config --global url.https://${{ secrets.GO_MODULES_TOKEN }}@github.com/.insteadOf https://github.com/ + - name: Build working-directory: test/e2e # Run make jobs in parallel, since we can't run steps in parallel. diff --git a/.github/workflows/e2e-nightly-34x.yml b/.github/workflows/e2e-nightly-34x.yml index 4679add4f6e..8310a892285 100644 --- a/.github/workflows/e2e-nightly-34x.yml +++ b/.github/workflows/e2e-nightly-34x.yml @@ -20,6 +20,12 @@ jobs: group: ['00', '01', '02', '03'] runs-on: ubuntu-latest timeout-minutes: 60 + # TODO (thane): Remove once we make the cometbft-db repository public. + env: + GOPRIVATE: github.com/cometbft/cometbft-db + # We have to supply this as an environment variable in order to pass it + # through to the "docker" Makefile target in ./test/e2e + GO_MODULES_TOKEN: ${{ secrets.GO_MODULES_TOKEN }} steps: - uses: actions/setup-go@v3 with: @@ -34,6 +40,9 @@ jobs: # Run make jobs in parallel, since we can't run steps in parallel. run: make -j2 docker generator runner + # TODO(thane): Remove once we make the cometbft-db repository public + - run: git config --global url.https://${{ secrets.GO_MODULES_TOKEN }}@github.com/.insteadOf https://github.com/ + - name: Generate testnets working-directory: test/e2e # When changing -g, also change the matrix groups above diff --git a/.github/workflows/e2e-nightly-master.yml b/.github/workflows/e2e-nightly-master.yml index 3b11de52bae..53a353c3378 100644 --- a/.github/workflows/e2e-nightly-master.yml +++ b/.github/workflows/e2e-nightly-master.yml @@ -19,6 +19,12 @@ jobs: group: ['00', '01', '02', '03'] runs-on: ubuntu-latest timeout-minutes: 60 + # TODO(thane): Remove once we make the cometbft-db repository public. + env: + GOPRIVATE: github.com/cometbft/cometbft-db + # We have to supply this as an environment variable in order to pass it + # through to the "docker" Makefile target in ./test/e2e + GO_MODULES_TOKEN: ${{ secrets.GO_MODULES_TOKEN }} steps: - uses: actions/setup-go@v3 with: @@ -26,6 +32,9 @@ jobs: - uses: actions/checkout@v3 + # TODO(thane): Remove once we make the cometbft-db repository public. + - run: git config --global url.https://${{ secrets.GO_MODULES_TOKEN }}@github.com/.insteadOf https://github.com/ + - name: Build working-directory: test/e2e # Run make jobs in parallel, since we can't run steps in parallel. diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 6c651a7cbb1..98c7b77a070 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -12,6 +12,12 @@ jobs: e2e-test: runs-on: ubuntu-latest timeout-minutes: 15 + # TODO(thane): Remove once we make the cometbft-db repository public. + env: + GOPRIVATE: github.com/cometbft/cometbft-db + # We have to supply this as an environment variable in order to pass it + # through to the "docker" Makefile target in ./test/e2e + GO_MODULES_TOKEN: ${{ secrets.GO_MODULES_TOKEN }} steps: - uses: actions/setup-go@v3 with: @@ -24,6 +30,10 @@ jobs: go.mod go.sum + # TODO(thane): Remove once we make the cometbft-db repository public. + - run: git config --global url.https://${{ secrets.GO_MODULES_TOKEN }}@github.com/.insteadOf https://github.com/ + + - name: Build working-directory: test/e2e # Run two make jobs in parallel, since we can't run steps in parallel. diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml index 84b99593c70..2cd6a9327ba 100644 --- a/.github/workflows/govulncheck.yml +++ b/.github/workflows/govulncheck.yml @@ -14,6 +14,9 @@ on: jobs: govulncheck: runs-on: ubuntu-latest + # TODO(thane): Remove once we make the cometbft-db repository public. + env: + GOPRIVATE: github.com/cometbft/cometbft-db steps: - uses: actions/setup-go@v3 with: @@ -26,6 +29,8 @@ jobs: go.mod go.sum Makefile + # TODO(thane): Remove once we make the cometbft-db repository public. + - run: git config --global url.https://${{ secrets.GO_MODULES_TOKEN }}@github.com/.insteadOf https://github.com/ - name: govulncheck run: make vulncheck if: "env.GIT_DIFF != ''" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index be50a39fad1..6c4b578ee4d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,6 +12,9 @@ jobs: name: golangci-lint runs-on: ubuntu-latest timeout-minutes: 8 + # TODO(thane): Remove once we make the cometbft-db repository public. + env: + GOPRIVATE: github.com/cometbft/cometbft-db steps: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 @@ -23,6 +26,8 @@ jobs: **/**.go go.mod go.sum + # TODO(thane): Remove once we make the cometbft-db repository public. + - run: git config --global url.https://${{ secrets.GO_MODULES_TOKEN }}@github.com/.insteadOf https://github.com/ - uses: golangci/golangci-lint-action@v3 with: # Required: the version of golangci-lint is required and diff --git a/.github/workflows/testapp-docker.yml b/.github/workflows/testapp-docker.yml index 885e982582f..a38495b6391 100644 --- a/.github/workflows/testapp-docker.yml +++ b/.github/workflows/testapp-docker.yml @@ -10,6 +10,8 @@ on: - "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+" # e.g. v0.37.0-alpha.1, v0.38.0-alpha.10 - "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+" # e.g. v0.37.0-beta.1, v0.38.0-beta.10 - "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" # e.g. v0.37.0-rc1, v0.38.0-rc10 + # TODO(thane): Remove once we make the cometbft-db repository public. + pull_request: jobs: build: @@ -58,3 +60,6 @@ jobs: platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'beep_boop' }} tags: ${{ steps.prep.outputs.tags }} + # TODO(thane): Remove when we publish cometbft-db repository. + build-args: + -GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e56d71495a5..652bbcbc924 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,6 +15,7 @@ jobs: steps: - uses: rokroskar/workflow-run-cleanup-action@master env: + GOPRIVATE: github.com/cometbft/cometbft-db GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 3f465e21680..7c8cb07c3ec 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -9,6 +9,11 @@ RUN make build-linux # stage 2 FROM golang:1.18-alpine + +# TODO(thane): Remove once we publish the cometbft-db repository. +ENV GOPRIVATE=github.com/cometbft/cometbft-db +ARG GO_MODULES_TOKEN + LABEL maintainer="hello@tendermint.com" # Tendermint will be looking for the genesis file in /tendermint/config/genesis.json @@ -18,6 +23,10 @@ LABEL maintainer="hello@tendermint.com" # The /tendermint/data dir is used by tendermint to store state. ENV TMHOME /tendermint +# TODO(thane): Remove once we publish the cometbft-db repository. +RUN git config \ + --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/ + # OS environment setup # Set user right away for determinism, create directory for persistence and give our user ownership # jq and curl used for extracting `pub_key` from private validator while diff --git a/DOCKER/build.sh b/DOCKER/build.sh index 2aa42a6cd15..681bec0bfcd 100755 --- a/DOCKER/build.sh +++ b/DOCKER/build.sh @@ -16,5 +16,9 @@ read -p "==> Build 3 docker images with the following tags (latest, $TAG, $TAG_N echo if [[ $REPLY =~ ^[Yy]$ ]] then - docker build -t "tendermint/tendermint" -t "tendermint/tendermint:$TAG" -t "tendermint/tendermint:$TAG_NO_PATCH" . + docker build \ + --build-arg GO_MODULES_TOKEN=${GO_MODULES_TOKEN} \ + -t "tendermint/tendermint" \ + -t "tendermint/tendermint:$TAG" \ + -t "tendermint/tendermint:$TAG_NO_PATCH" . fi diff --git a/abci/example/kvstore/kvstore.go b/abci/example/kvstore/kvstore.go index 2a3863ded24..07f1683a45a 100644 --- a/abci/example/kvstore/kvstore.go +++ b/abci/example/kvstore/kvstore.go @@ -6,7 +6,7 @@ import ( "encoding/json" "fmt" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" "github.com/tendermint/tendermint/abci/example/code" "github.com/tendermint/tendermint/abci/types" diff --git a/abci/example/kvstore/persistent_kvstore.go b/abci/example/kvstore/persistent_kvstore.go index bfa160e2489..7e2243358d9 100644 --- a/abci/example/kvstore/persistent_kvstore.go +++ b/abci/example/kvstore/persistent_kvstore.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" "github.com/tendermint/tendermint/abci/example/code" "github.com/tendermint/tendermint/abci/types" diff --git a/blockchain/v0/reactor_test.go b/blockchain/v0/reactor_test.go index f6fcf9ec39d..6b825bcf15d 100644 --- a/blockchain/v0/reactor_test.go +++ b/blockchain/v0/reactor_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" diff --git a/blockchain/v1/reactor_test.go b/blockchain/v1/reactor_test.go index 4147a1be57f..fc43eb60f1a 100644 --- a/blockchain/v1/reactor_test.go +++ b/blockchain/v1/reactor_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" diff --git a/blockchain/v2/reactor_test.go b/blockchain/v2/reactor_test.go index 2bd21a267b1..eeac4940a4e 100644 --- a/blockchain/v2/reactor_test.go +++ b/blockchain/v2/reactor_test.go @@ -9,10 +9,10 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/behaviour" diff --git a/cmd/tendermint/commands/light.go b/cmd/tendermint/commands/light.go index d98b8cdedfa..af1e20eae18 100644 --- a/cmd/tendermint/commands/light.go +++ b/cmd/tendermint/commands/light.go @@ -13,7 +13,7 @@ import ( "github.com/spf13/cobra" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" "github.com/tendermint/tendermint/libs/log" tmmath "github.com/tendermint/tendermint/libs/math" diff --git a/cmd/tendermint/commands/reindex_event.go b/cmd/tendermint/commands/reindex_event.go index 4ccfd91b374..1fa9fd4c51e 100644 --- a/cmd/tendermint/commands/reindex_event.go +++ b/cmd/tendermint/commands/reindex_event.go @@ -5,8 +5,8 @@ import ( "fmt" "strings" + dbm "github.com/cometbft/cometbft-db" "github.com/spf13/cobra" - dbm "github.com/tendermint/tm-db" abcitypes "github.com/tendermint/tendermint/abci/types" tmcfg "github.com/tendermint/tendermint/config" diff --git a/cmd/tendermint/commands/reindex_event_test.go b/cmd/tendermint/commands/reindex_event_test.go index 87ff80ddcff..c58e1dd8304 100644 --- a/cmd/tendermint/commands/reindex_event_test.go +++ b/cmd/tendermint/commands/reindex_event_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" abcitypes "github.com/tendermint/tendermint/abci/types" tmcfg "github.com/tendermint/tendermint/config" diff --git a/cmd/tendermint/commands/rollback.go b/cmd/tendermint/commands/rollback.go index 7e7190fb559..99d9599af4e 100644 --- a/cmd/tendermint/commands/rollback.go +++ b/cmd/tendermint/commands/rollback.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/libs/os" diff --git a/consensus/byzantine_test.go b/consensus/byzantine_test.go index d301c0ccded..82b2cb11a2b 100644 --- a/consensus/byzantine_test.go +++ b/consensus/byzantine_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" abcicli "github.com/tendermint/tendermint/abci/client" abci "github.com/tendermint/tendermint/abci/types" diff --git a/consensus/common_test.go b/consensus/common_test.go index 73d601b553e..60e66aa047f 100644 --- a/consensus/common_test.go +++ b/consensus/common_test.go @@ -15,7 +15,7 @@ import ( "github.com/go-kit/log/term" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" abcicli "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/counter" diff --git a/consensus/mempool_test.go b/consensus/mempool_test.go index 73b1500935c..678091bcf8b 100644 --- a/consensus/mempool_test.go +++ b/consensus/mempool_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" "github.com/tendermint/tendermint/abci/example/code" abci "github.com/tendermint/tendermint/abci/types" diff --git a/consensus/reactor_test.go b/consensus/reactor_test.go index 851070ba675..2e9e5f82006 100644 --- a/consensus/reactor_test.go +++ b/consensus/reactor_test.go @@ -16,7 +16,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" abcicli "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/kvstore" diff --git a/consensus/replay_file.go b/consensus/replay_file.go index 0145dfe928f..995555d49fa 100644 --- a/consensus/replay_file.go +++ b/consensus/replay_file.go @@ -10,7 +10,7 @@ import ( "strconv" "strings" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/libs/log" diff --git a/consensus/replay_test.go b/consensus/replay_test.go index 48212fe7274..3e7ff5b7b6c 100644 --- a/consensus/replay_test.go +++ b/consensus/replay_test.go @@ -12,10 +12,10 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/tendermint/tendermint/abci/example/kvstore" abci "github.com/tendermint/tendermint/abci/types" diff --git a/consensus/wal_generator.go b/consensus/wal_generator.go index 53712bf3dc7..4a7839088a6 100644 --- a/consensus/wal_generator.go +++ b/consensus/wal_generator.go @@ -9,7 +9,7 @@ import ( "testing" "time" - db "github.com/tendermint/tm-db" + db "github.com/cometbft/cometbft-db" "github.com/tendermint/tendermint/abci/example/kvstore" cfg "github.com/tendermint/tendermint/config" diff --git a/evidence/pool.go b/evidence/pool.go index 632adc7759c..38dd6d5afc5 100644 --- a/evidence/pool.go +++ b/evidence/pool.go @@ -8,9 +8,9 @@ import ( "sync/atomic" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/gogo/protobuf/proto" gogotypes "github.com/gogo/protobuf/types" - dbm "github.com/tendermint/tm-db" clist "github.com/tendermint/tendermint/libs/clist" "github.com/tendermint/tendermint/libs/log" diff --git a/evidence/pool_test.go b/evidence/pool_test.go index efa3dea103e..9f9d531c486 100644 --- a/evidence/pool_test.go +++ b/evidence/pool_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" "github.com/tendermint/tendermint/evidence" "github.com/tendermint/tendermint/evidence/mocks" diff --git a/evidence/reactor_test.go b/evidence/reactor_test.go index 8dbd58dcbf5..d50f2ec62ba 100644 --- a/evidence/reactor_test.go +++ b/evidence/reactor_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/crypto" diff --git a/evidence/verify_test.go b/evidence/verify_test.go index 7825f9d43c2..ee7a1712372 100644 --- a/evidence/verify_test.go +++ b/evidence/verify_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/tmhash" diff --git a/go.mod b/go.mod index 60880c1cef9..4a073bf01aa 100644 --- a/go.mod +++ b/go.mod @@ -29,15 +29,14 @@ require ( github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa github.com/spf13/cobra v1.6.0 github.com/spf13/viper v1.13.0 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.1 ) require ( github.com/google/uuid v1.3.0 - github.com/tendermint/tm-db v0.6.6 golang.org/x/crypto v0.4.0 golang.org/x/net v0.4.0 - google.golang.org/grpc v1.50.1 + google.golang.org/grpc v1.52.0 ) require ( @@ -55,6 +54,7 @@ require ( github.com/Masterminds/semver/v3 v3.2.0 github.com/btcsuite/btcd/btcec/v2 v2.2.1 github.com/btcsuite/btcd/btcutil v1.1.2 + github.com/cometbft/cometbft-db v0.7.0 github.com/go-git/go-git/v5 v5.5.1 github.com/vektra/mockery/v2 v2.14.0 gonum.org/v1/gonum v0.8.2 @@ -67,7 +67,6 @@ require ( github.com/Antonboom/errname v0.1.7 // indirect github.com/Antonboom/nilnil v0.1.1 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect - github.com/DataDog/zstd v1.4.1 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect github.com/Masterminds/semver v1.5.0 // indirect @@ -105,7 +104,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect github.com/denis-tingaikin/go-header v0.4.3 // indirect - github.com/dgraph-io/badger/v2 v2.2007.2 // indirect + github.com/dgraph-io/badger/v2 v2.2007.4 // 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/docker/distribution v2.8.1+incompatible // indirect @@ -148,7 +147,7 @@ require ( github.com/golangci/misspell v0.3.5 // indirect github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect - github.com/google/btree v1.0.0 // indirect + github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect github.com/gostaticanalysis/analysisutil v0.7.1 // indirect @@ -249,7 +248,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect - github.com/stretchr/objx v0.4.0 // indirect + github.com/stretchr/objx v0.5.0 // indirect github.com/subosito/gotenv v1.4.1 // indirect github.com/tdakkota/asciicheck v0.1.1 // indirect github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect @@ -282,7 +281,7 @@ require ( golang.org/x/term v0.3.0 // indirect golang.org/x/text v0.5.0 // indirect golang.org/x/tools v0.4.0 // indirect - google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a // indirect + google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index cd2482b2528..a510f8a261a 100644 --- a/go.sum +++ b/go.sum @@ -23,14 +23,15 @@ cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPT cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.100.2 h1:t9Iw5QH5v4XtlEQaCtUY7x6sCABps8sW0acw7e2WQ6Y= +cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.6.1 h1:2sMmt8prCn7DPaG4Pmh0N3Inmc8cT8ae5k1M6VJ9Wqc= +cloud.google.com/go/compute v1.12.1 h1:gKVJMEyqV5c/UnpzjjQbo3Rjvvqpr9B1DFSbJC4OXr0= +cloud.google.com/go/compute/metadata v0.2.1 h1:efOwf5ymceDhK6PKMnnrTHP4pppY5L22mle96M1yP48= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= @@ -62,7 +63,6 @@ github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQ github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.4.1 h1:3oxKN3wbHibqx897utPC2LTQU4J+IHWWJO+glkAkpFM= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= @@ -228,13 +228,12 @@ github.com/cloudflare/circl v1.3.1/go.mod h1:+CauBF6R70Jqcyl8N2hC8pAXYbWkGIezuSb github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= +github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/containerd v1.6.8 h1:h4dOFDwzHmqFEP754PgfgTeVXFnLiRc6kiqC7tplDJs= @@ -289,8 +288,9 @@ github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0 github.com/denis-tingaikin/go-header v0.4.3 h1:tEaZKAlqql6SKCY++utLmkPLd6K8IBM20Ha7UVm+mtU= github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= github.com/denisenkom/go-mssqldb v0.12.0 h1:VtrkII767ttSPNRfFekePK3sctr+joXgO58stqQbtUA= -github.com/dgraph-io/badger/v2 v2.2007.2 h1:EjjK0KqwaFMlPin1ajhP943VPENHJdEz1KLIegjaI3k= github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= +github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= +github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de h1:t0UHb5vdojIDUqktM6+xJAfScFBsVpXZmqC9dsgJmeA= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= @@ -499,8 +499,9 @@ github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6/go.mod h1:0AKcRCk github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= +github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -694,6 +695,7 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kkHAIKE/contextcheck v1.1.3 h1:l4pNvrb8JSwRd51ojtcOxOeHJzHek+MtOyXbaR0uvmw= github.com/kkHAIKE/contextcheck v1.1.3/go.mod h1:PG/cwd6c0705/LM0KTr1acO2gORUxkSVWyLJOFW5qoo= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= @@ -1108,8 +1110,9 @@ github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5J github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -1118,8 +1121,9 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= @@ -1133,8 +1137,6 @@ github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzH github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/tendermint v0.34.14/go.mod h1:FrwVm3TvsVicI9Z7FlucHV6Znfd5KBc/Lpp69cCwtk0= github.com/tendermint/tm-db v0.6.4/go.mod h1:dptYhIpJ2M5kUuenLr+Yyf3zQOv1SgBZcl8/BmWlMBw= -github.com/tendermint/tm-db v0.6.6 h1:EzhaOfR0bdKyATqcd5PNeyeq8r+V4bRPHBfyFdD9kGM= -github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= @@ -1391,7 +1393,7 @@ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= +golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 h1:nt+Q6cXKz4MosCSpnbMtqiQ8Oz0pxTef2B4Vca2lvfk= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1722,8 +1724,8 @@ google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaE google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a h1:GH6UPn3ixhWcKDhpnEC55S75cerLPdpp3hrhfKYjZgw= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 h1:a2S6M0+660BgMNl++4JPlcAO/CjkqYItDEZwkoDQK7c= +google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1752,9 +1754,8 @@ google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.52.0 h1:kd48UiU7EHsV4rnLyOJRuP/Il/UHE7gdDAQ+SZI7nZk= +google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/light/client_benchmark_test.go b/light/client_benchmark_test.go index eb02686b8fc..32e309aabf0 100644 --- a/light/client_benchmark_test.go +++ b/light/client_benchmark_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/light" diff --git a/light/client_test.go b/light/client_test.go index 4a7503d7dc7..5e00731a2c9 100644 --- a/light/client_test.go +++ b/light/client_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/light" diff --git a/light/detector_test.go b/light/detector_test.go index caec5e8e237..5178077980c 100644 --- a/light/detector_test.go +++ b/light/detector_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/light" diff --git a/light/example_test.go b/light/example_test.go index f49b34a5de7..7fc2b99f054 100644 --- a/light/example_test.go +++ b/light/example_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" "github.com/tendermint/tendermint/abci/example/kvstore" "github.com/tendermint/tendermint/libs/log" diff --git a/light/store/db/db.go b/light/store/db/db.go index 8e24a630e5e..08fe0d1295a 100644 --- a/light/store/db/db.go +++ b/light/store/db/db.go @@ -6,7 +6,7 @@ import ( "regexp" "strconv" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" tmsync "github.com/tendermint/tendermint/libs/sync" "github.com/tendermint/tendermint/light/store" diff --git a/light/store/db/db_test.go b/light/store/db/db_test.go index ef9710694f7..8f04a8d8eb6 100644 --- a/light/store/db/db_test.go +++ b/light/store/db/db_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/tmhash" diff --git a/node/node.go b/node/node.go index 58d8daeb6ac..717597a5a93 100644 --- a/node/node.go +++ b/node/node.go @@ -10,10 +10,10 @@ import ( "strings" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/rs/cors" - dbm "github.com/tendermint/tm-db" abci "github.com/tendermint/tendermint/abci/types" bcv0 "github.com/tendermint/tendermint/blockchain/v0" diff --git a/node/node_test.go b/node/node_test.go index 9b93b6fd6c7..e21a85e1bb3 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" "github.com/tendermint/tendermint/abci/example/kvstore" cfg "github.com/tendermint/tendermint/config" diff --git a/p2p/trust/store.go b/p2p/trust/store.go index e7233c91524..b5b7bac8e16 100644 --- a/p2p/trust/store.go +++ b/p2p/trust/store.go @@ -8,7 +8,7 @@ import ( "fmt" "time" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" "github.com/tendermint/tendermint/libs/service" tmsync "github.com/tendermint/tendermint/libs/sync" diff --git a/p2p/trust/store_test.go b/p2p/trust/store_test.go index c583d58aadc..3727371362e 100644 --- a/p2p/trust/store_test.go +++ b/p2p/trust/store_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/tendermint/tendermint/libs/log" ) diff --git a/rpc/core/blocks_test.go b/rpc/core/blocks_test.go index 80d0643d228..e239e609f27 100644 --- a/rpc/core/blocks_test.go +++ b/rpc/core/blocks_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" abci "github.com/tendermint/tendermint/abci/types" tmstate "github.com/tendermint/tendermint/proto/tendermint/state" diff --git a/state/export_test.go b/state/export_test.go index f6ca0e9cd21..0d8c0744c6d 100644 --- a/state/export_test.go +++ b/state/export_test.go @@ -1,7 +1,7 @@ package state import ( - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" abci "github.com/tendermint/tendermint/abci/types" tmstate "github.com/tendermint/tendermint/proto/tendermint/state" diff --git a/state/helpers_test.go b/state/helpers_test.go index 5bf20255ddb..6b7eb2a651e 100644 --- a/state/helpers_test.go +++ b/state/helpers_test.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto" diff --git a/state/indexer/block/kv/kv.go b/state/indexer/block/kv/kv.go index 2b7559db272..96bca25b7ad 100644 --- a/state/indexer/block/kv/kv.go +++ b/state/indexer/block/kv/kv.go @@ -9,8 +9,8 @@ import ( "strconv" "strings" + dbm "github.com/cometbft/cometbft-db" "github.com/google/orderedcode" - dbm "github.com/tendermint/tm-db" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/pubsub/query" diff --git a/state/indexer/block/kv/kv_test.go b/state/indexer/block/kv/kv_test.go index 362970775b4..aa97096d34a 100644 --- a/state/indexer/block/kv/kv_test.go +++ b/state/indexer/block/kv/kv_test.go @@ -5,8 +5,8 @@ import ( "fmt" "testing" + db "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/require" - db "github.com/tendermint/tm-db" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/pubsub/query" diff --git a/state/rollback_test.go b/state/rollback_test.go index 4cd20381005..1dc3620c675 100644 --- a/state/rollback_test.go +++ b/state/rollback_test.go @@ -4,8 +4,8 @@ import ( "crypto/rand" "testing" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/tmhash" diff --git a/state/state_test.go b/state/state_test.go index cec4dfd9ac3..8d4d3eba1b4 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" diff --git a/state/store.go b/state/store.go index 7c80f358f92..6ed0a545a0c 100644 --- a/state/store.go +++ b/state/store.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" + dbm "github.com/cometbft/cometbft-db" "github.com/gogo/protobuf/proto" - dbm "github.com/tendermint/tm-db" abci "github.com/tendermint/tendermint/abci/types" tmmath "github.com/tendermint/tendermint/libs/math" @@ -78,7 +78,7 @@ type Store interface { Close() error } -// dbStore wraps a db (github.com/tendermint/tm-db) +// dbStore wraps a db (github.com/cometbft/cometbft-db) type dbStore struct { db dbm.DB diff --git a/state/store_test.go b/state/store_test.go index b91eeb578e1..6381c91e13e 100644 --- a/state/store_test.go +++ b/state/store_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" diff --git a/state/tx_filter_test.go b/state/tx_filter_test.go index d5ab761ac61..900702aa9f6 100644 --- a/state/tx_filter_test.go +++ b/state/tx_filter_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" tmrand "github.com/tendermint/tendermint/libs/rand" sm "github.com/tendermint/tendermint/state" diff --git a/state/txindex/indexer_service_test.go b/state/txindex/indexer_service_test.go index 8c7dca2ac81..6b8dadc70be 100644 --- a/state/txindex/indexer_service_test.go +++ b/state/txindex/indexer_service_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" + db "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/require" - db "github.com/tendermint/tm-db" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" diff --git a/state/txindex/kv/kv.go b/state/txindex/kv/kv.go index b1746c10a68..77a61efa076 100644 --- a/state/txindex/kv/kv.go +++ b/state/txindex/kv/kv.go @@ -8,8 +8,8 @@ import ( "strconv" "strings" + dbm "github.com/cometbft/cometbft-db" "github.com/gogo/protobuf/proto" - dbm "github.com/tendermint/tm-db" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/pubsub/query" diff --git a/state/txindex/kv/kv_bench_test.go b/state/txindex/kv/kv_bench_test.go index 85491aad53d..ebe6e281298 100644 --- a/state/txindex/kv/kv_bench_test.go +++ b/state/txindex/kv/kv_bench_test.go @@ -7,7 +7,7 @@ import ( "os" "testing" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/pubsub/query" diff --git a/state/txindex/kv/kv_test.go b/state/txindex/kv/kv_test.go index 8b9b9a731e8..373cade1083 100644 --- a/state/txindex/kv/kv_test.go +++ b/state/txindex/kv/kv_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - db "github.com/tendermint/tm-db" + db "github.com/cometbft/cometbft-db" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/pubsub/query" diff --git a/statesync/stateprovider.go b/statesync/stateprovider.go index 2ed7b93a203..0391830988e 100644 --- a/statesync/stateprovider.go +++ b/statesync/stateprovider.go @@ -6,7 +6,7 @@ import ( "strings" "time" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" "github.com/tendermint/tendermint/libs/log" tmsync "github.com/tendermint/tendermint/libs/sync" diff --git a/store/store.go b/store/store.go index 48fd1c97e4f..8e0c749f391 100644 --- a/store/store.go +++ b/store/store.go @@ -4,8 +4,8 @@ import ( "fmt" "strconv" + dbm "github.com/cometbft/cometbft-db" "github.com/gogo/protobuf/proto" - dbm "github.com/tendermint/tm-db" tmsync "github.com/tendermint/tendermint/libs/sync" tmstore "github.com/tendermint/tendermint/proto/tendermint/store" diff --git a/store/store_test.go b/store/store_test.go index c9ea3e92593..830329f39cb 100644 --- a/store/store_test.go +++ b/store/store_test.go @@ -9,10 +9,10 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/crypto" diff --git a/test/loadtime/cmd/report/main.go b/test/loadtime/cmd/report/main.go index 9fbf6e84130..f3beeba86dc 100644 --- a/test/loadtime/cmd/report/main.go +++ b/test/loadtime/cmd/report/main.go @@ -9,7 +9,7 @@ import ( "strconv" "strings" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/test/loadtime/report" diff --git a/test/maverick/consensus/replay_file.go b/test/maverick/consensus/replay_file.go index 9e4f2e17b68..03d0d37fab3 100644 --- a/test/maverick/consensus/replay_file.go +++ b/test/maverick/consensus/replay_file.go @@ -10,7 +10,7 @@ import ( "strconv" "strings" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" cfg "github.com/tendermint/tendermint/config" tmcon "github.com/tendermint/tendermint/consensus" diff --git a/test/maverick/consensus/wal_generator.go b/test/maverick/consensus/wal_generator.go index 4e3cc5924eb..1b09f29c5d5 100644 --- a/test/maverick/consensus/wal_generator.go +++ b/test/maverick/consensus/wal_generator.go @@ -9,7 +9,7 @@ import ( "testing" "time" - db "github.com/tendermint/tm-db" + db "github.com/cometbft/cometbft-db" "github.com/tendermint/tendermint/abci/example/kvstore" cfg "github.com/tendermint/tendermint/config" diff --git a/test/maverick/node/node.go b/test/maverick/node/node.go index 1e178adb0a3..28fe99827e2 100644 --- a/test/maverick/node/node.go +++ b/test/maverick/node/node.go @@ -16,7 +16,7 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/rs/cors" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" abci "github.com/tendermint/tendermint/abci/types" bcv0 "github.com/tendermint/tendermint/blockchain/v0" From b5872ca3a1cf33e73a89d243a484aa4bba1a0366 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 12:02:08 +0100 Subject: [PATCH 02/35] updates to workflow files --- .github/workflows/coverage.yml | 8 ++++++++ .github/workflows/tests.yml | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 732777ee0c5..1ff479afd47 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -41,6 +41,10 @@ jobs: matrix: goarch: ["arm", "amd64"] timeout-minutes: 5 + # ToDo (thane): Remove once we make cometbft-db public + env: + GOPRIVATE: github.com/cometbft/cometbft-db + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" steps: - uses: actions/setup-go@v3 with: @@ -52,6 +56,8 @@ jobs: **/**.go go.mod go.sum + # ToDo (thane): Remove once we make cometbft-db public + - run: git config --global url.https://${{ secrets.GO_MODULES_TOKEN }}@github.com/.insteadOf https://github.com/ - name: install run: GOOS=linux GOARCH=${{ matrix.goarch }} make build if: "env.GIT_DIFF != ''" @@ -74,6 +80,8 @@ jobs: **/**.go go.mod go.sum + # ToDo (thane): Remove once we make cometbft-db public + - run: git config --global url.https://${{ secrets.GO_MODULES_TOKEN }}@github.com/.insteadOf https://github.com/ - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-${{ matrix.part }}" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 652bbcbc924..ac7f377e86d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,6 +15,7 @@ jobs: steps: - uses: rokroskar/workflow-run-cleanup-action@master env: + # ToDo (thane): Remove once we make cometbft-db public GOPRIVATE: github.com/cometbft/cometbft-db GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" @@ -34,6 +35,8 @@ jobs: **/**.go go.mod go.sum + # Todo (thane): Remove once we make cometbft-db public + - run: git config --global url.https://${{ secrets.GO_MODULES_TOKEN }}@github.com/.insteadOf https://github.com/ - name: install run: make install install_abci if: "env.GIT_DIFF != ''" @@ -66,6 +69,8 @@ jobs: **/**.go go.mod go.sum + # Todo (thane): Remove once we make cometbft-db public + - run: git config --global url.https://${{ secrets.GO_MODULES_TOKEN }}@github.com/.insteadOf https://github.com/ - uses: actions/cache@v3 with: path: ~/go/pkg/mod @@ -98,6 +103,8 @@ jobs: **/**.go go.mod go.sum + # Todo (thane): Remove once we make cometbft-db public + - run: git config --global url.https://${{ secrets.GO_MODULES_TOKEN }}@github.com/.insteadOf https://github.com/ - uses: actions/cache@v3 with: path: ~/go/pkg/mod @@ -129,6 +136,8 @@ jobs: **/**.go go.mod go.sum + # Todo (thane): Remove once we make cometbft-db public + - run: git config --global url.https://${{ secrets.GO_MODULES_TOKEN }}@github.com/.insteadOf https://github.com/ - uses: actions/cache@v3 with: path: ~/go/pkg/mod From e364244806ffb265b39ffe3448d74f6287d7cfc4 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 12:08:20 +0100 Subject: [PATCH 03/35] e2e test docker files --- test/e2e/Makefile | 8 +++++++- test/e2e/docker/Dockerfile | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/test/e2e/Makefile b/test/e2e/Makefile index c87d355a907..c87004e9d04 100644 --- a/test/e2e/Makefile +++ b/test/e2e/Makefile @@ -1,7 +1,13 @@ all: docker generator runner docker: - docker build --tag cometbft/e2e-node --tag cometbft/e2e-node:local-version -f docker/Dockerfile ../.. +#docker build --tag cometbft/e2e-node --tag cometbft/e2e-node:local-version -f docker/Dockerfile ../.. + @echo "Building E2E Docker image" + @docker build \ + --tag cometbft/e2e-node \ + --tag cometbft/e2e-node:local-version \ + --build-arg GO_MODULES_TOKEN=$(GO_MODULES_TOKEN) \ + -f docker/Dockerfile ../.. # We need to build support for database backends into the app in # order to build a binary with a CometBFT node in it (for built-in diff --git a/test/e2e/docker/Dockerfile b/test/e2e/docker/Dockerfile index 7977bbb463d..bd8eb2552ce 100644 --- a/test/e2e/docker/Dockerfile +++ b/test/e2e/docker/Dockerfile @@ -3,6 +3,10 @@ # instead of spending time compiling them. FROM golang:1.18 +# TODO(thane): Remove once we publish the cometbft-db repository. + ENV GOPRIVATE=github.com/cometbft/cometbft-db + ARG GO_MODULES_TOKEN + RUN apt-get -qq update -y && apt-get -qq upgrade -y >/dev/null RUN apt-get -qq install -y libleveldb-dev librocksdb-dev >/dev/null @@ -10,6 +14,10 @@ RUN apt-get -qq install -y libleveldb-dev librocksdb-dev >/dev/null ENV COMETBFT_BUILD_OPTIONS badgerdb,boltdb,cleveldb,rocksdb WORKDIR /src/cometbft +# TODO(thane): Remove once we publish the cometbft-db repository. +RUN git config \ + --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/ + # Fetch dependencies separately (for layer caching) COPY go.mod go.sum ./ RUN go mod download From 58eb9ee69e74d5e7734e00c9de15d564b1a38709 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 12:14:48 +0100 Subject: [PATCH 04/35] e2e test docker files --- test/e2e/Makefile | 1 - test/e2e/docker/Dockerfile | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test/e2e/Makefile b/test/e2e/Makefile index c87004e9d04..3638f3fe3ab 100644 --- a/test/e2e/Makefile +++ b/test/e2e/Makefile @@ -1,7 +1,6 @@ all: docker generator runner docker: -#docker build --tag cometbft/e2e-node --tag cometbft/e2e-node:local-version -f docker/Dockerfile ../.. @echo "Building E2E Docker image" @docker build \ --tag cometbft/e2e-node \ diff --git a/test/e2e/docker/Dockerfile b/test/e2e/docker/Dockerfile index bd8eb2552ce..88c1fc38630 100644 --- a/test/e2e/docker/Dockerfile +++ b/test/e2e/docker/Dockerfile @@ -4,8 +4,8 @@ FROM golang:1.18 # TODO(thane): Remove once we publish the cometbft-db repository. - ENV GOPRIVATE=github.com/cometbft/cometbft-db - ARG GO_MODULES_TOKEN +ENV GOPRIVATE=github.com/cometbft/cometbft-db +ARG GO_MODULES_TOKEN RUN apt-get -qq update -y && apt-get -qq upgrade -y >/dev/null RUN apt-get -qq install -y libleveldb-dev librocksdb-dev >/dev/null From 1529e3b84e5c12cf6442977d245386faed511c34 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 12:18:18 +0100 Subject: [PATCH 05/35] updated cometbft-docker --- .github/workflows/cometbft-docker.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/cometbft-docker.yml b/.github/workflows/cometbft-docker.yml index 402b3fa7b61..688a4e3e65e 100644 --- a/.github/workflows/cometbft-docker.yml +++ b/.github/workflows/cometbft-docker.yml @@ -58,3 +58,7 @@ jobs: platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.prep.outputs.tags }} + # TODO(thane): Remove when we publish cometbft-db repository. + build-args: + -GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} + From 2ca77341892e1b76646b67a0e569bb871fa8931c Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 12:21:02 +0100 Subject: [PATCH 06/35] missing tag --- .github/workflows/cometbft-docker.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cometbft-docker.yml b/.github/workflows/cometbft-docker.yml index 688a4e3e65e..124fcbfa4c4 100644 --- a/.github/workflows/cometbft-docker.yml +++ b/.github/workflows/cometbft-docker.yml @@ -10,6 +10,8 @@ on: - "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+" # e.g. v0.37.0-alpha.1, v0.38.0-alpha.10 - "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+" # e.g. v0.37.0-beta.1, v0.38.0-beta.10 - "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" # e.g. v0.37.0-rc1, v0.38.0-rc10 + pull_request: + jobs: build: From f858825fb5304acbb4d986672a9bfdd90301ff48 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 12:38:28 +0100 Subject: [PATCH 07/35] removed line not recognized properly --- test/e2e/Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/e2e/Makefile b/test/e2e/Makefile index 3638f3fe3ab..11b38f3f94d 100644 --- a/test/e2e/Makefile +++ b/test/e2e/Makefile @@ -1,12 +1,11 @@ all: docker generator runner docker: - @echo "Building E2E Docker image" @docker build \ - --tag cometbft/e2e-node \ - --tag cometbft/e2e-node:local-version \ - --build-arg GO_MODULES_TOKEN=$(GO_MODULES_TOKEN) \ - -f docker/Dockerfile ../.. + --tag cometbft/e2e-node \ + --tag cometbft/e2e-node:local-version \ + --build-arg GO_MODULES_TOKEN=$(GO_MODULES_TOKEN) \ + -f docker/Dockerfile ../.. # We need to build support for database backends into the app in # order to build a binary with a CometBFT node in it (for built-in From 4064f976a417e85140487034caabe38ade07453f Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 13:10:47 +0100 Subject: [PATCH 08/35] Apply suggestions from code review Co-authored-by: Thane Thomson --- .github/workflows/cometbft-docker.yml | 2 +- .github/workflows/testapp-docker.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cometbft-docker.yml b/.github/workflows/cometbft-docker.yml index 124fcbfa4c4..b285a8c2902 100644 --- a/.github/workflows/cometbft-docker.yml +++ b/.github/workflows/cometbft-docker.yml @@ -62,5 +62,5 @@ jobs: tags: ${{ steps.prep.outputs.tags }} # TODO(thane): Remove when we publish cometbft-db repository. build-args: - -GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} + - GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} diff --git a/.github/workflows/testapp-docker.yml b/.github/workflows/testapp-docker.yml index a38495b6391..a0d45a6dab8 100644 --- a/.github/workflows/testapp-docker.yml +++ b/.github/workflows/testapp-docker.yml @@ -62,4 +62,4 @@ jobs: tags: ${{ steps.prep.outputs.tags }} # TODO(thane): Remove when we publish cometbft-db repository. build-args: - -GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} + - GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} From 845c276f6d89aad53eb98f13715cea9d732a8a26 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 13:13:02 +0100 Subject: [PATCH 09/35] Revert "Apply suggestions from code review" This reverts commit 4064f976a417e85140487034caabe38ade07453f. --- .github/workflows/cometbft-docker.yml | 2 +- .github/workflows/testapp-docker.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cometbft-docker.yml b/.github/workflows/cometbft-docker.yml index b285a8c2902..124fcbfa4c4 100644 --- a/.github/workflows/cometbft-docker.yml +++ b/.github/workflows/cometbft-docker.yml @@ -62,5 +62,5 @@ jobs: tags: ${{ steps.prep.outputs.tags }} # TODO(thane): Remove when we publish cometbft-db repository. build-args: - - GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} + -GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} diff --git a/.github/workflows/testapp-docker.yml b/.github/workflows/testapp-docker.yml index a0d45a6dab8..a38495b6391 100644 --- a/.github/workflows/testapp-docker.yml +++ b/.github/workflows/testapp-docker.yml @@ -62,4 +62,4 @@ jobs: tags: ${{ steps.prep.outputs.tags }} # TODO(thane): Remove when we publish cometbft-db repository. build-args: - - GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} + -GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} From 62237b951a604a57184d7d7647f0a840352865b9 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 13:15:05 +0100 Subject: [PATCH 10/35] fixed spacing --- .github/workflows/cometbft-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cometbft-docker.yml b/.github/workflows/cometbft-docker.yml index 124fcbfa4c4..1dd581c38e4 100644 --- a/.github/workflows/cometbft-docker.yml +++ b/.github/workflows/cometbft-docker.yml @@ -62,5 +62,5 @@ jobs: tags: ${{ steps.prep.outputs.tags }} # TODO(thane): Remove when we publish cometbft-db repository. build-args: - -GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} + -GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} From f390a3d84bc673ebf178a2a5389594007afa4229 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 13:15:21 +0100 Subject: [PATCH 11/35] fixed spacing --- .github/workflows/cometbft-docker.yml | 2 +- .github/workflows/testapp-docker.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cometbft-docker.yml b/.github/workflows/cometbft-docker.yml index 1dd581c38e4..d2dab2a4c7b 100644 --- a/.github/workflows/cometbft-docker.yml +++ b/.github/workflows/cometbft-docker.yml @@ -62,5 +62,5 @@ jobs: tags: ${{ steps.prep.outputs.tags }} # TODO(thane): Remove when we publish cometbft-db repository. build-args: - -GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} + - GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} diff --git a/.github/workflows/testapp-docker.yml b/.github/workflows/testapp-docker.yml index a38495b6391..a0d45a6dab8 100644 --- a/.github/workflows/testapp-docker.yml +++ b/.github/workflows/testapp-docker.yml @@ -62,4 +62,4 @@ jobs: tags: ${{ steps.prep.outputs.tags }} # TODO(thane): Remove when we publish cometbft-db repository. build-args: - -GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} + - GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} From 7f8070b0fb53a6877037421316f873b8c6c7faad Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 13:47:43 +0100 Subject: [PATCH 12/35] removed whitespace --- .github/workflows/cometbft-docker.yml | 3 +-- .github/workflows/testapp-docker.yml | 2 +- test/e2e/Makefile | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cometbft-docker.yml b/.github/workflows/cometbft-docker.yml index d2dab2a4c7b..a35e3c99c39 100644 --- a/.github/workflows/cometbft-docker.yml +++ b/.github/workflows/cometbft-docker.yml @@ -62,5 +62,4 @@ jobs: tags: ${{ steps.prep.outputs.tags }} # TODO(thane): Remove when we publish cometbft-db repository. build-args: - - GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} - + - GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/testapp-docker.yml b/.github/workflows/testapp-docker.yml index a0d45a6dab8..78931955e14 100644 --- a/.github/workflows/testapp-docker.yml +++ b/.github/workflows/testapp-docker.yml @@ -62,4 +62,4 @@ jobs: tags: ${{ steps.prep.outputs.tags }} # TODO(thane): Remove when we publish cometbft-db repository. build-args: - - GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} + - GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} \ No newline at end of file diff --git a/test/e2e/Makefile b/test/e2e/Makefile index 11b38f3f94d..b81d6ba4a2a 100644 --- a/test/e2e/Makefile +++ b/test/e2e/Makefile @@ -24,4 +24,4 @@ generator: runner: go build -o build/runner ./runner -.PHONY: all node docker generator maverick runner +.PHONY: all node docker generator maverick runner \ No newline at end of file From aab4ec5bc70cb0a651d1d402e6eea69f5d3a9659 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 15:34:37 +0100 Subject: [PATCH 13/35] attempting to fix the docker.yml --- .github/workflows/cometbft-docker.yml | 2 +- .github/workflows/testapp-docker.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cometbft-docker.yml b/.github/workflows/cometbft-docker.yml index a35e3c99c39..8b4510949b6 100644 --- a/.github/workflows/cometbft-docker.yml +++ b/.github/workflows/cometbft-docker.yml @@ -62,4 +62,4 @@ jobs: tags: ${{ steps.prep.outputs.tags }} # TODO(thane): Remove when we publish cometbft-db repository. build-args: - - GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} \ No newline at end of file + - "GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }}" \ No newline at end of file diff --git a/.github/workflows/testapp-docker.yml b/.github/workflows/testapp-docker.yml index 78931955e14..0293f18eee9 100644 --- a/.github/workflows/testapp-docker.yml +++ b/.github/workflows/testapp-docker.yml @@ -62,4 +62,4 @@ jobs: tags: ${{ steps.prep.outputs.tags }} # TODO(thane): Remove when we publish cometbft-db repository. build-args: - - GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} \ No newline at end of file + - "GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }}" \ No newline at end of file From 7a744bf280c816e330eaed173c4e2a55199e9f2a Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 15:40:48 +0100 Subject: [PATCH 14/35] minor --- .github/workflows/cometbft-docker.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cometbft-docker.yml b/.github/workflows/cometbft-docker.yml index 8b4510949b6..2943171d095 100644 --- a/.github/workflows/cometbft-docker.yml +++ b/.github/workflows/cometbft-docker.yml @@ -60,6 +60,5 @@ jobs: platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.prep.outputs.tags }} - # TODO(thane): Remove when we publish cometbft-db repository. build-args: - "GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }}" \ No newline at end of file From 1ec7dfe93605f4c11ad3d59ed182a05d28032653 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 15:54:29 +0100 Subject: [PATCH 15/35] minor --- .github/workflows/cometbft-docker.yml | 6 +++--- .github/workflows/testapp-docker.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cometbft-docker.yml b/.github/workflows/cometbft-docker.yml index 2943171d095..fda70be9a41 100644 --- a/.github/workflows/cometbft-docker.yml +++ b/.github/workflows/cometbft-docker.yml @@ -11,7 +11,7 @@ on: - "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+" # e.g. v0.37.0-beta.1, v0.38.0-beta.10 - "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" # e.g. v0.37.0-rc1, v0.38.0-rc10 pull_request: - + jobs: build: @@ -60,5 +60,5 @@ jobs: platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.prep.outputs.tags }} - build-args: - - "GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }}" \ No newline at end of file + build-args: | + GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/testapp-docker.yml b/.github/workflows/testapp-docker.yml index 0293f18eee9..b61cbcefb64 100644 --- a/.github/workflows/testapp-docker.yml +++ b/.github/workflows/testapp-docker.yml @@ -61,5 +61,5 @@ jobs: push: ${{ github.event_name != 'beep_boop' }} tags: ${{ steps.prep.outputs.tags }} # TODO(thane): Remove when we publish cometbft-db repository. - build-args: - - "GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }}" \ No newline at end of file + build-args: | + GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} \ No newline at end of file From c3d63be9b40b4e3db899e3fcf264542ce0e294f2 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 16:04:09 +0100 Subject: [PATCH 16/35] minor --- test/e2e/docker/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/e2e/docker/Dockerfile b/test/e2e/docker/Dockerfile index 88c1fc38630..62c83537473 100644 --- a/test/e2e/docker/Dockerfile +++ b/test/e2e/docker/Dockerfile @@ -15,8 +15,7 @@ ENV COMETBFT_BUILD_OPTIONS badgerdb,boltdb,cleveldb,rocksdb WORKDIR /src/cometbft # TODO(thane): Remove once we publish the cometbft-db repository. -RUN git config \ - --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/ +RUN git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/ # Fetch dependencies separately (for layer caching) COPY go.mod go.sum ./ From b4eab3c727ac440c9d2644b3453dcdd274782d5b Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 16:06:59 +0100 Subject: [PATCH 17/35] minor --- DOCKER/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 78a01f78bea..31e0dbce5e6 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -25,8 +25,7 @@ LABEL maintainer="hello@informal.systems" ENV TMHOME /cometbft # TODO(thane): Remove once we publish the cometbft-db repository. -RUN git config \ - --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/ +RUN git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/ # OS environment setup # Set user right away for determinism, create directory for persistence and give our user ownership From 9f7ab0215f1885f472c27b0ea271f6d637e64069 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 16:26:24 +0100 Subject: [PATCH 18/35] minor --- .github/workflows/cometbft-docker.yml | 3 +-- .github/workflows/testapp-docker.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cometbft-docker.yml b/.github/workflows/cometbft-docker.yml index fda70be9a41..9d690e931e2 100644 --- a/.github/workflows/cometbft-docker.yml +++ b/.github/workflows/cometbft-docker.yml @@ -60,5 +60,4 @@ jobs: platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.prep.outputs.tags }} - build-args: | - GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} \ No newline at end of file + build-args: GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/testapp-docker.yml b/.github/workflows/testapp-docker.yml index b61cbcefb64..09c8199abb3 100644 --- a/.github/workflows/testapp-docker.yml +++ b/.github/workflows/testapp-docker.yml @@ -61,5 +61,4 @@ jobs: push: ${{ github.event_name != 'beep_boop' }} tags: ${{ steps.prep.outputs.tags }} # TODO(thane): Remove when we publish cometbft-db repository. - build-args: | - GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} \ No newline at end of file + build-args: GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} \ No newline at end of file From 572e7e723c4578af1c0c44409f58d251bfdce5c0 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 22:57:56 +0100 Subject: [PATCH 19/35] fixing docker --- .github/workflows/cometbft-docker.yml | 3 ++- .github/workflows/testapp-docker.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cometbft-docker.yml b/.github/workflows/cometbft-docker.yml index 9d690e931e2..3e1b1cf11cc 100644 --- a/.github/workflows/cometbft-docker.yml +++ b/.github/workflows/cometbft-docker.yml @@ -60,4 +60,5 @@ jobs: platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.prep.outputs.tags }} - build-args: GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} \ No newline at end of file + build-args: | + "GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }}" \ No newline at end of file diff --git a/.github/workflows/testapp-docker.yml b/.github/workflows/testapp-docker.yml index 09c8199abb3..f9eb6048893 100644 --- a/.github/workflows/testapp-docker.yml +++ b/.github/workflows/testapp-docker.yml @@ -61,4 +61,5 @@ jobs: push: ${{ github.event_name != 'beep_boop' }} tags: ${{ steps.prep.outputs.tags }} # TODO(thane): Remove when we publish cometbft-db repository. - build-args: GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }} \ No newline at end of file + build-args: | + "GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }}" \ No newline at end of file From 0974db6fde85ce266c145affc6c5fca320b40d87 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 23:15:23 +0100 Subject: [PATCH 20/35] trying to fix missing tags --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4671a5f6d00..15862acc5fd 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ BUILD_TAGS?=cometbft ifneq ($(shell git symbolic-ref -q --short HEAD),) VERSION := unreleased-$(shell git symbolic-ref -q --short HEAD)-$(shell git rev-parse HEAD) else -VERSION := $(shell git describe) +VERSION := $(shell git describe --tags) endif LD_FLAGS = -X github.com/cometbft/cometbft/version.TMCoreSemVer=$(VERSION) From 8bd07ed9c15900b9bb4fb63df51fffb76738b453 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 23:25:09 +0100 Subject: [PATCH 21/35] install git in dockerfile --- DOCKER/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 31e0dbce5e6..88a89fc5617 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.18-alpine as builder RUN apk update && \ apk upgrade && \ - apk --no-cache add make + apk --no-cache add make git COPY / /cometbft WORKDIR /cometbft RUN make build-linux From b66db93760a03eeefe710efc7cfa34d2979a4787 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 23:28:34 +0100 Subject: [PATCH 22/35] try quotes --- DOCKER/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 88a89fc5617..368ec353071 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -25,7 +25,7 @@ LABEL maintainer="hello@informal.systems" ENV TMHOME /cometbft # TODO(thane): Remove once we publish the cometbft-db repository. -RUN git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/ +RUN "git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/" # OS environment setup # Set user right away for determinism, create directory for persistence and give our user ownership From a7bc3b08908e548b59199ebdc940e8f3319ccfac Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 23:38:17 +0100 Subject: [PATCH 23/35] try quotes --- DOCKER/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 368ec353071..507ffa28b12 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -25,7 +25,7 @@ LABEL maintainer="hello@informal.systems" ENV TMHOME /cometbft # TODO(thane): Remove once we publish the cometbft-db repository. -RUN "git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/" +RUN git config --global url."https://${GO_MODULES_TOKEN}@github.com/".insteadOf "https://github.com/" # OS environment setup # Set user right away for determinism, create directory for persistence and give our user ownership From 02130c6ece9d4844b8adee154622aa08f0147981 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 23:40:18 +0100 Subject: [PATCH 24/35] try quotes --- DOCKER/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 507ffa28b12..8f7b77438fd 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -25,7 +25,7 @@ LABEL maintainer="hello@informal.systems" ENV TMHOME /cometbft # TODO(thane): Remove once we publish the cometbft-db repository. -RUN git config --global url."https://${GO_MODULES_TOKEN}@github.com/".insteadOf "https://github.com/" +RUN /bin/sh -c "git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/" # OS environment setup # Set user right away for determinism, create directory for persistence and give our user ownership From 0422e18d62347f26f9600dbb7bb2b3db14ad1d1c Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 23:50:35 +0100 Subject: [PATCH 25/35] try quotes --- DOCKER/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 8f7b77438fd..5d2674b3df7 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -25,7 +25,7 @@ LABEL maintainer="hello@informal.systems" ENV TMHOME /cometbft # TODO(thane): Remove once we publish the cometbft-db repository. -RUN /bin/sh -c "git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/" +RUN ["/bin/sh", "-c", "git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/"] # OS environment setup # Set user right away for determinism, create directory for persistence and give our user ownership From 199b725d04857a390d6ff8c09bab931b8ab8519c Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 19 Jan 2023 23:52:39 +0100 Subject: [PATCH 26/35] try quotes --- DOCKER/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 5d2674b3df7..f9588aea3af 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -25,7 +25,7 @@ LABEL maintainer="hello@informal.systems" ENV TMHOME /cometbft # TODO(thane): Remove once we publish the cometbft-db repository. -RUN ["/bin/sh", "-c", "git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/"] +RUN ["sh", "-c", "git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/"] # OS environment setup # Set user right away for determinism, create directory for persistence and give our user ownership From b3b4de18cde2fdf53d15d1421489d9469b2ea4bb Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Fri, 20 Jan 2023 00:19:50 +0100 Subject: [PATCH 27/35] change run cmd format --- DOCKER/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index f9588aea3af..72766c7cab5 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -25,7 +25,7 @@ LABEL maintainer="hello@informal.systems" ENV TMHOME /cometbft # TODO(thane): Remove once we publish the cometbft-db repository. -RUN ["sh", "-c", "git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/"] +RUN ["sh", "-c", "apk add git && git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/"] # OS environment setup # Set user right away for determinism, create directory for persistence and give our user ownership From fb96a0a828c8f14938c4b87c0a8d3e7272542cfb Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Fri, 20 Jan 2023 00:33:49 +0100 Subject: [PATCH 28/35] changing arg in yml --- .github/workflows/cometbft-docker.yml | 2 +- .github/workflows/testapp-docker.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cometbft-docker.yml b/.github/workflows/cometbft-docker.yml index 3e1b1cf11cc..a75131f2467 100644 --- a/.github/workflows/cometbft-docker.yml +++ b/.github/workflows/cometbft-docker.yml @@ -60,5 +60,5 @@ jobs: platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.prep.outputs.tags }} - build-args: | + args: | "GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }}" \ No newline at end of file diff --git a/.github/workflows/testapp-docker.yml b/.github/workflows/testapp-docker.yml index f9eb6048893..5528302ca1c 100644 --- a/.github/workflows/testapp-docker.yml +++ b/.github/workflows/testapp-docker.yml @@ -61,5 +61,5 @@ jobs: push: ${{ github.event_name != 'beep_boop' }} tags: ${{ steps.prep.outputs.tags }} # TODO(thane): Remove when we publish cometbft-db repository. - build-args: | + args: | "GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }}" \ No newline at end of file From dd49efcb0a25a408ed3db49234564c62f47cc312 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Fri, 20 Jan 2023 00:38:00 +0100 Subject: [PATCH 29/35] changing arg in yml --- DOCKER/Dockerfile | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 72766c7cab5..88a89fc5617 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -25,7 +25,7 @@ LABEL maintainer="hello@informal.systems" ENV TMHOME /cometbft # TODO(thane): Remove once we publish the cometbft-db repository. -RUN ["sh", "-c", "apk add git && git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/"] +RUN git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/ # OS environment setup # Set user right away for determinism, create directory for persistence and give our user ownership diff --git a/Makefile b/Makefile index 15862acc5fd..9520fd79b1d 100644 --- a/Makefile +++ b/Makefile @@ -237,7 +237,7 @@ sync-docs: build-docker: build-linux cp $(OUTPUT) DOCKER/cometbft - docker build --label=cometbft --tag="cometbft/cometbft" DOCKER + docker build --label=cometbft --tag="cometbft/cometbft" --build-arg GO_MODULES_TOKEN=${GO_MODULES_TOKEN} DOCKER rm -rf DOCKER/cometbft .PHONY: build-docker From 3a7c095e43c723a99eaaab73aa21c6ab4f01332d Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Fri, 20 Jan 2023 00:39:43 +0100 Subject: [PATCH 30/35] changing arg in yml --- .github/workflows/cometbft-docker.yml | 2 +- .github/workflows/testapp-docker.yml | 2 +- DOCKER/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cometbft-docker.yml b/.github/workflows/cometbft-docker.yml index a75131f2467..3e1b1cf11cc 100644 --- a/.github/workflows/cometbft-docker.yml +++ b/.github/workflows/cometbft-docker.yml @@ -60,5 +60,5 @@ jobs: platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.prep.outputs.tags }} - args: | + build-args: | "GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }}" \ No newline at end of file diff --git a/.github/workflows/testapp-docker.yml b/.github/workflows/testapp-docker.yml index 5528302ca1c..f9eb6048893 100644 --- a/.github/workflows/testapp-docker.yml +++ b/.github/workflows/testapp-docker.yml @@ -61,5 +61,5 @@ jobs: push: ${{ github.event_name != 'beep_boop' }} tags: ${{ steps.prep.outputs.tags }} # TODO(thane): Remove when we publish cometbft-db repository. - args: | + build-args: | "GO_MODULES_TOKEN=${{ secrets.GO_MODULES_TOKEN }}" \ No newline at end of file diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 88a89fc5617..2046ad482ac 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -25,7 +25,7 @@ LABEL maintainer="hello@informal.systems" ENV TMHOME /cometbft # TODO(thane): Remove once we publish the cometbft-db repository. -RUN git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/ +RUN ["sh", "-c" , "git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/"] # OS environment setup # Set user right away for determinism, create directory for persistence and give our user ownership From 0d64c692f81e4341058e914c46466157aadf4144 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Fri, 20 Jan 2023 00:41:42 +0100 Subject: [PATCH 31/35] added git install in run cmd --- DOCKER/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 2046ad482ac..d5d7b5edf43 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -25,7 +25,7 @@ LABEL maintainer="hello@informal.systems" ENV TMHOME /cometbft # TODO(thane): Remove once we publish the cometbft-db repository. -RUN ["sh", "-c" , "git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/"] +RUN ["sh", "-c" , "apk add git && git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/"] # OS environment setup # Set user right away for determinism, create directory for persistence and give our user ownership From 5c1cf68d214f2108107a1b0fa04615dbe4c19fe8 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Fri, 20 Jan 2023 00:47:58 +0100 Subject: [PATCH 32/35] reverted change in run cmd --- DOCKER/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index d5d7b5edf43..88a89fc5617 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -25,7 +25,7 @@ LABEL maintainer="hello@informal.systems" ENV TMHOME /cometbft # TODO(thane): Remove once we publish the cometbft-db repository. -RUN ["sh", "-c" , "apk add git && git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/"] +RUN git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/ # OS environment setup # Set user right away for determinism, create directory for persistence and give our user ownership From 813711f479eabe7ea6fdcd7fde769358fba2b148 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Fri, 20 Jan 2023 00:51:45 +0100 Subject: [PATCH 33/35] added git install in run cmd --- DOCKER/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 88a89fc5617..ecea9584782 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.18-alpine as builder RUN apk update && \ apk upgrade && \ - apk --no-cache add make git + apk --no-cache add make git COPY / /cometbft WORKDIR /cometbft RUN make build-linux @@ -25,7 +25,7 @@ LABEL maintainer="hello@informal.systems" ENV TMHOME /cometbft # TODO(thane): Remove once we publish the cometbft-db repository. -RUN git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/ +RUN apk add git && git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/ # OS environment setup # Set user right away for determinism, create directory for persistence and give our user ownership From 00dcd8f54f7494074f6ee87041ba44978eaee7c7 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Fri, 20 Jan 2023 01:38:56 +0100 Subject: [PATCH 34/35] reordered commands in Dockerfile --- DOCKER/Dockerfile | 11 +++++------ Makefile | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index ecea9584782..281f5150664 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -5,14 +5,16 @@ RUN apk update && \ apk --no-cache add make git COPY / /cometbft WORKDIR /cometbft +# TODO(thane): Remove once we publish the cometbft-db repository. +ENV GOPRIVATE=github.com/cometbft/cometbft-db +ARG GO_MODULES_TOKEN +RUN apk --no-cache add git && git config --global "url.https://${GO_MODULES_TOKEN}@github.com/".insteadOf "https://github.com/" RUN make build-linux # stage 2 FROM golang:1.18-alpine -# TODO(thane): Remove once we publish the cometbft-db repository. -ENV GOPRIVATE=github.com/cometbft/cometbft-db -ARG GO_MODULES_TOKEN + LABEL maintainer="hello@informal.systems" @@ -24,9 +26,6 @@ LABEL maintainer="hello@informal.systems" # The /cometbft/data dir is used by CometBFT to store state. ENV TMHOME /cometbft -# TODO(thane): Remove once we publish the cometbft-db repository. -RUN apk add git && git config --global url.https://${GO_MODULES_TOKEN}@github.com/.insteadOf https://github.com/ - # OS environment setup # Set user right away for determinism, create directory for persistence and give our user ownership # jq and curl used for extracting `pub_key` from private validator while diff --git a/Makefile b/Makefile index 9520fd79b1d..3d623a4fef4 100644 --- a/Makefile +++ b/Makefile @@ -237,7 +237,7 @@ sync-docs: build-docker: build-linux cp $(OUTPUT) DOCKER/cometbft - docker build --label=cometbft --tag="cometbft/cometbft" --build-arg GO_MODULES_TOKEN=${GO_MODULES_TOKEN} DOCKER + docker build --label=cometbft --tag="cometbft/cometbft" --build-arg GO_MODULES_TOKEN=${GO_MODULES_TOKEN} --progress=plain DOCKER --no-cache rm -rf DOCKER/cometbft .PHONY: build-docker From fcedd706272d4bbda617f1fd6800cc6593194112 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Fri, 20 Jan 2023 09:26:07 +0100 Subject: [PATCH 35/35] Applied Thanes fix for dockerfiles --- .github/workflows/cometbft-docker.yml | 1 - .github/workflows/testapp-docker.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/cometbft-docker.yml b/.github/workflows/cometbft-docker.yml index 3e1b1cf11cc..3fdbd3c07bb 100644 --- a/.github/workflows/cometbft-docker.yml +++ b/.github/workflows/cometbft-docker.yml @@ -10,7 +10,6 @@ on: - "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+" # e.g. v0.37.0-alpha.1, v0.38.0-alpha.10 - "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+" # e.g. v0.37.0-beta.1, v0.38.0-beta.10 - "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" # e.g. v0.37.0-rc1, v0.38.0-rc10 - pull_request: jobs: diff --git a/.github/workflows/testapp-docker.yml b/.github/workflows/testapp-docker.yml index f9eb6048893..d0958397416 100644 --- a/.github/workflows/testapp-docker.yml +++ b/.github/workflows/testapp-docker.yml @@ -11,7 +11,6 @@ on: - "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+" # e.g. v0.37.0-beta.1, v0.38.0-beta.10 - "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" # e.g. v0.37.0-rc1, v0.38.0-rc10 # TODO(thane): Remove once we make the cometbft-db repository public. - pull_request: jobs: build: