Skip to content

Commit

Permalink
build(deps): replace tm-db with cometbft-db
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Nov 4, 2024
1 parent 5583e05 commit 0fe6b56
Show file tree
Hide file tree
Showing 65 changed files with 109 additions and 121 deletions.
2 changes: 1 addition & 1 deletion STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Sometimes it's necessary to rename libraries to avoid naming collisions or ambig
* Use [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports)
* Separate imports into blocks - one for the standard lib, one for external libs and one for application libs.
* Here are some common library labels for consistency:
* dbm "github.com/tendermint/tm-db"
* dbm "github.com/cometbft/cometbft-db"
* tmcmd "github.com/tendermint/tendermint/cmd/tendermint/commands"
* tmcfg "github.com/tendermint/tendermint/config/tendermint"
* tmtypes "github.com/tendermint/tendermint/types"
Expand Down
2 changes: 1 addition & 1 deletion abci/example/kvstore/kvstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (

sync "github.com/sasha-s/go-deadlock"

dbm "github.com/cometbft/cometbft-db"
"github.com/dashpay/dashd-go/btcjson"
"github.com/gogo/protobuf/proto"
dbm "github.com/tendermint/tm-db"

"github.com/dashpay/tenderdash/abci/example/code"
abci "github.com/dashpay/tenderdash/abci/types"
Expand Down
2 changes: 1 addition & 1 deletion abci/example/kvstore/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"io"
"net/url"

dbm "github.com/tendermint/tm-db"
dbm "github.com/cometbft/cometbft-db"

"github.com/dashpay/tenderdash/abci/types"
"github.com/dashpay/tenderdash/crypto"
Expand Down
2 changes: 1 addition & 1 deletion abci/example/kvstore/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"bytes"
"testing"

dbm "github.com/cometbft/cometbft-db"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
dbm "github.com/tendermint/tm-db"

"github.com/dashpay/tenderdash/crypto"
tmbytes "github.com/dashpay/tenderdash/libs/bytes"
Expand Down
2 changes: 1 addition & 1 deletion abci/example/kvstore/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"io"
"os"

dbm "github.com/tendermint/tm-db"
dbm "github.com/cometbft/cometbft-db"
)

// StoreFactory is a factory that offers a reader to read data from, or writer to write data to it.
Expand Down
2 changes: 1 addition & 1 deletion cmd/tenderdash/commands/light.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"syscall"
"time"

dbm "github.com/cometbft/cometbft-db"
"github.com/spf13/cobra"
dbm "github.com/tendermint/tm-db"

"github.com/dashpay/tenderdash/config"
dashcore "github.com/dashpay/tenderdash/dash/core"
Expand Down
2 changes: 1 addition & 1 deletion cmd/tenderdash/commands/reindex_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"path/filepath"
"strings"

dbm "github.com/cometbft/cometbft-db"
"github.com/spf13/cobra"
dbm "github.com/tendermint/tm-db"

abcitypes "github.com/dashpay/tenderdash/abci/types"
tmcfg "github.com/dashpay/tenderdash/config"
Expand Down
2 changes: 1 addition & 1 deletion cmd/tenderdash/commands/reindex_event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"errors"
"testing"

dbm "github.com/cometbft/cometbft-db"
"github.com/spf13/cobra"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
dbm "github.com/tendermint/tm-db"

