From 776ad27732abfed72fb7e569f33d520d8f36dc6b Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Thu, 8 Aug 2024 10:04:32 +0200 Subject: [PATCH] capability changes --- .../controller/keeper/account.go | 11 +- .../controller/keeper/events.go | 2 +- .../controller/keeper/genesis.go | 7 +- .../controller/keeper/keeper.go | 8 +- modules/apps/29-fee/keeper/escrow.go | 17 +- modules/apps/29-fee/keeper/events.go | 22 ++- modules/apps/29-fee/keeper/keeper.go | 2 +- modules/capability/capability_test.go | 16 +- modules/capability/genesis_test.go | 13 +- modules/capability/go.mod | 34 ++-- modules/capability/go.sum | 92 +++++++---- modules/capability/keeper/keeper.go | 155 ++++++++++-------- modules/capability/keeper/keeper_test.go | 4 +- 13 files changed, 228 insertions(+), 155 deletions(-) diff --git a/modules/apps/27-interchain-accounts/controller/keeper/account.go b/modules/apps/27-interchain-accounts/controller/keeper/account.go index 779826dbc94..9ed66f6b3b1 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/account.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/account.go @@ -1,6 +1,8 @@ package keeper import ( + "context" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" @@ -29,7 +31,7 @@ import ( // Prior to v6.x.x of ibc-go, the controller module was only functional as middleware, with authentication performed // by the underlying application. For a full summary of the changes in v6.x.x, please see ADR009. // This API will be removed in later releases. -func (k Keeper) RegisterInterchainAccount(ctx sdk.Context, connectionID, owner, version string, ordering channeltypes.Order) error { +func (k Keeper) RegisterInterchainAccount(ctx context.Context, connectionID, owner, version string, ordering channeltypes.Order) error { portID, err := icatypes.NewControllerPortID(owner) if err != nil { return err @@ -56,7 +58,7 @@ func (k Keeper) RegisterInterchainAccount(ctx sdk.Context, connectionID, owner, // registerInterchainAccount registers an interchain account, returning the channel id of the MsgChannelOpenInitResponse // and an error if one occurred. -func (k Keeper) registerInterchainAccount(ctx sdk.Context, connectionID, portID, version string, ordering channeltypes.Order) (string, error) { +func (k Keeper) registerInterchainAccount(ctx context.Context, connectionID, portID, version string, ordering channeltypes.Order) (string, error) { // if there is an active channel for this portID / connectionID return an error activeChannelID, found := k.GetOpenActiveChannel(ctx, connectionID, portID) if found { @@ -74,9 +76,10 @@ func (k Keeper) registerInterchainAccount(ctx sdk.Context, connectionID, portID, } } + sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove when Upgrading to 52 msg := channeltypes.NewMsgChannelOpenInit(portID, version, ordering, []string{connectionID}, icatypes.HostPortID, authtypes.NewModuleAddress(icatypes.ModuleName).String()) handler := k.msgRouter.Handler(msg) - res, err := handler(ctx, msg) + res, err := handler(sdkCtx, msg) if err != nil { return "", err } @@ -85,7 +88,7 @@ func (k Keeper) registerInterchainAccount(ctx sdk.Context, connectionID, portID, k.Logger(ctx).Debug("emitting interchain account registration events", logging.SdkEventsToLogArguments(events)) // NOTE: The sdk msg handler creates a new EventManager, so events must be correctly propagated back to the current context - ctx.EventManager().EmitEvents(events) + sdkCtx.EventManager().EmitEvents(events) firstMsgResponse := res.MsgResponses[0] channelOpenInitResponse, ok := firstMsgResponse.GetCachedValue().(*channeltypes.MsgChannelOpenInitResponse) diff --git a/modules/apps/27-interchain-accounts/controller/keeper/events.go b/modules/apps/27-interchain-accounts/controller/keeper/events.go index f4ca8b758a2..c0fe4518b90 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/events.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/events.go @@ -14,7 +14,7 @@ import ( // EmitAcknowledgementEvent emits an event signalling a successful or failed acknowledgement and including the error // details if any. func EmitAcknowledgementEvent(ctx context.Context, packet channeltypes.Packet, ack exported.Acknowledgement, err error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove after sdk.Context is removed from core IBC + sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove when Upgrading to 52 attributes := []sdk.Attribute{ sdk.NewAttribute(sdk.AttributeKeyModule, icatypes.ModuleName), sdk.NewAttribute(icatypes.AttributeKeyControllerChannelID, packet.GetDestChannel()), diff --git a/modules/apps/27-interchain-accounts/controller/keeper/genesis.go b/modules/apps/27-interchain-accounts/controller/keeper/genesis.go index acf5f0d33aa..a904d9de271 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/genesis.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/genesis.go @@ -1,16 +1,15 @@ package keeper import ( + "context" "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" - genesistypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/genesis/types" host "github.com/cosmos/ibc-go/v9/modules/core/24-host" ) // InitGenesis initializes the interchain accounts controller application state from a provided genesis state -func InitGenesis(ctx sdk.Context, keeper Keeper, state genesistypes.ControllerGenesisState) { +func InitGenesis(ctx context.Context, keeper Keeper, state genesistypes.ControllerGenesisState) { for _, portID := range state.Ports { keeper.setPort(ctx, portID) @@ -44,7 +43,7 @@ func InitGenesis(ctx sdk.Context, keeper Keeper, state genesistypes.ControllerGe } // ExportGenesis returns the interchain accounts controller exported genesis -func ExportGenesis(ctx sdk.Context, keeper Keeper) genesistypes.ControllerGenesisState { +func ExportGenesis(ctx context.Context, keeper Keeper) genesistypes.ControllerGenesisState { return genesistypes.NewControllerGenesisState( keeper.GetAllActiveChannels(ctx), keeper.GetAllInterchainAccounts(ctx), diff --git a/modules/apps/27-interchain-accounts/controller/keeper/keeper.go b/modules/apps/27-interchain-accounts/controller/keeper/keeper.go index fc1840a01fe..84535602dbd 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/keeper.go @@ -82,7 +82,7 @@ func (k Keeper) GetICS4Wrapper() porttypes.ICS4Wrapper { // Logger returns the application logger, scoped to the associated module func (Keeper) Logger(ctx context.Context) log.Logger { - sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove after sdk.Context is removed from core IBC + sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove when Upgrading to 52 return sdkCtx.Logger().With("module", fmt.Sprintf("x/%s-%s", exported.ModuleName, icatypes.ModuleName)) } @@ -119,20 +119,20 @@ func (k Keeper) setPort(ctx context.Context, portID string) { // hasCapability checks if the interchain account controller module owns the port capability for the desired port func (k Keeper) hasCapability(ctx context.Context, portID string) bool { - sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove after sdk.Context is removed from core IBC + sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove when Upgrading to 52 _, ok := k.scopedKeeper.GetCapability(sdkCtx, host.PortPath(portID)) return ok } // AuthenticateCapability wraps the scopedKeeper's AuthenticateCapability function func (k Keeper) AuthenticateCapability(ctx context.Context, cap *capabilitytypes.Capability, name string) bool { - sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove after sdk.Context is removed from core IBC + sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove when Upgrading to 52 return k.scopedKeeper.AuthenticateCapability(sdkCtx, cap, name) } // ClaimCapability wraps the scopedKeeper's ClaimCapability function func (k Keeper) ClaimCapability(ctx context.Context, cap *capabilitytypes.Capability, name string) error { - sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove after sdk.Context is removed from core IBC + sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove when Upgrading to 52 return k.scopedKeeper.ClaimCapability(sdkCtx, cap, name) } diff --git a/modules/apps/29-fee/keeper/escrow.go b/modules/apps/29-fee/keeper/escrow.go index 12cef74341f..91e01eea090 100644 --- a/modules/apps/29-fee/keeper/escrow.go +++ b/modules/apps/29-fee/keeper/escrow.go @@ -14,7 +14,7 @@ import ( ) // escrowPacketFee sends the packet fee to the 29-fee module account to hold in escrow -func (k Keeper) escrowPacketFee(ctx sdk.Context, packetID channeltypes.PacketId, packetFee types.PacketFee) error { +func (k Keeper) escrowPacketFee(ctx context.Context, packetID channeltypes.PacketId, packetFee types.PacketFee) error { // check if the refund address is valid refundAddr, err := sdk.AccAddressFromBech32(packetFee.RefundAddress) if err != nil { @@ -50,7 +50,7 @@ func (k Keeper) escrowPacketFee(ctx sdk.Context, packetID channeltypes.PacketId, func (k Keeper) DistributePacketFeesOnAcknowledgement(ctx context.Context, forwardRelayer string, reverseRelayer sdk.AccAddress, packetFees []types.PacketFee, packetID channeltypes.PacketId) { // cache context before trying to distribute fees // if the escrow account has insufficient balance then we want to avoid partially distributing fees - sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove after sdk.Context is removed from core IBC + sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove when Upgrading to 52 cacheCtx, writeFn := sdkCtx.CacheContext() // forward relayer address will be empty if conversion fails @@ -86,7 +86,7 @@ func (k Keeper) DistributePacketFeesOnAcknowledgement(ctx context.Context, forwa // distributePacketFeeOnAcknowledgement pays the receive fee for a given packetID while refunding the timeout fee to the refund account associated with the Fee. // If there was no forward relayer or the associated forward relayer address is blocked, the receive fee is refunded. -func (k Keeper) distributePacketFeeOnAcknowledgement(ctx sdk.Context, refundAddr, forwardRelayer, reverseRelayer sdk.AccAddress, packetFee types.PacketFee) { +func (k Keeper) distributePacketFeeOnAcknowledgement(ctx context.Context, refundAddr, forwardRelayer, reverseRelayer sdk.AccAddress, packetFee types.PacketFee) { // distribute fee to valid forward relayer address otherwise refund the fee if !forwardRelayer.Empty() && !k.bankKeeper.BlockedAddr(forwardRelayer) { // distribute fee for forward relaying @@ -108,7 +108,7 @@ func (k Keeper) distributePacketFeeOnAcknowledgement(ctx sdk.Context, refundAddr func (k Keeper) DistributePacketFeesOnTimeout(ctx context.Context, timeoutRelayer sdk.AccAddress, packetFees []types.PacketFee, packetID channeltypes.PacketId) { // cache context before trying to distribute fees // if the escrow account has insufficient balance then we want to avoid partially distributing fees - sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove after sdk.Context is removed from core IBC + sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove when Upgrading to 52 cacheCtx, writeFn := sdkCtx.CacheContext() for _, packetFee := range packetFees { @@ -140,7 +140,7 @@ func (k Keeper) DistributePacketFeesOnTimeout(ctx context.Context, timeoutRelaye } // distributePacketFeeOnTimeout pays the timeout fee to the timeout relayer and refunds the acknowledgement & receive fee. -func (k Keeper) distributePacketFeeOnTimeout(ctx sdk.Context, refundAddr, timeoutRelayer sdk.AccAddress, packetFee types.PacketFee) { +func (k Keeper) distributePacketFeeOnTimeout(ctx context.Context, refundAddr, timeoutRelayer sdk.AccAddress, packetFee types.PacketFee) { // distribute fee for timeout relaying k.distributeFee(ctx, timeoutRelayer, refundAddr, packetFee.Fee.TimeoutFee) @@ -152,9 +152,10 @@ func (k Keeper) distributePacketFeeOnTimeout(ctx sdk.Context, refundAddr, timeou // distributeFee will attempt to distribute the escrowed fee to the receiver address. // If the distribution fails for any reason (such as the receiving address being blocked), // the state changes will be discarded. -func (k Keeper) distributeFee(ctx sdk.Context, receiver, refundAccAddress sdk.AccAddress, fee sdk.Coins) { +func (k Keeper) distributeFee(ctx context.Context, receiver, refundAccAddress sdk.AccAddress, fee sdk.Coins) { // cache context before trying to distribute fees - cacheCtx, writeFn := ctx.CacheContext() + sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove when Upgrading to 52 + cacheCtx, writeFn := sdkCtx.CacheContext() err := k.bankKeeper.SendCoinsFromModuleToAccount(cacheCtx, types.ModuleName, receiver, fee) if err != nil { @@ -189,7 +190,7 @@ func (k Keeper) RefundFeesOnChannelClosure(ctx context.Context, portID, channelI // cache context before trying to distribute fees // if the escrow account has insufficient balance then we want to avoid partially distributing fees - sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove after sdk.Context is removed from core IBC + sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove when Upgrading to 52 cacheCtx, writeFn := sdkCtx.CacheContext() for _, identifiedPacketFee := range identifiedPacketFees { diff --git a/modules/apps/29-fee/keeper/events.go b/modules/apps/29-fee/keeper/events.go index d5883be5443..92ea87f757c 100644 --- a/modules/apps/29-fee/keeper/events.go +++ b/modules/apps/29-fee/keeper/events.go @@ -1,6 +1,7 @@ package keeper import ( + "context" "fmt" sdk "github.com/cosmos/cosmos-sdk/types" @@ -11,7 +12,7 @@ import ( // emitIncentivizedPacketEvent emits an event containing information on the total amount of fees incentivizing // a specific packet. It should be emitted on every fee escrowed for the given packetID. -func emitIncentivizedPacketEvent(ctx sdk.Context, packetID channeltypes.PacketId, packetFees types.PacketFees) { +func emitIncentivizedPacketEvent(ctx context.Context, packetID channeltypes.PacketId, packetFees types.PacketFees) { var ( totalRecvFees sdk.Coins totalAckFees sdk.Coins @@ -26,8 +27,8 @@ func emitIncentivizedPacketEvent(ctx sdk.Context, packetID channeltypes.PacketId totalTimeoutFees = totalTimeoutFees.Add(fee.Fee.TimeoutFee...) } } - - ctx.EventManager().EmitEvents(sdk.Events{ + sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove when Upgrading to 52 + sdkCtx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeIncentivizedPacket, sdk.NewAttribute(channeltypes.AttributeKeyPortID, packetID.PortId), @@ -45,8 +46,9 @@ func emitIncentivizedPacketEvent(ctx sdk.Context, packetID channeltypes.PacketId } // emitRegisterPayeeEvent emits an event containing information of a registered payee for a relayer on a particular channel -func emitRegisterPayeeEvent(ctx sdk.Context, relayer, payee, channelID string) { - ctx.EventManager().EmitEvents(sdk.Events{ +func emitRegisterPayeeEvent(ctx context.Context, relayer, payee, channelID string) { + sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove when Upgrading to 52 + sdkCtx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeRegisterPayee, sdk.NewAttribute(types.AttributeKeyRelayer, relayer), @@ -61,8 +63,9 @@ func emitRegisterPayeeEvent(ctx sdk.Context, relayer, payee, channelID string) { } // emitRegisterCounterpartyPayeeEvent emits an event containing information of a registered counterparty payee for a relayer on a particular channel -func emitRegisterCounterpartyPayeeEvent(ctx sdk.Context, relayer, counterpartyPayee, channelID string) { - ctx.EventManager().EmitEvents(sdk.Events{ +func emitRegisterCounterpartyPayeeEvent(ctx context.Context, relayer, counterpartyPayee, channelID string) { + sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove when Upgrading to 52 + sdkCtx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeRegisterCounterpartyPayee, sdk.NewAttribute(types.AttributeKeyRelayer, relayer), @@ -77,8 +80,9 @@ func emitRegisterCounterpartyPayeeEvent(ctx sdk.Context, relayer, counterpartyPa } // emitDistributeFeeEvent emits an event containing a distribution fee and receiver address -func emitDistributeFeeEvent(ctx sdk.Context, receiver string, fee sdk.Coins) { - ctx.EventManager().EmitEvents(sdk.Events{ +func emitDistributeFeeEvent(ctx context.Context, receiver string, fee sdk.Coins) { + sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove when Upgrading to 52 + sdkCtx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeDistributeFee, sdk.NewAttribute(types.AttributeKeyReceiver, receiver), diff --git a/modules/apps/29-fee/keeper/keeper.go b/modules/apps/29-fee/keeper/keeper.go index d4136d675bd..3fcdc7edf7f 100644 --- a/modules/apps/29-fee/keeper/keeper.go +++ b/modules/apps/29-fee/keeper/keeper.go @@ -68,7 +68,7 @@ func (k Keeper) GetICS4Wrapper() porttypes.ICS4Wrapper { // Logger returns a module-specific logger. func (Keeper) Logger(ctx context.Context) log.Logger { - sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove after sdk.Context is removed from core IBC + sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove when Upgrading to 52 return sdkCtx.Logger().With("module", "x/"+ibcexported.ModuleName+"-"+types.ModuleName) } diff --git a/modules/capability/capability_test.go b/modules/capability/capability_test.go index 72fae13e3e8..de855fc8ce7 100644 --- a/modules/capability/capability_test.go +++ b/modules/capability/capability_test.go @@ -12,9 +12,9 @@ import ( storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" @@ -23,7 +23,11 @@ import ( "github.com/cosmos/ibc-go/modules/capability/types" ) -const mockMemStoreKey = "memory:mock" +const ( + mockMemStoreKey = "memory:mock" + bankModuleName = "bank" + stakingModuleName = "staking" +) type CapabilityTestSuite struct { testifysuite.Suite @@ -47,7 +51,7 @@ func (suite *CapabilityTestSuite) SetupTest() { suite.mockMemStoreKey = storetypes.NewMemoryStoreKey(mockMemStoreKey) suite.ctx = suite.NewTestContext() - suite.keeper = keeper.NewKeeper(suite.cdc, suite.storeKey, suite.memStoreKey) + suite.keeper = keeper.NewKeeper(suite.cdc, runtime.NewKVStoreService(suite.storeKey), runtime.NewMemStoreService(suite.memStoreKey)) } func (suite *CapabilityTestSuite) NewTestContext() sdk.Context { @@ -70,7 +74,7 @@ func (suite *CapabilityTestSuite) NewTestContext() sdk.Context { // BeginBlock is then called to populate the new in-memory store using the persisted state. func (suite *CapabilityTestSuite) TestInitializeMemStore() { // create a scoped keeper and instantiate a new capability to populate state - scopedKeeper := suite.keeper.ScopeToModule(banktypes.ModuleName) + scopedKeeper := suite.keeper.ScopeToModule(bankModuleName) cap1, err := scopedKeeper.NewCapability(suite.ctx, "transfer") suite.Require().NoError(err) @@ -78,11 +82,11 @@ func (suite *CapabilityTestSuite) TestInitializeMemStore() { // mock statesync by creating a new keeper and module that shares persisted state // but discards in-memory map by using a mock memstore key - newKeeper := keeper.NewKeeper(suite.cdc, suite.storeKey, suite.mockMemStoreKey) + newKeeper := keeper.NewKeeper(suite.cdc, runtime.NewKVStoreService(suite.storeKey), runtime.NewMemStoreService(suite.mockMemStoreKey)) newModule := capability.NewAppModule(suite.cdc, *newKeeper, true) // reassign the scoped keeper, this will inherit the mock memstore key used above - scopedKeeper = newKeeper.ScopeToModule(banktypes.ModuleName) + scopedKeeper = newKeeper.ScopeToModule(bankModuleName) // seal the new keeper and ensure the in-memory store is not initialized newKeeper.Seal() diff --git a/modules/capability/genesis_test.go b/modules/capability/genesis_test.go index 9f1aed78e1a..13cc887c466 100644 --- a/modules/capability/genesis_test.go +++ b/modules/capability/genesis_test.go @@ -1,8 +1,7 @@ package capability_test import ( - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/ibc-go/modules/capability" "github.com/cosmos/ibc-go/modules/capability/keeper" @@ -13,8 +12,8 @@ func (suite *CapabilityTestSuite) TestGenesis() { // InitGenesis must be called in order to set the initial index to 1. capability.InitGenesis(suite.ctx, *suite.keeper, *types.DefaultGenesis()) - sk1 := suite.keeper.ScopeToModule(banktypes.ModuleName) - sk2 := suite.keeper.ScopeToModule(stakingtypes.ModuleName) + sk1 := suite.keeper.ScopeToModule(bankModuleName) + sk2 := suite.keeper.ScopeToModule(stakingModuleName) cap1, err := sk1.NewCapability(suite.ctx, "transfer") suite.Require().NoError(err) @@ -29,9 +28,9 @@ func (suite *CapabilityTestSuite) TestGenesis() { genState := capability.ExportGenesis(suite.ctx, *suite.keeper) - newKeeper := keeper.NewKeeper(suite.cdc, suite.storeKey, suite.memStoreKey) - newSk1 := newKeeper.ScopeToModule(banktypes.ModuleName) - newSk2 := newKeeper.ScopeToModule(stakingtypes.ModuleName) + newKeeper := keeper.NewKeeper(suite.cdc, runtime.NewKVStoreService(suite.storeKey), runtime.NewMemStoreService(suite.memStoreKey)) + newSk1 := newKeeper.ScopeToModule(bankModuleName) + newSk2 := newKeeper.ScopeToModule(stakingModuleName) deliverCtx := suite.NewTestContext() capability.InitGenesis(deliverCtx, *newKeeper, *genState) diff --git a/modules/capability/go.mod b/modules/capability/go.mod index 5c1c70f933d..8fb9313c185 100644 --- a/modules/capability/go.mod +++ b/modules/capability/go.mod @@ -7,14 +7,14 @@ toolchain go1.22.0 replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 require ( - cosmossdk.io/core v0.11.0 + cosmossdk.io/core v0.11.1 cosmossdk.io/errors v1.0.1 - cosmossdk.io/log v1.3.1 + cosmossdk.io/log v1.4.0 cosmossdk.io/math v1.3.0 cosmossdk.io/store v1.1.0 github.com/cometbft/cometbft v0.38.10 github.com/cosmos/cosmos-db v1.0.2 - github.com/cosmos/cosmos-sdk v0.50.7 + github.com/cosmos/cosmos-sdk v0.50.10-0.20240808075341-156231be8aef github.com/cosmos/gogoproto v1.5.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/stretchr/testify v1.9.0 @@ -24,8 +24,8 @@ require ( require ( cosmossdk.io/api v0.7.5 // indirect cosmossdk.io/collections v0.4.0 // indirect - cosmossdk.io/depinject v1.0.0-alpha.4 // indirect - cosmossdk.io/x/tx v0.13.3 // indirect + cosmossdk.io/depinject v1.0.0 // indirect + cosmossdk.io/x/tx v0.13.4 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect @@ -78,6 +78,7 @@ require ( github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect + github.com/google/orderedcode v0.0.1 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect @@ -89,6 +90,7 @@ require ( github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/go-uuid v1.0.2 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect @@ -100,10 +102,12 @@ require ( github.com/klauspost/compress v1.17.7 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect + github.com/lib/pq v1.10.7 // indirect github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect + github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect @@ -121,7 +125,7 @@ require ( github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.32.0 // indirect + github.com/rs/zerolog v1.33.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect @@ -140,18 +144,18 @@ require ( github.com/zondax/ledger-go v0.14.3 // indirect go.etcd.io/bbolt v1.3.8 // indirect go.uber.org/multierr v1.10.0 // indirect - golang.org/x/crypto v0.22.0 // indirect + golang.org/x/crypto v0.25.0 // indirect golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect - golang.org/x/net v0.24.0 // indirect + golang.org/x/net v0.27.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/term v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/sys v0.23.0 // indirect + golang.org/x/term v0.22.0 // indirect + golang.org/x/text v0.16.0 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 // indirect + google.golang.org/grpc v1.64.1 // indirect + google.golang.org/protobuf v1.34.2 // 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/modules/capability/go.sum b/modules/capability/go.sum index eae67a799f3..945459b3122 100644 --- a/modules/capability/go.sum +++ b/modules/capability/go.sum @@ -4,20 +4,20 @@ cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= cosmossdk.io/api v0.7.5/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 v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= -cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= -cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= -cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/core v0.11.1 h1:h9WfBey7NAiFfIcUhDVNS503I2P2HdZLebJlUIs8LPA= +cosmossdk.io/core v0.11.1/go.mod h1:OJzxcdC+RPrgGF8NJZR2uoQr56tc7gfBKhiKeDO7hH0= +cosmossdk.io/depinject v1.0.0 h1:dQaTu6+O6askNXO06+jyeUAnF2/ssKwrrszP9t5q050= +cosmossdk.io/depinject v1.0.0/go.mod h1:zxK/h3HgHoA/eJVtiSsoaRaRA2D5U4cJ5thIG4ssbB8= 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.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= -cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= +cosmossdk.io/log v1.4.0 h1:Ttt9d6fQ0GlktwhcysOeNiIjixW7l0rYBocmoXOb11k= +cosmossdk.io/log v1.4.0/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.1.0 h1:LnKwgYMc9BInn9PhpTFEQVbL9UK475G2H911CGGnWHk= cosmossdk.io/store v1.1.0/go.mod h1:oZfW/4Fc/zYqu3JmQcQdUJ3fqu5vnYTn3LZFFy8P8ng= -cosmossdk.io/x/tx v0.13.3 h1:Ha4mNaHmxBc6RMun9aKuqul8yHiL78EKJQ8g23Zf73g= -cosmossdk.io/x/tx v0.13.3/go.mod h1:I8xaHv0rhUdIvIdptKIqzYy27+n2+zBVaxO6fscFhys= +cosmossdk.io/x/tx v0.13.4 h1:Eg0PbJgeO0gM8p5wx6xa0fKR7hIV6+8lC56UrsvSo0Y= +cosmossdk.io/x/tx v0.13.4/go.mod h1:BkFqrnGGgW50Y6cwTy+JvgAhiffbGEKW6KF9ufcDpvk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -25,6 +25,8 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMb 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/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= @@ -32,12 +34,18 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -74,6 +82,7 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtyd github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= @@ -97,6 +106,8 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= +github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= @@ -115,6 +126,8 @@ github.com/cometbft/cometbft v0.38.10 h1:2ePuglchT+j0Iao+cfmt/nw5U7K2lnGDzXSUPGV github.com/cometbft/cometbft v0.38.10/go.mod h1:jHPx9vQpWzPHEAiYI/7EDKaB1NXhK6o3SArrrY8ExKc= github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= +github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -127,8 +140,8 @@ github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAK github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= 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.7 h1:LsBGKxifENR/DN4E1RZaitsyL93HU44x0p8EnMHp4V4= -github.com/cosmos/cosmos-sdk v0.50.7/go.mod h1:84xDDJEHttRT7NDGwBaUOLVOMN0JNE9x7NbsYIxXs1s= +github.com/cosmos/cosmos-sdk v0.50.10-0.20240808075341-156231be8aef h1:us0dw4egT2k00jnK4JgQ2Su6yJlBnwCfgWnKC7MIwqk= +github.com/cosmos/cosmos-sdk v0.50.10-0.20240808075341-156231be8aef/go.mod h1:9l85MGxnejiuiY4gum/RzdRKfkmLZDJh5uOD3m1zxy0= 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= @@ -168,6 +181,10 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= @@ -523,6 +540,12 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= +github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -531,6 +554,8 @@ github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxS github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= @@ -602,8 +627,8 @@ github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= -github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +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/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -621,6 +646,8 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -725,8 +752,8 @@ golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= @@ -745,6 +772,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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= @@ -771,8 +800,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -794,6 +823,7 @@ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -839,20 +869,20 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= -golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= +golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -875,6 +905,8 @@ golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -896,10 +928,10 @@ google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= 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-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 h1:SbSDUWW1PAO24TNpLdeheoYPd7kllICcLU52x6eD4kQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -917,8 +949,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= +google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= 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= @@ -933,8 +965,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/modules/capability/keeper/keeper.go b/modules/capability/keeper/keeper.go index 5d856c5e64b..e779b071f83 100644 --- a/modules/capability/keeper/keeper.go +++ b/modules/capability/keeper/keeper.go @@ -1,16 +1,19 @@ package keeper import ( + "context" "errors" "fmt" "strings" + corestore "cosmossdk.io/core/store" errorsmod "cosmossdk.io/errors" "cosmossdk.io/log" "cosmossdk.io/store/prefix" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/ibc-go/modules/capability/types" @@ -31,8 +34,8 @@ type ( // a single specific module. Keeper struct { cdc codec.BinaryCodec - storeKey storetypes.StoreKey - memKey storetypes.StoreKey + storeService corestore.KVStoreService + memService corestore.MemoryStoreService capMap map[uint64]*types.Capability scopedModules map[string]struct{} sealed bool @@ -45,21 +48,21 @@ type ( // by name, in addition to creating new capabilities & authenticating capabilities // passed by other modules. ScopedKeeper struct { - cdc codec.BinaryCodec - storeKey storetypes.StoreKey - memKey storetypes.StoreKey - capMap map[uint64]*types.Capability - module string + cdc codec.BinaryCodec + storeService corestore.KVStoreService + memService corestore.MemoryStoreService + capMap map[uint64]*types.Capability + module string } ) // NewKeeper constructs a new CapabilityKeeper instance and initializes maps // for capability map and scopedModules map. -func NewKeeper(cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey) *Keeper { +func NewKeeper(cdc codec.BinaryCodec, storeService corestore.KVStoreService, memService corestore.MemoryStoreService) *Keeper { return &Keeper{ cdc: cdc, - storeKey: storeKey, - memKey: memKey, + storeService: storeService, + memService: memService, capMap: make(map[uint64]*types.Capability), scopedModules: make(map[string]struct{}), sealed: false, @@ -90,11 +93,11 @@ func (k *Keeper) ScopeToModule(moduleName string) ScopedKeeper { k.scopedModules[moduleName] = struct{}{} return ScopedKeeper{ - cdc: k.cdc, - storeKey: k.storeKey, - memKey: k.memKey, - capMap: k.capMap, - module: moduleName, + cdc: k.cdc, + storeService: k.storeService, + memService: k.memService, + capMap: k.capMap, + module: moduleName, } } @@ -118,20 +121,15 @@ func (k *Keeper) IsSealed() bool { // InitMemStore must be called every time the app starts before the keeper is used (so // `BeginBlock` or `InitChain` - whichever is first). We need access to the store so we // can't initialize it in a constructor. -func (k *Keeper) InitMemStore(ctx sdk.Context) { - memStore := ctx.KVStore(k.memKey) - memStoreType := memStore.GetStoreType() - - if memStoreType != storetypes.StoreTypeMemory { - panic(fmt.Errorf("invalid memory store type; got %s, expected: %s", memStoreType, storetypes.StoreTypeMemory)) - } - +func (k *Keeper) InitMemStore(ctx context.Context) { // create context with no block gas meter to ensure we do not consume gas during local initialization logic. - noGasCtx := ctx.WithBlockGasMeter(storetypes.NewInfiniteGasMeter()).WithGasMeter(storetypes.NewInfiniteGasMeter()) + sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove after 52 upgrade + noGasCtx := sdkCtx.WithBlockGasMeter(storetypes.NewInfiniteGasMeter()).WithGasMeter(storetypes.NewInfiniteGasMeter()) // check if memory store has not been initialized yet by checking if initialized flag is nil. if !k.IsInitialized(noGasCtx) { - prefixStore := prefix.NewStore(noGasCtx.KVStore(k.storeKey), types.KeyPrefixIndexCapability) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(noGasCtx)) + prefixStore := prefix.NewStore(store, types.KeyPrefixIndexCapability) iterator := storetypes.KVStorePrefixIterator(prefixStore, nil) // initialize the in-memory store for all persisted capabilities @@ -147,21 +145,25 @@ func (k *Keeper) InitMemStore(ctx sdk.Context) { } // set the initialized flag so we don't rerun initialization logic - memStore := noGasCtx.KVStore(k.memKey) + memStore := k.memService.OpenMemoryStore(noGasCtx) memStore.Set(types.KeyMemInitialized, []byte{1}) } } // IsInitialized returns true if the keeper is properly initialized, and false otherwise. -func (k *Keeper) IsInitialized(ctx sdk.Context) bool { - memStore := ctx.KVStore(k.memKey) - return memStore.Has(types.KeyMemInitialized) +func (k *Keeper) IsInitialized(ctx context.Context) bool { + memStore := k.memService.OpenMemoryStore(ctx) + has, err := memStore.Has(types.KeyMemInitialized) + if err != nil { + panic(err) + } + return has } // InitializeIndex sets the index to one (or greater) in InitChain according // to the GenesisState. It must only be called once. // It will panic if the provided index is 0, or if the index is already set. -func (k Keeper) InitializeIndex(ctx sdk.Context, index uint64) error { +func (k Keeper) InitializeIndex(ctx context.Context, index uint64) error { if index == 0 { panic(errors.New("SetIndex requires index > 0")) } @@ -171,20 +173,25 @@ func (k Keeper) InitializeIndex(ctx sdk.Context, index uint64) error { } // set the global index to the passed index - store := ctx.KVStore(k.storeKey) + store := k.storeService.OpenKVStore(ctx) store.Set(types.KeyIndex, types.IndexToKey(index)) return nil } // GetLatestIndex returns the latest index of the CapabilityKeeper -func (k Keeper) GetLatestIndex(ctx sdk.Context) uint64 { - store := ctx.KVStore(k.storeKey) - return types.IndexFromKey(store.Get(types.KeyIndex)) +func (k Keeper) GetLatestIndex(ctx context.Context) uint64 { + store := k.storeService.OpenKVStore(ctx) + bz, err := store.Get(types.KeyIndex) + if err != nil { + panic(err) + } + return types.IndexFromKey(bz) } // SetOwners set the capability owners to the store -func (k Keeper) SetOwners(ctx sdk.Context, index uint64, owners types.CapabilityOwners) { - prefixStore := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixIndexCapability) +func (k Keeper) SetOwners(ctx context.Context, index uint64, owners types.CapabilityOwners) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + prefixStore := prefix.NewStore(store, types.KeyPrefixIndexCapability) indexKey := types.IndexToKey(index) // set owners in persistent store @@ -192,8 +199,9 @@ func (k Keeper) SetOwners(ctx sdk.Context, index uint64, owners types.Capability } // GetOwners returns the capability owners with a given index. -func (k Keeper) GetOwners(ctx sdk.Context, index uint64) (types.CapabilityOwners, bool) { - prefixStore := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixIndexCapability) +func (k Keeper) GetOwners(ctx context.Context, index uint64) (types.CapabilityOwners, bool) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + prefixStore := prefix.NewStore(store, types.KeyPrefixIndexCapability) indexKey := types.IndexToKey(index) // get owners for index from persistent store @@ -209,8 +217,8 @@ func (k Keeper) GetOwners(ctx sdk.Context, index uint64) (types.CapabilityOwners // InitializeCapability takes in an index and an owners array. It creates the capability in memory // and sets the fwd and reverse keys for each owner in the memstore. // It is used during initialization from genesis. -func (k Keeper) InitializeCapability(ctx sdk.Context, index uint64, owners types.CapabilityOwners) { - memStore := ctx.KVStore(k.memKey) +func (k Keeper) InitializeCapability(ctx context.Context, index uint64, owners types.CapabilityOwners) { + memStore := k.memService.OpenMemoryStore(ctx) capability := types.NewCapability(index) for _, owner := range owners.Owners { @@ -238,18 +246,22 @@ func (k Keeper) InitializeCapability(ctx sdk.Context, index uint64, owners types // // Note, namespacing is completely local, which is safe since records are prefixed // with the module name and no two ScopedKeeper can have the same module name. -func (sk ScopedKeeper) NewCapability(ctx sdk.Context, name string) (*types.Capability, error) { +func (sk ScopedKeeper) NewCapability(ctx context.Context, name string) (*types.Capability, error) { if strings.TrimSpace(name) == "" { return nil, errorsmod.Wrap(types.ErrInvalidCapabilityName, "capability name cannot be empty") } - store := ctx.KVStore(sk.storeKey) + store := sk.storeService.OpenKVStore(ctx) if _, ok := sk.GetCapability(ctx, name); ok { return nil, errorsmod.Wrapf(types.ErrCapabilityTaken, fmt.Sprintf("module: %s, name: %s", sk.module, name)) } // create new capability with the current global index - index := types.IndexFromKey(store.Get(types.KeyIndex)) + bz, err := store.Get(types.KeyIndex) + if err != nil { + panic(err) + } + index := types.IndexFromKey(bz) capability := types.NewCapability(index) // update capability owner set @@ -260,7 +272,7 @@ func (sk ScopedKeeper) NewCapability(ctx sdk.Context, name string) (*types.Capab // increment global index store.Set(types.KeyIndex, types.IndexToKey(index+1)) - memStore := ctx.KVStore(sk.memKey) + memStore := sk.memService.OpenMemoryStore(ctx) // Set the forward mapping between the module and capability tuple and the // capability name in the memKVStore @@ -288,7 +300,7 @@ func (sk ScopedKeeper) NewCapability(ctx sdk.Context, name string) (*types.Capab // // Note, the capability's forward mapping is indexed by a string which should // contain its unique memory reference. -func (sk ScopedKeeper) AuthenticateCapability(ctx sdk.Context, cap *types.Capability, name string) bool { +func (sk ScopedKeeper) AuthenticateCapability(ctx context.Context, cap *types.Capability, name string) bool { if strings.TrimSpace(name) == "" || cap == nil { return false } @@ -300,7 +312,7 @@ func (sk ScopedKeeper) AuthenticateCapability(ctx sdk.Context, cap *types.Capabi // to add the owner to the persistent set of capability owners for the capability // index. If the owner already exists, it will return an error. Otherwise, it will // also set a forward and reverse index for the capability and capability name. -func (sk ScopedKeeper) ClaimCapability(ctx sdk.Context, cap *types.Capability, name string) error { +func (sk ScopedKeeper) ClaimCapability(ctx context.Context, cap *types.Capability, name string) error { if cap == nil { return errorsmod.Wrap(types.ErrNilCapability, "cannot claim nil capability") } @@ -312,7 +324,7 @@ func (sk ScopedKeeper) ClaimCapability(ctx sdk.Context, cap *types.Capability, n return err } - memStore := ctx.KVStore(sk.memKey) + memStore := sk.memService.OpenMemoryStore(ctx) // Set the forward mapping between the module and capability tuple and the // capability name in the memKVStore @@ -332,7 +344,7 @@ func (sk ScopedKeeper) ClaimCapability(ctx sdk.Context, cap *types.Capability, n // ReleaseCapability allows a scoped module to release a capability which it had // previously claimed or created. After releasing the capability, if no more // owners exist, the capability will be globally removed. -func (sk ScopedKeeper) ReleaseCapability(ctx sdk.Context, cap *types.Capability) error { +func (sk ScopedKeeper) ReleaseCapability(ctx context.Context, cap *types.Capability) error { if cap == nil { return errorsmod.Wrap(types.ErrNilCapability, "cannot release nil capability") } @@ -341,7 +353,7 @@ func (sk ScopedKeeper) ReleaseCapability(ctx sdk.Context, cap *types.Capability) return errorsmod.Wrap(types.ErrCapabilityNotOwned, sk.module) } - memStore := ctx.KVStore(sk.memKey) + memStore := sk.memService.OpenMemoryStore(ctx) // Delete the forward mapping between the module and capability tuple and the // capability name in the memKVStore @@ -355,7 +367,8 @@ func (sk ScopedKeeper) ReleaseCapability(ctx sdk.Context, cap *types.Capability) capOwners := sk.getOwners(ctx, cap) capOwners.Remove(types.NewOwner(sk.module, name)) - prefixStore := prefix.NewStore(ctx.KVStore(sk.storeKey), types.KeyPrefixIndexCapability) + store := runtime.KVStoreAdapter(sk.storeService.OpenKVStore(ctx)) + prefixStore := prefix.NewStore(store, types.KeyPrefixIndexCapability) indexKey := types.IndexToKey(cap.GetIndex()) if len(capOwners.Owners) == 0 { @@ -374,14 +387,17 @@ func (sk ScopedKeeper) ReleaseCapability(ctx sdk.Context, cap *types.Capability) // GetCapability allows a module to fetch a capability which it previously claimed // by name. The module is not allowed to retrieve capabilities which it does not // own. -func (sk ScopedKeeper) GetCapability(ctx sdk.Context, name string) (*types.Capability, bool) { +func (sk ScopedKeeper) GetCapability(ctx context.Context, name string) (*types.Capability, bool) { if strings.TrimSpace(name) == "" { return nil, false } - memStore := ctx.KVStore(sk.memKey) + memStore := sk.memService.OpenMemoryStore(ctx) key := types.RevCapabilityKey(sk.module, name) - indexBytes := memStore.Get(key) + indexBytes, err := memStore.Get(key) + if err != nil { + panic(err) + } index := sdk.BigEndianToUint64(indexBytes) if len(indexBytes) == 0 { @@ -405,18 +421,23 @@ func (sk ScopedKeeper) GetCapability(ctx sdk.Context, name string) (*types.Capab // GetCapabilityName allows a module to retrieve the name under which it stored a given // capability given the capability -func (sk ScopedKeeper) GetCapabilityName(ctx sdk.Context, cap *types.Capability) string { +func (sk ScopedKeeper) GetCapabilityName(ctx context.Context, cap *types.Capability) string { if cap == nil { return "" } - memStore := ctx.KVStore(sk.memKey) + memStore := sk.memService.OpenMemoryStore(ctx) + + bz, err := memStore.Get(types.FwdCapabilityKey(sk.module, cap)) + if err != nil { + panic(err) + } - return string(memStore.Get(types.FwdCapabilityKey(sk.module, cap))) + return string(bz) // TODO: why the cast? } // GetOwners all the Owners that own the capability associated with the name this ScopedKeeper uses // to refer to the capability -func (sk ScopedKeeper) GetOwners(ctx sdk.Context, name string) (*types.CapabilityOwners, bool) { +func (sk ScopedKeeper) GetOwners(ctx context.Context, name string) (*types.CapabilityOwners, bool) { if strings.TrimSpace(name) == "" { return nil, false } @@ -425,7 +446,8 @@ func (sk ScopedKeeper) GetOwners(ctx sdk.Context, name string) (*types.Capabilit return nil, false } - prefixStore := prefix.NewStore(ctx.KVStore(sk.storeKey), types.KeyPrefixIndexCapability) + store := runtime.KVStoreAdapter(sk.storeService.OpenKVStore(ctx)) + prefixStore := prefix.NewStore(store, types.KeyPrefixIndexCapability) indexKey := types.IndexToKey(capability.GetIndex()) var capOwners types.CapabilityOwners @@ -444,7 +466,7 @@ func (sk ScopedKeeper) GetOwners(ctx sdk.Context, name string) (*types.Capabilit // as a string array and the capability itself. // The method returns an error if either the capability or the owners cannot be // retrieved from the memstore. -func (sk ScopedKeeper) LookupModules(ctx sdk.Context, name string) ([]string, *types.Capability, error) { +func (sk ScopedKeeper) LookupModules(ctx context.Context, name string) ([]string, *types.Capability, error) { if strings.TrimSpace(name) == "" { return nil, nil, errorsmod.Wrap(types.ErrInvalidCapabilityName, "cannot lookup modules with empty capability name") } @@ -466,8 +488,9 @@ func (sk ScopedKeeper) LookupModules(ctx sdk.Context, name string) ([]string, *t return mods, capability, nil } -func (sk ScopedKeeper) addOwner(ctx sdk.Context, cap *types.Capability, name string) error { - prefixStore := prefix.NewStore(ctx.KVStore(sk.storeKey), types.KeyPrefixIndexCapability) +func (sk ScopedKeeper) addOwner(ctx context.Context, cap *types.Capability, name string) error { + store := runtime.KVStoreAdapter(sk.storeService.OpenKVStore(ctx)) + prefixStore := prefix.NewStore(store, types.KeyPrefixIndexCapability) indexKey := types.IndexToKey(cap.GetIndex()) capOwners := sk.getOwners(ctx, cap) @@ -482,8 +505,9 @@ func (sk ScopedKeeper) addOwner(ctx sdk.Context, cap *types.Capability, name str return nil } -func (sk ScopedKeeper) getOwners(ctx sdk.Context, cap *types.Capability) *types.CapabilityOwners { - prefixStore := prefix.NewStore(ctx.KVStore(sk.storeKey), types.KeyPrefixIndexCapability) +func (sk ScopedKeeper) getOwners(ctx context.Context, cap *types.Capability) *types.CapabilityOwners { + store := runtime.KVStoreAdapter(sk.storeService.OpenKVStore(ctx)) + prefixStore := prefix.NewStore(store, types.KeyPrefixIndexCapability) indexKey := types.IndexToKey(cap.GetIndex()) bz := prefixStore.Get(indexKey) @@ -497,6 +521,7 @@ func (sk ScopedKeeper) getOwners(ctx sdk.Context, cap *types.Capability) *types. return &capOwners } -func logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) +func logger(ctx context.Context) log.Logger { + sdkCtx := sdk.UnwrapSDKContext(ctx) //TODO: remove after 52 upgrade + return sdkCtx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) } diff --git a/modules/capability/keeper/keeper_test.go b/modules/capability/keeper/keeper_test.go index c2cd70597dc..0b097c1c42b 100644 --- a/modules/capability/keeper/keeper_test.go +++ b/modules/capability/keeper/keeper_test.go @@ -8,6 +8,7 @@ import ( storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" @@ -31,10 +32,11 @@ type KeeperTestSuite struct { func (suite *KeeperTestSuite) SetupTest() { key := storetypes.NewKVStoreKey(types.StoreKey) + memKey := storetypes.NewMemoryStoreKey(types.MemStoreKey) testCtx := testutil.DefaultContextWithDB(suite.T(), key, storetypes.NewTransientStoreKey("transient_test")) suite.ctx = testCtx.Ctx encCfg := moduletestutil.MakeTestEncodingConfig(capability.AppModule{}) - suite.keeper = keeper.NewKeeper(encCfg.Codec, key, key) + suite.keeper = keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(key), runtime.NewMemStoreService(memKey)) } func (suite *KeeperTestSuite) TestSeal() {