From dab4f61d7a2c398e756823e9143ba3665daefc82 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 20 Dec 2024 14:47:29 -0500 Subject: [PATCH 01/33] header service --- core/testing/context.go | 4 +++- core/testing/header.go | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 core/testing/header.go diff --git a/core/testing/context.go b/core/testing/context.go index 39218f1f90f6..2427742e9f66 100644 --- a/core/testing/context.go +++ b/core/testing/context.go @@ -2,8 +2,8 @@ package coretesting import ( "context" - "cosmossdk.io/core/event" + "cosmossdk.io/core/header" "cosmossdk.io/core/store" "cosmossdk.io/core/transaction" ) @@ -28,6 +28,8 @@ type dummyCtx struct { events map[string][]event.Event // maps proto events emitted by the actor. protoEvents map[string][]transaction.Msg + // header is the header set by a test runner + header header.Info } func unwrap(ctx context.Context) *dummyCtx { diff --git a/core/testing/header.go b/core/testing/header.go new file mode 100644 index 000000000000..ac19145cc587 --- /dev/null +++ b/core/testing/header.go @@ -0,0 +1,15 @@ +package coretesting + +import ( + "context" + + "cosmossdk.io/core/header" +) + +var _ header.Service = &MemHeaderService{} + +type MemHeaderService struct{} + +func (e MemHeaderService) HeaderInfo(ctx context.Context) header.Info { + return unwrap(ctx).header +} From ccdbad44bb540b44368c98b9e745e676c9278136 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 20 Dec 2024 14:49:30 -0500 Subject: [PATCH 02/33] update --- core/testing/context.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/testing/context.go b/core/testing/context.go index 2427742e9f66..740b6b73cecb 100644 --- a/core/testing/context.go +++ b/core/testing/context.go @@ -15,12 +15,21 @@ func Context() context.Context { stores: map[string]store.KVStore{}, events: map[string][]event.Event{}, protoEvents: map[string][]transaction.Msg{}, + header: header.Info{}, } ctx := context.WithValue(context.Background(), dummyKey{}, dummy) return ctx } +// WithHeader sets the header on a testing ctx and returns the updated ctx. +func WithHeader(ctx context.Context, info header.Info) context.Context { + dummy := unwrap(ctx) + dummy.header = info + + return context.WithValue(ctx, dummyKey{}, dummy) +} + type dummyCtx struct { // maps store by the actor. stores map[string]store.KVStore From ef438eb1de72f2eca08a0603a5908cbc94b69f9e Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 20 Dec 2024 14:53:35 -0500 Subject: [PATCH 03/33] basic env --- core/testing/environment.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 core/testing/environment.go diff --git a/core/testing/environment.go b/core/testing/environment.go new file mode 100644 index 000000000000..1e96c0a87f40 --- /dev/null +++ b/core/testing/environment.go @@ -0,0 +1,23 @@ +package coretesting + +import ( + "context" + appmodulev2 "cosmossdk.io/core/appmodule/v2" +) + +func SetupTestEnvironment(moduleName string) (context.Context, appmodulev2.Environment) { + ctx := Context() + + return ctx, appmodulev2.Environment{ + Logger: nil, + BranchService: nil, + EventService: EventsService(ctx, moduleName), + GasService: nil, + HeaderService: MemHeaderService{}, + QueryRouterService: nil, + MsgRouterService: nil, + TransactionService: nil, + KVStoreService: KVStoreService(ctx, moduleName), + MemStoreService: nil, + } +} From 9dfae05f184ba341ee346e1149dabe69a34f37b0 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 20 Dec 2024 15:22:16 -0500 Subject: [PATCH 04/33] transaction service --- core/testing/context.go | 55 +++++++++++++++++++++++++++++++------ core/testing/environment.go | 5 ++-- core/testing/transaction.go | 16 +++++++++++ 3 files changed, 65 insertions(+), 11 deletions(-) create mode 100644 core/testing/transaction.go diff --git a/core/testing/context.go b/core/testing/context.go index 740b6b73cecb..f78bfbfc4c34 100644 --- a/core/testing/context.go +++ b/core/testing/context.go @@ -2,6 +2,8 @@ package coretesting import ( "context" + "time" + "cosmossdk.io/core/event" "cosmossdk.io/core/header" "cosmossdk.io/core/store" @@ -10,24 +12,60 @@ import ( type dummyKey struct{} -func Context() context.Context { +var _ context.Context = &TestContext{} + +type TestContext struct { + ctx context.Context +} + +func Context() TestContext { dummy := &dummyCtx{ stores: map[string]store.KVStore{}, events: map[string][]event.Event{}, protoEvents: map[string][]transaction.Msg{}, header: header.Info{}, + execMode: transaction.ExecModeFinalize, + } + + return TestContext{ + ctx: context.WithValue(context.Background(), dummyKey{}, dummy), } +} - ctx := context.WithValue(context.Background(), dummyKey{}, dummy) - return ctx +func (t TestContext) Deadline() (deadline time.Time, ok bool) { + return t.ctx.Deadline() +} + +func (t TestContext) Done() <-chan struct{} { + return t.ctx.Done() +} + +func (t TestContext) Err() error { + return t.ctx.Err() +} + +func (t TestContext) Value(key any) any { + return t.ctx.Value(key) } // WithHeader sets the header on a testing ctx and returns the updated ctx. -func WithHeader(ctx context.Context, info header.Info) context.Context { - dummy := unwrap(ctx) +func (t TestContext) WithHeader(info header.Info) TestContext { + dummy := unwrap(t.ctx) dummy.header = info - return context.WithValue(ctx, dummyKey{}, dummy) + return TestContext{ + ctx: context.WithValue(t.ctx, dummyKey{}, dummy), + } +} + +// WithExecMode sets the exec mode on a testing ctx and returns the updated ctx. +func (t TestContext) WithExecMode(mode transaction.ExecMode) context.Context { + dummy := unwrap(t.ctx) + dummy.execMode = mode + + return TestContext{ + ctx: context.WithValue(t.ctx, dummyKey{}, dummy), + } } type dummyCtx struct { @@ -37,8 +75,9 @@ type dummyCtx struct { events map[string][]event.Event // maps proto events emitted by the actor. protoEvents map[string][]transaction.Msg - // header is the header set by a test runner - header header.Info + + header header.Info + execMode transaction.ExecMode } func unwrap(ctx context.Context) *dummyCtx { diff --git a/core/testing/environment.go b/core/testing/environment.go index 1e96c0a87f40..33789bd7a7b2 100644 --- a/core/testing/environment.go +++ b/core/testing/environment.go @@ -1,11 +1,10 @@ package coretesting import ( - "context" appmodulev2 "cosmossdk.io/core/appmodule/v2" ) -func SetupTestEnvironment(moduleName string) (context.Context, appmodulev2.Environment) { +func SetupTestEnvironment(moduleName string) (TestContext, appmodulev2.Environment) { ctx := Context() return ctx, appmodulev2.Environment{ @@ -16,7 +15,7 @@ func SetupTestEnvironment(moduleName string) (context.Context, appmodulev2.Envir HeaderService: MemHeaderService{}, QueryRouterService: nil, MsgRouterService: nil, - TransactionService: nil, + TransactionService: MemTransactionService{}, KVStoreService: KVStoreService(ctx, moduleName), MemStoreService: nil, } diff --git a/core/testing/transaction.go b/core/testing/transaction.go new file mode 100644 index 000000000000..eb53622b923b --- /dev/null +++ b/core/testing/transaction.go @@ -0,0 +1,16 @@ +package coretesting + +import ( + "context" + "cosmossdk.io/core/transaction" +) + +var _ transaction.Service = &MemTransactionService{} + +type MemTransactionService struct{} + +func (m MemTransactionService) ExecMode(ctx context.Context) transaction.ExecMode { + dummy := unwrap(ctx) + + return dummy.execMode +} From 779bd849d24c03bcbce9a9d58d14b6599dbc00f3 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 20 Dec 2024 15:36:48 -0500 Subject: [PATCH 05/33] refit --- core/testing/context.go | 15 ++++ core/testing/environment.go | 9 +- core/testing/gas.go | 22 +++++ core/testing/router.go | 159 ++++++++++++++++++++++++++++++++++ core/testing/services_test.go | 4 +- 5 files changed, 203 insertions(+), 6 deletions(-) create mode 100644 core/testing/gas.go create mode 100644 core/testing/router.go diff --git a/core/testing/context.go b/core/testing/context.go index f78bfbfc4c34..b074d52481ff 100644 --- a/core/testing/context.go +++ b/core/testing/context.go @@ -5,6 +5,7 @@ import ( "time" "cosmossdk.io/core/event" + "cosmossdk.io/core/gas" "cosmossdk.io/core/header" "cosmossdk.io/core/store" "cosmossdk.io/core/transaction" @@ -68,6 +69,17 @@ func (t TestContext) WithExecMode(mode transaction.ExecMode) context.Context { } } +// WithGas sets the gas config and meter on a testing ctx and returns the updated ctx. +func (t TestContext) WithGas(gasConfig gas.GasConfig, gasMeter gas.Meter) context.Context { + dummy := unwrap(t.ctx) + dummy.gasConfig = gasConfig + dummy.gasMeter = gasMeter + + return TestContext{ + ctx: context.WithValue(t.ctx, dummyKey{}, dummy), + } +} + type dummyCtx struct { // maps store by the actor. stores map[string]store.KVStore @@ -78,6 +90,9 @@ type dummyCtx struct { header header.Info execMode transaction.ExecMode + + gasMeter gas.Meter + gasConfig gas.GasConfig } func unwrap(ctx context.Context) *dummyCtx { diff --git a/core/testing/environment.go b/core/testing/environment.go index 33789bd7a7b2..0b6f8fe02f74 100644 --- a/core/testing/environment.go +++ b/core/testing/environment.go @@ -2,19 +2,20 @@ package coretesting import ( appmodulev2 "cosmossdk.io/core/appmodule/v2" + "cosmossdk.io/core/router" ) -func SetupTestEnvironment(moduleName string) (TestContext, appmodulev2.Environment) { +func SetupTestEnvironment(moduleName string, msgRouter, queryRouter router.Service) (TestContext, appmodulev2.Environment) { ctx := Context() return ctx, appmodulev2.Environment{ Logger: nil, BranchService: nil, EventService: EventsService(ctx, moduleName), - GasService: nil, + GasService: MemGasService{}, HeaderService: MemHeaderService{}, - QueryRouterService: nil, - MsgRouterService: nil, + QueryRouterService: queryRouter, + MsgRouterService: msgRouter, TransactionService: MemTransactionService{}, KVStoreService: KVStoreService(ctx, moduleName), MemStoreService: nil, diff --git a/core/testing/gas.go b/core/testing/gas.go new file mode 100644 index 000000000000..89b64a140a06 --- /dev/null +++ b/core/testing/gas.go @@ -0,0 +1,22 @@ +package coretesting + +import ( + "context" + "cosmossdk.io/core/gas" +) + +var _ gas.Service = &MemGasService{} + +type MemGasService struct{} + +func (m MemGasService) GasMeter(ctx context.Context) gas.Meter { + dummy := unwrap(ctx) + + return dummy.gasMeter +} + +func (m MemGasService) GasConfig(ctx context.Context) gas.GasConfig { + dummy := unwrap(ctx) + + return dummy.gasConfig +} diff --git a/core/testing/router.go b/core/testing/router.go new file mode 100644 index 000000000000..1d9546d3d4dd --- /dev/null +++ b/core/testing/router.go @@ -0,0 +1,159 @@ +package coretesting + +import ( + "context" + "errors" + "fmt" + "reflect" + + appmodulev2 "cosmossdk.io/core/appmodule/v2" + "cosmossdk.io/core/router" + "cosmossdk.io/core/transaction" +) + +var ErrNoHandler = errors.New("no handler") + +// NewMsgRouterBuilder is a router that routes messages to their respective handlers. +func NewMsgRouterBuilder() *ReflectionRouterBuilder { + return &ReflectionRouterBuilder{ + handlers: make(map[string]appmodulev2.HandlerFunc), + preHandlers: make(map[string][]appmodulev2.PreMsgHandler), + postHandlers: make(map[string][]appmodulev2.PostMsgHandler), + } +} + +type ReflectionRouterBuilder struct { + handlers map[string]appmodulev2.HandlerFunc + globalPreHandlers []appmodulev2.PreMsgHandler + preHandlers map[string][]appmodulev2.PreMsgHandler + postHandlers map[string][]appmodulev2.PostMsgHandler + globalPostHandlers []appmodulev2.PostMsgHandler +} + +func (b *ReflectionRouterBuilder) RegisterHandler(msgType string, handler appmodulev2.HandlerFunc) error { + // panic on override + if _, ok := b.handlers[msgType]; ok { + return fmt.Errorf("handler already registered: %s", msgType) + } + b.handlers[msgType] = handler + return nil +} + +func (b *ReflectionRouterBuilder) RegisterGlobalPreMsgHandler(handler appmodulev2.PreMsgHandler) { + b.globalPreHandlers = append(b.globalPreHandlers, handler) +} + +func (b *ReflectionRouterBuilder) RegisterPreMsgHandler(msgType string, handler appmodulev2.PreMsgHandler) { + b.preHandlers[msgType] = append(b.preHandlers[msgType], handler) +} + +func (b *ReflectionRouterBuilder) RegisterPostMsgHandler(msgType string, handler appmodulev2.PostMsgHandler) { + b.postHandlers[msgType] = append(b.postHandlers[msgType], handler) +} + +func (b *ReflectionRouterBuilder) RegisterGlobalPostMsgHandler(handler appmodulev2.PostMsgHandler) { + b.globalPostHandlers = append(b.globalPostHandlers, handler) +} + +func (b *ReflectionRouterBuilder) HandlerExists(msgType string) bool { + _, ok := b.handlers[msgType] + return ok +} + +func (b *ReflectionRouterBuilder) Build() (ReflectionRouter, error) { + handlers := make(map[string]appmodulev2.HandlerFunc) + + globalPreHandler := func(ctx context.Context, msg transaction.Msg) error { + for _, h := range b.globalPreHandlers { + err := h(ctx, msg) + if err != nil { + return err + } + } + return nil + } + + globalPostHandler := func(ctx context.Context, msg, msgResp transaction.Msg) error { + for _, h := range b.globalPostHandlers { + err := h(ctx, msg, msgResp) + if err != nil { + return err + } + } + return nil + } + + for msgType, handler := range b.handlers { + // find pre handler + preHandlers := b.preHandlers[msgType] + // find post handler + postHandlers := b.postHandlers[msgType] + // build the handler + handlers[msgType] = buildHandler(handler, preHandlers, globalPreHandler, postHandlers, globalPostHandler) + } + + return ReflectionRouter{ + handlers: handlers, + }, nil +} + +func buildHandler( + handler appmodulev2.HandlerFunc, + preHandlers []appmodulev2.PreMsgHandler, + globalPreHandler appmodulev2.PreMsgHandler, + postHandlers []appmodulev2.PostMsgHandler, + globalPostHandler appmodulev2.PostMsgHandler, +) appmodulev2.HandlerFunc { + return func(ctx context.Context, msg transaction.Msg) (msgResp transaction.Msg, err error) { + if len(preHandlers) != 0 { + for _, preHandler := range preHandlers { + if err := preHandler(ctx, msg); err != nil { + return nil, err + } + } + } + err = globalPreHandler(ctx, msg) + if err != nil { + return nil, err + } + msgResp, err = handler(ctx, msg) + if err != nil { + return nil, err + } + + if len(postHandlers) != 0 { + for _, postHandler := range postHandlers { + if err := postHandler(ctx, msg, msgResp); err != nil { + return nil, err + } + } + } + err = globalPostHandler(ctx, msg, msgResp) + return msgResp, err + } +} + +var _ router.Service = (*ReflectionRouter)(nil) + +// ReflectionRouter implements the STF router for msg and query handlers. +type ReflectionRouter struct { + handlers map[string]appmodulev2.HandlerFunc +} + +func (r ReflectionRouter) CanInvoke(_ context.Context, typeURL string) error { + _, exists := r.handlers[typeURL] + if !exists { + return fmt.Errorf("%w: %s", ErrNoHandler, typeURL) + } + return nil +} + +func (r ReflectionRouter) Invoke(ctx context.Context, req transaction.Msg) (res transaction.Msg, err error) { + typeName := reflect.TypeOf(req).String() + handler, exists := r.handlers[typeName] + if !exists { + return nil, fmt.Errorf("%w: %s", ErrNoHandler, typeName) + } + + return handler(ctx, req) +} diff --git a/core/testing/services_test.go b/core/testing/services_test.go index 2f226e6e04c3..6c1a2dddb3dc 100644 --- a/core/testing/services_test.go +++ b/core/testing/services_test.go @@ -6,8 +6,8 @@ import ( ) func TestKVStoreService(t *testing.T) { - ctx := Context() - svc1 := KVStoreService(ctx, "bank") + ctx, env := SetupTestEnvironment("bank", nil, nil) + svc1 := env.KVStoreService // must panic t.Run("must panic on invalid ctx", func(t *testing.T) { From 2e7ca6db6471687ed19643d79cdb51d0b7ae70f0 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 20 Dec 2024 15:49:58 -0500 Subject: [PATCH 06/33] register --- x/bank/v2/keeper/handlers.go | 16 +++++++++++++++- x/bank/v2/module.go | 9 ++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/x/bank/v2/keeper/handlers.go b/x/bank/v2/keeper/handlers.go index e998aceecb72..c9da64b9940c 100644 --- a/x/bank/v2/keeper/handlers.go +++ b/x/bank/v2/keeper/handlers.go @@ -3,6 +3,7 @@ package keeper import ( "bytes" "context" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "errors" "fmt" @@ -25,7 +26,20 @@ func NewHandlers(k *Keeper) handlers { return handlers{k} } -// UpdateParams updates the parameters of the bank/v2 module. +// RegisterMsgHandlers registers the message handlers to the router. +func (h handlers) RegisterMsgHandlers(router appmodulev2.MsgRouter) { + appmodulev2.RegisterMsgHandler(router, h.MsgUpdateParams) + appmodulev2.RegisterMsgHandler(router, h.MsgSend) + appmodulev2.RegisterMsgHandler(router, h.MsgMint) +} + +// RegisterQueryHandlers registers the query handlers to the router. +func (h handlers) RegisterQueryHandlers(router appmodulev2.QueryRouter) { + appmodulev2.RegisterMsgHandler(router, h.QueryParams) + appmodulev2.RegisterMsgHandler(router, h.QueryBalance) +} + +// MsgUpdateParams updates the parameters of the bank/v2 module. func (h handlers) MsgUpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { authorityBytes, err := h.addressCodec.StringToBytes(msg.Authority) if err != nil { diff --git a/x/bank/v2/module.go b/x/bank/v2/module.go index 99d5ab2ab7d4..c8f6880a1ef1 100644 --- a/x/bank/v2/module.go +++ b/x/bank/v2/module.go @@ -94,18 +94,13 @@ func (am AppModule) ExportGenesis(ctx context.Context) (json.RawMessage, error) // RegisterMsgHandlers registers the message handlers for the bank module. func (am AppModule) RegisterMsgHandlers(router appmodulev2.MsgRouter) { handlers := keeper.NewHandlers(am.keeper) - - appmodulev2.RegisterMsgHandler(router, handlers.MsgUpdateParams) - appmodulev2.RegisterMsgHandler(router, handlers.MsgSend) - appmodulev2.RegisterMsgHandler(router, handlers.MsgMint) + handlers.RegisterMsgHandlers(router) } // RegisterQueryHandlers registers the query handlers for the bank module. func (am AppModule) RegisterQueryHandlers(router appmodulev2.QueryRouter) { handlers := keeper.NewHandlers(am.keeper) - - appmodulev2.RegisterMsgHandler(router, handlers.QueryParams) - appmodulev2.RegisterMsgHandler(router, handlers.QueryBalance) + handlers.RegisterQueryHandlers(router) } // GetTxCmd returns the root tx command for the bank/v2 module. From 6161b6a0e9dcea831e4f53e74251779e81782c90 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 20 Dec 2024 16:52:57 -0500 Subject: [PATCH 07/33] utd --- core/testing/context.go | 4 +- core/testing/environment.go | 62 +++++++++++++++++----- core/testing/services_test.go | 10 +++- x/bank/go.mod | 5 +- x/bank/go.sum | 2 - x/bank/keeper/grpc_query_test.go | 4 +- x/bank/keeper/keeper_test.go | 90 +++++++++++++++++++------------- 7 files changed, 121 insertions(+), 56 deletions(-) diff --git a/core/testing/context.go b/core/testing/context.go index b074d52481ff..a8a3c3ec4255 100644 --- a/core/testing/context.go +++ b/core/testing/context.go @@ -49,8 +49,8 @@ func (t TestContext) Value(key any) any { return t.ctx.Value(key) } -// WithHeader sets the header on a testing ctx and returns the updated ctx. -func (t TestContext) WithHeader(info header.Info) TestContext { +// WithHeaderInfo sets the header on a testing ctx and returns the updated ctx. +func (t TestContext) WithHeaderInfo(info header.Info) TestContext { dummy := unwrap(t.ctx) dummy.header = info diff --git a/core/testing/environment.go b/core/testing/environment.go index 0b6f8fe02f74..32cec6e1290d 100644 --- a/core/testing/environment.go +++ b/core/testing/environment.go @@ -2,22 +2,60 @@ package coretesting import ( appmodulev2 "cosmossdk.io/core/appmodule/v2" + corelog "cosmossdk.io/core/log" "cosmossdk.io/core/router" + "cosmossdk.io/core/store" ) -func SetupTestEnvironment(moduleName string, msgRouter, queryRouter router.Service) (TestContext, appmodulev2.Environment) { +type TestEnvironmentConfig struct { + ModuleName string + Logger corelog.Logger + MsgRouter router.Service + QueryRouter router.Service +} + +type TestEnvironment struct { + env appmodulev2.Environment + memEventsService MemEventsService + memHeaderService MemHeaderService +} + +func NewTestEnvironment(cfg TestEnvironmentConfig) (TestContext, TestEnvironment) { ctx := Context() - return ctx, appmodulev2.Environment{ - Logger: nil, - BranchService: nil, - EventService: EventsService(ctx, moduleName), - GasService: MemGasService{}, - HeaderService: MemHeaderService{}, - QueryRouterService: queryRouter, - MsgRouterService: msgRouter, - TransactionService: MemTransactionService{}, - KVStoreService: KVStoreService(ctx, moduleName), - MemStoreService: nil, + memEventService := EventsService(ctx, cfg.ModuleName) + memHeaderService := MemHeaderService{} + + return ctx, TestEnvironment{ + env: appmodulev2.Environment{ + Logger: cfg.Logger, + BranchService: nil, + EventService: memEventService, + GasService: MemGasService{}, + HeaderService: memHeaderService, + QueryRouterService: cfg.QueryRouter, + MsgRouterService: cfg.MsgRouter, + TransactionService: MemTransactionService{}, + KVStoreService: KVStoreService(ctx, cfg.ModuleName), + MemStoreService: nil, + }, + memEventsService: memEventService, + memHeaderService: memHeaderService, } } + +func (env TestEnvironment) MemEventsService() MemEventsService { + return env.memEventsService +} + +func (env TestEnvironment) Environment() appmodulev2.Environment { + return env.env +} + +func (env TestEnvironment) KVStoreService() store.KVStoreService { + return env.env.KVStoreService +} + +func (env TestEnvironment) HeaderService() MemHeaderService { + return env.memHeaderService +} diff --git a/core/testing/services_test.go b/core/testing/services_test.go index 6c1a2dddb3dc..969f5fa8190a 100644 --- a/core/testing/services_test.go +++ b/core/testing/services_test.go @@ -6,8 +6,14 @@ import ( ) func TestKVStoreService(t *testing.T) { - ctx, env := SetupTestEnvironment("bank", nil, nil) - svc1 := env.KVStoreService + cfg := TestEnvironmentConfig{ + ModuleName: "bank", + Logger: nil, + MsgRouter: nil, + QueryRouter: nil, + } + ctx, env := NewTestEnvironment(cfg) + svc1 := env.KVStoreService() // must panic t.Run("must panic on invalid ctx", func(t *testing.T) { diff --git a/x/bank/go.mod b/x/bank/go.mod index 8a1a942988df..cea53a298129 100644 --- a/x/bank/go.mod +++ b/x/bank/go.mod @@ -173,7 +173,10 @@ require ( golang.org/x/arch v0.12.0 // indirect ) -replace github.com/cosmos/cosmos-sdk => ../../. +replace ( + cosmossdk.io/core/testing => ../../core/testing + github.com/cosmos/cosmos-sdk => ../../. +) // TODO remove post spinning out all modules replace cosmossdk.io/x/staking => ../staking diff --git a/x/bank/go.sum b/x/bank/go.sum index 0d5a1827a617..31c68d442b91 100644 --- a/x/bank/go.sum +++ b/x/bank/go.sum @@ -10,8 +10,6 @@ cosmossdk.io/collections v1.0.0-rc.1 h1:Mzv0YKZJ6aloy4oSnMnyl8b6PtM2dTdDlzRR/079 cosmossdk.io/collections v1.0.0-rc.1/go.mod h1:nOgrEpyMFOWBy8QmSbq/T6Tgtm2IyOFvxDRWk+DI97k= cosmossdk.io/core v1.0.0-alpha.6 h1:5ukC4JcQKmemLQXcAgu/QoOvJI50hpBkIIg4ZT2EN8E= cosmossdk.io/core v1.0.0-alpha.6/go.mod h1:3u9cWq1FAVtiiCrDPpo4LhR+9V6k/ycSG4/Y/tREWCY= -cosmossdk.io/core/testing v0.0.1 h1:gYCTaftcRrz+HoNXmK7r9KgbG1jgBJ8pNzm/Pa/erFQ= -cosmossdk.io/core/testing v0.0.1/go.mod h1:2VDNz/25qtxgPa0+j8LW5e8Ev/xObqoJA7QuJS9/wIQ= cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= diff --git a/x/bank/keeper/grpc_query_test.go b/x/bank/keeper/grpc_query_test.go index 4878bf24ce50..45eefcbbda55 100644 --- a/x/bank/keeper/grpc_query_test.go +++ b/x/bank/keeper/grpc_query_test.go @@ -760,7 +760,7 @@ func (suite *KeeperTestSuite) TestGRPCDenomOwners() { for name, tc := range testCases { suite.Run(name, func() { - resp, err := suite.queryClient.DenomOwners(gocontext.Background(), tc.req) + resp, err := suite.queryClient.DenomOwners(suite.ctx, tc.req) if tc.expPass { suite.NoError(err) suite.NotNil(resp) @@ -998,7 +998,7 @@ func (suite *KeeperTestSuite) TestGRPCDenomOwnersByQuery() { for name, tc := range testCases { suite.Run(name, func() { - resp, err := suite.queryClient.DenomOwnersByQuery(gocontext.Background(), tc.req) + resp, err := suite.queryClient.DenomOwnersByQuery(suite.ctx, tc.req) if tc.expPass { suite.NoError(err) suite.NotNil(resp) diff --git a/x/bank/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go index e9f5bd0f645d..ad0d864fc161 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -18,6 +18,7 @@ import ( "cosmossdk.io/core/header" coretesting "cosmossdk.io/core/testing" errorsmod "cosmossdk.io/errors" + "cosmossdk.io/log" "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "cosmossdk.io/x/bank/keeper" @@ -27,7 +28,6 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/runtime" - "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" @@ -112,12 +112,13 @@ func addIBCMetadata(ctx context.Context, k keeper.BaseKeeper) { type KeeperTestSuite struct { suite.Suite - ctx context.Context + ctx coretesting.TestContext + env coretesting.TestEnvironment bankKeeper keeper.BaseKeeper addrCdc address.Codec authKeeper *banktestutil.MockAccountKeeper - queryClient banktypes.QueryClient + queryClient banktypes.QueryServer msgServer banktypes.MsgServer encCfg moduletestutil.TestEncodingConfig @@ -128,12 +129,22 @@ func TestKeeperTestSuite(t *testing.T) { } func (suite *KeeperTestSuite) SetupTest() { - key := storetypes.NewKVStoreKey(banktypes.StoreKey) - testCtx := testutil.DefaultContextWithDB(suite.T(), key, storetypes.NewTransientStoreKey("transient_test")) - ctx := testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now()}) + //key := storetypes.NewKVStoreKey(banktypes.StoreKey) + //testCtx := testutil.DefaultContextWithDB(suite.T(), key, storetypes.NewTransientStoreKey("transient_test")) + //ctx := testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now()}) encCfg := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}) - env := runtime.NewEnvironment(runtime.NewKVStoreService(key), coretesting.NewNopLogger()) + testEnironmentConfig := coretesting.TestEnvironmentConfig{ + ModuleName: banktypes.ModuleName, + Logger: log.NewNopLogger(), + MsgRouter: nil, + QueryRouter: nil, + } + + newCtx, newEnv := coretesting.NewTestEnvironment(testEnironmentConfig) + newCtx = newCtx.WithHeaderInfo(header.Info{Time: time.Now()}) + // env := runtime.NewEnvironment(runtime.NewKVStoreService(key), coretesting.NewNopLogger()) + ctx := newCtx ac := codectestutil.CodecOptions{}.GetAddressCodec() addr, err := ac.BytesToString(accAddrs[4]) @@ -145,11 +156,11 @@ func (suite *KeeperTestSuite) SetupTest() { ctrl := gomock.NewController(suite.T()) authKeeper := banktestutil.NewMockAccountKeeper(ctrl) authKeeper.EXPECT().AddressCodec().Return(ac).AnyTimes() - suite.ctx = ctx + suite.ctx = newCtx suite.authKeeper = authKeeper suite.addrCdc = ac suite.bankKeeper = keeper.NewBaseKeeper( - env, + newEnv.Environment(), encCfg.Codec, suite.authKeeper, map[string]bool{addr: true}, @@ -162,13 +173,12 @@ func (suite *KeeperTestSuite) SetupTest() { banktypes.RegisterInterfaces(encCfg.InterfaceRegistry) - queryHelper := baseapp.NewQueryServerTestHelper(ctx, encCfg.InterfaceRegistry) - banktypes.RegisterQueryServer(queryHelper, suite.bankKeeper) - queryClient := banktypes.NewQueryClient(queryHelper) + queryServer := keeper.NewQuerier(&suite.bankKeeper) - suite.queryClient = queryClient + suite.queryClient = queryServer suite.msgServer = keeper.NewMsgServerImpl(suite.bankKeeper) suite.encCfg = encCfg + suite.env = newEnv } func (suite *KeeperTestSuite) mockQueryClient(ctx sdk.Context) banktypes.QueryClient { @@ -1403,7 +1413,7 @@ func (suite *KeeperTestSuite) TestMsgSendEvents() { } func (suite *KeeperTestSuite) TestMsgMultiSendEvents() { - ctx := sdk.UnwrapSDKContext(suite.ctx) + ctx := suite.ctx require := suite.Require() acc0 := authtypes.NewBaseAccountWithAddress(accAddrs[0]) @@ -1431,7 +1441,7 @@ func (suite *KeeperTestSuite) TestMsgMultiSendEvents() { suite.authKeeper.EXPECT().GetAccount(suite.ctx, accAddrs[0]).Return(acc0) require.Error(suite.bankKeeper.InputOutputCoins(ctx, input, outputs)) - events := ctx.EventManager().ABCIEvents() + events := suite.env.MemEventsService().GetEvents(suite.ctx) require.Equal(0, len(events)) // Set addr's coins but not accAddrs[1]'s coins @@ -1441,7 +1451,7 @@ func (suite *KeeperTestSuite) TestMsgMultiSendEvents() { suite.mockInputOutputCoins([]sdk.AccountI{acc0}, accAddrs[2:4]) require.NoError(suite.bankKeeper.InputOutputCoins(ctx, input, outputs)) - events = ctx.EventManager().ABCIEvents() + events = suite.env.MemEventsService().GetEvents(suite.ctx) require.Equal(10, len(events)) // 10 events because account funding causes extra minting + coin_spent + coin_recv events // Set addr's coins and accAddrs[1]'s coins @@ -1456,7 +1466,7 @@ func (suite *KeeperTestSuite) TestMsgMultiSendEvents() { suite.mockInputOutputCoins([]sdk.AccountI{acc0}, accAddrs[2:4]) require.NoError(suite.bankKeeper.InputOutputCoins(ctx, input, outputs)) - events = ctx.EventManager().ABCIEvents() + events = suite.env.MemEventsService().GetEvents(suite.ctx) require.Equal(25, len(events)) // 25 due to account funding + coin_spent + coin_recv events event1 := coreevent.Event{ @@ -1485,21 +1495,29 @@ func (suite *KeeperTestSuite) TestMsgMultiSendEvents() { require.Equal(event1.Type, events[22].Type) attrs1, err := event1.Attributes() require.NoError(err) + + attrs, err := events[22].Attributes() + require.NoError(err) + for i := range attrs1 { - require.Equal(attrs1[i].Key, events[22].Attributes[i].Key) - require.Equal(attrs1[i].Value, events[22].Attributes[i].Value) + require.Equal(attrs1[i].Key, attrs[i].Key) + require.Equal(attrs1[i].Value, attrs[i].Value) } require.Equal(event2.Type, events[24].Type) attrs2, err := event2.Attributes() require.NoError(err) + + attrs, err = events[24].Attributes() + require.NoError(err) + for i := range attrs2 { - require.Equal(attrs2[i].Key, events[24].Attributes[i].Key) - require.Equal(attrs2[i].Value, events[24].Attributes[i].Value) + require.Equal(attrs2[i].Key, attrs[i].Key) + require.Equal(attrs2[i].Value, attrs[i].Value) } } func (suite *KeeperTestSuite) TestSpendableCoins() { - ctx := sdk.UnwrapSDKContext(suite.ctx) + ctx := suite.ctx require := suite.Require() now := time.Now() endTime := now.Add(24 * time.Hour) @@ -1539,7 +1557,7 @@ func (suite *KeeperTestSuite) TestSpendableCoins() { suite.Require().NoError(err) // Go back to the suite's context since mockFundAccount uses that; FundAccount would fail for bad mocking otherwise. - ctx = sdk.UnwrapSDKContext(suite.ctx) + ctx = suite.ctx suite.mockFundAccount(accAddrs[2]) require.NoError(banktestutil.FundAccount(ctx, suite.bankKeeper, accAddrs[2], balanceCoins2)) suite.mockSpendableCoins(ctx, vacc2) @@ -1691,7 +1709,7 @@ func (suite *KeeperTestSuite) TestPeriodicVestingAccountReceive() { } func (suite *KeeperTestSuite) TestDelegateCoins() { - ctx := sdk.UnwrapSDKContext(suite.ctx) + ctx := suite.ctx require := suite.Require() now := time.Now() endTime := now.Add(24 * time.Hour) @@ -1701,7 +1719,7 @@ func (suite *KeeperTestSuite) TestDelegateCoins() { acc0 := authtypes.NewBaseAccountWithAddress(accAddrs[0]) acc1 := authtypes.NewBaseAccountWithAddress(accAddrs[1]) - vacc, err := vesting.NewContinuousVestingAccount(acc0, origCoins, ctx.HeaderInfo().Time.Unix(), endTime.Unix()) + vacc, err := vesting.NewContinuousVestingAccount(acc0, origCoins, suite.env.HeaderService().HeaderInfo(suite.ctx).Time.Unix(), endTime.Unix()) suite.Require().NoError(err) suite.mockFundAccount(accAddrs[0]) @@ -1917,34 +1935,36 @@ func (suite *KeeperTestSuite) TestBalanceTrackingEvents() { balances := make(map[string]sdk.Coins) - ctx := sdk.UnwrapSDKContext(suite.ctx) + events := suite.env.MemEventsService().GetEvents(suite.ctx) - for _, e := range ctx.EventManager().ABCIEvents() { + for _, e := range events { + attributes, err := e.Attributes() + suite.Require().NoError(err) switch e.Type { case banktypes.EventTypeCoinBurn: - burnedCoins, err := sdk.ParseCoinsNormalized(e.Attributes[1].Value) + burnedCoins, err := sdk.ParseCoinsNormalized(attributes[1].Value) require.NoError(err) supply = supply.Sub(burnedCoins...) case banktypes.EventTypeCoinMint: - mintedCoins, err := sdk.ParseCoinsNormalized(e.Attributes[1].Value) + mintedCoins, err := sdk.ParseCoinsNormalized(attributes[1].Value) require.NoError(err) supply = supply.Add(mintedCoins...) case banktypes.EventTypeCoinSpent: - coinsSpent, err := sdk.ParseCoinsNormalized(e.Attributes[1].Value) + coinsSpent, err := sdk.ParseCoinsNormalized(attributes[1].Value) require.NoError(err) - _, err = suite.addrCdc.StringToBytes(e.Attributes[0].Value) + _, err = suite.addrCdc.StringToBytes(attributes[0].Value) require.NoError(err) - balances[e.Attributes[0].Value] = balances[e.Attributes[0].Value].Sub(coinsSpent...) + balances[attributes[0].Value] = balances[attributes[0].Value].Sub(coinsSpent...) case banktypes.EventTypeCoinReceived: - coinsRecv, err := sdk.ParseCoinsNormalized(e.Attributes[1].Value) + coinsRecv, err := sdk.ParseCoinsNormalized(attributes[1].Value) require.NoError(err) - _, err = suite.addrCdc.StringToBytes(e.Attributes[0].Value) + _, err = suite.addrCdc.StringToBytes(attributes[0].Value) require.NoError(err) - balances[e.Attributes[0].Value] = balances[e.Attributes[0].Value].Add(coinsRecv...) + balances[attributes[0].Value] = balances[attributes[0].Value].Add(coinsRecv...) } } From 46a30d37c924d1dd73f303dfb13dd6096ce01a80 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 20 Dec 2024 17:34:26 -0500 Subject: [PATCH 08/33] bank --- x/bank/keeper/grpc_query_test.go | 62 +++++++++++++++++--------------- x/bank/keeper/keeper_test.go | 32 ++++++++--------- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/x/bank/keeper/grpc_query_test.go b/x/bank/keeper/grpc_query_test.go index 45eefcbbda55..c8bd5096d50c 100644 --- a/x/bank/keeper/grpc_query_test.go +++ b/x/bank/keeper/grpc_query_test.go @@ -1,7 +1,6 @@ package keeper_test import ( - gocontext "context" "fmt" "time" @@ -84,7 +83,7 @@ func (suite *KeeperTestSuite) TestQueryBalance() { for _, tc := range testCases { suite.Run(tc.name, func() { - res, err := queryClient.Balance(gocontext.Background(), tc.req) + res, err := queryClient.Balance(ctx, tc.req) if tc.expectErrMsg == "" { suite.Require().NoError(err) suite.Require().NotNil(res) @@ -102,7 +101,7 @@ func (suite *KeeperTestSuite) TestQueryBalance() { func (suite *KeeperTestSuite) TestQueryAllBalances() { ctx, queryClient := suite.ctx, suite.queryClient _, _, addr := testdata.KeyTestPubAddr() - _, err := queryClient.AllBalances(gocontext.Background(), &types.QueryAllBalancesRequest{}) + _, err := queryClient.AllBalances(ctx, &types.QueryAllBalancesRequest{}) suite.Require().Error(err) addrStr, err := suite.addrCdc.BytesToString(addr) @@ -114,7 +113,7 @@ func (suite *KeeperTestSuite) TestQueryAllBalances() { CountTotal: false, } req := types.NewQueryAllBalancesRequest(addrStr, pageReq, false) - res, err := queryClient.AllBalances(gocontext.Background(), req) + res, err := queryClient.AllBalances(ctx, req) suite.Require().NoError(err) suite.Require().NotNil(res) suite.True(res.Balances.IsZero()) @@ -130,7 +129,7 @@ func (suite *KeeperTestSuite) TestQueryAllBalances() { addIBCMetadata(ctx, suite.bankKeeper) - res, err = queryClient.AllBalances(gocontext.Background(), req) + res, err = queryClient.AllBalances(ctx, req) suite.Require().NoError(err) suite.Require().NotNil(res) suite.Equal(res.Balances.Len(), 1) @@ -143,7 +142,7 @@ func (suite *KeeperTestSuite) TestQueryAllBalances() { CountTotal: true, } req = types.NewQueryAllBalancesRequest(addrStr, pageReq, false) - res, err = queryClient.AllBalances(gocontext.Background(), req) + res, err = queryClient.AllBalances(ctx, req) suite.Require().NoError(err) suite.Equal(res.Balances.Len(), 1) suite.NotNil(res.Pagination.NextKey) @@ -157,7 +156,7 @@ func (suite *KeeperTestSuite) TestQueryAllBalances() { CountTotal: true, } req = types.NewQueryAllBalancesRequest(addrStr, pageReq, false) - res, err = queryClient.AllBalances(gocontext.Background(), req) + res, err = queryClient.AllBalances(ctx, req) suite.Require().NoError(err) suite.Equal(res.Balances.Len(), 1) suite.Equal(res.Balances[0].Denom, ibcCoins.Denom) @@ -169,7 +168,7 @@ func (suite *KeeperTestSuite) TestQueryAllBalances() { CountTotal: true, } req = types.NewQueryAllBalancesRequest(addrStr, pageReq, true) - res, err = queryClient.AllBalances(gocontext.Background(), req) + res, err = queryClient.AllBalances(ctx, req) suite.Require().NoError(err) suite.Equal(res.Balances.Len(), 1) suite.Equal(res.Balances[0].Denom, ibcPath+"/"+ibcBaseDenom) @@ -181,9 +180,9 @@ func (suite *KeeperTestSuite) TestSpendableBalances() { addrStr, err := suite.addrCdc.BytesToString(addr) suite.Require().NoError(err) - ctx := sdk.UnwrapSDKContext(suite.ctx) + ctx := suite.ctx ctx = ctx.WithHeaderInfo(header.Info{Time: time.Now()}) - queryClient := suite.mockQueryClient(ctx) + queryClient := suite.queryClient _, err = queryClient.SpendableBalances(ctx, &types.QuerySpendableBalancesRequest{}) suite.Require().Error(err) @@ -205,12 +204,14 @@ func (suite *KeeperTestSuite) TestSpendableBalances() { fooCoins := newFooCoin(50) barCoins := newBarCoin(30) + currentBlockTime := suite.env.HeaderService().HeaderInfo(ctx).Time + origCoins := sdk.NewCoins(fooCoins, barCoins) vacc, err := vestingtypes.NewContinuousVestingAccount( acc, sdk.NewCoins(fooCoins), - ctx.HeaderInfo().Time.Unix(), - ctx.HeaderInfo().Time.Add(time.Hour).Unix(), + currentBlockTime.Unix(), + currentBlockTime.Add(time.Hour).Unix(), ) suite.Require().NoError(err) @@ -218,8 +219,8 @@ func (suite *KeeperTestSuite) TestSpendableBalances() { suite.Require().NoError(testutil.FundAccount(suite.ctx, suite.bankKeeper, addr, origCoins)) // move time forward for some tokens to vest - ctx = ctx.WithHeaderInfo(header.Info{Time: ctx.HeaderInfo().Time.Add(30 * time.Minute)}) - queryClient = suite.mockQueryClient(ctx) + ctx = ctx.WithHeaderInfo(header.Info{Time: currentBlockTime.Add(30 * time.Minute)}) + queryClient = suite.queryClient suite.mockSpendableCoins(ctx, vacc) res, err = queryClient.SpendableBalances(ctx, req) @@ -233,10 +234,10 @@ func (suite *KeeperTestSuite) TestSpendableBalances() { func (suite *KeeperTestSuite) TestSpendableBalanceByDenom() { _, _, addr := testdata.KeyTestPubAddr() + ctx := suite.ctx - ctx := sdk.UnwrapSDKContext(suite.ctx) ctx = ctx.WithHeaderInfo(header.Info{Time: time.Now()}) - queryClient := suite.mockQueryClient(ctx) + queryClient := suite.queryClient _, err := queryClient.SpendableBalanceByDenom(ctx, &types.QuerySpendableBalanceByDenomRequest{}) suite.Require().Error(err) @@ -256,12 +257,14 @@ func (suite *KeeperTestSuite) TestSpendableBalanceByDenom() { fooCoins := newFooCoin(100) barCoins := newBarCoin(30) + currentBlockTime := suite.env.HeaderService().HeaderInfo(ctx).Time + origCoins := sdk.NewCoins(fooCoins, barCoins) vacc, err := vestingtypes.NewContinuousVestingAccount( acc, sdk.NewCoins(fooCoins), - ctx.HeaderInfo().Time.Unix(), - ctx.HeaderInfo().Time.Add(time.Hour).Unix(), + currentBlockTime.Unix(), + currentBlockTime.Add(time.Hour).Unix(), ) suite.Require().NoError(err) @@ -269,8 +272,8 @@ func (suite *KeeperTestSuite) TestSpendableBalanceByDenom() { suite.Require().NoError(testutil.FundAccount(suite.ctx, suite.bankKeeper, addr, origCoins)) // move time forward for half of the tokens to vest - ctx = ctx.WithHeaderInfo(header.Info{Time: ctx.HeaderInfo().Time.Add(30 * time.Minute)}) - queryClient = suite.mockQueryClient(ctx) + ctx = ctx.WithHeaderInfo(header.Info{Time: currentBlockTime.Add(30 * time.Minute)}) + queryClient = suite.queryClient // check fooCoins first, it has some vested and some vesting suite.mockSpendableCoins(ctx, vacc) @@ -290,7 +293,7 @@ func (suite *KeeperTestSuite) TestSpendableBalanceByDenom() { func (suite *KeeperTestSuite) TestQueryTotalSupply() { ctx, queryClient := suite.ctx, suite.queryClient - res, err := queryClient.TotalSupply(gocontext.Background(), &types.QueryTotalSupplyRequest{}) + res, err := queryClient.TotalSupply(ctx, &types.QueryTotalSupplyRequest{}) suite.Require().NoError(err) suite.Require().NotNil(res) genesisSupply := res.Supply @@ -299,7 +302,7 @@ func (suite *KeeperTestSuite) TestQueryTotalSupply() { suite.mockMintCoins(mintAcc) suite.Require().NoError(suite.bankKeeper.MintCoins(ctx, types.MintModuleName, testCoins)) - res, err = queryClient.TotalSupply(gocontext.Background(), &types.QueryTotalSupplyRequest{}) + res, err = queryClient.TotalSupply(ctx, &types.QueryTotalSupplyRequest{}) suite.Require().NoError(err) suite.Require().NotNil(res) @@ -318,32 +321,33 @@ func (suite *KeeperTestSuite) TestQueryTotalSupplyOf() { suite.mockMintCoins(mintAcc) suite.Require().NoError(suite.bankKeeper.MintCoins(ctx, types.MintModuleName, expectedTotalSupply)) - _, err := queryClient.SupplyOf(gocontext.Background(), &types.QuerySupplyOfRequest{}) + _, err := queryClient.SupplyOf(ctx, &types.QuerySupplyOfRequest{}) suite.Require().Error(err) - res, err := queryClient.SupplyOf(gocontext.Background(), &types.QuerySupplyOfRequest{Denom: test1Supply.Denom}) + res, err := queryClient.SupplyOf(ctx, &types.QuerySupplyOfRequest{Denom: test1Supply.Denom}) suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(test1Supply, res.Amount) // total supply bogus denom - res, err = queryClient.SupplyOf(gocontext.Background(), &types.QuerySupplyOfRequest{Denom: "bogus"}) + res, err = queryClient.SupplyOf(ctx, &types.QuerySupplyOfRequest{Denom: "bogus"}) suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(sdk.NewInt64Coin("bogus", 0), res.Amount) } func (suite *KeeperTestSuite) TestQueryParams() { - res, err := suite.queryClient.Params(gocontext.Background(), &types.QueryParamsRequest{}) + ctx, queryClient := suite.ctx, suite.queryClient + res, err := queryClient.Params(ctx, &types.QueryParamsRequest{}) suite.Require().NoError(err) suite.Require().NotNil(res) - suite.Require().Equal(suite.bankKeeper.GetParams(suite.ctx), res.GetParams()) + suite.Require().Equal(suite.bankKeeper.GetParams(ctx), res.GetParams()) } func (suite *KeeperTestSuite) TestQueryDenomsMetadata() { var ( req *types.QueryDenomsMetadataRequest - expMetadata = []types.Metadata(nil) + expMetadata = []types.Metadata{} ) testCases := []struct { @@ -892,7 +896,7 @@ func (suite *KeeperTestSuite) TestQuerySendEnabled() { for _, tc := range tests { suite.Run(tc.name, func() { - resp, err := suite.queryClient.SendEnabled(gocontext.Background(), tc.req) + resp, err := suite.queryClient.SendEnabled(ctx, tc.req) suite.Require().NoError(err) if !suite.Assert().Equal(tc.exp, resp) { if !suite.Assert().Len(resp.SendEnabled, len(tc.exp.SendEnabled)) { diff --git a/x/bank/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go index ad0d864fc161..16c852d9c1e1 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -25,7 +25,6 @@ import ( banktestutil "cosmossdk.io/x/bank/testutil" banktypes "cosmossdk.io/x/bank/types" - "github.com/cosmos/cosmos-sdk/baseapp" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" @@ -181,12 +180,6 @@ func (suite *KeeperTestSuite) SetupTest() { suite.env = newEnv } -func (suite *KeeperTestSuite) mockQueryClient(ctx sdk.Context) banktypes.QueryClient { - queryHelper := baseapp.NewQueryServerTestHelper(ctx, suite.encCfg.InterfaceRegistry) - banktypes.RegisterQueryServer(queryHelper, suite.bankKeeper) - return banktypes.NewQueryClient(queryHelper) -} - func (suite *KeeperTestSuite) mockMintCoins(moduleAcc *authtypes.ModuleAccount) { suite.authKeeper.EXPECT().GetModuleAccount(suite.ctx, moduleAcc.Name).Return(moduleAcc) } @@ -230,7 +223,7 @@ func (suite *KeeperTestSuite) mockValidateBalance(acc sdk.AccountI) { suite.authKeeper.EXPECT().GetAccount(suite.ctx, acc.GetAddress()).Return(acc) } -func (suite *KeeperTestSuite) mockSpendableCoins(ctx sdk.Context, acc sdk.AccountI) { +func (suite *KeeperTestSuite) mockSpendableCoins(ctx context.Context, acc sdk.AccountI) { suite.authKeeper.EXPECT().GetAccount(ctx, acc.GetAddress()).Return(acc) } @@ -1399,16 +1392,19 @@ func (suite *KeeperTestSuite) TestMsgSendEvents() { }, } - ctx := sdk.UnwrapSDKContext(suite.ctx) + events := suite.env.MemEventsService().GetEvents(suite.ctx) // events are shifted due to the funding account events - events := ctx.EventManager().Events() require.Equal(8, len(events)) require.Equal(event1.Type, events[7].Type) attrs, err := event1.Attributes() require.NoError(err) + + attrs, err = events[7].Attributes() + require.NoError(err) + for i := range attrs { - require.Equal(attrs[i].Key, events[7].Attributes[i].Key) - require.Equal(attrs[i].Value, events[7].Attributes[i].Value) + require.Equal(attrs[i].Key, attrs[i].Key) + require.Equal(attrs[i].Value, attrs[i].Value) } } @@ -1573,7 +1569,7 @@ func (suite *KeeperTestSuite) TestSpendableCoins() { } func (suite *KeeperTestSuite) TestVestingAccountSend() { - ctx := sdk.UnwrapSDKContext(suite.ctx) + ctx := suite.ctx require := suite.Require() now := time.Now() endTime := now.Add(24 * time.Hour) @@ -1603,7 +1599,7 @@ func (suite *KeeperTestSuite) TestVestingAccountSend() { } func (suite *KeeperTestSuite) TestPeriodicVestingAccountSend() { - ctx := sdk.UnwrapSDKContext(suite.ctx) + ctx := suite.ctx require := suite.Require() now := time.Now() origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) @@ -1638,7 +1634,7 @@ func (suite *KeeperTestSuite) TestPeriodicVestingAccountSend() { } func (suite *KeeperTestSuite) TestVestingAccountReceive() { - ctx := sdk.UnwrapSDKContext(suite.ctx) + ctx := suite.ctx require := suite.Require() now := time.Now() endTime := now.Add(24 * time.Hour) @@ -1671,7 +1667,7 @@ func (suite *KeeperTestSuite) TestVestingAccountReceive() { } func (suite *KeeperTestSuite) TestPeriodicVestingAccountReceive() { - ctx := sdk.UnwrapSDKContext(suite.ctx) + ctx := suite.ctx require := suite.Require() now := time.Now() @@ -1767,7 +1763,7 @@ func (suite *KeeperTestSuite) TestDelegateCoins_Invalid() { } func (suite *KeeperTestSuite) TestUndelegateCoins() { - ctx := sdk.UnwrapSDKContext(suite.ctx) + ctx := suite.ctx require := suite.Require() now := time.Now() endTime := now.Add(24 * time.Hour) @@ -1777,7 +1773,7 @@ func (suite *KeeperTestSuite) TestUndelegateCoins() { acc0 := authtypes.NewBaseAccountWithAddress(accAddrs[0]) acc1 := authtypes.NewBaseAccountWithAddress(accAddrs[1]) - vacc, err := vesting.NewContinuousVestingAccount(acc0, origCoins, ctx.BlockHeader().Time.Unix(), endTime.Unix()) + vacc, err := vesting.NewContinuousVestingAccount(acc0, origCoins, suite.env.HeaderService().HeaderInfo(ctx).Time.Unix(), endTime.Unix()) suite.Require().NoError(err) suite.mockFundAccount(accAddrs[0]) From 89e5b265f6e92eaec7e9117f1a1478fd1358bbc2 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 20 Dec 2024 17:38:25 -0500 Subject: [PATCH 09/33] no more sdk.context --- x/bank/types/restrictions_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x/bank/types/restrictions_test.go b/x/bank/types/restrictions_test.go index 9f0813b2ab64..bddd05161026 100644 --- a/x/bank/types/restrictions_test.go +++ b/x/bank/types/restrictions_test.go @@ -83,7 +83,7 @@ func (s *MintingRestrictionTestHelper) TestActual(t *testing.T, tp *MintingRestr } else { require.NotNil(t, actual, "resulting MintingRestrictionFn") s.Calls = s.Calls[:0] - err := actual(sdk.Context{}, tp.Coins) + err := actual(context.Background(), tp.Coins) if len(tp.ExpErr) != 0 { assert.EqualError(t, err, tp.ExpErr, "composite MintingRestrictionFn output error") } else { @@ -389,7 +389,7 @@ func TestComposeMintingRestrictions(t *testing.T) { func TestNoOpMintingRestrictionFn(t *testing.T) { var err error testFunc := func() { - err = types.NoOpMintingRestrictionFn(sdk.Context{}, sdk.Coins{}) + err = types.NoOpMintingRestrictionFn(context.Background(), sdk.Coins{}) } require.NotPanics(t, testFunc, "NoOpMintingRestrictionFn") assert.NoError(t, err, "NoOpSendRestrictionFn error") @@ -483,7 +483,7 @@ func (s *SendRestrictionTestHelper) TestActual(t *testing.T, tp *SendRestriction } else { require.NotNil(t, actual, "resulting SendRestrictionFn") s.Calls = s.Calls[:0] - addr, err := actual(sdk.Context{}, tp.FromAddr, tp.ToAddr, tp.Coins) + addr, err := actual(context.Background(), tp.FromAddr, tp.ToAddr, tp.Coins) if len(tp.ExpErr) != 0 { assert.EqualError(t, err, tp.ExpErr, "composite SendRestrictionFn output error") } else { @@ -912,7 +912,7 @@ func TestNoOpSendRestrictionFn(t *testing.T) { var addr sdk.AccAddress var err error testFunc := func() { - addr, err = types.NoOpSendRestrictionFn(sdk.Context{}, sdk.AccAddress("first_addr"), expAddr, sdk.Coins{}) + addr, err = types.NoOpSendRestrictionFn(context.Background(), sdk.AccAddress("first_addr"), expAddr, sdk.Coins{}) } require.NotPanics(t, testFunc, "NoOpSendRestrictionFn") assert.NoError(t, err, "NoOpSendRestrictionFn error") From 05a85771730b92888b6bcf85450e64f701af7b97 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 20 Dec 2024 17:53:44 -0500 Subject: [PATCH 10/33] working --- core/testing/context.go | 6 ++++-- core/testing/environment.go | 9 ++++++++- x/bank/types/send_authorization_test.go | 27 +++++++++---------------- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/core/testing/context.go b/core/testing/context.go index a8a3c3ec4255..d7688e7a9bad 100644 --- a/core/testing/context.go +++ b/core/testing/context.go @@ -26,6 +26,8 @@ func Context() TestContext { protoEvents: map[string][]transaction.Msg{}, header: header.Info{}, execMode: transaction.ExecModeFinalize, + gasConfig: gas.GasConfig{}, + gasMeter: nil, } return TestContext{ @@ -60,7 +62,7 @@ func (t TestContext) WithHeaderInfo(info header.Info) TestContext { } // WithExecMode sets the exec mode on a testing ctx and returns the updated ctx. -func (t TestContext) WithExecMode(mode transaction.ExecMode) context.Context { +func (t TestContext) WithExecMode(mode transaction.ExecMode) TestContext { dummy := unwrap(t.ctx) dummy.execMode = mode @@ -70,7 +72,7 @@ func (t TestContext) WithExecMode(mode transaction.ExecMode) context.Context { } // WithGas sets the gas config and meter on a testing ctx and returns the updated ctx. -func (t TestContext) WithGas(gasConfig gas.GasConfig, gasMeter gas.Meter) context.Context { +func (t TestContext) WithGas(gasConfig gas.GasConfig, gasMeter gas.Meter) TestContext { dummy := unwrap(t.ctx) dummy.gasConfig = gasConfig dummy.gasMeter = gasMeter diff --git a/core/testing/environment.go b/core/testing/environment.go index 32cec6e1290d..a7b8b82eaf70 100644 --- a/core/testing/environment.go +++ b/core/testing/environment.go @@ -1,7 +1,10 @@ package coretesting import ( + "context" + appmodulev2 "cosmossdk.io/core/appmodule/v2" + corecontext "cosmossdk.io/core/context" corelog "cosmossdk.io/core/log" "cosmossdk.io/core/router" "cosmossdk.io/core/store" @@ -26,7 +29,7 @@ func NewTestEnvironment(cfg TestEnvironmentConfig) (TestContext, TestEnvironment memEventService := EventsService(ctx, cfg.ModuleName) memHeaderService := MemHeaderService{} - return ctx, TestEnvironment{ + env := TestEnvironment{ env: appmodulev2.Environment{ Logger: cfg.Logger, BranchService: nil, @@ -42,6 +45,10 @@ func NewTestEnvironment(cfg TestEnvironmentConfig) (TestContext, TestEnvironment memEventsService: memEventService, memHeaderService: memHeaderService, } + + // set internal context to point to environment + ctx.ctx = context.WithValue(ctx.ctx, corecontext.EnvironmentContextKey, env.env) + return ctx, env } func (env TestEnvironment) MemEventsService() MemEventsService { diff --git a/x/bank/types/send_authorization_test.go b/x/bank/types/send_authorization_test.go index bb12f5d2a5f7..cc61b60a1ace 100644 --- a/x/bank/types/send_authorization_test.go +++ b/x/bank/types/send_authorization_test.go @@ -2,21 +2,18 @@ package types_test import ( "context" + "cosmossdk.io/log" "fmt" "testing" "github.com/stretchr/testify/require" - appmodulev2 "cosmossdk.io/core/appmodule/v2" - corecontext "cosmossdk.io/core/context" coregas "cosmossdk.io/core/gas" - coreheader "cosmossdk.io/core/header" + coretesting "cosmossdk.io/core/testing" sdkmath "cosmossdk.io/math" - storetypes "cosmossdk.io/store/types" "cosmossdk.io/x/bank/types" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" - "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -29,17 +26,11 @@ var ( unknownAddrStr = "cosmos1ta047h6lw4hxkmn0wah97h6lta0sml880l" ) -type headerService struct{} - -func (h headerService) HeaderInfo(ctx context.Context) coreheader.Info { - return sdk.UnwrapSDKContext(ctx).HeaderInfo() -} - type mockGasService struct { coregas.Service } -func (m mockGasService) GasMeter(ctx context.Context) coregas.Meter { +func (m mockGasService) GasMeter(_ context.Context) coregas.Meter { return mockGasMeter{} } @@ -53,11 +44,13 @@ func (m mockGasMeter) Consume(amount coregas.Gas, descriptor string) error { func TestSendAuthorization(t *testing.T) { ac := codectestutil.CodecOptions{}.GetAddressCodec() - sdkCtx := testutil.DefaultContextWithDB(t, storetypes.NewKVStoreKey(types.StoreKey), storetypes.NewTransientStoreKey("transient_test")).Ctx.WithHeaderInfo(coreheader.Info{}) - ctx := context.WithValue(sdkCtx.Context(), corecontext.EnvironmentContextKey, appmodulev2.Environment{ - HeaderService: headerService{}, - GasService: mockGasService{}, - }) + cfg := coretesting.TestEnvironmentConfig{ + ModuleName: "bank", + Logger: log.NewNopLogger(), + } + + ctx, _ := coretesting.NewTestEnvironment(cfg) + ctx = ctx.WithGas(coregas.GasConfig{}, mockGasMeter{}) allowList := make([]sdk.AccAddress, 1) allowList[0] = toAddr From f827e73124a1dbb9951c2f4518211b09f4072546 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 20 Dec 2024 18:00:10 -0500 Subject: [PATCH 11/33] lint fixes --- core/testing/gas.go | 1 + core/testing/transaction.go | 1 + x/bank/keeper/keeper_test.go | 26 ++++++++++--------------- x/bank/types/send_authorization_test.go | 13 ++----------- 4 files changed, 14 insertions(+), 27 deletions(-) diff --git a/core/testing/gas.go b/core/testing/gas.go index 89b64a140a06..1aca2a784ade 100644 --- a/core/testing/gas.go +++ b/core/testing/gas.go @@ -2,6 +2,7 @@ package coretesting import ( "context" + "cosmossdk.io/core/gas" ) diff --git a/core/testing/transaction.go b/core/testing/transaction.go index eb53622b923b..7ff46d6f1016 100644 --- a/core/testing/transaction.go +++ b/core/testing/transaction.go @@ -2,6 +2,7 @@ package coretesting import ( "context" + "cosmossdk.io/core/transaction" ) diff --git a/x/bank/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go index 16c852d9c1e1..dc905715b3c3 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -128,11 +128,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (suite *KeeperTestSuite) SetupTest() { - //key := storetypes.NewKVStoreKey(banktypes.StoreKey) - //testCtx := testutil.DefaultContextWithDB(suite.T(), key, storetypes.NewTransientStoreKey("transient_test")) - //ctx := testCtx.Ctx.WithHeaderInfo(header.Info{Time: time.Now()}) encCfg := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}) - testEnironmentConfig := coretesting.TestEnvironmentConfig{ ModuleName: banktypes.ModuleName, Logger: log.NewNopLogger(), @@ -140,10 +136,8 @@ func (suite *KeeperTestSuite) SetupTest() { QueryRouter: nil, } - newCtx, newEnv := coretesting.NewTestEnvironment(testEnironmentConfig) - newCtx = newCtx.WithHeaderInfo(header.Info{Time: time.Now()}) - // env := runtime.NewEnvironment(runtime.NewKVStoreService(key), coretesting.NewNopLogger()) - ctx := newCtx + ctx, env := coretesting.NewTestEnvironment(testEnironmentConfig) + ctx = ctx.WithHeaderInfo(header.Info{Time: time.Now()}) ac := codectestutil.CodecOptions{}.GetAddressCodec() addr, err := ac.BytesToString(accAddrs[4]) @@ -155,11 +149,11 @@ func (suite *KeeperTestSuite) SetupTest() { ctrl := gomock.NewController(suite.T()) authKeeper := banktestutil.NewMockAccountKeeper(ctrl) authKeeper.EXPECT().AddressCodec().Return(ac).AnyTimes() - suite.ctx = newCtx + suite.ctx = ctx suite.authKeeper = authKeeper suite.addrCdc = ac suite.bankKeeper = keeper.NewBaseKeeper( - newEnv.Environment(), + env.Environment(), encCfg.Codec, suite.authKeeper, map[string]bool{addr: true}, @@ -177,7 +171,7 @@ func (suite *KeeperTestSuite) SetupTest() { suite.queryClient = queryServer suite.msgServer = keeper.NewMsgServerImpl(suite.bankKeeper) suite.encCfg = encCfg - suite.env = newEnv + suite.env = env } func (suite *KeeperTestSuite) mockMintCoins(moduleAcc *authtypes.ModuleAccount) { @@ -1396,15 +1390,15 @@ func (suite *KeeperTestSuite) TestMsgSendEvents() { // events are shifted due to the funding account events require.Equal(8, len(events)) require.Equal(event1.Type, events[7].Type) - attrs, err := event1.Attributes() + attrs1, err := event1.Attributes() require.NoError(err) - attrs, err = events[7].Attributes() + attrs, err := events[7].Attributes() require.NoError(err) - for i := range attrs { - require.Equal(attrs[i].Key, attrs[i].Key) - require.Equal(attrs[i].Value, attrs[i].Value) + for i := range attrs1 { + require.Equal(attrs1[i].Key, attrs[i].Key) + require.Equal(attrs1[i].Value, attrs[i].Value) } } diff --git a/x/bank/types/send_authorization_test.go b/x/bank/types/send_authorization_test.go index cc61b60a1ace..8f84eb45bc76 100644 --- a/x/bank/types/send_authorization_test.go +++ b/x/bank/types/send_authorization_test.go @@ -1,8 +1,6 @@ package types_test import ( - "context" - "cosmossdk.io/log" "fmt" "testing" @@ -10,6 +8,7 @@ import ( coregas "cosmossdk.io/core/gas" coretesting "cosmossdk.io/core/testing" + "cosmossdk.io/log" sdkmath "cosmossdk.io/math" "cosmossdk.io/x/bank/types" @@ -26,19 +25,11 @@ var ( unknownAddrStr = "cosmos1ta047h6lw4hxkmn0wah97h6lta0sml880l" ) -type mockGasService struct { - coregas.Service -} - -func (m mockGasService) GasMeter(_ context.Context) coregas.Meter { - return mockGasMeter{} -} - type mockGasMeter struct { coregas.Meter } -func (m mockGasMeter) Consume(amount coregas.Gas, descriptor string) error { +func (m mockGasMeter) Consume(_ coregas.Gas, _ string) error { return nil } From 6c7dc2a1329a3b46bb1abd244bd8861fd9ab4af6 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 20 Dec 2024 18:01:23 -0500 Subject: [PATCH 12/33] format --- x/bank/v2/keeper/handlers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x/bank/v2/keeper/handlers.go b/x/bank/v2/keeper/handlers.go index c9da64b9940c..9d36a241ca45 100644 --- a/x/bank/v2/keeper/handlers.go +++ b/x/bank/v2/keeper/handlers.go @@ -3,10 +3,11 @@ package keeper import ( "bytes" "context" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "errors" "fmt" + appmodulev2 "cosmossdk.io/core/appmodule/v2" + "google.golang.org/grpc/codes" "google.golang.org/grpc/status" From 49560834cf1cad1ed94226030c351c9d1188d36c Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 3 Jan 2025 12:25:49 -0500 Subject: [PATCH 13/33] lint --- x/bank/v2/keeper/handlers.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x/bank/v2/keeper/handlers.go b/x/bank/v2/keeper/handlers.go index 9d36a241ca45..fcd883e948da 100644 --- a/x/bank/v2/keeper/handlers.go +++ b/x/bank/v2/keeper/handlers.go @@ -6,11 +6,10 @@ import ( "errors" "fmt" - appmodulev2 "cosmossdk.io/core/appmodule/v2" - "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + appmodulev2 "cosmossdk.io/core/appmodule/v2" errorsmod "cosmossdk.io/errors" "cosmossdk.io/x/bank/v2/types" From c7bc69dad1a953a3d784679cffd9f3a76ed833c9 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 3 Jan 2025 12:32:13 -0500 Subject: [PATCH 14/33] tidy all --- x/bank/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/bank/go.mod b/x/bank/go.mod index fa3680161159..4f9b06f71e77 100644 --- a/x/bank/go.mod +++ b/x/bank/go.mod @@ -8,7 +8,7 @@ require ( cosmossdk.io/core v1.0.0-alpha.6 cosmossdk.io/depinject v1.1.0 cosmossdk.io/errors v1.0.1 - cosmossdk.io/log v1.5.0 // indirect + cosmossdk.io/log v1.5.0 cosmossdk.io/math v1.4.0 cosmossdk.io/store v1.10.0-rc.1 github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect From d42ac1f1fe366a9b1c4f2e41c3a5b127a28e9108 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Mon, 6 Jan 2025 14:29:52 -0500 Subject: [PATCH 15/33] clean --- core/testing/context.go | 34 +++++-------------- core/testing/environment.go | 13 +++---- .../integration/distribution/genesis_test.go | 9 ++--- x/bank/keeper/keeper_test.go | 2 +- 4 files changed, 19 insertions(+), 39 deletions(-) diff --git a/core/testing/context.go b/core/testing/context.go index d7688e7a9bad..ec3248e6405e 100644 --- a/core/testing/context.go +++ b/core/testing/context.go @@ -2,8 +2,6 @@ package coretesting import ( "context" - "time" - "cosmossdk.io/core/event" "cosmossdk.io/core/gas" "cosmossdk.io/core/header" @@ -16,7 +14,7 @@ type dummyKey struct{} var _ context.Context = &TestContext{} type TestContext struct { - ctx context.Context + context.Context } func Context() TestContext { @@ -31,54 +29,38 @@ func Context() TestContext { } return TestContext{ - ctx: context.WithValue(context.Background(), dummyKey{}, dummy), + Context: context.WithValue(context.Background(), dummyKey{}, dummy), } } -func (t TestContext) Deadline() (deadline time.Time, ok bool) { - return t.ctx.Deadline() -} - -func (t TestContext) Done() <-chan struct{} { - return t.ctx.Done() -} - -func (t TestContext) Err() error { - return t.ctx.Err() -} - -func (t TestContext) Value(key any) any { - return t.ctx.Value(key) -} - // WithHeaderInfo sets the header on a testing ctx and returns the updated ctx. func (t TestContext) WithHeaderInfo(info header.Info) TestContext { - dummy := unwrap(t.ctx) + dummy := unwrap(t.Context) dummy.header = info return TestContext{ - ctx: context.WithValue(t.ctx, dummyKey{}, dummy), + Context: context.WithValue(t.Context, dummyKey{}, dummy), } } // WithExecMode sets the exec mode on a testing ctx and returns the updated ctx. func (t TestContext) WithExecMode(mode transaction.ExecMode) TestContext { - dummy := unwrap(t.ctx) + dummy := unwrap(t.Context) dummy.execMode = mode return TestContext{ - ctx: context.WithValue(t.ctx, dummyKey{}, dummy), + Context: context.WithValue(t.Context, dummyKey{}, dummy), } } // WithGas sets the gas config and meter on a testing ctx and returns the updated ctx. func (t TestContext) WithGas(gasConfig gas.GasConfig, gasMeter gas.Meter) TestContext { - dummy := unwrap(t.ctx) + dummy := unwrap(t.Context) dummy.gasConfig = gasConfig dummy.gasMeter = gasMeter return TestContext{ - ctx: context.WithValue(t.ctx, dummyKey{}, dummy), + Context: context.WithValue(t.Context, dummyKey{}, dummy), } } diff --git a/core/testing/environment.go b/core/testing/environment.go index a7b8b82eaf70..e3f50f6d014d 100644 --- a/core/testing/environment.go +++ b/core/testing/environment.go @@ -18,7 +18,8 @@ type TestEnvironmentConfig struct { } type TestEnvironment struct { - env appmodulev2.Environment + appmodulev2.Environment + memEventsService MemEventsService memHeaderService MemHeaderService } @@ -30,7 +31,7 @@ func NewTestEnvironment(cfg TestEnvironmentConfig) (TestContext, TestEnvironment memHeaderService := MemHeaderService{} env := TestEnvironment{ - env: appmodulev2.Environment{ + Environment: appmodulev2.Environment{ Logger: cfg.Logger, BranchService: nil, EventService: memEventService, @@ -47,7 +48,7 @@ func NewTestEnvironment(cfg TestEnvironmentConfig) (TestContext, TestEnvironment } // set internal context to point to environment - ctx.ctx = context.WithValue(ctx.ctx, corecontext.EnvironmentContextKey, env.env) + ctx.Context = context.WithValue(ctx.Context, corecontext.EnvironmentContextKey, env.Environment) return ctx, env } @@ -55,12 +56,8 @@ func (env TestEnvironment) MemEventsService() MemEventsService { return env.memEventsService } -func (env TestEnvironment) Environment() appmodulev2.Environment { - return env.env -} - func (env TestEnvironment) KVStoreService() store.KVStoreService { - return env.env.KVStoreService + return env.Environment.KVStoreService } func (env TestEnvironment) HeaderService() MemHeaderService { diff --git a/tests/integration/distribution/genesis_test.go b/tests/integration/distribution/genesis_test.go index a113341496ae..a7612713ae60 100644 --- a/tests/integration/distribution/genesis_test.go +++ b/tests/integration/distribution/genesis_test.go @@ -4,22 +4,23 @@ import ( "encoding/json" "testing" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" + "github.com/stretchr/testify/suite" + corestore "cosmossdk.io/core/store" coretesting "cosmossdk.io/core/testing" "cosmossdk.io/depinject" "cosmossdk.io/log" sdkmath "cosmossdk.io/math" + bankkeeper "cosmossdk.io/x/bank/keeper" "cosmossdk.io/x/distribution/keeper" "cosmossdk.io/x/distribution/types" stakingkeeper "cosmossdk.io/x/staking/keeper" - abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/runtime" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/suite" - - bankkeeper "cosmossdk.io/x/bank/keeper" _ "github.com/cosmos/cosmos-sdk/x/auth" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" ) diff --git a/x/bank/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go index dc905715b3c3..82bebe171a87 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -153,7 +153,7 @@ func (suite *KeeperTestSuite) SetupTest() { suite.authKeeper = authKeeper suite.addrCdc = ac suite.bankKeeper = keeper.NewBaseKeeper( - env.Environment(), + env.Environment, encCfg.Codec, suite.authKeeper, map[string]bool{addr: true}, From a6ffa04033ba05db262f03247abacb813770cb59 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Mon, 6 Jan 2025 15:55:39 -0500 Subject: [PATCH 16/33] use mocked query client --- core/testing/context.go | 1 + schema/appdata/mux.go | 2 +- testutil/queryclient/queryclient.go | 131 ++++++++++++++++++++++++++++ x/bank/keeper/grpc_query_test.go | 2 +- x/bank/keeper/keeper_test.go | 9 +- 5 files changed, 139 insertions(+), 6 deletions(-) create mode 100644 testutil/queryclient/queryclient.go diff --git a/core/testing/context.go b/core/testing/context.go index ec3248e6405e..bd036705bcef 100644 --- a/core/testing/context.go +++ b/core/testing/context.go @@ -2,6 +2,7 @@ package coretesting import ( "context" + "cosmossdk.io/core/event" "cosmossdk.io/core/gas" "cosmossdk.io/core/header" diff --git a/schema/appdata/mux.go b/schema/appdata/mux.go index 1eab8b69a6fe..9be2942549d9 100644 --- a/schema/appdata/mux.go +++ b/schema/appdata/mux.go @@ -139,7 +139,7 @@ func ListenerMux(listeners ...Listener) Listener { mux.onBatch = func(batch PacketBatch) error { for _, listener := range listeners { - err := batch.apply(&listener) //nolint:gosec // aliasing is safe here + err := batch.apply(&listener) if err != nil { return err } diff --git a/testutil/queryclient/queryclient.go b/testutil/queryclient/queryclient.go new file mode 100644 index 000000000000..57c2a329e2e1 --- /dev/null +++ b/testutil/queryclient/queryclient.go @@ -0,0 +1,131 @@ +package queryclient + +import ( + "context" + "fmt" + + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" + gogogrpc "github.com/cosmos/gogoproto/grpc" + "google.golang.org/grpc" + "google.golang.org/grpc/encoding" + + "github.com/cosmos/cosmos-sdk/client/grpc/reflection" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" +) + +var ( + _ gogogrpc.ClientConn = &QueryHelper{} + _ gogogrpc.ClientConn = &QueryHelper{} +) + +// QueryHelper is a test utility for building a query client from a proto interface registry. +type QueryHelper struct { + cdc encoding.Codec + routes map[string]GRPCQueryHandler +} + +func NewQueryHelper(interfaceRegistry codectypes.InterfaceRegistry) *QueryHelper { + // instantiate the codec + cdc := codec.NewProtoCodec(interfaceRegistry).GRPCCodec() + // Once we have an interface registry, we can register the interface + // registry reflection gRPC service. + + qH := &QueryHelper{ + cdc: cdc, + routes: map[string]GRPCQueryHandler{}, + } + + reflection.RegisterReflectionServiceServer(qH, reflection.NewReflectionServiceServer(interfaceRegistry)) + + return qH +} + +// Invoke implements the grpc ClientConn.Invoke method +func (q *QueryHelper) Invoke(ctx context.Context, method string, args, reply interface{}, _ ...grpc.CallOption) error { + querier := q.Route(method) + if querier == nil { + return fmt.Errorf("handler not found for %s", method) + } + reqBz, err := q.cdc.Marshal(args) + if err != nil { + return err + } + + res, err := querier(ctx, &abci.QueryRequest{Data: reqBz}) + if err != nil { + return err + } + + err = q.cdc.Unmarshal(res.Value, reply) + if err != nil { + return err + } + + return nil +} + +// NewStream implements the grpc ClientConn.NewStream method +func (q *QueryHelper) NewStream(context.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error) { + panic("not implemented") +} + +// GRPCQueryHandler defines a function type which handles ABCI Query requests +// using gRPC +type GRPCQueryHandler = func(ctx context.Context, req *abci.QueryRequest) (*abci.QueryResponse, error) + +// Route returns the GRPCQueryHandler for a given query route path or nil +// if not found +func (qrt *QueryHelper) Route(path string) GRPCQueryHandler { + handler, found := qrt.routes[path] + if !found { + return nil + } + return handler +} + +// RegisterService implements the gRPC Server.RegisterService method. sd is a gRPC +// service description, handler is an object which implements that gRPC service/ +// +// This functions PANICS: +// - if a protobuf service is registered twice. +func (qrt *QueryHelper) RegisterService(sd *grpc.ServiceDesc, handler interface{}) { + // adds a top-level query handler based on the gRPC service name + for _, method := range sd.Methods { + qrt.registerABCIQueryHandler(sd, method, handler) + } +} + +func (qrt *QueryHelper) registerABCIQueryHandler(sd *grpc.ServiceDesc, method grpc.MethodDesc, handler interface{}) { + fqName := fmt.Sprintf("/%s/%s", sd.ServiceName, method.MethodName) + methodHandler := method.Handler + + _, found := qrt.routes[fqName] + if found { + panic(fmt.Sprintf("handler for %s already registered", fqName)) + } + + qrt.routes[fqName] = func(ctx context.Context, req *abci.QueryRequest) (*abci.QueryResponse, error) { + // call the method handler from the service description with the handler object, + // a wrapped sdk.Context with proto-unmarshaled data from the ABCI request data + res, err := methodHandler(handler, ctx, func(i interface{}) error { + return qrt.cdc.Unmarshal(req.Data, i) + }, nil) + if err != nil { + return nil, err + } + + // proto marshal the result bytes + var resBytes []byte + resBytes, err = qrt.cdc.Marshal(res) + if err != nil { + return nil, err + } + + // return the result bytes as the response value + return &abci.QueryResponse{ + Height: req.Height, + Value: resBytes, + }, nil + } +} diff --git a/x/bank/keeper/grpc_query_test.go b/x/bank/keeper/grpc_query_test.go index c8bd5096d50c..f1e13dc4d93f 100644 --- a/x/bank/keeper/grpc_query_test.go +++ b/x/bank/keeper/grpc_query_test.go @@ -347,7 +347,7 @@ func (suite *KeeperTestSuite) TestQueryParams() { func (suite *KeeperTestSuite) TestQueryDenomsMetadata() { var ( req *types.QueryDenomsMetadataRequest - expMetadata = []types.Metadata{} + expMetadata []types.Metadata ) testCases := []struct { diff --git a/x/bank/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go index 82bebe171a87..31ec3e9974d4 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -27,6 +27,7 @@ import ( codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/testutil/queryclient" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" @@ -117,7 +118,7 @@ type KeeperTestSuite struct { addrCdc address.Codec authKeeper *banktestutil.MockAccountKeeper - queryClient banktypes.QueryServer + queryClient banktypes.QueryClient msgServer banktypes.MsgServer encCfg moduletestutil.TestEncodingConfig @@ -164,11 +165,11 @@ func (suite *KeeperTestSuite) SetupTest() { DefaultSendEnabled: banktypes.DefaultDefaultSendEnabled, })) + queryHelper := queryclient.NewQueryHelper(encCfg.InterfaceRegistry) + banktypes.RegisterQueryServer(queryHelper, suite.bankKeeper) banktypes.RegisterInterfaces(encCfg.InterfaceRegistry) - queryServer := keeper.NewQuerier(&suite.bankKeeper) - - suite.queryClient = queryServer + suite.queryClient = banktypes.NewQueryClient(queryHelper) suite.msgServer = keeper.NewMsgServerImpl(suite.bankKeeper) suite.encCfg = encCfg suite.env = env From fb556645a4a7e33e0adbd6e2cd6ae1bc441a8c37 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Mon, 6 Jan 2025 16:10:04 -0500 Subject: [PATCH 17/33] clean up --- core/testing/environment.go | 28 ++++++++++++++-------------- core/testing/event.go | 22 +++++++++++----------- core/testing/gas.go | 8 ++++---- core/testing/header.go | 6 +++--- core/testing/router.go | 1 - core/testing/transaction.go | 6 +++--- x/bank/keeper/keeper_test.go | 10 +++++----- 7 files changed, 40 insertions(+), 41 deletions(-) diff --git a/core/testing/environment.go b/core/testing/environment.go index e3f50f6d014d..a89bbdb78f2d 100644 --- a/core/testing/environment.go +++ b/core/testing/environment.go @@ -20,31 +20,31 @@ type TestEnvironmentConfig struct { type TestEnvironment struct { appmodulev2.Environment - memEventsService MemEventsService - memHeaderService MemHeaderService + testEventService TestEventService + testHeaderService TestHeaderService } func NewTestEnvironment(cfg TestEnvironmentConfig) (TestContext, TestEnvironment) { ctx := Context() - memEventService := EventsService(ctx, cfg.ModuleName) - memHeaderService := MemHeaderService{} + testEventService := NewTestEventService(ctx, cfg.ModuleName) + testHeaderService := TestHeaderService{} env := TestEnvironment{ Environment: appmodulev2.Environment{ Logger: cfg.Logger, BranchService: nil, - EventService: memEventService, - GasService: MemGasService{}, - HeaderService: memHeaderService, + EventService: testEventService, + GasService: TestGasService{}, + HeaderService: testHeaderService, QueryRouterService: cfg.QueryRouter, MsgRouterService: cfg.MsgRouter, - TransactionService: MemTransactionService{}, + TransactionService: TestTransactionService{}, KVStoreService: KVStoreService(ctx, cfg.ModuleName), MemStoreService: nil, }, - memEventsService: memEventService, - memHeaderService: memHeaderService, + testEventService: testEventService, + testHeaderService: testHeaderService, } // set internal context to point to environment @@ -52,14 +52,14 @@ func NewTestEnvironment(cfg TestEnvironmentConfig) (TestContext, TestEnvironment return ctx, env } -func (env TestEnvironment) MemEventsService() MemEventsService { - return env.memEventsService +func (env TestEnvironment) EventService() TestEventService { + return env.testEventService } func (env TestEnvironment) KVStoreService() store.KVStoreService { return env.Environment.KVStoreService } -func (env TestEnvironment) HeaderService() MemHeaderService { - return env.memHeaderService +func (env TestEnvironment) HeaderService() TestHeaderService { + return env.testHeaderService } diff --git a/core/testing/event.go b/core/testing/event.go index 97385280fdda..d4f61aa2c850 100644 --- a/core/testing/event.go +++ b/core/testing/event.go @@ -7,29 +7,29 @@ import ( "cosmossdk.io/core/transaction" ) -var _ event.Service = (*MemEventsService)(nil) +var _ event.Service = &TestEventService{} -// EventsService attaches an event service to the context. +type TestEventService struct { + moduleName string +} + +// NewTestEventService attaches an event service to the context. // Adding an existing module will reset the events. -func EventsService(ctx context.Context, moduleName string) MemEventsService { +func NewTestEventService(ctx context.Context, moduleName string) TestEventService { unwrap(ctx).events[moduleName] = nil unwrap(ctx).protoEvents[moduleName] = nil - return MemEventsService{moduleName: moduleName} -} - -type MemEventsService struct { - moduleName string + return TestEventService{moduleName: moduleName} } -func (e MemEventsService) EventManager(ctx context.Context) event.Manager { +func (e TestEventService) EventManager(ctx context.Context) event.Manager { return eventManager{moduleName: e.moduleName, ctx: unwrap(ctx)} } -func (e MemEventsService) GetEvents(ctx context.Context) []event.Event { +func (e TestEventService) GetEvents(ctx context.Context) []event.Event { return unwrap(ctx).events[e.moduleName] } -func (e MemEventsService) GetProtoEvents(ctx context.Context) []transaction.Msg { +func (e TestEventService) GetProtoEvents(ctx context.Context) []transaction.Msg { return unwrap(ctx).protoEvents[e.moduleName] } diff --git a/core/testing/gas.go b/core/testing/gas.go index 1aca2a784ade..ba66b45fdfce 100644 --- a/core/testing/gas.go +++ b/core/testing/gas.go @@ -6,17 +6,17 @@ import ( "cosmossdk.io/core/gas" ) -var _ gas.Service = &MemGasService{} +var _ gas.Service = &TestGasService{} -type MemGasService struct{} +type TestGasService struct{} -func (m MemGasService) GasMeter(ctx context.Context) gas.Meter { +func (m TestGasService) GasMeter(ctx context.Context) gas.Meter { dummy := unwrap(ctx) return dummy.gasMeter } -func (m MemGasService) GasConfig(ctx context.Context) gas.GasConfig { +func (m TestGasService) GasConfig(ctx context.Context) gas.GasConfig { dummy := unwrap(ctx) return dummy.gasConfig diff --git a/core/testing/header.go b/core/testing/header.go index ac19145cc587..50ee97e3f828 100644 --- a/core/testing/header.go +++ b/core/testing/header.go @@ -6,10 +6,10 @@ import ( "cosmossdk.io/core/header" ) -var _ header.Service = &MemHeaderService{} +var _ header.Service = &TestHeaderService{} -type MemHeaderService struct{} +type TestHeaderService struct{} -func (e MemHeaderService) HeaderInfo(ctx context.Context) header.Info { +func (e TestHeaderService) HeaderInfo(ctx context.Context) header.Info { return unwrap(ctx).header } diff --git a/core/testing/router.go b/core/testing/router.go index 1d9546d3d4dd..cff995394b96 100644 --- a/core/testing/router.go +++ b/core/testing/router.go @@ -31,7 +31,6 @@ type ReflectionRouterBuilder struct { } func (b *ReflectionRouterBuilder) RegisterHandler(msgType string, handler appmodulev2.HandlerFunc) error { - // panic on override if _, ok := b.handlers[msgType]; ok { return fmt.Errorf("handler already registered: %s", msgType) } diff --git a/core/testing/transaction.go b/core/testing/transaction.go index 7ff46d6f1016..689a3c932016 100644 --- a/core/testing/transaction.go +++ b/core/testing/transaction.go @@ -6,11 +6,11 @@ import ( "cosmossdk.io/core/transaction" ) -var _ transaction.Service = &MemTransactionService{} +var _ transaction.Service = &TestTransactionService{} -type MemTransactionService struct{} +type TestTransactionService struct{} -func (m MemTransactionService) ExecMode(ctx context.Context) transaction.ExecMode { +func (m TestTransactionService) ExecMode(ctx context.Context) transaction.ExecMode { dummy := unwrap(ctx) return dummy.execMode diff --git a/x/bank/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go index 31ec3e9974d4..b73b44967f68 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -1387,7 +1387,7 @@ func (suite *KeeperTestSuite) TestMsgSendEvents() { }, } - events := suite.env.MemEventsService().GetEvents(suite.ctx) + events := suite.env.EventService().GetEvents(suite.ctx) // events are shifted due to the funding account events require.Equal(8, len(events)) require.Equal(event1.Type, events[7].Type) @@ -1432,7 +1432,7 @@ func (suite *KeeperTestSuite) TestMsgMultiSendEvents() { suite.authKeeper.EXPECT().GetAccount(suite.ctx, accAddrs[0]).Return(acc0) require.Error(suite.bankKeeper.InputOutputCoins(ctx, input, outputs)) - events := suite.env.MemEventsService().GetEvents(suite.ctx) + events := suite.env.EventService().GetEvents(suite.ctx) require.Equal(0, len(events)) // Set addr's coins but not accAddrs[1]'s coins @@ -1442,7 +1442,7 @@ func (suite *KeeperTestSuite) TestMsgMultiSendEvents() { suite.mockInputOutputCoins([]sdk.AccountI{acc0}, accAddrs[2:4]) require.NoError(suite.bankKeeper.InputOutputCoins(ctx, input, outputs)) - events = suite.env.MemEventsService().GetEvents(suite.ctx) + events = suite.env.EventService().GetEvents(suite.ctx) require.Equal(10, len(events)) // 10 events because account funding causes extra minting + coin_spent + coin_recv events // Set addr's coins and accAddrs[1]'s coins @@ -1457,7 +1457,7 @@ func (suite *KeeperTestSuite) TestMsgMultiSendEvents() { suite.mockInputOutputCoins([]sdk.AccountI{acc0}, accAddrs[2:4]) require.NoError(suite.bankKeeper.InputOutputCoins(ctx, input, outputs)) - events = suite.env.MemEventsService().GetEvents(suite.ctx) + events = suite.env.EventService().GetEvents(suite.ctx) require.Equal(25, len(events)) // 25 due to account funding + coin_spent + coin_recv events event1 := coreevent.Event{ @@ -1926,7 +1926,7 @@ func (suite *KeeperTestSuite) TestBalanceTrackingEvents() { balances := make(map[string]sdk.Coins) - events := suite.env.MemEventsService().GetEvents(suite.ctx) + events := suite.env.EventService().GetEvents(suite.ctx) for _, e := range events { attributes, err := e.Attributes() From 87fb4f916e1823f6f96a45e2b5a82715c70fae4e Mon Sep 17 00:00:00 2001 From: aljo242 Date: Mon, 6 Jan 2025 16:15:30 -0500 Subject: [PATCH 18/33] lint --- schema/appdata/mux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/appdata/mux.go b/schema/appdata/mux.go index 9be2942549d9..81a4fa795db8 100644 --- a/schema/appdata/mux.go +++ b/schema/appdata/mux.go @@ -139,7 +139,7 @@ func ListenerMux(listeners ...Listener) Listener { mux.onBatch = func(batch PacketBatch) error { for _, listener := range listeners { - err := batch.apply(&listener) + err := batch.apply(&listener) if err != nil { return err } From e18d8090bef72856c0ead57298d098aa8b774b9b Mon Sep 17 00:00:00 2001 From: aljo242 Date: Mon, 6 Jan 2025 16:19:52 -0500 Subject: [PATCH 19/33] server check --- testutil/queryclient/queryclient.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testutil/queryclient/queryclient.go b/testutil/queryclient/queryclient.go index 57c2a329e2e1..1e4a84aa1e22 100644 --- a/testutil/queryclient/queryclient.go +++ b/testutil/queryclient/queryclient.go @@ -16,7 +16,7 @@ import ( var ( _ gogogrpc.ClientConn = &QueryHelper{} - _ gogogrpc.ClientConn = &QueryHelper{} + _ gogogrpc.Server = &QueryHelper{} ) // QueryHelper is a test utility for building a query client from a proto interface registry. From f67b33fc00d46ebcc29a7b0cc9f758b3f089132c Mon Sep 17 00:00:00 2001 From: aljo242 Date: Tue, 7 Jan 2025 09:46:10 -0500 Subject: [PATCH 20/33] lint-fix --- x/bank/keeper/grpc_query_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/bank/keeper/grpc_query_test.go b/x/bank/keeper/grpc_query_test.go index 896901f406c3..9560645cb94a 100644 --- a/x/bank/keeper/grpc_query_test.go +++ b/x/bank/keeper/grpc_query_test.go @@ -147,7 +147,7 @@ func (suite *KeeperTestSuite) TestQueryAllBalances() { } req = types.NewQueryAllBalancesRequest(addrStr, pageReq, true) testFunc := func() { - res, err = queryClient.AllBalances(gocontext.Background(), req) + res, err = queryClient.AllBalances(ctx, req) } suite.Require().NotPanics(testFunc, "AllBalances with resolve denom + incomplete metadata") suite.Require().NoError(err) From 47a681e0401075bdc5f1af4cf2b50758c56b5f46 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Wed, 8 Jan 2025 09:52:38 -0500 Subject: [PATCH 21/33] init test --- core/testing/router_test.go | 1 + 1 file changed, 1 insertion(+) create mode 100644 core/testing/router_test.go diff --git a/core/testing/router_test.go b/core/testing/router_test.go new file mode 100644 index 000000000000..77ead1aa96a0 --- /dev/null +++ b/core/testing/router_test.go @@ -0,0 +1 @@ +package coretesting From 9f5432413dd567147d500808a6f11afce159d3da Mon Sep 17 00:00:00 2001 From: aljo242 Date: Wed, 8 Jan 2025 14:43:27 -0500 Subject: [PATCH 22/33] rm --- core/testing/router.go | 158 ------------------------------------ core/testing/router_test.go | 1 - 2 files changed, 159 deletions(-) delete mode 100644 core/testing/router.go delete mode 100644 core/testing/router_test.go diff --git a/core/testing/router.go b/core/testing/router.go deleted file mode 100644 index cff995394b96..000000000000 --- a/core/testing/router.go +++ /dev/null @@ -1,158 +0,0 @@ -package coretesting - -import ( - "context" - "errors" - "fmt" - "reflect" - - appmodulev2 "cosmossdk.io/core/appmodule/v2" - "cosmossdk.io/core/router" - "cosmossdk.io/core/transaction" -) - -var ErrNoHandler = errors.New("no handler") - -// NewMsgRouterBuilder is a router that routes messages to their respective handlers. -func NewMsgRouterBuilder() *ReflectionRouterBuilder { - return &ReflectionRouterBuilder{ - handlers: make(map[string]appmodulev2.HandlerFunc), - preHandlers: make(map[string][]appmodulev2.PreMsgHandler), - postHandlers: make(map[string][]appmodulev2.PostMsgHandler), - } -} - -type ReflectionRouterBuilder struct { - handlers map[string]appmodulev2.HandlerFunc - globalPreHandlers []appmodulev2.PreMsgHandler - preHandlers map[string][]appmodulev2.PreMsgHandler - postHandlers map[string][]appmodulev2.PostMsgHandler - globalPostHandlers []appmodulev2.PostMsgHandler -} - -func (b *ReflectionRouterBuilder) RegisterHandler(msgType string, handler appmodulev2.HandlerFunc) error { - if _, ok := b.handlers[msgType]; ok { - return fmt.Errorf("handler already registered: %s", msgType) - } - b.handlers[msgType] = handler - return nil -} - -func (b *ReflectionRouterBuilder) RegisterGlobalPreMsgHandler(handler appmodulev2.PreMsgHandler) { - b.globalPreHandlers = append(b.globalPreHandlers, handler) -} - -func (b *ReflectionRouterBuilder) RegisterPreMsgHandler(msgType string, handler appmodulev2.PreMsgHandler) { - b.preHandlers[msgType] = append(b.preHandlers[msgType], handler) -} - -func (b *ReflectionRouterBuilder) RegisterPostMsgHandler(msgType string, handler appmodulev2.PostMsgHandler) { - b.postHandlers[msgType] = append(b.postHandlers[msgType], handler) -} - -func (b *ReflectionRouterBuilder) RegisterGlobalPostMsgHandler(handler appmodulev2.PostMsgHandler) { - b.globalPostHandlers = append(b.globalPostHandlers, handler) -} - -func (b *ReflectionRouterBuilder) HandlerExists(msgType string) bool { - _, ok := b.handlers[msgType] - return ok -} - -func (b *ReflectionRouterBuilder) Build() (ReflectionRouter, error) { - handlers := make(map[string]appmodulev2.HandlerFunc) - - globalPreHandler := func(ctx context.Context, msg transaction.Msg) error { - for _, h := range b.globalPreHandlers { - err := h(ctx, msg) - if err != nil { - return err - } - } - return nil - } - - globalPostHandler := func(ctx context.Context, msg, msgResp transaction.Msg) error { - for _, h := range b.globalPostHandlers { - err := h(ctx, msg, msgResp) - if err != nil { - return err - } - } - return nil - } - - for msgType, handler := range b.handlers { - // find pre handler - preHandlers := b.preHandlers[msgType] - // find post handler - postHandlers := b.postHandlers[msgType] - // build the handler - handlers[msgType] = buildHandler(handler, preHandlers, globalPreHandler, postHandlers, globalPostHandler) - } - - return ReflectionRouter{ - handlers: handlers, - }, nil -} - -func buildHandler( - handler appmodulev2.HandlerFunc, - preHandlers []appmodulev2.PreMsgHandler, - globalPreHandler appmodulev2.PreMsgHandler, - postHandlers []appmodulev2.PostMsgHandler, - globalPostHandler appmodulev2.PostMsgHandler, -) appmodulev2.HandlerFunc { - return func(ctx context.Context, msg transaction.Msg) (msgResp transaction.Msg, err error) { - if len(preHandlers) != 0 { - for _, preHandler := range preHandlers { - if err := preHandler(ctx, msg); err != nil { - return nil, err - } - } - } - err = globalPreHandler(ctx, msg) - if err != nil { - return nil, err - } - msgResp, err = handler(ctx, msg) - if err != nil { - return nil, err - } - - if len(postHandlers) != 0 { - for _, postHandler := range postHandlers { - if err := postHandler(ctx, msg, msgResp); err != nil { - return nil, err - } - } - } - err = globalPostHandler(ctx, msg, msgResp) - return msgResp, err - } -} - -var _ router.Service = (*ReflectionRouter)(nil) - -// ReflectionRouter implements the STF router for msg and query handlers. -type ReflectionRouter struct { - handlers map[string]appmodulev2.HandlerFunc -} - -func (r ReflectionRouter) CanInvoke(_ context.Context, typeURL string) error { - _, exists := r.handlers[typeURL] - if !exists { - return fmt.Errorf("%w: %s", ErrNoHandler, typeURL) - } - return nil -} - -func (r ReflectionRouter) Invoke(ctx context.Context, req transaction.Msg) (res transaction.Msg, err error) { - typeName := reflect.TypeOf(req).String() - handler, exists := r.handlers[typeName] - if !exists { - return nil, fmt.Errorf("%w: %s", ErrNoHandler, typeName) - } - - return handler(ctx, req) -} diff --git a/core/testing/router_test.go b/core/testing/router_test.go deleted file mode 100644 index 77ead1aa96a0..000000000000 --- a/core/testing/router_test.go +++ /dev/null @@ -1 +0,0 @@ -package coretesting From 1838bbf777b87c91d59453bc436a124198c3b6e6 Mon Sep 17 00:00:00 2001 From: Alex | Interchain Labs Date: Thu, 9 Jan 2025 12:43:46 -0500 Subject: [PATCH 23/33] Update testutil/queryclient/queryclient.go Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com> --- testutil/queryclient/queryclient.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testutil/queryclient/queryclient.go b/testutil/queryclient/queryclient.go index 1e4a84aa1e22..406a754deea3 100644 --- a/testutil/queryclient/queryclient.go +++ b/testutil/queryclient/queryclient.go @@ -31,14 +31,14 @@ func NewQueryHelper(interfaceRegistry codectypes.InterfaceRegistry) *QueryHelper // Once we have an interface registry, we can register the interface // registry reflection gRPC service. - qH := &QueryHelper{ + qh := &QueryHelper{ cdc: cdc, routes: map[string]GRPCQueryHandler{}, } - reflection.RegisterReflectionServiceServer(qH, reflection.NewReflectionServiceServer(interfaceRegistry)) + reflection.RegisterReflectionServiceServer(qh, reflection.NewReflectionServiceServer(interfaceRegistry)) - return qH + return qh } // Invoke implements the grpc ClientConn.Invoke method From e932ea5719b1ae445abf4e54a6807f7fee6dec9d Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Jan 2025 12:45:20 -0500 Subject: [PATCH 24/33] q --- testutil/queryclient/queryclient.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/testutil/queryclient/queryclient.go b/testutil/queryclient/queryclient.go index 406a754deea3..8502fcb5d5bd 100644 --- a/testutil/queryclient/queryclient.go +++ b/testutil/queryclient/queryclient.go @@ -76,8 +76,8 @@ type GRPCQueryHandler = func(ctx context.Context, req *abci.QueryRequest) (*abci // Route returns the GRPCQueryHandler for a given query route path or nil // if not found -func (qrt *QueryHelper) Route(path string) GRPCQueryHandler { - handler, found := qrt.routes[path] +func (q *QueryHelper) Route(path string) GRPCQueryHandler { + handler, found := q.routes[path] if !found { return nil } @@ -89,27 +89,27 @@ func (qrt *QueryHelper) Route(path string) GRPCQueryHandler { // // This functions PANICS: // - if a protobuf service is registered twice. -func (qrt *QueryHelper) RegisterService(sd *grpc.ServiceDesc, handler interface{}) { +func (q *QueryHelper) RegisterService(sd *grpc.ServiceDesc, handler interface{}) { // adds a top-level query handler based on the gRPC service name for _, method := range sd.Methods { - qrt.registerABCIQueryHandler(sd, method, handler) + q.registerABCIQueryHandler(sd, method, handler) } } -func (qrt *QueryHelper) registerABCIQueryHandler(sd *grpc.ServiceDesc, method grpc.MethodDesc, handler interface{}) { +func (q *QueryHelper) registerABCIQueryHandler(sd *grpc.ServiceDesc, method grpc.MethodDesc, handler interface{}) { fqName := fmt.Sprintf("/%s/%s", sd.ServiceName, method.MethodName) methodHandler := method.Handler - _, found := qrt.routes[fqName] + _, found := q.routes[fqName] if found { panic(fmt.Sprintf("handler for %s already registered", fqName)) } - qrt.routes[fqName] = func(ctx context.Context, req *abci.QueryRequest) (*abci.QueryResponse, error) { + q.routes[fqName] = func(ctx context.Context, req *abci.QueryRequest) (*abci.QueryResponse, error) { // call the method handler from the service description with the handler object, // a wrapped sdk.Context with proto-unmarshaled data from the ABCI request data res, err := methodHandler(handler, ctx, func(i interface{}) error { - return qrt.cdc.Unmarshal(req.Data, i) + return q.cdc.Unmarshal(req.Data, i) }, nil) if err != nil { return nil, err @@ -117,7 +117,7 @@ func (qrt *QueryHelper) registerABCIQueryHandler(sd *grpc.ServiceDesc, method gr // proto marshal the result bytes var resBytes []byte - resBytes, err = qrt.cdc.Marshal(res) + resBytes, err = q.cdc.Marshal(res) if err != nil { return nil, err } From d759e145a1ea2e0783d75a5138185970ab531c50 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Mon, 13 Jan 2025 14:44:06 -0500 Subject: [PATCH 25/33] move out of intrgration --- tests/go.mod | 25 ++++------ tests/integration/v2/accounts/fixture_test.go | 9 ++-- tests/integration/v2/accounts/lockup/utils.go | 9 ++-- .../v2/accounts/multisig/test_suite.go | 9 ++-- tests/integration/v2/auth/app_test.go | 9 ++-- .../v2/distribution/fixture_test.go | 9 ++-- tests/integration/v2/gov/common_test.go | 9 ++-- .../integration/v2/gov/keeper/fixture_test.go | 9 ++-- tests/integration/v2/services.go | 40 --------------- testutil/msgrouter/msgrouter.go | 50 +++++++++++++++++++ x/accounts/go.mod | 6 ++- x/accounts/go.sum | 4 +- x/accounts/utils_test.go | 21 +++++--- 13 files changed, 118 insertions(+), 91 deletions(-) create mode 100644 testutil/msgrouter/msgrouter.go diff --git a/tests/go.mod b/tests/go.mod index 880f707593f9..b402846280b7 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -6,16 +6,27 @@ require ( cosmossdk.io/api v0.8.1 cosmossdk.io/collections v1.0.0 cosmossdk.io/core v1.0.0 + cosmossdk.io/core/testing v0.0.1 cosmossdk.io/depinject v1.1.0 cosmossdk.io/log v1.5.0 cosmossdk.io/math v1.5.0 + cosmossdk.io/runtime/v2 v2.0.0-20240911143651-72620a577660 + cosmossdk.io/server/v2/stf v1.0.0-beta.1 cosmossdk.io/store v1.10.0-rc.1 + cosmossdk.io/store/v2 v2.0.0-beta.1 cosmossdk.io/x/tx v1.0.0 github.com/cometbft/cometbft v1.0.0 + github.com/cometbft/cometbft/api v1.0.0 + github.com/cosmos/cosmos-db v1.1.1 github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/gogoproto v1.7.0 + github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/go-cmp v0.6.0 + github.com/google/gofuzz v1.2.0 github.com/spf13/cobra v1.8.1 // indirect + github.com/spf13/viper v1.19.0 github.com/stretchr/testify v1.10.0 + gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b go.uber.org/mock v0.5.0 google.golang.org/grpc v1.69.2 google.golang.org/protobuf v1.36.2 @@ -23,20 +34,6 @@ require ( pgregory.net/rapid v1.1.0 ) -require ( - cosmossdk.io/core/testing v0.0.1 - cosmossdk.io/runtime/v2 v2.0.0-20240911143651-72620a577660 - cosmossdk.io/server/v2/stf v1.0.0-beta.1 - cosmossdk.io/store/v2 v2.0.0-beta.1 - github.com/cometbft/cometbft/api v1.0.0 - github.com/cosmos/cosmos-db v1.1.1 - github.com/gogo/protobuf v1.3.2 // indirect - github.com/google/go-cmp v0.6.0 - github.com/google/gofuzz v1.2.0 - github.com/spf13/viper v1.19.0 - gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b -) - require ( cosmossdk.io/x/accounts v0.0.0-00010101000000-000000000000 cosmossdk.io/x/accounts/defaults/base v0.0.0-00010101000000-000000000000 diff --git a/tests/integration/v2/accounts/fixture_test.go b/tests/integration/v2/accounts/fixture_test.go index 2a9a5c9aada7..016c12dc92e1 100644 --- a/tests/integration/v2/accounts/fixture_test.go +++ b/tests/integration/v2/accounts/fixture_test.go @@ -29,6 +29,7 @@ import ( codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/tests/integration/v2" "github.com/cosmos/cosmos-sdk/testutil/configurator" + "github.com/cosmos/cosmos-sdk/testutil/msgrouter" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/auth" @@ -144,14 +145,14 @@ func initFixture(t *testing.T, f authentiacteFunc) *fixture { var err error startupCfg := integration.DefaultStartUpConfig(t) - msgRouterService := integration.NewRouterService() + msgRouterService := msgrouter.NewRouterService() fixture.registerMsgRouterService(msgRouterService) var routerFactory runtime.RouterServiceFactory = func(_ []byte) router.Service { return msgRouterService } - queryRouterService := integration.NewRouterService() + queryRouterService := msgrouter.NewRouterService() fixture.registerQueryRouterService(queryRouterService) serviceBuilder := runtime.NewRouterBuilder(routerFactory, queryRouterService) @@ -188,7 +189,7 @@ func initFixture(t *testing.T, f authentiacteFunc) *fixture { return fixture } -func (f *fixture) registerMsgRouterService(router *integration.RouterService) { +func (f *fixture) registerMsgRouterService(router *msgrouter.RouterService) { // register custom router service bankSendHandler := func(ctx context.Context, req transaction.Msg) (transaction.Msg, error) { msg, ok := req.(*banktypes.MsgSend) @@ -203,7 +204,7 @@ func (f *fixture) registerMsgRouterService(router *integration.RouterService) { router.RegisterHandler(bankSendHandler, "cosmos.bank.v1beta1.MsgSend") } -func (f *fixture) registerQueryRouterService(router *integration.RouterService) { +func (f *fixture) registerQueryRouterService(router *msgrouter.RouterService) { // register custom router service queryHandler := func(ctx context.Context, msg transaction.Msg) (transaction.Msg, error) { req, ok := msg.(*accountsv1.AccountNumberRequest) diff --git a/tests/integration/v2/accounts/lockup/utils.go b/tests/integration/v2/accounts/lockup/utils.go index e5e50c21682c..4b104b34a8fc 100644 --- a/tests/integration/v2/accounts/lockup/utils.go +++ b/tests/integration/v2/accounts/lockup/utils.go @@ -31,6 +31,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/tests/integration/v2" "github.com/cosmos/cosmos-sdk/testutil/configurator" + "github.com/cosmos/cosmos-sdk/testutil/msgrouter" sdk "github.com/cosmos/cosmos-sdk/types" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring`` @@ -78,14 +79,14 @@ func (s *IntegrationTestSuite) SetupSuite() { var err error startupCfg := integration.DefaultStartUpConfig(s.T()) - msgRouterService := integration.NewRouterService() + msgRouterService := msgrouter.NewRouterService() s.registerMsgRouterService(msgRouterService) var routerFactory runtime.RouterServiceFactory = func(_ []byte) router.Service { return msgRouterService } - queryRouterService := integration.NewRouterService() + queryRouterService := msgrouter.NewRouterService() s.registerQueryRouterService(queryRouterService) serviceBuilder := runtime.NewRouterBuilder(routerFactory, queryRouterService) @@ -113,7 +114,7 @@ func (s *IntegrationTestSuite) SetupSuite() { s.ctx = s.app.StateLatestContext(s.T()) } -func (s *IntegrationTestSuite) registerMsgRouterService(router *integration.RouterService) { +func (s *IntegrationTestSuite) registerMsgRouterService(router *msgrouter.RouterService) { // register custom router service bankSendHandler := func(ctx context.Context, req transaction.Msg) (transaction.Msg, error) { msg, ok := req.(*banktypes.MsgSend) @@ -161,7 +162,7 @@ func (s *IntegrationTestSuite) registerMsgRouterService(router *integration.Rout router.RegisterHandler(distrWithdrawRewardHandler, "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward") } -func (s *IntegrationTestSuite) registerQueryRouterService(router *integration.RouterService) { +func (s *IntegrationTestSuite) registerQueryRouterService(router *msgrouter.RouterService) { // register custom router service stakingParamsQueryHandler := func(ctx context.Context, msg transaction.Msg) (transaction.Msg, error) { req, ok := msg.(*stakingtypes.QueryParamsRequest) diff --git a/tests/integration/v2/accounts/multisig/test_suite.go b/tests/integration/v2/accounts/multisig/test_suite.go index e71c432f7495..55853891167f 100644 --- a/tests/integration/v2/accounts/multisig/test_suite.go +++ b/tests/integration/v2/accounts/multisig/test_suite.go @@ -30,6 +30,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/tests/integration/v2" "github.com/cosmos/cosmos-sdk/testutil/configurator" + "github.com/cosmos/cosmos-sdk/testutil/msgrouter" sdk "github.com/cosmos/cosmos-sdk/types" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring`` @@ -73,14 +74,14 @@ func (s *IntegrationTestSuite) SetupSuite() { var err error startupCfg := integration.DefaultStartUpConfig(s.T()) - msgRouterService := integration.NewRouterService() + msgRouterService := msgrouter.NewRouterService() s.registerMsgRouterService(msgRouterService) var routerFactory runtime.RouterServiceFactory = func(_ []byte) router.Service { return msgRouterService } - queryRouterService := integration.NewRouterService() + queryRouterService := msgrouter.NewRouterService() s.registerQueryRouterService(queryRouterService) serviceBuilder := runtime.NewRouterBuilder(routerFactory, queryRouterService) @@ -115,7 +116,7 @@ func (s *IntegrationTestSuite) SetupSuite() { } } -func (s *IntegrationTestSuite) registerMsgRouterService(router *integration.RouterService) { +func (s *IntegrationTestSuite) registerMsgRouterService(router *msgrouter.RouterService) { // register custom router service bankSendHandler := func(ctx context.Context, req transaction.Msg) (transaction.Msg, error) { msg, ok := req.(*banktypes.MsgSend) @@ -142,7 +143,7 @@ func (s *IntegrationTestSuite) registerMsgRouterService(router *integration.Rout router.RegisterHandler(accountsExeccHandler, "cosmos.accounts.v1.MsgExecute") } -func (s *IntegrationTestSuite) registerQueryRouterService(router *integration.RouterService) { +func (s *IntegrationTestSuite) registerQueryRouterService(router *msgrouter.RouterService) { // register custom router service bankBalanceQueryHandler := func(ctx context.Context, msg transaction.Msg) (transaction.Msg, error) { req, ok := msg.(*banktypes.QueryBalanceRequest) diff --git a/tests/integration/v2/auth/app_test.go b/tests/integration/v2/auth/app_test.go index 6331492b014c..987cc2083fa9 100644 --- a/tests/integration/v2/auth/app_test.go +++ b/tests/integration/v2/auth/app_test.go @@ -24,6 +24,7 @@ import ( "github.com/cosmos/cosmos-sdk/tests/integration/v2" "github.com/cosmos/cosmos-sdk/testutil/configurator" + "github.com/cosmos/cosmos-sdk/testutil/msgrouter" _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring`` @@ -65,14 +66,14 @@ func createTestSuite(t *testing.T) *suite { var err error startupCfg := integration.DefaultStartUpConfig(t) - msgRouterService := integration.NewRouterService() + msgRouterService := msgrouter.NewRouterService() res.registerMsgRouterService(msgRouterService) var routerFactory runtime.RouterServiceFactory = func(_ []byte) router.Service { return msgRouterService } - queryRouterService := integration.NewRouterService() + queryRouterService := msgrouter.NewRouterService() res.registerQueryRouterService(queryRouterService) serviceBuilder := runtime.NewRouterBuilder(routerFactory, queryRouterService) @@ -103,7 +104,7 @@ func createTestSuite(t *testing.T) *suite { return &res } -func (s *suite) registerMsgRouterService(router *integration.RouterService) { +func (s *suite) registerMsgRouterService(router *msgrouter.RouterService) { // register custom router service bankSendHandler := func(ctx context.Context, req transaction.Msg) (transaction.Msg, error) { msg, ok := req.(*banktypes.MsgSend) @@ -118,7 +119,7 @@ func (s *suite) registerMsgRouterService(router *integration.RouterService) { router.RegisterHandler(bankSendHandler, "cosmos.bank.v1beta1.MsgSend") } -func (s *suite) registerQueryRouterService(router *integration.RouterService) { +func (s *suite) registerQueryRouterService(router *msgrouter.RouterService) { // register custom router service queryHandler := func(ctx context.Context, msg transaction.Msg) (transaction.Msg, error) { req, ok := msg.(*accountsv1.AccountNumberRequest) diff --git a/tests/integration/v2/distribution/fixture_test.go b/tests/integration/v2/distribution/fixture_test.go index f84278be5555..40191519585e 100644 --- a/tests/integration/v2/distribution/fixture_test.go +++ b/tests/integration/v2/distribution/fixture_test.go @@ -25,6 +25,7 @@ import ( poolkeeper "cosmossdk.io/x/protocolpool/keeper" _ "cosmossdk.io/x/staking" // import as blank for app wiring stakingkeeper "cosmossdk.io/x/staking/keeper" + "github.com/cosmos/cosmos-sdk/testutil/msgrouter" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/tests/integration/v2" @@ -88,14 +89,14 @@ func createTestFixture(t *testing.T) *fixture { var err error startupCfg := integration.DefaultStartUpConfig(t) - msgRouterService := integration.NewRouterService() + msgRouterService := msgrouter.NewRouterService() res.registerMsgRouterService(msgRouterService) var routerFactory runtime.RouterServiceFactory = func(_ []byte) router.Service { return msgRouterService } - queryRouterService := integration.NewRouterService() + queryRouterService := msgrouter.NewRouterService() res.registerQueryRouterService(queryRouterService) serviceBuilder := runtime.NewRouterBuilder(routerFactory, queryRouterService) @@ -139,7 +140,7 @@ func createTestFixture(t *testing.T) *fixture { return &res } -func (s *fixture) registerMsgRouterService(router *integration.RouterService) { +func (s *fixture) registerMsgRouterService(router *msgrouter.RouterService) { // register custom router service bankSendHandler := func(ctx context.Context, req transaction.Msg) (transaction.Msg, error) { msg, ok := req.(*banktypes.MsgSend) @@ -154,6 +155,6 @@ func (s *fixture) registerMsgRouterService(router *integration.RouterService) { router.RegisterHandler(bankSendHandler, "cosmos.bank.v1beta1.MsgSend") } -func (s *fixture) registerQueryRouterService(router *integration.RouterService) { +func (s *fixture) registerQueryRouterService(_ *msgrouter.RouterService) { // register custom router service } diff --git a/tests/integration/v2/gov/common_test.go b/tests/integration/v2/gov/common_test.go index 176a0589b0e0..22ce4d77481a 100644 --- a/tests/integration/v2/gov/common_test.go +++ b/tests/integration/v2/gov/common_test.go @@ -37,6 +37,7 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/tests/integration/v2" "github.com/cosmos/cosmos-sdk/testutil/configurator" + "github.com/cosmos/cosmos-sdk/testutil/msgrouter" sdk "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/x/auth" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" @@ -144,14 +145,14 @@ func createTestSuite(t *testing.T, genesisBehavior int) suite { startupCfg := integration.DefaultStartUpConfig(t) - msgRouterService := integration.NewRouterService() + msgRouterService := msgrouter.NewRouterService() res.registerMsgRouterService(msgRouterService) var routerFactory runtime.RouterServiceFactory = func(_ []byte) router.Service { return msgRouterService } - queryRouterService := integration.NewRouterService() + queryRouterService := msgrouter.NewRouterService() res.registerQueryRouterService(queryRouterService) serviceBuilder := runtime.NewRouterBuilder(routerFactory, queryRouterService) @@ -173,7 +174,7 @@ func createTestSuite(t *testing.T, genesisBehavior int) suite { return res } -func (s *suite) registerMsgRouterService(router *integration.RouterService) { +func (s *suite) registerMsgRouterService(router *msgrouter.RouterService) { // register custom router service bankSendHandler := func(ctx context.Context, req transaction.Msg) (transaction.Msg, error) { msg, ok := req.(*banktypes.MsgSend) @@ -202,5 +203,5 @@ func (s *suite) registerMsgRouterService(router *integration.RouterService) { router.RegisterHandler(govSubmitProposalHandler, "/cosmos.gov.v1.MsgExecLegacyContent") } -func (f *suite) registerQueryRouterService(router *integration.RouterService) { +func (f *suite) registerQueryRouterService(_ *msgrouter.RouterService) { } diff --git a/tests/integration/v2/gov/keeper/fixture_test.go b/tests/integration/v2/gov/keeper/fixture_test.go index dc15c9e6737c..8d3cfacd5bc5 100644 --- a/tests/integration/v2/gov/keeper/fixture_test.go +++ b/tests/integration/v2/gov/keeper/fixture_test.go @@ -25,6 +25,7 @@ import ( "github.com/cosmos/cosmos-sdk/tests/integration/v2" "github.com/cosmos/cosmos-sdk/testutil/configurator" + "github.com/cosmos/cosmos-sdk/testutil/msgrouter" _ "github.com/cosmos/cosmos-sdk/x/auth" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" ) @@ -59,14 +60,14 @@ func initFixture(t *testing.T) *fixture { startupCfg := integration.DefaultStartUpConfig(t) - msgRouterService := integration.NewRouterService() + msgRouterService := msgrouter.NewRouterService() res.registerMsgRouterService(msgRouterService) var routerFactory runtime.RouterServiceFactory = func(_ []byte) router.Service { return msgRouterService } - queryRouterService := integration.NewRouterService() + queryRouterService := msgrouter.NewRouterService() res.registerQueryRouterService(queryRouterService) serviceBuilder := runtime.NewRouterBuilder(routerFactory, queryRouterService) @@ -88,7 +89,7 @@ func initFixture(t *testing.T) *fixture { return &res } -func (f *fixture) registerMsgRouterService(router *integration.RouterService) { +func (f *fixture) registerMsgRouterService(router *msgrouter.RouterService) { // register custom router service govSubmitProposalHandler := func(ctx context.Context, req transaction.Msg) (transaction.Msg, error) { @@ -104,5 +105,5 @@ func (f *fixture) registerMsgRouterService(router *integration.RouterService) { router.RegisterHandler(govSubmitProposalHandler, "/cosmos.gov.v1.MsgExecLegacyContent") } -func (f *fixture) registerQueryRouterService(router *integration.RouterService) { +func (f *fixture) registerQueryRouterService(_ *msgrouter.RouterService) { } diff --git a/tests/integration/v2/services.go b/tests/integration/v2/services.go index 96891da0b1ad..0232de648544 100644 --- a/tests/integration/v2/services.go +++ b/tests/integration/v2/services.go @@ -16,7 +16,6 @@ import ( "cosmossdk.io/core/event" "cosmossdk.io/core/gas" "cosmossdk.io/core/header" - "cosmossdk.io/core/router" "cosmossdk.io/core/server" corestore "cosmossdk.io/core/store" "cosmossdk.io/core/transaction" @@ -316,45 +315,6 @@ func applyStateChanges(dst, src corestore.WriterMap) error { return dst.ApplyStateChanges(changes) } -// msgTypeURL returns the TypeURL of a proto message. -func msgTypeURL(msg gogoproto.Message) string { - return gogoproto.MessageName(msg) -} - -type routerHandler func(context.Context, transaction.Msg) (transaction.Msg, error) - -var _ router.Service = &RouterService{} - -// custom router service for integration tests -type RouterService struct { - handlers map[string]routerHandler -} - -func NewRouterService() *RouterService { - return &RouterService{ - handlers: make(map[string]routerHandler), - } -} - -func (rs *RouterService) RegisterHandler(handler routerHandler, typeUrl string) { - rs.handlers[typeUrl] = handler -} - -func (rs RouterService) CanInvoke(ctx context.Context, typeUrl string) error { - if rs.handlers[typeUrl] == nil { - return fmt.Errorf("no handler for typeURL %s", typeUrl) - } - return nil -} - -func (rs RouterService) Invoke(ctx context.Context, req transaction.Msg) (transaction.Msg, error) { - typeUrl := msgTypeURL(req) - if rs.handlers[typeUrl] == nil { - return nil, fmt.Errorf("no handler for typeURL %s", typeUrl) - } - return rs.handlers[typeUrl](ctx, req) -} - var _ header.Service = &HeaderService{} type HeaderService struct{} diff --git a/testutil/msgrouter/msgrouter.go b/testutil/msgrouter/msgrouter.go new file mode 100644 index 000000000000..f02c0d2b1b46 --- /dev/null +++ b/testutil/msgrouter/msgrouter.go @@ -0,0 +1,50 @@ +package msgrouter + +import ( + "context" + "fmt" + + "cosmossdk.io/core/router" + "cosmossdk.io/core/transaction" + + gogoproto "github.com/cosmos/gogoproto/proto" +) + +// msgTypeURL returns the TypeURL of a proto message. +func msgTypeURL(msg gogoproto.Message) string { + return gogoproto.MessageName(msg) +} + +type routerHandler func(context.Context, transaction.Msg) (transaction.Msg, error) + +var _ router.Service = &RouterService{} + +// custom router service for integration tests +type RouterService struct { + handlers map[string]routerHandler +} + +func NewRouterService() *RouterService { + return &RouterService{ + handlers: make(map[string]routerHandler), + } +} + +func (rs *RouterService) RegisterHandler(handler routerHandler, typeUrl string) { + rs.handlers[typeUrl] = handler +} + +func (rs RouterService) CanInvoke(ctx context.Context, typeUrl string) error { + if rs.handlers[typeUrl] == nil { + return fmt.Errorf("no handler for typeURL %s", typeUrl) + } + return nil +} + +func (rs RouterService) Invoke(ctx context.Context, req transaction.Msg) (transaction.Msg, error) { + typeUrl := msgTypeURL(req) + if rs.handlers[typeUrl] == nil { + return nil, fmt.Errorf("no handler for typeURL %s", typeUrl) + } + return rs.handlers[typeUrl](ctx, req) +} diff --git a/x/accounts/go.mod b/x/accounts/go.mod index 41fbb29b3cd4..6c1fa167b502 100644 --- a/x/accounts/go.mod +++ b/x/accounts/go.mod @@ -8,6 +8,7 @@ require ( cosmossdk.io/core v1.0.0 cosmossdk.io/core/testing v0.0.1 cosmossdk.io/depinject v1.1.0 + cosmossdk.io/server/v2/stf v1.0.0-beta.1 cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/tx v1.0.0 github.com/cosmos/cosmos-sdk v0.53.0 @@ -165,7 +166,10 @@ require ( sigs.k8s.io/yaml v1.4.0 // indirect ) -replace github.com/cosmos/cosmos-sdk => ../../. +replace ( + cosmossdk.io/core/testing => ../../core/testing + github.com/cosmos/cosmos-sdk => ../../. +) // TODO remove post spinning out all modules replace ( diff --git a/x/accounts/go.sum b/x/accounts/go.sum index 8e26d39795e6..4407396c8df8 100644 --- a/x/accounts/go.sum +++ b/x/accounts/go.sum @@ -10,8 +10,6 @@ cosmossdk.io/collections v1.0.0 h1:YCYIe/pIMtc1iLDD0OrVdfWCnIkpwdy7k9NSQpaR5mg= cosmossdk.io/collections v1.0.0/go.mod h1:mFfLxnYT1fV+B3Lx9GLap1qxmffIPqQCND4xBExerps= cosmossdk.io/core v1.0.0 h1:e7XBbISOytLBOXMVwpRPixThXqEkeLGlg8no/qpgS8U= cosmossdk.io/core v1.0.0/go.mod h1:mKIp3RkoEmtqdEdFHxHwWAULRe+79gfdOvmArrLDbDc= -cosmossdk.io/core/testing v0.0.1 h1:gYCTaftcRrz+HoNXmK7r9KgbG1jgBJ8pNzm/Pa/erFQ= -cosmossdk.io/core/testing v0.0.1/go.mod h1:2VDNz/25qtxgPa0+j8LW5e8Ev/xObqoJA7QuJS9/wIQ= cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= @@ -22,6 +20,8 @@ cosmossdk.io/math v1.5.0 h1:sbOASxee9Zxdjd6OkzogvBZ25/hP929vdcYcBJQbkLc= cosmossdk.io/math v1.5.0/go.mod h1:AAwwBmUhqtk2nlku174JwSll+/DepUXW3rWIXN5q+Nw= cosmossdk.io/schema v1.0.0 h1:/diH4XJjpV1JQwuIozwr+A4uFuuwanFdnw2kKeiXwwQ= cosmossdk.io/schema v1.0.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ= +cosmossdk.io/server/v2/stf v1.0.0-beta.1 h1:s+nRgjhKVC08/qpr51eFVodLhyyQ9ASvJBanLBfQVNI= +cosmossdk.io/server/v2/stf v1.0.0-beta.1/go.mod h1:nfjihbofEF2GGadkYSFmgy5tqrAnSrmGcXUDZmmWyi8= cosmossdk.io/store v1.10.0-rc.1 h1:/YVPJLre7lt/QDbl90k95TLt+IvafF1sHaU6WHd/rpc= cosmossdk.io/store v1.10.0-rc.1/go.mod h1:eZNgZKvZRlDUk8CE3LTDVMAcSM7zLOet2S8fByQkF3s= cosmossdk.io/x/tx v1.0.0 h1:pUUKRvHiMUZC/MnO8v747k1lUEA1DfAq0j0y0Mqrz/o= diff --git a/x/accounts/utils_test.go b/x/accounts/utils_test.go index abe494f69b42..f8585f8a85b2 100644 --- a/x/accounts/utils_test.go +++ b/x/accounts/utils_test.go @@ -2,6 +2,7 @@ package accounts import ( "context" + "cosmossdk.io/server/v2/stf" "testing" gogoproto "github.com/cosmos/gogoproto/proto" @@ -20,7 +21,6 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/runtime" ) var _ address.Codec = (*addressCodec)(nil) @@ -71,11 +71,20 @@ func newKeeper(t *testing.T, accounts ...implementation.AccountCreatorFunc) (Kee queryRouter.RegisterService(&bankv1beta1.Query_ServiceDesc, &bankQueryServer{}) msgRouter.RegisterService(&bankv1beta1.Msg_ServiceDesc, &bankMsgServer{}) - ctx := coretesting.Context() - ss := coretesting.KVStoreService(ctx, "test") - env := runtime.NewEnvironment(ss, coretesting.NewNopLogger(), runtime.EnvWithQueryRouterService(queryRouter), runtime.EnvWithMsgRouterService(msgRouter)) - env.EventService = eventService{} - m, err := NewKeeper(codec.NewProtoCodec(ir), env, addressCodec, ir, nil, accounts...) + //ctx := coretesting.Context() + //ss := coretesting.KVStoreService(ctx, "test") + //env := runtime.NewEnvironment(ss, coretesting.NewNopLogger()) + + router := stf.NewRouterBuilder() + + ctx, env := coretesting.NewTestEnvironment(coretesting.TestEnvironmentConfig{ + ModuleName: "test", + Logger: coretesting.NewNopLogger(), + MsgRouter: nil, + QueryRouter: nil, + }) + //env.EventService = eventService{} + m, err := NewKeeper(codec.NewProtoCodec(ir), env.Environment, addressCodec, ir, nil, accounts...) require.NoError(t, err) return m, ctx } From d8b3ac6a0bb4ef26c3f23543f715dc6ba4550b0c Mon Sep 17 00:00:00 2001 From: aljo242 Date: Mon, 13 Jan 2025 15:37:07 -0500 Subject: [PATCH 26/33] rearrange --- .../v2/distribution/fixture_test.go | 2 +- testutil/msgrouter/msgrouter.go | 4 +- x/accounts/utils_test.go | 44 +++++++------------ x/bank/keeper/grpc_query.go | 18 ++++++++ x/bank/keeper/msg_server.go | 10 +++++ 5 files changed, 47 insertions(+), 31 deletions(-) diff --git a/tests/integration/v2/distribution/fixture_test.go b/tests/integration/v2/distribution/fixture_test.go index 40191519585e..c0667a151b2a 100644 --- a/tests/integration/v2/distribution/fixture_test.go +++ b/tests/integration/v2/distribution/fixture_test.go @@ -25,11 +25,11 @@ import ( poolkeeper "cosmossdk.io/x/protocolpool/keeper" _ "cosmossdk.io/x/staking" // import as blank for app wiring stakingkeeper "cosmossdk.io/x/staking/keeper" - "github.com/cosmos/cosmos-sdk/testutil/msgrouter" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/tests/integration/v2" "github.com/cosmos/cosmos-sdk/testutil/configurator" + "github.com/cosmos/cosmos-sdk/testutil/msgrouter" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring diff --git a/testutil/msgrouter/msgrouter.go b/testutil/msgrouter/msgrouter.go index f02c0d2b1b46..c73fae4bbc6e 100644 --- a/testutil/msgrouter/msgrouter.go +++ b/testutil/msgrouter/msgrouter.go @@ -4,10 +4,10 @@ import ( "context" "fmt" + gogoproto "github.com/cosmos/gogoproto/proto" + "cosmossdk.io/core/router" "cosmossdk.io/core/transaction" - - gogoproto "github.com/cosmos/gogoproto/proto" ) // msgTypeURL returns the TypeURL of a proto message. diff --git a/x/accounts/utils_test.go b/x/accounts/utils_test.go index f8585f8a85b2..aef4c100c8da 100644 --- a/x/accounts/utils_test.go +++ b/x/accounts/utils_test.go @@ -2,7 +2,6 @@ package accounts import ( "context" - "cosmossdk.io/server/v2/stf" "testing" gogoproto "github.com/cosmos/gogoproto/proto" @@ -10,17 +9,20 @@ import ( "google.golang.org/protobuf/reflect/protoregistry" bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" - basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" "cosmossdk.io/core/address" "cosmossdk.io/core/event" coretesting "cosmossdk.io/core/testing" + "cosmossdk.io/core/transaction" coretransaction "cosmossdk.io/core/transaction" + "cosmossdk.io/math" "cosmossdk.io/x/accounts/internal/implementation" + banktypes "cosmossdk.io/x/bank/types" "cosmossdk.io/x/tx/signing" - "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/testutil/msgrouter" + sdk "github.com/cosmos/cosmos-sdk/types" ) var _ address.Codec = (*addressCodec)(nil) @@ -56,10 +58,6 @@ func newKeeper(t *testing.T, accounts ...implementation.AccountCreatorFunc) (Kee if err != nil { t.Fatal(err) } - msgRouter := baseapp.NewMsgServiceRouter() - msgRouter.SetInterfaceRegistry(ir) - queryRouter := baseapp.NewGRPCQueryRouter() - queryRouter.SetInterfaceRegistry(ir) ir.RegisterImplementations((*coretransaction.Msg)(nil), &bankv1beta1.MsgSend{}, @@ -68,42 +66,32 @@ func newKeeper(t *testing.T, accounts ...implementation.AccountCreatorFunc) (Kee &bankv1beta1.MsgMultiSend{}, &bankv1beta1.MsgUpdateParams{}, ) - queryRouter.RegisterService(&bankv1beta1.Query_ServiceDesc, &bankQueryServer{}) - msgRouter.RegisterService(&bankv1beta1.Msg_ServiceDesc, &bankMsgServer{}) - //ctx := coretesting.Context() - //ss := coretesting.KVStoreService(ctx, "test") - //env := runtime.NewEnvironment(ss, coretesting.NewNopLogger()) + msgRouter := msgrouter.NewRouterService() + msgRouter.RegisterHandler(Send, gogoproto.MessageName(&banktypes.MsgSend{})) - router := stf.NewRouterBuilder() + queryRouter := msgrouter.NewRouterService() + queryRouter.RegisterHandler(Balance, gogoproto.MessageName(&banktypes.QueryBalanceRequest{})) ctx, env := coretesting.NewTestEnvironment(coretesting.TestEnvironmentConfig{ ModuleName: "test", Logger: coretesting.NewNopLogger(), - MsgRouter: nil, - QueryRouter: nil, + MsgRouter: msgRouter, + QueryRouter: queryRouter, }) - //env.EventService = eventService{} + m, err := NewKeeper(codec.NewProtoCodec(ir), env.Environment, addressCodec, ir, nil, accounts...) require.NoError(t, err) return m, ctx } -type bankQueryServer struct { - bankv1beta1.UnimplementedQueryServer -} - -type bankMsgServer struct { - bankv1beta1.UnimplementedMsgServer -} - -func (b bankQueryServer) Balance(context.Context, *bankv1beta1.QueryBalanceRequest) (*bankv1beta1.QueryBalanceResponse, error) { - return &bankv1beta1.QueryBalanceResponse{Balance: &basev1beta1.Coin{ +func Balance(context.Context, transaction.Msg) (transaction.Msg, error) { + return &banktypes.QueryBalanceResponse{Balance: &sdk.Coin{ Denom: "atom", - Amount: "1000", + Amount: math.NewInt(1000), }}, nil } -func (b bankMsgServer) Send(context.Context, *bankv1beta1.MsgSend) (*bankv1beta1.MsgSendResponse, error) { +func Send(context.Context, transaction.Msg) (transaction.Msg, error) { return &bankv1beta1.MsgSendResponse{}, nil } diff --git a/x/bank/keeper/grpc_query.go b/x/bank/keeper/grpc_query.go index 24fb6818bacb..f70078d9d574 100644 --- a/x/bank/keeper/grpc_query.go +++ b/x/bank/keeper/grpc_query.go @@ -8,6 +8,7 @@ import ( v1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" "cosmossdk.io/collections" + appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/math" "cosmossdk.io/store/prefix" "cosmossdk.io/x/bank/types" @@ -21,6 +22,23 @@ type Querier struct { BaseKeeper } +// RegisterQueryHandlers registers the query handlers to the router. +func (q msgServer) RegisterQueryHandlers(router appmodulev2.QueryRouter) { + appmodulev2.RegisterMsgHandler(router, q.Balance) + appmodulev2.RegisterMsgHandler(router, q.AllBalances) + appmodulev2.RegisterMsgHandler(router, q.SpendableBalances) + appmodulev2.RegisterMsgHandler(router, q.SpendableBalanceByDenom) + appmodulev2.RegisterMsgHandler(router, q.TotalSupply) + appmodulev2.RegisterMsgHandler(router, q.SupplyOf) + appmodulev2.RegisterMsgHandler(router, q.Params) + appmodulev2.RegisterMsgHandler(router, q.DenomsMetadata) + appmodulev2.RegisterMsgHandler(router, q.DenomMetadata) + appmodulev2.RegisterMsgHandler(router, q.DenomMetadataByQueryString) + appmodulev2.RegisterMsgHandler(router, q.DenomOwners) + appmodulev2.RegisterMsgHandler(router, q.SendEnabled) + appmodulev2.RegisterMsgHandler(router, q.DenomOwnersByQuery) +} + var _ types.QueryServer = BaseKeeper{} func NewQuerier(keeper *BaseKeeper) Querier { diff --git a/x/bank/keeper/msg_server.go b/x/bank/keeper/msg_server.go index 893191ce4805..635db3e0adaf 100644 --- a/x/bank/keeper/msg_server.go +++ b/x/bank/keeper/msg_server.go @@ -3,6 +3,7 @@ package keeper import ( "context" + appmodulev2 "cosmossdk.io/core/appmodule/v2" errorsmod "cosmossdk.io/errors" "cosmossdk.io/x/bank/types" @@ -10,6 +11,15 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) +// RegisterMsgHandlers registers the message handlers to the router. +func (k msgServer) RegisterMsgHandlers(router appmodulev2.MsgRouter) { + appmodulev2.RegisterMsgHandler(router, k.Send) + appmodulev2.RegisterMsgHandler(router, k.MultiSend) + appmodulev2.RegisterMsgHandler(router, k.UpdateParams) + appmodulev2.RegisterMsgHandler(router, k.SetSendEnabled) + appmodulev2.RegisterMsgHandler(router, k.Burn) +} + type msgServer struct { Keeper } From 150df470cd7221fd491a0f5d932ceacd28a1adca Mon Sep 17 00:00:00 2001 From: aljo242 Date: Mon, 13 Jan 2025 15:46:36 -0500 Subject: [PATCH 27/33] lint fix --- x/accounts/utils_test.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/x/accounts/utils_test.go b/x/accounts/utils_test.go index aef4c100c8da..b657af3aef47 100644 --- a/x/accounts/utils_test.go +++ b/x/accounts/utils_test.go @@ -10,10 +10,8 @@ import ( bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" "cosmossdk.io/core/address" - "cosmossdk.io/core/event" coretesting "cosmossdk.io/core/testing" "cosmossdk.io/core/transaction" - coretransaction "cosmossdk.io/core/transaction" "cosmossdk.io/math" "cosmossdk.io/x/accounts/internal/implementation" banktypes "cosmossdk.io/x/bank/types" @@ -32,16 +30,6 @@ type addressCodec struct{} func (a addressCodec) StringToBytes(text string) ([]byte, error) { return []byte(text), nil } func (a addressCodec) BytesToString(bz []byte) (string, error) { return string(bz), nil } -type eventService struct{} - -func (e eventService) Emit(event gogoproto.Message) error { return nil } - -func (e eventService) EmitKV(eventType string, attrs ...event.Attribute) error { - return nil -} - -func (e eventService) EventManager(ctx context.Context) event.Manager { return e } - func newKeeper(t *testing.T, accounts ...implementation.AccountCreatorFunc) (Keeper, context.Context) { t.Helper() @@ -59,7 +47,7 @@ func newKeeper(t *testing.T, accounts ...implementation.AccountCreatorFunc) (Kee t.Fatal(err) } - ir.RegisterImplementations((*coretransaction.Msg)(nil), + ir.RegisterImplementations((*transaction.Msg)(nil), &bankv1beta1.MsgSend{}, &bankv1beta1.MsgBurn{}, &bankv1beta1.MsgSetSendEnabled{}, From 86269ec597bcf53878acba06a0f0e7a3902ecb40 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Mon, 13 Jan 2025 15:51:13 -0500 Subject: [PATCH 28/33] clean --- x/bank/keeper/grpc_query.go | 18 ------------------ x/bank/keeper/msg_server.go | 10 ---------- 2 files changed, 28 deletions(-) diff --git a/x/bank/keeper/grpc_query.go b/x/bank/keeper/grpc_query.go index f70078d9d574..24fb6818bacb 100644 --- a/x/bank/keeper/grpc_query.go +++ b/x/bank/keeper/grpc_query.go @@ -8,7 +8,6 @@ import ( v1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" "cosmossdk.io/collections" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/math" "cosmossdk.io/store/prefix" "cosmossdk.io/x/bank/types" @@ -22,23 +21,6 @@ type Querier struct { BaseKeeper } -// RegisterQueryHandlers registers the query handlers to the router. -func (q msgServer) RegisterQueryHandlers(router appmodulev2.QueryRouter) { - appmodulev2.RegisterMsgHandler(router, q.Balance) - appmodulev2.RegisterMsgHandler(router, q.AllBalances) - appmodulev2.RegisterMsgHandler(router, q.SpendableBalances) - appmodulev2.RegisterMsgHandler(router, q.SpendableBalanceByDenom) - appmodulev2.RegisterMsgHandler(router, q.TotalSupply) - appmodulev2.RegisterMsgHandler(router, q.SupplyOf) - appmodulev2.RegisterMsgHandler(router, q.Params) - appmodulev2.RegisterMsgHandler(router, q.DenomsMetadata) - appmodulev2.RegisterMsgHandler(router, q.DenomMetadata) - appmodulev2.RegisterMsgHandler(router, q.DenomMetadataByQueryString) - appmodulev2.RegisterMsgHandler(router, q.DenomOwners) - appmodulev2.RegisterMsgHandler(router, q.SendEnabled) - appmodulev2.RegisterMsgHandler(router, q.DenomOwnersByQuery) -} - var _ types.QueryServer = BaseKeeper{} func NewQuerier(keeper *BaseKeeper) Querier { diff --git a/x/bank/keeper/msg_server.go b/x/bank/keeper/msg_server.go index 635db3e0adaf..893191ce4805 100644 --- a/x/bank/keeper/msg_server.go +++ b/x/bank/keeper/msg_server.go @@ -3,7 +3,6 @@ package keeper import ( "context" - appmodulev2 "cosmossdk.io/core/appmodule/v2" errorsmod "cosmossdk.io/errors" "cosmossdk.io/x/bank/types" @@ -11,15 +10,6 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) -// RegisterMsgHandlers registers the message handlers to the router. -func (k msgServer) RegisterMsgHandlers(router appmodulev2.MsgRouter) { - appmodulev2.RegisterMsgHandler(router, k.Send) - appmodulev2.RegisterMsgHandler(router, k.MultiSend) - appmodulev2.RegisterMsgHandler(router, k.UpdateParams) - appmodulev2.RegisterMsgHandler(router, k.SetSendEnabled) - appmodulev2.RegisterMsgHandler(router, k.Burn) -} - type msgServer struct { Keeper } From ffde8e3110a0873469253f14e08ec0d7ccf8ccd0 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Mon, 13 Jan 2025 15:53:20 -0500 Subject: [PATCH 29/33] clean --- x/accounts/go.mod | 1 - x/accounts/go.sum | 2 -- 2 files changed, 3 deletions(-) diff --git a/x/accounts/go.mod b/x/accounts/go.mod index 6c1fa167b502..3c7710d849b4 100644 --- a/x/accounts/go.mod +++ b/x/accounts/go.mod @@ -8,7 +8,6 @@ require ( cosmossdk.io/core v1.0.0 cosmossdk.io/core/testing v0.0.1 cosmossdk.io/depinject v1.1.0 - cosmossdk.io/server/v2/stf v1.0.0-beta.1 cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/tx v1.0.0 github.com/cosmos/cosmos-sdk v0.53.0 diff --git a/x/accounts/go.sum b/x/accounts/go.sum index 4407396c8df8..1d05f906c880 100644 --- a/x/accounts/go.sum +++ b/x/accounts/go.sum @@ -20,8 +20,6 @@ cosmossdk.io/math v1.5.0 h1:sbOASxee9Zxdjd6OkzogvBZ25/hP929vdcYcBJQbkLc= cosmossdk.io/math v1.5.0/go.mod h1:AAwwBmUhqtk2nlku174JwSll+/DepUXW3rWIXN5q+Nw= cosmossdk.io/schema v1.0.0 h1:/diH4XJjpV1JQwuIozwr+A4uFuuwanFdnw2kKeiXwwQ= cosmossdk.io/schema v1.0.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ= -cosmossdk.io/server/v2/stf v1.0.0-beta.1 h1:s+nRgjhKVC08/qpr51eFVodLhyyQ9ASvJBanLBfQVNI= -cosmossdk.io/server/v2/stf v1.0.0-beta.1/go.mod h1:nfjihbofEF2GGadkYSFmgy5tqrAnSrmGcXUDZmmWyi8= cosmossdk.io/store v1.10.0-rc.1 h1:/YVPJLre7lt/QDbl90k95TLt+IvafF1sHaU6WHd/rpc= cosmossdk.io/store v1.10.0-rc.1/go.mod h1:eZNgZKvZRlDUk8CE3LTDVMAcSM7zLOet2S8fByQkF3s= cosmossdk.io/x/tx v1.0.0 h1:pUUKRvHiMUZC/MnO8v747k1lUEA1DfAq0j0y0Mqrz/o= From 6caaa63910fe71bca3ee92e6c9e2c97c9a2cbacb Mon Sep 17 00:00:00 2001 From: aljo242 Date: Tue, 14 Jan 2025 14:46:36 -0500 Subject: [PATCH 30/33] refactgor into coretesting --- client/v2/go.mod | 7 +- client/v2/go.sum | 6 +- core/testing/go.mod | 46 ++- core/testing/go.sum | 388 ++++++++++++++++++ .../testing}/msgrouter/msgrouter.go | 0 .../testing}/queryclient/queryclient.go | 0 go.mod | 2 +- go.sum | 4 +- server/v2/cometbft/go.mod | 2 +- server/v2/cometbft/go.sum | 4 +- simapp/v2/go.mod | 4 +- simapp/v2/go.sum | 6 +- tests/go.mod | 3 +- tests/go.sum | 6 +- tests/integration/v2/accounts/fixture_test.go | 2 +- tests/integration/v2/accounts/lockup/utils.go | 2 +- .../v2/accounts/multisig/test_suite.go | 2 +- tests/integration/v2/auth/app_test.go | 2 +- .../v2/distribution/fixture_test.go | 2 +- tests/integration/v2/gov/common_test.go | 2 +- .../integration/v2/gov/keeper/fixture_test.go | 2 +- tools/benchmark/go.mod | 2 +- tools/benchmark/go.sum | 4 +- x/accounts/defaults/base/go.mod | 2 +- x/accounts/defaults/base/go.sum | 4 +- x/accounts/defaults/lockup/go.mod | 2 +- x/accounts/defaults/lockup/go.sum | 4 +- x/accounts/defaults/multisig/go.mod | 2 +- x/accounts/defaults/multisig/go.sum | 4 +- x/accounts/go.mod | 2 +- x/accounts/go.sum | 4 +- x/accounts/utils_test.go | 2 +- x/authz/go.mod | 7 +- x/authz/go.sum | 6 +- x/bank/go.mod | 2 +- x/bank/go.sum | 4 +- x/bank/keeper/keeper_test.go | 2 +- x/circuit/go.mod | 2 +- x/circuit/go.sum | 4 +- x/consensus/go.mod | 2 +- x/consensus/go.sum | 4 +- x/distribution/go.mod | 2 +- x/distribution/go.sum | 4 +- x/epochs/go.mod | 2 +- x/epochs/go.sum | 4 +- x/evidence/go.mod | 2 +- x/evidence/go.sum | 4 +- x/feegrant/go.mod | 2 +- x/feegrant/go.sum | 4 +- x/gov/go.mod | 7 +- x/gov/go.sum | 6 +- x/group/go.mod | 7 +- x/group/go.sum | 6 +- x/mint/go.mod | 2 +- x/mint/go.sum | 4 +- x/nft/go.mod | 2 +- x/nft/go.sum | 4 +- x/protocolpool/go.mod | 2 +- x/protocolpool/go.sum | 4 +- x/slashing/go.mod | 2 +- x/slashing/go.sum | 4 +- x/staking/go.mod | 2 +- x/staking/go.sum | 4 +- x/upgrade/go.mod | 2 +- x/upgrade/go.sum | 4 +- 65 files changed, 538 insertions(+), 105 deletions(-) rename {testutil => core/testing}/msgrouter/msgrouter.go (100%) rename {testutil => core/testing}/queryclient/queryclient.go (100%) diff --git a/client/v2/go.mod b/client/v2/go.mod index 4758b57738b5..72e55d3ac406 100644 --- a/client/v2/go.mod +++ b/client/v2/go.mod @@ -13,7 +13,7 @@ require ( github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 go.uber.org/mock v0.5.0 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 google.golang.org/protobuf v1.36.2 gotest.tools/v3 v3.5.1 sigs.k8s.io/yaml v1.4.0 @@ -165,7 +165,10 @@ require ( pgregory.net/rapid v1.1.0 // indirect ) -replace github.com/cosmos/cosmos-sdk => ./../../ +replace ( + cosmossdk.io/core/testing => ../../core/testing + github.com/cosmos/cosmos-sdk => ./../../ +) // TODO remove post spinning out all modules replace ( diff --git a/client/v2/go.sum b/client/v2/go.sum index 56ff7abbab1d..f7fbf915ad90 100644 --- a/client/v2/go.sum +++ b/client/v2/go.sum @@ -10,8 +10,6 @@ cosmossdk.io/collections v1.0.0 h1:YCYIe/pIMtc1iLDD0OrVdfWCnIkpwdy7k9NSQpaR5mg= cosmossdk.io/collections v1.0.0/go.mod h1:mFfLxnYT1fV+B3Lx9GLap1qxmffIPqQCND4xBExerps= cosmossdk.io/core v1.0.0 h1:e7XBbISOytLBOXMVwpRPixThXqEkeLGlg8no/qpgS8U= cosmossdk.io/core v1.0.0/go.mod h1:mKIp3RkoEmtqdEdFHxHwWAULRe+79gfdOvmArrLDbDc= -cosmossdk.io/core/testing v0.0.1 h1:gYCTaftcRrz+HoNXmK7r9KgbG1jgBJ8pNzm/Pa/erFQ= -cosmossdk.io/core/testing v0.0.1/go.mod h1:2VDNz/25qtxgPa0+j8LW5e8Ev/xObqoJA7QuJS9/wIQ= cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= @@ -650,8 +648,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/core/testing/go.mod b/core/testing/go.mod index bf1a75ff6c40..27fdf6be00a0 100644 --- a/core/testing/go.mod +++ b/core/testing/go.mod @@ -1,11 +1,53 @@ module cosmossdk.io/core/testing -go 1.23 +go 1.23.1 + +toolchain go1.23.4 require ( cosmossdk.io/core v1.0.0 + github.com/cometbft/cometbft/api v1.0.0 + github.com/cosmos/cosmos-sdk v0.50.11 + github.com/cosmos/gogoproto v1.7.0 github.com/tidwall/btree v1.7.0 go.uber.org/mock v0.5.0 + google.golang.org/grpc v1.69.4 ) -require cosmossdk.io/schema v1.0.0 // indirect +require ( + cosmossdk.io/api v0.7.6 // indirect + cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/errors v1.0.1 // indirect + cosmossdk.io/math v1.4.0 // indirect + cosmossdk.io/schema v1.0.0 // indirect + cosmossdk.io/x/tx v0.13.7 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect + github.com/cometbft/cometbft v0.38.12 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/go-kit/log v0.2.1 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/sasha-s/go-deadlock v0.3.1 // indirect + github.com/stretchr/testify v1.9.0 // indirect + github.com/tendermint/go-amino v0.16.0 // indirect + golang.org/x/crypto v0.28.0 // indirect + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect + golang.org/x/net v0.30.0 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/text v0.19.0 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect + google.golang.org/protobuf v1.35.1 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect +) diff --git a/core/testing/go.sum b/core/testing/go.sum index fc93e3af390e..71f6811d11c9 100644 --- a/core/testing/go.sum +++ b/core/testing/go.sum @@ -1,8 +1,396 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cosmossdk.io/api v0.7.6 h1:PC20PcXy1xYKH2KU4RMurVoFjjKkCgYRbVAD4PdqUuY= +cosmossdk.io/api v0.7.6/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v1.0.0 h1:e7XBbISOytLBOXMVwpRPixThXqEkeLGlg8no/qpgS8U= cosmossdk.io/core v1.0.0/go.mod h1:mKIp3RkoEmtqdEdFHxHwWAULRe+79gfdOvmArrLDbDc= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ= +cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk= cosmossdk.io/schema v1.0.0 h1:/diH4XJjpV1JQwuIozwr+A4uFuuwanFdnw2kKeiXwwQ= cosmossdk.io/schema v1.0.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ= +cosmossdk.io/store v1.1.1 h1:NA3PioJtWDVU7cHHeyvdva5J/ggyLDkyH0hGHl2804Y= +cosmossdk.io/store v1.1.1/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= +cosmossdk.io/x/tx v0.13.7 h1:8WSk6B/OHJLYjiZeMKhq7DK7lHDMyK0UfDbBMxVmeOI= +cosmossdk.io/x/tx v0.13.7/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= +filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= +filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= +github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= +github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= +github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= +github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= +github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/pebble v1.1.2 h1:CUh2IPtR4swHlEj48Rhfzw6l/d0qA31fItcIszQVIsA= +github.com/cockroachdb/pebble v1.1.2/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= +github.com/cometbft/cometbft v0.38.12 h1:OWsLZN2KcSSFe8bet9xCn07VwhBnavPea3VyPnNq1bg= +github.com/cometbft/cometbft v0.38.12/go.mod h1:GPHp3/pehPqgX1930HmK1BpBLZPxB75v/dZg8Viwy+o= +github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= +github.com/cometbft/cometbft/api v1.0.0 h1:gGBwvsJi/gnHJEtwYfjPIGs2AKg/Vfa1ZuKCPD1/Ko4= +github.com/cometbft/cometbft/api v1.0.0/go.mod h1:EkQiqVSu/p2ebrZEnB2z6Re7r8XNe//M7ylR0qEwWm0= +github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= +github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= +github.com/cosmos/cosmos-db v1.1.0 h1:KLHNVQ73h7vawXTpj9UJ7ZR2IXv51tsEHkQJJ9EBDzI= +github.com/cosmos/cosmos-db v1.1.0/go.mod h1:t7c4A6cfGdpUwwVxrQ0gQLeRQqGUBJu0yvE4F/26REg= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/cosmos-sdk v0.50.11 h1:LxR1aAc8kixdrs3itO+3a44sFoc+vjxVAOyPFx22yjk= +github.com/cosmos/cosmos-sdk v0.50.11/go.mod h1:gt14Meok2IDCjbDtjwkbUcgVNEpUBDN/4hg9cCUtLgw= +github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= +github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= +github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= +github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.2.2 h1:qHhKW3I70w+04g5KdsdVSHRbFLgt3yY3qTMd4Xa4rC8= +github.com/cosmos/iavl v1.2.2/go.mod h1:GiM43q0pB+uG53mLxLDzimxM9l/5N9UuSY3/D0huuVw= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= +github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= +github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= +github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= +github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= +github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= +github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= +github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/emicklei/dot v1.6.2 h1:08GN+DD79cy/tzN6uLCT84+2Wk9u+wvqP+Hkx/dIR8A= +github.com/emicklei/dot v1.6.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= +github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= +github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY= +github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= +github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= +github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= +github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= +github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= +github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= +github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= +github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8= +github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= +github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= +github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= +github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= +github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= +go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= +go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= +go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= +go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= +go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= +go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= +go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= +go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= +go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= +go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= +go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= +golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= +golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= +golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 h1:fVoAXEKA4+yufmbdVYv+SE73+cPZbbbe8paLsHfkK+U= +google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53/go.mod h1:riSXTwQ4+nqmPGtobMFyW5FqVAmIs0St6VPp4Ug7CE4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 h1:X58yt85/IXCx0Y3ZwN6sEIKZzQtDEYaBWrDvErdXrRE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= +nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/testutil/msgrouter/msgrouter.go b/core/testing/msgrouter/msgrouter.go similarity index 100% rename from testutil/msgrouter/msgrouter.go rename to core/testing/msgrouter/msgrouter.go diff --git a/testutil/queryclient/queryclient.go b/core/testing/queryclient/queryclient.go similarity index 100% rename from testutil/queryclient/queryclient.go rename to core/testing/queryclient/queryclient.go diff --git a/go.mod b/go.mod index 6683565ca0b8..4e60bf3ef2a5 100644 --- a/go.mod +++ b/go.mod @@ -51,7 +51,7 @@ require ( go.uber.org/mock v0.5.0 golang.org/x/crypto v0.32.0 google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 google.golang.org/protobuf v1.36.2 gotest.tools/v3 v3.5.1 pgregory.net/rapid v1.1.0 diff --git a/go.sum b/go.sum index 97dae99d0e90..ca8d8ff9426d 100644 --- a/go.sum +++ b/go.sum @@ -623,8 +623,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/server/v2/cometbft/go.mod b/server/v2/cometbft/go.mod index cdc1b02790b2..53f30b2f3d44 100644 --- a/server/v2/cometbft/go.mod +++ b/server/v2/cometbft/go.mod @@ -33,7 +33,7 @@ require ( github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.10.0 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 google.golang.org/protobuf v1.36.2 sigs.k8s.io/yaml v1.4.0 ) diff --git a/server/v2/cometbft/go.sum b/server/v2/cometbft/go.sum index 2ed39a7af4a5..bb185808ebbc 100644 --- a/server/v2/cometbft/go.sum +++ b/server/v2/cometbft/go.sum @@ -679,8 +679,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/simapp/v2/go.mod b/simapp/v2/go.mod index a3a655c5ed9c..e6c59cbc6fa0 100644 --- a/simapp/v2/go.mod +++ b/simapp/v2/go.mod @@ -243,7 +243,7 @@ require ( google.golang.org/genproto v0.0.0-20240814211410-ddb44dafa142 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250106144421-5f5ef82da422 // indirect - google.golang.org/grpc v1.69.2 // indirect + google.golang.org/grpc v1.69.4 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect @@ -300,6 +300,7 @@ replace ( // server v2 integration replace ( + cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/indexer/postgres => ../../indexer/postgres cosmossdk.io/runtime/v2 => ../../runtime/v2 cosmossdk.io/server/v2 => ../../server/v2 @@ -307,4 +308,5 @@ replace ( cosmossdk.io/server/v2/cometbft => ../../server/v2/cometbft cosmossdk.io/server/v2/stf => ../../server/v2/stf cosmossdk.io/store/v2 => ../../store/v2 + ) diff --git a/simapp/v2/go.sum b/simapp/v2/go.sum index d0bf9646e365..f0d2fd984e4d 100644 --- a/simapp/v2/go.sum +++ b/simapp/v2/go.sum @@ -198,8 +198,6 @@ cosmossdk.io/collections v1.0.0 h1:YCYIe/pIMtc1iLDD0OrVdfWCnIkpwdy7k9NSQpaR5mg= cosmossdk.io/collections v1.0.0/go.mod h1:mFfLxnYT1fV+B3Lx9GLap1qxmffIPqQCND4xBExerps= cosmossdk.io/core v1.0.0 h1:e7XBbISOytLBOXMVwpRPixThXqEkeLGlg8no/qpgS8U= cosmossdk.io/core v1.0.0/go.mod h1:mKIp3RkoEmtqdEdFHxHwWAULRe+79gfdOvmArrLDbDc= -cosmossdk.io/core/testing v0.0.1 h1:gYCTaftcRrz+HoNXmK7r9KgbG1jgBJ8pNzm/Pa/erFQ= -cosmossdk.io/core/testing v0.0.1/go.mod h1:2VDNz/25qtxgPa0+j8LW5e8Ev/xObqoJA7QuJS9/wIQ= cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= @@ -1430,8 +1428,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= diff --git a/tests/go.mod b/tests/go.mod index b402846280b7..68d5db628544 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -28,7 +28,7 @@ require ( github.com/stretchr/testify v1.10.0 gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b go.uber.org/mock v0.5.0 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 google.golang.org/protobuf v1.36.2 gotest.tools/v3 v3.5.1 pgregory.net/rapid v1.1.0 @@ -266,6 +266,7 @@ replace ( // Below are the long-lived replace for tests. replace ( + cosmossdk.io/core/testing => ../core/testing github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 // We always want to test against the latest version of the SDK. github.com/cosmos/cosmos-sdk => ../. diff --git a/tests/go.sum b/tests/go.sum index b83fdb3809b6..b0b69bdd649e 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -198,8 +198,6 @@ cosmossdk.io/collections v1.0.0 h1:YCYIe/pIMtc1iLDD0OrVdfWCnIkpwdy7k9NSQpaR5mg= cosmossdk.io/collections v1.0.0/go.mod h1:mFfLxnYT1fV+B3Lx9GLap1qxmffIPqQCND4xBExerps= cosmossdk.io/core v1.0.0 h1:e7XBbISOytLBOXMVwpRPixThXqEkeLGlg8no/qpgS8U= cosmossdk.io/core v1.0.0/go.mod h1:mKIp3RkoEmtqdEdFHxHwWAULRe+79gfdOvmArrLDbDc= -cosmossdk.io/core/testing v0.0.1 h1:gYCTaftcRrz+HoNXmK7r9KgbG1jgBJ8pNzm/Pa/erFQ= -cosmossdk.io/core/testing v0.0.1/go.mod h1:2VDNz/25qtxgPa0+j8LW5e8Ev/xObqoJA7QuJS9/wIQ= cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= @@ -1374,8 +1372,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= diff --git a/tests/integration/v2/accounts/fixture_test.go b/tests/integration/v2/accounts/fixture_test.go index 016c12dc92e1..81b3dce597d0 100644 --- a/tests/integration/v2/accounts/fixture_test.go +++ b/tests/integration/v2/accounts/fixture_test.go @@ -25,11 +25,11 @@ import ( minttypes "cosmossdk.io/x/mint/types" _ "cosmossdk.io/x/staking" // import as blank for app wirings + "cosmossdk.io/core/testing/msgrouter" "github.com/cosmos/cosmos-sdk/codec" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/tests/integration/v2" "github.com/cosmos/cosmos-sdk/testutil/configurator" - "github.com/cosmos/cosmos-sdk/testutil/msgrouter" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/auth" diff --git a/tests/integration/v2/accounts/lockup/utils.go b/tests/integration/v2/accounts/lockup/utils.go index 4b104b34a8fc..db433402fe4b 100644 --- a/tests/integration/v2/accounts/lockup/utils.go +++ b/tests/integration/v2/accounts/lockup/utils.go @@ -28,10 +28,10 @@ import ( stakingkeeper "cosmossdk.io/x/staking/keeper" stakingtypes "cosmossdk.io/x/staking/types" + "cosmossdk.io/core/testing/msgrouter" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/tests/integration/v2" "github.com/cosmos/cosmos-sdk/testutil/configurator" - "github.com/cosmos/cosmos-sdk/testutil/msgrouter" sdk "github.com/cosmos/cosmos-sdk/types" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring`` diff --git a/tests/integration/v2/accounts/multisig/test_suite.go b/tests/integration/v2/accounts/multisig/test_suite.go index 55853891167f..97051cc6da3a 100644 --- a/tests/integration/v2/accounts/multisig/test_suite.go +++ b/tests/integration/v2/accounts/multisig/test_suite.go @@ -26,11 +26,11 @@ import ( _ "cosmossdk.io/x/staking" // import as blank for app wiring stakingkeeper "cosmossdk.io/x/staking/keeper" + "cosmossdk.io/core/testing/msgrouter" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/tests/integration/v2" "github.com/cosmos/cosmos-sdk/testutil/configurator" - "github.com/cosmos/cosmos-sdk/testutil/msgrouter" sdk "github.com/cosmos/cosmos-sdk/types" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring`` diff --git a/tests/integration/v2/auth/app_test.go b/tests/integration/v2/auth/app_test.go index 987cc2083fa9..5d2d16d7bbec 100644 --- a/tests/integration/v2/auth/app_test.go +++ b/tests/integration/v2/auth/app_test.go @@ -22,9 +22,9 @@ import ( _ "cosmossdk.io/x/consensus" // import as blank for app wiring _ "cosmossdk.io/x/staking" // import as blank for app wirings + "cosmossdk.io/core/testing/msgrouter" "github.com/cosmos/cosmos-sdk/tests/integration/v2" "github.com/cosmos/cosmos-sdk/testutil/configurator" - "github.com/cosmos/cosmos-sdk/testutil/msgrouter" _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" _ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring`` diff --git a/tests/integration/v2/distribution/fixture_test.go b/tests/integration/v2/distribution/fixture_test.go index c0667a151b2a..ebb787052636 100644 --- a/tests/integration/v2/distribution/fixture_test.go +++ b/tests/integration/v2/distribution/fixture_test.go @@ -26,10 +26,10 @@ import ( _ "cosmossdk.io/x/staking" // import as blank for app wiring stakingkeeper "cosmossdk.io/x/staking/keeper" + "cosmossdk.io/core/testing/msgrouter" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/tests/integration/v2" "github.com/cosmos/cosmos-sdk/testutil/configurator" - "github.com/cosmos/cosmos-sdk/testutil/msgrouter" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring diff --git a/tests/integration/v2/gov/common_test.go b/tests/integration/v2/gov/common_test.go index 22ce4d77481a..b06caf75ea5c 100644 --- a/tests/integration/v2/gov/common_test.go +++ b/tests/integration/v2/gov/common_test.go @@ -32,12 +32,12 @@ import ( stakingkeeper "cosmossdk.io/x/staking/keeper" stakingtypes "cosmossdk.io/x/staking/types" + "cosmossdk.io/core/testing/msgrouter" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/tests/integration/v2" "github.com/cosmos/cosmos-sdk/testutil/configurator" - "github.com/cosmos/cosmos-sdk/testutil/msgrouter" sdk "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/x/auth" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" diff --git a/tests/integration/v2/gov/keeper/fixture_test.go b/tests/integration/v2/gov/keeper/fixture_test.go index 8d3cfacd5bc5..786f7eb3ed12 100644 --- a/tests/integration/v2/gov/keeper/fixture_test.go +++ b/tests/integration/v2/gov/keeper/fixture_test.go @@ -23,9 +23,9 @@ import ( _ "cosmossdk.io/x/staking" stakingkeeper "cosmossdk.io/x/staking/keeper" + "cosmossdk.io/core/testing/msgrouter" "github.com/cosmos/cosmos-sdk/tests/integration/v2" "github.com/cosmos/cosmos-sdk/testutil/configurator" - "github.com/cosmos/cosmos-sdk/testutil/msgrouter" _ "github.com/cosmos/cosmos-sdk/x/auth" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" ) diff --git a/tools/benchmark/go.mod b/tools/benchmark/go.mod index 135240856eac..d6768780c755 100644 --- a/tools/benchmark/go.mod +++ b/tools/benchmark/go.mod @@ -13,7 +13,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.10.0 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 ) require ( diff --git a/tools/benchmark/go.sum b/tools/benchmark/go.sum index 508a4b3ee729..175c906a8f37 100644 --- a/tools/benchmark/go.sum +++ b/tools/benchmark/go.sum @@ -613,8 +613,8 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/accounts/defaults/base/go.mod b/x/accounts/defaults/base/go.mod index e581deed874d..ba0978f40d52 100644 --- a/x/accounts/defaults/base/go.mod +++ b/x/accounts/defaults/base/go.mod @@ -151,7 +151,7 @@ require ( google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250106144421-5f5ef82da422 // indirect - google.golang.org/grpc v1.69.2 // indirect + google.golang.org/grpc v1.69.4 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect diff --git a/x/accounts/defaults/base/go.sum b/x/accounts/defaults/base/go.sum index 8e26d39795e6..8a2450276388 100644 --- a/x/accounts/defaults/base/go.sum +++ b/x/accounts/defaults/base/go.sum @@ -640,8 +640,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/accounts/defaults/lockup/go.mod b/x/accounts/defaults/lockup/go.mod index b04ad2a71db6..2e784f44cc22 100644 --- a/x/accounts/defaults/lockup/go.mod +++ b/x/accounts/defaults/lockup/go.mod @@ -143,7 +143,7 @@ require ( google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250106144421-5f5ef82da422 // indirect - google.golang.org/grpc v1.69.2 // indirect + google.golang.org/grpc v1.69.4 // indirect google.golang.org/protobuf v1.36.2 gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/x/accounts/defaults/lockup/go.sum b/x/accounts/defaults/lockup/go.sum index 42e34c2ba53c..cfe4c7b17aed 100644 --- a/x/accounts/defaults/lockup/go.sum +++ b/x/accounts/defaults/lockup/go.sum @@ -613,8 +613,8 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/accounts/defaults/multisig/go.mod b/x/accounts/defaults/multisig/go.mod index 15dc81c3c532..baf1ca632a66 100644 --- a/x/accounts/defaults/multisig/go.mod +++ b/x/accounts/defaults/multisig/go.mod @@ -151,7 +151,7 @@ require ( google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250106144421-5f5ef82da422 // indirect - google.golang.org/grpc v1.69.2 // indirect + google.golang.org/grpc v1.69.4 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect diff --git a/x/accounts/defaults/multisig/go.sum b/x/accounts/defaults/multisig/go.sum index 8e26d39795e6..8a2450276388 100644 --- a/x/accounts/defaults/multisig/go.sum +++ b/x/accounts/defaults/multisig/go.sum @@ -640,8 +640,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/accounts/go.mod b/x/accounts/go.mod index 3c7710d849b4..1f8dceeea183 100644 --- a/x/accounts/go.mod +++ b/x/accounts/go.mod @@ -14,7 +14,7 @@ require ( github.com/cosmos/gogoproto v1.7.0 github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.10.0 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 google.golang.org/protobuf v1.36.2 ) diff --git a/x/accounts/go.sum b/x/accounts/go.sum index 1d05f906c880..848f395b6048 100644 --- a/x/accounts/go.sum +++ b/x/accounts/go.sum @@ -638,8 +638,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/accounts/utils_test.go b/x/accounts/utils_test.go index b657af3aef47..40c1cece67b6 100644 --- a/x/accounts/utils_test.go +++ b/x/accounts/utils_test.go @@ -17,9 +17,9 @@ import ( banktypes "cosmossdk.io/x/bank/types" "cosmossdk.io/x/tx/signing" + "cosmossdk.io/core/testing/msgrouter" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/testutil/msgrouter" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/authz/go.mod b/x/authz/go.mod index fa939d2265f1..caa91f6dcc77 100644 --- a/x/authz/go.mod +++ b/x/authz/go.mod @@ -20,7 +20,7 @@ require ( github.com/stretchr/testify v1.10.0 go.uber.org/mock v0.5.0 google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 google.golang.org/protobuf v1.36.2 ) @@ -168,7 +168,10 @@ require ( golang.org/x/arch v0.12.0 // indirect ) -replace github.com/cosmos/cosmos-sdk => ../../. +replace ( + cosmossdk.io/core/testing => ../../core/testing + github.com/cosmos/cosmos-sdk => ../../ +) // TODO remove post spinning out all modules replace ( diff --git a/x/authz/go.sum b/x/authz/go.sum index 8e26d39795e6..848f395b6048 100644 --- a/x/authz/go.sum +++ b/x/authz/go.sum @@ -10,8 +10,6 @@ cosmossdk.io/collections v1.0.0 h1:YCYIe/pIMtc1iLDD0OrVdfWCnIkpwdy7k9NSQpaR5mg= cosmossdk.io/collections v1.0.0/go.mod h1:mFfLxnYT1fV+B3Lx9GLap1qxmffIPqQCND4xBExerps= cosmossdk.io/core v1.0.0 h1:e7XBbISOytLBOXMVwpRPixThXqEkeLGlg8no/qpgS8U= cosmossdk.io/core v1.0.0/go.mod h1:mKIp3RkoEmtqdEdFHxHwWAULRe+79gfdOvmArrLDbDc= -cosmossdk.io/core/testing v0.0.1 h1:gYCTaftcRrz+HoNXmK7r9KgbG1jgBJ8pNzm/Pa/erFQ= -cosmossdk.io/core/testing v0.0.1/go.mod h1:2VDNz/25qtxgPa0+j8LW5e8Ev/xObqoJA7QuJS9/wIQ= cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= @@ -640,8 +638,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/bank/go.mod b/x/bank/go.mod index 3b547a720097..252a2d36937c 100644 --- a/x/bank/go.mod +++ b/x/bank/go.mod @@ -23,7 +23,7 @@ require ( github.com/stretchr/testify v1.10.0 go.uber.org/mock v0.5.0 google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 gotest.tools/v3 v3.5.1 ) diff --git a/x/bank/go.sum b/x/bank/go.sum index 1d05f906c880..848f395b6048 100644 --- a/x/bank/go.sum +++ b/x/bank/go.sum @@ -638,8 +638,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/bank/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go index 284129e3eeed..a31e4ef7e04c 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -25,9 +25,9 @@ import ( banktestutil "cosmossdk.io/x/bank/testutil" banktypes "cosmossdk.io/x/bank/types" + "cosmossdk.io/core/testing/queryclient" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/runtime" - "github.com/cosmos/cosmos-sdk/testutil/queryclient" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" diff --git a/x/circuit/go.mod b/x/circuit/go.mod index 96a5f1dfc1bb..533452db10ee 100644 --- a/x/circuit/go.mod +++ b/x/circuit/go.mod @@ -17,7 +17,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/stretchr/testify v1.10.0 google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 ) require ( diff --git a/x/circuit/go.sum b/x/circuit/go.sum index 8e26d39795e6..8a2450276388 100644 --- a/x/circuit/go.sum +++ b/x/circuit/go.sum @@ -640,8 +640,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/consensus/go.mod b/x/consensus/go.mod index 5538fdc50fc5..765087c265ba 100644 --- a/x/consensus/go.mod +++ b/x/consensus/go.mod @@ -19,7 +19,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/stretchr/testify v1.10.0 google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 ) require ( diff --git a/x/consensus/go.sum b/x/consensus/go.sum index 8e26d39795e6..8a2450276388 100644 --- a/x/consensus/go.sum +++ b/x/consensus/go.sum @@ -640,8 +640,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/distribution/go.mod b/x/distribution/go.mod index 420dda7e3119..279b68353541 100644 --- a/x/distribution/go.mod +++ b/x/distribution/go.mod @@ -23,7 +23,7 @@ require ( github.com/stretchr/testify v1.10.0 go.uber.org/mock v0.5.0 google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 ) require ( diff --git a/x/distribution/go.sum b/x/distribution/go.sum index 8e26d39795e6..8a2450276388 100644 --- a/x/distribution/go.sum +++ b/x/distribution/go.sum @@ -640,8 +640,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/epochs/go.mod b/x/epochs/go.mod index 2bab18c12958..5ad5bd928619 100644 --- a/x/epochs/go.mod +++ b/x/epochs/go.mod @@ -17,7 +17,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/stretchr/testify v1.10.0 google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 ) require cosmossdk.io/schema v1.0.0 diff --git a/x/epochs/go.sum b/x/epochs/go.sum index 8e26d39795e6..8a2450276388 100644 --- a/x/epochs/go.sum +++ b/x/epochs/go.sum @@ -640,8 +640,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/evidence/go.mod b/x/evidence/go.mod index 22afb700ad05..6c54fac74746 100644 --- a/x/evidence/go.mod +++ b/x/evidence/go.mod @@ -20,7 +20,7 @@ require ( github.com/stretchr/testify v1.10.0 go.uber.org/mock v0.5.0 google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 google.golang.org/protobuf v1.36.2 ) diff --git a/x/evidence/go.sum b/x/evidence/go.sum index 8e26d39795e6..8a2450276388 100644 --- a/x/evidence/go.sum +++ b/x/evidence/go.sum @@ -640,8 +640,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index ef0d80a70dc0..4047f336247e 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -21,7 +21,7 @@ require ( github.com/stretchr/testify v1.10.0 go.uber.org/mock v0.5.0 google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 google.golang.org/protobuf v1.36.2 gotest.tools/v3 v3.5.1 ) diff --git a/x/feegrant/go.sum b/x/feegrant/go.sum index 56ff7abbab1d..5ded0d00efeb 100644 --- a/x/feegrant/go.sum +++ b/x/feegrant/go.sum @@ -650,8 +650,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/gov/go.mod b/x/gov/go.mod index 08694766649e..a2da2b34109f 100644 --- a/x/gov/go.mod +++ b/x/gov/go.mod @@ -27,7 +27,7 @@ require ( github.com/stretchr/testify v1.10.0 go.uber.org/mock v0.5.0 google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 google.golang.org/protobuf v1.36.2 ) @@ -172,7 +172,10 @@ require ( golang.org/x/arch v0.12.0 // indirect ) -replace github.com/cosmos/cosmos-sdk => ../../. +replace ( + cosmossdk.io/core/testing => ../../core/testing + github.com/cosmos/cosmos-sdk => ../../ +) // TODO remove post spinning out all modules replace ( diff --git a/x/gov/go.sum b/x/gov/go.sum index 56ff7abbab1d..f7fbf915ad90 100644 --- a/x/gov/go.sum +++ b/x/gov/go.sum @@ -10,8 +10,6 @@ cosmossdk.io/collections v1.0.0 h1:YCYIe/pIMtc1iLDD0OrVdfWCnIkpwdy7k9NSQpaR5mg= cosmossdk.io/collections v1.0.0/go.mod h1:mFfLxnYT1fV+B3Lx9GLap1qxmffIPqQCND4xBExerps= cosmossdk.io/core v1.0.0 h1:e7XBbISOytLBOXMVwpRPixThXqEkeLGlg8no/qpgS8U= cosmossdk.io/core v1.0.0/go.mod h1:mKIp3RkoEmtqdEdFHxHwWAULRe+79gfdOvmArrLDbDc= -cosmossdk.io/core/testing v0.0.1 h1:gYCTaftcRrz+HoNXmK7r9KgbG1jgBJ8pNzm/Pa/erFQ= -cosmossdk.io/core/testing v0.0.1/go.mod h1:2VDNz/25qtxgPa0+j8LW5e8Ev/xObqoJA7QuJS9/wIQ= cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= @@ -650,8 +648,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/group/go.mod b/x/group/go.mod index 9294abdbe98e..66232db3dd3e 100644 --- a/x/group/go.mod +++ b/x/group/go.mod @@ -23,7 +23,7 @@ require ( github.com/stretchr/testify v1.10.0 go.uber.org/mock v0.5.0 google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 google.golang.org/protobuf v1.36.2 pgregory.net/rapid v1.1.0 ) @@ -166,7 +166,10 @@ require ( sigs.k8s.io/yaml v1.4.0 // indirect ) -replace github.com/cosmos/cosmos-sdk => ../../ +replace ( + cosmossdk.io/core/testing => ../../core/testing + github.com/cosmos/cosmos-sdk => ../../ +) // TODO remove post spinning out all modules replace ( diff --git a/x/group/go.sum b/x/group/go.sum index b08a94cb0f76..cc6789117f60 100644 --- a/x/group/go.sum +++ b/x/group/go.sum @@ -10,8 +10,6 @@ cosmossdk.io/collections v1.0.0 h1:YCYIe/pIMtc1iLDD0OrVdfWCnIkpwdy7k9NSQpaR5mg= cosmossdk.io/collections v1.0.0/go.mod h1:mFfLxnYT1fV+B3Lx9GLap1qxmffIPqQCND4xBExerps= cosmossdk.io/core v1.0.0 h1:e7XBbISOytLBOXMVwpRPixThXqEkeLGlg8no/qpgS8U= cosmossdk.io/core v1.0.0/go.mod h1:mKIp3RkoEmtqdEdFHxHwWAULRe+79gfdOvmArrLDbDc= -cosmossdk.io/core/testing v0.0.1 h1:gYCTaftcRrz+HoNXmK7r9KgbG1jgBJ8pNzm/Pa/erFQ= -cosmossdk.io/core/testing v0.0.1/go.mod h1:2VDNz/25qtxgPa0+j8LW5e8Ev/xObqoJA7QuJS9/wIQ= cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= @@ -652,8 +650,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/mint/go.mod b/x/mint/go.mod index 1b47f6e77be6..fe34ec6a5e62 100644 --- a/x/mint/go.mod +++ b/x/mint/go.mod @@ -22,7 +22,7 @@ require ( github.com/stretchr/testify v1.10.0 go.uber.org/mock v0.5.0 google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 gotest.tools/v3 v3.5.1 // indirect ) diff --git a/x/mint/go.sum b/x/mint/go.sum index 8e26d39795e6..8a2450276388 100644 --- a/x/mint/go.sum +++ b/x/mint/go.sum @@ -640,8 +640,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/nft/go.mod b/x/nft/go.mod index 823d388ef38b..7ecfd3db8520 100644 --- a/x/nft/go.mod +++ b/x/nft/go.mod @@ -18,7 +18,7 @@ require ( github.com/stretchr/testify v1.10.0 go.uber.org/mock v0.5.0 google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 ) require ( diff --git a/x/nft/go.sum b/x/nft/go.sum index 8e26d39795e6..8a2450276388 100644 --- a/x/nft/go.sum +++ b/x/nft/go.sum @@ -640,8 +640,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/protocolpool/go.mod b/x/protocolpool/go.mod index 3434d726b724..a6620e5d8511 100644 --- a/x/protocolpool/go.mod +++ b/x/protocolpool/go.mod @@ -19,7 +19,7 @@ require ( github.com/stretchr/testify v1.10.0 go.uber.org/mock v0.5.0 google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 google.golang.org/protobuf v1.36.2 ) diff --git a/x/protocolpool/go.sum b/x/protocolpool/go.sum index 8e26d39795e6..8a2450276388 100644 --- a/x/protocolpool/go.sum +++ b/x/protocolpool/go.sum @@ -640,8 +640,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/slashing/go.mod b/x/slashing/go.mod index d4c0b996b259..b7924dd06130 100644 --- a/x/slashing/go.mod +++ b/x/slashing/go.mod @@ -21,7 +21,7 @@ require ( github.com/stretchr/testify v1.10.0 go.uber.org/mock v0.5.0 google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 google.golang.org/protobuf v1.36.2 gotest.tools/v3 v3.5.1 ) diff --git a/x/slashing/go.sum b/x/slashing/go.sum index 5b76dafe2d26..3fc457ac1cfa 100644 --- a/x/slashing/go.sum +++ b/x/slashing/go.sum @@ -642,8 +642,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/staking/go.mod b/x/staking/go.mod index f7067347b8e9..ffc1f290ad75 100644 --- a/x/staking/go.mod +++ b/x/staking/go.mod @@ -24,7 +24,7 @@ require ( github.com/stretchr/testify v1.10.0 go.uber.org/mock v0.5.0 google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 google.golang.org/protobuf v1.36.2 ) diff --git a/x/staking/go.sum b/x/staking/go.sum index 8e26d39795e6..8a2450276388 100644 --- a/x/staking/go.sum +++ b/x/staking/go.sum @@ -640,8 +640,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/x/upgrade/go.mod b/x/upgrade/go.mod index 209c5545fd33..87ab26e76301 100644 --- a/x/upgrade/go.mod +++ b/x/upgrade/go.mod @@ -28,7 +28,7 @@ require ( github.com/stretchr/testify v1.10.0 go.uber.org/mock v0.5.0 google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 - google.golang.org/grpc v1.69.2 + google.golang.org/grpc v1.69.4 google.golang.org/protobuf v1.36.2 ) diff --git a/x/upgrade/go.sum b/x/upgrade/go.sum index 07a4d55e302f..5df3ecdad060 100644 --- a/x/upgrade/go.sum +++ b/x/upgrade/go.sum @@ -1362,8 +1362,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= From 1b9b8f7633e56fd5d49d4993d615c6eec449826e Mon Sep 17 00:00:00 2001 From: aljo242 Date: Tue, 14 Jan 2025 15:02:34 -0500 Subject: [PATCH 31/33] refactor --- core/testing/go.mod | 28 -- core/testing/go.sum | 352 ------------------ core/testing/queryclient/queryclient.go | 21 +- tests/integration/v2/accounts/fixture_test.go | 2 +- tests/integration/v2/accounts/lockup/utils.go | 2 +- .../v2/accounts/multisig/test_suite.go | 2 +- tests/integration/v2/auth/app_test.go | 2 +- .../v2/distribution/fixture_test.go | 2 +- tests/integration/v2/gov/common_test.go | 2 +- .../integration/v2/gov/keeper/fixture_test.go | 2 +- x/accounts/utils_test.go | 2 +- x/bank/keeper/keeper_test.go | 7 +- 12 files changed, 18 insertions(+), 406 deletions(-) diff --git a/core/testing/go.mod b/core/testing/go.mod index 27fdf6be00a0..05d1362648e8 100644 --- a/core/testing/go.mod +++ b/core/testing/go.mod @@ -7,7 +7,6 @@ toolchain go1.23.4 require ( cosmossdk.io/core v1.0.0 github.com/cometbft/cometbft/api v1.0.0 - github.com/cosmos/cosmos-sdk v0.50.11 github.com/cosmos/gogoproto v1.7.0 github.com/tidwall/btree v1.7.0 go.uber.org/mock v0.5.0 @@ -15,39 +14,12 @@ require ( ) require ( - cosmossdk.io/api v0.7.6 // indirect - cosmossdk.io/collections v0.4.0 // indirect - cosmossdk.io/errors v1.0.1 // indirect - cosmossdk.io/math v1.4.0 // indirect cosmossdk.io/schema v1.0.0 // indirect - cosmossdk.io/x/tx v0.13.7 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect - github.com/cometbft/cometbft v0.38.12 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect - github.com/iancoleman/strcase v0.3.0 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect - github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/stretchr/testify v1.9.0 // indirect - github.com/tendermint/go-amino v0.16.0 // indirect - golang.org/x/crypto v0.28.0 // indirect - golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect golang.org/x/net v0.30.0 // indirect golang.org/x/sys v0.26.0 // indirect golang.org/x/text v0.19.0 // indirect - google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect google.golang.org/protobuf v1.35.1 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/core/testing/go.sum b/core/testing/go.sum index 71f6811d11c9..366293808693 100644 --- a/core/testing/go.sum +++ b/core/testing/go.sum @@ -1,299 +1,23 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cosmossdk.io/api v0.7.6 h1:PC20PcXy1xYKH2KU4RMurVoFjjKkCgYRbVAD4PdqUuY= -cosmossdk.io/api v0.7.6/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= -cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= -cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v1.0.0 h1:e7XBbISOytLBOXMVwpRPixThXqEkeLGlg8no/qpgS8U= cosmossdk.io/core v1.0.0/go.mod h1:mKIp3RkoEmtqdEdFHxHwWAULRe+79gfdOvmArrLDbDc= -cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= -cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= -cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= -cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= -cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ= -cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk= cosmossdk.io/schema v1.0.0 h1:/diH4XJjpV1JQwuIozwr+A4uFuuwanFdnw2kKeiXwwQ= cosmossdk.io/schema v1.0.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ= -cosmossdk.io/store v1.1.1 h1:NA3PioJtWDVU7cHHeyvdva5J/ggyLDkyH0hGHl2804Y= -cosmossdk.io/store v1.1.1/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= -cosmossdk.io/x/tx v0.13.7 h1:8WSk6B/OHJLYjiZeMKhq7DK7lHDMyK0UfDbBMxVmeOI= -cosmossdk.io/x/tx v0.13.7/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= -filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= -filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= -github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= -github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= -github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= -github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= -github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= -github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= -github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= -github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= -github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= -github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= -github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= -github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= -github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v1.1.2 h1:CUh2IPtR4swHlEj48Rhfzw6l/d0qA31fItcIszQVIsA= -github.com/cockroachdb/pebble v1.1.2/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= -github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= -github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= -github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= -github.com/cometbft/cometbft v0.38.12 h1:OWsLZN2KcSSFe8bet9xCn07VwhBnavPea3VyPnNq1bg= -github.com/cometbft/cometbft v0.38.12/go.mod h1:GPHp3/pehPqgX1930HmK1BpBLZPxB75v/dZg8Viwy+o= -github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= -github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/cometbft/cometbft/api v1.0.0 h1:gGBwvsJi/gnHJEtwYfjPIGs2AKg/Vfa1ZuKCPD1/Ko4= github.com/cometbft/cometbft/api v1.0.0/go.mod h1:EkQiqVSu/p2ebrZEnB2z6Re7r8XNe//M7ylR0qEwWm0= -github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= -github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.1.0 h1:KLHNVQ73h7vawXTpj9UJ7ZR2IXv51tsEHkQJJ9EBDzI= -github.com/cosmos/cosmos-db v1.1.0/go.mod h1:t7c4A6cfGdpUwwVxrQ0gQLeRQqGUBJu0yvE4F/26REg= -github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= -github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.50.11 h1:LxR1aAc8kixdrs3itO+3a44sFoc+vjxVAOyPFx22yjk= -github.com/cosmos/cosmos-sdk v0.50.11/go.mod h1:gt14Meok2IDCjbDtjwkbUcgVNEpUBDN/4hg9cCUtLgw= -github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= -github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= -github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= -github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= -github.com/cosmos/iavl v1.2.2 h1:qHhKW3I70w+04g5KdsdVSHRbFLgt3yY3qTMd4Xa4rC8= -github.com/cosmos/iavl v1.2.2/go.mod h1:GiM43q0pB+uG53mLxLDzimxM9l/5N9UuSY3/D0huuVw= -github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= -github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= -github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= -github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= -github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= -github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= -github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= -github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= -github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= -github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= -github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= -github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= -github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= -github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= -github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= -github.com/emicklei/dot v1.6.2 h1:08GN+DD79cy/tzN6uLCT84+2Wk9u+wvqP+Hkx/dIR8A= -github.com/emicklei/dot v1.6.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= -github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= -github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= -github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= -github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= -github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= -github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY= -github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= -github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= -github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= -github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= -github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= -github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= -github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= -github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= -github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= -github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= -github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= -github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= -github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= -github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= -github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= -github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= -github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= -github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= -github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= -github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= -github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= -github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= -github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= -github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= -github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= -github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= -github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= -github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= -github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8= -github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= -github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= -github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= -github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= -github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= -github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= -github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= -github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= -github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= -github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= -github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= -github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= -github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= -github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= -github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= -github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= -github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= -github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= -github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= -github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= -github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= -github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= -github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= -github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= -github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= -github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= -github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= -go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= -go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= @@ -306,91 +30,15 @@ go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HY go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= -go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= -go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= -golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 h1:fVoAXEKA4+yufmbdVYv+SE73+cPZbbbe8paLsHfkK+U= -google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53/go.mod h1:riSXTwQ4+nqmPGtobMFyW5FqVAmIs0St6VPp4Ug7CE4= google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 h1:X58yt85/IXCx0Y3ZwN6sEIKZzQtDEYaBWrDvErdXrRE= google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= -gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= -gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= -nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= -pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/core/testing/queryclient/queryclient.go b/core/testing/queryclient/queryclient.go index 8502fcb5d5bd..54d95174fd7c 100644 --- a/core/testing/queryclient/queryclient.go +++ b/core/testing/queryclient/queryclient.go @@ -8,10 +8,6 @@ import ( gogogrpc "github.com/cosmos/gogoproto/grpc" "google.golang.org/grpc" "google.golang.org/grpc/encoding" - - "github.com/cosmos/cosmos-sdk/client/grpc/reflection" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" ) var ( @@ -19,25 +15,22 @@ var ( _ gogogrpc.Server = &QueryHelper{} ) +// GRPCQueryHandler defines a function type which handles ABCI Query requests +// using gRPC +type GRPCQueryHandler = func(ctx context.Context, req *abci.QueryRequest) (*abci.QueryResponse, error) + // QueryHelper is a test utility for building a query client from a proto interface registry. type QueryHelper struct { cdc encoding.Codec routes map[string]GRPCQueryHandler } -func NewQueryHelper(interfaceRegistry codectypes.InterfaceRegistry) *QueryHelper { - // instantiate the codec - cdc := codec.NewProtoCodec(interfaceRegistry).GRPCCodec() - // Once we have an interface registry, we can register the interface - // registry reflection gRPC service. - +func NewQueryHelper(cdc encoding.Codec) *QueryHelper { qh := &QueryHelper{ cdc: cdc, routes: map[string]GRPCQueryHandler{}, } - reflection.RegisterReflectionServiceServer(qh, reflection.NewReflectionServiceServer(interfaceRegistry)) - return qh } @@ -70,10 +63,6 @@ func (q *QueryHelper) NewStream(context.Context, *grpc.StreamDesc, string, ...gr panic("not implemented") } -// GRPCQueryHandler defines a function type which handles ABCI Query requests -// using gRPC -type GRPCQueryHandler = func(ctx context.Context, req *abci.QueryRequest) (*abci.QueryResponse, error) - // Route returns the GRPCQueryHandler for a given query route path or nil // if not found func (q *QueryHelper) Route(path string) GRPCQueryHandler { diff --git a/tests/integration/v2/accounts/fixture_test.go b/tests/integration/v2/accounts/fixture_test.go index 81b3dce597d0..54627a688046 100644 --- a/tests/integration/v2/accounts/fixture_test.go +++ b/tests/integration/v2/accounts/fixture_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/core/router" + "cosmossdk.io/core/testing/msgrouter" "cosmossdk.io/core/transaction" "cosmossdk.io/depinject" "cosmossdk.io/log" @@ -25,7 +26,6 @@ import ( minttypes "cosmossdk.io/x/mint/types" _ "cosmossdk.io/x/staking" // import as blank for app wirings - "cosmossdk.io/core/testing/msgrouter" "github.com/cosmos/cosmos-sdk/codec" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/tests/integration/v2" diff --git a/tests/integration/v2/accounts/lockup/utils.go b/tests/integration/v2/accounts/lockup/utils.go index db433402fe4b..b186c0756365 100644 --- a/tests/integration/v2/accounts/lockup/utils.go +++ b/tests/integration/v2/accounts/lockup/utils.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/suite" "cosmossdk.io/core/router" + "cosmossdk.io/core/testing/msgrouter" "cosmossdk.io/core/transaction" "cosmossdk.io/depinject" "cosmossdk.io/log" @@ -28,7 +29,6 @@ import ( stakingkeeper "cosmossdk.io/x/staking/keeper" stakingtypes "cosmossdk.io/x/staking/types" - "cosmossdk.io/core/testing/msgrouter" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/tests/integration/v2" "github.com/cosmos/cosmos-sdk/testutil/configurator" diff --git a/tests/integration/v2/accounts/multisig/test_suite.go b/tests/integration/v2/accounts/multisig/test_suite.go index 97051cc6da3a..da998b1bae30 100644 --- a/tests/integration/v2/accounts/multisig/test_suite.go +++ b/tests/integration/v2/accounts/multisig/test_suite.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/suite" "cosmossdk.io/core/router" + "cosmossdk.io/core/testing/msgrouter" "cosmossdk.io/core/transaction" "cosmossdk.io/depinject" "cosmossdk.io/log" @@ -26,7 +27,6 @@ import ( _ "cosmossdk.io/x/staking" // import as blank for app wiring stakingkeeper "cosmossdk.io/x/staking/keeper" - "cosmossdk.io/core/testing/msgrouter" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/tests/integration/v2" diff --git a/tests/integration/v2/auth/app_test.go b/tests/integration/v2/auth/app_test.go index 5d2d16d7bbec..6a20e9eef797 100644 --- a/tests/integration/v2/auth/app_test.go +++ b/tests/integration/v2/auth/app_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/core/router" + "cosmossdk.io/core/testing/msgrouter" "cosmossdk.io/core/transaction" "cosmossdk.io/depinject" "cosmossdk.io/log" @@ -22,7 +23,6 @@ import ( _ "cosmossdk.io/x/consensus" // import as blank for app wiring _ "cosmossdk.io/x/staking" // import as blank for app wirings - "cosmossdk.io/core/testing/msgrouter" "github.com/cosmos/cosmos-sdk/tests/integration/v2" "github.com/cosmos/cosmos-sdk/testutil/configurator" _ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring diff --git a/tests/integration/v2/distribution/fixture_test.go b/tests/integration/v2/distribution/fixture_test.go index ebb787052636..efd7dcefa676 100644 --- a/tests/integration/v2/distribution/fixture_test.go +++ b/tests/integration/v2/distribution/fixture_test.go @@ -9,6 +9,7 @@ import ( "cosmossdk.io/core/comet" corecontext "cosmossdk.io/core/context" "cosmossdk.io/core/router" + "cosmossdk.io/core/testing/msgrouter" "cosmossdk.io/core/transaction" "cosmossdk.io/depinject" "cosmossdk.io/log" @@ -26,7 +27,6 @@ import ( _ "cosmossdk.io/x/staking" // import as blank for app wiring stakingkeeper "cosmossdk.io/x/staking/keeper" - "cosmossdk.io/core/testing/msgrouter" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/tests/integration/v2" "github.com/cosmos/cosmos-sdk/testutil/configurator" diff --git a/tests/integration/v2/gov/common_test.go b/tests/integration/v2/gov/common_test.go index b06caf75ea5c..fe6dee347806 100644 --- a/tests/integration/v2/gov/common_test.go +++ b/tests/integration/v2/gov/common_test.go @@ -11,6 +11,7 @@ import ( "gotest.tools/v3/assert" "cosmossdk.io/core/router" + "cosmossdk.io/core/testing/msgrouter" "cosmossdk.io/core/transaction" "cosmossdk.io/depinject" sdklog "cosmossdk.io/log" @@ -32,7 +33,6 @@ import ( stakingkeeper "cosmossdk.io/x/staking/keeper" stakingtypes "cosmossdk.io/x/staking/types" - "cosmossdk.io/core/testing/msgrouter" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" diff --git a/tests/integration/v2/gov/keeper/fixture_test.go b/tests/integration/v2/gov/keeper/fixture_test.go index 786f7eb3ed12..da032125dece 100644 --- a/tests/integration/v2/gov/keeper/fixture_test.go +++ b/tests/integration/v2/gov/keeper/fixture_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/core/router" + "cosmossdk.io/core/testing/msgrouter" "cosmossdk.io/core/transaction" "cosmossdk.io/depinject" "cosmossdk.io/log" @@ -23,7 +24,6 @@ import ( _ "cosmossdk.io/x/staking" stakingkeeper "cosmossdk.io/x/staking/keeper" - "cosmossdk.io/core/testing/msgrouter" "github.com/cosmos/cosmos-sdk/tests/integration/v2" "github.com/cosmos/cosmos-sdk/testutil/configurator" _ "github.com/cosmos/cosmos-sdk/x/auth" diff --git a/x/accounts/utils_test.go b/x/accounts/utils_test.go index 40c1cece67b6..d8a52ca7588e 100644 --- a/x/accounts/utils_test.go +++ b/x/accounts/utils_test.go @@ -11,13 +11,13 @@ import ( bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" "cosmossdk.io/core/address" coretesting "cosmossdk.io/core/testing" + "cosmossdk.io/core/testing/msgrouter" "cosmossdk.io/core/transaction" "cosmossdk.io/math" "cosmossdk.io/x/accounts/internal/implementation" banktypes "cosmossdk.io/x/bank/types" "cosmossdk.io/x/tx/signing" - "cosmossdk.io/core/testing/msgrouter" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/bank/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go index a31e4ef7e04c..cf22603712b9 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -10,6 +10,8 @@ import ( "testing" "time" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/stretchr/testify/suite" "go.uber.org/mock/gomock" @@ -17,6 +19,7 @@ import ( coreevent "cosmossdk.io/core/event" "cosmossdk.io/core/header" coretesting "cosmossdk.io/core/testing" + "cosmossdk.io/core/testing/queryclient" errorsmod "cosmossdk.io/errors" "cosmossdk.io/log" "cosmossdk.io/math" @@ -25,7 +28,7 @@ import ( banktestutil "cosmossdk.io/x/bank/testutil" banktypes "cosmossdk.io/x/bank/types" - "cosmossdk.io/core/testing/queryclient" + "github.com/cosmos/cosmos-sdk/codec" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" @@ -186,7 +189,7 @@ func (suite *KeeperTestSuite) SetupTest() { DefaultSendEnabled: banktypes.DefaultDefaultSendEnabled, })) - queryHelper := queryclient.NewQueryHelper(encCfg.InterfaceRegistry) + queryHelper := queryclient.NewQueryHelper(codec.NewProtoCodec(encCfg.InterfaceRegistry).GRPCCodec()) banktypes.RegisterQueryServer(queryHelper, suite.bankKeeper) banktypes.RegisterInterfaces(encCfg.InterfaceRegistry) From 47bdcde047a783529901c5791db2d236ee1eb0a8 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Wed, 15 Jan 2025 10:57:49 -0500 Subject: [PATCH 32/33] clean --- core/testing/go.mod | 2 -- core/testing/go.sum | 2 -- core/testing/queryclient/queryclient.go | 23 +++++++++++++++++------ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/core/testing/go.mod b/core/testing/go.mod index 05d1362648e8..610c66b3b5fd 100644 --- a/core/testing/go.mod +++ b/core/testing/go.mod @@ -6,7 +6,6 @@ toolchain go1.23.4 require ( cosmossdk.io/core v1.0.0 - github.com/cometbft/cometbft/api v1.0.0 github.com/cosmos/gogoproto v1.7.0 github.com/tidwall/btree v1.7.0 go.uber.org/mock v0.5.0 @@ -15,7 +14,6 @@ require ( require ( cosmossdk.io/schema v1.0.0 // indirect - github.com/golang/protobuf v1.5.4 // indirect github.com/google/go-cmp v0.6.0 // indirect golang.org/x/net v0.30.0 // indirect golang.org/x/sys v0.26.0 // indirect diff --git a/core/testing/go.sum b/core/testing/go.sum index 366293808693..859d976d5aef 100644 --- a/core/testing/go.sum +++ b/core/testing/go.sum @@ -2,8 +2,6 @@ cosmossdk.io/core v1.0.0 h1:e7XBbISOytLBOXMVwpRPixThXqEkeLGlg8no/qpgS8U= cosmossdk.io/core v1.0.0/go.mod h1:mKIp3RkoEmtqdEdFHxHwWAULRe+79gfdOvmArrLDbDc= cosmossdk.io/schema v1.0.0 h1:/diH4XJjpV1JQwuIozwr+A4uFuuwanFdnw2kKeiXwwQ= cosmossdk.io/schema v1.0.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ= -github.com/cometbft/cometbft/api v1.0.0 h1:gGBwvsJi/gnHJEtwYfjPIGs2AKg/Vfa1ZuKCPD1/Ko4= -github.com/cometbft/cometbft/api v1.0.0/go.mod h1:EkQiqVSu/p2ebrZEnB2z6Re7r8XNe//M7ylR0qEwWm0= github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= diff --git a/core/testing/queryclient/queryclient.go b/core/testing/queryclient/queryclient.go index 54d95174fd7c..9e11a29c8234 100644 --- a/core/testing/queryclient/queryclient.go +++ b/core/testing/queryclient/queryclient.go @@ -4,7 +4,6 @@ import ( "context" "fmt" - abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" gogogrpc "github.com/cosmos/gogoproto/grpc" "google.golang.org/grpc" "google.golang.org/grpc/encoding" @@ -15,9 +14,21 @@ var ( _ gogogrpc.Server = &QueryHelper{} ) -// GRPCQueryHandler defines a function type which handles ABCI Query requests +// GRPCQueryHandler defines a function type which handles mocked ABCI Query requests // using gRPC -type GRPCQueryHandler = func(ctx context.Context, req *abci.QueryRequest) (*abci.QueryResponse, error) +type GRPCQueryHandler = func(ctx context.Context, req *QueryRequest) (*QueryResponse, error) + +// QueryRequest is a light mock of cometbft abci.QueryRequest. +type QueryRequest struct { + Data []byte + Height int64 +} + +// QueryResponse is a light mock of cometbft abci.QueryResponse. +type QueryResponse struct { + Value []byte + Height int64 +} // QueryHelper is a test utility for building a query client from a proto interface registry. type QueryHelper struct { @@ -45,7 +56,7 @@ func (q *QueryHelper) Invoke(ctx context.Context, method string, args, reply int return err } - res, err := querier(ctx, &abci.QueryRequest{Data: reqBz}) + res, err := querier(ctx, &QueryRequest{Data: reqBz}) if err != nil { return err } @@ -94,7 +105,7 @@ func (q *QueryHelper) registerABCIQueryHandler(sd *grpc.ServiceDesc, method grpc panic(fmt.Sprintf("handler for %s already registered", fqName)) } - q.routes[fqName] = func(ctx context.Context, req *abci.QueryRequest) (*abci.QueryResponse, error) { + q.routes[fqName] = func(ctx context.Context, req *QueryRequest) (*QueryResponse, error) { // call the method handler from the service description with the handler object, // a wrapped sdk.Context with proto-unmarshaled data from the ABCI request data res, err := methodHandler(handler, ctx, func(i interface{}) error { @@ -112,7 +123,7 @@ func (q *QueryHelper) registerABCIQueryHandler(sd *grpc.ServiceDesc, method grpc } // return the result bytes as the response value - return &abci.QueryResponse{ + return &QueryResponse{ Height: req.Height, Value: resBytes, }, nil From 5d14883e0b7ce952dd796759c82c0a58723650ea Mon Sep 17 00:00:00 2001 From: aljo242 Date: Wed, 15 Jan 2025 11:08:26 -0500 Subject: [PATCH 33/33] fix --- core/testing/go.mod | 6 +++--- core/testing/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/testing/go.mod b/core/testing/go.mod index 610c66b3b5fd..aceffa4a560d 100644 --- a/core/testing/go.mod +++ b/core/testing/go.mod @@ -15,9 +15,9 @@ require ( require ( cosmossdk.io/schema v1.0.0 // indirect github.com/google/go-cmp v0.6.0 // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/text v0.19.0 // indirect + golang.org/x/net v0.33.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect google.golang.org/protobuf v1.35.1 // indirect ) diff --git a/core/testing/go.sum b/core/testing/go.sum index 859d976d5aef..123a046f5817 100644 --- a/core/testing/go.sum +++ b/core/testing/go.sum @@ -28,12 +28,12 @@ go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HY go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= +golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 h1:X58yt85/IXCx0Y3ZwN6sEIKZzQtDEYaBWrDvErdXrRE= google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A=