abcitypes "github.com/dashpay/tenderdash/abci/types"
"github.com/dashpay/tenderdash/config"
Expand Down
2 changes: 1 addition & 1 deletion config/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package config
import (
"context"

dbm "github.com/tendermint/tm-db"
dbm "github.com/cometbft/cometbft-db"

"github.com/dashpay/tenderdash/libs/log"
"github.com/dashpay/tenderdash/libs/service"
Expand Down
2 changes: 1 addition & 1 deletion dash/quorum/validator_conn_executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"testing"
"time"

dbm "github.com/cometbft/cometbft-db"
"github.com/stretchr/testify/assert"
testifymock "github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
dbm "github.com/tendermint/tm-db"

abciclient "github.com/dashpay/tenderdash/abci/client"
abci "github.com/dashpay/tenderdash/abci/types"
Expand Down
5 changes: 2 additions & 3 deletions docs/rfc/rfc-012-custom-indexing.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ something like this (subject to refinement):
- [KV transaction indexer][kv-index]
- [Pluggable custom event indexing][i7135] (#7135)
- [PostgreSQL event sink][psql]
- [PostgreSQL database][postgres]
- [PostgreSQL database][postgres]
- [Query filter language][query]
- [Stream events to postgres for indexing][i1161] (#1161)
- [Unbuffered event subscription slow down the consensus][i7247] (#7247)
Expand All @@ -346,7 +346,6 @@ something like this (subject to refinement):
[kv-index]: https://github.com/tendermint/tendermint/blob/master/internal/state/indexer/tx/kv
[postgres]: https://postgresql.org/
[psql]: https://github.com/tendermint/tendermint/blob/master/internal/state/indexer/sink/psql
[psql]: https://github.com/tendermint/tendermint/blob/master/internal/state/indexer/sink/psql
[query]: https://pkg.go.dev/github.com/tendermint/tendermint/internal/pubsub/query/syntax
[sdk]: https://github.com/cosmos/cosmos-sdk
[tmdb]: https://pkg.go.dev/github.com/tendermint/tm-db#DB
[tmdb]: https://pkg.go.dev/github.com/cometbft/cometbft-db#DB
20 changes: 4 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ require (
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
github.com/tendermint/tm-db v0.6.7
golang.org/x/crypto v0.28.0
golang.org/x/net v0.30.0
golang.org/x/sync v0.8.0
Expand Down Expand Up @@ -68,7 +67,6 @@ require (
github.com/Abirdcfly/dupword v0.1.1 // indirect
github.com/Antonboom/testifylint v1.4.3 // indirect
github.com/Crocmagnon/fatcontext v0.5.2 // indirect
github.com/DataDog/zstd v1.4.5 // indirect
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 // indirect
github.com/Masterminds/semver/v3 v3.3.0 // indirect
github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect
Expand All @@ -86,20 +84,16 @@ require (
github.com/butuzov/mirror v1.2.0 // indirect
github.com/catenacyber/perfsprint v0.7.1 // indirect
github.com/ccojocar/zxcvbn-go v1.0.2 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/chigopher/pathlib v0.19.1 // indirect
github.com/ckaznocha/intrange v0.2.0 // indirect
github.com/cockroachdb/errors v1.11.3 // indirect
github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/pebble v1.1.2 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cometbft/cometbft v0.37.11 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
github.com/curioswitch/go-reassign v0.2.0 // indirect
github.com/dashpay/dashd-go/btcutil v1.2.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
github.com/dgraph-io/badger/v4 v4.3.1 // indirect
github.com/dgraph-io/badger/v2 v2.2007.4 // indirect
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
github.com/didip/tollbooth/v6 v6.0.1 // indirect
github.com/didip/tollbooth_chi v0.0.0-20200524181329-8b84cd7183d9 // indirect
github.com/distribution/reference v0.6.0 // indirect
Expand All @@ -109,7 +103,6 @@ require (
github.com/docker/docker-credential-helpers v0.8.2 // indirect
github.com/felixge/fgprof v0.9.4 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/getsentry/sentry-go v0.27.0 // indirect
github.com/ghostiam/protogetter v0.3.6 // indirect
github.com/go-chi/chi/v5 v5.1.0 // indirect
github.com/go-chi/render v1.0.1 // indirect
Expand All @@ -119,11 +112,9 @@ require (
github.com/go-pkgz/rest v1.5.0 // indirect
github.com/go-viper/mapstructure/v2 v2.1.0 // indirect
github.com/gofrs/uuid/v5 v5.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golangci/modinfo v0.3.4 // indirect
github.com/golangci/plugin-module-register v0.1.1 // indirect
github.com/google/cel-go v0.20.1 // indirect
github.com/google/flatbuffers v24.3.25+incompatible // indirect
github.com/google/go-containerregistry v0.20.1 // indirect
github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
Expand All @@ -134,8 +125,6 @@ require (
github.com/jjti/go-spancheck v0.6.2 // indirect
github.com/karamaru-alpha/copyloopvar v1.1.0 // indirect
github.com/kkHAIKE/contextcheck v1.1.5 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lasiar/canonicalheader v1.1.1 // indirect
github.com/linxGnu/grocksdb v1.9.3 // indirect
github.com/macabu/inamedparam v0.1.3 // indirect
Expand All @@ -149,7 +138,6 @@ require (
github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect
github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
Expand All @@ -163,7 +151,6 @@ require (
github.com/ykadowak/zerologlint v0.1.5 // indirect
go-simpler.org/musttag v0.12.2 // indirect
go-simpler.org/sloglint v0.7.2 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect
go.opentelemetry.io/otel v1.29.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1 // indirect
Expand Down Expand Up @@ -332,6 +319,7 @@ require (
)

require (
github.com/cometbft/cometbft-db v0.9.5
github.com/creachadair/tomledit v0.0.23
github.com/jonboulle/clockwork v0.3.0
github.com/oasisprotocol/oasis-core/go v0.2403.0
Expand Down
Loading

0 comments on commit 0fe6b56

Please sign in to comment.