From 1f06f5bec67e76843ceb00502a814b2a87e81d6b Mon Sep 17 00:00:00 2001 From: yihuang Date: Mon, 20 May 2024 17:13:42 +0800 Subject: [PATCH 01/18] fix: nil pointer panic when store don't exists in historical version (#20425) --- store/CHANGELOG.md | 6 ++++++ store/rootmulti/store.go | 4 ++++ store/rootmulti/store_test.go | 9 ++++++--- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/store/CHANGELOG.md b/store/CHANGELOG.md index cdd7bb1c59fa..84b2a0d35eb3 100644 --- a/store/CHANGELOG.md +++ b/store/CHANGELOG.md @@ -23,6 +23,12 @@ Ref: https://keepachangelog.com/en/1.0.0/ # Changelog +## [Unreleased] + +### Bug Fixes + +* (store) [#20425](https://github.com/cosmos/cosmos-sdk/pull/20425) Fix nil pointer panic when query historical state where a new store don't exist. + ## v1.1.0 (March 20, 2024) ### Improvements diff --git a/store/rootmulti/store.go b/store/rootmulti/store.go index cfcc5f47b8b2..dcd418ccb09c 100644 --- a/store/rootmulti/store.go +++ b/store/rootmulti/store.go @@ -607,6 +607,10 @@ func (rs *Store) CacheMultiStoreWithVersion(version int64) (types.CacheMultiStor if storeInfos[key.Name()] { return nil, err } + + // If the store donesn't exist at this version, create a dummy one to prevent + // nil pointer panic in newer query APIs. + cacheStore = dbadapter.Store{DB: dbm.NewMemDB()} } default: diff --git a/store/rootmulti/store_test.go b/store/rootmulti/store_test.go index 2702f3e08623..ebdd657de41f 100644 --- a/store/rootmulti/store_test.go +++ b/store/rootmulti/store_test.go @@ -100,16 +100,19 @@ func TestCacheMultiStoreWithVersion(t *testing.T) { require.Equal(t, kvStore.Get(k), v) // add new module stores (store4 and store5) to multi stores and commit - ms.MountStoreWithDB(types.NewKVStoreKey("store4"), types.StoreTypeIAVL, nil) - ms.MountStoreWithDB(types.NewKVStoreKey("store5"), types.StoreTypeIAVL, nil) + key4, key5 := types.NewKVStoreKey("store4"), types.NewKVStoreKey("store5") + ms.MountStoreWithDB(key4, types.StoreTypeIAVL, nil) + ms.MountStoreWithDB(key5, types.StoreTypeIAVL, nil) err = ms.LoadLatestVersionAndUpgrade(&types.StoreUpgrades{Added: []string{"store4", "store5"}}) require.NoError(t, err) ms.Commit() // cache multistore of version before adding store4 should works - _, err = ms.CacheMultiStoreWithVersion(1) + cms2, err := ms.CacheMultiStoreWithVersion(1) require.NoError(t, err) + require.Empty(t, cms2.GetKVStore(key4).Get([]byte("key"))) + // require we cannot commit (write) to a cache-versioned multi-store require.Panics(t, func() { kvStore.Set(k, []byte("newValue")) From c2f6c19aaf3e8caaea3a19968c3e9fdc0f0721c6 Mon Sep 17 00:00:00 2001 From: Marko Date: Tue, 21 May 2024 10:02:11 +0200 Subject: [PATCH 02/18] revert: bank change module to account change (#20427) --- store/cache/cache.go | 2 +- store/rootmulti/store.go | 6 +++--- tests/e2e/accounts/base_account_test.go | 1 - testutil/testdata/grpc_query.go | 3 ++- x/bank/CHANGELOG.md | 1 - x/bank/keeper/keeper.go | 7 ------- x/bank/keeper/keeper_test.go | 18 ------------------ 7 files changed, 6 insertions(+), 32 deletions(-) diff --git a/store/cache/cache.go b/store/cache/cache.go index 98d17d0341ac..748eae8c422b 100644 --- a/store/cache/cache.go +++ b/store/cache/cache.go @@ -43,7 +43,7 @@ type ( func NewCommitKVStoreCache(store types.CommitKVStore, size uint) *CommitKVStoreCache { cache, err := lru.NewARC(int(size)) if err != nil { - panic(fmt.Errorf("failed to create KVStore cache: %s", err)) + panic(fmt.Errorf("failed to create KVStore cache: %w", err)) } return &CommitKVStoreCache{ diff --git a/store/rootmulti/store.go b/store/rootmulti/store.go index dcd418ccb09c..33589123bcd0 100644 --- a/store/rootmulti/store.go +++ b/store/rootmulti/store.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" "io" - "math" + "math" "sort" "strings" "sync" @@ -834,7 +834,7 @@ func (rs *Store) Snapshot(height uint64, protoWriter protoio.Writer) error { keys := keysFromStoreKeyMap(rs.stores) for _, key := range keys { switch store := rs.GetCommitKVStore(key).(type) { - case *iavl.Store: + case *iavl.Store: stores = append(stores, namedStore{name: key.Name(), Store: store}) case *transient.Store, *mem.Store: // Non-persisted stores shouldn't be snapshotted @@ -854,7 +854,7 @@ func (rs *Store) Snapshot(height uint64, protoWriter protoio.Writer) error { // are demarcated by new SnapshotStore items. for _, store := range stores { rs.logger.Debug("starting snapshot", "store", store.name, "height", height) - exporter, err := store.Export(int64(height)) + exporter, err := store.Export(int64(height)) if err != nil { rs.logger.Error("snapshot failed; exporter error", "store", store.name, "err", err) return err diff --git a/tests/e2e/accounts/base_account_test.go b/tests/e2e/accounts/base_account_test.go index 60292a3c52dd..64a6dff9a50a 100644 --- a/tests/e2e/accounts/base_account_test.go +++ b/tests/e2e/accounts/base_account_test.go @@ -80,5 +80,4 @@ func bechify(t *testing.T, app *simapp.SimApp, addr []byte) string { func fundAccount(t *testing.T, app *simapp.SimApp, ctx sdk.Context, addr sdk.AccAddress, amt string) { require.NoError(t, testutil.FundAccount(ctx, app.BankKeeper, addr, coins(t, amt))) - } diff --git a/testutil/testdata/grpc_query.go b/testutil/testdata/grpc_query.go index 1e5ae1830de9..1078f60b8b81 100644 --- a/testutil/testdata/grpc_query.go +++ b/testutil/testdata/grpc_query.go @@ -3,9 +3,10 @@ package testdata import ( "context" "fmt" - "github.com/cosmos/gogoproto/types/any/test" "testing" + "github.com/cosmos/gogoproto/types/any/test" + "github.com/cosmos/gogoproto/proto" "google.golang.org/grpc" "gotest.tools/v3/assert" diff --git a/x/bank/CHANGELOG.md b/x/bank/CHANGELOG.md index 6f298085ee62..9d5a91718557 100644 --- a/x/bank/CHANGELOG.md +++ b/x/bank/CHANGELOG.md @@ -49,4 +49,3 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Consensus Breaking Changes * [#19188](https://github.com/cosmos/cosmos-sdk/pull/19188) Remove creation of `BaseAccount` when sending a message to an account that does not exist -* [#20343](https://github.com/cosmos/cosmos-sdk/pull/20343) Add a check in send moduleaccount to account to prevent module accounts from sending disabled tokens to accounts diff --git a/x/bank/keeper/keeper.go b/x/bank/keeper/keeper.go index 3c6ade1c235d..c8f9e5ba7bca 100644 --- a/x/bank/keeper/keeper.go +++ b/x/bank/keeper/keeper.go @@ -269,13 +269,6 @@ func (k BaseKeeper) SendCoinsFromModuleToAccount( return errorsmod.Wrapf(sdkerrors.ErrUnknownAddress, "module account %s does not exist", senderModule) } - for _, coin := range amt { - sendEnabled, found := k.getSendEnabled(ctx, coin.Denom) - if found && !sendEnabled { - return fmt.Errorf("denom: %s, is prohibited from being sent at this time", coin.Denom) - } - } - if k.BlockedAddr(recipientAddr) { return errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "%s is not allowed to receive funds", recipientAddr) } diff --git a/x/bank/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go index 45fdb7031dc8..12db16b24c2b 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -389,24 +389,6 @@ func (suite *KeeperTestSuite) TestSendCoinsFromModuleToAccount_Blocklist() { )) } -func (suite *KeeperTestSuite) TestSendCoinsFromModuleToAccount_CoinSendDisabled() { - ctx := suite.ctx - require := suite.Require() - keeper := suite.bankKeeper - - suite.mockMintCoins(mintAcc) - require.NoError(keeper.MintCoins(ctx, banktypes.MintModuleName, initCoins)) - - keeper.SetSendEnabled(ctx, sdk.DefaultBondDenom, false) - - suite.authKeeper.EXPECT().GetModuleAddress(mintAcc.Name).Return(mintAcc.GetAddress()) - err := keeper.SendCoinsFromModuleToAccount( - ctx, banktypes.MintModuleName, accAddrs[2], initCoins, - ) - require.Contains(err.Error(), "stake, is prohibited from being sent at this time") - keeper.SetSendEnabled(ctx, sdk.DefaultBondDenom, true) -} - func (suite *KeeperTestSuite) TestSupply_DelegateUndelegateCoins() { ctx := suite.ctx require := suite.Require() From 7eef3b3705877da222271caa9562cb0b329c50ad Mon Sep 17 00:00:00 2001 From: cocoyeal <150209682+cocoyeal@users.noreply.github.com> Date: Tue, 21 May 2024 16:17:52 +0800 Subject: [PATCH 03/18] docs: fix some markdown syntax (#20432) --- docs/learn/advanced/00-baseapp.md | 4 ++-- docs/learn/advanced/08-events.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/learn/advanced/00-baseapp.md b/docs/learn/advanced/00-baseapp.md index 15a9feb31cbb..f19c132994ae 100644 --- a/docs/learn/advanced/00-baseapp.md +++ b/docs/learn/advanced/00-baseapp.md @@ -354,7 +354,7 @@ The response contains: https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/x/auth/ante/basic.go#L102 ``` -* `Events ([]cmn.KVPair)`: Key-Value tags for filtering and indexing transactions (eg. by account). See [`event`s](./08-events.md) for more. +* `Events ([]cmn.KVPair)`: Key-Value tags for filtering and indexing transactions (eg. by account). See [`events`](./08-events.md) for more. * `Codespace (string)`: Namespace for the Code. #### RecheckTx @@ -495,7 +495,7 @@ Each transaction returns a response to the underlying consensus engine of type [ * `Info (string):` Additional information. May be non-deterministic. * `GasWanted (int64)`: Amount of gas requested for transaction. It is provided by users when they generate the transaction. * `GasUsed (int64)`: Amount of gas consumed by transaction. During transaction execution, this value is computed by multiplying the standard cost of a transaction byte by the size of the raw transaction, and by adding gas each time a read/write to the store occurs. -* `Events ([]cmn.KVPair)`: Key-Value tags for filtering and indexing transactions (eg. by account). See [`event`s](./08-events.md) for more. +* `Events ([]cmn.KVPair)`: Key-Value tags for filtering and indexing transactions (eg. by account). See [`events`](./08-events.md) for more. * `Codespace (string)`: Namespace for the Code. #### EndBlock diff --git a/docs/learn/advanced/08-events.md b/docs/learn/advanced/08-events.md index 2b8d754ac6a8..0c5772e325a6 100644 --- a/docs/learn/advanced/08-events.md +++ b/docs/learn/advanced/08-events.md @@ -4,7 +4,7 @@ sidebar_position: 1 # Events :::note Synopsis -`Event`s are objects that contain information about the execution of the application. They are mainly used by service providers like block explorers and wallet to track the execution of various messages and index transactions. +`Events` are objects that contain information about the execution of the application. They are mainly used by service providers like block explorers and wallet to track the execution of various messages and index transactions. ::: :::note Pre-requisite Readings From a2aaed66e872e35164eee30073dadcde8e5ad158 Mon Sep 17 00:00:00 2001 From: Hwangjae Lee Date: Tue, 21 May 2024 18:00:13 +0900 Subject: [PATCH 04/18] docs(x/account/auth): Improve error handling and comments in fee.go (#20426) Signed-off-by: Hwangjae Lee Co-authored-by: son trinh --- x/auth/ante/fee.go | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/x/auth/ante/fee.go b/x/auth/ante/fee.go index c057d5a7fa73..21b5300fd53c 100644 --- a/x/auth/ante/fee.go +++ b/x/auth/ante/fee.go @@ -12,14 +12,14 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) -// TxFeeChecker check if the provided fee is enough and returns the effective fee and tx priority, -// the effective fee should be deducted later, and the priority should be returned in abci response. +// TxFeeChecker checks if the provided fee is enough and returns the effective fee and tx priority. +// The effective fee should be deducted later, and the priority should be returned in the ABCI response. type TxFeeChecker func(ctx sdk.Context, tx sdk.Tx) (sdk.Coins, int64, error) // DeductFeeDecorator deducts fees from the fee payer. The fee payer is the fee granter (if specified) or first signer of the tx. // If the fee payer does not have the funds to pay for the fees, return an InsufficientFunds error. -// Call next AnteHandler if fees successfully deducted. -// CONTRACT: Tx must implement FeeTx interface to use DeductFeeDecorator +// Call next AnteHandler if fees are successfully deducted. +// CONTRACT: The Tx must implement the FeeTx interface to use DeductFeeDecorator. type DeductFeeDecorator struct { accountKeeper AccountKeeper bankKeeper types.BankKeeper @@ -43,7 +43,7 @@ func NewDeductFeeDecorator(ak AccountKeeper, bk types.BankKeeper, fk FeegrantKee func (dfd DeductFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, _ bool, next sdk.AnteHandler) (sdk.Context, error) { feeTx, ok := tx.(sdk.FeeTx) if !ok { - return ctx, errorsmod.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") + return ctx, errorsmod.Wrap(sdkerrors.ErrTxDecode, "Tx must implement the FeeTx interface") } txService := dfd.accountKeeper.GetEnvironment().TransactionService @@ -76,10 +76,11 @@ func (dfd DeductFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, _ bool, nex func (dfd DeductFeeDecorator) checkDeductFee(ctx sdk.Context, sdkTx sdk.Tx, fee sdk.Coins) error { feeTx, ok := sdkTx.(sdk.FeeTx) if !ok { - return errorsmod.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") + return errorsmod.Wrap(sdkerrors.ErrTxDecode, "Tx must implement the FeeTx interface") } - if addr := dfd.accountKeeper.GetModuleAddress(types.FeeCollectorName); addr == nil { + addr := dfd.accountKeeper.GetModuleAddress(types.FeeCollectorName) + if len(addr) == 0 { return fmt.Errorf("fee collector module account (%s) has not been set", types.FeeCollectorName) } @@ -87,8 +88,8 @@ func (dfd DeductFeeDecorator) checkDeductFee(ctx sdk.Context, sdkTx sdk.Tx, fee feeGranter := feeTx.FeeGranter() deductFeesFrom := feePayer - // if feegranter set deduct fee from feegranter account. - // this works with only when feegrant enabled. + // if feegranter set, deduct fee from feegranter account. + // this works only when feegrant is enabled. if feeGranter != nil { feeGranterAddr := sdk.AccAddress(feeGranter) @@ -132,7 +133,7 @@ func DeductFees(bankKeeper types.BankKeeper, ctx sdk.Context, acc []byte, fees s err := bankKeeper.SendCoinsFromAccountToModule(ctx, sdk.AccAddress(acc), types.FeeCollectorName, fees) if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInsufficientFunds, err.Error()) + return fmt.Errorf("failed to deduct fees: %w", err) } return nil From a2dd2a0923bf4f1ab0ca04178a3815d2d1dc8d52 Mon Sep 17 00:00:00 2001 From: Facundo Medica <14063057+facundomedica@users.noreply.github.com> Date: Tue, 21 May 2024 11:40:01 +0200 Subject: [PATCH 05/18] fix(x/accounts): check for overflows in multisig weights and votes (#20384) --- x/accounts/defaults/multisig/account.go | 17 +++++- x/accounts/defaults/multisig/account_test.go | 54 +++++++++++++++++++ x/accounts/defaults/multisig/update_config.go | 6 ++- 3 files changed, 75 insertions(+), 2 deletions(-) diff --git a/x/accounts/defaults/multisig/account.go b/x/accounts/defaults/multisig/account.go index 6ab25a8440d9..d6fadbfabff9 100644 --- a/x/accounts/defaults/multisig/account.go +++ b/x/accounts/defaults/multisig/account.go @@ -91,7 +91,10 @@ func (a *Account) Init(ctx context.Context, msg *v1.MsgInit) (*v1.MsgInitRespons return nil, err } - totalWeight += msg.Members[i].Weight + totalWeight, err = safeAdd(totalWeight, msg.Members[i].Weight) + if err != nil { + return nil, err + } } if err := validateConfig(*msg.Config, totalWeight); err != nil { @@ -279,6 +282,7 @@ func (a Account) ExecuteProposal(ctx context.Context, msg *v1.MsgExecuteProposal } totalWeight := yesVotes + noVotes + abstainVotes + var ( rejectErr error execErr error @@ -387,3 +391,14 @@ func (a *Account) RegisterQueryHandlers(builder *accountstd.QueryBuilder) { accountstd.RegisterQueryHandler(builder, a.QueryProposal) accountstd.RegisterQueryHandler(builder, a.QueryConfig) } + +func safeAdd(nums ...uint64) (uint64, error) { + var sum uint64 + for _, num := range nums { + if sum+num < sum { + return 0, errors.New("overflow") + } + sum += num + } + return sum, nil +} diff --git a/x/accounts/defaults/multisig/account_test.go b/x/accounts/defaults/multisig/account_test.go index ab95b5be4803..58d3e11a4457 100644 --- a/x/accounts/defaults/multisig/account_test.go +++ b/x/accounts/defaults/multisig/account_test.go @@ -2,6 +2,7 @@ package multisig import ( "context" + "math" "testing" "time" @@ -312,6 +313,29 @@ func TestUpdateConfig(t *testing.T) { }, }, }, + { + "change members, invalid weights", + &v1.MsgUpdateConfig{ + UpdateMembers: []*v1.Member{ + { + Address: "addr1", + Weight: math.MaxUint64, + }, + { + Address: "addr2", + Weight: 1, + }, + }, + Config: &v1.Config{ + Threshold: 666, + Quorum: 400, + VotingPeriod: 60, + }, + }, + "overflow", + nil, + nil, + }, } for _, tc := range testcases { @@ -658,3 +682,33 @@ func TestProposalPassing(t *testing.T) { require.Equal(t, expectedMembers, cfg.Members) } + +func TestWeightOverflow(t *testing.T) { + ctx, ss := newMockContext(t) + acc := setup(t, ctx, ss, nil) + + startAcc := &v1.MsgInit{ + Config: &v1.Config{ + Threshold: 2640, + Quorum: 2000, + VotingPeriod: 60, + }, + Members: []*v1.Member{ + { + Address: "addr1", + Weight: math.MaxUint64, + }, + }, + } + + _, err := acc.Init(ctx, startAcc) + require.NoError(t, err) + + // add another member with weight 1 to trigger an overflow + startAcc.Members = append(startAcc.Members, &v1.Member{ + Address: "addr2", + Weight: 1, + }) + _, err = acc.Init(ctx, startAcc) + require.ErrorContains(t, err, "overflow") +} diff --git a/x/accounts/defaults/multisig/update_config.go b/x/accounts/defaults/multisig/update_config.go index a1966c787b0b..d352d49926fa 100644 --- a/x/accounts/defaults/multisig/update_config.go +++ b/x/accounts/defaults/multisig/update_config.go @@ -44,7 +44,11 @@ func (a Account) UpdateConfig(ctx context.Context, msg *v1.MsgUpdateConfig) (*v1 // get the weight from the stored members totalWeight := uint64(0) err := a.Members.Walk(ctx, nil, func(_ []byte, value uint64) (stop bool, err error) { - totalWeight += value + var adderr error + totalWeight, adderr = safeAdd(totalWeight, value) + if adderr != nil { + return true, adderr + } return false, nil }) if err != nil { From b17ccd8fdc190672f83e5692bf1e9a10dad6e519 Mon Sep 17 00:00:00 2001 From: Marko Date: Tue, 21 May 2024 18:47:20 +0200 Subject: [PATCH 06/18] refactor(errors)!: remove grpc from errors (#20402) --- errors/CHANGELOG.md | 4 ++++ errors/errors.go | 39 +-------------------------------------- errors/errors_test.go | 22 ---------------------- errors/go.mod | 5 ----- errors/go.sum | 12 ------------ simapp/gomod2nix.toml | 8 ++++---- 6 files changed, 9 insertions(+), 81 deletions(-) diff --git a/errors/CHANGELOG.md b/errors/CHANGELOG.md index 1787329cbe79..0135befe9a73 100644 --- a/errors/CHANGELOG.md +++ b/errors/CHANGELOG.md @@ -31,6 +31,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +### API Breaking + +* [#20402](https://github.com/cosmos/cosmos-sdk/pull/20402) Remove Grpc error codes from the error package. This is done in order to keep the dependency graph of errors minimal + ## [v1.0.1](https://github.com/cosmos/cosmos-sdk/releases/tag/errors%2Fv1.0.1) ### Improvements diff --git a/errors/errors.go b/errors/errors.go index 16f10f36a6ee..99c6cf01540a 100644 --- a/errors/errors.go +++ b/errors/errors.go @@ -5,16 +5,12 @@ import ( "reflect" "github.com/pkg/errors" - grpccodes "google.golang.org/grpc/codes" - grpcstatus "google.golang.org/grpc/status" ) // UndefinedCodespace when we explicitly declare no codespace const UndefinedCodespace = "undefined" var ( - // errInternal should never be exposed, but we reserve this code for non-specified errors - errInternal = Register(UndefinedCodespace, 1, "internal") // ErrStopIterating is used to break out of an iteration ErrStopIterating = Register(UndefinedCodespace, 2, "stop iterating") @@ -32,18 +28,11 @@ var ( // // Use this function only during a program startup phase. func Register(codespace string, code uint32, description string) *Error { - return RegisterWithGRPCCode(codespace, code, grpccodes.Unknown, description) -} - -// RegisterWithGRPCCode is a version of Register that associates a gRPC error -// code with a registered error. -func RegisterWithGRPCCode(codespace string, code uint32, grpcCode grpccodes.Code, description string) *Error { - // TODO - uniqueness is (codespace, code) combo if e := getUsed(codespace, code); e != nil { panic(fmt.Sprintf("error with code %d is already registered: %q", code, e.desc)) } - err := &Error{codespace: codespace, code: code, desc: description, grpcCode: grpcCode} + err := &Error{codespace: codespace, code: code, desc: description} setUsed(err) return err @@ -94,7 +83,6 @@ type Error struct { codespace string code uint32 desc string - grpcCode grpccodes.Code } // New is an alias for Register. @@ -154,10 +142,6 @@ func (e *Error) Wrap(desc string) error { return Wrap(e, desc) } // It's a handy function to call Wrapf with sdk errors. func (e *Error) Wrapf(desc string, args ...interface{}) error { return Wrapf(e, desc, args...) } -func (e *Error) GRPCStatus() *grpcstatus.Status { - return grpcstatus.Newf(e.grpcCode, "codespace %s code %d: %s", e.codespace, e.code, e.desc) -} - func isNilErr(err error) bool { // Reflect usage is necessary to correctly compare with // a nil implementation of an error. @@ -246,27 +230,6 @@ func (e *wrappedError) Unwrap() error { return e.parent } -// GRPCStatus gets the gRPC status from the wrapped error or returns an unknown gRPC status. -func (e *wrappedError) GRPCStatus() *grpcstatus.Status { - w := e.Cause() - for { - if hasStatus, ok := w.(interface { - GRPCStatus() *grpcstatus.Status - }); ok { - status := hasStatus.GRPCStatus() - return grpcstatus.New(status.Code(), fmt.Sprintf("%s: %s", status.Message(), e.msg)) - } - - x, ok := w.(causer) - if ok { - w = x.Cause() - } - if x == nil { - return grpcstatus.New(grpccodes.Unknown, e.msg) - } - } -} - // Recover captures a panic and stop its propagation. If panic happens it is // transformed into a ErrPanic instance and assigned to given error. Call this // function using defer in order to work as expected. diff --git a/errors/errors_test.go b/errors/errors_test.go index 54a33e1842b1..f3e99e2bab9b 100644 --- a/errors/errors_test.go +++ b/errors/errors_test.go @@ -7,8 +7,6 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/suite" - "google.golang.org/grpc/codes" - grpcstatus "google.golang.org/grpc/status" ) type errorsTestSuite struct { @@ -209,23 +207,6 @@ func (s *errorsTestSuite) TestABCIError() { s.Require().Equal("custom: unknown", ABCIError("unknown", 1, "custom").Error()) } -func (s *errorsTestSuite) TestGRPCStatus() { - s.Require().Equal(codes.Unknown, grpcstatus.Code(errInternal)) - s.Require().Equal(codes.NotFound, grpcstatus.Code(ErrNotFound)) - - status, ok := grpcstatus.FromError(ErrNotFound) - s.Require().True(ok) - s.Require().Equal("codespace testtesttest code 38: not found", status.Message()) - - // test wrapping - s.Require().Equal(codes.Unimplemented, grpcstatus.Code(ErrNotSupported.Wrap("test"))) - s.Require().Equal(codes.FailedPrecondition, grpcstatus.Code(ErrConflict.Wrapf("test %s", "foo"))) - - status, ok = grpcstatus.FromError(ErrNotFound.Wrap("test")) - s.Require().True(ok) - s.Require().Equal("codespace testtesttest code 38: not found: test", status.Message()) -} - const testCodespace = "testtesttest" var ( @@ -254,8 +235,5 @@ var ( ErrUnknownExtensionOptions = Register(testCodespace, 31, "unknown extension options") ErrPackAny = Register(testCodespace, 33, "failed packing protobuf message to Any") ErrLogic = Register(testCodespace, 35, "internal logic error") - ErrConflict = RegisterWithGRPCCode(testCodespace, 36, codes.FailedPrecondition, "conflict") - ErrNotSupported = RegisterWithGRPCCode(testCodespace, 37, codes.Unimplemented, "feature not supported") - ErrNotFound = RegisterWithGRPCCode(testCodespace, 38, codes.NotFound, "not found") ErrIO = Register(testCodespace, 39, "Internal IO error") ) diff --git a/errors/go.mod b/errors/go.mod index cbe3091a4245..91cf5a175e20 100644 --- a/errors/go.mod +++ b/errors/go.mod @@ -5,7 +5,6 @@ go 1.20 require ( github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.9.0 - google.golang.org/grpc v1.64.0 ) require ( @@ -13,10 +12,6 @@ require ( github.com/kr/pretty v0.3.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.1 // indirect - golang.org/x/net v0.25.0 // indirect - golang.org/x/sys v0.20.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8 // indirect - google.golang.org/protobuf v1.34.1 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/errors/go.sum b/errors/go.sum index 93540da6f819..4c118e9927a8 100644 --- a/errors/go.sum +++ b/errors/go.sum @@ -1,7 +1,6 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= @@ -20,17 +19,6 @@ github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XF github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= 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= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8 h1:mxSlqyb8ZAHsYDCfiXN1EDdNTdvjUJSLY+OnAUtYNYA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= 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= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/simapp/gomod2nix.toml b/simapp/gomod2nix.toml index a36853c06bb2..5e84bf499dc0 100644 --- a/simapp/gomod2nix.toml +++ b/simapp/gomod2nix.toml @@ -171,8 +171,8 @@ schema = 3 version = "v1.6.2" hash = "sha256-X7aNKLKZ7pJBG/wdP+TWuQnlNLNdbUDd+kC5kF4uBtU=" [mod."github.com/fatih/color"] - version = "v1.16.0" - hash = "sha256-Aq/SM28aPJVzvapllQ64R/DM4aZ5CHPewcm/AUJPyJQ=" + version = "v1.17.0" + hash = "sha256-QsKMy3MsvjbYNcA9jP8w6c3wpmWDZ0079bybAEzmXR0=" [mod."github.com/felixge/httpsnoop"] version = "v1.0.4" hash = "sha256-c1JKoRSndwwOyOxq9ddCe+8qn7mG9uRq2o/822x5O/c=" @@ -282,8 +282,8 @@ schema = 3 version = "v0.5.3" hash = "sha256-5jQftEvEhL88yWeVnu+IZKzV5p9osZcgFmwP1zlrjzY=" [mod."github.com/hashicorp/go-plugin"] - version = "v1.6.0" - hash = "sha256-NeY86Z+qJwt0NPV4cNmWDiTryDPSiyKMkS1ivRX9ThE=" + version = "v1.6.1" + hash = "sha256-HEeJ8TV67PcAuUnGCOHphFpZ/BShvJo5B6Obu3P7t8M=" [mod."github.com/hashicorp/go-safetemp"] version = "v1.0.0" hash = "sha256-g5i9m7FSRInQzZ4iRpIsoUu685AY7fppUwjhuZCezT8=" From a1ae4c3e0337e593f50e502dff54c8127e4d0b46 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 08:06:52 +0200 Subject: [PATCH 07/18] build(deps): Bump bufbuild/buf-setup-action from 1.32.0 to 1.32.1 (#20436) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/proto.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index 678c41c8cfd5..9b0070dc8d3e 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -15,7 +15,7 @@ jobs: timeout-minutes: 5 steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-setup-action@v1.32.0 + - uses: bufbuild/buf-setup-action@v1.32.1 - uses: bufbuild/buf-lint-action@v1 with: input: "proto" @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-setup-action@v1.32.0 + - uses: bufbuild/buf-setup-action@v1.32.1 - uses: bufbuild/buf-breaking-action@v1 with: input: "proto" From 98ba5b42a35823843dbef1bef572b608a42e6bd7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 11:37:33 +0200 Subject: [PATCH 08/18] build(deps): Bump github.com/rs/zerolog from 1.32.0 to 1.33.0 (#20446) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- client/v2/go.mod | 2 +- client/v2/go.sum | 4 ++-- core/go.mod | 2 +- core/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- orm/go.mod | 2 +- orm/go.sum | 4 ++-- runtime/v2/go.mod | 2 +- runtime/v2/go.sum | 4 ++-- server/v2/appmanager/go.mod | 2 +- server/v2/appmanager/go.sum | 4 ++-- server/v2/go.mod | 2 +- server/v2/go.sum | 4 ++-- server/v2/stf/go.mod | 2 +- server/v2/stf/go.sum | 4 ++-- simapp/go.mod | 2 +- simapp/go.sum | 4 ++-- store/go.mod | 2 +- store/go.sum | 4 ++-- store/v2/go.mod | 2 +- store/v2/go.sum | 4 ++-- tests/go.mod | 2 +- tests/go.sum | 4 ++-- tests/systemtests/go.mod | 2 +- tests/systemtests/go.sum | 4 ++-- tools/confix/go.mod | 2 +- tools/confix/go.sum | 4 ++-- tools/cosmovisor/go.mod | 2 +- tools/cosmovisor/go.sum | 4 ++-- tools/hubl/go.mod | 2 +- tools/hubl/go.sum | 4 ++-- x/accounts/defaults/lockup/go.mod | 2 +- x/accounts/defaults/lockup/go.sum | 4 ++-- x/accounts/go.mod | 2 +- x/accounts/go.sum | 4 ++-- x/auth/go.mod | 2 +- x/auth/go.sum | 4 ++-- x/authz/go.mod | 2 +- x/authz/go.sum | 4 ++-- x/bank/go.mod | 2 +- x/bank/go.sum | 4 ++-- 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 | 2 +- x/gov/go.sum | 4 ++-- x/group/go.mod | 2 +- x/group/go.sum | 4 ++-- x/mint/go.mod | 2 +- x/mint/go.sum | 4 ++-- x/nft/go.mod | 2 +- x/nft/go.sum | 4 ++-- x/params/go.mod | 2 +- x/params/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 ++-- 72 files changed, 108 insertions(+), 108 deletions(-) diff --git a/client/v2/go.mod b/client/v2/go.mod index d4b93269750a..503077d34ed9 100644 --- a/client/v2/go.mod +++ b/client/v2/go.mod @@ -124,7 +124,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.11.0 // 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 diff --git a/client/v2/go.sum b/client/v2/go.sum index 57389e6b8fba..0f461b78b42e 100644 --- a/client/v2/go.sum +++ b/client/v2/go.sum @@ -439,8 +439,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/core/go.mod b/core/go.mod index 3961bf333f78..a185561c9bd4 100644 --- a/core/go.mod +++ b/core/go.mod @@ -19,7 +19,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/rs/zerolog v1.32.0 // indirect + github.com/rs/zerolog v1.33.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect golang.org/x/net v0.25.0 // indirect golang.org/x/sys v0.20.0 // indirect diff --git a/core/go.sum b/core/go.sum index 6c8e09a00438..c0fc09eaf369 100644 --- a/core/go.sum +++ b/core/go.sum @@ -31,8 +31,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= 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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= diff --git a/go.mod b/go.mod index 486fc0f4d59b..629a29226a34 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,7 @@ require ( github.com/muesli/termenv v0.15.2 github.com/prometheus/client_golang v1.19.1 github.com/prometheus/common v0.53.0 - github.com/rs/zerolog v1.32.0 + github.com/rs/zerolog v1.33.0 github.com/spf13/cast v1.6.0 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 diff --git a/go.sum b/go.sum index c2b73b481002..f314346f29b0 100644 --- a/go.sum +++ b/go.sum @@ -430,8 +430,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/orm/go.mod b/orm/go.mod index af0a758f85bf..e8ccc6d7a8e7 100644 --- a/orm/go.mod +++ b/orm/go.mod @@ -58,7 +58,7 @@ require ( github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect - github.com/rs/zerolog v1.32.0 // indirect + github.com/rs/zerolog v1.33.0 // indirect github.com/spf13/cast v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect golang.org/x/net v0.25.0 // indirect diff --git a/orm/go.sum b/orm/go.sum index 5575b9f152eb..e1258ab197b3 100644 --- a/orm/go.sum +++ b/orm/go.sum @@ -144,8 +144,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f 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/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/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/runtime/v2/go.mod b/runtime/v2/go.mod index dc1e6208b048..71677059a1f4 100644 --- a/runtime/v2/go.mod +++ b/runtime/v2/go.mod @@ -78,7 +78,7 @@ require ( github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.14.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect - github.com/rs/zerolog v1.32.0 // indirect + github.com/rs/zerolog v1.33.0 // indirect github.com/spf13/cast v1.6.0 // indirect github.com/stretchr/testify v1.9.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect diff --git a/runtime/v2/go.sum b/runtime/v2/go.sum index aeccead55c2c..d067f8f127fd 100644 --- a/runtime/v2/go.sum +++ b/runtime/v2/go.sum @@ -205,8 +205,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f 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/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/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= diff --git a/server/v2/appmanager/go.mod b/server/v2/appmanager/go.mod index f70b766e95e8..3490c1163e8d 100644 --- a/server/v2/appmanager/go.mod +++ b/server/v2/appmanager/go.mod @@ -16,7 +16,7 @@ require ( github.com/mattn/go-isatty v0.0.20 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/rs/zerolog v1.32.0 // indirect + github.com/rs/zerolog v1.33.0 // indirect golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f // indirect golang.org/x/sys v0.20.0 // indirect google.golang.org/protobuf v1.34.1 // indirect diff --git a/server/v2/appmanager/go.sum b/server/v2/appmanager/go.sum index ea7ed7906187..3c373779418b 100644 --- a/server/v2/appmanager/go.sum +++ b/server/v2/appmanager/go.sum @@ -19,8 +19,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE 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/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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f h1:3CW0unweImhOzd5FmYuRsD4Y4oQFKZIjAnKbjV4WIrw= diff --git a/server/v2/go.mod b/server/v2/go.mod index 236da1209f23..ce275ef85d53 100644 --- a/server/v2/go.mod +++ b/server/v2/go.mod @@ -28,7 +28,7 @@ require ( github.com/pelletier/go-toml/v2 v2.1.1 github.com/prometheus/client_golang v1.19.0 github.com/prometheus/common v0.52.2 - github.com/rs/zerolog v1.32.0 + github.com/rs/zerolog v1.33.0 github.com/spf13/cobra v1.8.0 github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.9.0 diff --git a/server/v2/go.sum b/server/v2/go.sum index ef60938cd070..f593b1e98d53 100644 --- a/server/v2/go.sum +++ b/server/v2/go.sum @@ -203,8 +203,8 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L 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/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/server/v2/stf/go.mod b/server/v2/stf/go.mod index 6205f143b84d..8202af63d7dd 100644 --- a/server/v2/stf/go.mod +++ b/server/v2/stf/go.mod @@ -22,7 +22,7 @@ require ( github.com/mattn/go-isatty v0.0.20 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/rs/zerolog v1.32.0 // indirect + github.com/rs/zerolog v1.33.0 // indirect golang.org/x/sys v0.20.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/server/v2/stf/go.sum b/server/v2/stf/go.sum index e4fca2c19830..590924badfa7 100644 --- a/server/v2/stf/go.sum +++ b/server/v2/stf/go.sum @@ -26,8 +26,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= 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/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/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= diff --git a/simapp/go.mod b/simapp/go.mod index 0fe4b65e2fb3..f9f809fc38d9 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -182,7 +182,7 @@ require ( github.com/rivo/uniseg v0.2.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/cors v1.11.0 // 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 diff --git a/simapp/go.sum b/simapp/go.sum index 8e8051435964..4e77bbacb32e 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -746,8 +746,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/store/go.mod b/store/go.mod index ef230b027f0b..0647be684c0b 100644 --- a/store/go.mod +++ b/store/go.mod @@ -65,7 +65,7 @@ require ( github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.14.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect - github.com/rs/zerolog v1.32.0 // indirect + github.com/rs/zerolog v1.33.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect golang.org/x/crypto v0.23.0 // indirect golang.org/x/net v0.25.0 // indirect diff --git a/store/go.sum b/store/go.sum index 1de6c9c35b9b..165979e4bf94 100644 --- a/store/go.sum +++ b/store/go.sum @@ -208,8 +208,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f 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/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/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/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= diff --git a/store/v2/go.mod b/store/v2/go.mod index 414038dc79e5..dd7e79dfad91 100644 --- a/store/v2/go.mod +++ b/store/v2/go.mod @@ -56,7 +56,7 @@ require ( github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/procfs v0.13.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect - github.com/rs/zerolog v1.32.0 // indirect + github.com/rs/zerolog v1.33.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect golang.org/x/crypto v0.23.0 // indirect golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f // indirect diff --git a/store/v2/go.sum b/store/v2/go.sum index 71ddaa1e1a6f..9dd3396b1bfd 100644 --- a/store/v2/go.sum +++ b/store/v2/go.sum @@ -210,8 +210,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f 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/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/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/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= diff --git a/tests/go.mod b/tests/go.mod index 5ed0828cf12a..383c02f26400 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -178,7 +178,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.11.0 // 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 diff --git a/tests/go.sum b/tests/go.sum index 49c7d3f3a916..f2dd1c8ba999 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -737,8 +737,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/tests/systemtests/go.mod b/tests/systemtests/go.mod index dabbccfea997..a7ba7f9739a7 100644 --- a/tests/systemtests/go.mod +++ b/tests/systemtests/go.mod @@ -128,7 +128,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 diff --git a/tests/systemtests/go.sum b/tests/systemtests/go.sum index fd28f81ef428..126bd85336ff 100644 --- a/tests/systemtests/go.sum +++ b/tests/systemtests/go.sum @@ -632,8 +632,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= diff --git a/tools/confix/go.mod b/tools/confix/go.mod index 0c0b07f802b9..7a0529cbcf4f 100644 --- a/tools/confix/go.mod +++ b/tools/confix/go.mod @@ -121,7 +121,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 diff --git a/tools/confix/go.sum b/tools/confix/go.sum index 3272e28c14f6..6bb5e5cf0298 100644 --- a/tools/confix/go.sum +++ b/tools/confix/go.sum @@ -635,8 +635,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= diff --git a/tools/cosmovisor/go.mod b/tools/cosmovisor/go.mod index 9c75ca323e23..babf91700310 100644 --- a/tools/cosmovisor/go.mod +++ b/tools/cosmovisor/go.mod @@ -136,7 +136,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 diff --git a/tools/cosmovisor/go.sum b/tools/cosmovisor/go.sum index 7e60b98fb9f0..a5dcc244fba7 100644 --- a/tools/cosmovisor/go.sum +++ b/tools/cosmovisor/go.sum @@ -895,8 +895,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= diff --git a/tools/hubl/go.mod b/tools/hubl/go.mod index 4484707b38c8..119301ed5170 100644 --- a/tools/hubl/go.mod +++ b/tools/hubl/go.mod @@ -120,7 +120,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.10.0 // 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 diff --git a/tools/hubl/go.sum b/tools/hubl/go.sum index 48d1c6cf9884..7a74e52e61a6 100644 --- a/tools/hubl/go.sum +++ b/tools/hubl/go.sum @@ -635,8 +635,8 @@ github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.10.0 h1:62NOS1h+r8p1mW6FM0FSB0exioXLhd/sh15KpjWBZ+8= github.com/rs/cors v1.10.0/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= diff --git a/x/accounts/defaults/lockup/go.mod b/x/accounts/defaults/lockup/go.mod index bacf482ffc39..a0e0ae75becb 100644 --- a/x/accounts/defaults/lockup/go.mod +++ b/x/accounts/defaults/lockup/go.mod @@ -126,7 +126,7 @@ require ( github.com/prometheus/procfs v0.14.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // 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 diff --git a/x/accounts/defaults/lockup/go.sum b/x/accounts/defaults/lockup/go.sum index f85839f324f6..9655825db092 100644 --- a/x/accounts/defaults/lockup/go.sum +++ b/x/accounts/defaults/lockup/go.sum @@ -405,8 +405,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/x/accounts/go.mod b/x/accounts/go.mod index 4c831889734a..64a13e9bf00d 100644 --- a/x/accounts/go.mod +++ b/x/accounts/go.mod @@ -133,7 +133,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.11.0 // 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 diff --git a/x/accounts/go.sum b/x/accounts/go.sum index a5dc7aad8a35..fef9f0254873 100644 --- a/x/accounts/go.sum +++ b/x/accounts/go.sum @@ -429,8 +429,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/x/auth/go.mod b/x/auth/go.mod index 92f29d61d822..3b7bae9fa3d3 100644 --- a/x/auth/go.mod +++ b/x/auth/go.mod @@ -135,7 +135,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.11.0 // 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 diff --git a/x/auth/go.sum b/x/auth/go.sum index dee05d100a80..8359f2afcf54 100644 --- a/x/auth/go.sum +++ b/x/auth/go.sum @@ -429,8 +429,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/x/authz/go.mod b/x/authz/go.mod index c184d42de2f8..10fd3f8a1d5e 100644 --- a/x/authz/go.mod +++ b/x/authz/go.mod @@ -130,7 +130,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.11.0 // 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 diff --git a/x/authz/go.sum b/x/authz/go.sum index dee05d100a80..8359f2afcf54 100644 --- a/x/authz/go.sum +++ b/x/authz/go.sum @@ -429,8 +429,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/x/bank/go.mod b/x/bank/go.mod index c2f16b07ea10..150887687ead 100644 --- a/x/bank/go.mod +++ b/x/bank/go.mod @@ -129,7 +129,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.11.0 // 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 diff --git a/x/bank/go.sum b/x/bank/go.sum index dee05d100a80..8359f2afcf54 100644 --- a/x/bank/go.sum +++ b/x/bank/go.sum @@ -429,8 +429,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/x/circuit/go.mod b/x/circuit/go.mod index 3250afe17066..ddcc6e9a0ec8 100644 --- a/x/circuit/go.mod +++ b/x/circuit/go.mod @@ -128,7 +128,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.11.0 // 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 diff --git a/x/circuit/go.sum b/x/circuit/go.sum index 21e4013de048..d31a23240275 100644 --- a/x/circuit/go.sum +++ b/x/circuit/go.sum @@ -431,8 +431,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/x/consensus/go.mod b/x/consensus/go.mod index f7a7b5a18e6c..35b0122462b2 100644 --- a/x/consensus/go.mod +++ b/x/consensus/go.mod @@ -127,7 +127,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.11.0 // 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 diff --git a/x/consensus/go.sum b/x/consensus/go.sum index 21e4013de048..d31a23240275 100644 --- a/x/consensus/go.sum +++ b/x/consensus/go.sum @@ -431,8 +431,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/x/distribution/go.mod b/x/distribution/go.mod index c782f5a69ca2..94ee19114873 100644 --- a/x/distribution/go.mod +++ b/x/distribution/go.mod @@ -132,7 +132,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.11.0 // 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 diff --git a/x/distribution/go.sum b/x/distribution/go.sum index 0e0a8996552b..1dd8ca19bf78 100644 --- a/x/distribution/go.sum +++ b/x/distribution/go.sum @@ -431,8 +431,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/x/epochs/go.mod b/x/epochs/go.mod index c9279055894e..a9e89908b4fb 100644 --- a/x/epochs/go.mod +++ b/x/epochs/go.mod @@ -126,7 +126,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.11.0 // 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 diff --git a/x/epochs/go.sum b/x/epochs/go.sum index dc2b96b317f5..c776bc4eddb0 100644 --- a/x/epochs/go.sum +++ b/x/epochs/go.sum @@ -429,8 +429,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/x/evidence/go.mod b/x/evidence/go.mod index 17c7ace14195..0abbc32d8c9d 100644 --- a/x/evidence/go.mod +++ b/x/evidence/go.mod @@ -130,7 +130,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.11.0 // 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 diff --git a/x/evidence/go.sum b/x/evidence/go.sum index 21e4013de048..d31a23240275 100644 --- a/x/evidence/go.sum +++ b/x/evidence/go.sum @@ -431,8 +431,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index ee37c977f1a2..12da836ead92 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -135,7 +135,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.11.0 // 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 diff --git a/x/feegrant/go.sum b/x/feegrant/go.sum index 4e9631b75be6..466ec67a6b14 100644 --- a/x/feegrant/go.sum +++ b/x/feegrant/go.sum @@ -439,8 +439,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/x/gov/go.mod b/x/gov/go.mod index b0d666d286d8..34673572b435 100644 --- a/x/gov/go.mod +++ b/x/gov/go.mod @@ -137,7 +137,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.11.0 // 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 diff --git a/x/gov/go.sum b/x/gov/go.sum index a3f5c8c6eca9..41fca7ba5362 100644 --- a/x/gov/go.sum +++ b/x/gov/go.sum @@ -437,8 +437,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/x/group/go.mod b/x/group/go.mod index 4f5618ed1b91..3d6f4ffa7312 100644 --- a/x/group/go.mod +++ b/x/group/go.mod @@ -139,7 +139,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.11.0 // 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 diff --git a/x/group/go.sum b/x/group/go.sum index 7fc9e4412c6b..c823d0a9a461 100644 --- a/x/group/go.sum +++ b/x/group/go.sum @@ -439,8 +439,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/x/mint/go.mod b/x/mint/go.mod index 8606f6bdba0d..bc9f0da50f15 100644 --- a/x/mint/go.mod +++ b/x/mint/go.mod @@ -119,7 +119,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.11.0 // 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 diff --git a/x/mint/go.sum b/x/mint/go.sum index 21e4013de048..d31a23240275 100644 --- a/x/mint/go.sum +++ b/x/mint/go.sum @@ -431,8 +431,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/x/nft/go.mod b/x/nft/go.mod index 371d7cdc5a5a..da9bae3c0fbe 100644 --- a/x/nft/go.mod +++ b/x/nft/go.mod @@ -128,7 +128,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.11.0 // 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 diff --git a/x/nft/go.sum b/x/nft/go.sum index 21e4013de048..d31a23240275 100644 --- a/x/nft/go.sum +++ b/x/nft/go.sum @@ -431,8 +431,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/x/params/go.mod b/x/params/go.mod index 4127752f0800..9a6c4893c489 100644 --- a/x/params/go.mod +++ b/x/params/go.mod @@ -130,7 +130,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.11.0 // 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 diff --git a/x/params/go.sum b/x/params/go.sum index 21e4013de048..d31a23240275 100644 --- a/x/params/go.sum +++ b/x/params/go.sum @@ -431,8 +431,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/x/protocolpool/go.mod b/x/protocolpool/go.mod index f34b906ff07d..d3ae459927f3 100644 --- a/x/protocolpool/go.mod +++ b/x/protocolpool/go.mod @@ -130,7 +130,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.11.0 // 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 diff --git a/x/protocolpool/go.sum b/x/protocolpool/go.sum index 21e4013de048..d31a23240275 100644 --- a/x/protocolpool/go.sum +++ b/x/protocolpool/go.sum @@ -431,8 +431,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/x/slashing/go.mod b/x/slashing/go.mod index 0f5c4748c320..97e0a52df106 100644 --- a/x/slashing/go.mod +++ b/x/slashing/go.mod @@ -131,7 +131,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.11.0 // 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 diff --git a/x/slashing/go.sum b/x/slashing/go.sum index c50cf63d5f81..66b9d4bf658a 100644 --- a/x/slashing/go.sum +++ b/x/slashing/go.sum @@ -433,8 +433,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/x/staking/go.mod b/x/staking/go.mod index 2d710cf85b16..ec3567e01523 100644 --- a/x/staking/go.mod +++ b/x/staking/go.mod @@ -123,7 +123,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.11.0 // 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 diff --git a/x/staking/go.sum b/x/staking/go.sum index dee05d100a80..8359f2afcf54 100644 --- a/x/staking/go.sum +++ b/x/staking/go.sum @@ -429,8 +429,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= diff --git a/x/upgrade/go.mod b/x/upgrade/go.mod index 8f63b2d789d7..d1393c6b64a1 100644 --- a/x/upgrade/go.mod +++ b/x/upgrade/go.mod @@ -155,7 +155,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.11.0 // 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 diff --git a/x/upgrade/go.sum b/x/upgrade/go.sum index 4bf7141d5129..77f5f16fec6c 100644 --- a/x/upgrade/go.sum +++ b/x/upgrade/go.sum @@ -739,8 +739,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/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/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= From 76ae2a14bbe11c645d728c19c9ab5af8a29a677e Mon Sep 17 00:00:00 2001 From: yumeiyin <155420652+yumeiyin@users.noreply.github.com> Date: Fri, 24 May 2024 11:59:30 +0200 Subject: [PATCH 09/18] chore: fix function name (#20442) Co-authored-by: Marko --- x/gov/keeper/migrations.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/gov/keeper/migrations.go b/x/gov/keeper/migrations.go index 5b366b9b7373..922fb209d7ce 100644 --- a/x/gov/keeper/migrations.go +++ b/x/gov/keeper/migrations.go @@ -39,7 +39,7 @@ func (m Migrator) Migrate4to5(ctx context.Context) error { return v5.MigrateStore(ctx, m.keeper.KVStoreService, m.keeper.cdc, m.keeper.Constitution) } -// Migrate4to5 migrates from version 5 to 6. +// Migrate5to6 migrates from version 5 to 6. func (m Migrator) Migrate5to6(ctx context.Context) error { return v6.MigrateStore(ctx, m.keeper.KVStoreService, m.keeper.Params, m.keeper.Proposals) } From ad59942fc8231ae7f4afe959530bf51e2f5e824a Mon Sep 17 00:00:00 2001 From: Hwangjae Lee Date: Sat, 25 May 2024 00:45:38 +0900 Subject: [PATCH 10/18] docs(x/auth/tx): fixed typo in error log in `query.go` (#20447) Signed-off-by: Hwangjae Lee --- x/auth/tx/query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/auth/tx/query.go b/x/auth/tx/query.go index da70c74dce12..c49ddfa25458 100644 --- a/x/auth/tx/query.go +++ b/x/auth/tx/query.go @@ -136,7 +136,7 @@ func mkTxResult(txConfig client.TxConfig, resTx *coretypes.ResultTx, resBlock *c } p, ok := txb.(*gogoTxWrapper) if !ok { - return nil, fmt.Errorf("unexpected type, wnted gogoTxWrapper, got: %T", txb) + return nil, fmt.Errorf("unexpected type, wanted gogoTxWrapper, got: %T", txb) } tx, err := p.AsTx() From e05fe925933b061edd367b1fc99a125a524c9406 Mon Sep 17 00:00:00 2001 From: Matt Kocubinski Date: Fri, 24 May 2024 11:47:24 -0400 Subject: [PATCH 11/18] refactor(store/v2): remove snapshot conversion fns from store/v2 (#20445) --- runtime/v2/go.mod | 4 +-- runtime/v2/go.sum | 7 ------ store/v2/go.mod | 9 +------ store/v2/go.sum | 22 ---------------- store/v2/snapshots/types/convert.go | 39 ----------------------------- 5 files changed, 2 insertions(+), 79 deletions(-) delete mode 100644 store/v2/snapshots/types/convert.go diff --git a/runtime/v2/go.mod b/runtime/v2/go.mod index 71677059a1f4..ba83c6d087f6 100644 --- a/runtime/v2/go.mod +++ b/runtime/v2/go.mod @@ -47,8 +47,6 @@ require ( github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft v1.0.0-alpha.2.0.20240429102542-490e9bc3de65 // indirect - github.com/cometbft/cometbft/api v1.0.0-alpha.2.0.20240429102542-490e9bc3de65 // indirect github.com/cosmos/cosmos-db v1.0.2 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect github.com/cosmos/iavl v1.1.4 // indirect @@ -57,7 +55,6 @@ require ( github.com/emicklei/dot v1.6.2 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.4 // indirect 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 @@ -71,6 +68,7 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-sqlite3 v1.14.22 // indirect + github.com/onsi/gomega v1.28.1 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.1 // indirect diff --git a/runtime/v2/go.sum b/runtime/v2/go.sum index d067f8f127fd..a13e20182f10 100644 --- a/runtime/v2/go.sum +++ b/runtime/v2/go.sum @@ -37,10 +37,6 @@ github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwP 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 v1.0.0-alpha.2.0.20240429102542-490e9bc3de65 h1:vNrFdj8MmdHmZPovE1bZcOpY8VNK2fy3O3bjgkvGA8A= -github.com/cometbft/cometbft v1.0.0-alpha.2.0.20240429102542-490e9bc3de65/go.mod h1:FH1mC3P645pmV3TcHly2xc/2QnKOztRVS7QI77L8Pkk= -github.com/cometbft/cometbft/api v1.0.0-alpha.2.0.20240429102542-490e9bc3de65 h1:Bj+DkG59qYZE54uWBKXsNtiug1u6M4x8Tk3l5tAb/3I= -github.com/cometbft/cometbft/api v1.0.0-alpha.2.0.20240429102542-490e9bc3de65/go.mod h1:NDFKiBBD8HJC6QQLAoUI99YhsiRZtg2+FJWfk6A6m6o= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= @@ -93,8 +89,6 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -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.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -333,7 +327,6 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 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= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= diff --git a/store/v2/go.mod b/store/v2/go.mod index dd7e79dfad91..88f99dce2e3d 100644 --- a/store/v2/go.mod +++ b/store/v2/go.mod @@ -7,7 +7,6 @@ require ( cosmossdk.io/errors v1.0.1 cosmossdk.io/log v1.3.1 github.com/cockroachdb/pebble v1.1.0 - github.com/cometbft/cometbft v0.38.7 github.com/cosmos/gogoproto v1.4.12 github.com/cosmos/iavl v1.1.4 github.com/cosmos/ics23/go v0.10.0 @@ -24,7 +23,6 @@ require ( require ( github.com/DataDog/zstd v1.5.5 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cockroachdb/errors v1.11.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -32,11 +30,10 @@ require ( github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cosmos/cosmos-db v1.0.2 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/emicklei/dot v1.6.1 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/hashicorp/go-immutable-radix v1.0.0 // indirect @@ -47,8 +44,6 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae // indirect - github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect @@ -57,10 +52,8 @@ require ( github.com/prometheus/procfs v0.13.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/zerolog v1.33.0 // indirect - github.com/sasha-s/go-deadlock v0.3.1 // indirect golang.org/x/crypto v0.23.0 // indirect golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f // indirect - golang.org/x/net v0.25.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8 // indirect diff --git a/store/v2/go.sum b/store/v2/go.sum index 9dd3396b1bfd..99cfc1012fb6 100644 --- a/store/v2/go.sum +++ b/store/v2/go.sum @@ -13,12 +13,6 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= -github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= -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/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -39,8 +33,6 @@ github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwP 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.7 h1:ULhIOJ9+LgSy6nLekhq9ae3juX3NnQUMMPyVdhZV6Hk= -github.com/cometbft/cometbft v0.38.7/go.mod h1:HIyf811dFMI73IE0F7RrnY/Fr+d1+HuJAgtkEpQjCMY= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= @@ -55,10 +47,6 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs 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.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= @@ -95,8 +83,6 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -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.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -158,8 +144,6 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae h1:FatpGJD2jmJfhZiFDElaC0QhZUDQnxUeAwTGkfAHN3I= -github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= @@ -174,9 +158,6 @@ github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d h1:htwtWgtQo8YS6JFWWi2DNgY0RwSGJ1ruMoxY6CUUclk= -github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -212,8 +193,6 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= 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/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/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= @@ -336,6 +315,5 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 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= diff --git a/store/v2/snapshots/types/convert.go b/store/v2/snapshots/types/convert.go deleted file mode 100644 index e37aca56ab6c..000000000000 --- a/store/v2/snapshots/types/convert.go +++ /dev/null @@ -1,39 +0,0 @@ -package types - -import ( - abci "github.com/cometbft/cometbft/abci/types" - "github.com/cosmos/gogoproto/proto" - - "cosmossdk.io/errors" -) - -// Converts an ABCI snapshot to a snapshot. Mainly to decode the SDK metadata. -func SnapshotFromABCI(in *abci.Snapshot) (Snapshot, error) { - snapshot := Snapshot{ - Height: in.Height, - Format: in.Format, - Chunks: in.Chunks, - Hash: in.Hash, - } - err := proto.Unmarshal(in.Metadata, &snapshot.Metadata) - if err != nil { - return Snapshot{}, errors.Wrap(err, "failed to unmarshal snapshot metadata") - } - return snapshot, nil -} - -// Converts a Snapshot to its ABCI representation. Mainly to encode the SDK metadata. -func (s Snapshot) ToABCI() (abci.Snapshot, error) { - out := abci.Snapshot{ - Height: s.Height, - Format: s.Format, - Chunks: s.Chunks, - Hash: s.Hash, - } - var err error - out.Metadata, err = proto.Marshal(&s.Metadata) - if err != nil { - return abci.Snapshot{}, errors.Wrap(err, "failed to marshal snapshot metadata") - } - return out, nil -} From 5930ee345b006dc6a20b42c807fe9649ed68852b Mon Sep 17 00:00:00 2001 From: PolyMa <151764357+polymaer@users.noreply.github.com> Date: Sat, 25 May 2024 17:15:02 +0800 Subject: [PATCH 12/18] collections: fix typos in README (#20452) --- collections/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/collections/README.md b/collections/README.md index 28d55c81c5a3..09c6870ba21d 100644 --- a/collections/README.md +++ b/collections/README.md @@ -193,7 +193,7 @@ We already know the first three arguments of the ``NewMap`` function. The fourth parameter is our `KeyCodec`, we know that the ``Map`` has `string` as key so we pass it a `KeyCodec` that handles strings as keys. -The fifth parameter is our `ValueCodec`, we know that the `Map` as a `uint64` as value so we pass it a `ValueCodec` that handles uint64. +The fifth parameter is our `ValueCodec`, we know that the `Map` has a `uint64` as value so we pass it a `ValueCodec` that handles uint64. Collections already comes with all the required implementations for golang primitive types. @@ -587,7 +587,7 @@ Let's analyse each method in the example and how it makes use of the `Iterate` a In `GetAllAccounts` we pass to our `Iterate` a nil `Ranger`. This means that the returned `Iterator` will include all the existing keys within the collection. -Then we use some the `Values` method from the returned `Iterator` API to collect all the values into a slice. +Then we use the `Values` method from the returned `Iterator` API to collect all the values into a slice. `Iterator` offers other methods such as `Keys()` to collect only the keys and not the values and `KeyValues` to collect all the keys and values. @@ -602,7 +602,7 @@ we instruct it to report us results in reverse order through `Descending` Then we pass the range instruction to `Iterate` and get an `Iterator`, which will contain only the results we specified in the range. -Then we use again th `Values` method of the `Iterator` to collect all the results. +Then we use again the `Values` method of the `Iterator` to collect all the results. `collections.Range` also offers a `Prefix` API which is not applicable to all keys types, for example uint64 cannot be prefix because it is of constant size, but a `string` key @@ -777,7 +777,7 @@ We use the `collections.Join` function to generate the composite key. `collections.Pair` contains the two keys we have joined, it also exposes two methods: `K1` to fetch the 1st part of the key and `K2` to fetch the second part. -As always, we use the `collections.Map.Set` method to map the composite key to our value (`math.Int`in this case) +As always, we use the `collections.Map.Set` method to map the composite key to our value (`math.Int` in this case) #### GetBalance @@ -860,7 +860,7 @@ Then we can see in our `AccountIndexes` struct the `Number` field is defined as: ``` Where the first type parameter is `uint64`, which is the field type of our index. -The second type parameter is the primary key `sdk.AccAddress` +The second type parameter is the primary key `sdk.AccAddress`. And the third type parameter is the actual object we're storing `authtypes.BaseAccount`. Then we create a `NewAccountIndexes` function that instantiates and returns the `AccountsIndexes` struct. From 4b5ac9b7d575fc74cb7570fbcdcc834ad6101435 Mon Sep 17 00:00:00 2001 From: cocoyeal <150209682+cocoyeal@users.noreply.github.com> Date: Mon, 27 May 2024 16:52:10 +0800 Subject: [PATCH 13/18] docs: fix note blocks display failure (#20457) --- docs/build/building-apps/03-app-upgrade.md | 4 ++-- docs/learn/advanced/01-transactions.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/build/building-apps/03-app-upgrade.md b/docs/build/building-apps/03-app-upgrade.md index d5a88c5d7cc4..ebaddb3f75ea 100644 --- a/docs/build/building-apps/03-app-upgrade.md +++ b/docs/build/building-apps/03-app-upgrade.md @@ -52,9 +52,9 @@ be a matter of minutes and not even require them to be awake at that time. ## Integrating With An App -::tip +:::tip The following is not required for users using `depinject` / app v2, this is abstracted for them. -:: +::: In addition to basic module wiring, setup the upgrade Keeper for the app and then define a `PreBlocker` that calls the upgrade keeper's PreBlocker method: diff --git a/docs/learn/advanced/01-transactions.md b/docs/learn/advanced/01-transactions.md index 849f14c2383e..a8b60ff097e2 100644 --- a/docs/learn/advanced/01-transactions.md +++ b/docs/learn/advanced/01-transactions.md @@ -33,9 +33,9 @@ It contains the following methods: * **GetMsgs:** unwraps the transaction and returns a list of contained `sdk.Msg`s - one transaction may have one or multiple messages, which are defined by module developers. * **ValidateBasic:** lightweight, [_stateless_](../beginner/01-tx-lifecycle.md#types-of-checks) checks used by ABCI messages [`CheckTx`](./00-baseapp.md#checktx) and [`DeliverTx`](./00-baseapp.md#delivertx) to make sure transactions are not invalid. For example, the [`auth`](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth) module's `ValidateBasic` function checks that its transactions are signed by the correct number of signers and that the fees do not exceed what the user's maximum. When [`runTx`](./00-baseapp.md#runtx) is checking a transaction created from the [`auth`](https://github.com/cosmos/cosmos-sdk/tree/main/x/auth/) module, it first runs `ValidateBasic` on each message, then runs the `auth` module AnteHandler which calls `ValidateBasic` for the transaction itself. - :::note - This function is different from the deprecated `sdk.Msg` [`ValidateBasic`](../beginner/01-tx-lifecycle.md#ValidateBasic) methods, which was performing basic validity checks on messages only. - ::: +:::note +This function is different from the deprecated `sdk.Msg` [`ValidateBasic`](../beginner/01-tx-lifecycle.md#ValidateBasic) methods, which was performing basic validity checks on messages only. +::: As a developer, you should rarely manipulate `Tx` directly, as `Tx` is really an intermediate type used for transaction generation. Instead, developers should prefer the `TxBuilder` interface, which you can learn more about [below](#transaction-generation). From 8e9e3aaf611548601c3d81318a5439bc3bb73fe2 Mon Sep 17 00:00:00 2001 From: tianyeyouyou <150894831+tianyeyouyou@users.noreply.github.com> Date: Mon, 27 May 2024 16:53:40 +0800 Subject: [PATCH 14/18] docs: update diagram to be shown properly (#20454) --- docs/learn/beginner/01-tx-lifecycle.md | 78 +++++++++++++------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/docs/learn/beginner/01-tx-lifecycle.md b/docs/learn/beginner/01-tx-lifecycle.md index f3813a4c0b75..133f173008d0 100644 --- a/docs/learn/beginner/01-tx-lifecycle.md +++ b/docs/learn/beginner/01-tx-lifecycle.md @@ -164,45 +164,45 @@ As mentioned throughout the documentation `BeginBlock`, `ExecuteTx` and `EndBloc Although every full-node operates individually and locally, the outcome is always consistent and unequivocal. This is because the state changes brought about by the messages are predictable, and the transactions are specifically sequenced in the proposed block. ```text - -------------------------- - | Receive Block Proposal | - -------------------------- - | - v - ------------------------- - | FinalizeBlock | - ------------------------- - | - v - ------------------- - | BeginBlock | - ------------------- - | - v - -------------------- - | ExecuteTx(tx0) | - | ExecuteTx(tx1) | - | ExecuteTx(tx2) | - | ExecuteTx(tx3) | - | . | - | . | - | . | - ------------------- - | - v - -------------------- - | EndBlock | - -------------------- - | - v - ----------------------- - | Consensus | - ----------------------- - | - v - ----------------------- - | Commit | - ----------------------- + -------------------------- + | Receive Block Proposal | + -------------------------- + | + v + ------------------------- + | FinalizeBlock | + ------------------------- + | + v + ------------------- + | BeginBlock | + ------------------- + | + v + -------------------- + | ExecuteTx(tx0) | + | ExecuteTx(tx1) | + | ExecuteTx(tx2) | + | ExecuteTx(tx3) | + | . | + | . | + | . | + ------------------- + | + v + -------------------- + | EndBlock | + -------------------- + | + v + ------------------------- + | Consensus | + ------------------------- + | + v + ------------------------- + | Commit | + ------------------------- ``` ### Transaction Execution From b3e53cfad1a8d6ae370c38eef366daa52d89c87f Mon Sep 17 00:00:00 2001 From: PolyMa <151764357+polymaer@users.noreply.github.com> Date: Mon, 27 May 2024 16:57:31 +0800 Subject: [PATCH 15/18] docs: update link contents (#20437) --- docs/learn/beginner/00-app-anatomy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/learn/beginner/00-app-anatomy.md b/docs/learn/beginner/00-app-anatomy.md index 1414bae25fbb..ce14795474dc 100644 --- a/docs/learn/beginner/00-app-anatomy.md +++ b/docs/learn/beginner/00-app-anatomy.md @@ -272,6 +272,6 @@ The following is the `go.mod` of the [Cosmos Hub](https://github.com/cosmos/gaia https://github.com/cosmos/gaia/blob/26ae7c2/go.mod#L1-L28 ``` -For building the application, a [Makefile](https://en.wikipedia.org/wiki/Makefile) is generally used. The Makefile primarily ensures that the `go.mod` is run before building the two entrypoints to the application, [`appd`](#node-client) and [`appd`](#application-interface). +For building the application, a [Makefile](https://en.wikipedia.org/wiki/Makefile) is generally used. The Makefile primarily ensures that the `go.mod` is run before building the two entrypoints to the application, [`Node Client`](#node-client) and [`Application Interface`](#application-interface). Here is an example of the [Cosmos Hub Makefile](https://github.com/cosmos/gaia/blob/main/Makefile). From fe6361b61718ec3fb2eb73c1e169a939856cd405 Mon Sep 17 00:00:00 2001 From: bc1bot Date: Mon, 27 May 2024 12:54:46 +0300 Subject: [PATCH 16/18] chore: remove old TODO in baseapp (#20450) Co-authored-by: son trinh --- baseapp/baseapp.go | 1 - 1 file changed, 1 deletion(-) diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index 1fd26351edca..57f32ff74aa8 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -668,7 +668,6 @@ func (app *BaseApp) getContextForTx(mode execMode, txBytes []byte) sdk.Context { ctx := modeState.Context(). WithTxBytes(txBytes). WithGasMeter(storetypes.NewInfiniteGasMeter()) - // WithVoteInfos(app.voteInfos) // TODO: identify if this is needed ctx = ctx.WithIsSigverifyTx(app.sigverifyTx) From 190b20c3986aca76d02ff3b351ffde6be20e85f8 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Mon, 27 May 2024 13:33:25 +0200 Subject: [PATCH 17/18] feat(runtime,runtime/v2): skip store for specified modules (#20409) --- UPGRADING.md | 20 +- .../app/runtime/v1alpha1/module.pulsar.go | 213 ++++++++++++++---- api/cosmos/app/runtime/v2/module.pulsar.go | 207 ++++++++++++++--- api/go.mod | 2 - go.work.example | 2 - .../cosmos/app/runtime/v1alpha1/module.proto | 5 + proto/cosmos/app/runtime/v2/module.proto | 5 + runtime/module.go | 57 ++++- runtime/store.go | 14 ++ runtime/v2/module.go | 38 ++-- runtime/v2/stub.go | 21 ++ simapp/CHANGELOG.md | 50 ++++ simapp/app_config.go | 5 + 13 files changed, 537 insertions(+), 102 deletions(-) create mode 100644 runtime/v2/stub.go create mode 100644 simapp/CHANGELOG.md diff --git a/UPGRADING.md b/UPGRADING.md index 6c079ac1ce37..491299c8f493 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -9,6 +9,7 @@ Note, always read the **SimApp** section for more information on application wir In this section we describe the changes made in Cosmos SDK' SimApp. **These changes are directly applicable to your application wiring.** +Please read this section first, but for an exhaustive list of changes, refer to the [CHANGELOG](./simapp/CHANGELOG.md). #### Client (`root.go`) @@ -145,6 +146,23 @@ used as a TTL for the transaction and is used to provide replay protection. See [ADR-070](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-070-unordered-transactions.md) for more details. +### Depinject `app_config.go` / `app.yml` + +With the introduction of [environment in modules](#core-api), depinject automatically creates the environment for all modules. +Learn more about environment [here](https://example.com) . Given the fields of environment, this means runtime creates a kv store service for all modules by default. +It can happen that some modules do not have a store necessary (such as `x/auth/tx` for instance). In this case, the store creation should be skipped in `app_config.go`: + +```diff +InitGenesis: []string{ + "..." +}, ++ // SkipStoreKeys is an optional list of store keys to skip when constructing the ++ // module's keeper. This is useful when a module does not have a store key. ++ SkipStoreKeys: []string{ ++ "tx", ++ }, +``` + ### Protobuf The `cosmossdk.io/api/tendermint` package has been removed as CometBFT now publishes its protos to `buf.build/tendermint` and `buf.build/cometbft`. @@ -203,7 +221,7 @@ been added to avoid the use of the Accounts.String() method. +type MsgSimulatorFn func(r *rand.Rand, accs []Account, cdc address.Codec) (sdk.Msg, error) ``` -##### Dependency Injection +##### Depinject Previously `cosmossdk.io/core` held functions `Invoke`, `Provide` and `Register` were moved to `cosmossdk.io/depinject/appconfig`. All modules using dependency injection must update their imports. diff --git a/api/cosmos/app/runtime/v1alpha1/module.pulsar.go b/api/cosmos/app/runtime/v1alpha1/module.pulsar.go index 14cb9784ab31..c1da19eccf67 100644 --- a/api/cosmos/app/runtime/v1alpha1/module.pulsar.go +++ b/api/cosmos/app/runtime/v1alpha1/module.pulsar.go @@ -248,6 +248,52 @@ func (x *_Module_6_list) IsValid() bool { return x.list != nil } +var _ protoreflect.List = (*_Module_11_list)(nil) + +type _Module_11_list struct { + list *[]string +} + +func (x *_Module_11_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Module_11_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Module_11_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Module_11_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Module_11_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Module at list field SkipStoreKeys as it is not of Message kind")) +} + +func (x *_Module_11_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Module_11_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Module_11_list) IsValid() bool { + return x.list != nil +} + var _ protoreflect.List = (*_Module_7_list)(nil) type _Module_7_list struct { @@ -440,6 +486,7 @@ var ( fd_Module_init_genesis protoreflect.FieldDescriptor fd_Module_export_genesis protoreflect.FieldDescriptor fd_Module_override_store_keys protoreflect.FieldDescriptor + fd_Module_skip_store_keys protoreflect.FieldDescriptor fd_Module_order_migrations protoreflect.FieldDescriptor fd_Module_precommiters protoreflect.FieldDescriptor fd_Module_prepare_check_staters protoreflect.FieldDescriptor @@ -455,6 +502,7 @@ func init() { fd_Module_init_genesis = md_Module.Fields().ByName("init_genesis") fd_Module_export_genesis = md_Module.Fields().ByName("export_genesis") fd_Module_override_store_keys = md_Module.Fields().ByName("override_store_keys") + fd_Module_skip_store_keys = md_Module.Fields().ByName("skip_store_keys") fd_Module_order_migrations = md_Module.Fields().ByName("order_migrations") fd_Module_precommiters = md_Module.Fields().ByName("precommiters") fd_Module_prepare_check_staters = md_Module.Fields().ByName("prepare_check_staters") @@ -562,6 +610,12 @@ func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, proto return } } + if len(x.SkipStoreKeys) != 0 { + value := protoreflect.ValueOfList(&_Module_11_list{list: &x.SkipStoreKeys}) + if !f(fd_Module_skip_store_keys, value) { + return + } + } if len(x.OrderMigrations) != 0 { value := protoreflect.ValueOfList(&_Module_7_list{list: &x.OrderMigrations}) if !f(fd_Module_order_migrations, value) { @@ -613,6 +667,8 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { return len(x.ExportGenesis) != 0 case "cosmos.app.runtime.v1alpha1.Module.override_store_keys": return len(x.OverrideStoreKeys) != 0 + case "cosmos.app.runtime.v1alpha1.Module.skip_store_keys": + return len(x.SkipStoreKeys) != 0 case "cosmos.app.runtime.v1alpha1.Module.order_migrations": return len(x.OrderMigrations) != 0 case "cosmos.app.runtime.v1alpha1.Module.precommiters": @@ -649,6 +705,8 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { x.ExportGenesis = nil case "cosmos.app.runtime.v1alpha1.Module.override_store_keys": x.OverrideStoreKeys = nil + case "cosmos.app.runtime.v1alpha1.Module.skip_store_keys": + x.SkipStoreKeys = nil case "cosmos.app.runtime.v1alpha1.Module.order_migrations": x.OrderMigrations = nil case "cosmos.app.runtime.v1alpha1.Module.precommiters": @@ -706,6 +764,12 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro } listValue := &_Module_6_list{list: &x.OverrideStoreKeys} return protoreflect.ValueOfList(listValue) + case "cosmos.app.runtime.v1alpha1.Module.skip_store_keys": + if len(x.SkipStoreKeys) == 0 { + return protoreflect.ValueOfList(&_Module_11_list{}) + } + listValue := &_Module_11_list{list: &x.SkipStoreKeys} + return protoreflect.ValueOfList(listValue) case "cosmos.app.runtime.v1alpha1.Module.order_migrations": if len(x.OrderMigrations) == 0 { return protoreflect.ValueOfList(&_Module_7_list{}) @@ -772,6 +836,10 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto lv := value.List() clv := lv.(*_Module_6_list) x.OverrideStoreKeys = *clv.list + case "cosmos.app.runtime.v1alpha1.Module.skip_store_keys": + lv := value.List() + clv := lv.(*_Module_11_list) + x.SkipStoreKeys = *clv.list case "cosmos.app.runtime.v1alpha1.Module.order_migrations": lv := value.List() clv := lv.(*_Module_7_list) @@ -838,6 +906,12 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore } value := &_Module_6_list{list: &x.OverrideStoreKeys} return protoreflect.ValueOfList(value) + case "cosmos.app.runtime.v1alpha1.Module.skip_store_keys": + if x.SkipStoreKeys == nil { + x.SkipStoreKeys = []string{} + } + value := &_Module_11_list{list: &x.SkipStoreKeys} + return protoreflect.ValueOfList(value) case "cosmos.app.runtime.v1alpha1.Module.order_migrations": if x.OrderMigrations == nil { x.OrderMigrations = []string{} @@ -894,6 +968,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor case "cosmos.app.runtime.v1alpha1.Module.override_store_keys": list := []*StoreKeyConfig{} return protoreflect.ValueOfList(&_Module_6_list{list: &list}) + case "cosmos.app.runtime.v1alpha1.Module.skip_store_keys": + list := []string{} + return protoreflect.ValueOfList(&_Module_11_list{list: &list}) case "cosmos.app.runtime.v1alpha1.Module.order_migrations": list := []string{} return protoreflect.ValueOfList(&_Module_7_list{list: &list}) @@ -1009,6 +1086,12 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } + if len(x.SkipStoreKeys) > 0 { + for _, s := range x.SkipStoreKeys { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } if len(x.OrderMigrations) > 0 { for _, s := range x.OrderMigrations { l = len(s) @@ -1062,6 +1145,15 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.SkipStoreKeys) > 0 { + for iNdEx := len(x.SkipStoreKeys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.SkipStoreKeys[iNdEx]) + copy(dAtA[i:], x.SkipStoreKeys[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SkipStoreKeys[iNdEx]))) + i-- + dAtA[i] = 0x5a + } + } if len(x.PreBlockers) > 0 { for iNdEx := len(x.PreBlockers) - 1; iNdEx >= 0; iNdEx-- { i -= len(x.PreBlockers[iNdEx]) @@ -1400,6 +1492,38 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex + case 11: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SkipStoreKeys", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SkipStoreKeys = append(x.SkipStoreKeys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex case 7: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OrderMigrations", wireType) @@ -2087,6 +2211,10 @@ type Module struct { // override_store_keys is an optional list of overrides for the module store keys // to be used in keeper construction. OverrideStoreKeys []*StoreKeyConfig `protobuf:"bytes,6,rep,name=override_store_keys,json=overrideStoreKeys,proto3" json:"override_store_keys,omitempty"` + // skip_store_keys is an optional list of store keys to skip when constructing the + // module's keeper. This is useful when a module does not have a store key. + // NOTE: the provided environment variable will have a fake store service. + SkipStoreKeys []string `protobuf:"bytes,11,rep,name=skip_store_keys,json=skipStoreKeys,proto3" json:"skip_store_keys,omitempty"` // order_migrations defines the order in which module migrations are performed. // If this is left empty, it uses the default migration order. // https://pkg.go.dev/github.com/cosmos/cosmos-sdk@v0.47.0-alpha2/types/module#DefaultMigrationsOrder @@ -2167,6 +2295,13 @@ func (x *Module) GetOverrideStoreKeys() []*StoreKeyConfig { return nil } +func (x *Module) GetSkipStoreKeys() []string { + if x != nil { + return x.SkipStoreKeys + } + return nil +} + func (x *Module) GetOrderMigrations() []string { if x != nil { return x.OrderMigrations @@ -2251,7 +2386,7 @@ var file_cosmos_app_runtime_v1alpha1_module_proto_rawDesc = []byte{ 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x03, 0x0a, 0x06, 0x4d, 0x6f, + 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7, 0x04, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x72, @@ -2269,43 +2404,45 @@ var file_cosmos_app_runtime_v1alpha1_module_proto_rawDesc = []byte{ 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x73, - 0x12, 0x29, 0x0a, 0x10, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x70, - 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x73, 0x12, - 0x32, 0x0a, 0x15, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, - 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x65, 0x72, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x3a, 0x43, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x3d, 0x0a, 0x24, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0x53, 0x0a, 0x0e, 0x53, - 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1f, 0x0a, - 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, - 0x0a, 0x0c, 0x6b, 0x76, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6b, 0x76, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, - 0x42, 0xfb, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x70, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, - 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, - 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x3b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x56, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, - 0x70, 0x70, 0x5c, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x70, - 0x5c, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x70, 0x3a, 0x3a, 0x52, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6b, + 0x65, 0x79, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6b, 0x69, 0x70, 0x53, + 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x72, 0x65, 0x70, 0x61, + 0x72, 0x65, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x72, 0x73, + 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, + 0x72, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x3a, 0x43, + 0xba, 0xc0, 0x96, 0xda, 0x01, 0x3d, 0x0a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x13, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x22, 0x53, 0x0a, 0x0e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x6b, 0x76, 0x5f, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6b, 0x76, + 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x42, 0xfb, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x52, 0xaa, + 0x02, 0x1b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x52, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x70, 0x5c, 0x52, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x70, 0x5c, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, + 0x41, 0x70, 0x70, 0x3a, 0x3a, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x3a, 0x3a, 0x56, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/app/runtime/v2/module.pulsar.go b/api/cosmos/app/runtime/v2/module.pulsar.go index e65b4cc69026..8c90f1df8917 100644 --- a/api/cosmos/app/runtime/v2/module.pulsar.go +++ b/api/cosmos/app/runtime/v2/module.pulsar.go @@ -386,6 +386,52 @@ func (x *_Module_10_list) IsValid() bool { return x.list != nil } +var _ protoreflect.List = (*_Module_11_list)(nil) + +type _Module_11_list struct { + list *[]string +} + +func (x *_Module_11_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Module_11_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Module_11_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Module_11_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Module_11_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Module at list field SkipStoreKeys as it is not of Message kind")) +} + +func (x *_Module_11_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Module_11_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Module_11_list) IsValid() bool { + return x.list != nil +} + var ( md_Module protoreflect.MessageDescriptor fd_Module_app_name protoreflect.FieldDescriptor @@ -398,6 +444,7 @@ var ( fd_Module_order_migrations protoreflect.FieldDescriptor fd_Module_gas_config protoreflect.FieldDescriptor fd_Module_override_store_keys protoreflect.FieldDescriptor + fd_Module_skip_store_keys protoreflect.FieldDescriptor ) func init() { @@ -413,6 +460,7 @@ func init() { fd_Module_order_migrations = md_Module.Fields().ByName("order_migrations") fd_Module_gas_config = md_Module.Fields().ByName("gas_config") fd_Module_override_store_keys = md_Module.Fields().ByName("override_store_keys") + fd_Module_skip_store_keys = md_Module.Fields().ByName("skip_store_keys") } var _ protoreflect.Message = (*fastReflection_Module)(nil) @@ -540,6 +588,12 @@ func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, proto return } } + if len(x.SkipStoreKeys) != 0 { + value := protoreflect.ValueOfList(&_Module_11_list{list: &x.SkipStoreKeys}) + if !f(fd_Module_skip_store_keys, value) { + return + } + } } // Has reports whether a field is populated. @@ -575,6 +629,8 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { return x.GasConfig != nil case "cosmos.app.runtime.v2.Module.override_store_keys": return len(x.OverrideStoreKeys) != 0 + case "cosmos.app.runtime.v2.Module.skip_store_keys": + return len(x.SkipStoreKeys) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.runtime.v2.Module")) @@ -611,6 +667,8 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { x.GasConfig = nil case "cosmos.app.runtime.v2.Module.override_store_keys": x.OverrideStoreKeys = nil + case "cosmos.app.runtime.v2.Module.skip_store_keys": + x.SkipStoreKeys = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.runtime.v2.Module")) @@ -681,6 +739,12 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro } listValue := &_Module_10_list{list: &x.OverrideStoreKeys} return protoreflect.ValueOfList(listValue) + case "cosmos.app.runtime.v2.Module.skip_store_keys": + if len(x.SkipStoreKeys) == 0 { + return protoreflect.ValueOfList(&_Module_11_list{}) + } + listValue := &_Module_11_list{list: &x.SkipStoreKeys} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.runtime.v2.Module")) @@ -737,6 +801,10 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto lv := value.List() clv := lv.(*_Module_10_list) x.OverrideStoreKeys = *clv.list + case "cosmos.app.runtime.v2.Module.skip_store_keys": + lv := value.List() + clv := lv.(*_Module_11_list) + x.SkipStoreKeys = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.runtime.v2.Module")) @@ -810,6 +878,12 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore } value := &_Module_10_list{list: &x.OverrideStoreKeys} return protoreflect.ValueOfList(value) + case "cosmos.app.runtime.v2.Module.skip_store_keys": + if x.SkipStoreKeys == nil { + x.SkipStoreKeys = []string{} + } + value := &_Module_11_list{list: &x.SkipStoreKeys} + return protoreflect.ValueOfList(value) case "cosmos.app.runtime.v2.Module.app_name": panic(fmt.Errorf("field app_name of message cosmos.app.runtime.v2.Module is not mutable")) default: @@ -854,6 +928,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor case "cosmos.app.runtime.v2.Module.override_store_keys": list := []*StoreKeyConfig{} return protoreflect.ValueOfList(&_Module_10_list{list: &list}) + case "cosmos.app.runtime.v2.Module.skip_store_keys": + list := []string{} + return protoreflect.ValueOfList(&_Module_11_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.app.runtime.v2.Module")) @@ -979,6 +1056,12 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } + if len(x.SkipStoreKeys) > 0 { + for _, s := range x.SkipStoreKeys { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1008,6 +1091,15 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.SkipStoreKeys) > 0 { + for iNdEx := len(x.SkipStoreKeys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.SkipStoreKeys[iNdEx]) + copy(dAtA[i:], x.SkipStoreKeys[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SkipStoreKeys[iNdEx]))) + i-- + dAtA[i] = 0x5a + } + } if len(x.OverrideStoreKeys) > 0 { for iNdEx := len(x.OverrideStoreKeys) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.OverrideStoreKeys[iNdEx]) @@ -1483,6 +1575,38 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex + case 11: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SkipStoreKeys", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SkipStoreKeys = append(x.SkipStoreKeys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2547,13 +2671,17 @@ type Module struct { // if it is specified. ExportGenesis []string `protobuf:"bytes,7,rep,name=export_genesis,json=exportGenesis,proto3" json:"export_genesis,omitempty"` // order_migrations defines the order in which module migrations are performed. - // If this is left empty, it uses the default migration order (alphabeticaly). + // If this is left empty, it uses the default migration order (alphabetically). OrderMigrations []string `protobuf:"bytes,8,rep,name=order_migrations,json=orderMigrations,proto3" json:"order_migrations,omitempty"` // GasConfig is the config object for gas limits. GasConfig *GasConfig `protobuf:"bytes,9,opt,name=gas_config,json=gasConfig,proto3" json:"gas_config,omitempty"` // override_store_keys is an optional list of overrides for the module store keys // to be used in keeper construction. OverrideStoreKeys []*StoreKeyConfig `protobuf:"bytes,10,rep,name=override_store_keys,json=overrideStoreKeys,proto3" json:"override_store_keys,omitempty"` + // skip_store_keys is an optional list of store keys to skip when constructing the + // module's keeper. This is useful when a module does not have a store key. + // NOTE: the provided environment variable will have a fake store service. + SkipStoreKeys []string `protobuf:"bytes,11,rep,name=skip_store_keys,json=skipStoreKeys,proto3" json:"skip_store_keys,omitempty"` } func (x *Module) Reset() { @@ -2646,6 +2774,13 @@ func (x *Module) GetOverrideStoreKeys() []*StoreKeyConfig { return nil } +func (x *Module) GetSkipStoreKeys() []string { + if x != nil { + return x.SkipStoreKeys + } + return nil +} + // GasConfig is the config object for gas limits. type GasConfig struct { state protoimpl.MessageState @@ -2753,7 +2888,7 @@ var file_cosmos_app_runtime_v2_module_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x32, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfa, 0x03, + 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x04, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, @@ -2782,39 +2917,41 @@ var file_cosmos_app_runtime_v2_module_proto_rawDesc = []byte{ 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, - 0x79, 0x73, 0x3a, 0x36, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x30, 0x0a, 0x17, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2f, 0x76, 0x32, 0x12, 0x15, 0x0a, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0x98, 0x01, 0x0a, 0x09, 0x47, - 0x61, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x31, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x78, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x54, 0x78, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x71, 0x75, 0x65, 0x72, 0x79, 0x47, 0x61, 0x73, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x12, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x61, 0x73, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x53, 0x0a, 0x0e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, - 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x6b, 0x76, 0x5f, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x6b, 0x76, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x42, 0xd1, 0x01, 0x0a, 0x19, 0x63, - 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, - 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x32, 0x3b, - 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x52, 0xaa, - 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x52, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x41, 0x70, 0x70, 0x5c, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5c, 0x56, 0x32, 0xe2, - 0x02, 0x21, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x70, 0x5c, 0x52, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, - 0x70, 0x3a, 0x3a, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6b, 0x69, + 0x70, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x3a, 0x36, 0xba, 0xc0, 0x96, 0xda, + 0x01, 0x30, 0x0a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x32, 0x12, 0x15, 0x0a, 0x13, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x22, 0x98, 0x01, 0x0a, 0x09, 0x47, 0x61, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x31, 0x0a, 0x15, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x78, 0x5f, + 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x78, 0x47, 0x61, 0x73, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x67, 0x61, 0x73, + 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x73, + 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x73, 0x69, 0x6d, 0x75, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x53, 0x0a, + 0x0e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x1f, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x20, 0x0a, 0x0c, 0x6b, 0x76, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6b, 0x76, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, + 0x65, 0x79, 0x42, 0xd1, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x32, + 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x32, 0x3b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x76, + 0x32, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x52, 0xaa, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x56, 0x32, 0xca, + 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x70, 0x5c, 0x52, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x21, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x41, 0x70, 0x70, 0x5c, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5c, 0x56, 0x32, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x70, 0x3a, 0x3a, 0x52, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/go.mod b/api/go.mod index b94641857d4f..d888181d5a1e 100644 --- a/api/go.mod +++ b/api/go.mod @@ -2,8 +2,6 @@ module cosmossdk.io/api go 1.21 -toolchain go1.22.1 - require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.1-20240312114316-c0d3497e35d6.1 github.com/cosmos/cosmos-proto v1.0.0-beta.5 diff --git a/go.work.example b/go.work.example index cb34d87ef59d..614d1e7d0629 100644 --- a/go.work.example +++ b/go.work.example @@ -1,7 +1,5 @@ go 1.22.2 -toolchain go1.22.2 - use ( . ./api diff --git a/proto/cosmos/app/runtime/v1alpha1/module.proto b/proto/cosmos/app/runtime/v1alpha1/module.proto index 6ada4d8ca136..516156dcb7d1 100644 --- a/proto/cosmos/app/runtime/v1alpha1/module.proto +++ b/proto/cosmos/app/runtime/v1alpha1/module.proto @@ -38,6 +38,11 @@ message Module { // to be used in keeper construction. repeated StoreKeyConfig override_store_keys = 6; + // skip_store_keys is an optional list of store keys to skip when constructing the + // module's keeper. This is useful when a module does not have a store key. + // NOTE: the provided environment variable will have a fake store service. + repeated string skip_store_keys = 11; + // order_migrations defines the order in which module migrations are performed. // If this is left empty, it uses the default migration order. // https://pkg.go.dev/github.com/cosmos/cosmos-sdk@v0.47.0-alpha2/types/module#DefaultMigrationsOrder diff --git a/proto/cosmos/app/runtime/v2/module.proto b/proto/cosmos/app/runtime/v2/module.proto index 4184f50565d9..dbc087e3b5cc 100644 --- a/proto/cosmos/app/runtime/v2/module.proto +++ b/proto/cosmos/app/runtime/v2/module.proto @@ -53,6 +53,11 @@ message Module { // override_store_keys is an optional list of overrides for the module store keys // to be used in keeper construction. repeated StoreKeyConfig override_store_keys = 10; + + // skip_store_keys is an optional list of store keys to skip when constructing the + // module's keeper. This is useful when a module does not have a store key. + // NOTE: the provided environment variable will have a fake store service. + repeated string skip_store_keys = 11; } // GasConfig is the config object for gas limits. diff --git a/runtime/module.go b/runtime/module.go index c7f369dbc975..18145b60f051 100644 --- a/runtime/module.go +++ b/runtime/module.go @@ -3,6 +3,7 @@ package runtime import ( "fmt" "os" + "slices" "github.com/cosmos/gogoproto/proto" "google.golang.org/protobuf/reflect/protodesc" @@ -192,6 +193,10 @@ func ProvideKVStoreKey( key depinject.ModuleKey, app *AppBuilder, ) *storetypes.KVStoreKey { + if slices.Contains(config.SkipStoreKeys, key.Name()) { + return nil + } + override := storeKeyOverride(config, key.Name()) var storeKeyName string @@ -206,13 +211,29 @@ func ProvideKVStoreKey( return storeKey } -func ProvideTransientStoreKey(key depinject.ModuleKey, app *AppBuilder) *storetypes.TransientStoreKey { +func ProvideTransientStoreKey( + config *runtimev1alpha1.Module, + key depinject.ModuleKey, + app *AppBuilder, +) *storetypes.TransientStoreKey { + if slices.Contains(config.SkipStoreKeys, key.Name()) { + return nil + } + storeKey := storetypes.NewTransientStoreKey(fmt.Sprintf("transient:%s", key.Name())) registerStoreKey(app, storeKey) return storeKey } -func ProvideMemoryStoreKey(key depinject.ModuleKey, app *AppBuilder) *storetypes.MemoryStoreKey { +func ProvideMemoryStoreKey( + config *runtimev1alpha1.Module, + key depinject.ModuleKey, + app *AppBuilder, +) *storetypes.MemoryStoreKey { + if slices.Contains(config.SkipStoreKeys, key.Name()) { + return nil + } + storeKey := storetypes.NewMemoryStoreKey(fmt.Sprintf("memory:%s", key.Name())) registerStoreKey(app, storeKey) return storeKey @@ -234,23 +255,39 @@ func ProvideEnvironment( msgServiceRouter *baseapp.MsgServiceRouter, queryServiceRouter *baseapp.GRPCQueryRouter, ) (store.KVStoreService, store.MemoryStoreService, appmodule.Environment) { - storeKey := ProvideKVStoreKey(config, key, app) - kvService := kvStoreService{key: storeKey} + var ( + kvService store.KVStoreService = failingStoreService{} + memKvService store.MemoryStoreService = failingStoreService{} + ) - memStoreKey := ProvideMemoryStoreKey(key, app) - memStoreService := memStoreService{key: memStoreKey} + // skips modules that have no store + if !slices.Contains(config.SkipStoreKeys, key.Name()) { + storeKey := ProvideKVStoreKey(config, key, app) + kvService = kvStoreService{key: storeKey} + + memStoreKey := ProvideMemoryStoreKey(config, key, app) + memKvService = memStoreService{key: memStoreKey} + } - return kvService, memStoreService, NewEnvironment( + return kvService, memKvService, NewEnvironment( kvService, logger.With(log.ModuleKey, fmt.Sprintf("x/%s", key.Name())), EnvWithMsgRouterService(msgServiceRouter), EnvWithQueryRouterService(queryServiceRouter), - EnvWithMemStoreService(memStoreService), + EnvWithMemStoreService(memKvService), ) } -func ProvideTransientStoreService(key depinject.ModuleKey, app *AppBuilder) store.TransientStoreService { - storeKey := ProvideTransientStoreKey(key, app) +func ProvideTransientStoreService( + config *runtimev1alpha1.Module, + key depinject.ModuleKey, + app *AppBuilder, +) store.TransientStoreService { + storeKey := ProvideTransientStoreKey(config, key, app) + if storeKey == nil { + return failingStoreService{} + } + return transientStoreService{key: storeKey} } diff --git a/runtime/store.go b/runtime/store.go index 5a5f21647bcf..817d9719a64a 100644 --- a/runtime/store.go +++ b/runtime/store.go @@ -48,6 +48,20 @@ func (t transientStoreService) OpenTransientStore(ctx context.Context) store.KVS return newKVStore(sdk.UnwrapSDKContext(ctx).KVStore(t.key)) } +type failingStoreService struct{} + +func (failingStoreService) OpenKVStore(ctx context.Context) store.KVStore { + panic("kv store service not available for this module: verify runtime `skip_store_keys` app config if not expected") +} + +func (failingStoreService) OpenMemoryStore(ctx context.Context) store.KVStore { + panic("memory kv store service not available for this module: verify runtime `skip_store_keys` app config if not expected") +} + +func (failingStoreService) OpenTransientStore(ctx context.Context) store.KVStore { + panic("transient kv store service not available for this module: verify runtime `skip_store_keys` app config if not expected") +} + // CoreKVStore is a wrapper of Core/Store kvstore interface // Remove after https://github.com/cosmos/cosmos-sdk/issues/14714 is closed type coreKVStore struct { diff --git a/runtime/v2/module.go b/runtime/v2/module.go index 15d0c290aea5..2fd62c304f89 100644 --- a/runtime/v2/module.go +++ b/runtime/v2/module.go @@ -3,6 +3,7 @@ package runtime import ( "fmt" "os" + "slices" "github.com/cosmos/gogoproto/proto" "google.golang.org/grpc" @@ -185,19 +186,28 @@ func ProvideEnvironment(logger log.Logger, config *runtimev2.Module, key depinje store.KVStoreService, store.MemoryStoreService, ) { - var kvStoreKey string - storeKeyOverride := storeKeyOverride(config, key.Name()) - if storeKeyOverride != nil { - kvStoreKey = storeKeyOverride.KvStoreKey - } else { - kvStoreKey = key.Name() - } - registerStoreKey(appBuilder, kvStoreKey) - kvService := stf.NewKVStoreService([]byte(kvStoreKey)) + var ( + kvService store.KVStoreService = failingStoreService{} + memKvService store.MemoryStoreService = failingStoreService{} + ) + + // skips modules that have no store + if !slices.Contains(config.SkipStoreKeys, key.Name()) { + var kvStoreKey string + storeKeyOverride := storeKeyOverride(config, key.Name()) + if storeKeyOverride != nil { + kvStoreKey = storeKeyOverride.KvStoreKey + } else { + kvStoreKey = key.Name() + } + + registerStoreKey(appBuilder, kvStoreKey) + kvService = stf.NewKVStoreService([]byte(kvStoreKey)) - memStoreKey := fmt.Sprintf("memory:%s", key.Name()) - registerStoreKey(appBuilder, memStoreKey) - memService := stf.NewMemoryStoreService([]byte(memStoreKey)) + memStoreKey := fmt.Sprintf("memory:%s", key.Name()) + registerStoreKey(appBuilder, memStoreKey) + memKvService = stf.NewMemoryStoreService([]byte(memStoreKey)) + } env := appmodulev2.Environment{ Logger: logger, @@ -209,10 +219,10 @@ func ProvideEnvironment(logger log.Logger, config *runtimev2.Module, key depinje MsgRouterService: stf.NewMsgRouterService(appBuilder.app.msgRouterBuilder), TransactionService: services.NewContextAwareTransactionService(), KVStoreService: kvService, - MemStoreService: memService, + MemStoreService: memKvService, } - return env, kvService, memService + return env, kvService, memKvService } func registerStoreKey(wrapper *AppBuilder, key string) { diff --git a/runtime/v2/stub.go b/runtime/v2/stub.go new file mode 100644 index 000000000000..48bedaf17c97 --- /dev/null +++ b/runtime/v2/stub.go @@ -0,0 +1,21 @@ +package runtime + +import ( + "context" + + "cosmossdk.io/core/store" +) + +type failingStoreService struct{} + +func (failingStoreService) OpenKVStore(ctx context.Context) store.KVStore { + panic("kv store service not available for this module: verify runtime `skip_store_keys` app config if not expected") +} + +func (failingStoreService) OpenMemoryStore(ctx context.Context) store.KVStore { + panic("memory kv store service not available for this module: verify runtime `skip_store_keys` app config if not expected") +} + +func (failingStoreService) OpenTransientStore(ctx context.Context) store.KVStore { + panic("transient kv store service not available for this module: verify runtime `skip_store_keys` app config if not expected") +} diff --git a/simapp/CHANGELOG.md b/simapp/CHANGELOG.md new file mode 100644 index 000000000000..4d0d22dad753 --- /dev/null +++ b/simapp/CHANGELOG.md @@ -0,0 +1,50 @@ + + +# Changelog + +`SimApp` is an application built using the Cosmos SDK for testing and educational purposes. +It won't be tagged or intented to be imported in an application. +This changelog is aimed to help developers understand the wiring changes between SDK versions. +It is an exautive list of changes that completes the SimApp section in the [UPGRADING.md](https://github.com/cosmos/cosmos-sdk/blob/main/UPGRADING.md#simapp) + +## v0.50 to v0.51 + +Always refer to the [UPGRADING.md](https://github.com/cosmos/cosmos-sdk/blob/main/UPGRADING.md) to understand the changes. + +* [#20409](https://github.com/cosmos/cosmos-sdk/pull/20409) Add `tx` as `SkipStoreKeys` in `app_config.go`. + + + +## v0.47 to v0.50 + +No changelog is provided for this migration. Please refer to the [UPGRADING.md](https://github.com/cosmos/cosmos-sdk/blob/main/UPGRADING.md#v050x) + +## v0.46 to v0.47 + +No changelog is provided for this migration. Please refer to the [UPGRADING.md](https://github.com/cosmos/cosmos-sdk/blob/main/UPGRADING.md#v047x) + +## v0.45 to v0.46 + +No changelog is provided for this migration. Please refer to the [UPGRADING.md](https://github.com/cosmos/cosmos-sdk/blob/main/UPGRADING.md#v046x) + diff --git a/simapp/app_config.go b/simapp/app_config.go index b899fbd7f2a6..f7f924825b05 100644 --- a/simapp/app_config.go +++ b/simapp/app_config.go @@ -170,6 +170,11 @@ var ( // ExportGenesis: []string{}, // Uncomment if you want to set a custom migration order here. // OrderMigrations: []string{}, + // SkipStoreKeys is an optional list of store keys to skip when constructing the + // module's keeper. This is useful when a module does not have a store key. + SkipStoreKeys: []string{ + "tx", + }, }), }, { From 4bd87cb09a871281a7677e521a15acfd513f2415 Mon Sep 17 00:00:00 2001 From: Emil Georgiev Date: Mon, 27 May 2024 16:48:33 +0300 Subject: [PATCH 18/18] test(types/tx/msgs.go): add unit tests (#20199) Co-authored-by: son trinh --- types/tx/msgs_test.go | 182 +++++++++++++++++++++++++++++++++++++++++ types/tx/types_test.go | 88 +++++++++++--------- 2 files changed, 230 insertions(+), 40 deletions(-) create mode 100644 types/tx/msgs_test.go diff --git a/types/tx/msgs_test.go b/types/tx/msgs_test.go new file mode 100644 index 000000000000..4765f82d7acf --- /dev/null +++ b/types/tx/msgs_test.go @@ -0,0 +1,182 @@ +package tx_test + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx" +) + +func Test_SetMsg(t *testing.T) { + cases := map[string]struct { + msg sdk.Msg + msgTypeURL string + expErr bool + }{ + "Set nil Msg": { + msg: nil, + expErr: true, + }, + "Set empty message": { + msg: &DummyProtoMessage1{}, + msgTypeURL: "/dummy.proto.message1", + expErr: false, + }, + "Set a valid message": { + msg: &DummyProtoMessage1{Name: "some-name"}, + msgTypeURL: "/dummy.proto.message1", + expErr: false, + }, + } + + for name, tc := range cases { + t.Run(name, func(t *testing.T) { + actual, err := tx.SetMsg(tc.msg) + if tc.expErr { + require.Error(t, err) + return + } + require.NoError(t, err) + + b, err := json.Marshal(tc.msg) + require.NoError(t, err) + + require.Equal(t, tc.msgTypeURL, actual.TypeUrl) + require.Equal(t, b, actual.GetValue()) + require.Equal(t, tc.msg, actual.GetCachedValue()) + }) + } +} + +func Test_SetMsgs(t *testing.T) { + cases := map[string]struct { + msgs []sdk.Msg + msgTypeURL []string + expErr bool + }{ + "Set nil slice of messages": { + msgs: nil, + expErr: false, + }, + "Set empty slice of messages": { + msgs: []sdk.Msg{}, + expErr: false, + }, + "Set nil message inside the slice of messages": { + msgs: []sdk.Msg{nil}, + expErr: true, + }, + "Set valid messages": { + msgs: []sdk.Msg{&DummyProtoMessage1{Name: "name1"}, &DummyProtoMessage2{}}, + msgTypeURL: []string{"/dummy.proto.message1", "/dummy.proto.message2"}, + expErr: false, + }, + } + + for name, tc := range cases { + t.Run(name, func(t *testing.T) { + actual, err := tx.SetMsgs(tc.msgs) + if tc.expErr { + require.Error(t, err) + return + } + require.NoError(t, err) + require.Equal(t, len(tc.msgs), len(actual)) + + for i, msg := range tc.msgs { + b, err := json.Marshal(msg) + require.NoError(t, err) + + require.Equal(t, msg, actual[i].GetCachedValue()) + require.Equal(t, tc.msgTypeURL[i], actual[i].GetTypeUrl()) + require.Equal(t, b, actual[i].GetValue()) + } + }) + } +} + +func Test_GetMsgs(t *testing.T) { + sdkMsgs := []sdk.Msg{&DummyProtoMessage1{}, &DummyProtoMessage2{}} + anyMsg, err := tx.SetMsgs(sdkMsgs) + require.NoError(t, err) + + cases := map[string]struct { + msgs []*types.Any + expected []sdk.Msg + expErr bool + }{ + "GetMsgs from a nil slice of Any messages": { + msgs: nil, + expected: []sdk.Msg{}, + expErr: false, + }, + "GetMsgs from empty slice of Any messages": { + msgs: []*types.Any{}, + expected: []sdk.Msg{}, + expErr: false, + }, + "GetMsgs from a slice with valid Any messages": { + msgs: anyMsg, + expected: sdkMsgs, + expErr: false, + }, + "GetMsgs from a slice that contains uncached Any message": { + msgs: []*types.Any{{}}, + expErr: true, + }, + } + + for name, tc := range cases { + t.Run(name, func(t *testing.T) { + actual, err := tx.GetMsgs(tc.msgs, "dummy") + if tc.expErr { + require.Error(t, err) + return + } + + require.NoError(t, err) + require.Equal(t, tc.expected, actual) + }) + } +} + +func TestTx_UnpackInterfaces(t *testing.T) { + unpacker := codec.NewProtoCodec(types.NewInterfaceRegistry()) + sdkMsgs := []sdk.Msg{&DummyProtoMessage1{}, &DummyProtoMessage2{}} + anyMsg, err := tx.SetMsgs(sdkMsgs) + require.NoError(t, err) + + cases := map[string]struct { + msgs []*types.Any + expErr bool + }{ + "Unpack nil slice messages": { + msgs: nil, + expErr: false, + }, + "Unpack empty slice of messages": { + msgs: []*types.Any{}, + expErr: false, + }, + "Unpack valid messages": { + msgs: anyMsg, + expErr: false, + }, + "Unpack uncashed message": { + msgs: []*types.Any{{TypeUrl: "uncached"}}, + expErr: true, + }, + } + + for name, tc := range cases { + t.Run(name, func(t *testing.T) { + err = tx.UnpackInterfaces(unpacker, tc.msgs) + require.Equal(t, tc.expErr, err != nil) + }) + } +} diff --git a/types/tx/types_test.go b/types/tx/types_test.go index 14b6274f2786..f417b36cc7bd 100644 --- a/types/tx/types_test.go +++ b/types/tx/types_test.go @@ -1,7 +1,8 @@ -package tx +package tx_test import ( "encoding/hex" + "encoding/json" "testing" "github.com/cosmos/gogoproto/proto" @@ -15,6 +16,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec/address" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx" ) func TestTx_GetMsgs(t *testing.T) { @@ -56,8 +58,8 @@ func TestTx_GetMsgs(t *testing.T) { for _, tc := range cases { t.Run(tc.name, func(t *testing.T) { - transaction := Tx{ - Body: &TxBody{ + transaction := tx.Tx{ + Body: &tx.TxBody{ Messages: tc.msgs, }, } @@ -77,7 +79,7 @@ func TestTx_GetMsgs(t *testing.T) { func TestTx_ValidateBasic(t *testing.T) { cases := []struct { name string - transaction *Tx + transaction *tx.Tx expErr bool }{ { @@ -87,46 +89,46 @@ func TestTx_ValidateBasic(t *testing.T) { }, { name: "Tx without body", - transaction: &Tx{}, + transaction: &tx.Tx{}, expErr: true, }, { name: "Tx without AuthInfo", - transaction: &Tx{Body: &TxBody{}}, + transaction: &tx.Tx{Body: &tx.TxBody{}}, expErr: true, }, { name: "Tx without Fee", - transaction: &Tx{Body: &TxBody{}, AuthInfo: &AuthInfo{}}, + transaction: &tx.Tx{Body: &tx.TxBody{}, AuthInfo: &tx.AuthInfo{}}, expErr: true, }, { name: "Tx with gas limit greater than Max gas wanted", - transaction: &Tx{Body: &TxBody{}, AuthInfo: &AuthInfo{Fee: &Fee{GasLimit: MaxGasWanted + 1}}}, + transaction: &tx.Tx{Body: &tx.TxBody{}, AuthInfo: &tx.AuthInfo{Fee: &tx.Fee{GasLimit: tx.MaxGasWanted + 1}}}, expErr: true, }, { name: "Tx without Fee Amount", - transaction: &Tx{Body: &TxBody{}, AuthInfo: &AuthInfo{Fee: &Fee{GasLimit: MaxGasWanted}}}, + transaction: &tx.Tx{Body: &tx.TxBody{}, AuthInfo: &tx.AuthInfo{Fee: &tx.Fee{GasLimit: tx.MaxGasWanted}}}, expErr: true, }, { name: "Tx with negative Fee Amount", - transaction: &Tx{ - Body: &TxBody{}, - AuthInfo: &AuthInfo{ - Fee: &Fee{GasLimit: MaxGasWanted, Amount: sdk.Coins{sdk.Coin{Amount: math.NewInt(-1)}}}, + transaction: &tx.Tx{ + Body: &tx.TxBody{}, + AuthInfo: &tx.AuthInfo{ + Fee: &tx.Fee{GasLimit: tx.MaxGasWanted, Amount: sdk.Coins{sdk.Coin{Amount: math.NewInt(-1)}}}, }, }, expErr: true, }, { name: "Tx with invalid fee payer address", - transaction: &Tx{ - Body: &TxBody{}, - AuthInfo: &AuthInfo{ - Fee: &Fee{ - GasLimit: MaxGasWanted, + transaction: &tx.Tx{ + Body: &tx.TxBody{}, + AuthInfo: &tx.AuthInfo{ + Fee: &tx.Fee{ + GasLimit: tx.MaxGasWanted, Payer: "invalidPayerAddress", Amount: sdk.Coins{sdk.NewCoin("aaa", math.NewInt(10))}, }, @@ -136,11 +138,11 @@ func TestTx_ValidateBasic(t *testing.T) { }, { name: "Tx without signature", - transaction: &Tx{ - Body: &TxBody{}, - AuthInfo: &AuthInfo{ - Fee: &Fee{ - GasLimit: MaxGasWanted, + transaction: &tx.Tx{ + Body: &tx.TxBody{}, + AuthInfo: &tx.AuthInfo{ + Fee: &tx.Fee{ + GasLimit: tx.MaxGasWanted, Payer: "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs", Amount: sdk.Coins{sdk.NewCoin("aaa", math.NewInt(11))}, }, @@ -150,11 +152,11 @@ func TestTx_ValidateBasic(t *testing.T) { }, { name: "Tx is valid", - transaction: &Tx{ - Body: &TxBody{}, - AuthInfo: &AuthInfo{ - Fee: &Fee{ - GasLimit: MaxGasWanted, + transaction: &tx.Tx{ + Body: &tx.TxBody{}, + AuthInfo: &tx.AuthInfo{ + Fee: &tx.Fee{ + GasLimit: tx.MaxGasWanted, Payer: "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs", Amount: sdk.Coins{sdk.NewCoin("aaa", math.NewInt(11))}, }, @@ -174,11 +176,11 @@ func TestTx_ValidateBasic(t *testing.T) { } func TestTx_GetSigners(t *testing.T) { - transaction := &Tx{ - Body: &TxBody{}, - AuthInfo: &AuthInfo{ - Fee: &Fee{ - GasLimit: MaxGasWanted, + transaction := &tx.Tx{ + Body: &tx.TxBody{}, + AuthInfo: &tx.AuthInfo{ + Fee: &tx.Fee{ + GasLimit: tx.MaxGasWanted, Payer: "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs", Amount: sdk.Coins{sdk.NewCoin("aaa", math.NewInt(11))}, }, @@ -206,17 +208,23 @@ func TestTx_GetSigners(t *testing.T) { require.Nil(t, err) } -type DummyProtoMessage1 struct{} +type DummyProtoMessage1 struct { + Name string +} -func (d *DummyProtoMessage1) Reset() {} -func (d *DummyProtoMessage1) String() string { return "/dummy.proto.message1" } -func (d *DummyProtoMessage1) ProtoMessage() {} +func (d *DummyProtoMessage1) Reset() {} +func (d *DummyProtoMessage1) String() string { return "/dummy.proto.message1" } +func (d *DummyProtoMessage1) ProtoMessage() {} +func (d *DummyProtoMessage1) Marshal() ([]byte, error) { return json.Marshal(d) } +func (d *DummyProtoMessage1) XXX_MessageName() string { return "dummy.proto.message1" } type DummyProtoMessage2 struct{} -func (d *DummyProtoMessage2) Reset() {} -func (d *DummyProtoMessage2) String() string { return "/dummy.proto.message2" } -func (d *DummyProtoMessage2) ProtoMessage() {} +func (d *DummyProtoMessage2) Reset() {} +func (d *DummyProtoMessage2) String() string { return "/dummy.proto.message2" } +func (d *DummyProtoMessage2) ProtoMessage() {} +func (d *DummyProtoMessage2) Marshal() ([]byte, error) { return json.Marshal(d) } +func (d *DummyProtoMessage2) XXX_MessageName() string { return "dummy.proto.message2" } type dummyAddressCodec struct{}