From ae63edb1fb8609aa84522c89fc953f1fae7df7c8 Mon Sep 17 00:00:00 2001 From: Hieu Vu <72878483+hieuvubk@users.noreply.github.com> Date: Wed, 15 Nov 2023 02:01:04 +0700 Subject: [PATCH] cosmossdk.io/log --- baseapp/baseapp.go | 2 +- baseapp/baseapp_test.go | 2 +- baseapp/block_gas_test.go | 2 +- baseapp/grpcrouter_test.go | 2 +- baseapp/msg_service_router_test.go | 2 +- baseapp/utils_test.go | 2 +- client/grpc_query_test.go | 2 +- client/pruning/main.go | 2 +- runtime/builder.go | 2 +- server/api/server.go | 2 +- server/log/cmt_logger.go | 2 +- server/mock/app.go | 4 +- server/mock/helpers.go | 2 +- server/start.go | 1 - server/types/app.go | 2 +- server/util.go | 2 +- simapp/app.go | 2 +- simapp/app_test.go | 2 +- simapp/app_v2.go | 2 +- simapp/sim_test.go | 2 +- simapp/simd/cmd/root.go | 2 +- simapp/simd/cmd/testnet_test.go | 2 +- simapp/test_helpers.go | 2 +- snapshots/manager.go | 2 +- store/cachekv/benchmark_test.go | 4 +- store/pruning/manager.go | 39 +++++++++++++++++- store/pruning/manager_test.go | 2 +- store/rootmulti/proof_test.go | 2 +- store/rootmulti/snapshot_test.go | 2 +- store/rootmulti/store.go | 40 ++++++------------- store/rootmulti/store_test.go | 2 +- store/store.go | 2 +- store/streaming/constructor.go | 2 +- store/streaming/constructor_test.go | 2 +- store/streaming/file/service.go | 2 +- store/streaming/file/service_test.go | 2 +- store/types/utils_test.go | 2 +- tests/e2e/server/export_test.go | 2 +- tests/integration/gov/module_test.go | 2 +- .../store/rootmulti/rollback_test.go | 2 +- testutil/context.go | 2 +- .../mock/tendermint_tendermint_libs_log_DB.go | 2 +- testutil/network/network.go | 2 +- testutil/sims/app_helpers.go | 2 +- testutil/sims/simulation_helpers.go | 2 +- tools/rosetta/lib/internal/service/online.go | 2 +- tools/rosetta/lib/server/server.go | 4 +- types/context.go | 2 +- types/mempool/mempool_test.go | 2 +- types/mempool/priority_nonce_test.go | 2 +- types/mempool/sender_nonce_property_test.go | 2 +- types/mempool/sender_nonce_test.go | 2 +- types/module/module_test.go | 2 +- types/utils.go | 2 +- x/auth/keeper/keeper.go | 2 +- x/auth/migrations/legacytx/stdtx_test.go | 2 +- x/authz/keeper/genesis_test.go | 2 +- x/authz/keeper/keeper.go | 2 +- x/authz/keeper/keeper_test.go | 2 +- x/authz/module/abci_test.go | 2 +- x/bank/keeper/view.go | 2 +- x/bank/migrations/v2/store.go | 2 +- x/bank/migrations/v3/store.go | 2 +- x/capability/keeper/keeper.go | 2 +- x/crisis/keeper/keeper.go | 2 +- x/distribution/keeper/keeper.go | 2 +- x/evidence/keeper/keeper.go | 2 +- x/feegrant/keeper/keeper.go | 2 +- x/genutil/client/cli/genaccount_test.go | 2 +- x/genutil/client/cli/init_test.go | 2 +- x/genutil/client/testutil/helpers.go | 2 +- x/gov/keeper/keeper.go | 2 +- x/group/keeper/genesis_test.go | 2 +- x/group/keeper/grpc_query_test.go | 2 +- x/group/keeper/invariants_test.go | 2 +- x/group/keeper/keeper.go | 2 +- x/group/keeper/keeper_test.go | 2 +- x/mint/keeper/keeper.go | 2 +- x/params/keeper/keeper.go | 2 +- x/params/types/subspace_test.go | 2 +- x/slashing/keeper/keeper.go | 2 +- x/staking/keeper/keeper.go | 2 +- x/upgrade/abci_test.go | 2 +- x/upgrade/keeper/keeper.go | 2 +- x/upgrade/keeper/keeper_test.go | 2 +- x/upgrade/types/plan_test.go | 2 +- x/upgrade/types/storeloader_test.go | 4 +- 87 files changed, 138 insertions(+), 118 deletions(-) diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index e399c55ab01c..24f1087a66ac 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -6,9 +6,9 @@ import ( "sort" "strings" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/crypto/tmhash" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/gogoproto/proto" diff --git a/baseapp/baseapp_test.go b/baseapp/baseapp_test.go index 86df1a4d0072..3e80c44e25e5 100644 --- a/baseapp/baseapp_test.go +++ b/baseapp/baseapp_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" diff --git a/baseapp/block_gas_test.go b/baseapp/block_gas_test.go index 7af1bbf37307..71b269536bb6 100644 --- a/baseapp/block_gas_test.go +++ b/baseapp/block_gas_test.go @@ -6,9 +6,9 @@ import ( "math" "testing" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" tmjson "github.com/cometbft/cometbft/libs/json" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" diff --git a/baseapp/grpcrouter_test.go b/baseapp/grpcrouter_test.go index 860e7bbe75c1..476241ff45d4 100644 --- a/baseapp/grpcrouter_test.go +++ b/baseapp/grpcrouter_test.go @@ -6,7 +6,7 @@ import ( "sync" "testing" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" diff --git a/baseapp/msg_service_router_test.go b/baseapp/msg_service_router_test.go index b3c262f13a54..3d866c7ae8d6 100644 --- a/baseapp/msg_service_router_test.go +++ b/baseapp/msg_service_router_test.go @@ -4,8 +4,8 @@ import ( "os" "testing" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" diff --git a/baseapp/utils_test.go b/baseapp/utils_test.go index beec38d95616..eb6e82665b6c 100644 --- a/baseapp/utils_test.go +++ b/baseapp/utils_test.go @@ -25,7 +25,7 @@ import ( txconfigv1 "cosmossdk.io/api/cosmos/tx/config/v1" "cosmossdk.io/core/appconfig" "cosmossdk.io/depinject" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" tmtypes "github.com/cometbft/cometbft/types" dbm "github.com/cosmos/cosmos-db" diff --git a/client/grpc_query_test.go b/client/grpc_query_test.go index ba89bbf99242..5e7533d7c80f 100644 --- a/client/grpc_query_test.go +++ b/client/grpc_query_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" tmjson "github.com/cometbft/cometbft/libs/json" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/suite" diff --git a/client/pruning/main.go b/client/pruning/main.go index 396fab124d7e..0145588dafd7 100644 --- a/client/pruning/main.go +++ b/client/pruning/main.go @@ -8,7 +8,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" diff --git a/runtime/builder.go b/runtime/builder.go index e214dbeed54c..a720a608e1c9 100644 --- a/runtime/builder.go +++ b/runtime/builder.go @@ -4,7 +4,7 @@ import ( "encoding/json" "io" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" diff --git a/server/api/server.go b/server/api/server.go index 917554857b31..18d18327d798 100644 --- a/server/api/server.go +++ b/server/api/server.go @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" tmrpcserver "github.com/cometbft/cometbft/rpc/jsonrpc/server" gateway "github.com/cosmos/gogogateway" "github.com/gorilla/handlers" diff --git a/server/log/cmt_logger.go b/server/log/cmt_logger.go index 82d7a783f3ef..11901685e2f6 100644 --- a/server/log/cmt_logger.go +++ b/server/log/cmt_logger.go @@ -2,7 +2,7 @@ package server import ( "cosmossdk.io/log" - cmtlog "github.com/cometbft/cometbft/libs/log" + cmtlog "cosmossdk.io/log" ) var _ cmtlog.Logger = (*CometLoggerWrapper)(nil) diff --git a/server/mock/app.go b/server/mock/app.go index 8c7e81d96a39..4afede53c7e0 100644 --- a/server/mock/app.go +++ b/server/mock/app.go @@ -7,10 +7,10 @@ import ( "fmt" "path/filepath" - db "github.com/cometbft/cometbft-db" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" "github.com/cometbft/cometbft/types" + db "github.com/cosmos/cosmos-db" "google.golang.org/grpc" bam "github.com/cosmos/cosmos-sdk/baseapp" diff --git a/server/mock/helpers.go b/server/mock/helpers.go index b367e6d18ac4..d991a1603c02 100644 --- a/server/mock/helpers.go +++ b/server/mock/helpers.go @@ -5,8 +5,8 @@ import ( "os" "testing" + tmlog "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - tmlog "github.com/cometbft/cometbft/libs/log" ) // SetupApp returns an application as well as a clean-up function to be used to diff --git a/server/start.go b/server/start.go index 061b736cf6a5..30f0b14cdd4a 100644 --- a/server/start.go +++ b/server/start.go @@ -59,7 +59,6 @@ const ( FlagMinRetainBlocks = "min-retain-blocks" FlagIAVLCacheSize = "iavl-cache-size" FlagDisableIAVLFastNode = "iavl-disable-fastnode" - FlagIAVLLazyLoading = "iavl-lazy-loading" // state sync-related flags FlagStateSyncSnapshotInterval = "state-sync.snapshot-interval" diff --git a/server/types/app.go b/server/types/app.go index e13244f58e0a..31458a737e72 100644 --- a/server/types/app.go +++ b/server/types/app.go @@ -5,8 +5,8 @@ import ( "io" "time" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" tmtypes "github.com/cometbft/cometbft/types" dbm "github.com/cosmos/cosmos-db" diff --git a/server/util.go b/server/util.go index fbb7aafe11bc..566cf3c160fa 100644 --- a/server/util.go +++ b/server/util.go @@ -21,9 +21,9 @@ import ( "github.com/spf13/viper" "cosmossdk.io/log" + tmlog "cosmossdk.io/log" tmcmd "github.com/cometbft/cometbft/cmd/cometbft/commands" tmcfg "github.com/cometbft/cometbft/config" - tmlog "github.com/cometbft/cometbft/libs/log" tmtypes "github.com/cometbft/cometbft/types" dbm "github.com/cosmos/cosmos-db" diff --git a/simapp/app.go b/simapp/app.go index d8dd5577b746..d12c8b8532a4 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -10,8 +10,8 @@ import ( autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" dbm "github.com/cosmos/cosmos-db" "github.com/spf13/cast" diff --git a/simapp/app_test.go b/simapp/app_test.go index c3e4018ebdda..09ca1c1b7bb8 100644 --- a/simapp/app_test.go +++ b/simapp/app_test.go @@ -6,8 +6,8 @@ import ( "os" "testing" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/golang/mock/gomock" diff --git a/simapp/app_v2.go b/simapp/app_v2.go index 301e8300b04d..4ef9fb07eded 100644 --- a/simapp/app_v2.go +++ b/simapp/app_v2.go @@ -8,7 +8,7 @@ import ( "os" "path/filepath" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" dbm "github.com/cosmos/cosmos-db" "cosmossdk.io/depinject" diff --git a/simapp/sim_test.go b/simapp/sim_test.go index 1c3435d7b053..ffe90a4295d7 100644 --- a/simapp/sim_test.go +++ b/simapp/sim_test.go @@ -9,8 +9,8 @@ import ( "strings" "testing" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" diff --git a/simapp/simd/cmd/root.go b/simapp/simd/cmd/root.go index 8a2c6c1e7dd6..857a91536059 100644 --- a/simapp/simd/cmd/root.go +++ b/simapp/simd/cmd/root.go @@ -7,8 +7,8 @@ import ( rosettaCmd "cosmossdk.io/tools/rosetta/cmd" + "cosmossdk.io/log" tmcfg "github.com/cometbft/cometbft/config" - "github.com/cometbft/cometbft/libs/log" dbm "github.com/cosmos/cosmos-db" "github.com/spf13/cobra" "github.com/spf13/viper" diff --git a/simapp/simd/cmd/testnet_test.go b/simapp/simd/cmd/testnet_test.go index 12df0b23ca7f..11e08847afd5 100644 --- a/simapp/simd/cmd/testnet_test.go +++ b/simapp/simd/cmd/testnet_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/spf13/viper" "github.com/stretchr/testify/require" diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index 2cd87d044089..06ef6897490e 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -6,9 +6,9 @@ import ( "os" "testing" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" tmjson "github.com/cometbft/cometbft/libs/json" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" tmtypes "github.com/cometbft/cometbft/types" dbm "github.com/cosmos/cosmos-db" diff --git a/snapshots/manager.go b/snapshots/manager.go index ca57eab91429..838e3ca330dc 100644 --- a/snapshots/manager.go +++ b/snapshots/manager.go @@ -11,7 +11,7 @@ import ( "sort" "sync" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/snapshots/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" diff --git a/store/cachekv/benchmark_test.go b/store/cachekv/benchmark_test.go index 876e73111981..f31bc1e54f15 100644 --- a/store/cachekv/benchmark_test.go +++ b/store/cachekv/benchmark_test.go @@ -4,9 +4,9 @@ import ( fmt "fmt" "testing" - dbm "github.com/cosmos/cosmos-db" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/store" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/store/pruning/manager.go b/store/pruning/manager.go index 95420be16130..1c08567b092d 100644 --- a/store/pruning/manager.go +++ b/store/pruning/manager.go @@ -6,7 +6,7 @@ import ( "fmt" "sync" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/store/pruning/types" @@ -212,6 +212,43 @@ func (m *Manager) LoadPruningHeights(db dbm.DB) error { return nil } +// GetPruningHeight returns the height which can prune upto if it is able to prune at the given height. +func (m *Manager) GetPruningHeight(height int64) int64 { + if m.opts.GetPruningStrategy() == types.PruningNothing { + return 0 + } + if m.opts.Interval <= 0 { + return 0 + } + + if height%int64(m.opts.Interval) != 0 || height <= int64(m.opts.KeepRecent) { + return 0 + } + + // Consider the snapshot height + pruneHeight := height - 1 - int64(m.opts.KeepRecent) // we should keep the current height at least + + m.pruneSnapshotHeightsMx.RLock() + defer m.pruneSnapshotHeightsMx.RUnlock() + + // snapshotInterval is zero, indicating that all heights can be pruned + if m.snapshotInterval <= 0 { + return pruneHeight + } + + if len(m.pruneSnapshotHeights) == 0 { // the length should be greater than zero + return 0 + } + + // the snapshot `m.pruneSnapshotHeights[0]` is already operated, + // so we can prune upto `m.pruneSnapshotHeights[0] + int64(m.snapshotInterval) - 1` + snHeight := m.pruneSnapshotHeights[0] + int64(m.snapshotInterval) - 1 + if snHeight < pruneHeight { + return snHeight + } + return pruneHeight +} + func loadPruningHeights(db dbm.DB) ([]int64, error) { bz, err := db.Get(pruneHeightsKey) if err != nil { diff --git a/store/pruning/manager_test.go b/store/pruning/manager_test.go index 9a8b77d813cc..e6910b2e4b50 100644 --- a/store/pruning/manager_test.go +++ b/store/pruning/manager_test.go @@ -6,7 +6,7 @@ import ( "fmt" "testing" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" db "github.com/cosmos/cosmos-db" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" diff --git a/store/rootmulti/proof_test.go b/store/rootmulti/proof_test.go index 647a4c485910..1871763e7e50 100644 --- a/store/rootmulti/proof_test.go +++ b/store/rootmulti/proof_test.go @@ -3,8 +3,8 @@ package rootmulti import ( "testing" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" diff --git a/store/rootmulti/snapshot_test.go b/store/rootmulti/snapshot_test.go index 58927547e05b..7899ed1085fd 100644 --- a/store/rootmulti/snapshot_test.go +++ b/store/rootmulti/snapshot_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/snapshots" snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" diff --git a/store/rootmulti/store.go b/store/rootmulti/store.go index e91d9907cc07..09c891e3d6ed 100644 --- a/store/rootmulti/store.go +++ b/store/rootmulti/store.go @@ -8,8 +8,8 @@ import ( "strings" "sync" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" protoio "github.com/cosmos/gogoproto/io" @@ -588,38 +588,22 @@ func (rs *Store) GetKVStore(key types.StoreKey) types.KVStore { } func (rs *Store) handlePruning(version int64) error { - rs.pruningManager.HandleHeight(version - 1) // we should never prune the current version. - if !rs.pruningManager.ShouldPruneAtHeight(version) { - return nil - } - rs.logger.Info("prune start", "height", version) - defer rs.logger.Info("prune end", "height", version) - return rs.PruneStores(true, nil) + pruneHeight := rs.pruningManager.GetPruningHeight(version) + rs.logger.Debug("prune start", "height", version) + defer rs.logger.Debug("prune end", "height", version) + return rs.PruneStores(pruneHeight) } // PruneStores prunes the specific heights of the multi store. // If clearPruningManager is true, the pruning manager will return the pruning heights, // and they are appended to the pruningHeights to be pruned. -func (rs *Store) PruneStores(clearPruningManager bool, pruningHeights []int64) (err error) { - if clearPruningManager { - heights, err := rs.pruningManager.GetFlushAndResetPruningHeights() - if err != nil { - return err - } - - if len(heights) == 0 { - rs.logger.Debug("no heights to be pruned from pruning manager") - } - - pruningHeights = append(pruningHeights, heights...) - } - - if len(pruningHeights) == 0 { - rs.logger.Debug("no heights need to be pruned") +func (rs *Store) PruneStores(pruningHeight int64) (err error) { + if pruningHeight <= 0 { + rs.logger.Debug("pruning skipped, height is less than or equal to 0") return nil } - rs.logger.Debug("pruning store", "heights", pruningHeights) + rs.logger.Debug("pruning store", "heights", pruningHeight) for key, store := range rs.stores { rs.logger.Debug("pruning store", "key", key) // Also log store.name (a private variable)? @@ -632,7 +616,7 @@ func (rs *Store) PruneStores(clearPruningManager bool, pruningHeights []int64) ( store = rs.GetCommitKVStore(key) - err := store.(*iavl.Store).DeleteVersions(pruningHeights...) + err := store.(*iavl.Store).DeleteVersionsTo(pruningHeight) if err == nil { continue } @@ -944,9 +928,9 @@ func (rs *Store) loadCommitStoreFromParams(key types.StoreKey, id types.CommitID var err error if params.initialVersion == 0 { - store, err = iavl.LoadStore(db, rs.logger, key, id, rs.lazyLoading, rs.iavlCacheSize, rs.iavlDisableFastNode) + store, err = iavl.LoadStore(db, rs.logger, key, id, rs.iavlCacheSize, rs.iavlDisableFastNode) } else { - store, err = iavl.LoadStoreWithInitialVersion(db, rs.logger, key, id, rs.lazyLoading, params.initialVersion, rs.iavlCacheSize, rs.iavlDisableFastNode) + store, err = iavl.LoadStoreWithInitialVersion(db, rs.logger, key, id, params.initialVersion, rs.iavlCacheSize, rs.iavlDisableFastNode) } if err != nil { diff --git a/store/rootmulti/store_test.go b/store/rootmulti/store_test.go index df565e21cc7d..f0c5b62850b5 100644 --- a/store/rootmulti/store_test.go +++ b/store/rootmulti/store_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" diff --git a/store/store.go b/store/store.go index 80239fd6aa08..8fd4fba188fb 100644 --- a/store/store.go +++ b/store/store.go @@ -1,7 +1,7 @@ package store import ( - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/store/cache" diff --git a/store/streaming/constructor.go b/store/streaming/constructor.go index b1b822bfa8fa..9912f8f83a65 100644 --- a/store/streaming/constructor.go +++ b/store/streaming/constructor.go @@ -7,7 +7,7 @@ import ( "strings" "sync" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/spf13/cast" "github.com/cosmos/cosmos-sdk/baseapp" diff --git a/store/streaming/constructor_test.go b/store/streaming/constructor_test.go index d3635c6a54b2..d5bb0717b0a0 100644 --- a/store/streaming/constructor_test.go +++ b/store/streaming/constructor_test.go @@ -3,7 +3,7 @@ package streaming_test import ( "testing" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" diff --git a/store/streaming/file/service.go b/store/streaming/file/service.go index 46bfada8121b..c1ae65990384 100644 --- a/store/streaming/file/service.go +++ b/store/streaming/file/service.go @@ -10,8 +10,8 @@ import ( "sort" "sync" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" diff --git a/store/streaming/file/service_test.go b/store/streaming/file/service_test.go index 8aa6f7550b65..de482e742ad9 100644 --- a/store/streaming/file/service_test.go +++ b/store/streaming/file/service_test.go @@ -9,8 +9,8 @@ import ( "sync" "testing" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/require" diff --git a/store/types/utils_test.go b/store/types/utils_test.go index f266cbf5580e..c32233138c10 100644 --- a/store/types/utils_test.go +++ b/store/types/utils_test.go @@ -4,7 +4,7 @@ import ( "bytes" "testing" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" diff --git a/tests/e2e/server/export_test.go b/tests/e2e/server/export_test.go index 7e39506e48da..8d5f90bcf463 100644 --- a/tests/e2e/server/export_test.go +++ b/tests/e2e/server/export_test.go @@ -15,9 +15,9 @@ import ( "github.com/spf13/cobra" "github.com/stretchr/testify/require" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" tmjson "github.com/cometbft/cometbft/libs/json" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" tmtypes "github.com/cometbft/cometbft/types" dbm "github.com/cosmos/cosmos-db" diff --git a/tests/integration/gov/module_test.go b/tests/integration/gov/module_test.go index d0885b769a4a..35011def9ea8 100644 --- a/tests/integration/gov/module_test.go +++ b/tests/integration/gov/module_test.go @@ -3,9 +3,9 @@ package gov_test import ( "testing" + "cosmossdk.io/log" abcitypes "github.com/cometbft/cometbft/abci/types" tmjson "github.com/cometbft/cometbft/libs/json" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" diff --git a/tests/integration/store/rootmulti/rollback_test.go b/tests/integration/store/rootmulti/rollback_test.go index 800e688e76ea..18e1f2120b1f 100644 --- a/tests/integration/store/rootmulti/rollback_test.go +++ b/tests/integration/store/rootmulti/rollback_test.go @@ -4,9 +4,9 @@ import ( "fmt" "testing" + "cosmossdk.io/log" "cosmossdk.io/simapp" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" diff --git a/testutil/context.go b/testutil/context.go index 746dbcadfea1..8e9133957d3b 100644 --- a/testutil/context.go +++ b/testutil/context.go @@ -3,7 +3,7 @@ package testutil import ( "testing" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/assert" diff --git a/testutil/mock/tendermint_tendermint_libs_log_DB.go b/testutil/mock/tendermint_tendermint_libs_log_DB.go index 437e11332a7c..c194214f7e31 100644 --- a/testutil/mock/tendermint_tendermint_libs_log_DB.go +++ b/testutil/mock/tendermint_tendermint_libs_log_DB.go @@ -7,7 +7,7 @@ package mock import ( reflect "reflect" - log "github.com/cometbft/cometbft/libs/log" + log "cosmossdk.io/log" gomock "github.com/golang/mock/gomock" ) diff --git a/testutil/network/network.go b/testutil/network/network.go index edbc91e339f1..156f6db3877f 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" "google.golang.org/grpc" + tmlog "cosmossdk.io/log" "cosmossdk.io/math" - tmlog "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/testutil/configurator" "github.com/cosmos/cosmos-sdk/testutil/testdata" diff --git a/testutil/sims/app_helpers.go b/testutil/sims/app_helpers.go index c59c2951b9b3..86f56ba2db9d 100644 --- a/testutil/sims/app_helpers.go +++ b/testutil/sims/app_helpers.go @@ -5,9 +5,9 @@ import ( "fmt" "time" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" tmjson "github.com/cometbft/cometbft/libs/json" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" tmtypes "github.com/cometbft/cometbft/types" dbm "github.com/cosmos/cosmos-db" diff --git a/testutil/sims/simulation_helpers.go b/testutil/sims/simulation_helpers.go index 754e2f77a9af..6857df297fad 100644 --- a/testutil/sims/simulation_helpers.go +++ b/testutil/sims/simulation_helpers.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/runtime" diff --git a/tools/rosetta/lib/internal/service/online.go b/tools/rosetta/lib/internal/service/online.go index 1a0c9dfcda2a..54da5b92e63b 100644 --- a/tools/rosetta/lib/internal/service/online.go +++ b/tools/rosetta/lib/internal/service/online.go @@ -8,9 +8,9 @@ import ( "github.com/coinbase/rosetta-sdk-go/types" + "cosmossdk.io/log" crgerrs "cosmossdk.io/tools/rosetta/lib/errors" crgtypes "cosmossdk.io/tools/rosetta/lib/types" - "github.com/cometbft/cometbft/libs/log" ) // genesisBlockFetchTimeout defines a timeout to fetch the genesis block diff --git a/tools/rosetta/lib/server/server.go b/tools/rosetta/lib/server/server.go index 0b48b8ef0675..f6bed1a1aa61 100644 --- a/tools/rosetta/lib/server/server.go +++ b/tools/rosetta/lib/server/server.go @@ -6,13 +6,13 @@ import ( "os" "time" + "github.com/coinbase/rosetta-sdk-go/types" assert "github.com/cosmos/rosetta-sdk-go/asserter" "github.com/cosmos/rosetta-sdk-go/server" - "github.com/coinbase/rosetta-sdk-go/types" + "cosmossdk.io/log" "cosmossdk.io/tools/rosetta/lib/internal/service" crgtypes "cosmossdk.io/tools/rosetta/lib/types" - "github.com/cometbft/cometbft/libs/log" ) const ( diff --git a/types/context.go b/types/context.go index 0942c05fc7a5..58c68198c10f 100644 --- a/types/context.go +++ b/types/context.go @@ -4,9 +4,9 @@ import ( "context" "time" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" tmbytes "github.com/cometbft/cometbft/libs/bytes" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/gogoproto/proto" diff --git a/types/mempool/mempool_test.go b/types/mempool/mempool_test.go index ce48399b646d..2c959bff5b05 100644 --- a/types/mempool/mempool_test.go +++ b/types/mempool/mempool_test.go @@ -5,7 +5,7 @@ import ( "math/rand" "testing" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" diff --git a/types/mempool/priority_nonce_test.go b/types/mempool/priority_nonce_test.go index 88910c36c0b1..80579cd708bd 100644 --- a/types/mempool/priority_nonce_test.go +++ b/types/mempool/priority_nonce_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/require" diff --git a/types/mempool/sender_nonce_property_test.go b/types/mempool/sender_nonce_property_test.go index 6930e6aa1a96..ef55c13a0ff6 100644 --- a/types/mempool/sender_nonce_property_test.go +++ b/types/mempool/sender_nonce_property_test.go @@ -5,7 +5,7 @@ import ( "pgregory.net/rapid" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/types/mempool/sender_nonce_test.go b/types/mempool/sender_nonce_test.go index 42f13be622aa..7889316066a5 100644 --- a/types/mempool/sender_nonce_test.go +++ b/types/mempool/sender_nonce_test.go @@ -5,7 +5,7 @@ import ( "math/rand" "testing" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/require" diff --git a/types/module/module_test.go b/types/module/module_test.go index 56bfbe7dd798..0530c6163d93 100644 --- a/types/module/module_test.go +++ b/types/module/module_test.go @@ -5,8 +5,8 @@ import ( "errors" "testing" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/golang/mock/gomock" "github.com/spf13/cobra" diff --git a/types/utils.go b/types/utils.go index ecdca99d5702..c3a1c76c182a 100644 --- a/types/utils.go +++ b/types/utils.go @@ -6,7 +6,7 @@ import ( "fmt" "time" - log "github.com/cometbft/cometbft/libs/log" + log "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/types/kv" ) diff --git a/x/auth/keeper/keeper.go b/x/auth/keeper/keeper.go index e8c2639a4b5b..853d41e58645 100644 --- a/x/auth/keeper/keeper.go +++ b/x/auth/keeper/keeper.go @@ -3,7 +3,7 @@ package keeper import ( "fmt" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" gogotypes "github.com/cosmos/gogoproto/types" "github.com/cosmos/cosmos-sdk/codec" diff --git a/x/auth/migrations/legacytx/stdtx_test.go b/x/auth/migrations/legacytx/stdtx_test.go index 65fcebb3c812..582aca0d5268 100644 --- a/x/auth/migrations/legacytx/stdtx_test.go +++ b/x/auth/migrations/legacytx/stdtx_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/require" diff --git a/x/authz/keeper/genesis_test.go b/x/authz/keeper/genesis_test.go index b4a052a7c817..39d3e2b6c85a 100644 --- a/x/authz/keeper/genesis_test.go +++ b/x/authz/keeper/genesis_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/suite" diff --git a/x/authz/keeper/keeper.go b/x/authz/keeper/keeper.go index 788b87418e23..8406cc3c14bf 100644 --- a/x/authz/keeper/keeper.go +++ b/x/authz/keeper/keeper.go @@ -5,8 +5,8 @@ import ( "strconv" "time" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/gogoproto/proto" "github.com/cosmos/cosmos-sdk/baseapp" diff --git a/x/authz/keeper/keeper_test.go b/x/authz/keeper/keeper_test.go index c9d3189ca055..67975d9ceab0 100644 --- a/x/authz/keeper/keeper_test.go +++ b/x/authz/keeper/keeper_test.go @@ -9,7 +9,7 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/testutil" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" diff --git a/x/authz/module/abci_test.go b/x/authz/module/abci_test.go index ceede24a059b..3cc3f39d4027 100644 --- a/x/authz/module/abci_test.go +++ b/x/authz/module/abci_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/testutil" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" diff --git a/x/bank/keeper/view.go b/x/bank/keeper/view.go index bb0242612efc..7be21247c424 100644 --- a/x/bank/keeper/view.go +++ b/x/bank/keeper/view.go @@ -3,8 +3,8 @@ package keeper import ( "fmt" + "cosmossdk.io/log" "cosmossdk.io/math" - "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" diff --git a/x/bank/migrations/v2/store.go b/x/bank/migrations/v2/store.go index b541408d7493..7a568e7e2632 100644 --- a/x/bank/migrations/v2/store.go +++ b/x/bank/migrations/v2/store.go @@ -1,8 +1,8 @@ package v2 import ( + "cosmossdk.io/log" "cosmossdk.io/math" - "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" storetypes "github.com/cosmos/cosmos-sdk/store/types" diff --git a/x/bank/migrations/v3/store.go b/x/bank/migrations/v3/store.go index e67ba689235d..5fe0bdeda954 100644 --- a/x/bank/migrations/v3/store.go +++ b/x/bank/migrations/v3/store.go @@ -1,7 +1,7 @@ package v3 import ( - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" storetypes "github.com/cosmos/cosmos-sdk/store/types" diff --git a/x/capability/keeper/keeper.go b/x/capability/keeper/keeper.go index 1fa6d0305118..1559e505f602 100644 --- a/x/capability/keeper/keeper.go +++ b/x/capability/keeper/keeper.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" diff --git a/x/crisis/keeper/keeper.go b/x/crisis/keeper/keeper.go index 88028ed9d125..f29e420ae993 100644 --- a/x/crisis/keeper/keeper.go +++ b/x/crisis/keeper/keeper.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" diff --git a/x/distribution/keeper/keeper.go b/x/distribution/keeper/keeper.go index 807dea8a49d7..197a61f75be9 100644 --- a/x/distribution/keeper/keeper.go +++ b/x/distribution/keeper/keeper.go @@ -3,7 +3,7 @@ package keeper import ( "fmt" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" diff --git a/x/evidence/keeper/keeper.go b/x/evidence/keeper/keeper.go index ad3eb5944fdc..2fcc93c25268 100644 --- a/x/evidence/keeper/keeper.go +++ b/x/evidence/keeper/keeper.go @@ -3,8 +3,8 @@ package keeper import ( "fmt" + "cosmossdk.io/log" tmbytes "github.com/cometbft/cometbft/libs/bytes" - "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" diff --git a/x/feegrant/keeper/keeper.go b/x/feegrant/keeper/keeper.go index bb36f9c7964f..b34980f9a601 100644 --- a/x/feegrant/keeper/keeper.go +++ b/x/feegrant/keeper/keeper.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" storetypes "github.com/cosmos/cosmos-sdk/store/types" diff --git a/x/genutil/client/cli/genaccount_test.go b/x/genutil/client/cli/genaccount_test.go index 1b73ff72e4f5..82657593c1c2 100644 --- a/x/genutil/client/cli/genaccount_test.go +++ b/x/genutil/client/cli/genaccount_test.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/spf13/viper" "github.com/stretchr/testify/require" diff --git a/x/genutil/client/cli/init_test.go b/x/genutil/client/cli/init_test.go index 47e0e94ec404..ba08ac4f235a 100644 --- a/x/genutil/client/cli/init_test.go +++ b/x/genutil/client/cli/init_test.go @@ -9,9 +9,9 @@ import ( "testing" "time" + "cosmossdk.io/log" abci_server "github.com/cometbft/cometbft/abci/server" "github.com/cometbft/cometbft/libs/cli" - "github.com/cometbft/cometbft/libs/log" tmtypes "github.com/cometbft/cometbft/types" "github.com/spf13/viper" "github.com/stretchr/testify/require" diff --git a/x/genutil/client/testutil/helpers.go b/x/genutil/client/testutil/helpers.go index d809ec3eff69..af399b9c013e 100644 --- a/x/genutil/client/testutil/helpers.go +++ b/x/genutil/client/testutil/helpers.go @@ -4,9 +4,9 @@ import ( "context" "fmt" + "cosmossdk.io/log" tmcfg "github.com/cometbft/cometbft/config" "github.com/cometbft/cometbft/libs/cli" - "github.com/cometbft/cometbft/libs/log" "github.com/spf13/viper" "github.com/cosmos/cosmos-sdk/client" diff --git a/x/gov/keeper/keeper.go b/x/gov/keeper/keeper.go index ecd8c3dea3ab..fd384b7d7054 100644 --- a/x/gov/keeper/keeper.go +++ b/x/gov/keeper/keeper.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" diff --git a/x/group/keeper/genesis_test.go b/x/group/keeper/genesis_test.go index d5768471173e..39195e56a2b5 100644 --- a/x/group/keeper/genesis_test.go +++ b/x/group/keeper/genesis_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" diff --git a/x/group/keeper/grpc_query_test.go b/x/group/keeper/grpc_query_test.go index 74316bb0657b..bc96d3172a6f 100644 --- a/x/group/keeper/grpc_query_test.go +++ b/x/group/keeper/grpc_query_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" diff --git a/x/group/keeper/invariants_test.go b/x/group/keeper/invariants_test.go index 16c224d54d76..5fdfc8490d4e 100644 --- a/x/group/keeper/invariants_test.go +++ b/x/group/keeper/invariants_test.go @@ -3,7 +3,7 @@ package keeper_test import ( "testing" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/stretchr/testify/suite" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" diff --git a/x/group/keeper/keeper.go b/x/group/keeper/keeper.go index 1cce70e3eb25..1719ec977f10 100644 --- a/x/group/keeper/keeper.go +++ b/x/group/keeper/keeper.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" diff --git a/x/group/keeper/keeper_test.go b/x/group/keeper/keeper_test.go index 1e3b09e0c144..62c7596c9ad2 100644 --- a/x/group/keeper/keeper_test.go +++ b/x/group/keeper/keeper_test.go @@ -10,8 +10,8 @@ import ( "testing" "time" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmtime "github.com/cometbft/cometbft/types/time" "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" diff --git a/x/mint/keeper/keeper.go b/x/mint/keeper/keeper.go index 693dbd1da4b8..1c9ec04cf4b5 100644 --- a/x/mint/keeper/keeper.go +++ b/x/mint/keeper/keeper.go @@ -3,8 +3,8 @@ package keeper import ( "fmt" + "cosmossdk.io/log" "cosmossdk.io/math" - "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" diff --git a/x/params/keeper/keeper.go b/x/params/keeper/keeper.go index 70f16505f720..dc9c564c2752 100644 --- a/x/params/keeper/keeper.go +++ b/x/params/keeper/keeper.go @@ -1,7 +1,7 @@ package keeper import ( - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/params/types/subspace_test.go b/x/params/types/subspace_test.go index 3c8ff77b6a77..733ff5a02cdd 100644 --- a/x/params/types/subspace_test.go +++ b/x/params/types/subspace_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/suite" diff --git a/x/slashing/keeper/keeper.go b/x/slashing/keeper/keeper.go index 5535dd2436c9..b5ec3cbc58d0 100644 --- a/x/slashing/keeper/keeper.go +++ b/x/slashing/keeper/keeper.go @@ -3,7 +3,7 @@ package keeper import ( "fmt" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/cosmos-sdk/codec" diff --git a/x/staking/keeper/keeper.go b/x/staking/keeper/keeper.go index d261ce3fc866..e81a9b484387 100644 --- a/x/staking/keeper/keeper.go +++ b/x/staking/keeper/keeper.go @@ -3,8 +3,8 @@ package keeper import ( "fmt" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" "cosmossdk.io/math" diff --git a/x/upgrade/abci_test.go b/x/upgrade/abci_test.go index 03125e7671a0..cae52a5078fd 100644 --- a/x/upgrade/abci_test.go +++ b/x/upgrade/abci_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/upgrade/keeper/keeper.go b/x/upgrade/keeper/keeper.go index 3f9929a7277b..fa614e9bdda3 100644 --- a/x/upgrade/keeper/keeper.go +++ b/x/upgrade/keeper/keeper.go @@ -9,7 +9,7 @@ import ( "path/filepath" "sort" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" diff --git a/x/upgrade/keeper/keeper_test.go b/x/upgrade/keeper/keeper_test.go index 84dfdee0e85a..bca1a69f6c9e 100644 --- a/x/upgrade/keeper/keeper_test.go +++ b/x/upgrade/keeper/keeper_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/suite" diff --git a/x/upgrade/types/plan_test.go b/x/upgrade/types/plan_test.go index 2cb9b9ffdc8f..e2bf1f31d2fd 100644 --- a/x/upgrade/types/plan_test.go +++ b/x/upgrade/types/plan_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/x/upgrade/types/storeloader_test.go b/x/upgrade/types/storeloader_test.go index 39ddae790744..c17eaea2f88a 100644 --- a/x/upgrade/types/storeloader_test.go +++ b/x/upgrade/types/storeloader_test.go @@ -6,9 +6,9 @@ import ( "path/filepath" "testing" + "cosmossdk.io/log" + tmlog "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" - tmlog "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require"