From 043dbc5f7b5e7cadfbb9d25d8a736a477586e176 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 17 Feb 2024 22:26:53 +0100 Subject: [PATCH 01/24] fix: use genesis file app version if it is set (backport #1227) (#1232) --- consensus/replay.go | 18 ++++++++---------- state/state.go | 26 +++++++++++++++----------- state/state_test.go | 16 ++++++++++++++++ 3 files changed, 39 insertions(+), 21 deletions(-) diff --git a/consensus/replay.go b/consensus/replay.go index 586ddebf80..7df9142f32 100644 --- a/consensus/replay.go +++ b/consensus/replay.go @@ -258,15 +258,10 @@ func (h *Handshaker) HandshakeWithContext(ctx context.Context, proxyApp proxy.Ap } appHash := res.LastBlockAppHash - h.logger.Info("ABCI Handshake App Info", - "height", blockHeight, - "hash", appHash, - "software-version", res.Version, - "protocol-version", res.AppVersion, - ) - - // Only set the version if there is no existing state. - if h.initialState.LastBlockHeight == 0 { + appVersion := h.initialState.Version.Consensus.App + // set app version if it's not set via genesis + if h.initialState.LastBlockHeight == 0 && appVersion == 0 && res.AppVersion != 0 { + appVersion = res.AppVersion h.initialState.Version.Consensus.App = res.AppVersion } @@ -277,7 +272,10 @@ func (h *Handshaker) HandshakeWithContext(ctx context.Context, proxyApp proxy.Ap } h.logger.Info("Completed ABCI Handshake - CometBFT and App are synced", - "appHeight", blockHeight, "appHash", appHash) + "appHeight", blockHeight, + "appHash", appHash, + "appVersion", appVersion, + ) // TODO: (on restart) replay mempool diff --git a/state/state.go b/state/state.go index 53ff02bb47..516af24119 100644 --- a/state/state.go +++ b/state/state.go @@ -24,16 +24,15 @@ var ( //----------------------------------------------------------------------------- -// InitStateVersion sets the Consensus.Block and Software versions, -// but leaves the Consensus.App version blank. -// The Consensus.App version will be set during the Handshake, once -// we hear from the app what protocol version it is running. -var InitStateVersion = cmtstate.Version{ - Consensus: cmtversion.Consensus{ - Block: version.BlockProtocol, - App: 0, - }, - Software: version.TMCoreSemVer, +// InitStateVersion sets the Consensus.Block, Consensus.App and Software versions +func InitStateVersion(appVersion uint64) cmtstate.Version { + return cmtstate.Version{ + Consensus: cmtversion.Consensus{ + Block: version.BlockProtocol, + App: appVersion, + }, + Software: version.TMCoreSemVer, + } } //----------------------------------------------------------------------------- @@ -332,8 +331,13 @@ func MakeGenesisState(genDoc *types.GenesisDoc) (State, error) { nextValidatorSet = types.NewValidatorSet(validators).CopyIncrementProposerPriority(1) } + appVersion := uint64(0) + if genDoc.ConsensusParams != nil { + appVersion = genDoc.ConsensusParams.Version.AppVersion + } + return State{ - Version: InitStateVersion, + Version: InitStateVersion(appVersion), ChainID: genDoc.ChainID, InitialHeight: genDoc.InitialHeight, diff --git a/state/state_test.go b/state/state_test.go index 4ce87ddce7..fb3eb4fbf6 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -22,6 +22,7 @@ import ( cmtproto "github.com/tendermint/tendermint/proto/tendermint/types" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" + "github.com/tendermint/tendermint/version" ) // setupTestCase does setup common to all test cases. @@ -74,6 +75,21 @@ func TestMakeGenesisStateNilValidators(t *testing.T) { require.Equal(t, 0, len(state.NextValidators.Validators)) } +func TestMakeGenesisStateSetsAppVersion(t *testing.T) { + cp := types.DefaultConsensusParams() + appVersion := uint64(5) + cp.Version.AppVersion = appVersion + doc := types.GenesisDoc{ + ChainID: "dummy", + ConsensusParams: cp, + } + require.Nil(t, doc.ValidateAndComplete()) + state, err := sm.MakeGenesisState(&doc) + require.Nil(t, err) + require.Equal(t, appVersion, state.Version.Consensus.App) + require.Equal(t, version.BlockProtocol, state.Version.Consensus.Block) +} + // TestStateSaveLoad tests saving and loading State from a db. func TestStateSaveLoad(t *testing.T) { tearDown, stateDB, state := setupTestCase(t) From 9110107401f46cb3b372eca01a22a630703c8ec4 Mon Sep 17 00:00:00 2001 From: Rootul P Date: Thu, 29 Feb 2024 08:00:13 -0500 Subject: [PATCH 02/24] chore: consolidate require blocks (#1246) Consolidate the require blocks in go.mod so that the diff in https://github.com/celestiaorg/celestia-core/pull/1245 is easier to view. Unblocks https://github.com/celestiaorg/celestia-core/pull/1245 --- .github/workflows/coverage.yml | 3 ++ go.mod | 53 ++++++++++++---------------------- 2 files changed, 22 insertions(+), 34 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 60fe9a6b84..f5525bb706 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -10,6 +10,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 + with: + go-version: "1.19" - name: Create a file with all the pkgs run: go list ./... > pkgs.txt - name: Split pkgs into 4 files diff --git a/go.mod b/go.mod index 2c49f3b373..9280f35779 100644 --- a/go.mod +++ b/go.mod @@ -5,24 +5,38 @@ go 1.19 require ( github.com/BurntSushi/toml v1.2.1 github.com/ChainSafe/go-schnorrkel v1.0.0 + github.com/Masterminds/semver/v3 v3.2.0 github.com/Workiva/go-datastructures v1.0.53 github.com/adlio/schema v1.3.3 + github.com/btcsuite/btcd/btcec/v2 v2.3.2 + github.com/btcsuite/btcd/btcutil v1.1.3 + github.com/bufbuild/buf v1.15.1 + github.com/celestiaorg/nmt v0.20.0 + github.com/cometbft/cometbft-db v0.7.0 + github.com/creachadair/taskgroup v0.3.2 github.com/fortytw2/leaktest v1.3.0 + github.com/go-git/go-git/v5 v5.6.1 github.com/go-kit/kit v0.12.0 github.com/go-kit/log v0.2.1 github.com/go-logfmt/logfmt v0.6.0 github.com/gofrs/uuid v4.4.0+incompatible + github.com/gogo/protobuf v1.3.2 github.com/golang/protobuf v1.5.3 github.com/golangci/golangci-lint v1.52.0 github.com/google/orderedcode v0.0.1 + github.com/google/uuid v1.3.1 github.com/gorilla/websocket v1.5.0 github.com/gtank/merlin v0.1.1 + github.com/influxdata/influxdb-client-go/v2 v2.12.2 + github.com/informalsystems/tm-load-test v1.3.0 github.com/lib/pq v1.10.7 github.com/libp2p/go-buffer-pool v0.1.0 github.com/minio/highwayhash v1.0.2 github.com/ory/dockertest v3.3.5+incompatible github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.14.0 + github.com/pyroscope-io/client v0.7.2 + github.com/pyroscope-io/otel-profiling-go v0.4.0 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 github.com/rs/cors v1.8.3 github.com/sasha-s/go-deadlock v0.3.1 @@ -30,45 +44,16 @@ require ( github.com/spf13/cobra v1.6.1 github.com/spf13/viper v1.15.0 github.com/stretchr/testify v1.8.2 -) - -require ( - github.com/google/uuid v1.3.1 - golang.org/x/crypto v0.14.0 - golang.org/x/net v0.17.0 - google.golang.org/grpc v1.59.0 -) - -require ( - github.com/gogo/protobuf v1.3.2 - github.com/informalsystems/tm-load-test v1.3.0 -) - -require ( - github.com/bufbuild/buf v1.15.1 - github.com/creachadair/taskgroup v0.3.2 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 -) - -require ( - github.com/Masterminds/semver/v3 v3.2.0 - github.com/btcsuite/btcd/btcec/v2 v2.3.2 - github.com/btcsuite/btcd/btcutil v1.1.3 - github.com/celestiaorg/nmt v0.20.0 - github.com/cometbft/cometbft-db v0.7.0 - github.com/go-git/go-git/v5 v5.6.1 github.com/vektra/mockery/v2 v2.23.1 - gonum.org/v1/gonum v0.12.0 - google.golang.org/protobuf v1.31.0 -) - -require ( - github.com/influxdata/influxdb-client-go/v2 v2.12.2 - github.com/pyroscope-io/client v0.7.2 - github.com/pyroscope-io/otel-profiling-go v0.4.0 go.opentelemetry.io/otel v1.15.1 go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.15.1 go.opentelemetry.io/otel/sdk v1.15.1 + golang.org/x/crypto v0.14.0 + golang.org/x/net v0.17.0 + gonum.org/v1/gonum v0.12.0 + google.golang.org/grpc v1.59.0 + google.golang.org/protobuf v1.31.0 ) require ( From f95a434e674610b3a2c5e7d26bd87da69ccaa213 Mon Sep 17 00:00:00 2001 From: Rootul P Date: Thu, 29 Feb 2024 17:46:10 -0500 Subject: [PATCH 03/24] chore: upgrade to Go 1.22 (#1249) ## Motivation Part of https://github.com/celestiaorg/celestia-core/issues/1248 We want to cut a release of celestia-core with Go 1.22 support to enable celestia-node to bump to Go 1.22. ## Description 1. Upgrade to Go 1.22 2. Bump pyroscope deps 3. Copy over golangci-lint config from CometBFT v0.34.x branch 4. Resolve a few lint issues by copying code from CometBFT v0.34.x branch --- .github/workflows/check-generated.yml | 4 +- .github/workflows/coverage.yml | 6 +- .github/workflows/e2e-manual.yml | 2 +- .github/workflows/e2e-nightly-34x.yml | 2 +- .github/workflows/e2e.yml | 2 +- .github/workflows/fuzz-nightly.yml | 2 +- .github/workflows/govulncheck.yml | 2 +- .github/workflows/lint.yml | 4 +- .github/workflows/pre-release.yml | 2 +- .github/workflows/release-version.yml | 2 +- .github/workflows/release.yml | 3 +- .github/workflows/tests.yml | 8 +- .golangci.yml | 90 ++++++++++++++++++++-- DOCKER/Dockerfile | 3 +- Makefile | 10 +-- README.md | 2 +- go.mod | 35 ++++----- go.sum | 105 ++++++++++++++++++-------- node/node.go | 2 +- node/tracing.go | 4 +- p2p/upnp/upnp.go | 1 + rpc/core/events.go | 3 - scripts/proto-gen.sh | 2 +- state/indexer/sink/psql/psql.go | 22 ++++-- test/docker/Dockerfile | 2 +- test/e2e/docker/Dockerfile | 2 +- 26 files changed, 221 insertions(+), 101 deletions(-) diff --git a/.github/workflows/check-generated.yml b/.github/workflows/check-generated.yml index 8b6705b1fd..8225117003 100644 --- a/.github/workflows/check-generated.yml +++ b/.github/workflows/check-generated.yml @@ -19,7 +19,7 @@ jobs: # steps: # - uses: actions/setup-go@v3 # with: - # go-version: "1.19" + # go-version: "1.22" # - uses: actions/checkout@v3 @@ -43,7 +43,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.19' + go-version: '1.22' - uses: actions/checkout@v4 with: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index f5525bb706..f8f402eb6f 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: - go-version: "1.19" + go-version: "1.22" - name: Create a file with all the pkgs run: go list ./... > pkgs.txt - name: Split pkgs into 4 files @@ -48,7 +48,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: "1.19" + go-version: "1.22" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: @@ -70,7 +70,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: "1.19" + go-version: "1.22" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: diff --git a/.github/workflows/e2e-manual.yml b/.github/workflows/e2e-manual.yml index 5b93752694..a48d063f13 100644 --- a/.github/workflows/e2e-manual.yml +++ b/.github/workflows/e2e-manual.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.19' + go-version: '1.22' - uses: actions/checkout@v4 diff --git a/.github/workflows/e2e-nightly-34x.yml b/.github/workflows/e2e-nightly-34x.yml index dfa9b88526..30807051cc 100644 --- a/.github/workflows/e2e-nightly-34x.yml +++ b/.github/workflows/e2e-nightly-34x.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.19' + go-version: '1.22' - uses: actions/checkout@v4 with: diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index f265593c8b..c09a096b37 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.19' + go-version: '1.22' - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: diff --git a/.github/workflows/fuzz-nightly.yml b/.github/workflows/fuzz-nightly.yml index 7e78fd0182..5478a9ed06 100644 --- a/.github/workflows/fuzz-nightly.yml +++ b/.github/workflows/fuzz-nightly.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.19' + go-version: '1.22' - uses: actions/checkout@v4 diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml index f2993a1157..94b51653f1 100644 --- a/.github/workflows/govulncheck.yml +++ b/.github/workflows/govulncheck.yml @@ -18,7 +18,7 @@ on: # steps: # - uses: actions/setup-go@v3 # with: -# go-version: "1.19" +# go-version: "1.22" # - uses: actions/checkout@v3 # - uses: technote-space/get-diff-action@v6 # with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2a69042d98..800b958532 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: - go-version: '1.19' + go-version: '1.22' - uses: technote-space/get-diff-action@v6 with: PATTERNS: | @@ -34,7 +34,7 @@ jobs: # Required: the version of golangci-lint is required and # must be specified without patch version: we always use the # latest patch version. - version: v1.50.1 + version: v1.56.2 args: --timeout 10m github-token: ${{ secrets.github_token }} if: env.GIT_DIFF diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index a7db3aae6c..970d76a783 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/setup-go@v4 with: - go-version: '1.19' + go-version: '1.22' # Similar check to ./release-version.yml, but enforces this when pushing # tags. The ./release-version.yml check can be bypassed and is mainly diff --git a/.github/workflows/release-version.yml b/.github/workflows/release-version.yml index c7c977e4a3..c586b3a702 100644 --- a/.github/workflows/release-version.yml +++ b/.github/workflows/release-version.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/setup-go@v4 with: - go-version: '1.19' + go-version: '1.22' - name: Check version run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index da1fe53d40..e5ef876da6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/setup-go@v4 with: - go-version: '1.19' + go-version: '1.22' - name: Generate release notes run: | @@ -32,4 +32,3 @@ jobs: args: release --clean --release-notes ../release_notes.md env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 38e5caa668..8675bc0836 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,7 +25,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: "1.19" + go-version: "1.22" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: @@ -57,7 +57,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: "1.19" + go-version: "1.22" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: @@ -89,7 +89,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: "1.19" + go-version: "1.22" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: @@ -121,7 +121,7 @@ jobs: # steps: # - uses: actions/setup-go@v3 # with: - # go-version: "1.19" + # go-version: "1.22" # - uses: actions/checkout@v3 # - uses: technote-space/get-diff-action@v6 # with: diff --git a/.golangci.yml b/.golangci.yml index 32d31102a2..edd8ef149e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,3 +1,7 @@ +run: + skip-files: + - "libs/pubsub/query/query.peg.go" + linters: enable: - asciicheck @@ -10,13 +14,13 @@ linters: - goconst - gofmt - goimports - - revive + #- revive - gosec - gosimple - govet - ineffassign - misspell - - nakedret + #- nakedret - nolintlint - prealloc - staticcheck @@ -31,6 +35,13 @@ issues: - path: _test\.go linters: - gosec + - staticcheck + - nolintlint + - path: test/fuzz/ + linters: + - gosec + - nolintlint + - staticcheck max-same-issues: 50 linters-settings: @@ -40,7 +51,74 @@ linters-settings: min-confidence: 0 maligned: suggest-new: true - -run: - skip-files: - - libs/pubsub/query/query.peg.go + goconst: + ignore-tests: true + depguard: + rules: + main: + files: + - $all + - "!$test" + allow: + - $gostd + - github.com/tendermint + - github.com/cometbft + - github.com/cosmos + - github.com/gogo + - github.com/Workiva/go-datastructures + - github.com/ChainSafe/go-schnorrkel + - github.com/creachadair/taskgroup + - github.com/gtank/merlin + - github.com/btcsuite/btcd/btcec/v2 + - github.com/BurntSushi/toml + - github.com/go-git/go-git/v5 + - github.com/go-kit + - github.com/go-logfmt/logfmt + - github.com/gofrs/uuid + - github.com/google + - github.com/gorilla/websocket + - github.com/informalsystems/tm-load-test/pkg/loadtest + - github.com/lib/pq + - github.com/libp2p/go-buffer-pool + - github.com/Masterminds/semver/v3 + - github.com/minio/highwayhash + - github.com/oasisprotocol/curve25519-voi + - github.com/pkg/errors + - github.com/prometheus + - github.com/rcrowley/go-metrics + - github.com/rs/cors + - github.com/snikch/goodman + - github.com/spf13 + - github.com/stretchr/testify/require + - github.com/syndtr/goleveldb + # celestia-core specific + - github.com/influxdata/influxdb-client-go/v2 + - github.com/grafana/pyroscope-go + - github.com/grafana/otel-profiling-go + - github.com/celestiaorg/nmt + test: + files: + - "$test" + allow: + - $gostd + - github.com/cosmos + - github.com/tendermint + - github.com/cometbft + - github.com/gogo + - github.com/Workiva/go-datastructures + - github.com/ChainSafe/go-schnorrkel + - github.com/creachadair/taskgroup + - github.com/gtank/merlin + - github.com/adlio/schema + - github.com/btcsuite/btcd + - github.com/fortytw2/leaktest + - github.com/go-kit + - github.com/google/uuid + - github.com/gorilla/websocket + - github.com/lib/pq + - github.com/oasisprotocol/curve25519-voi/primitives/merlin + - github.com/ory/dockertest + - github.com/pkg/errors + - github.com/prometheus/client_golang/prometheus/promhttp + - github.com/spf13 + - github.com/stretchr/testify diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index af6361e690..a5188db391 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -1,6 +1,6 @@ # Use a build arg to ensure that both stages use the same, # hopefully current, go version. -ARG GOLANG_BASE_IMAGE=golang:1.19-alpine +ARG GOLANG_BASE_IMAGE=golang:1.22-alpine # stage 1 Generate CometBFT Binary FROM --platform=$BUILDPLATFORM $GOLANG_BASE_IMAGE as builder @@ -58,4 +58,3 @@ CMD ["node"] # Expose the data directory as a volume since there's mutable state in there VOLUME [ "$CMTHOME" ] - diff --git a/Makefile b/Makefile index 276b3a327c..9350998c71 100644 --- a/Makefile +++ b/Makefile @@ -154,7 +154,7 @@ endif proto-gen: check-proto-deps @echo "Generating Protobuf files" - @go run github.com/bufbuild/buf/cmd/buf generate + @go run github.com/bufbuild/buf/cmd/buf@v1.29.0 generate @mv ./proto/tendermint/abci/types.pb.go ./abci/types/ @cp ./proto/tendermint/rpc/grpc/types.pb.go ./rpc/grpc .PHONY: proto-gen @@ -163,7 +163,7 @@ proto-gen: check-proto-deps # execution only. proto-lint: check-proto-deps @echo "Linting Protobuf files" - @go run github.com/bufbuild/buf/cmd/buf lint + @go run github.com/bufbuild/buf/cmd/buf@v1.29.0 lint .PHONY: proto-lint proto-format: check-proto-format-deps @@ -176,11 +176,11 @@ proto-check-breaking: check-proto-deps @echo "Note: This is only useful if your changes have not yet been committed." @echo " Otherwise read up on buf's \"breaking\" command usage:" @echo " https://docs.buf.build/breaking/usage" - @go run github.com/bufbuild/buf/cmd/buf breaking --against ".git" + @go run github.com/bufbuild/buf/cmd/buf@v1.29.0 breaking --against ".git" .PHONY: proto-check-breaking proto-check-breaking-ci: - @go run github.com/bufbuild/buf/cmd/buf breaking --against $(HTTPS_GIT)#branch=v0.34.x-celestia + @go run github.com/bufbuild/buf/cmd/buf@v1.29.0 breaking --against $(HTTPS_GIT)#branch=v0.34.x-celestia .PHONY: proto-check-breaking-ci ############################################################################### @@ -259,7 +259,7 @@ format: lint: @echo "--> Running linter" - @go run github.com/golangci/golangci-lint/cmd/golangci-lint run + @go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.56.2 run .PHONY: lint vulncheck: diff --git a/README.md b/README.md index 2506c57e97..329403efaf 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ This repo intends on preserving the minimal possible diff with [cometbft/cometbf - **specific to Celestia**: consider if [celestia-app](https://github.com/celestiaorg/celestia-app) is a better target - **not specific to Celestia**: consider making the contribution upstream in CometBFT -1. [Install Go](https://go.dev/doc/install) 1.19+ +1. [Install Go](https://go.dev/doc/install) 1.22+ 2. Fork this repo 3. Clone your fork 4. Find an issue to work on (see [good first issues](https://github.com/celestiaorg/celestia-core/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)) diff --git a/go.mod b/go.mod index 9280f35779..e67be45a07 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/tendermint/tendermint -go 1.19 +go 1.22 require ( github.com/BurntSushi/toml v1.2.1 @@ -26,6 +26,8 @@ require ( github.com/google/orderedcode v0.0.1 github.com/google/uuid v1.3.1 github.com/gorilla/websocket v1.5.0 + github.com/grafana/otel-profiling-go v0.5.1 + github.com/grafana/pyroscope-go v1.1.1 github.com/gtank/merlin v0.1.1 github.com/influxdata/influxdb-client-go/v2 v2.12.2 github.com/informalsystems/tm-load-test v1.3.0 @@ -35,22 +37,20 @@ require ( github.com/ory/dockertest v3.3.5+incompatible github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.14.0 - github.com/pyroscope-io/client v0.7.2 - github.com/pyroscope-io/otel-profiling-go v0.4.0 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 github.com/rs/cors v1.8.3 github.com/sasha-s/go-deadlock v0.3.1 github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa github.com/spf13/cobra v1.6.1 github.com/spf13/viper v1.15.0 - github.com/stretchr/testify v1.8.2 + github.com/stretchr/testify v1.8.4 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 github.com/vektra/mockery/v2 v2.23.1 - go.opentelemetry.io/otel v1.15.1 - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.15.1 - go.opentelemetry.io/otel/sdk v1.15.1 - golang.org/x/crypto v0.14.0 - golang.org/x/net v0.17.0 + go.opentelemetry.io/otel v1.24.0 + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.18.0 + go.opentelemetry.io/otel/sdk v1.24.0 + golang.org/x/crypto v0.17.0 + golang.org/x/net v0.19.0 gonum.org/v1/gonum v0.12.0 google.golang.org/grpc v1.59.0 google.golang.org/protobuf v1.31.0 @@ -126,7 +126,7 @@ require ( github.com/go-critic/go-critic v0.7.0 // indirect github.com/go-git/gcfg v1.5.0 // indirect github.com/go-git/go-billy/v5 v5.4.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-toolsmith/astcast v1.1.0 // indirect github.com/go-toolsmith/astcopy v1.1.0 // indirect @@ -151,7 +151,7 @@ require ( 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.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-containerregistry v0.13.0 // indirect github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10 // indirect github.com/gordonklaus/ineffassign v0.0.0-20230107090616-13ace0543b28 // indirect @@ -160,6 +160,7 @@ require ( github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect github.com/gostaticanalysis/nilerr v0.1.1 // indirect github.com/gotestyourself/gotestyourself v2.2.0+incompatible // indirect + github.com/grafana/pyroscope-go/godeltaprof v0.1.6 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect @@ -183,7 +184,7 @@ require ( github.com/kisielk/errcheck v1.6.3 // indirect github.com/kisielk/gotool v1.0.0 // indirect github.com/kkHAIKE/contextcheck v1.1.4 // indirect - github.com/klauspost/compress v1.16.0 // indirect + github.com/klauspost/compress v1.17.3 // indirect github.com/klauspost/pgzip v1.2.5 // indirect github.com/kulti/thelper v0.6.3 // indirect github.com/kunwardeep/paralleltest v1.0.6 // indirect @@ -227,7 +228,6 @@ require ( github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.8.0 // indirect - github.com/pyroscope-io/godeltaprof v0.1.2 // indirect github.com/quasilyte/go-ruleguard v0.3.19 // indirect github.com/quasilyte/gogrep v0.5.0 // indirect github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect @@ -274,7 +274,8 @@ require ( github.com/yeya24/promlinter v0.2.0 // indirect gitlab.com/bosi/decorder v0.2.3 // indirect go.etcd.io/bbolt v1.3.6 // indirect - go.opentelemetry.io/otel/trace v1.15.1 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.10.0 // indirect go.uber.org/zap v1.24.0 // indirect @@ -282,9 +283,9 @@ require ( golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 // indirect golang.org/x/mod v0.11.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/term v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.7.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index 5647ff806a..a3e9cc6c5e 100644 --- a/go.sum +++ b/go.sum @@ -55,6 +55,7 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= +github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= 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= github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 h1:+r1rSv4gvYn0wmRjC8X7IAzX8QezqtFV9m0MUHFJgts= @@ -75,6 +76,7 @@ github.com/OpenPeeDeeP/depguard v1.1.1/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= @@ -101,6 +103,7 @@ github.com/ashanbrown/forbidigo v1.5.1/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1 github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -153,6 +156,7 @@ github.com/celestiaorg/nmt v0.20.0/go.mod h1:Oz15Ub6YPez9uJV0heoU4WpFctxazuIhKyU github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -184,6 +188,7 @@ github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkX github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/containerd/stargz-snapshotter/estargz v0.12.1 h1:+7nYmHJb0tEkcRaAW+MHqoKaJYZmkikupxCqVtmPuY0= +github.com/containerd/stargz-snapshotter/estargz v0.12.1/go.mod h1:12VUuCq3qPq4y8yUW+l5w3+oXV3cx2Po3KSe/SmPGqw= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -199,6 +204,7 @@ github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6V github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= @@ -219,6 +225,7 @@ github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRk 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/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= 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/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= @@ -274,6 +281,7 @@ github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8 github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= @@ -314,13 +322,15 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= +github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= @@ -334,6 +344,7 @@ github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlN github.com/go-toolsmith/astp v1.1.0 h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA= github.com/go-toolsmith/astp v1.1.0/go.mod h1:0T1xFGz9hicKs8Z5MfAqSUitoUYS30pDMsRVIDHs8CA= github.com/go-toolsmith/pkgload v1.2.2 h1:0CtmHq/02QhxcF7E9N5LIFcYFsMR5rdovfqTtRKkgIk= +github.com/go-toolsmith/pkgload v1.2.2/go.mod h1:R2hxLNRKuAsiXCo2i5J6ZQPhnPMOVtU+f0arbFPWCus= github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw= github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= @@ -355,7 +366,9 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188 h1:+eHOFJl1BaXrQxKX+T06f78590z4qA2ZzBTqahsKSE4= +github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= @@ -426,14 +439,15 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.13.0 h1:y1C7Z3e149OJbOPDBxLYR8ITPz8dTKqQwjErKVHJC8k= github.com/google/go-containerregistry v0.13.0/go.mod h1:J9FQ+eSS4a1aC2GNZxvNpbWhgp0487v+cgiilB4FqDo= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -454,6 +468,7 @@ github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10 h1:CqYfpuYIjnlNxM3msd github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -476,8 +491,15 @@ github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3 github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= github.com/gostaticanalysis/testutil v0.4.0 h1:nhdCmubdmDF6VEatUNjgUZBJKWRqugoISdUv3PPQgHY= +github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= github.com/gotestyourself/gotestyourself v2.2.0+incompatible h1:AQwinXlbQR2HvPjQZOmDhRqsv5mZf+Jb1RnSLxcqZcI= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= +github.com/grafana/otel-profiling-go v0.5.1 h1:stVPKAFZSa7eGiqbYuG25VcqYksR6iWvF3YH66t4qL8= +github.com/grafana/otel-profiling-go v0.5.1/go.mod h1:ftN/t5A/4gQI19/8MoWurBEtC6gFw8Dns1sJZ9W4Tls= +github.com/grafana/pyroscope-go v1.1.1 h1:PQoUU9oWtO3ve/fgIiklYuGilvsm8qaGhlY4Vw6MAcQ= +github.com/grafana/pyroscope-go v1.1.1/go.mod h1:Mw26jU7jsL/KStNSGGuuVYdUq7Qghem5P8aXYXSXG88= +github.com/grafana/pyroscope-go/godeltaprof v0.1.6 h1:nEdZ8louGAplSvIJi1HVp7kWvFvdiiYg3COLlTwJiFo= +github.com/grafana/pyroscope-go/godeltaprof v0.1.6/go.mod h1:Tk376Nbldo4Cha9RgiU7ik8WKFkNpfds98aUzS8omLE= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= @@ -525,6 +547,7 @@ github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c github.com/jgautheron/goconst v1.5.1 h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM= github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= @@ -558,8 +581,8 @@ github.com/kkHAIKE/contextcheck v1.1.4 h1:B6zAaLhOEEcjvUgIYEqystmnFk1Oemn8bvJhbt github.com/kkHAIKE/contextcheck v1.1.4/go.mod h1:1+i/gWqokIa+dm31mqGLZhZJ7Uh44DJGZVmr6QRBNJg= 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.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4= -github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.3 h1:qkRjuerhUU1EmXLYGkSH6EZL+vPSxIrYjLNAK4slzwA= +github.com/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -569,6 +592,7 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -624,6 +648,7 @@ github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-sqlite3 v1.14.9 h1:10HX2Td0ocZpYEjhilsuo6WWtUqttj2Kb0KtD86/KYA= +github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -678,11 +703,13 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo/v2 v2.8.0 h1:pAM+oBNPrpXRs+E/8spkeGx9QgekbRVyr74EUvRVOUI= +github.com/onsi/ginkgo/v2 v2.8.0/go.mod h1:6JsQiECmxCa3V5st74AL/AmsV482EDdVrGaVW6z3oYU= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= @@ -694,6 +721,7 @@ github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuh github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/ory/dockertest/v3 v3.9.1 h1:v4dkG+dlu76goxMiTT2j8zV7s4oPPEppKT8K8p2f1kY= +github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM= github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= @@ -748,12 +776,6 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/pyroscope-io/client v0.7.2 h1:OX2qdUQsS8RSkn/3C8isD7f/P0YiZQlRbAlecAaj/R8= -github.com/pyroscope-io/client v0.7.2/go.mod h1:FEocnjn+Ngzxy6EtU9ZxXWRvQ0+pffkrBxHLnPpxwi8= -github.com/pyroscope-io/godeltaprof v0.1.2 h1:MdlEmYELd5w+lvIzmZvXGNMVzW2Qc9jDMuJaPOR75g4= -github.com/pyroscope-io/godeltaprof v0.1.2/go.mod h1:psMITXp90+8pFenXkKIpNhrfmI9saQnPbba27VIaiQE= -github.com/pyroscope-io/otel-profiling-go v0.4.0 h1:Hk/rbUqOWoByoWy1tt4r5BX5xoKAvs5drr0511Ki8ic= -github.com/pyroscope-io/otel-profiling-go v0.4.0/go.mod h1:MXaofiWU7PgLP7eISUZJYVO4Z8WYMqpkYgeP4XrPLyg= github.com/quasilyte/go-ruleguard v0.3.19 h1:tfMnabXle/HzOb5Xe9CUZYWXKfkS1KwRmZyPmD9nVcc= github.com/quasilyte/go-ruleguard v0.3.19/go.mod h1:lHSn69Scl48I7Gt9cX3VrbsZYvYiBYszZOZW4A+oTEw= github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= @@ -766,6 +788,7 @@ github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5X github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= @@ -862,8 +885,9 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -882,8 +906,11 @@ github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1: github.com/tetafro/godot v1.4.11 h1:BVoBIqAf/2QdbFmSwAWnaIqDivZdOV0ZRwEm6jivLKw= github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= +github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= +github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= +github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e h1:MV6KaVu/hzByHP0UvJ4HcMGE/8a6A4Rggc/0wx2AvJo= github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= github.com/timonwong/loggercheck v0.9.4 h1:HKKhqrjcVj8sxL7K77beXh0adEm6DLjV/QOGeMXEVi4= @@ -906,6 +933,7 @@ github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyC github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/vbatts/tar-split v0.11.2 h1:Via6XqJr0hceW4wff3QRzD5gAk/tatMw/4ZA7cTlIME= +github.com/vbatts/tar-split v0.11.2/go.mod h1:vV3ZuO2yWSVsz+pfFzDG/upWH1JhjOiEaWq6kXyQ3VI= github.com/vektra/mockery/v2 v2.23.1 h1:N59FENM2d/gWE6Ns5JPuf9a7jqQWeheGefZqvuvb1dM= github.com/vektra/mockery/v2 v2.23.1/go.mod h1:Zh3Kv1ckKs6FokhlVLcCu6UTyzfS3M8mpROz1lBNp+w= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= @@ -913,8 +941,11 @@ github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17 github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= @@ -937,19 +968,24 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= -go.opentelemetry.io/otel v1.15.1 h1:3Iwq3lfRByPaws0f6bU3naAqOR1n5IeDWd9390kWHa8= -go.opentelemetry.io/otel v1.15.1/go.mod h1:mHHGEHVDLal6YrKMmk9LqC4a3sF5g+fHfrttQIB1NTc= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.15.1 h1:2PunuO5SbkN5MhCbuHCd3tC6qrcaj+uDAkX/qBU5BAs= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.15.1/go.mod h1:q8+Tha+5LThjeSU8BW93uUC5w5/+DnYHMKBMpRCsui0= -go.opentelemetry.io/otel/sdk v1.15.1 h1:5FKR+skgpzvhPQHIEfcwMYjCBr14LWzs3uSqKiQzETI= -go.opentelemetry.io/otel/sdk v1.15.1/go.mod h1:8rVtxQfrbmbHKfqzpQkT5EzZMcbMBwTzNAggbEAM0KA= -go.opentelemetry.io/otel/trace v1.4.1/go.mod h1:iYEVbroFCNut9QkwEczV9vMRPHNKSSwYZjulEtsmhFc= -go.opentelemetry.io/otel/trace v1.15.1 h1:uXLo6iHJEzDfrNC0L0mNjItIp06SyaBQxu5t3xMlngY= -go.opentelemetry.io/otel/trace v1.15.1/go.mod h1:IWdQG/5N1x7f6YUlmdLeJvH9yxtuJAfc4VW5Agv9r/8= +go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.18.0 h1:hSWWvDjXHVLq9DkmB+77fl8v7+t+yYiS+eNkiplDK54= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.18.0/go.mod h1:zG7KQql1WjZCaUJd+L/ReSYx4bjbYJxg5ws9ws+mYes= +go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= @@ -975,8 +1011,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1075,8 +1111,8 @@ golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1190,8 +1226,9 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1201,8 +1238,8 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1216,14 +1253,15 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= +golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1432,6 +1470,7 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/node/node.go b/node/node.go index 018e0c7985..7690952a46 100644 --- a/node/node.go +++ b/node/node.go @@ -11,9 +11,9 @@ import ( "time" dbm "github.com/cometbft/cometbft-db" + "github.com/grafana/pyroscope-go" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" - "github.com/pyroscope-io/client/pyroscope" "github.com/rs/cors" sdktrace "go.opentelemetry.io/otel/sdk/trace" diff --git a/node/tracing.go b/node/tracing.go index 4e2e00f76e..f49fd89f86 100644 --- a/node/tracing.go +++ b/node/tracing.go @@ -1,10 +1,10 @@ package node import ( - "github.com/pyroscope-io/client/pyroscope" + "github.com/grafana/pyroscope-go" "github.com/tendermint/tendermint/config" - otelpyroscope "github.com/pyroscope-io/otel-profiling-go" + otelpyroscope "github.com/grafana/otel-profiling-go" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/exporters/stdout/stdouttrace" "go.opentelemetry.io/otel/propagation" diff --git a/p2p/upnp/upnp.go b/p2p/upnp/upnp.go index 0df5a24cfd..cf7f9a4aa8 100644 --- a/p2p/upnp/upnp.go +++ b/p2p/upnp/upnp.go @@ -299,6 +299,7 @@ type statusInfo struct { } func (n *upnpNAT) getExternalIPAddress() (info statusInfo, err error) { + //nolint:goconst message := "\r\n" + "" diff --git a/rpc/core/events.go b/rpc/core/events.go index ec11d68ae2..2e5f02b573 100644 --- a/rpc/core/events.go +++ b/rpc/core/events.go @@ -46,9 +46,6 @@ func Subscribe(ctx *rpctypes.Context, query string) (*ctypes.ResultSubscribe, er if err != nil { return nil, err } - if sub == nil { - return nil, fmt.Errorf("env.EventBus.Subscribe() returned nil") - } closeIfSlow := env.Config.CloseOnSlowClient diff --git a/scripts/proto-gen.sh b/scripts/proto-gen.sh index cb8261fdfd..0420088fd3 100755 --- a/scripts/proto-gen.sh +++ b/scripts/proto-gen.sh @@ -10,7 +10,7 @@ cd "$(git rev-parse --show-toplevel)" # Run inside Docker to install the correct versions of the required tools # without polluting the local system. -docker run --rm -i -v "$PWD":/w --workdir=/w golang:1.19-alpine sh <<"EOF" +docker run --rm -i -v "$PWD":/w --workdir=/w golang:1.22-alpine sh <<"EOF" apk add git make go install github.com/bufbuild/buf/cmd/buf diff --git a/state/indexer/sink/psql/psql.go b/state/indexer/sink/psql/psql.go index 513aa2cd1e..638a37ecc1 100644 --- a/state/indexer/sink/psql/psql.go +++ b/state/indexer/sink/psql/psql.go @@ -90,6 +90,18 @@ func insertEvents(dbtx *sql.Tx, blockID, txID uint32, evts []abci.Event) error { txIDArg = txID } + const ( + insertEventQuery = ` + INSERT INTO ` + tableEvents + ` (block_id, tx_id, type) + VALUES ($1, $2, $3) + RETURNING rowid; + ` + insertAttributeQuery = ` + INSERT INTO ` + tableAttributes + ` (event_id, key, composite_key, value) + VALUES ($1, $2, $3, $4); + ` + ) + // Add each event to the events table, and retrieve its row ID to use when // adding any attributes the event provides. for _, evt := range evts { @@ -98,10 +110,7 @@ func insertEvents(dbtx *sql.Tx, blockID, txID uint32, evts []abci.Event) error { continue } - eid, err := queryWithID(dbtx, ` -INSERT INTO `+tableEvents+` (block_id, tx_id, type) VALUES ($1, $2, $3) - RETURNING rowid; -`, blockID, txIDArg, evt.Type) + eid, err := queryWithID(dbtx, insertEventQuery, blockID, txIDArg, evt.Type) if err != nil { return err } @@ -112,10 +121,7 @@ INSERT INTO `+tableEvents+` (block_id, tx_id, type) VALUES ($1, $2, $3) continue } compositeKey := evt.Type + "." + string(attr.Key) - if _, err := dbtx.Exec(` -INSERT INTO `+tableAttributes+` (event_id, key, composite_key, value) - VALUES ($1, $2, $3, $4); -`, eid, attr.Key, compositeKey, attr.Value); err != nil { + if _, err := dbtx.Exec(insertAttributeQuery, eid, attr.Key, compositeKey, attr.Value); err != nil { return err } } diff --git a/test/docker/Dockerfile b/test/docker/Dockerfile index b799b3acb4..1d3a685b2c 100644 --- a/test/docker/Dockerfile +++ b/test/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19 +FROM golang:1.22 # Grab deps (jq, hexdump, xxd, killall) RUN apt-get update && \ diff --git a/test/e2e/docker/Dockerfile b/test/e2e/docker/Dockerfile index c81db55fc8..9e53e2e48c 100644 --- a/test/e2e/docker/Dockerfile +++ b/test/e2e/docker/Dockerfile @@ -1,7 +1,7 @@ # We need to build in a Linux environment to support C libraries, e.g. RocksDB. # We use Debian instead of Alpine, so that we can use binary database packages # instead of spending time compiling them. -FROM golang:1.20-bullseye +FROM golang:1.22-bullseye 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 0f2855cd932c408d4d22df64d845c6941d578935 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 11:49:15 +0100 Subject: [PATCH 04/24] fix: use a separate lookup map for reserving txs (backport #1272) (#1274) This is an alternative to #1267 that solves the current problem with reserving transactions by using a separate lookup map as suggested by @rootulp.
This is an automatic backport of pull request #1272 done by [Mergify](https://mergify.com). Co-authored-by: Callum Waters --- mempool/cat/store.go | 36 +++++++++++++++++++++--------------- mempool/cat/store_test.go | 15 +++++++++++++-- 2 files changed, 34 insertions(+), 17 deletions(-) diff --git a/mempool/cat/store.go b/mempool/cat/store.go index 94ac9e0b2a..1a8f10902e 100644 --- a/mempool/cat/store.go +++ b/mempool/cat/store.go @@ -9,15 +9,17 @@ import ( // simple, thread-safe in memory store for transactions type store struct { - mtx sync.RWMutex - bytes int64 - txs map[types.TxKey]*wrappedTx + mtx sync.RWMutex + bytes int64 + txs map[types.TxKey]*wrappedTx + reservedTxs map[types.TxKey]struct{} } func newStore() *store { return &store{ - bytes: 0, - txs: make(map[types.TxKey]*wrappedTx), + bytes: 0, + txs: make(map[types.TxKey]*wrappedTx), + reservedTxs: make(map[types.TxKey]struct{}), } } @@ -27,7 +29,7 @@ func (s *store) set(wtx *wrappedTx) bool { } s.mtx.Lock() defer s.mtx.Unlock() - if tx, exists := s.txs[wtx.key]; !exists || tx.height == -1 { + if _, exists := s.txs[wtx.key]; !exists { s.txs[wtx.key] = wtx s.bytes += wtx.size() return true @@ -65,23 +67,27 @@ func (s *store) remove(txKey types.TxKey) bool { func (s *store) reserve(txKey types.TxKey) bool { s.mtx.Lock() defer s.mtx.Unlock() - _, has := s.txs[txKey] - if !has { - s.txs[txKey] = &wrappedTx{height: -1} + _, isReserved := s.reservedTxs[txKey] + if !isReserved { + s.reservedTxs[txKey] = struct{}{} return true } return false } -// release is called when a pending transaction failed -// to enter the mempool. The empty element and key is removed. +func (s *store) isReserved(txKey types.TxKey) bool { + s.mtx.RLock() + defer s.mtx.RUnlock() + _, isReserved := s.reservedTxs[txKey] + return isReserved +} + +// release is called at the end of the process of adding a transaction. +// Regardless if it is added or not, the reserveTxs lookup map element is deleted. func (s *store) release(txKey types.TxKey) { s.mtx.Lock() defer s.mtx.Unlock() - value, ok := s.txs[txKey] - if ok && value.height == -1 { - delete(s.txs, txKey) - } + delete(s.reservedTxs, txKey) } func (s *store) size() int { diff --git a/mempool/cat/store_test.go b/mempool/cat/store_test.go index 4a29106ee7..4397f239ea 100644 --- a/mempool/cat/store_test.go +++ b/mempool/cat/store_test.go @@ -54,7 +54,7 @@ func TestStoreReservingTxs(t *testing.T) { // reserve a tx store.reserve(key) - require.True(t, store.has(key)) + require.True(t, store.isReserved(key)) // should not update the total bytes require.Zero(t, store.totalBytes()) @@ -73,13 +73,24 @@ func TestStoreReservingTxs(t *testing.T) { // reserve the tx again store.reserve(key) - require.True(t, store.has(key)) + require.True(t, store.isReserved(key)) // release should remove the tx store.release(key) require.False(t, store.has(key)) } +func TestReadReserved(t *testing.T) { + store := newStore() + tx := types.Tx("tx1") + store.reserve(tx.Key()) + + require.Nil(t, store.get(tx.Key())) + require.False(t, store.has(tx.Key())) + require.Len(t, store.getAllKeys(), 0) + require.Len(t, store.getAllTxs(), 0) +} + func TestStoreConcurrentAccess(t *testing.T) { store := newStore() From 05543c8ed486a9c09d0b3100a14d34c19e7c41ec Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 4 Apr 2024 18:01:59 -0700 Subject: [PATCH 05/24] chore(deps): upgrade to Go 1.22.2 (backport #1283) (#1286) ## Description bumping the go version cause apparently there was a vulnerability
This is an automatic backport of pull request #1283 done by [Mergify](https://mergify.com). --------- Co-authored-by: Evan Forbes <42654277+evan-forbes@users.noreply.github.com> Co-authored-by: Rootul Patel --- .github/workflows/check-generated.yml | 4 +- .github/workflows/coverage.yml | 6 +- .github/workflows/e2e-manual.yml | 2 +- .github/workflows/e2e-nightly-34x.yml | 2 +- .github/workflows/e2e.yml | 4 +- .github/workflows/fuzz-nightly.yml | 2 +- .github/workflows/govulncheck.yml | 38 ++++---- .github/workflows/lint.yml | 2 +- .github/workflows/pre-release.yml | 2 +- .github/workflows/release-version.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/tests.yml | 10 +-- DOCKER/Dockerfile | 2 +- README.md | 2 +- go.mod | 37 ++++---- go.sum | 122 +++++++++++++------------- scripts/proto-gen.sh | 2 +- test/docker/Dockerfile | 2 +- test/e2e/docker/Dockerfile | 2 +- 19 files changed, 124 insertions(+), 121 deletions(-) diff --git a/.github/workflows/check-generated.yml b/.github/workflows/check-generated.yml index 8225117003..b36de99cf6 100644 --- a/.github/workflows/check-generated.yml +++ b/.github/workflows/check-generated.yml @@ -19,7 +19,7 @@ jobs: # steps: # - uses: actions/setup-go@v3 # with: - # go-version: "1.22" + # go-version: "1.22.2" # - uses: actions/checkout@v3 @@ -43,7 +43,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.22' + go-version: "1.22.2" - uses: actions/checkout@v4 with: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index f8f402eb6f..6dc0b8e24c 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: - go-version: "1.22" + go-version: "1.22.2" - name: Create a file with all the pkgs run: go list ./... > pkgs.txt - name: Split pkgs into 4 files @@ -48,7 +48,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: "1.22" + go-version: "1.22.2" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: @@ -70,7 +70,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: "1.22" + go-version: "1.22.2" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: diff --git a/.github/workflows/e2e-manual.yml b/.github/workflows/e2e-manual.yml index a48d063f13..aa0fdbe9b2 100644 --- a/.github/workflows/e2e-manual.yml +++ b/.github/workflows/e2e-manual.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.22' + go-version: '1.22.2' - uses: actions/checkout@v4 diff --git a/.github/workflows/e2e-nightly-34x.yml b/.github/workflows/e2e-nightly-34x.yml index 30807051cc..fbc0d1c074 100644 --- a/.github/workflows/e2e-nightly-34x.yml +++ b/.github/workflows/e2e-nightly-34x.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.22' + go-version: '1.22.2' - uses: actions/checkout@v4 with: diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index c09a096b37..f15ae6efbb 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -14,8 +14,8 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.22' - - uses: actions/checkout@v4 + go-version: '1.22.2' + - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6 with: PATTERNS: | diff --git a/.github/workflows/fuzz-nightly.yml b/.github/workflows/fuzz-nightly.yml index 5478a9ed06..43a5130e58 100644 --- a/.github/workflows/fuzz-nightly.yml +++ b/.github/workflows/fuzz-nightly.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.22' + go-version: '1.22.2' - uses: actions/checkout@v4 diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml index 94b51653f1..2456c89e3a 100644 --- a/.github/workflows/govulncheck.yml +++ b/.github/workflows/govulncheck.yml @@ -10,23 +10,21 @@ on: branches: - v[0-9]+.[0-9]+.x-celestia -# TODO: re-enable after figuring out what needs to get fixed or if this is -# handled upstream in main -# jobs: -# govulncheck: -# runs-on: ubuntu-latest -# steps: -# - uses: actions/setup-go@v3 -# with: -# go-version: "1.22" -# - uses: actions/checkout@v3 -# - uses: technote-space/get-diff-action@v6 -# with: -# PATTERNS: | -# **/*.go -# go.mod -# go.sum -# Makefile -# - name: govulncheck -# run: make vulncheck -# if: "env.GIT_DIFF != ''" +jobs: + govulncheck: + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v3 + with: + go-version: "1.22.2" + - uses: actions/checkout@v3 + - uses: technote-space/get-diff-action@v6 + with: + PATTERNS: | + **/*.go + go.mod + go.sum + Makefile + - name: govulncheck + run: make vulncheck + if: "env.GIT_DIFF != ''" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 800b958532..c53cd9f62a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: - go-version: '1.22' + go-version: '1.22.2' - uses: technote-space/get-diff-action@v6 with: PATTERNS: | diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 970d76a783..2a6cd29807 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/setup-go@v4 with: - go-version: '1.22' + go-version: '1.22.2' # Similar check to ./release-version.yml, but enforces this when pushing # tags. The ./release-version.yml check can be bypassed and is mainly diff --git a/.github/workflows/release-version.yml b/.github/workflows/release-version.yml index c586b3a702..a080834af5 100644 --- a/.github/workflows/release-version.yml +++ b/.github/workflows/release-version.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/setup-go@v4 with: - go-version: '1.22' + go-version: '1.22.2' - name: Check version run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e5ef876da6..32687945f3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/setup-go@v4 with: - go-version: '1.22' + go-version: '1.22.2' - name: Generate release notes run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8675bc0836..f4cde15b2f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,8 +25,8 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: "1.22" - - uses: actions/checkout@v4 + go-version: "1.22.2" + - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6 with: PATTERNS: | @@ -57,7 +57,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: "1.22" + go-version: "1.22.2" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: @@ -89,7 +89,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: "1.22" + go-version: "1.22.2" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: @@ -121,7 +121,7 @@ jobs: # steps: # - uses: actions/setup-go@v3 # with: - # go-version: "1.22" + # go-version: "1.22.2" # - uses: actions/checkout@v3 # - uses: technote-space/get-diff-action@v6 # with: diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index a5188db391..17b199886f 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -1,6 +1,6 @@ # Use a build arg to ensure that both stages use the same, # hopefully current, go version. -ARG GOLANG_BASE_IMAGE=golang:1.22-alpine +ARG GOLANG_BASE_IMAGE=golang:1.22.2-alpine # stage 1 Generate CometBFT Binary FROM --platform=$BUILDPLATFORM $GOLANG_BASE_IMAGE as builder diff --git a/README.md b/README.md index 329403efaf..695fb8d6c9 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ This repo intends on preserving the minimal possible diff with [cometbft/cometbf - **specific to Celestia**: consider if [celestia-app](https://github.com/celestiaorg/celestia-app) is a better target - **not specific to Celestia**: consider making the contribution upstream in CometBFT -1. [Install Go](https://go.dev/doc/install) 1.22+ +1. [Install Go](https://go.dev/doc/install) 1.22.2+ 2. Fork this repo 3. Clone your fork 4. Find an issue to work on (see [good first issues](https://github.com/celestiaorg/celestia-core/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)) diff --git a/go.mod b/go.mod index e67be45a07..4d515c5af2 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/tendermint/tendermint -go 1.22 +go 1.22.2 require ( github.com/BurntSushi/toml v1.2.1 @@ -15,7 +15,7 @@ require ( github.com/cometbft/cometbft-db v0.7.0 github.com/creachadair/taskgroup v0.3.2 github.com/fortytw2/leaktest v1.3.0 - github.com/go-git/go-git/v5 v5.6.1 + github.com/go-git/go-git/v5 v5.11.0 github.com/go-kit/kit v0.12.0 github.com/go-kit/log v0.2.1 github.com/go-logfmt/logfmt v0.6.0 @@ -48,10 +48,10 @@ require ( github.com/vektra/mockery/v2 v2.23.1 go.opentelemetry.io/otel v1.24.0 go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.18.0 - go.opentelemetry.io/otel/sdk v1.24.0 - golang.org/x/crypto v0.17.0 - golang.org/x/net v0.19.0 - gonum.org/v1/gonum v0.12.0 + go.opentelemetry.io/otel/sdk v1.21.0 + golang.org/x/crypto v0.21.0 + golang.org/x/net v0.23.0 + gonum.org/v1/gonum v0.8.2 google.golang.org/grpc v1.59.0 google.golang.org/protobuf v1.31.0 ) @@ -59,6 +59,7 @@ require ( require ( 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect 4d63.com/gochecknoglobals v0.2.1 // indirect + dario.cat/mergo v1.0.0 // indirect github.com/Abirdcfly/dupword v0.0.11 // indirect github.com/Antonboom/errname v0.1.9 // indirect github.com/Antonboom/nilnil v0.1.3 // indirect @@ -66,11 +67,10 @@ require ( 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 - github.com/Microsoft/go-winio v0.6.0 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/OpenPeeDeeP/depguard v1.1.1 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect - github.com/acomagu/bufpipe v1.0.4 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect github.com/alingse/asasalint v0.0.11 // indirect github.com/ashanbrown/forbidigo v1.5.1 // indirect @@ -90,11 +90,12 @@ require ( github.com/charithe/durationcheck v0.0.10 // indirect github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 // indirect github.com/chigopher/pathlib v0.12.0 // indirect - github.com/cloudflare/circl v1.3.1 // indirect + github.com/cloudflare/circl v1.3.3 // indirect github.com/containerd/continuity v0.3.0 // indirect github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect + github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/daixiang0/gci v0.10.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect @@ -124,8 +125,8 @@ require ( github.com/fzipp/gocyclo v0.6.0 // indirect github.com/go-chi/chi/v5 v5.0.8 // indirect github.com/go-critic/go-critic v0.7.0 // indirect - github.com/go-git/gcfg v1.5.0 // indirect - github.com/go-git/go-billy/v5 v5.4.1 // indirect + github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect + github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-toolsmith/astcast v1.1.0 // indirect @@ -140,6 +141,7 @@ require ( github.com/gofrs/flock v0.8.1 // indirect github.com/gofrs/uuid/v5 v5.0.0 // indirect github.com/golang/glog v1.1.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect @@ -168,7 +170,6 @@ require ( github.com/hashicorp/hcl v1.0.0 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect github.com/iancoleman/strcase v0.2.0 // indirect - github.com/imdario/mergo v0.3.13 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect @@ -247,7 +248,7 @@ require ( github.com/sivchari/containedctx v1.0.2 // indirect github.com/sivchari/nosnakecase v1.7.0 // indirect github.com/sivchari/tenv v1.7.1 // indirect - github.com/skeema/knownhosts v1.1.0 // indirect + github.com/skeema/knownhosts v1.2.1 // indirect github.com/sonatard/noctx v0.0.2 // indirect github.com/sourcegraph/go-diff v0.7.0 // indirect github.com/spf13/afero v1.9.3 // indirect @@ -281,12 +282,12 @@ require ( go.uber.org/zap v1.24.0 // indirect golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb // indirect golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 // indirect - golang.org/x/mod v0.11.0 // indirect + golang.org/x/mod v0.12.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.17.0 // indirect - golang.org/x/term v0.15.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.7.0 // indirect + golang.org/x/tools v0.13.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect diff --git a/go.sum b/go.sum index a3e9cc6c5e..63bad11924 100644 --- a/go.sum +++ b/go.sum @@ -39,6 +39,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Abirdcfly/dupword v0.0.11 h1:z6v8rMETchZXUIuHxYNmlUAuKuB21PeaSymTed16wgU= github.com/Abirdcfly/dupword v0.0.11/go.mod h1:wH8mVGuf3CP5fsBTkfWwwwKTjDnVVCxtU8d8rgeVYXA= @@ -65,25 +67,24 @@ github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF0 github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= -github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OpenPeeDeeP/depguard v1.1.1 h1:TSUznLjvp/4IUP+OQ0t/4jF4QUyxIcVX8YnghZdunyA= github.com/OpenPeeDeeP/depguard v1.1.1/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= -github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= -github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= +github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= +github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= -github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= -github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -150,7 +151,7 @@ github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+ github.com/bufbuild/protocompile v0.5.1/go.mod h1:G5iLmavmF4NsYtpZFvE3B/zFch2GIY8+wjsYLR/lc40= github.com/butuzov/ireturn v0.1.1 h1:QvrO2QF2+/Cx1WA/vETCIYBKtRjc30vesdoPUNo1EbY= github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= -github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/celestiaorg/nmt v0.20.0 h1:9i7ultZ8Wv5ytt8ZRaxKQ5KOOMo4A2K2T/aPGjIlSas= github.com/celestiaorg/nmt v0.20.0/go.mod h1:Oz15Ub6YPez9uJV0heoU4WpFctxazuIhKyUtaYNio7E= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= @@ -176,9 +177,8 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= -github.com/cloudflare/circl v1.3.1 h1:4OVCZRL62ijwEwxnF6I7hLwxvIYi3VaZt8TflkqtrtA= -github.com/cloudflare/circl v1.3.1/go.mod h1:+CauBF6R70Jqcyl8N2hC8pAXYbWkGIezuSbuGLtRhnw= +github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= +github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= 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= @@ -202,13 +202,14 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHH github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= +github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/daixiang0/gci v0.10.1 h1:eheNA3ljF6SxnPD/vE4lCBusVHmV3Rs3dkKvFrJ7MR0= github.com/daixiang0/gci v0.10.1/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -251,6 +252,8 @@ github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -277,6 +280,7 @@ github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g= github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= @@ -297,15 +301,14 @@ github.com/go-chi/chi/v5 v5.0.8 h1:lD+NLqFcAi1ovnVZpsnObHGW4xb4J8lNmoYVfECH1Y0= github.com/go-chi/chi/v5 v5.0.8/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-critic/go-critic v0.7.0 h1:tqbKzB8pqi0NsRZ+1pyU4aweAF7A7QN0Pi4Q02+rYnQ= github.com/go-critic/go-critic v0.7.0/go.mod h1:moYzd7GdVXE2C2hYTwd7h0CPcqlUeclsyBRwMa38v64= -github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= -github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= -github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4= -github.com/go-git/go-billy/v5 v5.4.1/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= -github.com/go-git/go-git-fixtures/v4 v4.3.1 h1:y5z6dd3qi8Hl+stezc8p3JxDkoTRqMAlKnXHuzrfjTQ= -github.com/go-git/go-git-fixtures/v4 v4.3.1/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo= -github.com/go-git/go-git/v5 v5.6.1 h1:q4ZRqQl4pR/ZJHc1L5CFjGA1a10u76aV1iC+nh+bHsk= -github.com/go-git/go-git/v5 v5.6.1/go.mod h1:mvyoL6Unz0PiTQrGQfSfiLFhBH1c1e84ylC2MDs4ee8= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= +github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= +github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= +github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4= +github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -369,12 +372,15 @@ github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZ github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188 h1:+eHOFJl1BaXrQxKX+T06f78590z4qA2ZzBTqahsKSE4= github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -440,7 +446,6 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.13.0 h1:y1C7Z3e149OJbOPDBxLYR8ITPz8dTKqQwjErKVHJC8k= @@ -543,7 +548,6 @@ github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84 h1:2uT3aivO7NVpUPGcQ github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84/go.mod h1:Zi/ZFkEqFHTm7qkjyNJjaWH4LQA9LQhGJyF0lTYGpxw= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jgautheron/goconst v1.5.1 h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM= github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= @@ -568,6 +572,7 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/junk1tm/musttag v0.5.0 h1:bV1DTdi38Hi4pG4OVWa7Kap0hi0o7EczuK6wQt9zPOM= github.com/junk1tm/musttag v0.5.0/go.mod h1:PcR7BA+oREQYvHwgjIDmw3exJeds5JzRcvEJTfjrA0M= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= @@ -628,7 +633,6 @@ github.com/maratori/testpackage v1.1.1 h1:S58XVV5AD7HADMmD0fNnziNHqKvSdDuEKdPD1r github.com/maratori/testpackage v1.1.1/go.mod h1:s4gRK/ym6AMrqpOa/kEbQTV4Q4jb7WeLZzVhVVVOQMc= github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 h1:gWg6ZQ4JhDfJPqlo2srm/LN17lpybq15AryXIRcWYLE= github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= -github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= @@ -666,7 +670,6 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mmcloughlin/avo v0.5.0/go.mod h1:ChHFdoV7ql95Wi7vuq2YT1bwCJqiWdZrQ1im3VujLYM= github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= @@ -708,8 +711,8 @@ github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5 github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= -github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= @@ -787,8 +790,8 @@ github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= @@ -815,7 +818,6 @@ github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdh github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/securego/gosec/v2 v2.15.0 h1:v4Ym7FF58/jlykYmmhZ7mTm7FQvN/setNm++0fgIAtw= github.com/securego/gosec/v2 v2.15.0/go.mod h1:VOjTrZOkUtSDt2QLSJmQBMWnvwiQPEjg0l+5juIqGk8= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= @@ -836,8 +838,8 @@ github.com/sivchari/nosnakecase v1.7.0 h1:7QkpWIRMe8x25gckkFd2A5Pi6Ymo0qgr4JrhGt github.com/sivchari/nosnakecase v1.7.0/go.mod h1:CwDzrzPea40/GB6uynrNLiorAlgFRvRbFSgJx2Gs+QY= github.com/sivchari/tenv v1.7.1 h1:PSpuD4bu6fSmtWMxSGWcvqUUgIn7k3yOJhOIzVWn8Ak= github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= -github.com/skeema/knownhosts v1.1.0 h1:Wvr9V0MxhjRbl3f9nMnKnFfiWTJmtECJ9Njkea3ysW0= -github.com/skeema/knownhosts v1.1.0/go.mod h1:sKFq3RD6/TKZkSWn8boUbDC7Qkgcv+8XXijpFO6roag= +github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= +github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa h1:YJfZp12Z3AFhSBeXOlv4BO55RMwPn2NoQeDsrdWnBtY= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= @@ -976,9 +978,8 @@ go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.18.0/go.mod h1:zG7KQql1 go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= @@ -990,7 +991,6 @@ go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= -golang.org/x/arch v0.1.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1006,14 +1006,16 @@ golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= @@ -1029,6 +1031,7 @@ golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 h1:J74nGeMgeFnYQJN59eFwh06jX/V8g0lB7LWpjSLxtgU= golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1059,8 +1062,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1104,15 +1107,14 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1194,7 +1196,6 @@ golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1216,9 +1217,7 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1226,20 +1225,21 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1253,6 +1253,7 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1265,6 +1266,7 @@ golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1335,14 +1337,18 @@ golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.12.0 h1:xKuo6hzt+gMav00meVPUlXwSdoEJP46BR+wdxQEFK2o= -gonum.org/v1/gonum v0.12.0/go.mod h1:73TDxJfAAHeA8Mk9mf8NlIppyhQNo5GLTcYeqgo2lvY= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.8.2 h1:CCXrcPKiGGotvnN6jfUsKk4rRqm7q09/YbKb5xCEvtM= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0 h1:OE9mWmgKkjJyEmDAAtGMPjXu+YNeGvK9VTSHY6+Qihc= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1444,7 +1450,6 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -1464,7 +1469,6 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= diff --git a/scripts/proto-gen.sh b/scripts/proto-gen.sh index 0420088fd3..7369ac9474 100755 --- a/scripts/proto-gen.sh +++ b/scripts/proto-gen.sh @@ -10,7 +10,7 @@ cd "$(git rev-parse --show-toplevel)" # Run inside Docker to install the correct versions of the required tools # without polluting the local system. -docker run --rm -i -v "$PWD":/w --workdir=/w golang:1.22-alpine sh <<"EOF" +docker run --rm -i -v "$PWD":/w --workdir=/w golang:1.22.2-alpine sh <<"EOF" apk add git make go install github.com/bufbuild/buf/cmd/buf diff --git a/test/docker/Dockerfile b/test/docker/Dockerfile index 1d3a685b2c..c9eca7a7d1 100644 --- a/test/docker/Dockerfile +++ b/test/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22 +FROM golang:1.22.2 # Grab deps (jq, hexdump, xxd, killall) RUN apt-get update && \ diff --git a/test/e2e/docker/Dockerfile b/test/e2e/docker/Dockerfile index 9e53e2e48c..bc7d26dd00 100644 --- a/test/e2e/docker/Dockerfile +++ b/test/e2e/docker/Dockerfile @@ -1,7 +1,7 @@ # We need to build in a Linux environment to support C libraries, e.g. RocksDB. # We use Debian instead of Alpine, so that we can use binary database packages # instead of spending time compiling them. -FROM golang:1.22-bullseye +FROM golang:1.22.2-bullseye 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 9c7b49feea76cdefdea7e3763bc5cbbd79e4283f Mon Sep 17 00:00:00 2001 From: Rootul P Date: Fri, 12 Apr 2024 13:47:18 -0400 Subject: [PATCH 06/24] Update CODEOWNERS (#1301) For consistency with celestia-app --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 09e849ee7e..598c8888b3 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -7,7 +7,7 @@ # global owners are only requested if there isn't a more specific # codeowner specified below. For this reason, the global codeowners # are often repeated in package-level definitions. -* @evan-forbes @cmwaters @staheri14 @rach-id @ninabarbakadze @rootulp +* @celestiaorg/celestia-core # Overrides for tooling packages docs/celestia-architecture @liamsi @adlerjohn From d3ff8e78962db594b3fea84de838bd2df2a2f7cd Mon Sep 17 00:00:00 2001 From: Evan Forbes <42654277+evan-forbes@users.noreply.github.com> Date: Tue, 16 Apr 2024 18:28:20 -0500 Subject: [PATCH 07/24] feat!: replace the influx tracer with a local one (#1290) manual of backport of #1279 --- .golangci.yml | 1 - cmd/cometbft/commands/run_node.go | 12 +- config/config.go | 55 +++--- config/toml.go | 27 +-- consensus/reactor.go | 16 +- consensus/state.go | 8 +- go.mod | 51 ++--- go.sum | 217 ++++++-------------- mempool/cat/reactor.go | 51 +++-- mempool/v1/mempool.go | 20 +- mempool/v1/reactor.go | 32 ++- mempool/v1/reactor_test.go | 2 +- node/node.go | 24 ++- pkg/trace/README.md | 168 ++++++---------- pkg/trace/buffered_file.go | 56 ++++++ pkg/trace/client.go | 155 --------------- pkg/trace/decoder.go | 34 ++++ pkg/trace/doc.go | 101 +--------- pkg/trace/fileserver.go | 317 ++++++++++++++++++++++++++++++ pkg/trace/flags.go | 8 +- pkg/trace/local_tracer.go | 203 +++++++++++++++++++ pkg/trace/local_tracer_test.go | 153 ++++++++++++++ pkg/trace/schema/consensus.go | 218 ++++++++++---------- pkg/trace/schema/mempool.go | 132 +++++-------- pkg/trace/schema/schema.go | 36 ++++ pkg/trace/schema/schema_test.go | 17 ++ pkg/trace/schema/tables.go | 42 ---- pkg/trace/tracer.go | 49 +++++ test/e2e/node/main.go | 2 + test/e2e/pkg/infrastructure.go | 10 +- test/e2e/pkg/testnet.go | 8 +- test/e2e/runner/main.go | 14 +- test/e2e/runner/setup.go | 7 +- test/maverick/node/node.go | 2 +- 34 files changed, 1299 insertions(+), 949 deletions(-) create mode 100644 pkg/trace/buffered_file.go delete mode 100644 pkg/trace/client.go create mode 100644 pkg/trace/decoder.go create mode 100644 pkg/trace/fileserver.go create mode 100644 pkg/trace/local_tracer.go create mode 100644 pkg/trace/local_tracer_test.go create mode 100644 pkg/trace/schema/schema.go create mode 100644 pkg/trace/schema/schema_test.go delete mode 100644 pkg/trace/schema/tables.go create mode 100644 pkg/trace/tracer.go diff --git a/.golangci.yml b/.golangci.yml index edd8ef149e..e101841b3d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -6,7 +6,6 @@ linters: enable: - asciicheck - bodyclose - - depguard - dogsled - dupl - errcheck diff --git a/cmd/cometbft/commands/run_node.go b/cmd/cometbft/commands/run_node.go index 58b40b2bed..0bef6485ba 100644 --- a/cmd/cometbft/commands/run_node.go +++ b/cmd/cometbft/commands/run_node.go @@ -96,15 +96,15 @@ func AddNodeFlags(cmd *cobra.Command) { "database directory") cmd.PersistentFlags().String( - trace.FlagInfluxDBURL, - config.Instrumentation.InfluxURL, - trace.FlagInfluxDBURLDescription, + trace.FlagTracePushConfig, + config.Instrumentation.TracePushConfig, + trace.FlagTracePushConfigDescription, ) cmd.PersistentFlags().String( - trace.FlagInfluxDBToken, - config.Instrumentation.InfluxToken, - trace.FlagInfluxDBTokenDescription, + trace.FlagTracePullAddress, + config.Instrumentation.TracePullAddress, + trace.FlagTracePullAddressDescription, ) cmd.PersistentFlags().String( diff --git a/config/config.go b/config/config.go index 1a202715a0..0806426184 100644 --- a/config/config.go +++ b/config/config.go @@ -62,11 +62,11 @@ var ( minSubscriptionBufferSize = 100 defaultSubscriptionBufferSize = 200 - // DefaultInfluxTables is a list of tables that are used for storing traces. + // DefaultTracingTables is a list of tables that are used for storing traces. // This global var is filled by an init function in the schema package. This // allows for the schema package to contain all the relevant logic while // avoiding import cycles. - DefaultInfluxTables = []string{} + DefaultTracingTables = "" ) // Config defines the top level configuration for a CometBFT node @@ -1188,24 +1188,24 @@ type InstrumentationConfig struct { // Instrumentation namespace. Namespace string `mapstructure:"namespace"` - // InfluxURL is the influxdb url. - InfluxURL string `mapstructure:"influx_url"` + // TracePushConfig is the relative path of the push config. This second + // config contains credentials for where and how often to. + TracePushConfig string `mapstructure:"trace_push_config"` - // InfluxToken is the influxdb token. - InfluxToken string `mapstructure:"influx_token"` + // TracePullAddress is the address that the trace server will listen on for + // pulling data. + TracePullAddress string `mapstructure:"trace_pull_address"` - // InfluxOrg is the influxdb organization. - InfluxOrg string `mapstructure:"influx_org"` + // TraceType is the type of tracer used. Options are "local" and "noop". + TraceType string `mapstructure:"trace_type"` - // InfluxBucket is the influxdb bucket. - InfluxBucket string `mapstructure:"influx_bucket"` + // TraceBufferSize is the number of traces to write in a single batch. + TraceBufferSize int `mapstructure:"trace_push_batch_size"` - // InfluxBatchSize is the number of points to write in a single batch. - InfluxBatchSize int `mapstructure:"influx_batch_size"` - - // InfluxTables is the list of tables that will be traced. See the - // pkg/trace/schema for a complete list of tables. - InfluxTables []string `mapstructure:"influx_tables"` + // TracingTables is the list of tables that will be traced. See the + // pkg/trace/schema for a complete list of tables. It is represented as a + // comma separate string. For example: "consensus_round_state,mempool_tx". + TracingTables string `mapstructure:"tracing_tables"` // PyroscopeURL is the pyroscope url used to establish a connection with a // pyroscope continuous profiling server. @@ -1229,11 +1229,11 @@ func DefaultInstrumentationConfig() *InstrumentationConfig { PrometheusListenAddr: ":26660", MaxOpenConnections: 3, Namespace: "cometbft", - InfluxURL: "", - InfluxOrg: "celestia", - InfluxBucket: "e2e", - InfluxBatchSize: 20, - InfluxTables: DefaultInfluxTables, + TracePushConfig: "", + TracePullAddress: "", + TraceType: "noop", + TraceBufferSize: 1000, + TracingTables: DefaultTracingTables, PyroscopeURL: "", PyroscopeTrace: false, PyroscopeProfileTypes: []string{ @@ -1264,21 +1264,18 @@ func (cfg *InstrumentationConfig) ValidateBasic() error { if cfg.PyroscopeTrace && cfg.PyroscopeURL == "" { return errors.New("pyroscope_trace can't be enabled if profiling is disabled") } - // if there is not InfluxURL configured, then we do not need to validate the rest + // if there is not TracePushConfig configured, then we do not need to validate the rest // of the config because we are not connecting. - if cfg.InfluxURL == "" { + if cfg.TracePushConfig == "" { return nil } - if cfg.InfluxToken == "" { + if cfg.TracePullAddress == "" { return fmt.Errorf("token is required") } - if cfg.InfluxOrg == "" { + if cfg.TraceType == "" { return fmt.Errorf("org is required") } - if cfg.InfluxBucket == "" { - return fmt.Errorf("bucket is required") - } - if cfg.InfluxBatchSize <= 0 { + if cfg.TraceBufferSize <= 0 { return fmt.Errorf("batch size must be greater than 0") } return nil diff --git a/config/toml.go b/config/toml.go index 34c99aba7a..3d774515b2 100644 --- a/config/toml.go +++ b/config/toml.go @@ -547,25 +547,26 @@ max_open_connections = {{ .Instrumentation.MaxOpenConnections }} # Instrumentation namespace namespace = "{{ .Instrumentation.Namespace }}" -# The URL of the influxdb instance to use for remote event -# collection. If empty, remote event collection is disabled. -influx_url = "{{ .Instrumentation.InfluxURL }}" +# TracePushConfig is the relative path of the push config. +# This second config contains credentials for where and how often to +# push trace data to. For example, if the config is next to this config, +# it would be "push_config.json". +trace_push_config = "{{ .Instrumentation.TracePushConfig }}" -# The influxdb token to use for remote event collection. -influx_token = "{{ .Instrumentation.InfluxToken }}" +# The tracer pull address specifies which address will be used for pull based +# event collection. If empty, the pull based server will not be started. +trace_pull_address = "{{ .Instrumentation.TracePullAddress }}" -# The influxdb bucket to use for remote event collection. -influx_bucket = "{{ .Instrumentation.InfluxBucket }}" - -# The influxdb org to use for event remote collection. -influx_org = "{{ .Instrumentation.InfluxOrg }}" +# The tracer to use for collecting trace data. +trace_type = "{{ .Instrumentation.TraceType }}" # The size of the batches that are sent to the database. -influx_batch_size = {{ .Instrumentation.InfluxBatchSize }} +trace_push_batch_size = {{ .Instrumentation.TraceBufferSize }} # The list of tables that are updated when tracing. All available tables and -# their schema can be found in the pkg/trace/schema package. -influx_tables = [{{ range .Instrumentation.InfluxTables }}{{ printf "%q, " . }}{{end}}] +# their schema can be found in the pkg/trace/schema package. It is represented as a +# comma separate string. For example: "consensus_round_state,mempool_tx". +tracing_tables = "{{ .Instrumentation.TracingTables }}" # The URL of the pyroscope instance to use for continuous profiling. # If empty, continuous profiling is disabled. diff --git a/consensus/reactor.go b/consensus/reactor.go index ce5ce90b7c..f792f4cef1 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -50,7 +50,7 @@ type Reactor struct { rs *cstypes.RoundState Metrics *Metrics - traceClient *trace.Client + traceClient trace.Tracer } type ReactorOption func(*Reactor) @@ -63,7 +63,7 @@ func NewReactor(consensusState *State, waitSync bool, options ...ReactorOption) waitSync: waitSync, rs: consensusState.GetRoundState(), Metrics: NopMetrics(), - traceClient: &trace.Client{}, + traceClient: trace.NoOpTracer(), } conR.BaseReactor = *p2p.NewBaseReactor("Consensus", conR) @@ -338,7 +338,7 @@ func (conR *Reactor) ReceiveEnvelope(e p2p.Envelope) { case *BlockPartMessage: ps.SetHasProposalBlockPart(msg.Height, msg.Round, int(msg.Part.Index)) conR.Metrics.BlockParts.With("peer_id", string(e.Src.ID())).Add(1) - schema.WriteBlockPart(conR.traceClient, msg.Height, msg.Round, e.Src.ID(), msg.Part.Index, schema.TransferTypeDownload) + schema.WriteBlockPart(conR.traceClient, msg.Height, msg.Round, e.Src.ID(), msg.Part.Index, schema.Download) conR.conS.peerMsgQueue <- msgInfo{msg, e.Src.ID()} default: conR.Logger.Error(fmt.Sprintf("Unknown message type %v", reflect.TypeOf(msg))) @@ -357,7 +357,7 @@ func (conR *Reactor) ReceiveEnvelope(e p2p.Envelope) { cs.Validators.Size(), cs.LastCommit.Size() cs.mtx.RUnlock() - schema.WriteVote(conR.traceClient, height, round, msg.Vote, e.Src.ID(), schema.TransferTypeDownload) + schema.WriteVote(conR.traceClient, height, round, msg.Vote, e.Src.ID(), schema.Download) ps.EnsureVoteBitArrays(height, valSize) ps.EnsureVoteBitArrays(height-1, lastCommitSize) @@ -599,7 +599,7 @@ OUTER_LOOP: Part: *parts, }, }, logger) { - schema.WriteBlockPart(conR.traceClient, rs.Height, rs.Round, peer.ID(), part.Index, schema.TransferTypeUpload) + schema.WriteBlockPart(conR.traceClient, rs.Height, rs.Round, peer.ID(), part.Index, schema.Upload) ps.SetHasProposalBlockPart(prs.Height, prs.Round, index) } continue OUTER_LOOP @@ -783,7 +783,7 @@ OUTER_LOOP: if vote != nil { logger.Debug("Picked Catchup commit to send", "height", prs.Height) schema.WriteVote(conR.traceClient, rs.Height, rs.Round, vote, - ps.peer.ID(), schema.TransferTypeUpload) + ps.peer.ID(), schema.Upload) continue OUTER_LOOP } } @@ -812,7 +812,7 @@ func (conR *Reactor) pickSendVoteAndTrace(votes types.VoteSetReader, rs *cstypes vote := ps.PickSendVote(votes) if vote != nil { // if a vote is sent, trace it schema.WriteVote(conR.traceClient, rs.Height, rs.Round, vote, - ps.peer.ID(), schema.TransferTypeUpload) + ps.peer.ID(), schema.Upload) return true } return false @@ -1046,7 +1046,7 @@ func ReactorMetrics(metrics *Metrics) ReactorOption { return func(conR *Reactor) { conR.Metrics = metrics } } -func ReactorTracing(traceClient *trace.Client) ReactorOption { +func ReactorTracing(traceClient trace.Tracer) ReactorOption { return func(conR *Reactor) { conR.traceClient = traceClient } } diff --git a/consensus/state.go b/consensus/state.go index 7a37a1a35c..07fdc587de 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -143,7 +143,7 @@ type State struct { // for reporting metrics metrics *Metrics - traceClient *trace.Client + traceClient trace.Tracer } // StateOption sets an optional parameter on the State. @@ -174,7 +174,7 @@ func NewState( evpool: evpool, evsw: cmtevents.NewEventSwitch(), metrics: NopMetrics(), - traceClient: &trace.Client{}, + traceClient: trace.NoOpTracer(), } // set function defaults (may be overwritten before calling Start) @@ -217,7 +217,7 @@ func StateMetrics(metrics *Metrics) StateOption { } // SetTraceClient sets the remote event collector. -func SetTraceClient(ec *trace.Client) StateOption { +func SetTraceClient(ec trace.Tracer) StateOption { return func(cs *State) { cs.traceClient = ec } } @@ -1845,7 +1845,7 @@ func (cs *State) recordMetrics(height int64, block *types.Block) { blockSize := block.Size() // trace some metadata about the block - schema.WriteBlock(cs.traceClient, block, blockSize) + schema.WriteBlockSummary(cs.traceClient, block, blockSize) cs.metrics.NumTxs.Set(float64(len(block.Data.Txs))) cs.metrics.TotalTxs.Add(float64(len(block.Data.Txs))) diff --git a/go.mod b/go.mod index 4d515c5af2..4b23df6d8a 100644 --- a/go.mod +++ b/go.mod @@ -8,6 +8,7 @@ require ( github.com/Masterminds/semver/v3 v3.2.0 github.com/Workiva/go-datastructures v1.0.53 github.com/adlio/schema v1.3.3 + github.com/aws/aws-sdk-go v1.40.45 github.com/btcsuite/btcd/btcec/v2 v2.3.2 github.com/btcsuite/btcd/btcutil v1.1.3 github.com/bufbuild/buf v1.15.1 @@ -24,12 +25,11 @@ require ( github.com/golang/protobuf v1.5.3 github.com/golangci/golangci-lint v1.52.0 github.com/google/orderedcode v0.0.1 - github.com/google/uuid v1.3.1 + github.com/google/uuid v1.4.0 github.com/gorilla/websocket v1.5.0 github.com/grafana/otel-profiling-go v0.5.1 github.com/grafana/pyroscope-go v1.1.1 github.com/gtank/merlin v0.1.1 - github.com/influxdata/influxdb-client-go/v2 v2.12.2 github.com/informalsystems/tm-load-test v1.3.0 github.com/lib/pq v1.10.7 github.com/libp2p/go-buffer-pool v0.1.0 @@ -41,8 +41,8 @@ require ( github.com/rs/cors v1.8.3 github.com/sasha-s/go-deadlock v0.3.1 github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa - github.com/spf13/cobra v1.6.1 - github.com/spf13/viper v1.15.0 + github.com/spf13/cobra v1.8.0 + github.com/spf13/viper v1.18.1 github.com/stretchr/testify v1.8.4 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 github.com/vektra/mockery/v2 v2.23.1 @@ -51,8 +51,8 @@ require ( go.opentelemetry.io/otel/sdk v1.21.0 golang.org/x/crypto v0.21.0 golang.org/x/net v0.23.0 - gonum.org/v1/gonum v0.8.2 - google.golang.org/grpc v1.59.0 + gonum.org/v1/gonum v0.12.0 + google.golang.org/grpc v1.60.0 google.golang.org/protobuf v1.31.0 ) @@ -90,16 +90,15 @@ require ( github.com/charithe/durationcheck v0.0.10 // indirect github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 // indirect github.com/chigopher/pathlib v0.12.0 // indirect - github.com/cloudflare/circl v1.3.3 // indirect + github.com/cloudflare/circl v1.3.7 // indirect github.com/containerd/continuity v0.3.0 // indirect github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/daixiang0/gci v0.10.1 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect - github.com/deepmap/oapi-codegen v1.8.2 // indirect github.com/denis-tingaikin/go-header v0.4.3 // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect @@ -121,7 +120,7 @@ require ( github.com/fatih/structtag v1.2.0 // indirect github.com/felixge/fgprof v0.9.3 // indirect github.com/firefart/nonamedreturns v1.0.4 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect github.com/go-chi/chi/v5 v5.0.8 // indirect github.com/go-critic/go-critic v0.7.0 // indirect @@ -171,13 +170,13 @@ require ( github.com/hexops/gotextdiff v1.0.3 // indirect github.com/iancoleman/strcase v0.2.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84 // indirect github.com/jgautheron/goconst v1.5.1 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect github.com/jinzhu/copier v0.3.5 // indirect github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/julz/importas v0.1.0 // indirect github.com/junk1tm/musttag v0.5.0 // indirect @@ -219,17 +218,17 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/opencontainers/runc v1.1.3 // indirect - github.com/pelletier/go-toml/v2 v2.0.6 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pkg/profile v1.7.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/polyfloyd/go-errorlint v1.4.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/polyfloyd/go-errorlint v1.4.5 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect - github.com/quasilyte/go-ruleguard v0.3.19 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/quasilyte/go-ruleguard v0.4.0 // indirect github.com/quasilyte/gogrep v0.5.0 // indirect github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect @@ -237,6 +236,8 @@ require ( github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/ryancurrah/gomodguard v1.3.0 // indirect github.com/ryanrolds/sqlclosecheck v0.4.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect github.com/sashamelentyev/interfacebloat v1.1.0 // indirect github.com/sashamelentyev/usestdlibvars v1.23.0 // indirect @@ -250,15 +251,15 @@ require ( github.com/sivchari/tenv v1.7.1 // indirect github.com/skeema/knownhosts v1.2.1 // indirect github.com/sonatard/noctx v0.0.2 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect github.com/sourcegraph/go-diff v0.7.0 // indirect - github.com/spf13/afero v1.9.3 // indirect - github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect 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.5.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect github.com/tdakkota/asciicheck v0.2.0 // indirect github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect @@ -280,15 +281,15 @@ require ( go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.10.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb // indirect - golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 // indirect + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect + golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/sync v0.3.0 // indirect + golang.org/x/sync v0.5.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // 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 63bad11924..669f126b60 100644 --- a/go.sum +++ b/go.sum @@ -7,7 +7,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -18,9 +17,6 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= 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= @@ -38,7 +34,6 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -84,7 +79,6 @@ github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -103,6 +97,8 @@ github.com/ashanbrown/forbidigo v1.5.1 h1:WXhzLjOlnuDYPYQo/eFlcFMi8X/kLfvWLYu6CS github.com/ashanbrown/forbidigo v1.5.1/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= +github.com/aws/aws-sdk-go v1.40.45 h1:QN1nsY27ssD/JmW4s83qmSb+uL6DG4GmCDzjmJB4xUI= +github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -177,11 +173,10 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= +github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= +github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= 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/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.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= @@ -198,15 +193,14 @@ github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fj github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= -github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= @@ -214,15 +208,14 @@ github.com/daixiang0/gci v0.10.1 h1:eheNA3ljF6SxnPD/vE4lCBusVHmV3Rs3dkKvFrJ7MR0= github.com/daixiang0/gci v0.10.1/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= -github.com/deepmap/oapi-codegen v1.8.2 h1:SegyeYGcdi0jLLrpbCMoJxnUUn8GBXHsvr4rbzjuhfU= -github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= 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= @@ -232,7 +225,6 @@ github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= @@ -259,8 +251,6 @@ github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FM github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/esimonov/ifshort v1.0.4 h1:6SID4yGWfRae/M7hkVDVVyppy8q/v9OuxNdmjLQStBA= github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= @@ -280,23 +270,19 @@ github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g= github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= -github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= -github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= -github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-chi/chi/v5 v5.0.8 h1:lD+NLqFcAi1ovnVZpsnObHGW4xb4J8lNmoYVfECH1Y0= github.com/go-chi/chi/v5 v5.0.8/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-critic/go-critic v0.7.0 h1:tqbKzB8pqi0NsRZ+1pyU4aweAF7A7QN0Pi4Q02+rYnQ= @@ -330,8 +316,6 @@ github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -372,7 +356,6 @@ github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZ github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188 h1:+eHOFJl1BaXrQxKX+T06f78590z4qA2ZzBTqahsKSE4= github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= @@ -419,7 +402,6 @@ github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2 h1:amWTbTGqOZ71ruzr github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2/go.mod h1:9wOXstvyDRshQ9LggQuzBCGysxs3b6Uo/1MvYCR2NMs= github.com/golangci/golangci-lint v1.52.0 h1:T7w3tuF1goz64qGV+ML4MgysSl/yUfA3UZJK92oE48A= github.com/golangci/golangci-lint v1.52.0/go.mod h1:wlTh+d/oVlgZC2yCe6nlxrxNAnuhEQC0Zdygoh72Uak= -github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= @@ -455,7 +437,6 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -465,24 +446,18 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10 h1:CqYfpuYIjnlNxM3msdyPRKabhXZWbKjf3Q8BWROFBso= github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gordonklaus/ineffassign v0.0.0-20230107090616-13ace0543b28 h1:9alfqbrhuD+9fLZ4iaAVwhlp5PEhmnBt7yvK2Oy5C1U= github.com/gordonklaus/ineffassign v0.0.0-20230107090616-13ace0543b28/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= @@ -528,18 +503,12 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/influxdata/influxdb-client-go/v2 v2.12.2 h1:uYABKdrEKlYm+++qfKdbgaHKBPmoWR5wpbmj6MBB/2g= -github.com/influxdata/influxdb-client-go/v2 v2.12.2/go.mod h1:YteV91FiQxRdccyJ2cHvj2f/5sq4y4Njqu1fQzsQCOU= -github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7wlPfJLvMCdtV4zPulc4uCPrlywQOmbFOhgQNU= -github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= github.com/informalsystems/tm-load-test v1.3.0 h1:FGjKy7vBw6mXNakt+wmNWKggQZRsKkEYpaFk/zR64VA= github.com/informalsystems/tm-load-test v1.3.0/go.mod h1:OQ5AQ9TbT5hKWBNIwsMjn6Bf4O0U4b1kRc+0qZlQJKw= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= @@ -558,6 +527,10 @@ github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= @@ -572,7 +545,6 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/junk1tm/musttag v0.5.0 h1:bV1DTdi38Hi4pG4OVWa7Kap0hi0o7EczuK6wQt9zPOM= github.com/junk1tm/musttag v0.5.0/go.mod h1:PcR7BA+oREQYvHwgjIDmw3exJeds5JzRcvEJTfjrA0M= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= @@ -608,8 +580,6 @@ github.com/kunwardeep/paralleltest v1.0.6 h1:FCKYMF1OF2+RveWlABsdnmsvJrei5aoyZoa github.com/kunwardeep/paralleltest v1.0.6/go.mod h1:Y0Y0XISdZM5IKm3TREQMZ6iteqn1YuwCsJO/0kL9Zes= github.com/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ymEyhQ= github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= -github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/ldez/gomoddirectives v0.2.3 h1:y7MBaisZVDYmKvt9/l1mjNCiSA1BVn34U0ObUcJwlhA= github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= github.com/ldez/tagliatelle v0.4.0 h1:sylp7d9kh6AdXN2DpVGHBRb5guTVAgOxqNGhbqc4b1c= @@ -625,8 +595,6 @@ github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xq github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/maratori/testableexamples v1.0.0 h1:dU5alXRrD8WKSjOUnmJZuzdxWOEQ57+7s93SLMxb2vI= github.com/maratori/testableexamples v1.0.0/go.mod h1:4rhjL1n20TUTT4vdh3RDqSizKLyXp7K2u6HgraZCGzE= github.com/maratori/testpackage v1.1.1 h1:S58XVV5AD7HADMmD0fNnziNHqKvSdDuEKdPD1rNTU04= @@ -635,16 +603,9 @@ github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 h1:gWg6ZQ4JhDfJPqlo2 github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= -github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= @@ -732,8 +693,8 @@ github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6 github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= @@ -748,11 +709,11 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/profile v1.7.0 h1:hnbDkaNWPCLMO9wGLdBFTIZvzDrDfBM2072E1S9gJkA= github.com/pkg/profile v1.7.0/go.mod h1:8Uer0jas47ZQMJ7VD+OHknK4YDY07LPUC6dEvqDjvNo= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polyfloyd/go-errorlint v1.4.0 h1:b+sQ5HibPIAjEZwtuwU8Wz/u0dMZ7YL+bk+9yWyHVJk= -github.com/polyfloyd/go-errorlint v1.4.0/go.mod h1:qJCkPeBn+0EXkdKTrUCcuFStM2xrDKfxI3MGLXPexUs= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/polyfloyd/go-errorlint v1.4.5 h1:70YWmMy4FgRHehGNOUask3HtSFSOLKgmDn7ryNe7LqI= +github.com/polyfloyd/go-errorlint v1.4.5/go.mod h1:sIZEbFoDOCnTYYZoVkjc4hTnM459tuWA9H/EkdXwsKk= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= @@ -777,10 +738,10 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/quasilyte/go-ruleguard v0.3.19 h1:tfMnabXle/HzOb5Xe9CUZYWXKfkS1KwRmZyPmD9nVcc= -github.com/quasilyte/go-ruleguard v0.3.19/go.mod h1:lHSn69Scl48I7Gt9cX3VrbsZYvYiBYszZOZW4A+oTEw= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/quasilyte/go-ruleguard v0.4.0 h1:DyM6r+TKL+xbKB4Nm7Afd1IQh9kEUKQs2pboWGKtvQo= +github.com/quasilyte/go-ruleguard v0.4.0/go.mod h1:Eu76Z/R8IXtViWUIHkE3p8gdH3/PKk1eh3YGfaEof10= github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= @@ -805,6 +766,10 @@ github.com/ryancurrah/gomodguard v1.3.0 h1:q15RT/pd6UggBXVBuLps8BXRvl5GPBcwVA7BJ github.com/ryancurrah/gomodguard v1.3.0/go.mod h1:ggBxb3luypPEzqVtq33ee7YSN35V28XeGnid8dnni50= github.com/ryanrolds/sqlclosecheck v0.4.0 h1:i8SX60Rppc1wRuyQjMciLqIzV3xnoHB7/tXbr6RGYNI= github.com/ryanrolds/sqlclosecheck v0.4.0/go.mod h1:TBRRjzL31JONc9i4XMinicuo+s+E8yKZ5FN8X3G6CKQ= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= @@ -844,6 +809,8 @@ github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa h1:YJfZp12Z3AFhSBeX github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -851,23 +818,21 @@ github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0b github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.4.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= -github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= -github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= -github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= +github.com/spf13/viper v1.18.1 h1:rmuU42rScKWlhhJDyXZRKJQHXFX02chSVW1IvkPGiVM= +github.com/spf13/viper v1.18.1/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= @@ -886,12 +851,11 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ 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/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= @@ -931,9 +895,6 @@ github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89 github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/uudashr/gocognit v1.0.6 h1:2Cgi6MweCsdB6kpcVQp7EW4U23iBFQWfTXiWlyp842Y= github.com/uudashr/gocognit v1.0.6/go.mod h1:nAIUuVBnYU7pcninia3BHOvQkpQCeO76Uscky5BOwcY= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/vbatts/tar-split v0.11.2 h1:Via6XqJr0hceW4wff3QRzD5gAk/tatMw/4ZA7cTlIME= github.com/vbatts/tar-split v0.11.2/go.mod h1:vV3ZuO2yWSVsz+pfFzDG/upWH1JhjOiEaWq6kXyQ3VI= github.com/vektra/mockery/v2 v2.23.1 h1:N59FENM2d/gWE6Ns5JPuf9a7jqQWeheGefZqvuvb1dM= @@ -969,7 +930,6 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= @@ -1001,21 +961,14 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= @@ -1025,13 +978,12 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA= -golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 h1:J74nGeMgeFnYQJN59eFwh06jX/V8g0lB7LWpjSLxtgU= -golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 h1:jWGQJV4niP+CCmFW9ekjA9Zx8vYORzOUH2/Nl5WPuLQ= +golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1044,7 +996,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -1053,7 +1004,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= @@ -1097,13 +1047,11 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -1120,10 +1068,6 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 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= @@ -1138,8 +1082,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1147,7 +1091,6 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1158,7 +1101,6 @@ golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1169,7 +1111,6 @@ golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1186,19 +1127,13 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1218,7 +1153,6 @@ golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1229,7 +1163,6 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1245,8 +1178,6 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= @@ -1259,14 +1190,11 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= -golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1313,16 +1241,10 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= @@ -1343,12 +1265,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.8.2 h1:CCXrcPKiGGotvnN6jfUsKk4rRqm7q09/YbKb5xCEvtM= -gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0 h1:OE9mWmgKkjJyEmDAAtGMPjXu+YNeGvK9VTSHY6+Qihc= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +gonum.org/v1/gonum v0.12.0 h1:xKuo6hzt+gMav00meVPUlXwSdoEJP46BR+wdxQEFK2o= +gonum.org/v1/gonum v0.12.0/go.mod h1:73TDxJfAAHeA8Mk9mf8NlIppyhQNo5GLTcYeqgo2lvY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1365,16 +1283,12 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1404,15 +1318,8 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1:ultW7fxlIvee4HYrtnaRPon9HpEgFk5zYpmfMgtKB5I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1425,12 +1332,8 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.60.0 h1:6FQAR0kM31P6MRdeluor2w2gPaS4SVNrD/DNTxrQ15k= +google.golang.org/grpc v1.60.0/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= 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= @@ -1465,6 +1368,7 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= @@ -1493,6 +1397,5 @@ mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jC mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d h1:3rvTIIM22r9pvXk+q3swxUQAQOxksVMGK7sml4nG57w= mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d/go.mod h1:IeHQjmn6TOD+e4Z3RFiZMMsLVL+A96Nvptar8Fj71is= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/mempool/cat/reactor.go b/mempool/cat/reactor.go index 67ea9e7afc..89429a0553 100644 --- a/mempool/cat/reactor.go +++ b/mempool/cat/reactor.go @@ -41,7 +41,7 @@ type Reactor struct { mempool *TxPool ids *mempoolIDs requests *requestScheduler - traceClient *trace.Client + traceClient trace.Tracer } type ReactorOptions struct { @@ -57,7 +57,7 @@ type ReactorOptions struct { MaxGossipDelay time.Duration // TraceClient is the trace client for collecting trace level events - TraceClient *trace.Client + TraceClient trace.Tracer } func (opts *ReactorOptions) VerifyAndComplete() error { @@ -91,7 +91,7 @@ func NewReactor(mempool *TxPool, opts *ReactorOptions) (*Reactor, error) { mempool: mempool, ids: newMempoolIDs(), requests: newRequestScheduler(opts.MaxGossipDelay, defaultGlobalRequestTimeout), - traceClient: &trace.Client{}, + traceClient: trace.NoOpTracer(), } memR.BaseReactor = *p2p.NewBaseReactor("Mempool", memR) return memR, nil @@ -228,9 +228,6 @@ func (memR *Reactor) ReceiveEnvelope(e p2p.Envelope) { // NOTE: This setup also means that we can support older mempool implementations that simply // flooded the network with transactions. case *protomem.Txs: - for _, tx := range msg.Txs { - schema.WriteMempoolTx(memR.traceClient, e.Src.ID(), tx, schema.TransferTypeDownload, schema.CatVersionFieldValue) - } protoTxs := msg.GetTxs() if len(protoTxs) == 0 { memR.Logger.Error("received empty txs from peer", "src", e.Src) @@ -244,6 +241,7 @@ func (memR *Reactor) ReceiveEnvelope(e p2p.Envelope) { for _, tx := range protoTxs { ntx := types.Tx(tx) key := ntx.Key() + schema.WriteMempoolTx(memR.traceClient, e.Src.ID(), key[:], schema.Download) // If we requested the transaction we mark it as received. if memR.requests.Has(peerID, key) { memR.requests.MarkReceived(peerID, key) @@ -273,19 +271,19 @@ func (memR *Reactor) ReceiveEnvelope(e p2p.Envelope) { // 3. If we recently evicted the tx and still don't have space for it, we do nothing. // 4. Else, we request the transaction from that peer. case *protomem.SeenTx: - schema.WriteMempoolPeerState( - memR.traceClient, - e.Src.ID(), - schema.SeenTxStateUpdateFieldValue, - schema.TransferTypeDownload, - schema.CatVersionFieldValue, - ) txKey, err := types.TxKeyFromBytes(msg.TxKey) if err != nil { memR.Logger.Error("peer sent SeenTx with incorrect tx key", "err", err) memR.Switch.StopPeerForError(e.Src, err) return } + schema.WriteMempoolPeerState( + memR.traceClient, + e.Src.ID(), + schema.SeenTx, + txKey[:], + schema.Download, + ) peerID := memR.ids.GetIDForPeer(e.Src.ID()) memR.mempool.PeerHasTx(peerID, txKey) // Check if we don't already have the transaction and that it was recently rejected @@ -307,35 +305,34 @@ func (memR *Reactor) ReceiveEnvelope(e p2p.Envelope) { // A peer is requesting a transaction that we have claimed to have. Find the specified // transaction and broadcast it to the peer. We may no longer have the transaction case *protomem.WantTx: - schema.WriteMempoolPeerState( - memR.traceClient, - e.Src.ID(), - schema.WantTxStateUpdateFieldValue, - schema.TransferTypeDownload, - schema.CatVersionFieldValue, - ) txKey, err := types.TxKeyFromBytes(msg.TxKey) if err != nil { memR.Logger.Error("peer sent WantTx with incorrect tx key", "err", err) memR.Switch.StopPeerForError(e.Src, err) return } + schema.WriteMempoolPeerState( + memR.traceClient, + e.Src.ID(), + schema.WantTx, + txKey[:], + schema.Download, + ) tx, has := memR.mempool.Get(txKey) if has && !memR.opts.ListenOnly { peerID := memR.ids.GetIDForPeer(e.Src.ID()) - schema.WriteMempoolTx( - memR.traceClient, - e.Src.ID(), - msg.TxKey, - schema.TransferTypeUpload, - schema.CatVersionFieldValue, - ) memR.Logger.Debug("sending a tx in response to a want msg", "peer", peerID) if p2p.SendEnvelopeShim(e.Src, p2p.Envelope{ //nolint:staticcheck ChannelID: mempool.MempoolChannel, Message: &protomem.Txs{Txs: [][]byte{tx}}, }, memR.Logger) { memR.mempool.PeerHasTx(peerID, txKey) + schema.WriteMempoolTx( + memR.traceClient, + e.Src.ID(), + txKey[:], + schema.Upload, + ) } } diff --git a/mempool/v1/mempool.go b/mempool/v1/mempool.go index b78b097ce8..6febb0dea9 100644 --- a/mempool/v1/mempool.go +++ b/mempool/v1/mempool.go @@ -16,7 +16,6 @@ import ( "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/mempool" "github.com/tendermint/tendermint/pkg/trace" - "github.com/tendermint/tendermint/pkg/trace/schema" "github.com/tendermint/tendermint/proxy" "github.com/tendermint/tendermint/types" ) @@ -59,7 +58,7 @@ type TxMempool struct { txByKey map[types.TxKey]*clist.CElement txBySender map[string]*clist.CElement // for sender != "" - traceClient *trace.Client + traceClient trace.Tracer } // NewTxMempool constructs a new, empty priority mempool at the specified @@ -83,7 +82,7 @@ func NewTxMempool( height: height, txByKey: make(map[types.TxKey]*clist.CElement), txBySender: make(map[string]*clist.CElement), - traceClient: &trace.Client{}, + traceClient: trace.NoOpTracer(), } if cfg.CacheSize > 0 { txmp.cache = mempool.NewLRUTxCache(cfg.CacheSize) @@ -115,7 +114,7 @@ func WithMetrics(metrics *mempool.Metrics) TxMempoolOption { return func(txmp *TxMempool) { txmp.metrics = metrics } } -func WithTraceClient(tc *trace.Client) TxMempoolOption { +func WithTraceClient(tc trace.Tracer) TxMempoolOption { return func(txmp *TxMempool) { txmp.traceClient = tc } @@ -204,7 +203,6 @@ func (txmp *TxMempool) CheckTx(tx types.Tx, cb func(*abci.Response), txInfo memp if txmp.preCheck != nil { if err := txmp.preCheck(tx); err != nil { txmp.metrics.FailedTxs.With(mempool.TypeLabel, mempool.FailedPrecheck).Add(1) - schema.WriteMempoolRejected(txmp.traceClient, err.Error()) return 0, mempool.ErrPreCheck{Reason: err} } } @@ -483,15 +481,6 @@ func (txmp *TxMempool) addNewTransaction(wtx *WrappedTx, checkTxRes *abci.Respon ) txmp.metrics.FailedTxs.With(mempool.TypeLabel, mempool.FailedAdding).Add(1) - reason := fmt.Sprintf( - "code: %d codespace: %s logs: %s local: %v postCheck error: %v", - checkTxRes.Code, - checkTxRes.Codespace, - checkTxRes.Log, - wtx.HasPeer(0), // this checks if the peer id is local - err, - ) - schema.WriteMempoolRejected(txmp.traceClient, reason) // Remove the invalid transaction from the cache, unless the operator has // instructed us to keep invalid transactions. @@ -672,9 +661,6 @@ func (txmp *TxMempool) handleRecheckResult(tx types.Tx, checkTxRes *abci.Respons txmp.metrics.FailedTxs.With(mempool.TypeLabel, mempool.FailedRecheck).Add(1) if !txmp.config.KeepInvalidTxsInCache { txmp.cache.Remove(wtx.tx) - if err != nil { - schema.WriteMempoolRejected(txmp.traceClient, err.Error()) - } } txmp.metrics.Size.Set(float64(txmp.Size())) txmp.metrics.SizeBytes.Set(float64(txmp.SizeBytes())) diff --git a/mempool/v1/reactor.go b/mempool/v1/reactor.go index 1bbe541b2d..6540e23574 100644 --- a/mempool/v1/reactor.go +++ b/mempool/v1/reactor.go @@ -27,7 +27,7 @@ type Reactor struct { config *cfg.MempoolConfig mempool *TxMempool ids *mempoolIDs - traceClient *trace.Client + traceClient trace.Tracer } type mempoolIDs struct { @@ -94,7 +94,7 @@ func newMempoolIDs() *mempoolIDs { } // NewReactor returns a new Reactor with the given config and mempool. -func NewReactor(config *cfg.MempoolConfig, mempool *TxMempool, traceClient *trace.Client) *Reactor { +func NewReactor(config *cfg.MempoolConfig, mempool *TxMempool, traceClient trace.Tracer) *Reactor { memR := &Reactor{ config: config, mempool: mempool, @@ -180,15 +180,6 @@ func (memR *Reactor) ReceiveEnvelope(e p2p.Envelope) { memR.Logger.Debug("Receive", "src", e.Src, "chId", e.ChannelID, "msg", e.Message) switch msg := e.Message.(type) { case *protomem.Txs: - for _, tx := range msg.Txs { - schema.WriteMempoolTx( - memR.traceClient, - e.Src.ID(), - tx, - schema.TransferTypeDownload, - schema.V1VersionFieldValue, - ) - } protoTxs := msg.GetTxs() if len(protoTxs) == 0 { memR.Logger.Error("received tmpty txs from peer", "src", e.Src) @@ -202,6 +193,12 @@ func (memR *Reactor) ReceiveEnvelope(e p2p.Envelope) { var err error for _, tx := range protoTxs { ntx := types.Tx(tx) + schema.WriteMempoolTx( + memR.traceClient, + e.Src.ID(), + ntx.Hash(), + schema.Download, + ) err = memR.mempool.CheckTx(ntx, nil, txInfo) if errors.Is(err, mempool.ErrTxInCache) { memR.Logger.Debug("Tx already exists in cache", "tx", ntx.String()) @@ -302,14 +299,13 @@ func (memR *Reactor) broadcastTxRoutine(peer p2p.Peer) { // record that we have sent the peer the transaction // to avoid doing it a second time memTx.SetPeer(peerID) + schema.WriteMempoolTx( + memR.traceClient, + peer.ID(), + memTx.tx.Hash(), + schema.Upload, + ) } - schema.WriteMempoolTx( - memR.traceClient, - peer.ID(), - memTx.tx, - schema.TransferTypeUpload, - schema.V1VersionFieldValue, - ) } select { diff --git a/mempool/v1/reactor_test.go b/mempool/v1/reactor_test.go index b337745a8f..31cb9672e9 100644 --- a/mempool/v1/reactor_test.go +++ b/mempool/v1/reactor_test.go @@ -164,7 +164,7 @@ func makeAndConnectReactors(config *cfg.Config, n int) []*Reactor { mempool, cleanup := newMempoolWithAppAndConfig(cc, config) defer cleanup() - reactors[i] = NewReactor(config.Mempool, mempool, &trace.Client{}) // so we dont start the consensus states + reactors[i] = NewReactor(config.Mempool, mempool, trace.NoOpTracer()) // so we dont start the consensus states reactors[i].SetLogger(logger.With("validator", i)) } diff --git a/node/node.go b/node/node.go index 7690952a46..1f1056895c 100644 --- a/node/node.go +++ b/node/node.go @@ -234,7 +234,7 @@ type Node struct { blockIndexer indexer.BlockIndexer indexerService *txindex.IndexerService prometheusSrv *http.Server - influxDBClient *trace.Client + tracer trace.Tracer pyroscopeProfiler *pyroscope.Profiler pyroscopeTracer *sdktrace.TracerProvider } @@ -378,7 +378,7 @@ func createMempoolAndMempoolReactor( state sm.State, memplMetrics *mempl.Metrics, logger log.Logger, - traceClient *trace.Client, + traceClient trace.Tracer, ) (mempl.Mempool, p2p.Reactor) { switch config.Mempool.Version { case cfg.MempoolV2: @@ -515,7 +515,7 @@ func createConsensusReactor(config *cfg.Config, waitSync bool, eventBus *types.EventBus, consensusLogger log.Logger, - traceClient *trace.Client, + traceClient trace.Tracer, ) (*cs.Reactor, *cs.State) { consensusState := cs.NewState( config.Consensus, @@ -856,11 +856,9 @@ func NewNode(config *cfg.Config, csMetrics, p2pMetrics, memplMetrics, smMetrics := metricsProvider(genDoc.ChainID, softwareVersion) - // create an optional influxdb client to send arbitrary data to a remote - // influxdb server. This is used to collect trace data from many different nodes - // in a network. - influxdbClient, err := trace.NewClient( - config.Instrumentation, + // create an optional tracer client to collect trace data. + tracer, err := trace.NewTracer( + config, logger, genDoc.ChainID, string(nodeKey.ID()), @@ -870,7 +868,7 @@ func NewNode(config *cfg.Config, } // Make MempoolReactor - mempool, mempoolReactor := createMempoolAndMempoolReactor(config, proxyApp, state, memplMetrics, logger, influxdbClient) + mempool, mempoolReactor := createMempoolAndMempoolReactor(config, proxyApp, state, memplMetrics, logger, tracer) // Make Evidence Reactor evidenceReactor, evidencePool, err := createEvidenceReactor(config, dbProvider, stateDB, blockStore, logger) @@ -903,7 +901,7 @@ func NewNode(config *cfg.Config, } consensusReactor, consensusState := createConsensusReactor( config, state, blockExec, blockStore, mempool, evidencePool, - privValidator, csMetrics, stateSync || fastSync, eventBus, consensusLogger, influxdbClient, + privValidator, csMetrics, stateSync || fastSync, eventBus, consensusLogger, tracer, ) // Set up state sync reactor, and schedule a sync if requested. @@ -1001,7 +999,7 @@ func NewNode(config *cfg.Config, indexerService: indexerService, blockIndexer: blockIndexer, eventBus: eventBus, - influxDBClient: influxdbClient, + tracer: tracer, } node.BaseService = *service.NewBaseService(logger, "Node", node) @@ -1150,8 +1148,8 @@ func (n *Node) OnStop() { } } - if n.influxDBClient != nil { - n.influxDBClient.Stop() + if n.tracer != nil { + n.tracer.Stop() } if n.pyroscopeProfiler != nil { diff --git a/pkg/trace/README.md b/pkg/trace/README.md index d883e1b413..9a421e5bdc 100644 --- a/pkg/trace/README.md +++ b/pkg/trace/README.md @@ -1,136 +1,86 @@ -# trace: push arbitrary trace level data to an influxdb instance +# trace package -This package has code to create a client that can be used to push events to an -influxdb instance. It is used to collect trace data from many different nodes in -a network. If there is no URL in the config.toml, then the underlying client is -nil and no points will be written. The provided chainID and nodeID are used to -tag all points. The underlying client is exposed to allow for custom writes, but -the WritePoint method should be used for most cases, as it enforces the schema. +The `trace` package provides a decently fast way to store traces locally. -## Usage and Schema +## Usage -To use this package, first create a new client using the `NewClient` function, -then pass that client to the relevant components that need to push events. After -that, you can use the `WritePoint` method to push events to influxdb. In the below -example, we're pushing a point in the consensus reactor to measure exactly when -each step of consensus is reached for each node. +To enable the local tracer, add the following to the config.toml file: -```go -client.WritePoint(RoundStateTable, map[string]interface{}{ - HeightFieldKey: height, - RoundFieldKey: round, - StepFieldKey: step.String(), -}) -``` - -Using this method enforces the typical schema, where we are tagging (aka -indexing) each point by the chain-id and the node-id, then adding the local time -of the creation of the event. If you need to push a custom point, you can use -the underlying client directly. See `influxdb2.WriteAPI` for more details. - -### Schema - -All points in influxdb are divided into a key value pair per field. These kvs -are indexed first by a "measurement", which is used as a "table" in other dbs. -Additional indexes can also be added, we're using the chain-id and node-id here. -This allows for us to quickly query for trace data for a specific chain and/or -node. - -```flux -from(bucket: "e2e") - |> range(start: -1h) - |> filter( - fn: (r) => r["_measurement"] == "consensus_round_state" - and r.chain_id == "ci-YREG8X" - and r.node_id == "0b529c309608172a29c49979394734260b42acfb" - ) -``` +```toml +# The tracer to use for collecting trace data. +trace_type = "local" -We can easily retrieve all fields in a relatively standard table format by using -the pivot `fluxQL` command. +# The size of the batches that are sent to the database. +trace_push_batch_size = 1000 -```flux -from(bucket: "mocha") - |> range(start: -1h) - |> filter(fn: (r) => r._measurement == "consensus_round_state") - |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value") +# The list of tables that are updated when tracing. All available tables and +# their schema can be found in the pkg/trace/schema package. It is represented as a +# comma separate string. For example: "consensus_round_state,mempool_tx". +tracing_tables = "consensus_round_state,mempool_tx" ``` -### Querying Data Using Python - -Python can be used to quickly search for and isolate specific patterns. - -```python -from influxdb_client import InfluxDBClient -from influxdb_client.client.write_api import SYNCHRONOUS +Trace data will now be stored to the `.celestia-app/data/traces` directory, and +save the file to the specified directory in the `table_name.jsonl` format. -client = InfluxDBClient(url="http://your-influx-url:8086/", token="your-influx-token", org="celestia") +To read the contents of the file, open it and pass it the Decode function. This +returns all of the events in that file as a slice. -query_api = client.query_api() - -def create_flux_table_query(start, bucket, measurement, filter_clause): - flux_table_query = f''' - from(bucket: "{bucket}") - |> range(start: {start}) - |> filter(fn: (r) => r._measurement == "{measurement}") - {filter_clause} - |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value") - ''' - return flux_table_query - -query = create_flux_table_query("-1h", "mocha", "consenus_round_state", "") -result = query_api.query(query=query) +```go +events, err := DecodeFile[schema.MempoolTx](file) +if err != nil { + return err +} ``` -### Running a node with remote tracing on +### Pull Based Event Collection -Tracing will only occur if an influxdb URL in specified either directly in the -`config.toml` or as flags provided to the start sub command. +Pull based event collection is where external servers connect to and pull trace +data from the consensus node. -#### Configure in the `config.toml` +To use this, change the config.toml to store traces in the +.celestia-app/data/traces directory. ```toml -####################################################### -### Instrumentation Configuration Options ### -####################################################### -[instrumentation] - -... +# The tracer pull address specifies which address will be used for pull based +# event collection. If empty, the pull based server will not be started. +trace_pull_address = ":26661" +``` -# The URL of the influxdb instance to use for remote event -# collection. If empty, remote event collection is disabled. -influx_url = "http://your-influx-ip:8086/" +To retrieve a table remotely using the pull based server, call the following +function: -# The influxdb token to use for remote event collection. -influx_token = "your-token" +```go +err := GetTable("http://1.2.3.4:26661", "mempool_tx", "directory to store the file") +if err != nil { + return err +} +``` -# The influxdb bucket to use for remote event collection. -influx_bucket = "e2e" +This stores the data locally in the specified directory. -# The influxdb org to use for event remote collection. -influx_org = "celestia" -# The size of the batches that are sent to the database. -influx_batch_size = 20 +### Push Based Event Collection -# The list of tables that are updated when tracing. All available tables and -# their schema can be found in the pkg/trace/schema package. -influx_tables = ["consensus_round_state", "mempool_tx", ] +Push based event collection is where the consensus node pushes trace data to an +external server. At the moment, this is just an S3 bucket. To use this, add the +following to the config.toml file: +```toml +# TracePushConfig is the relative path of the push config. +# This second config contains credentials for where and how often to +# push trace data to. For example, if the config is next to this config, +# it would be "push_config.json". +trace_push_config = "{{ .Instrumentation.TracePushConfig }}" ``` -or - -```sh -celestia-appd start --influxdb-url=http://your-influx-ip:8086/ --influxdb-token="your-token" -``` - -### e2e tests - -To push events from e2e tests, we only need to specify the URL and the token via -the cli. +The push config file should look like this: -```bash -cd test/e2e -make && ./build/runner -f ./networks/ci.toml --influxdb-url=http://your-influx-ip:8086/ --influxdb-token="your-token" +```json +{ + "bucket": "bucket-name", + "region": "region", + "access_key": "", + "secret_key": "", + "push_delay": 60 // number of seconds to wait between intervals of pushing all files +} ``` diff --git a/pkg/trace/buffered_file.go b/pkg/trace/buffered_file.go new file mode 100644 index 0000000000..94a6b91add --- /dev/null +++ b/pkg/trace/buffered_file.go @@ -0,0 +1,56 @@ +package trace + +import ( + "bufio" + "os" + "sync" +) + +type bufferedFile struct { + mut *sync.RWMutex + // file is the file that is being written to. + file *os.File + // writer is the buffered writer that is writing to the file. + wr *bufio.Writer +} + +// newbufferedFile creates a new buffered file that writes to the given file. +func newbufferedFile(file *os.File) *bufferedFile { + return &bufferedFile{ + mut: &sync.RWMutex{}, + file: file, + wr: bufio.NewWriter(file), + } +} + +// Write writes the given bytes to the file. +func (f *bufferedFile) Write(b []byte) (int, error) { + f.mut.Lock() + defer f.mut.Unlock() + return f.wr.Write(b) +} + +// Flush flushes the writer to the file. +func (f *bufferedFile) Flush() error { + f.mut.Lock() + defer f.mut.Unlock() + return f.wr.Flush() +} + +// File returns a new copy of *os.File. +func (f *bufferedFile) File() (*os.File, error) { + err := f.Flush() + if err != nil { + return nil, err + } + f.mut.RLock() + defer f.mut.RUnlock() + return os.Open(f.file.Name()) +} + +// Close closes the file. +func (f *bufferedFile) Close() error { + f.mut.Lock() + defer f.mut.Unlock() + return f.file.Close() +} diff --git a/pkg/trace/client.go b/pkg/trace/client.go deleted file mode 100644 index 0ee70aebed..0000000000 --- a/pkg/trace/client.go +++ /dev/null @@ -1,155 +0,0 @@ -package trace - -import ( - "context" - "fmt" - "time" - - influxdb2 "github.com/influxdata/influxdb-client-go/v2" - "github.com/influxdata/influxdb-client-go/v2/api/write" - "github.com/tendermint/tendermint/config" - "github.com/tendermint/tendermint/libs/log" -) - -const ( - NodeIDTag = "node_id" - ChainIDTag = "chain_id" -) - -// ClientConfigConfig is the influxdb client configuration used for -// collecting events. -type ClientConfigConfig struct { - // URL is the influxdb url. - URL string `mapstructure:"influx_url"` - // Token is the influxdb token. - Token string `mapstructure:"influx_token"` - // Org is the influxdb organization. - Org string `mapstructure:"influx_org"` - // Bucket is the influxdb bucket. - Bucket string `mapstructure:"influx_bucket"` - // BatchSize is the number of points to write in a single batch. - BatchSize int `mapstructure:"influx_batch_size"` -} - -// Client is an influxdb client that can be used to push events to influxdb. It -// is used to collect trace data from many different nodes in a network. If -// there is no URL in the config.toml, then the underlying client is nil and no -// points will be written. The provided chainID and nodeID are used to tag all -// points. The underlying client is exposed to allow for custom writes, but the -// WritePoint method should be used for most cases, as it enforces the schema. -type Client struct { - ctx context.Context - cancel context.CancelFunc - cfg *config.InstrumentationConfig - - // chainID is added as a tag all points - chainID string - - // nodeID is added as a tag all points - nodeID string - - // tables is a map from table name to the schema of that table that are - // configured to be collected. - tables map[string]struct{} - - // Client is the influxdb client. This field is nil if no connection is - // established. - Client influxdb2.Client -} - -// Stop closes the influxdb client. -func (c *Client) Stop() { - c.cancel() - if c.Client == nil { - return - } - writeAPI := c.Client.WriteAPI(c.cfg.InfluxOrg, c.cfg.InfluxBucket) - writeAPI.Flush() - c.Client.Close() -} - -// NewClient creates a new influxdb client using the provided config. If there -// is no URL configured, then the underlying client will be nil, and each -// attempt to write a point will do nothing. The provided chainID and nodeID are -// used to tag all points. -func NewClient(cfg *config.InstrumentationConfig, logger log.Logger, chainID, nodeID string) (*Client, error) { - ctx, cancel := context.WithCancel(context.Background()) - cli := &Client{ - cfg: cfg, - Client: nil, - ctx: ctx, - cancel: cancel, - chainID: chainID, - nodeID: nodeID, - tables: sliceToMap(cfg.InfluxTables), - } - if cfg.InfluxURL == "" { - return cli, nil - } - cli.Client = influxdb2.NewClientWithOptions( - cfg.InfluxURL, - cfg.InfluxToken, - influxdb2.DefaultOptions(). - SetBatchSize(uint(cfg.InfluxBatchSize)), - ) - ctx, cancel = context.WithTimeout(ctx, 3*time.Second) - defer cancel() - alive, err := cli.Client.Ping(ctx) - if err != nil { - return nil, err - } - if !alive { - return nil, fmt.Errorf("failure to ping configured influxdb: %s", cfg.InfluxURL) - } - logger.Info("connected to influxdb", "url", cfg.InfluxURL) - go cli.logErrors(logger) - return cli, nil -} - -// logErrors empties the writeAPI error channel and logs any errors. -func (c *Client) logErrors(logger log.Logger) { - writeAPI := c.Client.WriteAPI(c.cfg.InfluxOrg, c.cfg.InfluxBucket) - for { - select { - case err := <-writeAPI.Errors(): - logger.Error("event collector: influxdb write error", "err", err) - case <-c.ctx.Done(): - return - } - } -} - -// IsCollecting returns true if the client is collecting events. -func (c *Client) IsCollecting(table string) bool { - if c.Client == nil { - return false - } - _, has := c.tables[table] - return has -} - -// WritePoint async writes a point to influxdb. To enforce the schema, it -// automatically adds the chain_id and node_id tags, along with setting the -// timestamp to the current time. If the underlying client is nil, it does -// nothing. The "table" arg is used as the influxdb "measurement" for the point. -// If other tags are needed, use WriteCustomPoint. -func (c *Client) WritePoint(table string, fields map[string]interface{}) { - if !c.IsCollecting(table) { - return - } - writeAPI := c.Client.WriteAPI(c.cfg.InfluxOrg, c.cfg.InfluxBucket) - tags := map[string]string{ - NodeIDTag: c.nodeID, - ChainIDTag: c.chainID, - } - p := write.NewPoint(table, tags, fields, time.Now()) - writeAPI.WritePoint(p) -} - -func sliceToMap(tables []string) map[string]struct{} { - m := make(map[string]struct{}) - for _, s := range tables { - m[s] = struct{}{} - } - return m -} diff --git a/pkg/trace/decoder.go b/pkg/trace/decoder.go new file mode 100644 index 0000000000..abf24f4006 --- /dev/null +++ b/pkg/trace/decoder.go @@ -0,0 +1,34 @@ +package trace + +import ( + "bufio" + "encoding/json" + "io" + "os" +) + +// DecodeFile reads a file and decodes it into a slice of events via +// scanning. The table parameter is used to determine the type of the events. +// The file should be a jsonl file. The generic here are passed to the event +// type. +func DecodeFile[T any](f *os.File) ([]Event[T], error) { + var out []Event[T] + r := bufio.NewReader(f) + for { + line, err := r.ReadString('\n') + if err == io.EOF { + break + } else if err != nil { + return nil, err + } + + var e Event[T] + if err := json.Unmarshal([]byte(line), &e); err != nil { + return nil, err + } + + out = append(out, e) + } + + return out, nil +} diff --git a/pkg/trace/doc.go b/pkg/trace/doc.go index 3d6521464e..27cf777c20 100644 --- a/pkg/trace/doc.go +++ b/pkg/trace/doc.go @@ -1,101 +1,2 @@ -/* -# trace: push arbitrary trace level data to an influxdb instance - -This package has code to create a client that can be used to push events to an -influxdb instance. It is used to collect trace data from many different nodes in -a network. If there is no URL in the config.toml, then the underlying client is -nil and no points will be written. The provided chainID and nodeID are used to -tag all points. The underlying client is exposed to allow for custom writes, but -the WritePoint method should be used for most cases, as it enforces the schema. - -## Usage and Schema - -To use this package, first create a new client using the `NewClient` function, -then pass that client to the relevant components that need to push events. After -that, you can use the `WritePoint` method to push events to influxdb. In the below -example, we're pushing a point in the consensus reactor to measure exactly when -each step of consensus is reached for each node. - -```go - - if cs.traceClient.IsCollecting() { - cs.traceClient.WritePoint("consensus", map[string]interface{}{ - "roundData": []interface{}{rs.Height, rs.Round, rs.Step}, - }) - } - -``` - -Using this method enforces the typical schema, where we are tagging (aka -indexing) each point by the chain-id and the node-id, then adding the local time -of the creation of the event. If you need to push a custom point, you can use -the underlying client directly. See influxdb2.WriteAPI for more details. - -### Schema - -All points in influxdb are divided into a key value pair per field. These kvs -are indexed first by a "measurement", which is used as a "table" in other dbs. -Additional indexes can also be added, we're using the chain-id and node-id here. -This allows for us to quickly query for trace data for a specific chain and/or -node. - -```flux -from(bucket: "e2e") - - |> range(start: -1h) - |> filter( - fn: (r) => r["_measurement"] == "consensus" - and r.chain_id == "ci-YREG8X" - and r.node_id == "0b529c309608172a29c49979394734260b42acfb" - ) - -``` - -### Running a node with remote tracing on - -Tracing will only occur if an influxdb URL in specified either directly in the -`config.toml` or as flags provided to the start sub command. - -configure in the config.toml - -```toml -####################################################### -### Instrumentation Configuration Options ### -####################################################### -[instrumentation] - -... - -# The URL of the influxdb instance to use for remote event -# collection. If empty, remote event collection is disabled. -influx_url = "http://your-influx-ip:8086/" - -# The influxdb token to use for remote event collection. -influx_token = "your-token" - -# The influxdb bucket to use for remote event collection. -influx_bucket = "e2e" - -# The influxdb org to use for event remote collection. -influx_org = "celestia" - -# The size of the batches that are sent to the database. -influx_batch_size = 20 -``` - -or -```sh -celestia-appd start --influxdb-url=http://your-influx-ip:8086/ --influxdb-token="your-token" -``` - -### e2e tests - -To push events from e2e tests, we only need to specify the URL and the token via -the cli. - -```bash -cd test/e2e -make && ./build/runner -f ./networks/ci.toml --influxdb-url=http://your-influx-ip:8086/ --influxdb-token="your-token" -``` -*/ +/**/ package trace diff --git a/pkg/trace/fileserver.go b/pkg/trace/fileserver.go new file mode 100644 index 0000000000..2ab6ce60b4 --- /dev/null +++ b/pkg/trace/fileserver.go @@ -0,0 +1,317 @@ +package trace + +import ( + "bufio" + "encoding/json" + "errors" + "fmt" + "io" + "mime" + "mime/multipart" + "net/http" + "net/url" + "os" + "path" + "path/filepath" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/s3" +) + +func (lt *LocalTracer) getTableHandler() http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + // Parse the request to get the data + if err := r.ParseForm(); err != nil { + http.Error(w, "Failed to parse form", http.StatusBadRequest) + return + } + + inputString := r.FormValue("table") + if inputString == "" { + http.Error(w, "No data provided", http.StatusBadRequest) + return + } + + f, err := lt.ReadTable(inputString) + if err != nil { + http.Error(w, fmt.Sprintf("failed to read table: %v", err), http.StatusInternalServerError) + return + } + + // Use the pump function to continuously read from the file and write to + // the response writer + reader, writer := pump(inputString, bufio.NewReader(f)) + defer reader.Close() + + // Set the content type to the writer's form data content type + w.Header().Set("Content-Type", writer.FormDataContentType()) + + // Copy the data from the reader to the response writer + if _, err := io.Copy(w, reader); err != nil { + http.Error(w, "Failed to send data", http.StatusInternalServerError) + return + } + } +} + +// pump continuously reads from a bufio.Reader and writes to a multipart.Writer. +// It returns the reader end of the pipe and the writer for consumption by the +// server. +func pump(table string, br *bufio.Reader) (*io.PipeReader, *multipart.Writer) { + r, w := io.Pipe() + m := multipart.NewWriter(w) + + go func( + table string, + m *multipart.Writer, + w *io.PipeWriter, + br *bufio.Reader, + ) { + defer w.Close() + defer m.Close() + + part, err := m.CreateFormFile("filename", table+".jsonl") + if err != nil { + return + } + + if _, err = io.Copy(part, br); err != nil { + return + } + + }(table, m, w, br) + + return r, m +} + +func (lt *LocalTracer) servePullData() { + mux := http.NewServeMux() + mux.HandleFunc("/get_table", lt.getTableHandler()) + err := http.ListenAndServe(lt.cfg.Instrumentation.TracePullAddress, mux) //nolint:gosec + if err != nil { + lt.logger.Error("trace pull server failure", "err", err) + } +} + +// GetTable downloads a table from the server and saves it to the given directory. It uses a multipart +// response to download the file. +func GetTable(serverURL, table, dirPath string) error { + data := url.Values{} + data.Set("table", table) + + serverURL = serverURL + "/get_table" + + resp, err := http.PostForm(serverURL, data) //nolint:gosec + if err != nil { + return err + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + return fmt.Errorf("unexpected status code: %d", resp.StatusCode) + } + + _, params, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return err + } + + boundary, ok := params["boundary"] + if !ok { + panic("Not a multipart response") + } + + err = os.MkdirAll(dirPath, 0755) + if err != nil { + return err + } + + outputFile, err := os.Create(path.Join(dirPath, table+".jsonl")) + if err != nil { + return err + } + defer outputFile.Close() + + reader := multipart.NewReader(resp.Body, boundary) + + for { + part, err := reader.NextPart() + if err == io.EOF { + break // End of multipart + } + if err != nil { + return err + } + + contentDisposition, params, err := mime.ParseMediaType(part.Header.Get("Content-Disposition")) + if err != nil { + return err + } + + if contentDisposition == "form-data" && params["filename"] != "" { + _, err = io.Copy(outputFile, part) + if err != nil { + return err + } + } + + part.Close() + } + + return nil +} + +// S3Config is a struct that holds the configuration for an S3 bucket. +type S3Config struct { + BucketName string `json:"bucket_name"` + Region string `json:"region"` + AccessKey string `json:"access_key"` + SecretKey string `json:"secret_key"` + // PushDelay is the time in seconds to wait before pushing the file to S3. + // If this is 0, it defaults is used. + PushDelay int64 `json:"push_delay"` +} + +// readS3Config reads an S3Config from a file in the given directory. +func readS3Config(dir string) (S3Config, error) { + cfg := S3Config{} + f, err := os.Open(filepath.Join(dir, "s3.json")) + if errors.Is(err, os.ErrNotExist) { + return cfg, nil + } + if err != nil { + return cfg, err + } + defer f.Close() + err = json.NewDecoder(f).Decode(&cfg) + if cfg.PushDelay == 0 { + cfg.PushDelay = 60 + } + return cfg, err +} + +// PushS3 pushes a file to an S3 bucket using the given S3Config. It uses the +// chainID and the nodeID to organize the files in the bucket. The directory +// structure is chainID/nodeID/table.jsonl . +func PushS3(chainID, nodeID string, s3cfg S3Config, f *os.File) error { + sess, err := session.NewSession(&aws.Config{ + Region: aws.String(s3cfg.Region), + Credentials: credentials.NewStaticCredentials( + s3cfg.AccessKey, + s3cfg.SecretKey, + "", + ), + }, + ) + if err != nil { + return err + } + + s3Svc := s3.New(sess) + + key := fmt.Sprintf("%s/%s/%s", chainID, nodeID, filepath.Base(f.Name())) + + _, err = s3Svc.PutObject(&s3.PutObjectInput{ + Bucket: aws.String(s3cfg.BucketName), + Key: aws.String(key), + Body: f, + }) + + return err +} + +func (lt *LocalTracer) pushLoop() { + for { + time.Sleep(time.Second * time.Duration(lt.s3Config.PushDelay)) + err := lt.PushAll() + if err != nil { + lt.logger.Error("failed to push tables", "error", err) + } + } +} + +func (lt *LocalTracer) PushAll() error { + for table := range lt.fileMap { + f, err := lt.ReadTable(table) + if err != nil { + return err + } + if err := PushS3(lt.chainID, lt.nodeID, lt.s3Config, f); err != nil { + return err + } + f.Close() + } + return nil +} + +// S3Download downloads files that match some prefix from an S3 bucket to a +// local directory dst. +func S3Download(dst, prefix string, cfg S3Config) error { + // Ensure local directory structure exists + err := os.MkdirAll(dst, os.ModePerm) + if err != nil { + return err + } + + sess, err := session.NewSession(&aws.Config{ + Region: aws.String(cfg.Region), + Credentials: credentials.NewStaticCredentials( + cfg.AccessKey, + cfg.SecretKey, + "", + ), + }, + ) + if err != nil { + return err + } + + s3Svc := s3.New(sess) + input := &s3.ListObjectsV2Input{ + Bucket: aws.String(cfg.BucketName), + Prefix: aws.String(prefix), + Delimiter: aws.String(""), + } + + err = s3Svc.ListObjectsV2Pages(input, func(page *s3.ListObjectsV2Output, lastPage bool) bool { + for _, content := range page.Contents { + localFilePath := filepath.Join(dst, strings.TrimPrefix(*content.Key, prefix)) + fmt.Printf("Downloading %s to %s\n", *content.Key, localFilePath) + + // Create the directories in the path + if err := os.MkdirAll(filepath.Dir(localFilePath), os.ModePerm); err != nil { + return false + } + + // Create a file to write the S3 Object contents to. + f, err := os.Create(localFilePath) + if err != nil { + return false + } + + resp, err := s3Svc.GetObject(&s3.GetObjectInput{ + Bucket: aws.String(cfg.BucketName), + Key: aws.String(*content.Key), + }) + if err != nil { + f.Close() + continue + } + defer resp.Body.Close() + + // Copy the contents of the S3 object to the local file + if _, err := io.Copy(f, resp.Body); err != nil { + return false + } + + fmt.Printf("Successfully downloaded %s to %s\n", *content.Key, localFilePath) + f.Close() + } + return !lastPage // continue paging + }) + return err +} diff --git a/pkg/trace/flags.go b/pkg/trace/flags.go index 5d8b2a44ad..6f17eebd27 100644 --- a/pkg/trace/flags.go +++ b/pkg/trace/flags.go @@ -1,10 +1,10 @@ package trace const ( - FlagInfluxDBURL = "influxdb-url" - FlagInfluxDBToken = "influxdb-token" - FlagInfluxDBURLDescription = "URL of the InfluxDB instance to use for arbitrary data collection. If not specified, data will not be collected" - FlagInfluxDBTokenDescription = "Token to use when writing to the InfluxDB instance. Must be specified if 'influxdb-url' is specified" //nolint:gosec + FlagTracePushConfig = "trace-push-url" + FlagTracePullAddress = "trace-pull-address" + FlagTracePushConfigDescription = "URL of the trace push server" + FlagTracePullAddressDescription = "address to listen on for pulling trace data" FlagPyroscopeURL = "pyroscope-url" FlagPyroscopeURLDescription = "URL of the Pyroscope instance to use for continuous profiling. If not specified, profiling will not be enabled" diff --git a/pkg/trace/local_tracer.go b/pkg/trace/local_tracer.go new file mode 100644 index 0000000000..7a70baa440 --- /dev/null +++ b/pkg/trace/local_tracer.go @@ -0,0 +1,203 @@ +package trace + +import ( + "encoding/json" + "fmt" + "os" + "path" + "strings" + "time" + + "github.com/tendermint/tendermint/config" + "github.com/tendermint/tendermint/libs/log" +) + +// Event wraps some trace data with metadata that dictates the table and things +// like the chainID and nodeID. +type Event[T any] struct { + ChainID string `json:"chain_id"` + NodeID string `json:"node_id"` + Table string `json:"table"` + Timestamp time.Time `json:"timestamp"` + Msg T `json:"msg"` +} + +// NewEvent creates a new Event with the given chainID, nodeID, table, and msg. +// It adds the current time as the timestamp. +func NewEvent[T any](chainID, nodeID, table string, msg T) Event[T] { + return Event[T]{ + ChainID: chainID, + NodeID: nodeID, + Table: table, + Msg: msg, + Timestamp: time.Now(), + } +} + +// LocalTracer saves all of the events passed to the retuen channel to files +// based on their "type" (a string field in the event). Each type gets its own +// file. The internals are purposefully not *explicitly* thread safe to avoid the +// overhead of locking with each event save. Only pass events to the returned +// channel. Call CloseAll to close all open files. +type LocalTracer struct { + chainID, nodeID string + logger log.Logger + cfg *config.Config + s3Config S3Config + + // fileMap maps tables to their open files files are threadsafe, but the map + // is not. Therefore don't create new files after initialization to remain + // threadsafe. + fileMap map[string]*bufferedFile + // canal is a channel for all events that are being written. It acts as an + // extra buffer to avoid blocking the caller when writing to files. + canal chan Event[Entry] +} + +// NewLocalTracer creates a struct that will save all of the events passed to +// the retuen channel to files based on their "table" (a string field in the +// event). Each type gets its own file. The internal are purposefully not thread +// safe to avoid the overhead of locking with each event save. Only pass events +// to the returned channel. Call CloseAll to close all open files. Goroutine to +// save events is started in this function. +func NewLocalTracer(cfg *config.Config, logger log.Logger, chainID, nodeID string) (*LocalTracer, error) { + fm := make(map[string]*bufferedFile) + p := path.Join(cfg.RootDir, "data", "traces") + for _, table := range splitAndTrimEmpty(cfg.Instrumentation.TracingTables, ",", " ") { + fileName := fmt.Sprintf("%s/%s.jsonl", p, table) + err := os.MkdirAll(p, 0700) + if err != nil { + return nil, fmt.Errorf("failed to create directory %s: %w", p, err) + } + file, err := os.OpenFile(fileName, os.O_APPEND|os.O_CREATE|os.O_RDWR, 0644) + if err != nil { + return nil, fmt.Errorf("failed to open or create file %s: %w", fileName, err) + } + bf := newbufferedFile(file) + fm[table] = bf + } + + lt := &LocalTracer{ + fileMap: fm, + cfg: cfg, + canal: make(chan Event[Entry], cfg.Instrumentation.TraceBufferSize), + chainID: chainID, + nodeID: nodeID, + logger: logger, + } + + go lt.drainCanal() + if cfg.Instrumentation.TracePullAddress != "" { + go lt.servePullData() + } + if cfg.Instrumentation.TracePushConfig != "" { + s3Config, err := readS3Config(path.Join(cfg.RootDir, "config", cfg.Instrumentation.TracePushConfig)) + if err != nil { + return nil, fmt.Errorf("failed to read s3 config: %w", err) + } + lt.s3Config = s3Config + go lt.pushLoop() + } + + return lt, nil +} + +func (lt *LocalTracer) Write(e Entry) { + if !lt.IsCollecting(e.Table()) { + return + } + lt.canal <- NewEvent(lt.chainID, lt.nodeID, e.Table(), e) +} + +// ReadTable returns a file for the given table. If the table is not being +// collected, an error is returned. This method is not thread-safe. +func (lt *LocalTracer) ReadTable(table string) (*os.File, error) { + bf, has := lt.getFile(table) + if !has { + return nil, fmt.Errorf("table %s not found", table) + } + + return bf.File() +} + +func (lt *LocalTracer) IsCollecting(table string) bool { + if _, has := lt.getFile(table); has { + return true + } + return false +} + +// getFile gets a file for the given type. This method is purposely +// not thread-safe to avoid the overhead of locking with each event save. +func (lt *LocalTracer) getFile(table string) (*bufferedFile, bool) { + f, has := lt.fileMap[table] + return f, has +} + +// saveEventToFile marshals an Event into JSON and appends it to a file named after the event's Type. +func (lt *LocalTracer) saveEventToFile(event Event[Entry]) error { + file, has := lt.getFile(event.Table) + if !has { + return fmt.Errorf("table %s not found", event.Table) + } + + eventJSON, err := json.Marshal(event) + if err != nil { + return fmt.Errorf("failed to marshal event: %v", err) + } + + if _, err := file.Write(append(eventJSON, '\n')); err != nil { + return fmt.Errorf("failed to write event to file: %v", err) + } + + return nil +} + +// draincanal takes a variadic number of channels of Event pointers and drains them into files. +func (lt *LocalTracer) drainCanal() { + // purposefully do not lock, and rely on the channel to provide sync + // actions, to avoid overhead of locking with each event save. + for ev := range lt.canal { + if err := lt.saveEventToFile(ev); err != nil { + lt.logger.Error("failed to save event to file", "error", err) + } + } +} + +// Stop optionally uploads and closes all open files. +func (lt *LocalTracer) Stop() { + for _, file := range lt.fileMap { + err := file.Flush() + if err != nil { + lt.logger.Error("failed to flush file", "error", err) + } + err = file.Close() + if err != nil { + lt.logger.Error("failed to close file", "error", err) + } + } +} + +// splitAndTrimEmpty slices s into all subslices separated by sep and returns a +// slice of the string s with all leading and trailing Unicode code points +// contained in cutset removed. If sep is empty, SplitAndTrim splits after each +// UTF-8 sequence. First part is equivalent to strings.SplitN with a count of +// -1. also filter out empty strings, only return non-empty strings. +// +// NOTE: this is copy pasted from the config package to avoid a circular +// dependency. See the function of the same name for tests. +func splitAndTrimEmpty(s, sep, cutset string) []string { + if s == "" { + return []string{} + } + + spl := strings.Split(s, sep) + nonEmptyStrings := make([]string, 0, len(spl)) + for i := 0; i < len(spl); i++ { + element := strings.Trim(spl[i], cutset) + if element != "" { + nonEmptyStrings = append(nonEmptyStrings, element) + } + } + return nonEmptyStrings +} diff --git a/pkg/trace/local_tracer_test.go b/pkg/trace/local_tracer_test.go new file mode 100644 index 0000000000..220c37ddc6 --- /dev/null +++ b/pkg/trace/local_tracer_test.go @@ -0,0 +1,153 @@ +package trace + +import ( + "fmt" + "io" + "net" + "os" + "path" + "testing" + "time" + + "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/config" + "github.com/tendermint/tendermint/libs/log" +) + +const ( + // testEventTable is the table name for the testEvent struct. + testEventTable = "testEvent" +) + +type testEvent struct { + City string `json:"city"` + Length int `json:"length"` +} + +func (c testEvent) Table() string { + return testEventTable +} + +// TestLocalTracerReadWrite tests the local client by writing some events, +// reading them back and comparing them, writing at the same time as reading. +func TestLocalTracerReadWrite(t *testing.T) { + port, err := getFreePort() + require.NoError(t, err) + client := setupLocalTracer(t, port) + + annecy := testEvent{"Annecy", 420} + paris := testEvent{"Paris", 420} + client.Write(annecy) + client.Write(paris) + + time.Sleep(100 * time.Millisecond) + + f, err := client.ReadTable(testEventTable) + require.NoError(t, err) + + // write at the same time as reading to test thread safety this test will be + // flakey if this is not being handled correctly + migenees := testEvent{"Migennes", 620} + pontivy := testEvent{"Pontivy", 720} + client.Write(migenees) + client.Write(pontivy) + + events, err := DecodeFile[testEvent](f) + require.NoError(t, err) + require.GreaterOrEqual(t, len(events), 2) + require.Equal(t, annecy, events[0].Msg) + require.Equal(t, paris, events[1].Msg) + f.Close() + + time.Sleep(100 * time.Millisecond) + + f, err = client.ReadTable(testEventTable) + require.NoError(t, err) + defer f.Close() + events, err = DecodeFile[testEvent](f) + require.NoError(t, err) + require.Len(t, events, 4) + require.Equal(t, migenees, events[2].Msg) + require.Equal(t, pontivy, events[3].Msg) +} + +// TestLocalTracerServerPull tests the pull portion of the server. +func TestLocalTracerServerPull(t *testing.T) { + port, err := getFreePort() + require.NoError(t, err) + client := setupLocalTracer(t, port) + + for i := 0; i < 5; i++ { + client.Write(testEvent{"Annecy", i}) + } + + // Wait for the server to start + time.Sleep(100 * time.Millisecond) + + // Test the server + newDir := t.TempDir() + + url := fmt.Sprintf("http://localhost:%d", port) + + // try to read a table that is not being collected. error expected. + err = GetTable(url, "canal", newDir) + require.Error(t, err) + + err = GetTable(url, testEventTable, newDir) + require.NoError(t, err) + + originalFile, err := client.ReadTable(testEventTable) + require.NoError(t, err) + defer originalFile.Close() + originalBz, err := io.ReadAll(originalFile) + require.NoError(t, err) + + path := path.Join(newDir, testEventTable+".jsonl") + downloadedFile, err := os.Open(path) + require.NoError(t, err) + defer downloadedFile.Close() + + downloadedBz, err := io.ReadAll(downloadedFile) + require.NoError(t, err) + require.Equal(t, originalBz, downloadedBz) + + _, err = downloadedFile.Seek(0, 0) // reset the seek on the file to read it again + require.NoError(t, err) + events, err := DecodeFile[testEvent](downloadedFile) + require.NoError(t, err) + require.Len(t, events, 5) + for i := 0; i < 5; i++ { + require.Equal(t, i, events[i].Msg.Length) + } +} + +func setupLocalTracer(t *testing.T, port int) *LocalTracer { + logger := log.NewNopLogger() + cfg := config.DefaultConfig() + cfg.SetRoot(t.TempDir()) + cfg.Instrumentation.TraceBufferSize = 100 + cfg.Instrumentation.TracingTables = testEventTable + cfg.Instrumentation.TracePullAddress = fmt.Sprintf(":%d", port) + + client, err := NewLocalTracer(cfg, logger, "test_chain", "test_node") + if err != nil { + t.Fatalf("failed to create local client: %v", err) + } + + return client +} + +// getFreePort returns a free port and optionally an error. +func getFreePort() (int, error) { + a, err := net.ResolveTCPAddr("tcp", "localhost:0") + if err != nil { + return 0, err + } + + l, err := net.ListenTCP("tcp", a) + if err != nil { + return 0, err + } + defer l.Close() + return l.Addr().(*net.TCPAddr).Port, nil +} diff --git a/pkg/trace/schema/consensus.go b/pkg/trace/schema/consensus.go index e22b658c32..4942a91afe 100644 --- a/pkg/trace/schema/consensus.go +++ b/pkg/trace/schema/consensus.go @@ -21,162 +21,148 @@ func ConsensusTables() []string { // Schema constants for the consensus round state tracing database. const ( // RoundStateTable is the name of the table that stores the consensus - // state traces. Follows this schema: - // - // | time | height | round | step | + // state traces. RoundStateTable = "consensus_round_state" - - // StepFieldKey is the name of the field that stores the consensus step. The - // value is a string. - StepFieldKey = "step" ) +// RoundState describes schema for the "consensus_round_state" table. +type RoundState struct { + Height int64 `json:"height"` + Round int32 `json:"round"` + Step cstypes.RoundStepType `json:"step"` +} + +// Table returns the table name for the RoundState struct. +func (r RoundState) Table() string { + return RoundStateTable +} + // WriteRoundState writes a tracing point for a tx using the predetermined -// schema for consensus state tracing. This is used to create a table in the following -// schema: -// -// | time | height | round | step | -func WriteRoundState(client *trace.Client, height int64, round int32, step cstypes.RoundStepType) { - client.WritePoint(RoundStateTable, map[string]interface{}{ - HeightFieldKey: height, - RoundFieldKey: round, - StepFieldKey: step.String(), - }) +// schema for consensus state tracing. +func WriteRoundState(client trace.Tracer, height int64, round int32, step cstypes.RoundStepType) { + client.Write(RoundState{Height: height, Round: round, Step: step}) } // Schema constants for the "consensus_block_parts" table. const ( // BlockPartsTable is the name of the table that stores the consensus block // parts. - // following schema: - // - // | time | height | round | index | peer | transfer type | BlockPartsTable = "consensus_block_parts" - - // BlockPartIndexFieldKey is the name of the field that stores the block - // part - BlockPartIndexFieldKey = "index" ) +// BlockPart describes schema for the "consensus_block_parts" table. +type BlockPart struct { + Height int64 `json:"height"` + Round int32 `json:"round"` + Index int32 `json:"index"` + Peer p2p.ID `json:"peer"` + TransferType TransferType `json:"transfer_type"` +} + +// Table returns the table name for the BlockPart struct. +func (b BlockPart) Table() string { + return BlockPartsTable +} + // WriteBlockPart writes a tracing point for a BlockPart using the predetermined -// schema for consensus state tracing. This is used to create a table in the -// following schema: -// -// | time | height | round | index | peer | transfer type | +// schema for consensus state tracing. func WriteBlockPart( - client *trace.Client, + client trace.Tracer, height int64, round int32, peer p2p.ID, index uint32, - transferType string, + transferType TransferType, ) { // this check is redundant to what is checked during WritePoint, although it // is an optimization to avoid allocations from the map of fields. if !client.IsCollecting(BlockPartsTable) { return } - client.WritePoint(BlockPartsTable, map[string]interface{}{ - HeightFieldKey: height, - RoundFieldKey: round, - BlockPartIndexFieldKey: index, - PeerFieldKey: peer, - TransferTypeFieldKey: transferType, - }) -} - -const ( - // BlockTable is the name of the table that stores metadata about consensus blocks. - // following schema: - // - // | time | height | timestamp | - BlockTable = "consensus_block" - - // UnixMillisecondTimestampFieldKey is the name of the field that stores the timestamp in - // the last commit in unix milliseconds. - UnixMillisecondTimestampFieldKey = "unix_millisecond_timestamp" - - // TxCountFieldKey is the name of the field that stores the number of - // transactions in the block. - TxCountFieldKey = "tx_count" - - // SquareSizeFieldKey is the name of the field that stores the square size - // of the block. SquareSize is the number of shares in a single row or - // column of the origianl data square. - SquareSizeFieldKey = "square_size" - - // BlockSizeFieldKey is the name of the field that stores the size of - // the block data in bytes. - BlockSizeFieldKey = "block_size" - - // ProposerFieldKey is the name of the field that stores the proposer of - // the block. - ProposerFieldKey = "proposer" - - // LastCommitRoundFieldKey is the name of the field that stores the round - // of the last commit. - LastCommitRoundFieldKey = "last_commit_round" -) - -func WriteBlock(client *trace.Client, block *types.Block, size int) { - client.WritePoint(BlockTable, map[string]interface{}{ - HeightFieldKey: block.Height, - UnixMillisecondTimestampFieldKey: block.Time.UnixMilli(), - TxCountFieldKey: len(block.Data.Txs), - SquareSizeFieldKey: block.SquareSize, - BlockSizeFieldKey: size, - ProposerFieldKey: block.ProposerAddress.String(), - LastCommitRoundFieldKey: block.LastCommit.Round, + client.Write(BlockPart{ + Height: height, + Round: round, + Index: int32(index), + Peer: peer, + TransferType: transferType, }) } // Schema constants for the consensus votes tracing database. const ( // VoteTable is the name of the table that stores the consensus - // voting traces. Follows this schema: - // - // | time | height | round | vote_type | vote_height | vote_round - // | vote_block_id| vote_unix_millisecond_timestamp - // | vote_validator_address | vote_validator_index | peer - // | transfer_type | + // voting traces. VoteTable = "consensus_vote" - - VoteTypeFieldKey = "vote_type" - VoteHeightFieldKey = "vote_height" - VoteRoundFieldKey = "vote_round" - VoteBlockIDFieldKey = "vote_block_id" - VoteTimestampFieldKey = "vote_unix_millisecond_timestamp" - ValidatorAddressFieldKey = "vote_validator_address" - ValidatorIndexFieldKey = "vote_validator_index" ) +// Vote describes schema for the "consensus_vote" table. +type Vote struct { + Height int64 `json:"height"` + Round int32 `json:"round"` + VoteType string `json:"vote_type"` + VoteHeight int64 `json:"vote_height"` + VoteRound int32 `json:"vote_round"` + VoteMillisecondTimestamp int64 `json:"vote_unix_millisecond_timestamp"` + ValidatorAddress string `json:"vote_validator_address"` + Peer p2p.ID `json:"peer"` + TransferType TransferType `json:"transfer_type"` +} + +func (v Vote) Table() string { + return VoteTable +} + // WriteVote writes a tracing point for a vote using the predetermined // schema for consensus vote tracing. -// This is used to create a table in the following -// schema: -// -// | time | height | round | vote_type | vote_height | vote_round -// | vote_block_id| vote_unix_millisecond_timestamp -// | vote_validator_address | vote_validator_index | peer -// | transfer_type | -func WriteVote(client *trace.Client, +func WriteVote(client trace.Tracer, height int64, // height of the current peer when it received/sent the vote round int32, // round of the current peer when it received/sent the vote vote *types.Vote, // vote received by the current peer peer p2p.ID, // the peer from which it received the vote or the peer to which it sent the vote - transferType string, // download (received) or upload(sent) + transferType TransferType, // download (received) or upload(sent) ) { - client.WritePoint(VoteTable, map[string]interface{}{ - HeightFieldKey: height, - RoundFieldKey: round, - VoteTypeFieldKey: vote.Type.String(), - VoteHeightFieldKey: vote.Height, - VoteRoundFieldKey: vote.Round, - VoteBlockIDFieldKey: vote.BlockID.Hash.String(), - VoteTimestampFieldKey: vote.Timestamp.UnixMilli(), - ValidatorAddressFieldKey: vote.ValidatorAddress.String(), - ValidatorIndexFieldKey: vote.ValidatorIndex, - PeerFieldKey: peer, - TransferTypeFieldKey: transferType, + client.Write(Vote{ + Height: height, + Round: round, + VoteType: vote.Type.String(), + VoteHeight: vote.Height, + VoteRound: vote.Round, + VoteMillisecondTimestamp: vote.Timestamp.UnixMilli(), + ValidatorAddress: vote.ValidatorAddress.String(), + Peer: peer, + TransferType: transferType, + }) +} + +const ( + // BlockTable is the name of the table that stores metadata about consensus blocks. + BlockTable = "consensus_block" +) + +// BlockSummary describes schema for the "consensus_block" table. +type BlockSummary struct { + Height int64 `json:"height"` + UnixMillisecondTimestamp int64 `json:"unix_millisecond_timestamp"` + TxCount int `json:"tx_count"` + SquareSize uint64 `json:"square_size"` + BlockSize int `json:"block_size"` + Proposer string `json:"proposer"` + LastCommitRound int32 `json:"last_commit_round"` +} + +func (b BlockSummary) Table() string { + return BlockTable +} + +// WriteBlockSummary writes a tracing point for a block using the predetermined +func WriteBlockSummary(client trace.Tracer, block *types.Block, size int) { + client.Write(BlockSummary{ + Height: block.Height, + UnixMillisecondTimestamp: block.Time.UnixMilli(), + TxCount: len(block.Data.Txs), + SquareSize: block.SquareSize, + BlockSize: size, + Proposer: block.ProposerAddress.String(), + LastCommitRound: block.LastCommit.Round, }) } diff --git a/pkg/trace/schema/mempool.go b/pkg/trace/schema/mempool.go index 4b570f6e2f..c143cfb64d 100644 --- a/pkg/trace/schema/mempool.go +++ b/pkg/trace/schema/mempool.go @@ -4,7 +4,6 @@ import ( "github.com/tendermint/tendermint/libs/bytes" "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/pkg/trace" - "github.com/tendermint/tendermint/types" ) // MempoolTables returns the list of tables for mempool tracing. @@ -12,7 +11,6 @@ func MempoolTables() []string { return []string{ MempoolTxTable, MempoolPeerStateTable, - MempoolRejectedTable, } } @@ -20,49 +18,35 @@ func MempoolTables() []string { const ( // MempoolTxTable is the tracing "measurement" (aka table) for the mempool // that stores tracing data related to gossiping transactions. - // - // The schema for this table is: - // | time | peerID | tx size | tx hash | transfer type | mempool version | MempoolTxTable = "mempool_tx" +) - // TxFieldKey is the tracing field key for receiving for sending a - // tx. This should take the form of a tx hash as the value. - TxFieldKey = "tx" - - // SizeFieldKey is the tracing field key for the size of a tx. This - // should take the form of the size of the tx as the value. - SizeFieldKey = "size" - - // VersionFieldKey is the tracing field key for the version of the mempool. - // This is used to distinguish between versions of the mempool. - VersionFieldKey = "version" - - // V1VersionFieldValue is a tracing field value for the version of - // the mempool. This value is used by the "version" field key. - V1VersionFieldValue = "v1" +// MemPoolTx describes the schema for the "mempool_tx" table. +type MempoolTx struct { + TxHash string `json:"tx_hash"` + Peer p2p.ID `json:"peer"` + Size int `json:"size"` + TransferType TransferType `json:"transfer_type"` +} - // CatVersionFieldValue is a tracing field value for the version of - // the mempool. This value is used by the "version" field key. - CatVersionFieldValue = "cat" -) +// Table returns the table name for the MempoolTx struct. +func (m MempoolTx) Table() string { + return MempoolTxTable +} // WriteMempoolTx writes a tracing point for a tx using the predetermined -// schema for mempool tracing. This is used to create a table in the following -// schema: -// -// | time | peerID | tx size | tx hash | transfer type | mempool version | -func WriteMempoolTx(client *trace.Client, peer p2p.ID, tx []byte, transferType, version string) { +// schema for mempool tracing. +func WriteMempoolTx(client trace.Tracer, peer p2p.ID, txHash []byte, transferType TransferType) { // this check is redundant to what is checked during WritePoint, although it // is an optimization to avoid allocations from the map of fields. if !client.IsCollecting(MempoolTxTable) { return } - client.WritePoint(MempoolTxTable, map[string]interface{}{ - TxFieldKey: bytes.HexBytes(types.Tx(tx).Hash()).String(), - PeerFieldKey: peer, - SizeFieldKey: len(tx), - TransferTypeFieldKey: transferType, - VersionFieldKey: version, + client.Write(MempoolTx{ + TxHash: bytes.HexBytes(txHash).String(), + Peer: peer, + Size: len(txHash), + TransferType: transferType, }) } @@ -70,64 +54,48 @@ const ( // MempoolPeerState is the tracing "measurement" (aka table) for the mempool // that stores tracing data related to mempool state, specifically // the gossipping of "SeenTx" and "WantTx". - // - // The schema for this table is: - // | time | peerID | update type | mempool version | MempoolPeerStateTable = "mempool_peer_state" +) - // StateUpdateFieldKey is the tracing field key for state updates of the mempool. - StateUpdateFieldKey = "update" - - // SeenTxStateUpdateFieldValue is a tracing field value for the state - // update of the mempool. This value is used by the "update" field key. - SeenTxStateUpdateFieldValue = "seen_tx" - - // WantTxStateUpdateFieldValue is a tracing field value for the state - // update of the mempool. This value is used by the "update" field key. - WantTxStateUpdateFieldValue = "want_tx" - - // RemovedTxStateUpdateFieldValue is a tracing field value for the local - // state update of the mempool. This value is used by the "update" field - // key. - RemovedTxStateUpdateFieldValue = "removed_tx" +type MempoolStateUpdateType string - // AddedTxStateUpdateFieldValue is a tracing field value for the local state - // update of the mempool. This value is used by the "update" field key. - AddedTxStateUpdateFieldValue = "added_tx" +const ( + SeenTx MempoolStateUpdateType = "SeenTx" + WantTx MempoolStateUpdateType = "WantTx" + Unknown MempoolStateUpdateType = "Unknown" ) -// WriteMempoolPeerState writes a tracing point for the mempool state using -// the predetermined schema for mempool tracing. This is used to create a table -// in the following schema: -// -// | time | peerID | transfer type | state update | mempool version | -func WriteMempoolPeerState(client *trace.Client, peer p2p.ID, stateUpdate, transferType, version string) { - // this check is redundant to what is checked during WritePoint, although it - // is an optimization to avoid allocations from creating the map of fields. - if !client.IsCollecting(MempoolPeerStateTable) { - return - } - client.WritePoint(MempoolPeerStateTable, map[string]interface{}{ - PeerFieldKey: peer, - TransferTypeFieldKey: transferType, - StateUpdateFieldKey: stateUpdate, - VersionFieldKey: version, - }) +// MempoolPeerState describes the schema for the "mempool_peer_state" table. +type MempoolPeerState struct { + Peer p2p.ID `json:"peer"` + StateUpdate MempoolStateUpdateType `json:"state_update"` + TxHash string `json:"tx_hash"` + TransferType TransferType `json:"transfer_type"` } -const ( - MempoolRejectedTable = "mempool_rejected" - ReasonFieldKey = "reason" -) +// Table returns the table name for the MempoolPeerState struct. +func (m MempoolPeerState) Table() string { + return MempoolPeerStateTable +} -// WriteMempoolRejected records why a transaction was rejected. -func WriteMempoolRejected(client *trace.Client, reason string) { +// WriteMempoolPeerState writes a tracing point for the mempool state using +// the predetermined schema for mempool tracing. +func WriteMempoolPeerState( + client trace.Tracer, + peer p2p.ID, + stateUpdate MempoolStateUpdateType, + txHash []byte, + transferType TransferType, +) { // this check is redundant to what is checked during WritePoint, although it // is an optimization to avoid allocations from creating the map of fields. - if !client.IsCollecting(MempoolRejectedTable) { + if !client.IsCollecting(MempoolPeerStateTable) { return } - client.WritePoint(MempoolRejectedTable, map[string]interface{}{ - ReasonFieldKey: reason, + client.Write(MempoolPeerState{ + Peer: peer, + StateUpdate: stateUpdate, + TransferType: transferType, + TxHash: bytes.HexBytes(txHash).String(), }) } diff --git a/pkg/trace/schema/schema.go b/pkg/trace/schema/schema.go new file mode 100644 index 0000000000..8eeabd78c8 --- /dev/null +++ b/pkg/trace/schema/schema.go @@ -0,0 +1,36 @@ +package schema + +import ( + "strings" + + "github.com/tendermint/tendermint/config" +) + +func init() { + config.DefaultTracingTables = strings.Join(AllTables(), ",") +} + +func AllTables() []string { + tables := []string{} + tables = append(tables, MempoolTables()...) + tables = append(tables, ConsensusTables()...) + return tables +} + +type TransferType int + +const ( + Download TransferType = iota + Upload +) + +func (t TransferType) String() string { + switch t { + case Download: + return "download" + case Upload: + return "upload" + default: + return "unknown" + } +} diff --git a/pkg/trace/schema/schema_test.go b/pkg/trace/schema/schema_test.go new file mode 100644 index 0000000000..e93260d74d --- /dev/null +++ b/pkg/trace/schema/schema_test.go @@ -0,0 +1,17 @@ +package schema + +// Define a test struct with various field types and json tags +type TestStruct struct { + Name string `json:"name"` + Age int `json:"age"` + Email string `json:"email"` +} + +// Mock for a custom type with String method +type CustomType int + +// TestStructWithCustomType includes a field with a custom type having a String method +type TestStructWithCustomType struct { + ID int `json:"id"` + Type CustomType `json:"type"` +} diff --git a/pkg/trace/schema/tables.go b/pkg/trace/schema/tables.go deleted file mode 100644 index 11b106e02c..0000000000 --- a/pkg/trace/schema/tables.go +++ /dev/null @@ -1,42 +0,0 @@ -package schema - -import "github.com/tendermint/tendermint/config" - -func init() { - config.DefaultInfluxTables = AllTables() -} - -func AllTables() []string { - tables := []string{} - tables = append(tables, MempoolTables()...) - tables = append(tables, ConsensusTables()...) - return tables -} - -// General purpose schema constants used across multiple tables -const ( - // PeerFieldKey is the tracing field key for the peer that sent or - // received a tx. This should take the form of the peer's address as the - // value. - PeerFieldKey = "peer" - - // TransferTypeFieldKey is the tracing field key for the class of a tx - // and votes. - TransferTypeFieldKey = "transfer_type" - - // TransferTypeDownload is a tracing field value for receiving some - // data from a peer. This value is used by the "TransferType" field key. - TransferTypeDownload = "download" - - // TransferTypeUpload is a tracing field value for sending some data - // to a peer. This value is used by the "TransferType" field key. - TransferTypeUpload = "upload" - - // RoundFieldKey is the name of the field that stores the consensus round. - // The value is an int32. - RoundFieldKey = "round" - - // HeightFieldKey is the name of the field that stores the consensus height. - // The value is an int64. - HeightFieldKey = "height" -) diff --git a/pkg/trace/tracer.go b/pkg/trace/tracer.go new file mode 100644 index 0000000000..67608596f6 --- /dev/null +++ b/pkg/trace/tracer.go @@ -0,0 +1,49 @@ +package trace + +import ( + "errors" + "os" + + "github.com/tendermint/tendermint/config" + "github.com/tendermint/tendermint/libs/log" +) + +// Entry is an interface for all structs that are used to define the schema for +// traces. +type Entry interface { + // Table defines which table the struct belongs to. + Table() string +} + +// Tracer defines the methods for a client that can write and read trace data. +type Tracer interface { + Write(Entry) + ReadTable(table string) (*os.File, error) + IsCollecting(table string) bool + Stop() +} + +func NewTracer(cfg *config.Config, logger log.Logger, chainID, nodeID string) (Tracer, error) { + switch cfg.Instrumentation.TraceType { + case "local": + return NewLocalTracer(cfg, logger, chainID, nodeID) + case "noop": + return NoOpTracer(), nil + default: + logger.Error("unknown tracer type, using noop", "type", cfg.Instrumentation.TraceType) + return NoOpTracer(), nil + } +} + +func NoOpTracer() Tracer { + return &noOpTracer{} +} + +type noOpTracer struct{} + +func (n *noOpTracer) Write(_ Entry) {} +func (n *noOpTracer) ReadTable(_ string) (*os.File, error) { + return nil, errors.New("no-op tracer does not support reading") +} +func (n *noOpTracer) IsCollecting(_ string) bool { return false } +func (n *noOpTracer) Stop() {} diff --git a/test/e2e/node/main.go b/test/e2e/node/main.go index 1105cb7955..8a02ed7338 100644 --- a/test/e2e/node/main.go +++ b/test/e2e/node/main.go @@ -130,6 +130,8 @@ func startNode(cfg *Config) error { return fmt.Errorf("failed to setup config: %w", err) } + cmtcfg.Instrumentation.TraceType = "local" + n, err := node.NewNode(cmtcfg, privval.LoadOrGenFilePV(cmtcfg.PrivValidatorKeyFile(), cmtcfg.PrivValidatorStateFile()), nodeKey, diff --git a/test/e2e/pkg/infrastructure.go b/test/e2e/pkg/infrastructure.go index a1bec6fbf2..d829c2d96b 100644 --- a/test/e2e/pkg/infrastructure.go +++ b/test/e2e/pkg/infrastructure.go @@ -33,13 +33,11 @@ type InfrastructureData struct { // IP addresses are expected to be within. Network string `json:"network"` - // InfluxDBURL is the URL of the InfluxDB instance to use for arbitrary data - // collection. If not specified, data will not be collected. - InfluxDBURL string `json:"influxdb_url,omitempty"` + // TracePushConfig is the URL of the server to push trace data to. + TracePushConfig string `json:"trace_push_config,omitempty"` - // InfluxDBToken is the token to use when writing to the InfluxDB instance. - // Must be specified if 'influxdb-url' is specified. - InfluxDBToken string `json:"influxdb_token,omitempty"` + // TracePullAddress is the address to listen on for pulling trace data. + TracePullAddress string `json:"trace_pull_address,omitempty"` // PyroscopeURL is the URL of the pyroscope instance to use for continuous // profiling. If not specified, data will not be collected. diff --git a/test/e2e/pkg/testnet.go b/test/e2e/pkg/testnet.go index 2cb9a58f4e..6819f88c17 100644 --- a/test/e2e/pkg/testnet.go +++ b/test/e2e/pkg/testnet.go @@ -106,8 +106,8 @@ type Node struct { SendNoLoad bool Prometheus bool PrometheusProxyPort uint32 - InfluxDBURL string - InfluxDBToken string + TracePushConfig string + TracePullAddress string PyroscopeURL string PyroscopeTrace bool PyroscopeProfileTypes []string @@ -209,8 +209,8 @@ func LoadTestnet(manifest Manifest, fname string, ifd InfrastructureData) (*Test Perturbations: []Perturbation{}, Misbehaviors: make(map[int64]string), SendNoLoad: nodeManifest.SendNoLoad, - InfluxDBURL: ifd.InfluxDBURL, - InfluxDBToken: ifd.InfluxDBToken, + TracePushConfig: ifd.TracePushConfig, + TracePullAddress: ifd.TracePullAddress, PyroscopeURL: ifd.PyroscopeURL, PyroscopeTrace: ifd.PyroscopeTrace, PyroscopeProfileTypes: ifd.PyroscopeProfileTypes, diff --git a/test/e2e/runner/main.go b/test/e2e/runner/main.go index 425c2fa4a0..30d0d3232f 100644 --- a/test/e2e/runner/main.go +++ b/test/e2e/runner/main.go @@ -78,17 +78,17 @@ func NewCLI() *CLI { return fmt.Errorf("unknown infrastructure type '%s'", inft) } - iurl, err := cmd.Flags().GetString(trace.FlagInfluxDBURL) + iurl, err := cmd.Flags().GetString(trace.FlagTracePushConfig) if err != nil { return err } - itoken, err := cmd.Flags().GetString(trace.FlagInfluxDBToken) + itoken, err := cmd.Flags().GetString(trace.FlagTracePullAddress) if err != nil { return err } - if ifd.InfluxDBURL == "" { - ifd.InfluxDBURL = iurl - ifd.InfluxDBToken = itoken + if ifd.TracePushConfig == "" { + ifd.TracePushConfig = iurl + ifd.TracePullAddress = itoken } purl, err := cmd.Flags().GetString(trace.FlagPyroscopeURL) @@ -186,9 +186,9 @@ func NewCLI() *CLI { cli.root.PersistentFlags().StringP("infrastructure-data", "", "", "path to the json file containing the infrastructure data. Only used if the 'infrastructure-type' is set to a value other than 'docker'") - cli.root.PersistentFlags().String(trace.FlagInfluxDBURL, "", trace.FlagInfluxDBURLDescription) + cli.root.PersistentFlags().String(trace.FlagTracePushConfig, "", trace.FlagTracePushConfigDescription) - cli.root.PersistentFlags().String(trace.FlagInfluxDBToken, "", trace.FlagInfluxDBTokenDescription) + cli.root.PersistentFlags().String(trace.FlagTracePullAddress, "", trace.FlagTracePullAddressDescription) cli.root.PersistentFlags().String(trace.FlagPyroscopeURL, "", trace.FlagPyroscopeURLDescription) diff --git a/test/e2e/runner/setup.go b/test/e2e/runner/setup.go index 8fdecf6a77..f2cec6b227 100644 --- a/test/e2e/runner/setup.go +++ b/test/e2e/runner/setup.go @@ -166,10 +166,9 @@ func MakeConfig(node *e2e.Node) (*config.Config, error) { cfg.DBBackend = node.Database cfg.StateSync.DiscoveryTime = 5 * time.Second - cfg.Instrumentation.InfluxOrg = "celestia" - cfg.Instrumentation.InfluxBucket = "e2e" - cfg.Instrumentation.InfluxURL = node.InfluxDBURL - cfg.Instrumentation.InfluxToken = node.InfluxDBToken + cfg.Instrumentation.TraceType = "celestia" + cfg.Instrumentation.TracePushConfig = node.TracePushConfig + cfg.Instrumentation.TracePullAddress = node.TracePullAddress cfg.Instrumentation.PyroscopeTrace = node.PyroscopeTrace cfg.Instrumentation.PyroscopeURL = node.PyroscopeURL cfg.Instrumentation.PyroscopeProfileTypes = node.PyroscopeProfileTypes diff --git a/test/maverick/node/node.go b/test/maverick/node/node.go index 27aa71b3b2..ea48ba9496 100644 --- a/test/maverick/node/node.go +++ b/test/maverick/node/node.go @@ -427,7 +427,7 @@ func createMempoolAndMempoolReactor(config *cfg.Config, proxyApp proxy.AppConns, reactor := mempoolv1.NewReactor( config.Mempool, mp, - &trace.Client{}, + trace.NoOpTracer(), ) if config.Consensus.WaitForTxs() { mp.EnableTxsAvailable() From ca8bd5370d8a36e8f89b9f5eacd74fc644309046 Mon Sep 17 00:00:00 2001 From: Evan Forbes <42654277+evan-forbes@users.noreply.github.com> Date: Thu, 18 Apr 2024 07:59:13 -0500 Subject: [PATCH 08/24] fix: downgrade viper (#1312) ## Description I think the aws dep bumped viper in the last tracing PR, and 1.18 has this issue https://github.com/spf13/viper/issues/1706. we can do this or https://github.com/celestiaorg/cosmos-sdk/pull/389 main uses v1.13 of viper, but 1.15 is the lowest we can use without a replace statement on this branch --- go.mod | 6 ++---- go.sum | 12 ++++-------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 4b23df6d8a..9d70820247 100644 --- a/go.mod +++ b/go.mod @@ -42,7 +42,7 @@ require ( github.com/sasha-s/go-deadlock v0.3.1 github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa github.com/spf13/cobra v1.8.0 - github.com/spf13/viper v1.18.1 + github.com/spf13/viper v1.15.0 github.com/stretchr/testify v1.8.4 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 github.com/vektra/mockery/v2 v2.23.1 @@ -236,8 +236,6 @@ require ( github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/ryancurrah/gomodguard v1.3.0 // indirect github.com/ryanrolds/sqlclosecheck v0.4.0 // indirect - github.com/sagikazarmark/locafero v0.4.0 // indirect - github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect github.com/sashamelentyev/interfacebloat v1.1.0 // indirect github.com/sashamelentyev/usestdlibvars v1.23.0 // indirect @@ -251,10 +249,10 @@ require ( github.com/sivchari/tenv v1.7.1 // indirect github.com/skeema/knownhosts v1.2.1 // indirect github.com/sonatard/noctx v0.0.2 // indirect - github.com/sourcegraph/conc v0.3.0 // indirect github.com/sourcegraph/go-diff v0.7.0 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect 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 diff --git a/go.sum b/go.sum index 669f126b60..4c48dcef80 100644 --- a/go.sum +++ b/go.sum @@ -766,10 +766,6 @@ github.com/ryancurrah/gomodguard v1.3.0 h1:q15RT/pd6UggBXVBuLps8BXRvl5GPBcwVA7BJ github.com/ryancurrah/gomodguard v1.3.0/go.mod h1:ggBxb3luypPEzqVtq33ee7YSN35V28XeGnid8dnni50= github.com/ryanrolds/sqlclosecheck v0.4.0 h1:i8SX60Rppc1wRuyQjMciLqIzV3xnoHB7/tXbr6RGYNI= github.com/ryanrolds/sqlclosecheck v0.4.0/go.mod h1:TBRRjzL31JONc9i4XMinicuo+s+E8yKZ5FN8X3G6CKQ= -github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= -github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= -github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= -github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= @@ -809,8 +805,6 @@ github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa h1:YJfZp12Z3AFhSBeX github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo= -github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= -github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -827,12 +821,14 @@ github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tL github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.18.1 h1:rmuU42rScKWlhhJDyXZRKJQHXFX02chSVW1IvkPGiVM= -github.com/spf13/viper v1.18.1/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= +github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= +github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= From a877076c5e761631d44f38738bf77fe880fc50c8 Mon Sep 17 00:00:00 2001 From: Sanaz Taheri <35961250+staheri14@users.noreply.github.com> Date: Tue, 23 Apr 2024 17:12:51 -0400 Subject: [PATCH 09/24] feat: adds the feature to read push config from env vars (backport #1318) (#1319) Manual backport of https://github.com/celestiaorg/celestia-core/pull/1318 --- pkg/trace/README.md | 22 +++++++++++++++++++--- pkg/trace/local_tracer.go | 28 ++++++++++++++++++++++++++++ pkg/trace/local_tracer_test.go | 15 +++++++++++++++ 3 files changed, 62 insertions(+), 3 deletions(-) diff --git a/pkg/trace/README.md b/pkg/trace/README.md index 9a421e5bdc..dfccaa0544 100644 --- a/pkg/trace/README.md +++ b/pkg/trace/README.md @@ -62,8 +62,10 @@ This stores the data locally in the specified directory. ### Push Based Event Collection Push based event collection is where the consensus node pushes trace data to an -external server. At the moment, this is just an S3 bucket. To use this, add the -following to the config.toml file: +external server. At the moment, this is just an S3 bucket. To use this, two options are available: +#### Using push config file + +Add the following to the config.toml file: ```toml # TracePushConfig is the relative path of the push config. @@ -73,7 +75,7 @@ following to the config.toml file: trace_push_config = "{{ .Instrumentation.TracePushConfig }}" ``` -The push config file should look like this: +The push config file is a JSON file that should look like this: ```json { @@ -84,3 +86,17 @@ The push config file should look like this: "push_delay": 60 // number of seconds to wait between intervals of pushing all files } ``` + +#### Using environment variables for s3 bucket + +Alternatively, you can set the following environment variables: + +```bash +export TRACE_PUSH_BUCKET_NAME=bucket-name +export TRACE_PUSH_REGION=region +export TRACE_PUSH_ACCESS_KEY=access-key +export TRACE_PUSH_SECRET_KEY=secret-key +export TRACE_PUSH_DELAY=push-delay +``` + +`bucket_name` , `region`, `access_key`, `secret_key` and `push_delay` are the s3 bucket name, region, access key, secret key and the delay between pushes respectively. diff --git a/pkg/trace/local_tracer.go b/pkg/trace/local_tracer.go index 7a70baa440..49ba23e8d0 100644 --- a/pkg/trace/local_tracer.go +++ b/pkg/trace/local_tracer.go @@ -5,6 +5,7 @@ import ( "fmt" "os" "path" + "strconv" "strings" "time" @@ -90,6 +91,7 @@ func NewLocalTracer(cfg *config.Config, logger log.Logger, chainID, nodeID strin if cfg.Instrumentation.TracePullAddress != "" { go lt.servePullData() } + if cfg.Instrumentation.TracePushConfig != "" { s3Config, err := readS3Config(path.Join(cfg.RootDir, "config", cfg.Instrumentation.TracePushConfig)) if err != nil { @@ -97,11 +99,37 @@ func NewLocalTracer(cfg *config.Config, logger log.Logger, chainID, nodeID strin } lt.s3Config = s3Config go lt.pushLoop() + } else if s3Config, err := GetPushConfigFromEnv(); err == nil { + lt.s3Config = s3Config + go lt.pushLoop() } return lt, nil } +// GetPushConfigFromEnv reads the required environment variables to push trace +func GetPushConfigFromEnv() (S3Config, error) { + bucketName := os.Getenv("TRACE_PUSH_BUCKET_NAME") + region := os.Getenv("TRACE_PUSH_REGION") + accessKey := os.Getenv("TRACE_PUSH_ACCESS_KEY") + secretKey := os.Getenv("TRACE_PUSH_SECRET_KEY") + pushDelay, err := strconv.ParseInt(os.Getenv("TRACE_PUSH_DELAY"), 10, 64) + if err != nil { + return S3Config{}, err + } + if bucketName == "" || region == "" || accessKey == "" || secretKey == "" { + return S3Config{}, fmt.Errorf("missing required environment variables") + } + var s3Config = S3Config{ + BucketName: bucketName, + Region: region, + AccessKey: accessKey, + SecretKey: secretKey, + PushDelay: pushDelay, + } + return s3Config, nil +} + func (lt *LocalTracer) Write(e Entry) { if !lt.IsCollecting(e.Table()) { return diff --git a/pkg/trace/local_tracer_test.go b/pkg/trace/local_tracer_test.go index 220c37ddc6..64e801a069 100644 --- a/pkg/trace/local_tracer_test.go +++ b/pkg/trace/local_tracer_test.go @@ -121,6 +121,21 @@ func TestLocalTracerServerPull(t *testing.T) { } } +// TestReadPushConfigFromConfigFile tests reading the push config from the environment variables. +func TestReadPushConfigFromEnvVars(t *testing.T) { + os.Setenv("TRACE_PUSH_BUCKET_NAME", "bucket") + os.Setenv("TRACE_PUSH_REGION", "region") + os.Setenv("TRACE_PUSH_ACCESS_KEY", "access") + os.Setenv("TRACE_PUSH_SECRET_KEY", "secret") + os.Setenv("TRACE_PUSH_DELAY", "10") + + lt := setupLocalTracer(t, 0) + require.Equal(t, "bucket", lt.s3Config.BucketName) + require.Equal(t, "region", lt.s3Config.Region) + require.Equal(t, "access", lt.s3Config.AccessKey) + require.Equal(t, "secret", lt.s3Config.SecretKey) + require.Equal(t, int64(10), lt.s3Config.PushDelay) +} func setupLocalTracer(t *testing.T, port int) *LocalTracer { logger := log.NewNopLogger() cfg := config.DefaultConfig() From a1bcb0d0bd795d46891b2352d7721de8a9a7323e Mon Sep 17 00:00:00 2001 From: Sanaz Taheri <35961250+staheri14@users.noreply.github.com> Date: Wed, 24 Apr 2024 13:36:43 -0400 Subject: [PATCH 10/24] chore: introduces constants for tracer push configs environment variable names (manual backport #1324) (#1323) Introduced constants for the tracer push configuration environment variables to reduce errors when setting and reading these variables in the code, particularly in downstream repositories. Manual backport of https://github.com/celestiaorg/celestia-core/pull/1324 --- pkg/trace/local_tracer.go | 18 +++++++++++++----- pkg/trace/local_tracer_test.go | 10 +++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/pkg/trace/local_tracer.go b/pkg/trace/local_tracer.go index 49ba23e8d0..8d4ecfb628 100644 --- a/pkg/trace/local_tracer.go +++ b/pkg/trace/local_tracer.go @@ -13,6 +13,14 @@ import ( "github.com/tendermint/tendermint/libs/log" ) +const ( + PushBucketName = "TRACE_PUSH_BUCKET_NAME" + PushRegion = "TRACE_PUSH_REGION" + PushAccessKey = "TRACE_PUSH_ACCESS_KEY" + PushKey = "TRACE_PUSH_SECRET_KEY" + PushDelay = "TRACE_PUSH_DELAY" +) + // Event wraps some trace data with metadata that dictates the table and things // like the chainID and nodeID. type Event[T any] struct { @@ -109,11 +117,11 @@ func NewLocalTracer(cfg *config.Config, logger log.Logger, chainID, nodeID strin // GetPushConfigFromEnv reads the required environment variables to push trace func GetPushConfigFromEnv() (S3Config, error) { - bucketName := os.Getenv("TRACE_PUSH_BUCKET_NAME") - region := os.Getenv("TRACE_PUSH_REGION") - accessKey := os.Getenv("TRACE_PUSH_ACCESS_KEY") - secretKey := os.Getenv("TRACE_PUSH_SECRET_KEY") - pushDelay, err := strconv.ParseInt(os.Getenv("TRACE_PUSH_DELAY"), 10, 64) + bucketName := os.Getenv(PushBucketName) + region := os.Getenv(PushRegion) + accessKey := os.Getenv(PushAccessKey) + secretKey := os.Getenv(PushKey) + pushDelay, err := strconv.ParseInt(os.Getenv(PushDelay), 10, 64) if err != nil { return S3Config{}, err } diff --git a/pkg/trace/local_tracer_test.go b/pkg/trace/local_tracer_test.go index 64e801a069..21f128a433 100644 --- a/pkg/trace/local_tracer_test.go +++ b/pkg/trace/local_tracer_test.go @@ -123,11 +123,11 @@ func TestLocalTracerServerPull(t *testing.T) { // TestReadPushConfigFromConfigFile tests reading the push config from the environment variables. func TestReadPushConfigFromEnvVars(t *testing.T) { - os.Setenv("TRACE_PUSH_BUCKET_NAME", "bucket") - os.Setenv("TRACE_PUSH_REGION", "region") - os.Setenv("TRACE_PUSH_ACCESS_KEY", "access") - os.Setenv("TRACE_PUSH_SECRET_KEY", "secret") - os.Setenv("TRACE_PUSH_DELAY", "10") + os.Setenv(PushBucketName, "bucket") + os.Setenv(PushRegion, "region") + os.Setenv(PushAccessKey, "access") + os.Setenv(PushKey, "secret") + os.Setenv(PushDelay, "10") lt := setupLocalTracer(t, 0) require.Equal(t, "bucket", lt.s3Config.BucketName) From 83716a6a875b2f3aed63204e573ba1544117877e Mon Sep 17 00:00:00 2001 From: CHAMI Rachid Date: Tue, 7 May 2024 17:31:02 +0200 Subject: [PATCH 11/24] feat: support writing only internal messages to WAL (#1326) ## Description Closes https://github.com/celestiaorg/celestia-core/issues/1247 This PR adds a configuration flag to limit the WAL to only contain internal messages. This is useful because, as perceived in experiments, external_messages_WAL_writes ~= number_of_validators * internal_messages_WAL_writes, it reduces significantly the number of writes on the WAL. This makes sense because, by default, the WAL contains: votes, block parts, proposals, etc, from all the peers. In the meantime what we really need is the validator's own messages, and especially signature, not to double sign (To be confirmed because I guess, unless there is some bug in the signing process or some weird uncommon issue, the signature should be the same for each round). ~The configuration is added as experimental and is turned off by default.~ The configuration is enabled by default. #### PR checklist - [ ] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments --- config/config.go | 10 ++++++++-- config/toml.go | 5 +++++ consensus/state.go | 6 ++++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/config/config.go b/config/config.go index 0806426184..d5e0312551 100644 --- a/config/config.go +++ b/config/config.go @@ -941,8 +941,13 @@ func (cfg *FastSyncConfig) ValidateBasic() error { // including timeouts and details about the WAL and the block structure. type ConsensusConfig struct { RootDir string `mapstructure:"home"` - WalPath string `mapstructure:"wal_file"` - walFile string // overrides WalPath if set + // If set to true, only internal messages will be written + // to the WAL. External messages like votes, proposals + // block parts, will not be written + // Default: true + OnlyInternalWal bool `mapstructure:"only_internal_wal"` + WalPath string `mapstructure:"wal_file"` + walFile string // overrides WalPath if set // How long we wait for a proposal block before prevoting nil TimeoutPropose time.Duration `mapstructure:"timeout_propose"` @@ -979,6 +984,7 @@ type ConsensusConfig struct { // DefaultConsensusConfig returns a default configuration for the consensus service func DefaultConsensusConfig() *ConsensusConfig { return &ConsensusConfig{ + OnlyInternalWal: true, WalPath: filepath.Join(defaultDataDir, "cs.wal", "wal"), TimeoutPropose: 3000 * time.Millisecond, TimeoutProposeDelta: 500 * time.Millisecond, diff --git a/config/toml.go b/config/toml.go index 3d774515b2..11d69130d1 100644 --- a/config/toml.go +++ b/config/toml.go @@ -456,6 +456,11 @@ version = "{{ .FastSync.Version }}" ####################################################### [consensus] +# If set to "true", only internal messages will be +# written to the WAL. External messages like votes, proposal, +# block parts, will not be written. +only_internal_wal = "{{ .Consensus.OnlyInternalWal }}" + wal_file = "{{ js .Consensus.WalPath }}" # How long we wait for a proposal block before prevoting nil diff --git a/consensus/state.go b/consensus/state.go index 07fdc587de..d40d73bac0 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -773,8 +773,10 @@ func (cs *State) receiveRoutine(maxSteps int) { cs.handleTxsAvailable() case mi = <-cs.peerMsgQueue: - if err := cs.wal.Write(mi); err != nil { - cs.Logger.Error("failed writing to WAL", "err", err) + if !cs.config.OnlyInternalWal { + if err := cs.wal.Write(mi); err != nil { + cs.Logger.Error("failed writing to WAL", "err", err) + } } // handles proposals, block parts, votes From 945d4c8cd0182753b9cb3354373d134e3ac41676 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 21:11:54 +0400 Subject: [PATCH 12/24] test(mempool/cat): fix flaky TestTxPool_BroadcastQueue (backport #1321) (#1345) ## Description Closes #1261
This is an automatic backport of pull request #1321 done by [Mergify](https://mergify.com). Co-authored-by: Tuan Tran --- mempool/cat/pool_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mempool/cat/pool_test.go b/mempool/cat/pool_test.go index ec954ae9c5..c32887e877 100644 --- a/mempool/cat/pool_test.go +++ b/mempool/cat/pool_test.go @@ -745,6 +745,12 @@ func TestTxPool_BroadcastQueue(t *testing.T) { wg := sync.WaitGroup{} wg.Add(1) + + for i := 0; i < txs; i++ { + tx := newDefaultTx(fmt.Sprintf("%d", i)) + require.NoError(t, txmp.CheckTx(tx, nil, mempool.TxInfo{SenderID: 0})) + } + go func() { defer wg.Done() for i := 0; i < txs; i++ { @@ -754,14 +760,8 @@ func TestTxPool_BroadcastQueue(t *testing.T) { case wtx := <-txmp.next(): require.Equal(t, wtx.tx, newDefaultTx(fmt.Sprintf("%d", i))) } - time.Sleep(10 * time.Millisecond) } }() - for i := 0; i < txs; i++ { - tx := newDefaultTx(fmt.Sprintf("%d", i)) - require.NoError(t, txmp.CheckTx(tx, nil, mempool.TxInfo{SenderID: 0})) - } - wg.Wait() } From 873ee774a23698297cdf9d87ce27750f6239b8e2 Mon Sep 17 00:00:00 2001 From: CHAMI Rachid Date: Thu, 9 May 2024 10:13:13 +0200 Subject: [PATCH 13/24] chore(deps): bump go to v1.22.3 (#1347) ## Description Bumps go to v1.22.3 #### PR checklist - [ ] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments --- DOCKER/Dockerfile | 2 +- README.md | 2 +- go.mod | 2 +- scripts/proto-gen.sh | 2 +- test/docker/Dockerfile | 2 +- test/e2e/docker/Dockerfile | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 17b199886f..dd23a5f6e5 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -1,6 +1,6 @@ # Use a build arg to ensure that both stages use the same, # hopefully current, go version. -ARG GOLANG_BASE_IMAGE=golang:1.22.2-alpine +ARG GOLANG_BASE_IMAGE=golang:1.22.3-alpine # stage 1 Generate CometBFT Binary FROM --platform=$BUILDPLATFORM $GOLANG_BASE_IMAGE as builder diff --git a/README.md b/README.md index 695fb8d6c9..26c9f89a44 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ This repo intends on preserving the minimal possible diff with [cometbft/cometbf - **specific to Celestia**: consider if [celestia-app](https://github.com/celestiaorg/celestia-app) is a better target - **not specific to Celestia**: consider making the contribution upstream in CometBFT -1. [Install Go](https://go.dev/doc/install) 1.22.2+ +1. [Install Go](https://go.dev/doc/install) 1.22.3+ 2. Fork this repo 3. Clone your fork 4. Find an issue to work on (see [good first issues](https://github.com/celestiaorg/celestia-core/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)) diff --git a/go.mod b/go.mod index 9d70820247..4e61a59bf9 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/tendermint/tendermint -go 1.22.2 +go 1.22.3 require ( github.com/BurntSushi/toml v1.2.1 diff --git a/scripts/proto-gen.sh b/scripts/proto-gen.sh index 7369ac9474..2faada1b19 100755 --- a/scripts/proto-gen.sh +++ b/scripts/proto-gen.sh @@ -10,7 +10,7 @@ cd "$(git rev-parse --show-toplevel)" # Run inside Docker to install the correct versions of the required tools # without polluting the local system. -docker run --rm -i -v "$PWD":/w --workdir=/w golang:1.22.2-alpine sh <<"EOF" +docker run --rm -i -v "$PWD":/w --workdir=/w golang:1.22.3-alpine sh <<"EOF" apk add git make go install github.com/bufbuild/buf/cmd/buf diff --git a/test/docker/Dockerfile b/test/docker/Dockerfile index c9eca7a7d1..7345f28bcd 100644 --- a/test/docker/Dockerfile +++ b/test/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22.2 +FROM golang:1.22.3 # Grab deps (jq, hexdump, xxd, killall) RUN apt-get update && \ diff --git a/test/e2e/docker/Dockerfile b/test/e2e/docker/Dockerfile index bc7d26dd00..091b704f9c 100644 --- a/test/e2e/docker/Dockerfile +++ b/test/e2e/docker/Dockerfile @@ -1,7 +1,7 @@ # We need to build in a Linux environment to support C libraries, e.g. RocksDB. # We use Debian instead of Alpine, so that we can use binary database packages # instead of spending time compiling them. -FROM golang:1.22.2-bullseye +FROM golang:1.22.3-bullseye 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 52f84efb2d9409b61d0bc84204f12407d2bed489 Mon Sep 17 00:00:00 2001 From: CHAMI Rachid Date: Thu, 9 May 2024 20:09:52 +0200 Subject: [PATCH 14/24] feat: wrap ShareProof in a ResultShareProof (#1351) ## Description Contributes to https://github.com/celestiaorg/celestia-core/issues/1306 --------- Co-authored-by: Rootul P --- light/rpc/client.go | 13 +++ rpc/client/http/http.go | 21 +++++ rpc/client/interface.go | 3 + rpc/client/local/local.go | 11 +++ rpc/core/routes.go | 1 + rpc/core/tx.go | 16 ++++ rpc/core/types/responses.go | 5 + rpc/openapi/openapi.yaml | 176 ++++++++++++++++++++++++++++++++++++ 8 files changed, 246 insertions(+) diff --git a/light/rpc/client.go b/light/rpc/client.go index ce3d98afb8..a9ac983b96 100644 --- a/light/rpc/client.go +++ b/light/rpc/client.go @@ -581,6 +581,7 @@ func (c *Client) Tx(ctx context.Context, hash []byte, prove bool) (*ctypes.Resul // ProveShares calls rpcclient#ProveShares method and returns an NMT proof for a set // of shares, defined by `startShare` and `endShare`, to the corresponding rows. // Then, a binary merkle inclusion proof from the latter rows to the data root. +// Deprecated: Use ProveSharesV2 instead. func (c *Client) ProveShares( ctx context.Context, height uint64, @@ -591,6 +592,18 @@ func (c *Client) ProveShares( return res, err } +// ProveSharesV2 returns a proof of inclusion for a share range to the data root. +// Note: this proof is composed of multiple proofs. +func (c *Client) ProveSharesV2( + ctx context.Context, + height uint64, + startShare uint64, + endShare uint64, +) (*ctypes.ResultShareProof, error) { + res, err := c.next.ProveSharesV2(ctx, height, startShare, endShare) + return res, err +} + func (c *Client) TxSearch( ctx context.Context, query string, diff --git a/rpc/client/http/http.go b/rpc/client/http/http.go index df2b8980e1..3c3f161478 100644 --- a/rpc/client/http/http.go +++ b/rpc/client/http/http.go @@ -550,6 +550,8 @@ func (c *baseRPCClient) Tx(ctx context.Context, hash []byte, prove bool) (*ctype return result, nil } +// ProveShares +// Deprecated: Use ProveSharesV2 instead. func (c *baseRPCClient) ProveShares( ctx context.Context, height uint64, @@ -569,6 +571,25 @@ func (c *baseRPCClient) ProveShares( return *result, nil } +func (c *baseRPCClient) ProveSharesV2( + ctx context.Context, + height uint64, + startShare uint64, + endShare uint64, +) (*ctypes.ResultShareProof, error) { + result := new(ctypes.ResultShareProof) + params := map[string]interface{}{ + "height": height, + "startShare": startShare, + "endShare": endShare, + } + _, err := c.caller.Call(ctx, "prove_shares_v2", params, result) + if err != nil { + return nil, err + } + return result, nil +} + func (c *baseRPCClient) TxSearch( ctx context.Context, query string, diff --git a/rpc/client/interface.go b/rpc/client/interface.go index a6f5be23db..49c3bac826 100644 --- a/rpc/client/interface.go +++ b/rpc/client/interface.go @@ -83,7 +83,10 @@ type SignClient interface { Validators(ctx context.Context, height *int64, page, perPage *int) (*ctypes.ResultValidators, error) Tx(ctx context.Context, hash []byte, prove bool) (*ctypes.ResultTx, error) + // ProveShares + // Deprecated: Use ProveSharesV2 instead. ProveShares(_ context.Context, height uint64, startShare uint64, endShare uint64) (types.ShareProof, error) + ProveSharesV2(_ context.Context, height uint64, startShare uint64, endShare uint64) (*ctypes.ResultShareProof, error) // TxSearch defines a method to search for a paginated set of transactions by // DeliverTx event search criteria. diff --git a/rpc/client/local/local.go b/rpc/client/local/local.go index 30c578c0fd..3c480a4e7b 100644 --- a/rpc/client/local/local.go +++ b/rpc/client/local/local.go @@ -210,6 +210,8 @@ func (c *Local) Tx(ctx context.Context, hash []byte, prove bool) (*ctypes.Result return core.Tx(c.ctx, hash, prove) } +// ProveShares +// Deprecated: Use ProveSharesV2 instead. func (c *Local) ProveShares( ctx context.Context, height uint64, @@ -219,6 +221,15 @@ func (c *Local) ProveShares( return core.ProveShares(c.ctx, int64(height), startShare, endShare) } +func (c *Local) ProveSharesV2( + ctx context.Context, + height uint64, + startShare uint64, + endShare uint64, +) (*ctypes.ResultShareProof, error) { + return core.ProveSharesV2(c.ctx, int64(height), startShare, endShare) +} + func (c *Local) TxSearch( _ context.Context, query string, diff --git a/rpc/core/routes.go b/rpc/core/routes.go index b28188a432..d83113805f 100644 --- a/rpc/core/routes.go +++ b/rpc/core/routes.go @@ -31,6 +31,7 @@ var Routes = map[string]*rpc.RPCFunc{ "check_tx": rpc.NewRPCFunc(CheckTx, "tx"), "tx": rpc.NewRPCFunc(Tx, "hash,prove", rpc.Cacheable()), "prove_shares": rpc.NewRPCFunc(ProveShares, "height,startShare,endShare"), + "prove_shares_v2": rpc.NewRPCFunc(ProveSharesV2, "height,startShare,endShare"), "data_root_inclusion_proof": rpc.NewRPCFunc(DataRootInclusionProof, "height,start,end"), "tx_search": rpc.NewRPCFunc(TxSearchMatchEvents, "query,prove,page,per_page,order_by,match_events"), "block_search": rpc.NewRPCFunc(BlockSearchMatchEvents, "query,page,per_page,order_by,match_events"), diff --git a/rpc/core/tx.go b/rpc/core/tx.go index 76e7ec292e..51f0d8f98c 100644 --- a/rpc/core/tx.go +++ b/rpc/core/tx.go @@ -174,6 +174,7 @@ func proveTx(height int64, index uint32) (types.ShareProof, error) { // ProveShares creates an NMT proof for a set of shares to a set of rows. It is // end exclusive. +// Deprecated: Use ProveSharesV2 instead. func ProveShares( _ *rpctypes.Context, height int64, @@ -212,6 +213,21 @@ func ProveShares( return shareProof, nil } +// ProveSharesV2 creates a proof for a set of shares to the data root. +// The range is end exclusive. +func ProveSharesV2( + ctx *rpctypes.Context, + height int64, + startShare uint64, + endShare uint64, +) (*ctypes.ResultShareProof, error) { + shareProof, err := ProveShares(ctx, height, startShare, endShare) + if err != nil { + return nil, err + } + return &ctypes.ResultShareProof{ShareProof: shareProof}, nil +} + func loadRawBlock(bs state.BlockStore, height int64) ([]byte, error) { var blockMeta = bs.LoadBlockMeta(height) if blockMeta == nil { diff --git a/rpc/core/types/responses.go b/rpc/core/types/responses.go index 04dc85cc8b..6506171d9e 100644 --- a/rpc/core/types/responses.go +++ b/rpc/core/types/responses.go @@ -272,3 +272,8 @@ type ResultEvent struct { Data types.TMEventData `json:"data"` Events map[string][]string `json:"events"` } + +// ResultShareProof is an API response that contains a ShareProof. +type ResultShareProof struct { + ShareProof types.ShareProof `json:"share_proof"` +} diff --git a/rpc/openapi/openapi.yaml b/rpc/openapi/openapi.yaml index fc493e4d91..7e80472601 100644 --- a/rpc/openapi/openapi.yaml +++ b/rpc/openapi/openapi.yaml @@ -1002,6 +1002,92 @@ paths: application/json: schema: $ref: "#/components/schemas/ErrorResponse" + /prove_shares: + get: + summary: Prove shares for a given share range. + description: | + Generates a proof of inclusion for a range of shares to the data root. + Note: shares are referenced by their range: startShare to endShare. + The share range is end exclusive. + Deprecated: Use '/prove_shares_v2' instead. + operationId: prove_shares + tags: + - Info + parameters: + - in: query + name: height + description: The block height + schema: + type: integer + default: 1 + example: 1 + - in: query + name: startShare + description: The starting share index + schema: + type: integer + default: 0 + example: 0 + - in: query + name: endShare + description: The end exclusive ending share index + schema: + type: integer + default: 1 + example: 1 + responses: + '200': + description: Successfully retrieved the share proof + content: + application/json: + schema: + $ref: '#/components/schemas/ShareProof' + '500': + description: Internal server error + + /prove_shares_v2: + get: + summary: Prove shares for a given share range. + description: | + Generates a proof of inclusion for a range of shares to the data root. + Note: shares are referenced by their range: startShare to endShare. + The share range is end exclusive. + Replaces '/prove_shares' + operationId: prove_shares_v2 + tags: + - Info + parameters: + - in: query + name: height + description: The block height + schema: + type: integer + default: 1 + example: 1 + - in: query + name: startShare + description: The starting share index + schema: + type: integer + default: 0 + example: 0 + - in: query + name: endShare + description: The end exclusive ending share index + schema: + type: integer + default: 1 + example: 1 + responses: + '200': + description: Successfully retrieved the share proof + content: + application/json: + schema: + $ref: '#/components/schemas/ResultShareProof' + '500': + description: Internal server error + /data_commitment: get: summary: Generates a data commitment for a range of blocks @@ -2581,8 +2667,98 @@ components: tx: type: string example: "5wHwYl3uCkaoo2GaChQmSIu8hxpJxLcCuIi8fiHN4TMwrRIU/Af1cEG7Rcs/6LjTl7YjRSymJfYaFAoFdWF0b20SCzE0OTk5OTk1MDAwEhMKDQoFdWF0b20SBDUwMDAQwJoMGmoKJuta6YchAwswBShaB1wkZBctLIhYqBC3JrAI28XGzxP+rVEticGEEkAc+khTkKL9CDE47aDvjEHvUNt+izJfT4KVF2v2JkC+bmlH9K08q3PqHeMI9Z5up+XMusnTqlP985KF+SI5J3ZOIhhNYWRlIGJ5IENpcmNsZSB3aXRoIGxvdmU=" + proof: + type: object + $ref: '#/components/schemas/ShareProof' + nullable: true + description: Optional proof of the transaction, provided only when requested. type: object + ResultShareProof: + type: object + properties: + share_proof: + $ref: '#/components/schemas/ShareProof' + description: API proof response of a set of shares. + ShareProof: + type: object + properties: + data: + type: array + items: + type: string + format: byte + description: The raw shares that are being proven. + shareProofs: + type: array + items: + $ref: '#/components/schemas/NMTProof' + description: NMT proofs that the shares in Data exist in a set of rows. + namespaceID: + type: string + format: byte + description: The namespace id of the shares being proven. + rowProof: + $ref: '#/components/schemas/RowProof' + namespaceVersion: + type: integer + format: uint32 + description: The version of the namespace used for verification. + NMTProof: + type: object + properties: + start: + type: integer + format: int32 + end: + type: integer + format: int32 + nodes: + type: array + items: + type: string + format: byte + description: Nodes used to verify the proof. + leaf_hash: + type: string + format: byte + description: Leaf hash necessary for proof of absence, if applicable. + RowProof: + type: object + properties: + rowRoots: + type: array + items: + type: string + format: byte + proofs: + type: array + items: + $ref: '#/components/schemas/Proof' + startRow: + type: integer + format: uint32 + endRow: + type: integer + format: uint32 + Proof: + type: object + description: Binary merkle proof + properties: + total: + type: integer + format: int64 + index: + type: integer + format: int64 + leafHash: + type: string + format: byte + aunts: + type: array + items: + type: string + format: byte ABCIInfoResponse: type: object required: From 93826eab0a689356867ff9e81822b4e742b4b2af Mon Sep 17 00:00:00 2001 From: CHAMI Rachid Date: Thu, 9 May 2024 20:34:25 +0200 Subject: [PATCH 15/24] chore: increase the data commitment blocks limit in the API (Backport #1268) (#1353) ## Description This is done to support 33 hours batches of attestations in the API without having to make a breaking change --- pkg/consts/consts.go | 2 ++ rpc/core/blocks.go | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pkg/consts/consts.go b/pkg/consts/consts.go index 7797aa044b..1c309b6fdf 100644 --- a/pkg/consts/consts.go +++ b/pkg/consts/consts.go @@ -41,5 +41,7 @@ var ( NewBaseHashFunc = sha256.New // DataCommitmentBlocksLimit is the limit to the number of blocks we can generate a data commitment for. + // Deprecated: this is no longer used as we're moving towards Blobstream X. However, we're leaving it + // here for backwards compatibility purpose until it's removed in the next breaking release. DataCommitmentBlocksLimit = 1000 ) diff --git a/rpc/core/blocks.go b/rpc/core/blocks.go index 09ebe391c2..059e479e3a 100644 --- a/rpc/core/blocks.go +++ b/rpc/core/blocks.go @@ -11,7 +11,6 @@ import ( "github.com/tendermint/tendermint/libs/bytes" cmtmath "github.com/tendermint/tendermint/libs/math" cmtquery "github.com/tendermint/tendermint/libs/pubsub/query" - "github.com/tendermint/tendermint/pkg/consts" ctypes "github.com/tendermint/tendermint/rpc/core/types" rpctypes "github.com/tendermint/tendermint/rpc/jsonrpc/types" blockidxnull "github.com/tendermint/tendermint/state/indexer/block/null" @@ -333,6 +332,10 @@ func EncodeDataRootTuple(height uint64, dataRoot [32]byte) ([]byte, error) { return append(paddedHeight, dataRoot[:]...), nil } +// dataCommitmentBlocksLimit The maximum number of blocks to be used to create a data commitment. +// It's a local parameter to protect the API from creating unnecessarily large commitments. +const dataCommitmentBlocksLimit = 10_000 // ~33 hours of blocks assuming 12-second blocks. + // validateDataCommitmentRange runs basic checks on the asc sorted list of // heights that will be used subsequently in generating data commitments over // the defined set of heights. @@ -342,8 +345,8 @@ func validateDataCommitmentRange(start uint64, end uint64) error { } env := GetEnvironment() heightsRange := end - start - if heightsRange > uint64(consts.DataCommitmentBlocksLimit) { - return fmt.Errorf("the query exceeds the limit of allowed blocks %d", consts.DataCommitmentBlocksLimit) + if heightsRange > uint64(dataCommitmentBlocksLimit) { + return fmt.Errorf("the query exceeds the limit of allowed blocks %d", dataCommitmentBlocksLimit) } if heightsRange == 0 { return fmt.Errorf("cannot create the data commitments for an empty set of blocks") From 17d41df73326c39835874e36e4848f2295fa1671 Mon Sep 17 00:00:00 2001 From: Rootul P Date: Thu, 9 May 2024 15:24:48 -0400 Subject: [PATCH 16/24] fix(rpc): return app version from state store for status endpoint (#1352) Fixes https://github.com/celestiaorg/celestia-app/issues/3378 ## Testing On a local node that upgraded from v1 -> v2: ``` {"jsonrpc":"2.0","id":-1,"result":{"node_info":{"protocol_version":{"p2p":"8","block":"11","app":"2"} ``` --- rpc/core/status.go | 26 +++++++++++++- rpc/core/status_test.go | 76 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 rpc/core/status_test.go diff --git a/rpc/core/status.go b/rpc/core/status.go index c82dffa6d6..5c9c9e3408 100644 --- a/rpc/core/status.go +++ b/rpc/core/status.go @@ -53,7 +53,7 @@ func Status(ctx *rpctypes.Context) (*ctypes.ResultStatus, error) { } result := &ctypes.ResultStatus{ - NodeInfo: env.P2PTransport.NodeInfo().(p2p.DefaultNodeInfo), + NodeInfo: GetNodeInfo(env, latestHeight), SyncInfo: ctypes.SyncInfo{ LatestBlockHash: latestBlockHash, LatestAppHash: latestAppHash, @@ -85,3 +85,27 @@ func validatorAtHeight(h int64) *types.Validator { _, val := vals.GetByAddress(privValAddress) return val } + +// GetNodeInfo returns the node info with the app version set to the latest app +// version from the state store. +// +// This function is necessary because upstream CometBFT does not support +// upgrading app versions for a running binary. Therefore the +// env.P2PTransport.NodeInfo.ProtocolVersion.App is expected to be set on node +// start-up and never updated. Celestia supports upgrading the app version for a +// running binary so the env.P2PTransport.NodeInfo.ProtocolVersion.App will be +// incorrect if a node upgraded app versions without restarting. This function +// corrects that issue by fetching the latest app version from the state store. +func GetNodeInfo(env *Environment, latestHeight int64) p2p.DefaultNodeInfo { + nodeInfo := env.P2PTransport.NodeInfo().(p2p.DefaultNodeInfo) + + consensusParams, err := env.StateStore.LoadConsensusParams(latestHeight) + if err != nil { + // use the default app version if we can't load the consensus params (i.e. height 0) + return nodeInfo + } + + // override the default app version with the latest app version + nodeInfo.ProtocolVersion.App = consensusParams.Version.AppVersion + return nodeInfo +} diff --git a/rpc/core/status_test.go b/rpc/core/status_test.go new file mode 100644 index 0000000000..2fed1a2d91 --- /dev/null +++ b/rpc/core/status_test.go @@ -0,0 +1,76 @@ +package core_test + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/tendermint/tendermint/rpc/core" + "github.com/tendermint/tendermint/state/mocks" +) + +func TestGetNodeInfo(t *testing.T) { + p2pTransport := mockTransport{} + stateStore := &mocks.Store{} + stateStore.On("LoadConsensusParams", int64(1)).Return(types.ConsensusParams{Version: types.VersionParams{AppVersion: 1}}, nil) + stateStore.On("LoadConsensusParams", int64(2)).Return(types.ConsensusParams{Version: types.VersionParams{AppVersion: 2}}, nil) + + type testCase struct { + name string + env *core.Environment + latestHeight int64 + want uint64 + } + testCases := []testCase{ + { + name: "want 1 when consensus params app version is 1", + env: &core.Environment{P2PTransport: p2pTransport, StateStore: stateStore}, + latestHeight: 1, + want: 1, + }, + { + name: "want 2 if consensus params app version is 2", + env: &core.Environment{P2PTransport: p2pTransport, StateStore: stateStore}, + latestHeight: 2, + want: 2, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + nodeInfo := core.GetNodeInfo(tc.env, tc.latestHeight) + assert.Equal(t, tc.want, nodeInfo.ProtocolVersion.App) + }) + } +} + +// transport is copy + pasted from the core package because it isn't exported. +// https://github.com/celestiaorg/celestia-core/blob/640d115aec834609022c842b2497fc568df53692/rpc/core/env.go#L69-L73 +type transport interface { + Listeners() []string + IsListening() bool + NodeInfo() p2p.NodeInfo +} + +// mockTransport implements the transport interface. +var _ transport = (*mockTransport)(nil) + +type mockTransport struct{} + +func (m mockTransport) Listeners() []string { + return []string{} +} +func (m mockTransport) IsListening() bool { + return false +} + +func (m mockTransport) NodeInfo() p2p.NodeInfo { + return p2p.DefaultNodeInfo{ + ProtocolVersion: p2p.ProtocolVersion{ + P2P: 0, + Block: 0, + App: 0, + }, + } +} From 624c43d4484a785ec855f5fb93ea571c1e728fda Mon Sep 17 00:00:00 2001 From: CHAMI Rachid Date: Thu, 9 May 2024 23:02:00 +0200 Subject: [PATCH 17/24] docs: go doc feedback for PR #1351 (#1354) ## Description Applies feedback for PR #1351 --- light/rpc/client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/light/rpc/client.go b/light/rpc/client.go index a9ac983b96..1459cb39d7 100644 --- a/light/rpc/client.go +++ b/light/rpc/client.go @@ -592,7 +592,9 @@ func (c *Client) ProveShares( return res, err } -// ProveSharesV2 returns a proof of inclusion for a share range to the data root. +// ProveSharesV2 returns a proof of inclusion for a share range to the data root +// of the given height. +// The range is end-exclusive and defined by startShare and endShare. // Note: this proof is composed of multiple proofs. func (c *Client) ProveSharesV2( ctx context.Context, From d27374c7b2da932934a48e9b5716edaece59f70b Mon Sep 17 00:00:00 2001 From: Evan Forbes <42654277+evan-forbes@users.noreply.github.com> Date: Thu, 16 May 2024 11:46:58 -0500 Subject: [PATCH 18/24] feat: add tracing for remaining consensus messages, peer updates, and abci calls (#1295) ## Description backport of #1292 --- consensus/reactor.go | 194 +++++++++++++++++++++++++++++---- consensus/state.go | 14 ++- mempool/cat/reactor.go | 8 +- mempool/v1/reactor.go | 4 +- node/node.go | 9 +- p2p/peer.go | 14 +++ p2p/switch.go | 14 ++- p2p/test_util.go | 3 +- p2p/transport.go | 7 ++ p2p/transport_test.go | 3 +- pkg/trace/buffered_file.go | 75 ++++++++++--- pkg/trace/fileserver.go | 23 +++- pkg/trace/local_tracer.go | 27 ++--- pkg/trace/local_tracer_test.go | 29 +++-- pkg/trace/schema/consensus.go | 103 +++++++++++++++-- pkg/trace/schema/mempool.go | 13 +-- pkg/trace/schema/misc.go | 42 +++++++ pkg/trace/schema/p2p.go | 82 ++++++++++++++ pkg/trace/schema/schema.go | 6 + pkg/trace/tracer.go | 1 - test/maverick/node/node.go | 2 +- 21 files changed, 580 insertions(+), 93 deletions(-) create mode 100644 pkg/trace/schema/misc.go create mode 100644 pkg/trace/schema/p2p.go diff --git a/consensus/reactor.go b/consensus/reactor.go index f792f4cef1..eec5afa8d0 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -272,6 +272,15 @@ func (conR *Reactor) ReceiveEnvelope(e p2p.Envelope) { conR.conS.mtx.Lock() initialHeight := conR.conS.state.InitialHeight conR.conS.mtx.Unlock() + schema.WriteConsensusState( + conR.traceClient, + msg.Height, + msg.Round, + string(e.Src.ID()), + schema.ConsensusNewRoundStep, + schema.Download, + fmt.Sprintf("%d", msg.Step), + ) if err = msg.ValidateHeight(initialHeight); err != nil { conR.Logger.Error("Peer sent us invalid msg", "peer", e.Src, "msg", msg, "err", err) conR.Switch.StopPeerForError(e.Src, err) @@ -279,14 +288,39 @@ func (conR *Reactor) ReceiveEnvelope(e p2p.Envelope) { } ps.ApplyNewRoundStepMessage(msg) case *NewValidBlockMessage: + schema.WriteConsensusState( + conR.traceClient, + msg.Height, + msg.Round, + string(e.Src.ID()), + schema.ConsensusNewValidBlock, + schema.Download, + ) ps.ApplyNewValidBlockMessage(msg) case *HasVoteMessage: ps.ApplyHasVoteMessage(msg) + schema.WriteConsensusState( + conR.traceClient, + msg.Height, + msg.Round, + string(e.Src.ID()), + schema.ConsensusHasVote, + schema.Download, + msg.Type.String(), + ) case *VoteSetMaj23Message: cs := conR.conS cs.mtx.Lock() height, votes := cs.Height, cs.Votes cs.mtx.Unlock() + schema.WriteConsensusState( + conR.traceClient, + msg.Height, + msg.Round, + string(e.Src.ID()), + schema.ConsensusVoteSet23Precommit, + schema.Download, + ) if height != msg.Height { return } @@ -316,10 +350,20 @@ func (conR *Reactor) ReceiveEnvelope(e p2p.Envelope) { if votes := ourVotes.ToProto(); votes != nil { eMsg.Votes = *votes } - p2p.TrySendEnvelopeShim(e.Src, p2p.Envelope{ //nolint: staticcheck + if p2p.TrySendEnvelopeShim(e.Src, p2p.Envelope{ //nolint: staticcheck ChannelID: VoteSetBitsChannel, Message: eMsg, - }, conR.Logger) + }, conR.Logger) { + schema.WriteConsensusState( + conR.traceClient, + msg.Height, + msg.Round, + string(e.Src.ID()), + schema.ConsensusVoteSetBits, + schema.Upload, + msg.Type.String(), + ) + } default: conR.Logger.Error(fmt.Sprintf("Unknown message type %v", reflect.TypeOf(msg))) } @@ -333,12 +377,27 @@ func (conR *Reactor) ReceiveEnvelope(e p2p.Envelope) { case *ProposalMessage: ps.SetHasProposal(msg.Proposal) conR.conS.peerMsgQueue <- msgInfo{msg, e.Src.ID()} + schema.WriteProposal( + conR.traceClient, + msg.Proposal.Height, + msg.Proposal.Round, + string(e.Src.ID()), + schema.Download, + ) case *ProposalPOLMessage: ps.ApplyProposalPOLMessage(msg) + schema.WriteConsensusState( + conR.traceClient, + msg.Height, + msg.ProposalPOLRound, + string(e.Src.ID()), + schema.ConsensusPOL, + schema.Download, + ) case *BlockPartMessage: ps.SetHasProposalBlockPart(msg.Height, msg.Round, int(msg.Part.Index)) conR.Metrics.BlockParts.With("peer_id", string(e.Src.ID())).Add(1) - schema.WriteBlockPart(conR.traceClient, msg.Height, msg.Round, e.Src.ID(), msg.Part.Index, schema.Download) + schema.WriteBlockPart(conR.traceClient, msg.Height, msg.Round, msg.Part.Index, false, string(e.Src.ID()), schema.Download) conR.conS.peerMsgQueue <- msgInfo{msg, e.Src.ID()} default: conR.Logger.Error(fmt.Sprintf("Unknown message type %v", reflect.TypeOf(msg))) @@ -357,7 +416,7 @@ func (conR *Reactor) ReceiveEnvelope(e p2p.Envelope) { cs.Validators.Size(), cs.LastCommit.Size() cs.mtx.RUnlock() - schema.WriteVote(conR.traceClient, height, round, msg.Vote, e.Src.ID(), schema.Download) + schema.WriteVote(conR.traceClient, height, round, msg.Vote, string(e.Src.ID()), schema.Download) ps.EnsureVoteBitArrays(height, valSize) ps.EnsureVoteBitArrays(height-1, lastCommitSize) @@ -477,6 +536,15 @@ func (conR *Reactor) broadcastNewRoundStepMessage(rs *cstypes.RoundState) { ChannelID: StateChannel, Message: nrsMsg, }) + schema.WriteConsensusState( + conR.traceClient, + nrsMsg.Height, + nrsMsg.Round, + schema.Broadcast, + schema.ConsensusNewRoundStep, + schema.Upload, + fmt.Sprintf("%d", nrsMsg.Step), + ) } func (conR *Reactor) broadcastNewValidBlockMessage(rs *cstypes.RoundState) { @@ -492,6 +560,14 @@ func (conR *Reactor) broadcastNewValidBlockMessage(rs *cstypes.RoundState) { ChannelID: StateChannel, Message: csMsg, }) + schema.WriteConsensusState( + conR.traceClient, + rs.Height, + rs.Round, + schema.Broadcast, + schema.ConsensusNewValidBlock, + schema.Upload, + ) } // Broadcasts HasVoteMessage to peers that care. @@ -506,6 +582,15 @@ func (conR *Reactor) broadcastHasVoteMessage(vote *types.Vote) { ChannelID: StateChannel, Message: msg, }) + schema.WriteConsensusState( + conR.traceClient, + vote.Height, + vote.Round, + schema.Broadcast, + schema.ConsensusHasVote, + schema.Upload, + vote.Type.String(), + ) /* // TODO: Make this broadcast more selective. for _, peer := range conR.Switch.Peers().List() { @@ -544,10 +629,20 @@ func makeRoundStepMessage(rs *cstypes.RoundState) (nrsMsg *cmtcons.NewRoundStep) func (conR *Reactor) sendNewRoundStepMessage(peer p2p.Peer) { rs := conR.getRoundState() nrsMsg := makeRoundStepMessage(rs) - p2p.SendEnvelopeShim(peer, p2p.Envelope{ //nolint: staticcheck + if p2p.SendEnvelopeShim(peer, p2p.Envelope{ //nolint: staticcheck ChannelID: StateChannel, Message: nrsMsg, - }, conR.Logger) + }, conR.Logger) { + schema.WriteConsensusState( + conR.traceClient, + nrsMsg.Height, + nrsMsg.Round, + string(peer.ID()), + schema.ConsensusNewRoundStep, + schema.Upload, + fmt.Sprintf("%d", nrsMsg.Step), + ) + } } func (conR *Reactor) updateRoundStateRoutine() { @@ -599,7 +694,7 @@ OUTER_LOOP: Part: *parts, }, }, logger) { - schema.WriteBlockPart(conR.traceClient, rs.Height, rs.Round, peer.ID(), part.Index, schema.Upload) + schema.WriteBlockPart(conR.traceClient, rs.Height, rs.Round, part.Index, false, string(peer.ID()), schema.Upload) ps.SetHasProposalBlockPart(prs.Height, prs.Round, index) } continue OUTER_LOOP @@ -652,6 +747,13 @@ OUTER_LOOP: }, logger) { // NOTE[ZM]: A peer might have received different proposal msg so this Proposal msg will be rejected! ps.SetHasProposal(rs.Proposal) + schema.WriteProposal( + conR.traceClient, + rs.Height, + rs.Round, + string(peer.ID()), + schema.Upload, + ) } } // ProposalPOL: lets peer know which POL votes we have so far. @@ -660,14 +762,23 @@ OUTER_LOOP: // so we definitely have rs.Votes.Prevotes(rs.Proposal.POLRound). if 0 <= rs.Proposal.POLRound { logger.Debug("Sending POL", "height", prs.Height, "round", prs.Round) - p2p.SendEnvelopeShim(peer, p2p.Envelope{ //nolint: staticcheck + if p2p.SendEnvelopeShim(peer, p2p.Envelope{ //nolint: staticcheck ChannelID: DataChannel, Message: &cmtcons.ProposalPOL{ Height: rs.Height, ProposalPolRound: rs.Proposal.POLRound, ProposalPol: *rs.Votes.Prevotes(rs.Proposal.POLRound).BitArray().ToProto(), }, - }, logger) + }, logger) { + schema.WriteConsensusState( + conR.traceClient, + rs.Height, + rs.Round, + string(peer.ID()), + schema.ConsensusPOL, + schema.Upload, + ) + } } continue OUTER_LOOP } @@ -719,6 +830,15 @@ func (conR *Reactor) gossipDataForCatchup(logger log.Logger, rs *cstypes.RoundSt }, }, logger) { ps.SetHasProposalBlockPart(prs.Height, prs.Round, index) + schema.WriteBlockPart( + conR.traceClient, + prs.Height, + prs.Round, + uint32(index), + true, + string(peer.ID()), + schema.Upload, + ) } else { logger.Debug("Sending block part for catchup failed") // sleep to avoid retrying too fast @@ -783,7 +903,7 @@ OUTER_LOOP: if vote != nil { logger.Debug("Picked Catchup commit to send", "height", prs.Height) schema.WriteVote(conR.traceClient, rs.Height, rs.Round, vote, - ps.peer.ID(), schema.Upload) + string(ps.peer.ID()), schema.Upload) continue OUTER_LOOP } } @@ -812,7 +932,7 @@ func (conR *Reactor) pickSendVoteAndTrace(votes types.VoteSetReader, rs *cstypes vote := ps.PickSendVote(votes) if vote != nil { // if a vote is sent, trace it schema.WriteVote(conR.traceClient, rs.Height, rs.Round, vote, - ps.peer.ID(), schema.Upload) + string(ps.peer.ID()), schema.Upload) return true } return false @@ -894,7 +1014,7 @@ OUTER_LOOP: if rs.Height == prs.Height { if maj23, ok := rs.Votes.Prevotes(prs.Round).TwoThirdsMajority(); ok { - p2p.TrySendEnvelopeShim(peer, p2p.Envelope{ //nolint: staticcheck + if p2p.TrySendEnvelopeShim(peer, p2p.Envelope{ //nolint: staticcheck ChannelID: StateChannel, Message: &cmtcons.VoteSetMaj23{ Height: prs.Height, @@ -902,7 +1022,16 @@ OUTER_LOOP: Type: cmtproto.PrevoteType, BlockID: maj23.ToProto(), }, - }, ps.logger) + }, ps.logger) { + schema.WriteConsensusState( + conR.traceClient, + rs.Height, + rs.Round, + string(peer.ID()), + schema.ConsensusVoteSet23Prevote, + schema.Upload, + ) + } time.Sleep(conR.conS.config.PeerQueryMaj23SleepDuration) } } @@ -914,7 +1043,7 @@ OUTER_LOOP: prs := ps.GetRoundState() if rs.Height == prs.Height { if maj23, ok := rs.Votes.Precommits(prs.Round).TwoThirdsMajority(); ok { - p2p.TrySendEnvelopeShim(peer, p2p.Envelope{ //nolint: staticcheck + if p2p.TrySendEnvelopeShim(peer, p2p.Envelope{ //nolint: staticcheck ChannelID: StateChannel, Message: &cmtcons.VoteSetMaj23{ Height: prs.Height, @@ -922,7 +1051,16 @@ OUTER_LOOP: Type: cmtproto.PrecommitType, BlockID: maj23.ToProto(), }, - }, ps.logger) + }, ps.logger) { + schema.WriteConsensusState( + conR.traceClient, + rs.Height, + rs.Round, + string(peer.ID()), + schema.ConsensusVoteSet23Precommit, + schema.Upload, + ) + } time.Sleep(conR.conS.config.PeerQueryMaj23SleepDuration) } } @@ -935,7 +1073,7 @@ OUTER_LOOP: if rs.Height == prs.Height && prs.ProposalPOLRound >= 0 { if maj23, ok := rs.Votes.Prevotes(prs.ProposalPOLRound).TwoThirdsMajority(); ok { - p2p.TrySendEnvelopeShim(peer, p2p.Envelope{ //nolint: staticcheck + if p2p.TrySendEnvelopeShim(peer, p2p.Envelope{ //nolint: staticcheck ChannelID: StateChannel, Message: &cmtcons.VoteSetMaj23{ Height: prs.Height, @@ -943,7 +1081,16 @@ OUTER_LOOP: Type: cmtproto.PrevoteType, BlockID: maj23.ToProto(), }, - }, ps.logger) + }, ps.logger) { + schema.WriteConsensusState( + conR.traceClient, + rs.Height, + rs.Round, + string(peer.ID()), + schema.ConsensusPOL, + schema.Upload, + ) + } time.Sleep(conR.conS.config.PeerQueryMaj23SleepDuration) } } @@ -958,7 +1105,7 @@ OUTER_LOOP: if prs.CatchupCommitRound != -1 && prs.Height > 0 && prs.Height <= conR.conS.blockStore.Height() && prs.Height >= conR.conS.blockStore.Base() { if commit := conR.conS.LoadCommit(prs.Height); commit != nil { - p2p.TrySendEnvelopeShim(peer, p2p.Envelope{ //nolint: staticcheck + if p2p.TrySendEnvelopeShim(peer, p2p.Envelope{ //nolint: staticcheck ChannelID: StateChannel, Message: &cmtcons.VoteSetMaj23{ Height: prs.Height, @@ -966,7 +1113,16 @@ OUTER_LOOP: Type: cmtproto.PrecommitType, BlockID: commit.BlockID.ToProto(), }, - }, ps.logger) + }, ps.logger) { + schema.WriteConsensusState( + conR.traceClient, + prs.Height, + prs.Round, + string(peer.ID()), + schema.ConsensusVoteSet23Precommit, + schema.Upload, + ) + } time.Sleep(conR.conS.config.PeerQueryMaj23SleepDuration) } } diff --git a/consensus/state.go b/consensus/state.go index d40d73bac0..35fa46d44d 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -706,7 +706,9 @@ func (cs *State) newStep() { cs.nSteps++ - schema.WriteRoundState(cs.traceClient, cs.Height, cs.Round, cs.Step) + step := uint8(cs.RoundState.Step) + + schema.WriteRoundState(cs.traceClient, cs.Height, cs.Round, step) // newStep is called by updateToState in NewState before the eventBus is set! if cs.eventBus != nil { @@ -1160,7 +1162,9 @@ func (cs *State) defaultDecideProposal(height int64, round int32) { block, blockParts = cs.TwoThirdPrevoteBlock, cs.TwoThirdPrevoteBlockParts } else { // Create a new proposal block from state/txs from the mempool. + schema.WriteABCI(cs.traceClient, schema.PrepareProposalStart, height, round) block, blockParts = cs.createProposalBlock() + schema.WriteABCI(cs.traceClient, schema.PrepareProposalEnd, height, round) if block == nil { return } @@ -1305,12 +1309,16 @@ func (cs *State) defaultDoPrevote(height int64, round int32) { return } + schema.WriteABCI(cs.traceClient, schema.ProcessProposalStart, height, round) + stateMachineValidBlock, err := cs.blockExec.ProcessProposal(cs.ProposalBlock) if err != nil { cs.Logger.Error("state machine returned an error when trying to process proposal block", "err", err) return } + schema.WriteABCI(cs.traceClient, schema.ProcessProposalEnd, height, round) + // Vote nil if application invalidated the block if !stateMachineValidBlock { // The app says we must vote nil @@ -1697,6 +1705,8 @@ func (cs *State) finalizeCommit(height int64) { retainHeight int64 ) + schema.WriteABCI(cs.traceClient, schema.CommitStart, height, 0) + stateCopy, retainHeight, err = cs.blockExec.ApplyBlock( stateCopy, types.BlockID{ @@ -1710,6 +1720,8 @@ func (cs *State) finalizeCommit(height int64) { panic(fmt.Sprintf("failed to apply block; error %v", err)) } + schema.WriteABCI(cs.traceClient, schema.CommitEnd, height, 0) + fail.Fail() // XXX // Prune old heights, if requested by ABCI app. diff --git a/mempool/cat/reactor.go b/mempool/cat/reactor.go index 89429a0553..554f806397 100644 --- a/mempool/cat/reactor.go +++ b/mempool/cat/reactor.go @@ -241,7 +241,7 @@ func (memR *Reactor) ReceiveEnvelope(e p2p.Envelope) { for _, tx := range protoTxs { ntx := types.Tx(tx) key := ntx.Key() - schema.WriteMempoolTx(memR.traceClient, e.Src.ID(), key[:], schema.Download) + schema.WriteMempoolTx(memR.traceClient, string(e.Src.ID()), key[:], schema.Download) // If we requested the transaction we mark it as received. if memR.requests.Has(peerID, key) { memR.requests.MarkReceived(peerID, key) @@ -279,7 +279,7 @@ func (memR *Reactor) ReceiveEnvelope(e p2p.Envelope) { } schema.WriteMempoolPeerState( memR.traceClient, - e.Src.ID(), + string(e.Src.ID()), schema.SeenTx, txKey[:], schema.Download, @@ -313,7 +313,7 @@ func (memR *Reactor) ReceiveEnvelope(e p2p.Envelope) { } schema.WriteMempoolPeerState( memR.traceClient, - e.Src.ID(), + string(e.Src.ID()), schema.WantTx, txKey[:], schema.Download, @@ -329,7 +329,7 @@ func (memR *Reactor) ReceiveEnvelope(e p2p.Envelope) { memR.mempool.PeerHasTx(peerID, txKey) schema.WriteMempoolTx( memR.traceClient, - e.Src.ID(), + string(e.Src.ID()), txKey[:], schema.Upload, ) diff --git a/mempool/v1/reactor.go b/mempool/v1/reactor.go index 6540e23574..2ecfc51a5f 100644 --- a/mempool/v1/reactor.go +++ b/mempool/v1/reactor.go @@ -195,7 +195,7 @@ func (memR *Reactor) ReceiveEnvelope(e p2p.Envelope) { ntx := types.Tx(tx) schema.WriteMempoolTx( memR.traceClient, - e.Src.ID(), + string(e.Src.ID()), ntx.Hash(), schema.Download, ) @@ -301,7 +301,7 @@ func (memR *Reactor) broadcastTxRoutine(peer p2p.Peer) { memTx.SetPeer(peerID) schema.WriteMempoolTx( memR.traceClient, - peer.ID(), + string(peer.ID()), memTx.tx.Hash(), schema.Upload, ) diff --git a/node/node.go b/node/node.go index 1f1056895c..a81ced391b 100644 --- a/node/node.go +++ b/node/node.go @@ -549,13 +549,14 @@ func createTransport( nodeInfo p2p.NodeInfo, nodeKey *p2p.NodeKey, proxyApp proxy.AppConns, + tracer trace.Tracer, ) ( *p2p.MultiplexTransport, []p2p.PeerFilterFunc, ) { var ( mConnConfig = p2p.MConnConfig(config.P2P) - transport = p2p.NewMultiplexTransport(nodeInfo, *nodeKey, mConnConfig) + transport = p2p.NewMultiplexTransport(nodeInfo, *nodeKey, mConnConfig, tracer) connFilters = []p2p.ConnFilterFunc{} peerFilters = []p2p.PeerFilterFunc{} ) @@ -625,12 +626,14 @@ func createSwitch(config *cfg.Config, nodeInfo p2p.NodeInfo, nodeKey *p2p.NodeKey, p2pLogger log.Logger, + tracer trace.Tracer, ) *p2p.Switch { sw := p2p.NewSwitch( config.P2P, transport, p2p.WithMetrics(p2pMetrics), p2p.SwitchPeerFilters(peerFilters...), + p2p.WithTracer(tracer), ) sw.SetLogger(p2pLogger) sw.AddReactor("MEMPOOL", mempoolReactor) @@ -922,13 +925,13 @@ func NewNode(config *cfg.Config, } // Setup Transport. - transport, peerFilters := createTransport(config, nodeInfo, nodeKey, proxyApp) + transport, peerFilters := createTransport(config, nodeInfo, nodeKey, proxyApp, tracer) // Setup Switch. p2pLogger := logger.With("module", "p2p") sw := createSwitch( config, transport, p2pMetrics, peerFilters, mempoolReactor, bcReactor, - stateSyncReactor, consensusReactor, evidenceReactor, nodeInfo, nodeKey, p2pLogger, + stateSyncReactor, consensusReactor, evidenceReactor, nodeInfo, nodeKey, p2pLogger, tracer, ) err = sw.AddPersistentPeers(splitAndTrimEmpty(config.P2P.PersistentPeers, ",", " ")) diff --git a/p2p/peer.go b/p2p/peer.go index cb36413182..f43cff9d51 100644 --- a/p2p/peer.go +++ b/p2p/peer.go @@ -11,6 +11,8 @@ import ( "github.com/tendermint/tendermint/libs/cmap" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" + "github.com/tendermint/tendermint/pkg/trace" + "github.com/tendermint/tendermint/pkg/trace/schema" cmtconn "github.com/tendermint/tendermint/p2p/conn" ) @@ -175,6 +177,7 @@ type peer struct { Data *cmap.CMap metrics *Metrics + traceClient trace.Tracer metricsTicker *time.Ticker mlc *metricsLabelCache @@ -184,6 +187,12 @@ type peer struct { type PeerOption func(*peer) +func WithPeerTracer(t trace.Tracer) PeerOption { + return func(p *peer) { + p.traceClient = t + } +} + func newPeer( pc peerConn, mConfig cmtconn.MConnConfig, @@ -203,6 +212,7 @@ func newPeer( metricsTicker: time.NewTicker(metricsTickerDuration), metrics: NopMetrics(), mlc: mlc, + traceClient: trace.NoOpTracer(), } p.mconn = createMConnection( @@ -494,11 +504,14 @@ func (p *peer) metricsReporter() { case <-p.metricsTicker.C: status := p.mconn.Status() var sendQueueSize float64 + queues := make(map[byte]int, len(status.Channels)) for _, chStatus := range status.Channels { sendQueueSize += float64(chStatus.SendQueueSize) + queues[chStatus.ID] = chStatus.SendQueueSize } p.metrics.PeerPendingSendBytes.With("peer_id", string(p.ID())).Set(sendQueueSize) + schema.WritePendingBytes(p.traceClient, string(p.ID()), queues) case <-p.Quit(): return } @@ -546,6 +559,7 @@ func createMConnection( p.metrics.PeerReceiveBytesTotal.With(labels...).Add(float64(len(msgBytes))) p.metrics.MessageReceiveBytesTotal.With(append(labels, "message_type", p.mlc.ValueToMetricLabel(msg))...).Add(float64(len(msgBytes))) + schema.WriteReceivedBytes(p.traceClient, string(p.ID()), chID, len(msgBytes)) if nr, ok := reactor.(EnvelopeReceiver); ok { nr.ReceiveEnvelope(Envelope{ ChannelID: chID, diff --git a/p2p/switch.go b/p2p/switch.go index 60d26729b0..af0607e037 100644 --- a/p2p/switch.go +++ b/p2p/switch.go @@ -12,6 +12,8 @@ import ( "github.com/tendermint/tendermint/libs/rand" "github.com/tendermint/tendermint/libs/service" "github.com/tendermint/tendermint/p2p/conn" + "github.com/tendermint/tendermint/pkg/trace" + "github.com/tendermint/tendermint/pkg/trace/schema" ) const ( @@ -91,8 +93,9 @@ type Switch struct { rng *rand.Rand // seed for randomizing dial times and orders - metrics *Metrics - mlc *metricsLabelCache + metrics *Metrics + mlc *metricsLabelCache + traceClient trace.Tracer } // NetAddress returns the address the switch is listening on. @@ -126,6 +129,7 @@ func NewSwitch( persistentPeersAddrs: make([]*NetAddress, 0), unconditionalPeerIDs: make(map[ID]struct{}), mlc: newMetricsLabelCache(), + traceClient: trace.NoOpTracer(), } // Ensure we have a completely undeterministic PRNG. @@ -155,6 +159,10 @@ func WithMetrics(metrics *Metrics) SwitchOption { return func(sw *Switch) { sw.metrics = metrics } } +func WithTracer(tracer trace.Tracer) SwitchOption { + return func(sw *Switch) { sw.traceClient = tracer } +} + //--------------------------------------------------------------------- // Switch setup @@ -398,6 +406,7 @@ func (sw *Switch) StopPeerGracefully(peer Peer) { func (sw *Switch) stopAndRemovePeer(peer Peer, reason interface{}) { sw.transport.Cleanup(peer) + schema.WritePeerUpdate(sw.traceClient, string(peer.ID()), schema.PeerDisconnect, fmt.Sprintf("%v", reason)) if err := peer.Stop(); err != nil { sw.Logger.Error("error while stopping peer", "error", err) // TODO: should return error to be handled accordingly } @@ -883,6 +892,7 @@ func (sw *Switch) addPeer(p Peer) error { return err } sw.metrics.Peers.Add(float64(1)) + schema.WritePeerUpdate(sw.traceClient, string(p.ID()), schema.PeerJoin, "") // Start all the reactor protocols on the peer. for _, reactor := range sw.reactors { diff --git a/p2p/test_util.go b/p2p/test_util.go index 32166043a1..c527863054 100644 --- a/p2p/test_util.go +++ b/p2p/test_util.go @@ -10,6 +10,7 @@ import ( "github.com/tendermint/tendermint/libs/log" cmtnet "github.com/tendermint/tendermint/libs/net" cmtrand "github.com/tendermint/tendermint/libs/rand" + "github.com/tendermint/tendermint/pkg/trace" "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/p2p/conn" @@ -199,7 +200,7 @@ func MakeSwitch( panic(err) } - t := NewMultiplexTransport(nodeInfo, nodeKey, MConnConfig(cfg)) + t := NewMultiplexTransport(nodeInfo, nodeKey, MConnConfig(cfg), trace.NoOpTracer()) if err := t.Listen(*addr); err != nil { panic(err) diff --git a/p2p/transport.go b/p2p/transport.go index 416c946942..5c82f1f757 100644 --- a/p2p/transport.go +++ b/p2p/transport.go @@ -12,6 +12,7 @@ import ( "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/libs/protoio" "github.com/tendermint/tendermint/p2p/conn" + "github.com/tendermint/tendermint/pkg/trace" tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" ) @@ -158,6 +159,9 @@ type MultiplexTransport struct { // peer currently. All relevant configuration should be refactored into options // with sane defaults. mConfig conn.MConnConfig + + // the tracer is passed to peers for collecting trace data + tracer trace.Tracer } // Test multiplexTransport for interface completeness. @@ -169,6 +173,7 @@ func NewMultiplexTransport( nodeInfo NodeInfo, nodeKey NodeKey, mConfig conn.MConnConfig, + tracer trace.Tracer, ) *MultiplexTransport { return &MultiplexTransport{ acceptc: make(chan accept), @@ -181,6 +186,7 @@ func NewMultiplexTransport( nodeKey: nodeKey, conns: NewConnSet(), resolver: net.DefaultResolver, + tracer: tracer, } } @@ -527,6 +533,7 @@ func (mt *MultiplexTransport) wrapPeer( cfg.onPeerError, cfg.mlc, PeerMetrics(cfg.metrics), + WithPeerTracer(mt.tracer), ) return p diff --git a/p2p/transport_test.go b/p2p/transport_test.go index adaab39955..151ac7edf7 100644 --- a/p2p/transport_test.go +++ b/p2p/transport_test.go @@ -13,6 +13,7 @@ import ( "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/libs/protoio" "github.com/tendermint/tendermint/p2p/conn" + "github.com/tendermint/tendermint/pkg/trace" tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" ) @@ -30,7 +31,7 @@ func newMultiplexTransport( nodeKey NodeKey, ) *MultiplexTransport { return NewMultiplexTransport( - nodeInfo, nodeKey, conn.DefaultMConnConfig(), + nodeInfo, nodeKey, conn.DefaultMConnConfig(), trace.NoOpTracer(), ) } diff --git a/pkg/trace/buffered_file.go b/pkg/trace/buffered_file.go index 94a6b91add..9b228e3f9e 100644 --- a/pkg/trace/buffered_file.go +++ b/pkg/trace/buffered_file.go @@ -2,14 +2,27 @@ package trace import ( "bufio" + "errors" + "io" "os" "sync" + "sync/atomic" ) +// bufferedFile is a file that is being written to and read from. It is thread +// safe, however, when reading from the file, writes will be ignored. type bufferedFile struct { - mut *sync.RWMutex + // reading protects the file from being written to while it is being read + // from. This is needed beyond in addition to the mutex so that writes can + // be ignored while reading. + reading atomic.Bool + + // mut protects the buffered writer. + mut *sync.Mutex + // file is the file that is being written to. file *os.File + // writer is the buffered writer that is writing to the file. wr *bufio.Writer } @@ -17,40 +30,72 @@ type bufferedFile struct { // newbufferedFile creates a new buffered file that writes to the given file. func newbufferedFile(file *os.File) *bufferedFile { return &bufferedFile{ - mut: &sync.RWMutex{}, - file: file, - wr: bufio.NewWriter(file), + file: file, + wr: bufio.NewWriter(file), + reading: atomic.Bool{}, + mut: &sync.Mutex{}, } } -// Write writes the given bytes to the file. +// Write writes the given bytes to the file. If the file is currently being read +// from, the write will be lost. func (f *bufferedFile) Write(b []byte) (int, error) { + if f.reading.Load() { + return 0, nil + } f.mut.Lock() defer f.mut.Unlock() return f.wr.Write(b) } -// Flush flushes the writer to the file. -func (f *bufferedFile) Flush() error { +func (f *bufferedFile) startReading() error { + f.reading.Store(true) + f.mut.Lock() + defer f.mut.Unlock() + + err := f.wr.Flush() + if err != nil { + f.reading.Store(false) + return err + } + + _, err = f.file.Seek(0, io.SeekStart) + if err != nil { + f.reading.Store(false) + return err + } + + return nil +} + +func (f *bufferedFile) stopReading() error { f.mut.Lock() defer f.mut.Unlock() - return f.wr.Flush() + _, err := f.file.Seek(0, io.SeekEnd) + f.reading.Store(false) + return err } -// File returns a new copy of *os.File. -func (f *bufferedFile) File() (*os.File, error) { - err := f.Flush() +// File returns the underlying file with the seek point reset. The caller should +// not close the file. The caller must call the returned function when they are +// done reading from the file. This function resets the seek point to where it +// was being written to. +func (f *bufferedFile) File() (*os.File, func() error, error) { + if f.reading.Load() { + return nil, func() error { return nil }, errors.New("file is currently being read from") + } + err := f.startReading() if err != nil { - return nil, err + return nil, func() error { return nil }, err } - f.mut.RLock() - defer f.mut.RUnlock() - return os.Open(f.file.Name()) + return f.file, f.stopReading, nil } // Close closes the file. func (f *bufferedFile) Close() error { + // set reading to true to prevent writes while closing the file. f.mut.Lock() defer f.mut.Unlock() + f.reading.Store(true) return f.file.Close() } diff --git a/pkg/trace/fileserver.go b/pkg/trace/fileserver.go index 2ab6ce60b4..a5d510ee8f 100644 --- a/pkg/trace/fileserver.go +++ b/pkg/trace/fileserver.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" "io" + "math/rand" "mime" "mime/multipart" "net/http" @@ -36,11 +37,12 @@ func (lt *LocalTracer) getTableHandler() http.HandlerFunc { return } - f, err := lt.ReadTable(inputString) + f, done, err := lt.readTable(inputString) if err != nil { http.Error(w, fmt.Sprintf("failed to read table: %v", err), http.StatusInternalServerError) return } + defer done() //nolint:errcheck // Use the pump function to continuously read from the file and write to // the response writer @@ -205,6 +207,9 @@ func PushS3(chainID, nodeID string, s3cfg S3Config, f *os.File) error { s3cfg.SecretKey, "", ), + HTTPClient: &http.Client{ + Timeout: time.Duration(15) * time.Second, + }, }, ) if err != nil { @@ -236,14 +241,22 @@ func (lt *LocalTracer) pushLoop() { func (lt *LocalTracer) PushAll() error { for table := range lt.fileMap { - f, err := lt.ReadTable(table) + f, done, err := lt.readTable(table) if err != nil { return err } - if err := PushS3(lt.chainID, lt.nodeID, lt.s3Config, f); err != nil { + for i := 0; i < 3; i++ { + err = PushS3(lt.chainID, lt.nodeID, lt.s3Config, f) + if err == nil { + break + } + lt.logger.Error("failed to push table", "table", table, "error", err) + time.Sleep(time.Second * time.Duration(rand.Intn(3))) //nolint:gosec + } + err = done() + if err != nil { return err } - f.Close() } return nil } @@ -279,7 +292,7 @@ func S3Download(dst, prefix string, cfg S3Config) error { err = s3Svc.ListObjectsV2Pages(input, func(page *s3.ListObjectsV2Output, lastPage bool) bool { for _, content := range page.Contents { - localFilePath := filepath.Join(dst, strings.TrimPrefix(*content.Key, prefix)) + localFilePath := filepath.Join(dst, prefix, strings.TrimPrefix(*content.Key, prefix)) fmt.Printf("Downloading %s to %s\n", *content.Key, localFilePath) // Create the directories in the path diff --git a/pkg/trace/local_tracer.go b/pkg/trace/local_tracer.go index 8d4ecfb628..ad9807cbd4 100644 --- a/pkg/trace/local_tracer.go +++ b/pkg/trace/local_tracer.go @@ -82,8 +82,7 @@ func NewLocalTracer(cfg *config.Config, logger log.Logger, chainID, nodeID strin if err != nil { return nil, fmt.Errorf("failed to open or create file %s: %w", fileName, err) } - bf := newbufferedFile(file) - fm[table] = bf + fm[table] = newbufferedFile(file) } lt := &LocalTracer{ @@ -146,21 +145,19 @@ func (lt *LocalTracer) Write(e Entry) { } // ReadTable returns a file for the given table. If the table is not being -// collected, an error is returned. This method is not thread-safe. -func (lt *LocalTracer) ReadTable(table string) (*os.File, error) { +// collected, an error is returned. The caller should not close the file. +func (lt *LocalTracer) readTable(table string) (*os.File, func() error, error) { bf, has := lt.getFile(table) if !has { - return nil, fmt.Errorf("table %s not found", table) + return nil, func() error { return nil }, fmt.Errorf("table %s not found", table) } return bf.File() } func (lt *LocalTracer) IsCollecting(table string) bool { - if _, has := lt.getFile(table); has { - return true - } - return false + _, has := lt.getFile(table) + return has } // getFile gets a file for the given type. This method is purposely @@ -202,12 +199,16 @@ func (lt *LocalTracer) drainCanal() { // Stop optionally uploads and closes all open files. func (lt *LocalTracer) Stop() { - for _, file := range lt.fileMap { - err := file.Flush() + if lt.s3Config.SecretKey != "" { + lt.logger.Info("pushing all tables before stopping") + err := lt.PushAll() if err != nil { - lt.logger.Error("failed to flush file", "error", err) + lt.logger.Error("failed to push tables", "error", err) } - err = file.Close() + } + + for _, file := range lt.fileMap { + err := file.Close() if err != nil { lt.logger.Error("failed to close file", "error", err) } diff --git a/pkg/trace/local_tracer_test.go b/pkg/trace/local_tracer_test.go index 21f128a433..68841a34b7 100644 --- a/pkg/trace/local_tracer_test.go +++ b/pkg/trace/local_tracer_test.go @@ -42,30 +42,44 @@ func TestLocalTracerReadWrite(t *testing.T) { time.Sleep(100 * time.Millisecond) - f, err := client.ReadTable(testEventTable) + f, done, err := client.readTable(testEventTable) require.NoError(t, err) // write at the same time as reading to test thread safety this test will be - // flakey if this is not being handled correctly + // flakey if this is not being handled correctly. Since we're reading from + // the file, we expect these write to be ignored. migenees := testEvent{"Migennes", 620} pontivy := testEvent{"Pontivy", 720} client.Write(migenees) client.Write(pontivy) + // wait to ensure that the write have been processed (and ignored in this case) + time.Sleep(100 * time.Millisecond) + events, err := DecodeFile[testEvent](f) require.NoError(t, err) + err = done() + require.NoError(t, err) + + // even though we've written twice, we expect only the first two events to be + // be written to the file. When reading the file, all writes are ignored. require.GreaterOrEqual(t, len(events), 2) require.Equal(t, annecy, events[0].Msg) require.Equal(t, paris, events[1].Msg) - f.Close() + + // write again to the file and read it back this time, we expect the writes + // to be written since we've called the done() function. + client.Write(migenees) + client.Write(pontivy) time.Sleep(100 * time.Millisecond) - f, err = client.ReadTable(testEventTable) + f, done, err = client.readTable(testEventTable) require.NoError(t, err) - defer f.Close() events, err = DecodeFile[testEvent](f) require.NoError(t, err) + err = done() + require.NoError(t, err) require.Len(t, events, 4) require.Equal(t, migenees, events[2].Msg) require.Equal(t, pontivy, events[3].Msg) @@ -96,11 +110,12 @@ func TestLocalTracerServerPull(t *testing.T) { err = GetTable(url, testEventTable, newDir) require.NoError(t, err) - originalFile, err := client.ReadTable(testEventTable) + originalFile, done, err := client.readTable(testEventTable) require.NoError(t, err) - defer originalFile.Close() originalBz, err := io.ReadAll(originalFile) require.NoError(t, err) + err = done() + require.NoError(t, err) path := path.Join(newDir, testEventTable+".jsonl") downloadedFile, err := os.Open(path) diff --git a/pkg/trace/schema/consensus.go b/pkg/trace/schema/consensus.go index 4942a91afe..6584429c2d 100644 --- a/pkg/trace/schema/consensus.go +++ b/pkg/trace/schema/consensus.go @@ -1,8 +1,6 @@ package schema import ( - cstypes "github.com/tendermint/tendermint/consensus/types" - "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/pkg/trace" "github.com/tendermint/tendermint/types" ) @@ -15,6 +13,8 @@ func ConsensusTables() []string { BlockPartsTable, BlockTable, VoteTable, + ConsensusStateTable, + ProposalTable, } } @@ -27,9 +27,9 @@ const ( // RoundState describes schema for the "consensus_round_state" table. type RoundState struct { - Height int64 `json:"height"` - Round int32 `json:"round"` - Step cstypes.RoundStepType `json:"step"` + Height int64 `json:"height"` + Round int32 `json:"round"` + Step uint8 `json:"step"` } // Table returns the table name for the RoundState struct. @@ -39,7 +39,7 @@ func (r RoundState) Table() string { // WriteRoundState writes a tracing point for a tx using the predetermined // schema for consensus state tracing. -func WriteRoundState(client trace.Tracer, height int64, round int32, step cstypes.RoundStepType) { +func WriteRoundState(client trace.Tracer, height int64, round int32, step uint8) { client.Write(RoundState{Height: height, Round: round, Step: step}) } @@ -55,7 +55,8 @@ type BlockPart struct { Height int64 `json:"height"` Round int32 `json:"round"` Index int32 `json:"index"` - Peer p2p.ID `json:"peer"` + Catchup bool `json:"catchup"` + Peer string `json:"peer"` TransferType TransferType `json:"transfer_type"` } @@ -70,11 +71,12 @@ func WriteBlockPart( client trace.Tracer, height int64, round int32, - peer p2p.ID, index uint32, + catchup bool, + peer string, transferType TransferType, ) { - // this check is redundant to what is checked during WritePoint, although it + // this check is redundant to what is checked during client.Write, although it // is an optimization to avoid allocations from the map of fields. if !client.IsCollecting(BlockPartsTable) { return @@ -83,6 +85,7 @@ func WriteBlockPart( Height: height, Round: round, Index: int32(index), + Catchup: catchup, Peer: peer, TransferType: transferType, }) @@ -104,7 +107,7 @@ type Vote struct { VoteRound int32 `json:"vote_round"` VoteMillisecondTimestamp int64 `json:"vote_unix_millisecond_timestamp"` ValidatorAddress string `json:"vote_validator_address"` - Peer p2p.ID `json:"peer"` + Peer string `json:"peer"` TransferType TransferType `json:"transfer_type"` } @@ -118,7 +121,7 @@ func WriteVote(client trace.Tracer, height int64, // height of the current peer when it received/sent the vote round int32, // round of the current peer when it received/sent the vote vote *types.Vote, // vote received by the current peer - peer p2p.ID, // the peer from which it received the vote or the peer to which it sent the vote + peer string, // the peer from which it received the vote or the peer to which it sent the vote transferType TransferType, // download (received) or upload(sent) ) { client.Write(Vote{ @@ -166,3 +169,81 @@ func WriteBlockSummary(client trace.Tracer, block *types.Block, size int) { LastCommitRound: block.LastCommit.Round, }) } + +const ( + ConsensusStateTable = "consensus_state" +) + +type ConsensusStateUpdateType string + +const ( + ConsensusNewValidBlock ConsensusStateUpdateType = "new_valid_block" + ConsensusNewRoundStep ConsensusStateUpdateType = "new_round_step" + ConsensusVoteSetBits ConsensusStateUpdateType = "vote_set_bits" + ConsensusVoteSet23Prevote ConsensusStateUpdateType = "vote_set_23_prevote" + ConsensusVoteSet23Precommit ConsensusStateUpdateType = "vote_set_23_precommit" + ConsensusHasVote ConsensusStateUpdateType = "has_vote" + ConsensusPOL ConsensusStateUpdateType = "pol" +) + +type ConsensusState struct { + Height int64 `json:"height"` + Round int32 `json:"round"` + UpdateType string `json:"update_type"` + Peer string `json:"peer"` + TransferType TransferType `json:"transfer_type"` + Data []string `json:"data,omitempty"` +} + +func (c ConsensusState) Table() string { + return ConsensusStateTable +} + +func WriteConsensusState( + client trace.Tracer, + height int64, + round int32, + peer string, + updateType ConsensusStateUpdateType, + transferType TransferType, + data ...string, +) { + client.Write(ConsensusState{ + Height: height, + Round: round, + Peer: peer, + UpdateType: string(updateType), + TransferType: transferType, + Data: data, + }) +} + +const ( + ProposalTable = "consensus_proposal" +) + +type Proposal struct { + Height int64 `json:"height"` + Round int32 `json:"round"` + PeerID string `json:"peer_id"` + TransferType TransferType `json:"transfer_type"` +} + +func (p Proposal) Table() string { + return ProposalTable +} + +func WriteProposal( + client trace.Tracer, + height int64, + round int32, + peerID string, + transferType TransferType, +) { + client.Write(Proposal{ + Height: height, + Round: round, + PeerID: peerID, + TransferType: transferType, + }) +} diff --git a/pkg/trace/schema/mempool.go b/pkg/trace/schema/mempool.go index c143cfb64d..f2198fdf31 100644 --- a/pkg/trace/schema/mempool.go +++ b/pkg/trace/schema/mempool.go @@ -2,7 +2,6 @@ package schema import ( "github.com/tendermint/tendermint/libs/bytes" - "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/pkg/trace" ) @@ -24,7 +23,7 @@ const ( // MemPoolTx describes the schema for the "mempool_tx" table. type MempoolTx struct { TxHash string `json:"tx_hash"` - Peer p2p.ID `json:"peer"` + Peer string `json:"peer"` Size int `json:"size"` TransferType TransferType `json:"transfer_type"` } @@ -36,8 +35,8 @@ func (m MempoolTx) Table() string { // WriteMempoolTx writes a tracing point for a tx using the predetermined // schema for mempool tracing. -func WriteMempoolTx(client trace.Tracer, peer p2p.ID, txHash []byte, transferType TransferType) { - // this check is redundant to what is checked during WritePoint, although it +func WriteMempoolTx(client trace.Tracer, peer string, txHash []byte, transferType TransferType) { + // this check is redundant to what is checked during client.Write, although it // is an optimization to avoid allocations from the map of fields. if !client.IsCollecting(MempoolTxTable) { return @@ -67,7 +66,7 @@ const ( // MempoolPeerState describes the schema for the "mempool_peer_state" table. type MempoolPeerState struct { - Peer p2p.ID `json:"peer"` + Peer string `json:"peer"` StateUpdate MempoolStateUpdateType `json:"state_update"` TxHash string `json:"tx_hash"` TransferType TransferType `json:"transfer_type"` @@ -82,12 +81,12 @@ func (m MempoolPeerState) Table() string { // the predetermined schema for mempool tracing. func WriteMempoolPeerState( client trace.Tracer, - peer p2p.ID, + peer string, stateUpdate MempoolStateUpdateType, txHash []byte, transferType TransferType, ) { - // this check is redundant to what is checked during WritePoint, although it + // this check is redundant to what is checked during client.Write, although it // is an optimization to avoid allocations from creating the map of fields. if !client.IsCollecting(MempoolPeerStateTable) { return diff --git a/pkg/trace/schema/misc.go b/pkg/trace/schema/misc.go new file mode 100644 index 0000000000..638add7aae --- /dev/null +++ b/pkg/trace/schema/misc.go @@ -0,0 +1,42 @@ +package schema + +import "github.com/tendermint/tendermint/pkg/trace" + +const ( + ABCITable = "abci" +) + +// ABCIUpdate is an enum that represents the different types of ABCI +// trace data. +type ABCIUpdate string + +const ( + PrepareProposalStart ABCIUpdate = "prepare_proposal_start" + PrepareProposalEnd ABCIUpdate = "prepare_proposal_end" + ProcessProposalStart ABCIUpdate = "process_proposal_start" + ProcessProposalEnd ABCIUpdate = "process_proposal_end" + CommitStart ABCIUpdate = "commit_start" + CommitEnd ABCIUpdate = "commit_end" +) + +// ABCI describes schema for the "abci" table. +type ABCI struct { + TraceType string `json:"trace"` + Height int64 `json:"height"` + Round int32 `json:"round"` +} + +// Table returns the table name for the ABCI struct and fullfills the +// trace.Entry interface. +func (m ABCI) Table() string { + return ABCITable +} + +// WriteABCI writes a trace for an ABCI method. +func WriteABCI(client trace.Tracer, traceType ABCIUpdate, height int64, round int32) { + client.Write(ABCI{ + TraceType: string(traceType), + Height: height, + Round: round, + }) +} diff --git a/pkg/trace/schema/p2p.go b/pkg/trace/schema/p2p.go new file mode 100644 index 0000000000..e36da0d833 --- /dev/null +++ b/pkg/trace/schema/p2p.go @@ -0,0 +1,82 @@ +package schema + +import "github.com/tendermint/tendermint/pkg/trace" + +// P2PTables returns the list of tables that are used for p2p tracing. +func P2PTables() []string { + return []string{ + PeersTable, + PendingBytesTable, + ReceivedBytesTable, + } +} + +const ( + // PeerUpdateTable is the name of the table that stores the p2p peer + // updates. + PeersTable = "peers" +) + +// P2PPeerUpdate is an enum that represents the different types of p2p +// trace data. +type P2PPeerUpdate string + +const ( + // PeerJoin is the action for when a peer is connected. + PeerJoin P2PPeerUpdate = "connect" + // PeerDisconnect is the action for when a peer is disconnected. + PeerDisconnect P2PPeerUpdate = "disconnect" +) + +// PeerUpdate describes schema for the "peer_update" table. +type PeerUpdate struct { + PeerID string `json:"peer_id"` + Action string `json:"action"` + Reason string `json:"reason"` +} + +// Table returns the table name for the PeerUpdate struct. +func (p PeerUpdate) Table() string { + return PeersTable +} + +// WritePeerUpdate writes a tracing point for a peer update using the predetermined +// schema for p2p tracing. +func WritePeerUpdate(client trace.Tracer, peerID string, action P2PPeerUpdate, reason string) { + client.Write(PeerUpdate{PeerID: peerID, Action: string(action), Reason: reason}) +} + +const ( + PendingBytesTable = "pending_bytes" +) + +type PendingBytes struct { + PeerID string `json:"peer_id"` + Bytes map[byte]int `json:"bytes"` +} + +func (s PendingBytes) Table() string { + return PendingBytesTable +} + +func WritePendingBytes(client trace.Tracer, peerID string, bytes map[byte]int) { + client.Write(PendingBytes{PeerID: peerID, Bytes: bytes}) +} + +const ( + ReceivedBytesTable = "received_bytes" +) + +type ReceivedBytes struct { + PeerID string `json:"peer_id"` + Channel byte `json:"channel"` + Bytes int `json:"bytes"` +} + +func (s ReceivedBytes) Table() string { + return ReceivedBytesTable +} + +func WriteReceivedBytes(client trace.Tracer, peerID string, channel byte, bytes int) { + client.Write(ReceivedBytes{PeerID: peerID, Channel: channel, Bytes: bytes}) +} diff --git a/pkg/trace/schema/schema.go b/pkg/trace/schema/schema.go index 8eeabd78c8..c0f2316787 100644 --- a/pkg/trace/schema/schema.go +++ b/pkg/trace/schema/schema.go @@ -14,9 +14,15 @@ func AllTables() []string { tables := []string{} tables = append(tables, MempoolTables()...) tables = append(tables, ConsensusTables()...) + tables = append(tables, P2PTables()...) + tables = append(tables, ABCITable) return tables } +const ( + Broadcast = "broadcast" +) + type TransferType int const ( diff --git a/pkg/trace/tracer.go b/pkg/trace/tracer.go index 67608596f6..6c4be62c4c 100644 --- a/pkg/trace/tracer.go +++ b/pkg/trace/tracer.go @@ -18,7 +18,6 @@ type Entry interface { // Tracer defines the methods for a client that can write and read trace data. type Tracer interface { Write(Entry) - ReadTable(table string) (*os.File, error) IsCollecting(table string) bool Stop() } diff --git a/test/maverick/node/node.go b/test/maverick/node/node.go index ea48ba9496..bcc198c668 100644 --- a/test/maverick/node/node.go +++ b/test/maverick/node/node.go @@ -551,7 +551,7 @@ func createTransport( ) { var ( mConnConfig = p2p.MConnConfig(config.P2P) - transport = p2p.NewMultiplexTransport(nodeInfo, *nodeKey, mConnConfig) + transport = p2p.NewMultiplexTransport(nodeInfo, *nodeKey, mConnConfig, trace.NoOpTracer()) connFilters = []p2p.ConnFilterFunc{} peerFilters = []p2p.PeerFilterFunc{} ) From 245c8acfe2e96e294ef509eab0ede5651df18533 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 21:27:42 +0000 Subject: [PATCH 19/24] build(deps): Bump github.com/celestiaorg/nmt from 0.20.0 to 0.21.0 (backport #1367) (#1370) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [github.com/celestiaorg/nmt](https://github.com/celestiaorg/nmt) from 0.20.0 to 0.21.0.
Release notes

Sourced from github.com/celestiaorg/nmt's releases.

v0.21.0

What's Changed

New Contributors

Full Changelog: https://github.com/celestiaorg/nmt/compare/v0.20.0...v0.21.0

Commits
  • 9fb3c91 refactor: popIfNonEmpty for leaf hashes (#257)
  • 7831a96 feat!: adds input range check to optimize VerifyLeafHashes and VerifyInclusio...
  • 559fe2b chore: fixes dead link for golangci-lint status badge in README (#254)
  • 2c0563a ci: add secrets.CODECOV_TOKEN to codecov (#255)
  • 749d39b chore(deps): bump golangci/golangci-lint-action from 4 to 6 (#252)
  • eb927ae chore: rename master to main (#249)
  • a81c073 chore(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 (#247)
  • f555667 chore(deps): bump github.com/tidwall/gjson from 1.17.0 to 1.17.1 (#246)
  • 38a8a09 chore(deps): bump golangci/golangci-lint-action from 3 to 4 (#245)
  • faa9ad0 chore(deps): bump actions/setup-go from 4 to 5 (#244)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/celestiaorg/nmt&package-manager=go_modules&previous-version=0.20.0&new-version=0.21.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

This is an automatic backport of pull request #1367 done by [Mergify](https://mergify.com). --------- Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Rootul Patel --- go.mod | 8 ++++---- go.sum | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 4e61a59bf9..ba0f4ba3b6 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/btcsuite/btcd/btcec/v2 v2.3.2 github.com/btcsuite/btcd/btcutil v1.1.3 github.com/bufbuild/buf v1.15.1 - github.com/celestiaorg/nmt v0.20.0 + github.com/celestiaorg/nmt v0.21.0 github.com/cometbft/cometbft-db v0.7.0 github.com/creachadair/taskgroup v0.3.2 github.com/fortytw2/leaktest v1.3.0 @@ -43,7 +43,7 @@ require ( github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa github.com/spf13/cobra v1.8.0 github.com/spf13/viper v1.15.0 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 github.com/vektra/mockery/v2 v2.23.1 go.opentelemetry.io/otel v1.24.0 @@ -256,8 +256,8 @@ 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.5.0 // indirect - github.com/subosito/gotenv v1.6.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect + github.com/subosito/gotenv v1.4.2 // indirect github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect github.com/tdakkota/asciicheck v0.2.0 // indirect github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect diff --git a/go.sum b/go.sum index 4c48dcef80..fae3ebfc91 100644 --- a/go.sum +++ b/go.sum @@ -148,8 +148,8 @@ github.com/bufbuild/protocompile v0.5.1/go.mod h1:G5iLmavmF4NsYtpZFvE3B/zFch2GIY github.com/butuzov/ireturn v0.1.1 h1:QvrO2QF2+/Cx1WA/vETCIYBKtRjc30vesdoPUNo1EbY= github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/celestiaorg/nmt v0.20.0 h1:9i7ultZ8Wv5ytt8ZRaxKQ5KOOMo4A2K2T/aPGjIlSas= -github.com/celestiaorg/nmt v0.20.0/go.mod h1:Oz15Ub6YPez9uJV0heoU4WpFctxazuIhKyUtaYNio7E= +github.com/celestiaorg/nmt v0.21.0 h1:81MBqxNn3orByoiCtdNVjwi5WsLgMkzHwP02ZMhTBHM= +github.com/celestiaorg/nmt v0.21.0/go.mod h1:ia/EpCk0enD5yO5frcxoNoFToz2Ghtk2i+blmCRjIY8= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= @@ -836,8 +836,9 @@ github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8L 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/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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= @@ -848,10 +849,11 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= -github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= +github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= @@ -867,8 +869,8 @@ github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpR github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= github.com/tetafro/godot v1.4.11 h1:BVoBIqAf/2QdbFmSwAWnaIqDivZdOV0ZRwEm6jivLKw= github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= -github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= -github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U= +github.com/tidwall/gjson v1.17.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= From e580113b34a623b1eb068361d177c5ad9c738247 Mon Sep 17 00:00:00 2001 From: CHAMI Rachid Date: Wed, 5 Jun 2024 09:42:56 +0200 Subject: [PATCH 20/24] fix: check if row proof end row is greater than start row (#1372) ## Description Closes https://github.com/celestiaorg/celestia-core/issues/1371 #### PR checklist - [x] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments --------- Co-authored-by: Rootul P --- types/row_proof.go | 4 +++- types/row_proof_test.go | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/types/row_proof.go b/types/row_proof.go index 3127044188..2498f32f7d 100644 --- a/types/row_proof.go +++ b/types/row_proof.go @@ -25,7 +25,9 @@ type RowProof struct { // the proof fails validation. If the proof passes validation, this function // attempts to verify the proof. It returns nil if the proof is valid. func (rp RowProof) Validate(root []byte) error { - // HACKHACK performing subtraction with unsigned integers is unsafe. + if rp.EndRow < rp.StartRow { + return fmt.Errorf("end row %d cannot be less than start row %d", rp.EndRow, rp.StartRow) + } if int(rp.EndRow-rp.StartRow+1) != len(rp.RowRoots) { return fmt.Errorf("the number of rows %d must equal the number of row roots %d", int(rp.EndRow-rp.StartRow+1), len(rp.RowRoots)) } diff --git a/types/row_proof_test.go b/types/row_proof_test.go index e77ac48e0d..5026c2f19c 100644 --- a/types/row_proof_test.go +++ b/types/row_proof_test.go @@ -53,6 +53,12 @@ func TestRowProofValidate(t *testing.T) { root: incorrectRoot, wantErr: true, }, + { + name: "start row greater than end row", + rp: RowProof{StartRow: 10, EndRow: 5}, + root: root, + wantErr: true, + }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { From fb9d6562e5ed3bbd7362aa5530920b09c28cb721 Mon Sep 17 00:00:00 2001 From: Sanaz Taheri <35961250+staheri14@users.noreply.github.com> Date: Fri, 7 Jun 2024 09:12:27 -0700 Subject: [PATCH 21/24] chore: bumps go version to 1.22.4 in v0.34.x-celestia (#1379) This together with https://github.com/celestiaorg/celestia-core/pull/1378 close https://github.com/celestiaorg/celestia-core/issues/1377 --- DOCKER/Dockerfile | 2 +- README.md | 2 +- go.mod | 2 +- scripts/proto-gen.sh | 2 +- test/docker/Dockerfile | 2 +- test/e2e/docker/Dockerfile | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index dd23a5f6e5..c1ee8ad8e7 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -1,6 +1,6 @@ # Use a build arg to ensure that both stages use the same, # hopefully current, go version. -ARG GOLANG_BASE_IMAGE=golang:1.22.3-alpine +ARG GOLANG_BASE_IMAGE=golang:1.22.4-alpine # stage 1 Generate CometBFT Binary FROM --platform=$BUILDPLATFORM $GOLANG_BASE_IMAGE as builder diff --git a/README.md b/README.md index 26c9f89a44..8bf3f2a7e8 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ This repo intends on preserving the minimal possible diff with [cometbft/cometbf - **specific to Celestia**: consider if [celestia-app](https://github.com/celestiaorg/celestia-app) is a better target - **not specific to Celestia**: consider making the contribution upstream in CometBFT -1. [Install Go](https://go.dev/doc/install) 1.22.3+ +1. [Install Go](https://go.dev/doc/install) 1.22.4+ 2. Fork this repo 3. Clone your fork 4. Find an issue to work on (see [good first issues](https://github.com/celestiaorg/celestia-core/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)) diff --git a/go.mod b/go.mod index ba0f4ba3b6..b4d3ea3436 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/tendermint/tendermint -go 1.22.3 +go 1.22.4 require ( github.com/BurntSushi/toml v1.2.1 diff --git a/scripts/proto-gen.sh b/scripts/proto-gen.sh index 2faada1b19..4cf0656326 100755 --- a/scripts/proto-gen.sh +++ b/scripts/proto-gen.sh @@ -10,7 +10,7 @@ cd "$(git rev-parse --show-toplevel)" # Run inside Docker to install the correct versions of the required tools # without polluting the local system. -docker run --rm -i -v "$PWD":/w --workdir=/w golang:1.22.3-alpine sh <<"EOF" +docker run --rm -i -v "$PWD":/w --workdir=/w golang:1.22.4-alpine sh <<"EOF" apk add git make go install github.com/bufbuild/buf/cmd/buf diff --git a/test/docker/Dockerfile b/test/docker/Dockerfile index 7345f28bcd..364589845a 100644 --- a/test/docker/Dockerfile +++ b/test/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22.3 +FROM golang:1.22.4 # Grab deps (jq, hexdump, xxd, killall) RUN apt-get update && \ diff --git a/test/e2e/docker/Dockerfile b/test/e2e/docker/Dockerfile index 091b704f9c..41d0fc4937 100644 --- a/test/e2e/docker/Dockerfile +++ b/test/e2e/docker/Dockerfile @@ -1,7 +1,7 @@ # We need to build in a Linux environment to support C libraries, e.g. RocksDB. # We use Debian instead of Alpine, so that we can use binary database packages # instead of spending time compiling them. -FROM golang:1.22.3-bullseye +FROM golang:1.22.4-bullseye 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 cc8842f43b69734d0d3478b9c0222536bf04f71d Mon Sep 17 00:00:00 2001 From: Rootul P Date: Mon, 17 Jun 2024 08:10:23 -0600 Subject: [PATCH 22/24] chore: remove outdated TODO (#1392) Closes https://github.com/celestiaorg/celestia-core/issues/1391 --- state/execution.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/state/execution.go b/state/execution.go index fc5a929af9..e5df352fb5 100644 --- a/state/execution.go +++ b/state/execution.go @@ -104,15 +104,8 @@ func (blockExec *BlockExecutor) CreateProposalBlock( evidence, evSize := blockExec.evpool.PendingEvidence(state.ConsensusParams.Evidence.MaxBytes) - // Fetch a limited amount of valid txs maxDataBytes := types.MaxDataBytes(maxBytes, evSize, state.Validators.Size()) - // TODO(ismail): reaping the mempool has to happen in relation to a max - // allowed square size instead of (only) Gas / bytes - // maybe the mempool actually should track things separately - // meaning that CheckTx should already do the mapping: - // Tx -> Txs, Message - // https://github.com/tendermint/tendermint/issues/77 txs := blockExec.mempool.ReapMaxBytesMaxGas(maxDataBytes, maxGas) var timestamp time.Time From 056df6caddb696d732d6513dc87c5dba529398d8 Mon Sep 17 00:00:00 2001 From: Rootul P Date: Tue, 18 Jun 2024 11:43:48 -0600 Subject: [PATCH 23/24] chore: improve request prepare proposal comments (#1393) Closes https://github.com/celestiaorg/celestia-core/issues/1390 --- abci/types/types.pb.go | 8 ++++---- proto/tendermint/abci/types.proto | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 1aac7257a8..c4af564c5e 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -1270,11 +1270,11 @@ func (m *RequestApplySnapshotChunk) GetSender() string { } type RequestPrepareProposal struct { - // block_data is an array of transactions that will be included in a block, - // sent to the app for possible modifications. - // applications can not exceed the size of the data passed to it. + // BlockData is a slice of candidate transactions that may be included in a + // block. BlockData is sent to the application so that the application can + // filter and re-arrange the slice of candidate transactions. BlockData *types1.Data `protobuf:"bytes,1,opt,name=block_data,json=blockData,proto3" json:"block_data,omitempty"` - // If an application decides to populate block_data with extra information, they can not exceed this value. + // BlockDataSize is the maximum size (in bytes) that BlockData should be. BlockDataSize int64 `protobuf:"varint,2,opt,name=block_data_size,json=blockDataSize,proto3" json:"block_data_size,omitempty"` // chain_id is a unique identifier for the blockchain network this proposal // belongs to (e.g. mocha-1). diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto index 12fd717e8d..deb439745d 100644 --- a/proto/tendermint/abci/types.proto +++ b/proto/tendermint/abci/types.proto @@ -127,11 +127,11 @@ message RequestApplySnapshotChunk { } message RequestPrepareProposal { - // block_data is an array of transactions that will be included in a block, - // sent to the app for possible modifications. - // applications can not exceed the size of the data passed to it. + // BlockData is a slice of candidate transactions that may be included in a + // block. BlockData is sent to the application so that the application can + // filter and re-arrange the slice of candidate transactions. tendermint.types.Data block_data = 1; - // If an application decides to populate block_data with extra information, they can not exceed this value. + // BlockDataSize is the maximum size (in bytes) that BlockData should be. int64 block_data_size = 2; // chain_id is a unique identifier for the blockchain network this proposal // belongs to (e.g. mocha-1). From 2e81d616cea6647118ac2a529384f04d1c7e735b Mon Sep 17 00:00:00 2001 From: Sanaz Taheri <35961250+staheri14@users.noreply.github.com> Date: Fri, 21 Jun 2024 13:56:20 -0700 Subject: [PATCH 24/24] Adds logs for the state of the trace pull server (#1401) As part of migrating to Knuu for the celestia-app e2e tests, I debugged the tracing feature which required adding log messages to verify that the tracer pull server is up and running. This PR includes those log messages, which previously lived in a custom branch and were not available to everyone. --- pkg/trace/fileserver.go | 1 + pkg/trace/local_tracer.go | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/trace/fileserver.go b/pkg/trace/fileserver.go index a5d510ee8f..21747d5902 100644 --- a/pkg/trace/fileserver.go +++ b/pkg/trace/fileserver.go @@ -97,6 +97,7 @@ func (lt *LocalTracer) servePullData() { if err != nil { lt.logger.Error("trace pull server failure", "err", err) } + lt.logger.Info("trace pull server started", "address", lt.cfg.Instrumentation.TracePullAddress) } // GetTable downloads a table from the server and saves it to the given directory. It uses a multipart diff --git a/pkg/trace/local_tracer.go b/pkg/trace/local_tracer.go index ad9807cbd4..0d48515eda 100644 --- a/pkg/trace/local_tracer.go +++ b/pkg/trace/local_tracer.go @@ -96,6 +96,7 @@ func NewLocalTracer(cfg *config.Config, logger log.Logger, chainID, nodeID strin go lt.drainCanal() if cfg.Instrumentation.TracePullAddress != "" { + logger.Info("starting pull server", "address", cfg.Instrumentation.TracePullAddress) go lt.servePullData() }