From 28fa3b8dfcb3208d3b1cfbae08eda519e4cc1560 Mon Sep 17 00:00:00 2001 From: Marko Date: Tue, 11 Jun 2024 10:46:04 +0200 Subject: [PATCH] chore: use comet api pkg instead of comet alias (#20614) --- baseapp/abci.go | 6 ++-- baseapp/abci_test.go | 2 +- baseapp/abci_utils.go | 2 +- baseapp/abci_utils_test.go | 2 +- baseapp/baseapp.go | 2 +- baseapp/baseapp_test.go | 2 +- baseapp/grpcrouter.go | 2 +- baseapp/grpcrouter_helpers.go | 2 +- baseapp/msg_service_router.go | 2 +- baseapp/msg_service_router_test.go | 2 +- baseapp/oe/optimistic_execution.go | 2 +- baseapp/oe/optimistic_execution_test.go | 2 +- baseapp/snapshot_test.go | 2 +- baseapp/streaming_test.go | 2 +- client/grpc/cmtservice/service.go | 2 +- client/grpc/cmtservice/types.go | 2 +- client/grpc_query.go | 2 +- client/query.go | 2 +- client/rpc/rpc_test.go | 2 +- core/context/context.go | 2 -- docs/learn/advanced/03-node.md | 2 +- orm/encoding/ormfield/duration.go | 12 +++---- orm/encoding/ormfield/timestamp.go | 12 +++---- runtime/app.go | 2 +- runtime/types.go | 2 +- server/cmt_abci.go | 29 ++++++++--------- server/mock/app.go | 2 +- server/mock/app_test.go | 2 +- server/types/abci.go | 2 +- server/v2/cometbft/abci.go | 31 ++++++++++--------- .../client/grpc/cmtservice/service.go | 2 +- .../cometbft/client/grpc/cmtservice/types.go | 2 +- server/v2/cometbft/handlers/defaults.go | 2 +- server/v2/cometbft/handlers/handlers.go | 2 +- server/v2/cometbft/query.go | 2 +- server/v2/cometbft/snapshots.go | 2 +- server/v2/cometbft/types/peer.go | 2 +- server/v2/cometbft/types/vote.go | 2 +- server/v2/cometbft/utils.go | 2 +- simapp/abci.go | 2 +- simapp/app.go | 2 +- simapp/app_test.go | 2 +- simapp/sim_test.go | 2 +- simapp/test_helpers.go | 2 +- store/internal/maps/maps.go | 10 +++--- store/snapshots/types/convert.go | 2 +- store/streaming/abci/examples/file/file.go | 2 +- .../streaming/abci/examples/stdout/stdout.go | 2 +- store/streaming/abci/grpc.go | 2 +- store/streaming/streaming_test.go | 2 +- store/types/streaming.go | 2 +- tests/e2e/auth/suite.go | 2 +- tests/e2e/baseapp/block_gas_test.go | 2 +- tests/e2e/genutil/export_test.go | 2 +- .../integration/auth/client/cli/suite_test.go | 2 +- tests/integration/bank/app_test.go | 2 +- tests/integration/bank/bench_test.go | 2 +- tests/integration/distribution/cli_tx_test.go | 2 +- .../evidence/keeper/infraction_test.go | 2 +- tests/integration/gov/genesis_test.go | 2 +- .../staking/keeper/vote_extensions_test.go | 2 +- .../staking/simulation/operations_test.go | 2 +- .../store/rootmulti/rollback_test.go | 2 +- tests/sims/slashing/operations_test.go | 2 +- testutil/cli/cmt_mocks.go | 2 +- testutil/integration/router.go | 2 +- testutil/sims/app_helpers.go | 2 +- testutil/sims/tx_helpers.go | 2 +- types/abci.go | 2 +- types/context.go | 2 +- types/context_test.go | 2 +- types/errors/abci.go | 2 +- types/events.go | 2 +- types/events_test.go | 2 +- types/module/module.go | 2 +- types/module/module_test.go | 2 +- types/result_test.go | 2 +- x/auth/ante/testutil_test.go | 2 +- x/auth/go.mod | 2 +- x/authz/client/cli/tx_test.go | 2 +- x/authz/go.mod | 2 +- x/feegrant/client/cli/tx_test.go | 2 +- x/feegrant/go.mod | 2 +- x/group/client/cli/tx_test.go | 2 +- x/group/go.mod | 2 +- x/group/keeper/msg_server_test.go | 2 +- 86 files changed, 130 insertions(+), 130 deletions(-) diff --git a/baseapp/abci.go b/baseapp/abci.go index dea6a59814c0..30e47214b3dc 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -8,7 +8,8 @@ import ( "strings" "time" - abci "github.com/cometbft/cometbft/abci/types" + abcitypes "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" "github.com/cosmos/gogoproto/proto" "google.golang.org/grpc/codes" @@ -116,8 +117,7 @@ func (app *BaseApp) InitChain(req *abci.InitChainRequest) (*abci.InitChainRespon ) } - sort.Sort(abci.ValidatorUpdates(req.Validators)) - sort.Sort(abci.ValidatorUpdates(res.Validators)) + sort.Sort(abcitypes.ValidatorUpdates(req.Validators)) for i := range res.Validators { if !proto.Equal(&res.Validators[i], &req.Validators[i]) { diff --git a/baseapp/abci_test.go b/baseapp/abci_test.go index 321a9037a71e..7e08aabfba05 100644 --- a/baseapp/abci_test.go +++ b/baseapp/abci_test.go @@ -14,7 +14,7 @@ import ( "testing" "time" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtprotocrypto "github.com/cometbft/cometbft/api/cometbft/crypto/v1" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" "github.com/cometbft/cometbft/crypto/secp256k1" diff --git a/baseapp/abci_utils.go b/baseapp/abci_utils.go index 7c9aac3202a1..3372bf9e39d8 100644 --- a/baseapp/abci_utils.go +++ b/baseapp/abci_utils.go @@ -7,7 +7,7 @@ import ( "fmt" "slices" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" cryptoenc "github.com/cometbft/cometbft/crypto/encoding" cmttypes "github.com/cometbft/cometbft/types" diff --git a/baseapp/abci_utils_test.go b/baseapp/abci_utils_test.go index 7f23e924a32b..25d4c4073c89 100644 --- a/baseapp/abci_utils_test.go +++ b/baseapp/abci_utils_test.go @@ -5,7 +5,7 @@ import ( "sort" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtprotocrypto "github.com/cometbft/cometbft/api/cometbft/crypto/v1" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" cmtsecp256k1 "github.com/cometbft/cometbft/crypto/secp256k1" diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index 164c215d9545..31011bcccba5 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -9,7 +9,7 @@ import ( "strconv" "sync" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" "github.com/cometbft/cometbft/crypto/tmhash" dbm "github.com/cosmos/cosmos-db" diff --git a/baseapp/baseapp_test.go b/baseapp/baseapp_test.go index 7afefa4d8456..95e4df2b2538 100644 --- a/baseapp/baseapp_test.go +++ b/baseapp/baseapp_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" diff --git a/baseapp/grpcrouter.go b/baseapp/grpcrouter.go index fa766462f2ef..d555560955b4 100644 --- a/baseapp/grpcrouter.go +++ b/baseapp/grpcrouter.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" gogogrpc "github.com/cosmos/gogoproto/grpc" "google.golang.org/grpc" "google.golang.org/grpc/encoding" diff --git a/baseapp/grpcrouter_helpers.go b/baseapp/grpcrouter_helpers.go index 74f5eff9122a..e629be06cb63 100644 --- a/baseapp/grpcrouter_helpers.go +++ b/baseapp/grpcrouter_helpers.go @@ -4,7 +4,7 @@ import ( gocontext "context" "fmt" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" gogogrpc "github.com/cosmos/gogoproto/grpc" "google.golang.org/grpc" diff --git a/baseapp/msg_service_router.go b/baseapp/msg_service_router.go index f4f8d86f22f0..867809152f57 100644 --- a/baseapp/msg_service_router.go +++ b/baseapp/msg_service_router.go @@ -5,7 +5,7 @@ import ( "fmt" "reflect" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" gogogrpc "github.com/cosmos/gogoproto/grpc" "github.com/cosmos/gogoproto/proto" "google.golang.org/grpc" diff --git a/baseapp/msg_service_router_test.go b/baseapp/msg_service_router_test.go index 2074eb72af3f..85b233c71d97 100644 --- a/baseapp/msg_service_router_test.go +++ b/baseapp/msg_service_router_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" diff --git a/baseapp/oe/optimistic_execution.go b/baseapp/oe/optimistic_execution.go index 3fe6f9dbf949..e5820aa0022e 100644 --- a/baseapp/oe/optimistic_execution.go +++ b/baseapp/oe/optimistic_execution.go @@ -8,7 +8,7 @@ import ( "sync" "time" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "cosmossdk.io/core/log" ) diff --git a/baseapp/oe/optimistic_execution_test.go b/baseapp/oe/optimistic_execution_test.go index e24041b61ea2..726e971e4d84 100644 --- a/baseapp/oe/optimistic_execution_test.go +++ b/baseapp/oe/optimistic_execution_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/stretchr/testify/assert" "cosmossdk.io/core/log" diff --git a/baseapp/snapshot_test.go b/baseapp/snapshot_test.go index 7c7792e85559..e6e6f1e5bd7d 100644 --- a/baseapp/snapshot_test.go +++ b/baseapp/snapshot_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/stretchr/testify/require" pruningtypes "cosmossdk.io/store/pruning/types" diff --git a/baseapp/streaming_test.go b/baseapp/streaming_test.go index 9c8a41a38135..6276b9988c9d 100644 --- a/baseapp/streaming_test.go +++ b/baseapp/streaming_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" tmproto "github.com/cometbft/cometbft/api/cometbft/types/v1" "github.com/stretchr/testify/require" diff --git a/client/grpc/cmtservice/service.go b/client/grpc/cmtservice/service.go index 55a89b4b30d7..ad307984c0e5 100644 --- a/client/grpc/cmtservice/service.go +++ b/client/grpc/cmtservice/service.go @@ -3,7 +3,7 @@ package cmtservice import ( "context" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" gogogrpc "github.com/cosmos/gogoproto/grpc" "github.com/grpc-ecosystem/grpc-gateway/runtime" "google.golang.org/grpc/codes" diff --git a/client/grpc/cmtservice/types.go b/client/grpc/cmtservice/types.go index b49a1e62b1bb..a4aef0287848 100644 --- a/client/grpc/cmtservice/types.go +++ b/client/grpc/cmtservice/types.go @@ -1,7 +1,7 @@ package cmtservice import ( - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" ) // ToABCIRequestQuery converts a gRPC ABCIQueryRequest type to an ABCI diff --git a/client/grpc_query.go b/client/grpc_query.go index fc3a5325c6f2..45f60e48d2de 100644 --- a/client/grpc_query.go +++ b/client/grpc_query.go @@ -6,7 +6,7 @@ import ( "reflect" "strconv" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" gogogrpc "github.com/cosmos/gogoproto/grpc" "google.golang.org/grpc" "google.golang.org/grpc/encoding" diff --git a/client/query.go b/client/query.go index a90f80e79fa4..35cb3f0f7e78 100644 --- a/client/query.go +++ b/client/query.go @@ -6,7 +6,7 @@ import ( "fmt" "strings" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" rpcclient "github.com/cometbft/cometbft/rpc/client" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/client/rpc/rpc_test.go b/client/rpc/rpc_test.go index 47da209af499..0c360b837a9a 100644 --- a/client/rpc/rpc_test.go +++ b/client/rpc/rpc_test.go @@ -5,7 +5,7 @@ import ( "strconv" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/stretchr/testify/suite" "google.golang.org/grpc" "google.golang.org/grpc/metadata" diff --git a/core/context/context.go b/core/context/context.go index b330cb48b22f..6803bd7eb44b 100644 --- a/core/context/context.go +++ b/core/context/context.go @@ -1,7 +1,5 @@ package context -type contextKey uint8 - type ( execModeKey struct{} cometInfoKey struct{} diff --git a/docs/learn/advanced/03-node.md b/docs/learn/advanced/03-node.md index b4a4236a0e0d..e1330e503644 100644 --- a/docs/learn/advanced/03-node.md +++ b/docs/learn/advanced/03-node.md @@ -81,7 +81,7 @@ Then, the instance of `app` is used to instantiate a new CometBFT node: https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/server/start.go#L341-L378 ``` -The CometBFT node can be created with `app` because the latter satisfies the [`abci.Application` interface](https://pkg.go.dev/github.com/cometbft/cometbft/abci/types#Application) (given that `app` extends [`baseapp`](./00-baseapp.md)). As part of the `node.New` method, CometBFT makes sure that the height of the application (i.e. number of blocks since genesis) is equal to the height of the CometBFT node. The difference between these two heights should always be negative or null. If it is strictly negative, `node.New` will replay blocks until the height of the application reaches the height of the CometBFT node. Finally, if the height of the application is `0`, the CometBFT node will call [`InitChain`](./00-baseapp.md#initchain) on the application to initialize the state from the genesis file. +The CometBFT node can be created with `app` because the latter satisfies the [`abci.Application` interface](https://pkg.go.dev/github.com/cometbft/cometbft/api/cometbft/abci/v1#Application) (given that `app` extends [`baseapp`](./00-baseapp.md)). As part of the `node.New` method, CometBFT makes sure that the height of the application (i.e. number of blocks since genesis) is equal to the height of the CometBFT node. The difference between these two heights should always be negative or null. If it is strictly negative, `node.New` will replay blocks until the height of the application reaches the height of the CometBFT node. Finally, if the height of the application is `0`, the CometBFT node will call [`InitChain`](./00-baseapp.md#initchain) on the application to initialize the state from the genesis file. Once the CometBFT node is instantiated and in sync with the application, the node can be started: diff --git a/orm/encoding/ormfield/duration.go b/orm/encoding/ormfield/duration.go index 572b6e21e612..7d7f25b5c7e6 100644 --- a/orm/encoding/ormfield/duration.go +++ b/orm/encoding/ormfield/duration.go @@ -16,12 +16,12 @@ const ( // DurationCodec encodes google.protobuf.Duration values with the following // encoding: -// - nil is encoded as []byte{0xFF} -// - seconds (which can range from -315,576,000,000 to +315,576,000,000) is encoded as 5 fixed bytes -// - nanos (which can range from 0 to 999,999,999 or -999,999,999 to 0 if seconds is negative) are encoded such -// that 999,999,999 is always added to nanos. This ensures that the encoded nanos are always >= 0. Additionally, -// by adding 999,999,999 to both positive and negative nanos, we guarantee that the lexicographical order is -// preserved when comparing the encoded values of two Durations: +// - nil is encoded as []byte{0xFF} +// - seconds (which can range from -315,576,000,000 to +315,576,000,000) is encoded as 5 fixed bytes +// - nanos (which can range from 0 to 999,999,999 or -999,999,999 to 0 if seconds is negative) are encoded such +// that 999,999,999 is always added to nanos. This ensures that the encoded nanos are always >= 0. Additionally, +// by adding 999,999,999 to both positive and negative nanos, we guarantee that the lexicographical order is +// preserved when comparing the encoded values of two Durations: // - []byte{0xBB, 0x9A, 0xC9, 0xFF} for zero nanos // - 4 fixed bytes with the bit mask 0x80 applied to the first byte, with negative nanos scaled so that -999,999,999 // is encoded as 0 and -1 is encoded as 999,999,998 diff --git a/orm/encoding/ormfield/timestamp.go b/orm/encoding/ormfield/timestamp.go index 4788f390848a..d643a1c1d026 100644 --- a/orm/encoding/ormfield/timestamp.go +++ b/orm/encoding/ormfield/timestamp.go @@ -9,12 +9,12 @@ import ( // TimestampCodec encodes google.protobuf.Timestamp values with the following // encoding: -// - nil is encoded as []byte{0xFF} -// - seconds (which can range from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z) is encoded as 5 fixed bytes -// - nanos (which can range from 0 to 999,999,999 or -999,999,999 to 0 if seconds is negative) are encoded such -// that 999,999,999 is always added to nanos. This ensures that the encoded nanos are always >= 0. Additionally, -// by adding 999,999,999 to both positive and negative nanos, we guarantee that the lexicographical order is -// preserved when comparing the encoded values of two Timestamps. +// - nil is encoded as []byte{0xFF} +// - seconds (which can range from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z) is encoded as 5 fixed bytes +// - nanos (which can range from 0 to 999,999,999 or -999,999,999 to 0 if seconds is negative) are encoded such +// that 999,999,999 is always added to nanos. This ensures that the encoded nanos are always >= 0. Additionally, +// by adding 999,999,999 to both positive and negative nanos, we guarantee that the lexicographical order is +// preserved when comparing the encoded values of two Timestamps. // // When iterating over timestamp indexes, nil values will always be ordered last. // diff --git a/runtime/app.go b/runtime/app.go index 283727d4bf5e..80bc28340898 100644 --- a/runtime/app.go +++ b/runtime/app.go @@ -5,7 +5,7 @@ import ( "fmt" "slices" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" diff --git a/runtime/types.go b/runtime/types.go index 9ade401eb6b1..50c8884716a7 100644 --- a/runtime/types.go +++ b/runtime/types.go @@ -1,7 +1,7 @@ package runtime import ( - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/server/cmt_abci.go b/server/cmt_abci.go index 865523233d1b..2e2ca9f0a8ca 100644 --- a/server/cmt_abci.go +++ b/server/cmt_abci.go @@ -4,6 +4,7 @@ import ( "context" abci "github.com/cometbft/cometbft/abci/types" + abciproto "github.com/cometbft/cometbft/api/cometbft/abci/v1" servertypes "github.com/cosmos/cosmos-sdk/server/types" ) @@ -16,58 +17,58 @@ func NewCometABCIWrapper(app servertypes.ABCI) abci.Application { return cometABCIWrapper{app: app} } -func (w cometABCIWrapper) Info(_ context.Context, req *abci.InfoRequest) (*abci.InfoResponse, error) { +func (w cometABCIWrapper) Info(_ context.Context, req *abciproto.InfoRequest) (*abciproto.InfoResponse, error) { return w.app.Info(req) } -func (w cometABCIWrapper) Query(ctx context.Context, req *abci.QueryRequest) (*abci.QueryResponse, error) { +func (w cometABCIWrapper) Query(ctx context.Context, req *abciproto.QueryRequest) (*abciproto.QueryResponse, error) { return w.app.Query(ctx, req) } -func (w cometABCIWrapper) CheckTx(_ context.Context, req *abci.CheckTxRequest) (*abci.CheckTxResponse, error) { +func (w cometABCIWrapper) CheckTx(_ context.Context, req *abciproto.CheckTxRequest) (*abciproto.CheckTxResponse, error) { return w.app.CheckTx(req) } -func (w cometABCIWrapper) InitChain(_ context.Context, req *abci.InitChainRequest) (*abci.InitChainResponse, error) { +func (w cometABCIWrapper) InitChain(_ context.Context, req *abciproto.InitChainRequest) (*abciproto.InitChainResponse, error) { return w.app.InitChain(req) } -func (w cometABCIWrapper) PrepareProposal(_ context.Context, req *abci.PrepareProposalRequest) (*abci.PrepareProposalResponse, error) { +func (w cometABCIWrapper) PrepareProposal(_ context.Context, req *abciproto.PrepareProposalRequest) (*abciproto.PrepareProposalResponse, error) { return w.app.PrepareProposal(req) } -func (w cometABCIWrapper) ProcessProposal(_ context.Context, req *abci.ProcessProposalRequest) (*abci.ProcessProposalResponse, error) { +func (w cometABCIWrapper) ProcessProposal(_ context.Context, req *abciproto.ProcessProposalRequest) (*abciproto.ProcessProposalResponse, error) { return w.app.ProcessProposal(req) } -func (w cometABCIWrapper) FinalizeBlock(_ context.Context, req *abci.FinalizeBlockRequest) (*abci.FinalizeBlockResponse, error) { +func (w cometABCIWrapper) FinalizeBlock(_ context.Context, req *abciproto.FinalizeBlockRequest) (*abciproto.FinalizeBlockResponse, error) { return w.app.FinalizeBlock(req) } -func (w cometABCIWrapper) ExtendVote(ctx context.Context, req *abci.ExtendVoteRequest) (*abci.ExtendVoteResponse, error) { +func (w cometABCIWrapper) ExtendVote(ctx context.Context, req *abciproto.ExtendVoteRequest) (*abciproto.ExtendVoteResponse, error) { return w.app.ExtendVote(ctx, req) } -func (w cometABCIWrapper) VerifyVoteExtension(_ context.Context, req *abci.VerifyVoteExtensionRequest) (*abci.VerifyVoteExtensionResponse, error) { +func (w cometABCIWrapper) VerifyVoteExtension(_ context.Context, req *abciproto.VerifyVoteExtensionRequest) (*abciproto.VerifyVoteExtensionResponse, error) { return w.app.VerifyVoteExtension(req) } -func (w cometABCIWrapper) Commit(_ context.Context, _ *abci.CommitRequest) (*abci.CommitResponse, error) { +func (w cometABCIWrapper) Commit(_ context.Context, _ *abciproto.CommitRequest) (*abciproto.CommitResponse, error) { return w.app.Commit() } -func (w cometABCIWrapper) ListSnapshots(_ context.Context, req *abci.ListSnapshotsRequest) (*abci.ListSnapshotsResponse, error) { +func (w cometABCIWrapper) ListSnapshots(_ context.Context, req *abciproto.ListSnapshotsRequest) (*abciproto.ListSnapshotsResponse, error) { return w.app.ListSnapshots(req) } -func (w cometABCIWrapper) OfferSnapshot(_ context.Context, req *abci.OfferSnapshotRequest) (*abci.OfferSnapshotResponse, error) { +func (w cometABCIWrapper) OfferSnapshot(_ context.Context, req *abciproto.OfferSnapshotRequest) (*abciproto.OfferSnapshotResponse, error) { return w.app.OfferSnapshot(req) } -func (w cometABCIWrapper) LoadSnapshotChunk(_ context.Context, req *abci.LoadSnapshotChunkRequest) (*abci.LoadSnapshotChunkResponse, error) { +func (w cometABCIWrapper) LoadSnapshotChunk(_ context.Context, req *abciproto.LoadSnapshotChunkRequest) (*abciproto.LoadSnapshotChunkResponse, error) { return w.app.LoadSnapshotChunk(req) } -func (w cometABCIWrapper) ApplySnapshotChunk(_ context.Context, req *abci.ApplySnapshotChunkRequest) (*abci.ApplySnapshotChunkResponse, error) { +func (w cometABCIWrapper) ApplySnapshotChunk(_ context.Context, req *abciproto.ApplySnapshotChunkRequest) (*abciproto.ApplySnapshotChunkResponse, error) { return w.app.ApplySnapshotChunk(req) } diff --git a/server/mock/app.go b/server/mock/app.go index 2b2cb3960e0e..bff962d88d76 100644 --- a/server/mock/app.go +++ b/server/mock/app.go @@ -7,7 +7,7 @@ import ( "fmt" "path/filepath" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" db "github.com/cosmos/cosmos-db" "google.golang.org/grpc" "google.golang.org/protobuf/proto" diff --git a/server/mock/app_test.go b/server/mock/app_test.go index e24d30a67c2c..c749927c0a8d 100644 --- a/server/mock/app_test.go +++ b/server/mock/app_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/stretchr/testify/require" "cosmossdk.io/log" diff --git a/server/types/abci.go b/server/types/abci.go index 456375eb2aac..33e73a4938bb 100644 --- a/server/types/abci.go +++ b/server/types/abci.go @@ -3,7 +3,7 @@ package types import ( "context" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" ) // ABCI is an interface that enables any finite, deterministic state machine diff --git a/server/v2/cometbft/abci.go b/server/v2/cometbft/abci.go index ad68aaa9f183..a14a793a00ac 100644 --- a/server/v2/cometbft/abci.go +++ b/server/v2/cometbft/abci.go @@ -7,6 +7,7 @@ import ( "sync/atomic" abci "github.com/cometbft/cometbft/abci/types" + abciproto "github.com/cometbft/cometbft/api/cometbft/abci/v1" coreappmgr "cosmossdk.io/core/app" "cosmossdk.io/core/comet" @@ -125,7 +126,7 @@ type BlockData struct { // CheckTx implements types.Application. // It is called by cometbft to verify transaction validity -func (c *Consensus[T]) CheckTx(ctx context.Context, req *abci.CheckTxRequest) (*abci.CheckTxResponse, error) { +func (c *Consensus[T]) CheckTx(ctx context.Context, req *abciproto.CheckTxRequest) (*abciproto.CheckTxResponse, error) { decodedTx, err := c.txCodec.Decode(req.Tx) if err != nil { return nil, err @@ -154,7 +155,7 @@ func (c *Consensus[T]) CheckTx(ctx context.Context, req *abci.CheckTxRequest) (* } // Info implements types.Application. -func (c *Consensus[T]) Info(ctx context.Context, _ *abci.InfoRequest) (*abci.InfoResponse, error) { +func (c *Consensus[T]) Info(ctx context.Context, _ *abciproto.InfoRequest) (*abciproto.InfoResponse, error) { version, _, err := c.store.StateLatest() if err != nil { return nil, err @@ -182,7 +183,7 @@ func (c *Consensus[T]) Info(ctx context.Context, _ *abci.InfoRequest) (*abci.Inf // Query implements types.Application. // It is called by cometbft to query application state. -func (c *Consensus[T]) Query(ctx context.Context, req *abci.QueryRequest) (*abci.QueryResponse, error) { +func (c *Consensus[T]) Query(ctx context.Context, req *abciproto.QueryRequest) (*abciproto.QueryResponse, error) { // follow the query path from here decodedMsg, err := c.txCodec.Decode(req.Data) protoMsg, ok := any(decodedMsg).(transaction.Msg) @@ -208,7 +209,7 @@ func (c *Consensus[T]) Query(ctx context.Context, req *abci.QueryRequest) (*abci return QueryResult(errorsmod.Wrap(cometerrors.ErrUnknownRequest, "no query path provided"), c.cfg.Trace), nil } - var resp *abci.QueryResponse + var resp *abciproto.QueryResponse switch path[0] { case QueryPathApp: @@ -232,7 +233,7 @@ func (c *Consensus[T]) Query(ctx context.Context, req *abci.QueryRequest) (*abci } // InitChain implements types.Application. -func (c *Consensus[T]) InitChain(ctx context.Context, req *abci.InitChainRequest) (*abci.InitChainResponse, error) { +func (c *Consensus[T]) InitChain(ctx context.Context, req *abciproto.InitChainRequest) (*abciproto.InitChainResponse, error) { c.logger.Info("InitChain", "initialHeight", req.InitialHeight, "chainID", req.ChainId) // store chainID to be used later on in execution @@ -304,8 +305,8 @@ func (c *Consensus[T]) InitChain(ctx context.Context, req *abci.InitChainRequest // It is called by cometbft to prepare a proposal block. func (c *Consensus[T]) PrepareProposal( ctx context.Context, - req *abci.PrepareProposalRequest, -) (resp *abci.PrepareProposalResponse, err error) { + req *abciproto.PrepareProposalRequest, +) (resp *abciproto.PrepareProposalResponse, err error) { if req.Height < 1 { return nil, errors.New("PrepareProposal called with invalid height") } @@ -347,8 +348,8 @@ func (c *Consensus[T]) PrepareProposal( // It is called by cometbft to process/verify a proposal block. func (c *Consensus[T]) ProcessProposal( ctx context.Context, - req *abci.ProcessProposalRequest, -) (*abci.ProcessProposalResponse, error) { + req *abciproto.ProcessProposalRequest, +) (*abciproto.ProcessProposalResponse, error) { decodedTxs := make([]T, len(req.Txs)) for _, tx := range req.Txs { decTx, err := c.txCodec.Decode(tx) @@ -384,8 +385,8 @@ func (c *Consensus[T]) ProcessProposal( // It is called by cometbft to finalize a block. func (c *Consensus[T]) FinalizeBlock( ctx context.Context, - req *abci.FinalizeBlockRequest, -) (*abci.FinalizeBlockResponse, error) { + req *abciproto.FinalizeBlockRequest, +) (*abciproto.FinalizeBlockResponse, error) { if err := c.validateFinalizeBlockHeight(req); err != nil { return nil, err } @@ -494,7 +495,7 @@ func (c *Consensus[T]) FinalizeBlock( // Commit implements types.Application. // It is called by cometbft to notify the application that a block was committed. -func (c *Consensus[T]) Commit(ctx context.Context, _ *abci.CommitRequest) (*abci.CommitResponse, error) { +func (c *Consensus[T]) Commit(ctx context.Context, _ *abciproto.CommitRequest) (*abciproto.CommitResponse, error) { lastCommittedBlock := c.lastCommittedBlock.Load() c.snapshotManager.SnapshotIfApplicable(lastCommittedBlock.Height) @@ -513,8 +514,8 @@ func (c *Consensus[T]) Commit(ctx context.Context, _ *abci.CommitRequest) (*abci // VerifyVoteExtension implements types.Application. func (c *Consensus[T]) VerifyVoteExtension( ctx context.Context, - req *abci.VerifyVoteExtensionRequest, -) (*abci.VerifyVoteExtensionResponse, error) { + req *abciproto.VerifyVoteExtensionRequest, +) (*abciproto.VerifyVoteExtensionResponse, error) { // If vote extensions are not enabled, as a safety precaution, we return an // error. cp, err := c.GetConsensusParams(ctx) @@ -548,7 +549,7 @@ func (c *Consensus[T]) VerifyVoteExtension( } // ExtendVote implements types.Application. -func (c *Consensus[T]) ExtendVote(ctx context.Context, req *abci.ExtendVoteRequest) (*abci.ExtendVoteResponse, error) { +func (c *Consensus[T]) ExtendVote(ctx context.Context, req *abciproto.ExtendVoteRequest) (*abciproto.ExtendVoteResponse, error) { // If vote extensions are not enabled, as a safety precaution, we return an // error. cp, err := c.GetConsensusParams(ctx) diff --git a/server/v2/cometbft/client/grpc/cmtservice/service.go b/server/v2/cometbft/client/grpc/cmtservice/service.go index 02555d719574..096889a5a2ae 100644 --- a/server/v2/cometbft/client/grpc/cmtservice/service.go +++ b/server/v2/cometbft/client/grpc/cmtservice/service.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" coretypes "github.com/cometbft/cometbft/rpc/core/types" gogogrpc "github.com/cosmos/gogoproto/grpc" "github.com/grpc-ecosystem/grpc-gateway/runtime" diff --git a/server/v2/cometbft/client/grpc/cmtservice/types.go b/server/v2/cometbft/client/grpc/cmtservice/types.go index a94c0fd8ba8d..6a88fbbe9847 100644 --- a/server/v2/cometbft/client/grpc/cmtservice/types.go +++ b/server/v2/cometbft/client/grpc/cmtservice/types.go @@ -1,7 +1,7 @@ package cmtservice import ( - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" ) // ToABCIRequestQuery converts a gRPC ABCIQueryRequest type to an ABCI diff --git a/server/v2/cometbft/handlers/defaults.go b/server/v2/cometbft/handlers/defaults.go index 8e9795660d19..f7e32f64fa45 100644 --- a/server/v2/cometbft/handlers/defaults.go +++ b/server/v2/cometbft/handlers/defaults.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/cosmos/gogoproto/proto" consensusv1 "cosmossdk.io/api/cosmos/consensus/v1" diff --git a/server/v2/cometbft/handlers/handlers.go b/server/v2/cometbft/handlers/handlers.go index 7780a7cfc602..0354a4a497af 100644 --- a/server/v2/cometbft/handlers/handlers.go +++ b/server/v2/cometbft/handlers/handlers.go @@ -3,7 +3,7 @@ package handlers import ( "context" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/cosmos/gogoproto/proto" "cosmossdk.io/core/store" diff --git a/server/v2/cometbft/query.go b/server/v2/cometbft/query.go index 1f9c1539bdec..d45c97cd078b 100644 --- a/server/v2/cometbft/query.go +++ b/server/v2/cometbft/query.go @@ -4,7 +4,7 @@ import ( "context" "strings" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" crypto "github.com/cometbft/cometbft/api/cometbft/crypto/v1" errorsmod "cosmossdk.io/errors" diff --git a/server/v2/cometbft/snapshots.go b/server/v2/cometbft/snapshots.go index dc68bab39752..5534712864df 100644 --- a/server/v2/cometbft/snapshots.go +++ b/server/v2/cometbft/snapshots.go @@ -7,7 +7,7 @@ import ( "os" "path/filepath" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/cosmos/gogoproto/proto" "cosmossdk.io/store/v2/snapshots" diff --git a/server/v2/cometbft/types/peer.go b/server/v2/cometbft/types/peer.go index 1ebc9b03c78d..6d15bd715092 100644 --- a/server/v2/cometbft/types/peer.go +++ b/server/v2/cometbft/types/peer.go @@ -1,6 +1,6 @@ package types -import abci "github.com/cometbft/cometbft/abci/types" +import abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" // PeerFilter responds to p2p filtering queries from Tendermint type PeerFilter func(info string) (*abci.QueryResponse, error) diff --git a/server/v2/cometbft/types/vote.go b/server/v2/cometbft/types/vote.go index aeb3b9b8f150..322e09517f63 100644 --- a/server/v2/cometbft/types/vote.go +++ b/server/v2/cometbft/types/vote.go @@ -3,7 +3,7 @@ package types import ( "context" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" ) // VoteExtensionsHandler defines how to implement vote extension handlers diff --git a/server/v2/cometbft/utils.go b/server/v2/cometbft/utils.go index 8c21cbd454aa..5313c445c70e 100644 --- a/server/v2/cometbft/utils.go +++ b/server/v2/cometbft/utils.go @@ -8,7 +8,7 @@ import ( "time" abciv1 "buf.build/gen/go/cometbft/cometbft/protocolbuffers/go/cometbft/abci/v1" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" gogoproto "github.com/cosmos/gogoproto/proto" gogoany "github.com/cosmos/gogoproto/types/any" diff --git a/simapp/abci.go b/simapp/abci.go index a6c982b239c7..e4deee455718 100644 --- a/simapp/abci.go +++ b/simapp/abci.go @@ -6,7 +6,7 @@ import ( "encoding/json" "fmt" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/simapp/app.go b/simapp/app.go index 2f3046cefce5..35a0c71bc745 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -10,7 +10,7 @@ import ( "os" "path/filepath" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/gogoproto/proto" "github.com/spf13/cast" diff --git a/simapp/app_test.go b/simapp/app_test.go index 62312557efaf..9a798add2dd6 100644 --- a/simapp/app_test.go +++ b/simapp/app_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/gogoproto/proto" diff --git a/simapp/sim_test.go b/simapp/sim_test.go index 17b530bba2a9..558b887a0642 100644 --- a/simapp/sim_test.go +++ b/simapp/sim_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" dbm "github.com/cosmos/cosmos-db" "github.com/spf13/viper" diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index 4e8b75339a95..363698a137ea 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -6,7 +6,7 @@ import ( "os" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtjson "github.com/cometbft/cometbft/libs/json" cmttypes "github.com/cometbft/cometbft/types" dbm "github.com/cosmos/cosmos-db" diff --git a/store/internal/maps/maps.go b/store/internal/maps/maps.go index 181fc47bd978..40aa0b44d9f8 100644 --- a/store/internal/maps/maps.go +++ b/store/internal/maps/maps.go @@ -1,11 +1,11 @@ package maps import ( + "crypto/sha256" "encoding/binary" cmtprotocrypto "github.com/cometbft/cometbft/api/cometbft/crypto/v1" "github.com/cometbft/cometbft/crypto/merkle" - "github.com/cometbft/cometbft/crypto/tmhash" "cosmossdk.io/store/internal/kv" "cosmossdk.io/store/internal/tree" @@ -36,11 +36,11 @@ func (sm *merkleMap) set(key string, value []byte) { // The value is hashed, so you can check for equality with a cached value (say) // and make a determination to fetch or not. - vhash := tmhash.Sum(value) + vhash := sha256.Sum256(value) sm.kvs.Pairs = append(sm.kvs.Pairs, kv.Pair{ Key: byteKey, - Value: vhash, + Value: vhash[:], }) } @@ -97,11 +97,11 @@ func (sm *simpleMap) Set(key string, value []byte) { // The value is hashed, so you can // check for equality with a cached value (say) // and make a determination to fetch or not. - vhash := tmhash.Sum(value) + vhash := sha256.Sum256(value) sm.Kvs.Pairs = append(sm.Kvs.Pairs, kv.Pair{ Key: byteKey, - Value: vhash, + Value: vhash[:], }) } diff --git a/store/snapshots/types/convert.go b/store/snapshots/types/convert.go index 90deead3bfa8..f326878757dd 100644 --- a/store/snapshots/types/convert.go +++ b/store/snapshots/types/convert.go @@ -1,7 +1,7 @@ package types import ( - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" proto "github.com/cosmos/gogoproto/proto" "cosmossdk.io/errors" diff --git a/store/streaming/abci/examples/file/file.go b/store/streaming/abci/examples/file/file.go index a6473bca7e71..061653a555da 100644 --- a/store/streaming/abci/examples/file/file.go +++ b/store/streaming/abci/examples/file/file.go @@ -6,7 +6,7 @@ import ( "os" "path/filepath" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/hashicorp/go-plugin" streamingabci "cosmossdk.io/store/streaming/abci" diff --git a/store/streaming/abci/examples/stdout/stdout.go b/store/streaming/abci/examples/stdout/stdout.go index d24e33a421a0..99bef6414730 100644 --- a/store/streaming/abci/examples/stdout/stdout.go +++ b/store/streaming/abci/examples/stdout/stdout.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/hashicorp/go-plugin" streamingabci "cosmossdk.io/store/streaming/abci" diff --git a/store/streaming/abci/grpc.go b/store/streaming/abci/grpc.go index 05e3ecb3e573..b838a153be17 100644 --- a/store/streaming/abci/grpc.go +++ b/store/streaming/abci/grpc.go @@ -4,7 +4,7 @@ import ( "context" "os" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/hashicorp/go-plugin" storetypes "cosmossdk.io/store/types" diff --git a/store/streaming/streaming_test.go b/store/streaming/streaming_test.go index 459784a1271c..5471a2b4dcde 100644 --- a/store/streaming/streaming_test.go +++ b/store/streaming/streaming_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/assert" diff --git a/store/types/streaming.go b/store/types/streaming.go index 50554b418f0f..7385518a52c2 100644 --- a/store/types/streaming.go +++ b/store/types/streaming.go @@ -3,7 +3,7 @@ package types import ( "context" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" ) // ABCIListener is the interface that we're exposing as a streaming service. diff --git a/tests/e2e/auth/suite.go b/tests/e2e/auth/suite.go index 8e288f355115..ffc896810ee0 100644 --- a/tests/e2e/auth/suite.go +++ b/tests/e2e/auth/suite.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" diff --git a/tests/e2e/baseapp/block_gas_test.go b/tests/e2e/baseapp/block_gas_test.go index 52d5a4476681..431e9463c066 100644 --- a/tests/e2e/baseapp/block_gas_test.go +++ b/tests/e2e/baseapp/block_gas_test.go @@ -8,7 +8,7 @@ import ( "math" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtjson "github.com/cometbft/cometbft/libs/json" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" diff --git a/tests/e2e/genutil/export_test.go b/tests/e2e/genutil/export_test.go index febda09efcff..7f9ad1b4daec 100644 --- a/tests/e2e/genutil/export_test.go +++ b/tests/e2e/genutil/export_test.go @@ -13,7 +13,7 @@ import ( "path" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtcfg "github.com/cometbft/cometbft/config" dbm "github.com/cosmos/cosmos-db" "github.com/spf13/cobra" diff --git a/tests/integration/auth/client/cli/suite_test.go b/tests/integration/auth/client/cli/suite_test.go index 8c87e6b27ce0..2e59e9473323 100644 --- a/tests/integration/auth/client/cli/suite_test.go +++ b/tests/integration/auth/client/cli/suite_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" "github.com/stretchr/testify/suite" diff --git a/tests/integration/bank/app_test.go b/tests/integration/bank/app_test.go index d7fa3dda7043..bb2c65d271c6 100644 --- a/tests/integration/bank/app_test.go +++ b/tests/integration/bank/app_test.go @@ -3,7 +3,7 @@ package bank_test import ( "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/tests/integration/bank/bench_test.go b/tests/integration/bank/bench_test.go index c99c4f16735b..a52f7437351f 100644 --- a/tests/integration/bank/bench_test.go +++ b/tests/integration/bank/bench_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/stretchr/testify/require" authtypes "cosmossdk.io/x/auth/types" diff --git a/tests/integration/distribution/cli_tx_test.go b/tests/integration/distribution/cli_tx_test.go index 222f7d8234fe..06f3012128db 100644 --- a/tests/integration/distribution/cli_tx_test.go +++ b/tests/integration/distribution/cli_tx_test.go @@ -5,7 +5,7 @@ import ( "io" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" "github.com/stretchr/testify/suite" diff --git a/tests/integration/evidence/keeper/infraction_test.go b/tests/integration/evidence/keeper/infraction_test.go index 0be69083614b..2719b710f09a 100644 --- a/tests/integration/evidence/keeper/infraction_test.go +++ b/tests/integration/evidence/keeper/infraction_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/golang/mock/gomock" "gotest.tools/v3/assert" diff --git a/tests/integration/gov/genesis_test.go b/tests/integration/gov/genesis_test.go index 9a7180bfc633..e54b3eb012a1 100644 --- a/tests/integration/gov/genesis_test.go +++ b/tests/integration/gov/genesis_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" dbm "github.com/cosmos/cosmos-db" "github.com/stretchr/testify/require" "gotest.tools/v3/assert" diff --git a/tests/integration/staking/keeper/vote_extensions_test.go b/tests/integration/staking/keeper/vote_extensions_test.go index ba1167dcac92..fc81126d7b44 100644 --- a/tests/integration/staking/keeper/vote_extensions_test.go +++ b/tests/integration/staking/keeper/vote_extensions_test.go @@ -5,7 +5,7 @@ import ( "sort" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" protoio "github.com/cosmos/gogoproto/io" "github.com/cosmos/gogoproto/proto" diff --git a/tests/integration/staking/simulation/operations_test.go b/tests/integration/staking/simulation/operations_test.go index dfc19c38ac94..023b050034e4 100644 --- a/tests/integration/staking/simulation/operations_test.go +++ b/tests/integration/staking/simulation/operations_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmttypes "github.com/cometbft/cometbft/types" "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/require" diff --git a/tests/integration/store/rootmulti/rollback_test.go b/tests/integration/store/rootmulti/rollback_test.go index 40c378e89f28..0d6f9d074fa2 100644 --- a/tests/integration/store/rootmulti/rollback_test.go +++ b/tests/integration/store/rootmulti/rollback_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" dbm "github.com/cosmos/cosmos-db" "gotest.tools/v3/assert" diff --git a/tests/sims/slashing/operations_test.go b/tests/sims/slashing/operations_test.go index f3263f1ab6e1..b0df7052dab2 100644 --- a/tests/sims/slashing/operations_test.go +++ b/tests/sims/slashing/operations_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmttypes "github.com/cometbft/cometbft/types" "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/suite" diff --git a/testutil/cli/cmt_mocks.go b/testutil/cli/cmt_mocks.go index 3bb35e2040fb..71e0cb973955 100644 --- a/testutil/cli/cmt_mocks.go +++ b/testutil/cli/cmt_mocks.go @@ -3,7 +3,7 @@ package cli import ( "context" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtbytes "github.com/cometbft/cometbft/libs/bytes" rpcclient "github.com/cometbft/cometbft/rpc/client" rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" diff --git a/testutil/integration/router.go b/testutil/integration/router.go index 48159bcc9d97..0e4724779425 100644 --- a/testutil/integration/router.go +++ b/testutil/integration/router.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - cmtabcitypes "github.com/cometbft/cometbft/abci/types" + cmtabcitypes "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" cmttypes "github.com/cometbft/cometbft/types" dbm "github.com/cosmos/cosmos-db" diff --git a/testutil/sims/app_helpers.go b/testutil/sims/app_helpers.go index c6fd06b66268..720713ca56ac 100644 --- a/testutil/sims/app_helpers.go +++ b/testutil/sims/app_helpers.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" cmtjson "github.com/cometbft/cometbft/libs/json" cmttypes "github.com/cometbft/cometbft/types" diff --git a/testutil/sims/tx_helpers.go b/testutil/sims/tx_helpers.go index 8c3d00b15b1b..c681594b3f01 100644 --- a/testutil/sims/tx_helpers.go +++ b/testutil/sims/tx_helpers.go @@ -6,7 +6,7 @@ import ( "testing" "time" - types2 "github.com/cometbft/cometbft/abci/types" + types2 "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/stretchr/testify/require" "cosmossdk.io/core/header" diff --git a/types/abci.go b/types/abci.go index a650535d098f..30e6beee391e 100644 --- a/types/abci.go +++ b/types/abci.go @@ -1,7 +1,7 @@ package types import ( - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" ) // InitChainer initializes application state at genesis diff --git a/types/context.go b/types/context.go index 1ccdb739994f..94f6be6ef82f 100644 --- a/types/context.go +++ b/types/context.go @@ -4,7 +4,7 @@ import ( "context" "time" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" "cosmossdk.io/core/comet" diff --git a/types/context_test.go b/types/context_test.go index a00e302e41e2..f705bc33c87e 100644 --- a/types/context_test.go +++ b/types/context_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" diff --git a/types/errors/abci.go b/types/errors/abci.go index 8344f465cc02..3a1dac58e51d 100644 --- a/types/errors/abci.go +++ b/types/errors/abci.go @@ -1,7 +1,7 @@ package errors import ( - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" errorsmod "cosmossdk.io/errors" ) diff --git a/types/events.go b/types/events.go index f883fe778347..748b35ce63d4 100644 --- a/types/events.go +++ b/types/events.go @@ -7,7 +7,7 @@ import ( "slices" "strings" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/cosmos/gogoproto/jsonpb" "github.com/cosmos/gogoproto/proto" "golang.org/x/exp/maps" diff --git a/types/events_test.go b/types/events_test.go index 74e16466dc43..2b55952a9d6d 100644 --- a/types/events_test.go +++ b/types/events_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/stretchr/testify/suite" "cosmossdk.io/math" diff --git a/types/module/module.go b/types/module/module.go index 4248143dc7df..1d6df7df4e30 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -26,7 +26,7 @@ import ( "fmt" "sort" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" "golang.org/x/exp/maps" diff --git a/types/module/module_test.go b/types/module/module_test.go index 5a15727f1325..ccd22bf02462 100644 --- a/types/module/module_test.go +++ b/types/module/module_test.go @@ -7,7 +7,7 @@ import ( "io" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/golang/mock/gomock" "github.com/spf13/cobra" "github.com/stretchr/testify/require" diff --git a/types/result_test.go b/types/result_test.go index e531400e510a..1b46c9ec8e80 100644 --- a/types/result_test.go +++ b/types/result_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtt "github.com/cometbft/cometbft/api/cometbft/types/v1" coretypes "github.com/cometbft/cometbft/rpc/core/types" cmt "github.com/cometbft/cometbft/types" diff --git a/x/auth/ante/testutil_test.go b/x/auth/ante/testutil_test.go index 8dff25c7713f..294e17db8900 100644 --- a/x/auth/ante/testutil_test.go +++ b/x/auth/ante/testutil_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" diff --git a/x/auth/go.mod b/x/auth/go.mod index 1e428df69150..d05bdd27649e 100644 --- a/x/auth/go.mod +++ b/x/auth/go.mod @@ -15,6 +15,7 @@ require ( cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 cosmossdk.io/x/tx v0.13.3 github.com/cometbft/cometbft v1.0.0-alpha.2.0.20240530055211-ae27f7eb3c08 + github.com/cometbft/cometbft/api v1.0.0-rc.1 github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.5.0 @@ -57,7 +58,6 @@ require ( github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft-db v0.12.0 // indirect - github.com/cometbft/cometbft/api v1.0.0-rc.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-db v1.0.2 // indirect github.com/cosmos/crypto v0.0.0-20240309083813-82ed2537802e // indirect diff --git a/x/authz/client/cli/tx_test.go b/x/authz/client/cli/tx_test.go index a70a5fc0f4bc..24b33d7f9e6f 100644 --- a/x/authz/client/cli/tx_test.go +++ b/x/authz/client/cli/tx_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" "github.com/stretchr/testify/suite" diff --git a/x/authz/go.mod b/x/authz/go.mod index 0549245f7b6d..b9c3976cae4f 100644 --- a/x/authz/go.mod +++ b/x/authz/go.mod @@ -51,7 +51,7 @@ require ( github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cometbft/cometbft-db v0.12.0 // indirect - github.com/cometbft/cometbft/api v1.0.0-rc.1 // indirect + github.com/cometbft/cometbft/api v1.0.0-rc.1 github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-db v1.0.2 // indirect github.com/cosmos/crypto v0.0.0-20240309083813-82ed2537802e // indirect diff --git a/x/feegrant/client/cli/tx_test.go b/x/feegrant/client/cli/tx_test.go index c8578cd35cf9..61c32ea34e23 100644 --- a/x/feegrant/client/cli/tx_test.go +++ b/x/feegrant/client/cli/tx_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/suite" diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index b0b6de9fa186..f7a8a2d3266f 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -55,7 +55,7 @@ require ( github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft-db v0.12.0 // indirect - github.com/cometbft/cometbft/api v1.0.0-rc.1 // indirect + github.com/cometbft/cometbft/api v1.0.0-rc.1 github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-db v1.0.2 // indirect github.com/cosmos/crypto v0.0.0-20240309083813-82ed2537802e // indirect diff --git a/x/group/client/cli/tx_test.go b/x/group/client/cli/tx_test.go index d820242113c4..938d57014932 100644 --- a/x/group/client/cli/tx_test.go +++ b/x/group/client/cli/tx_test.go @@ -7,7 +7,7 @@ import ( "io" "testing" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" "github.com/stretchr/testify/suite" diff --git a/x/group/go.mod b/x/group/go.mod index fe55e321ad64..49d909ae2463 100644 --- a/x/group/go.mod +++ b/x/group/go.mod @@ -20,6 +20,7 @@ require ( cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 github.com/cockroachdb/apd/v2 v2.0.2 github.com/cometbft/cometbft v1.0.0-alpha.2.0.20240530055211-ae27f7eb3c08 + github.com/cometbft/cometbft/api v1.0.0-rc.1 github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/cosmos-sdk v0.51.0 @@ -61,7 +62,6 @@ require ( github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft-db v0.12.0 // indirect - github.com/cometbft/cometbft/api v1.0.0-rc.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/crypto v0.0.0-20240309083813-82ed2537802e // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect diff --git a/x/group/keeper/msg_server_test.go b/x/group/keeper/msg_server_test.go index fed87820bf99..20eb8a7b184b 100644 --- a/x/group/keeper/msg_server_test.go +++ b/x/group/keeper/msg_server_test.go @@ -8,7 +8,7 @@ import ( "strings" "time" - abci "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/golang/mock/gomock" "cosmossdk.io/core/header"