diff --git a/app/ante.go b/app/ante.go index b08501f66..38545be30 100644 --- a/app/ante.go +++ b/app/ante.go @@ -5,8 +5,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" - ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante" - "github.com/cosmos/ibc-go/v8/modules/core/keeper" + ibcante "github.com/cosmos/ibc-go/v9/modules/core/ante" + "github.com/cosmos/ibc-go/v9/modules/core/keeper" nfttypes "github.com/crypto-org-chain/chain-main/v4/x/nft-transfer/types" ) diff --git a/app/app.go b/app/app.go index 98d0bdd91..9aa6aee26 100644 --- a/app/app.go +++ b/app/app.go @@ -103,34 +103,30 @@ import ( stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/ibc-go/modules/capability" - capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" - capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" - // ibc-go imports - ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" - icacontroller "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller" - icacontrollerkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/keeper" - icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" - icahost "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host" - icahostkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/keeper" - icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" - ibcfee "github.com/cosmos/ibc-go/v8/modules/apps/29-fee" - ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper" - ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types" - transfer "github.com/cosmos/ibc-go/v8/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v8/modules/core" - ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" - ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" - porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" - ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" - ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" - solom "github.com/cosmos/ibc-go/v8/modules/light-clients/06-solomachine" - ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" + ica "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts" + icacontroller "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller" + icacontrollerkeeper "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/keeper" + icacontrollertypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/types" + icahost "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/host" + icahostkeeper "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/host/keeper" + icahosttypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/types" + ibcfee "github.com/cosmos/ibc-go/v9/modules/apps/29-fee" + ibcfeekeeper "github.com/cosmos/ibc-go/v9/modules/apps/29-fee/keeper" + ibcfeetypes "github.com/cosmos/ibc-go/v9/modules/apps/29-fee/types" + transfer "github.com/cosmos/ibc-go/v9/modules/apps/transfer" + ibctransferkeeper "github.com/cosmos/ibc-go/v9/modules/apps/transfer/keeper" + ibctransfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v9/modules/core" + ibcclienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" + ibcconnectiontypes "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types" + porttypes "github.com/cosmos/ibc-go/v9/modules/core/05-port/types" + ibcexported "github.com/cosmos/ibc-go/v9/modules/core/exported" + ibckeeper "github.com/cosmos/ibc-go/v9/modules/core/keeper" + solom "github.com/cosmos/ibc-go/v9/modules/light-clients/06-solomachine" + ibctm "github.com/cosmos/ibc-go/v9/modules/light-clients/07-tendermint" // chain-main imports @@ -219,7 +215,6 @@ type ChainApp struct { // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper - CapabilityKeeper *capabilitykeeper.Keeper StakingKeeper *stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper MintKeeper mintkeeper.Keeper @@ -242,14 +237,6 @@ type ChainApp struct { SupplyKeeper supplykeeper.Keeper NFTKeeper nftkeeper.Keeper - // make scoped keepers public for test purposes - ScopedIBCKeeper capabilitykeeper.ScopedKeeper - ScopedTransferKeeper capabilitykeeper.ScopedKeeper - ScopedNFTTransferKeeper capabilitykeeper.ScopedKeeper - ScopedIBCFeeKeeper capabilitykeeper.ScopedKeeper - ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper - ScopedICAHostKeeper capabilitykeeper.ScopedKeeper - // the module manager ModuleManager *module.Manager BasicModuleManager module.BasicManager @@ -334,15 +321,6 @@ func New( ) bApp.SetParamStore(app.ConsensusParamsKeeper.ParamsStore) - // add capability keeper and ScopeToModule for ibc module - app.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey]) - scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibcexported.ModuleName) - scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) - scopedNFTTransferKeeper := app.CapabilityKeeper.ScopeToModule(nfttransfertypes.ModuleName) - scopedICAControllerKeeper := app.CapabilityKeeper.ScopeToModule(icacontrollertypes.SubModuleName) - scopedICAHostKeeper := app.CapabilityKeeper.ScopeToModule(icahosttypes.SubModuleName) - app.CapabilityKeeper.Seal() - // add keepers app.AccountKeeper = authkeeper.NewAccountKeeper( appCodec, @@ -431,11 +409,9 @@ func New( // Create IBC Keeper app.IBCKeeper = ibckeeper.NewKeeper( appCodec, - keys[ibcexported.StoreKey], + runtime.NewKVStoreService(keys[ibcexported.StoreKey]), app.GetSubspace(ibcexported.ModuleName), - app.StakingKeeper, app.UpgradeKeeper, - scopedIBCKeeper, authAddr, ) // register the proposal types @@ -464,18 +440,18 @@ func New( // IBC Fee Module keeper app.IBCFeeKeeper = ibcfeekeeper.NewKeeper( - appCodec, keys[ibcfeetypes.StoreKey], + appCodec, runtime.NewKVStoreService(keys[ibcfeetypes.StoreKey]), app.IBCKeeper.ChannelKeeper, // more middlewares can be added in future app.IBCKeeper.ChannelKeeper, - app.IBCKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper, + app.AccountKeeper, app.BankKeeper, ) // Create Transfer Keepers app.TransferKeeper = ibctransferkeeper.NewKeeper( - appCodec, keys[ibctransfertypes.StoreKey], app.GetSubspace(ibctransfertypes.ModuleName), + appCodec, runtime.NewKVStoreService(keys[ibctransfertypes.StoreKey]), app.GetSubspace(ibctransfertypes.ModuleName), app.IBCFeeKeeper, // ISC4 Wrapper: fee IBC middleware - app.IBCKeeper.ChannelKeeper, app.IBCKeeper.PortKeeper, - app.AccountKeeper, app.BankKeeper, scopedTransferKeeper, + app.IBCKeeper.ChannelKeeper, + app.AccountKeeper, app.BankKeeper, authAddr, ) transferModule := transfer.NewAppModule(app.TransferKeeper) @@ -490,10 +466,8 @@ func New( keys[nfttransfertypes.StoreKey], app.IBCFeeKeeper, app.IBCKeeper.ChannelKeeper, - app.IBCKeeper.PortKeeper, app.NFTKeeper, app.AccountKeeper, - scopedNFTTransferKeeper, ) var nftTransferStack porttypes.IBCModule @@ -501,24 +475,24 @@ func New( nftTransferStack = ibcfee.NewIBCMiddleware(nftTransferStack, app.IBCFeeKeeper) app.ICAControllerKeeper = icacontrollerkeeper.NewKeeper( - appCodec, keys[icacontrollertypes.StoreKey], app.GetSubspace(icacontrollertypes.SubModuleName), + appCodec, runtime.NewKVStoreService(keys[icacontrollertypes.StoreKey]), app.GetSubspace(icacontrollertypes.SubModuleName), app.IBCFeeKeeper, // ISC4 Wrapper: fee IBC middleware - app.IBCKeeper.ChannelKeeper, app.IBCKeeper.PortKeeper, - scopedICAControllerKeeper, app.MsgServiceRouter(), + app.IBCKeeper.ChannelKeeper, + app.MsgServiceRouter(), authAddr, ) app.ICAHostKeeper = icahostkeeper.NewKeeper( - appCodec, keys[icahosttypes.StoreKey], app.GetSubspace(icahosttypes.SubModuleName), + appCodec, runtime.NewKVStoreService(keys[icahosttypes.StoreKey]), app.GetSubspace(icahosttypes.SubModuleName), app.IBCFeeKeeper, // ISC4 Wrapper: fee IBC middleware - app.IBCKeeper.ChannelKeeper, app.IBCKeeper.PortKeeper, - app.AccountKeeper, scopedICAHostKeeper, app.MsgServiceRouter(), + app.IBCKeeper.ChannelKeeper, + app.AccountKeeper, app.MsgServiceRouter(), + app.GRPCQueryRouter(), authAddr, ) - app.ICAHostKeeper.WithQueryRouter(app.GRPCQueryRouter()) icaModule := ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper) var icaControllerStack porttypes.IBCModule - icaControllerStack = icacontroller.NewIBCMiddleware(nil, app.ICAControllerKeeper) + icaControllerStack = icacontroller.NewIBCMiddleware(app.ICAControllerKeeper) icaControllerStack = ibcfee.NewIBCMiddleware(icaControllerStack, app.IBCFeeKeeper) var icaHostStack porttypes.IBCModule @@ -530,8 +504,16 @@ func New( ibcRouter.AddRoute(icacontrollertypes.SubModuleName, icaControllerStack) ibcRouter.AddRoute(icahosttypes.SubModuleName, icaHostStack) ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferStack) - ibcRouter.AddRoute(nfttransfertypes.ModuleName, nftTransferStack) + ibcRouter.AddRoute(nfttransfertypes.PortID, nftTransferStack) app.IBCKeeper.SetRouter(ibcRouter) + clientKeeper := app.IBCKeeper.ClientKeeper + storeProvider := clientKeeper.GetStoreProvider() + + tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider) + clientKeeper.AddRoute(ibctm.ModuleName, &tmLightClientModule) + + smLightClientModule := solom.NewLightClientModule(appCodec, storeProvider) + clientKeeper.AddRoute(solom.ModuleName, &smLightClientModule) // create evidence keeper with router evidenceKeeper := evidencekeeper.NewKeeper( @@ -554,7 +536,6 @@ func New( auth.NewAppModule(appCodec, app.AccountKeeper, nil, app.GetSubspace(authtypes.ModuleName)), vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)), - capability.NewAppModule(appCodec, *app.CapabilityKeeper, false), feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)), mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil, app.GetSubspace(minttypes.ModuleName)), @@ -572,8 +553,9 @@ func New( upgrade.NewAppModule(&app.UpgradeKeeper, app.AccountKeeper.AddressCodec()), evidence.NewAppModule(app.EvidenceKeeper), ibc.NewAppModule(app.IBCKeeper), - ibctm.AppModule{}, - solom.AppModule{}, + // IBC light clients + ibctm.NewAppModule(tmLightClientModule), + solom.NewAppModule(smLightClientModule), params.NewAppModule(app.ParamsKeeper), authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), groupmodule.NewAppModule(appCodec, app.GroupKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), @@ -609,7 +591,6 @@ func New( // NOTE: staking module is required if HistoricalEntries param > 0 app.ModuleManager.SetOrderBeginBlockers( upgradetypes.ModuleName, - capabilitytypes.ModuleName, minttypes.ModuleName, distrtypes.ModuleName, slashingtypes.ModuleName, @@ -639,7 +620,6 @@ func New( stakingtypes.ModuleName, ibcexported.ModuleName, ibctransfertypes.ModuleName, - capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, @@ -668,7 +648,6 @@ func New( // so that other modules that want to create or claim capabilities afterwards in InitChain // can do so safely. app.ModuleManager.SetOrderInitGenesis( - capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, @@ -788,11 +767,6 @@ func New( } } - app.ScopedIBCKeeper = scopedIBCKeeper - app.ScopedTransferKeeper = scopedTransferKeeper - app.ScopedICAControllerKeeper = scopedICAControllerKeeper - app.ScopedICAHostKeeper = scopedICAHostKeeper - return app } @@ -1053,7 +1027,6 @@ func StoreKeys() ( ibctransfertypes.StoreKey, icacontrollertypes.StoreKey, icahosttypes.StoreKey, - capabilitytypes.StoreKey, authzkeeper.StoreKey, nfttransfertypes.StoreKey, group.StoreKey, @@ -1065,7 +1038,7 @@ func StoreKeys() ( } keys := storetypes.NewKVStoreKeys(storeKeys...) tkeys := storetypes.NewTransientStoreKeys(paramstypes.TStoreKey) - memKeys := storetypes.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) + memKeys := storetypes.NewMemoryStoreKeys() return keys, memKeys, tkeys } diff --git a/go.mod b/go.mod index 9560c0b0e..7bde80579 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/crypto-org-chain/chain-main/v4 -go 1.22.11 - -toolchain go1.23.4 +go 1.23.6 require ( cosmossdk.io/api v0.7.6 @@ -23,7 +21,8 @@ require ( github.com/cosmos/cosmos-sdk v0.50.11 github.com/cosmos/gogoproto v1.7.0 github.com/cosmos/ibc-go/modules/capability v1.0.1 - github.com/cosmos/ibc-go/v8 v8.5.1 + // release/v10.0.x + github.com/cosmos/ibc-go/v9 v9.0.0-20250211202654-9c448bbbe4ab github.com/cosmos/rosetta v0.50.3-1 github.com/crypto-org-chain/cronos/store v0.0.5-0.20240716081818-7f581a697f6d github.com/crypto-org-chain/cronos/versiondb v0.0.0-20240716081818-7f581a697f6d @@ -32,7 +31,7 @@ require ( github.com/google/renameio v1.0.0 github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/hashicorp/go-metrics v0.5.3 + github.com/hashicorp/go-metrics v0.5.3 // indirect github.com/imdario/mergo v0.3.13 github.com/linxGnu/grocksdb v1.9.2 github.com/spf13/cast v1.7.0 @@ -56,21 +55,22 @@ require ( cosmossdk.io/x/nft v0.1.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect - github.com/99designs/keyring v1.2.1 // indirect - github.com/DataDog/datadog-go v3.2.0+incompatible // indirect + github.com/99designs/keyring v1.2.2 // indirect + github.com/DataDog/datadog-go v4.8.3+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect github.com/alitto/pond v1.8.3 // indirect github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect - github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/bits-and-blooms/bitset v1.8.0 // indirect - github.com/cenkalti/backoff/v4 v4.1.3 // indirect + github.com/bgentry/speakeasy v0.2.0 // indirect + github.com/bits-and-blooms/bitset v1.13.0 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/cockroachdb/errors v1.11.3 // indirect - github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect + github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/pebble v1.1.2 // indirect github.com/cockroachdb/redact v1.1.5 // indirect @@ -88,19 +88,20 @@ require ( github.com/creachadair/atomicfile v0.3.1 // indirect github.com/creachadair/tomledit v0.0.24 // indirect github.com/crypto-org-chain/cronos/memiavl v0.0.5-0.20231225065237-42f2597fca49 // indirect - github.com/danieljoos/wincred v1.1.2 // indirect + github.com/danieljoos/wincred v1.2.1 // 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/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect + github.com/desertbit/timer v1.0.1 // indirect github.com/dgraph-io/badger/v4 v4.2.0 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/dvsekhvalnov/jose2go v1.7.0 // indirect github.com/emicklei/dot v1.6.2 // indirect - github.com/fatih/color v1.15.0 // indirect + github.com/ethereum/go-ethereum v1.14.12 // indirect + github.com/fatih/color v1.17.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/getsentry/sentry-go v0.27.0 // indirect + github.com/getsentry/sentry-go v0.28.1 // indirect github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect @@ -111,9 +112,9 @@ require ( github.com/golang/glog v1.2.4 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.3 // indirect - github.com/google/flatbuffers v1.12.1 // indirect + github.com/google/flatbuffers v24.3.25+incompatible // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/s2a-go v0.1.7 // indirect @@ -126,16 +127,17 @@ require ( github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.5 // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-plugin v1.5.2 // indirect + github.com/hashicorp/go-plugin v1.6.1 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect - github.com/hdevalence/ed25519consensus v0.1.0 // indirect + github.com/hdevalence/ed25519consensus v0.2.0 // indirect + github.com/holiman/uint256 v1.3.1 // indirect github.com/huandu/skiplist v1.2.0 // indirect github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect @@ -171,7 +173,7 @@ require ( github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/cors v1.11.1 // indirect github.com/rs/zerolog v1.33.0 // indirect - github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/locafero v0.6.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.5 // indirect github.com/sourcegraph/conc v0.3.0 // indirect @@ -190,7 +192,7 @@ require ( github.com/zbiljic/go-filelock v0.0.0-20170914061330-1dbf7103ab7d // indirect github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v0.14.3 // indirect - go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect + go.etcd.io/bbolt v1.4.0-alpha.1 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect @@ -215,7 +217,7 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect - nhooyr.io/websocket v1.8.6 // indirect + nhooyr.io/websocket v1.8.11 // indirect pgregory.net/rapid v1.1.0 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index dd3500a79..28be2c9aa 100644 --- a/go.sum +++ b/go.sum @@ -240,14 +240,15 @@ github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg6 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q= +github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= @@ -304,10 +305,10 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= -github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= -github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bgentry/speakeasy v0.2.0 h1:tgObeVOf8WAvtuAX6DhJ4xks4CFNwPDZiqzGqIHE51E= +github.com/bgentry/speakeasy v0.2.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE= +github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= @@ -336,15 +337,14 @@ github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtE github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA= github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -353,7 +353,6 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= @@ -385,8 +384,8 @@ github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaY github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= -github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= -github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= +github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a h1:f52TdbU4D5nozMAhO9TvTJ2ZMCXtN4VIAmfrrZ0JXQ4= +github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/pebble v1.1.2 h1:CUh2IPtR4swHlEj48Rhfzw6l/d0qA31fItcIszQVIsA= @@ -434,8 +433,8 @@ github.com/cosmos/iavl v1.2.2 h1:qHhKW3I70w+04g5KdsdVSHRbFLgt3yY3qTMd4Xa4rC8= github.com/cosmos/iavl v1.2.2/go.mod h1:GiM43q0pB+uG53mLxLDzimxM9l/5N9UuSY3/D0huuVw= github.com/cosmos/ibc-go/modules/capability v1.0.1 h1:ibwhrpJ3SftEEZRxCRkH0fQZ9svjthrX2+oXdZvzgGI= github.com/cosmos/ibc-go/modules/capability v1.0.1/go.mod h1:rquyOV262nGJplkumH+/LeYs04P3eV8oB7ZM4Ygqk4E= -github.com/cosmos/ibc-go/v8 v8.5.1 h1:3JleEMKBjRKa3FeTKt4fjg22za/qygLBo7mDkoYTNBs= -github.com/cosmos/ibc-go/v8 v8.5.1/go.mod h1:P5hkAvq0Qbg0h18uLxDVA9q1kOJ0l36htMsskiNwXbo= +github.com/cosmos/ibc-go/v9 v9.0.0-20250211202654-9c448bbbe4ab h1:4qepclVwT4h+ZdC8N8MN5tPMxW+nFR2mx2kq+hptUHE= +github.com/cosmos/ibc-go/v9 v9.0.0-20250211202654-9c448bbbe4ab/go.mod h1:XKfMHj8MFcNSmDBVqsIPpoeWeCgcqkaW730aqCi7Bjc= github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= @@ -462,8 +461,8 @@ github.com/crypto-org-chain/cronos/store v0.0.5-0.20241028093154-0f94930c27ce/go github.com/crypto-org-chain/cronos/versiondb v0.0.0-20241028093154-0f94930c27ce h1:d2TZ+oXM6+qpQhM0800lUKrK5p/BmcDXUi1/Xo2LIho= github.com/crypto-org-chain/cronos/versiondb v0.0.0-20241028093154-0f94930c27ce/go.mod h1:Y1uyFhZn/8jZkZfr3W/alzrO3DfcfWPuA3UwCM0Ah0g= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= -github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= -github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= +github.com/danieljoos/wincred v1.2.1 h1:dl9cBrupW8+r5250DYkYxocLeZ1Y4vB1kxgtjxw8GQs= +github.com/danieljoos/wincred v1.2.1/go.mod h1:uGaFL9fDn3OLTvzCGulzE+SzjEe5NGlh5FdCcyfPwps= github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -480,8 +479,9 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3 github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= -github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= +github.com/desertbit/timer v1.0.1 h1:yRpYNn5Vaaj6QXecdLMPMJsW81JLiI1eokUft5nBmeo= +github.com/desertbit/timer v1.0.1/go.mod h1:htRrYeY5V/t4iu1xCJ5XsQvp4xve8QulXXctAzxqcwE= github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= github.com/dgraph-io/badger/v4 v4.2.0 h1:kJrlajbXXL9DFTNuhhu9yCx7JJa4qpYWxtE8BzuWsEs= github.com/dgraph-io/badger/v4 v4.2.0/go.mod h1:qfCqhPoWDFJRx1gp5QwwyGo8xk1lbHUxvK9nK0OGAak= @@ -508,8 +508,8 @@ github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:Htrtb github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= -github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9TzqvtQZPo= +github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= @@ -529,10 +529,12 @@ github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go. github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= +github.com/ethereum/go-ethereum v1.14.12 h1:8hl57x77HSUo+cXExrURjU/w1VhL+ShCTJrTwcCQSe4= +github.com/ethereum/go-ethereum v1.14.12/go.mod h1:RAC2gVMWJ6FkxSPESfbshrcKpIokgQKsVKmAuqdekDY= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= @@ -550,12 +552,10 @@ github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyT github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= -github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/getsentry/sentry-go v0.28.1 h1:zzaSm/vHmGllRM6Tpx1492r0YDzauArdBfkJRtY6P5k= +github.com/getsentry/sentry-go v0.28.1/go.mod h1:1fQZ+7l7eeJ3wYi82q5Hg8GqAPgefRq+FP/QhafYVgg= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8= github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k= github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= @@ -587,23 +587,16 @@ github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dT github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA= github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= @@ -664,16 +657,17 @@ 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.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/flatbuffers v1.12.1 h1:MVlul7pQNoDzWRLTw5imwYsl+usrS1TXG2H4jg6ImGw= -github.com/google/flatbuffers v1.12.1/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/flatbuffers v24.3.25+incompatible h1:CX395cjN9Kke9mmalRoL3d81AtFUxJM+yDthflgJGkI= +github.com/google/flatbuffers v24.3.25+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -784,8 +778,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-getter v1.7.5 h1:dT58k9hQ/vbxNMwoI5+xFYAJuv6152UNvdHokfI5wE4= github.com/hashicorp/go-getter v1.7.5/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -793,8 +787,8 @@ github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYS github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= -github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= +github.com/hashicorp/go-plugin v1.6.1 h1:P7MR2UP6gNKGPp+y7EZw2kOiq4IR9WiqLvp0XOsVdwI= +github.com/hashicorp/go-plugin v1.6.1/go.mod h1:XPHFku2tFo3o3QKFgSYo+cghcUhw1NA1hZyMK0PWAw0= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= @@ -824,10 +818,12 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= -github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= -github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= +github.com/hdevalence/ed25519consensus v0.2.0 h1:37ICyZqdyj0lAZ8P4D1d1id3HqbbG1N3iBb1Tb4rdcU= +github.com/hdevalence/ed25519consensus v0.2.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= +github.com/holiman/uint256 v1.3.1 h1:JfTzmih28bittyHM8z360dCjIA9dbPIBlcTI6lmctQs= +github.com/holiman/uint256 v1.3.1/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= @@ -880,7 +876,6 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= @@ -903,9 +898,7 @@ github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8 github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= -github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5 h1:2U0HzY8BJ8hVwDKIzp7y4voR9CX/nvcfymLmg2UiOio= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= @@ -928,7 +921,6 @@ github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/ledgerwatch/erigon-lib v0.0.0-20230210071639-db0e7ed11263 h1:LGEzZvf33Y1NhuP5+jI/ni9l1TFS6oYPDilgy74NusM= github.com/ledgerwatch/erigon-lib v0.0.0-20230210071639-db0e7ed11263/go.mod h1:OXgMDuUo2lZ3NpH29ZvMYbk+LxFd5ffDl2Z2mGMuY/I= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= @@ -994,11 +986,9 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= @@ -1022,8 +1012,8 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= 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/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= +github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= @@ -1152,8 +1142,8 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR 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= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= -github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/locafero v0.6.0 h1:ON7AQg37yzcRPU69mt7gwhFEBwxI6P9T4Qu3N51bwOk= +github.com/sagikazarmark/locafero v0.6.0/go.mod h1:77OmuIc6VTraTXKXIs/uvUxKGUXjE1GbemJYHqdNjX0= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= @@ -1249,14 +1239,11 @@ github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITn github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.2.9/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= -github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= -github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -1286,8 +1273,8 @@ github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWp github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 h1:qxen9oVGzDdIRP6ejyAJc760RwW4SnVDiTYTzwnXuxo= -go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5/go.mod h1:eW0HG9/oHQhvRCvb1/pIXW4cOvtDqeQK+XSi3TnwaXY= +go.etcd.io/bbolt v1.4.0-alpha.1 h1:3yrqQzbRRPFPdOMWS/QQIVxVnzSkAZQYeWlZFv1kbj4= +go.etcd.io/bbolt v1.4.0-alpha.1/go.mod h1:S/Z/Nm3iuOnyO1W4XuFfPci51Gj6F1Hv0z8hisyYYOw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1330,7 +1317,6 @@ go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1398,8 +1384,6 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= -golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1588,7 +1572,6 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1718,8 +1701,6 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= -golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2018,8 +1999,9 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +nhooyr.io/websocket v1.8.11 h1:f/qXNc2/3DpoSZkHt1DQu6rj4zGC8JmkkLkWss0MgN0= +nhooyr.io/websocket v1.8.11/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/gomod2nix.toml b/gomod2nix.toml index 6c6c3640a..1ed8bbb6e 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -81,11 +81,14 @@ schema = 3 hash = "sha256-emQlH+RQpESoFCzpHS38fEhs1SLjotxNPlRK4B5Aybs=" replaced = "github.com/cosmos/keyring" [mod."github.com/DataDog/datadog-go"] - version = "v3.2.0+incompatible" - hash = "sha256-/cwjihaTjcbW0c7Y/0At44JCKFhrbC/zZTwbEyi1CtU=" + version = "v4.8.3+incompatible" + hash = "sha256-9KvlVQdgyJ1ulDa6wkLb0ACdjc+R0U91hdb7nxodrA0=" [mod."github.com/DataDog/zstd"] version = "v1.5.5" hash = "sha256-tSw0aq0pPyroZtQYYb9lWOtPVNaQOt8skYQ4TMXGvAQ=" + [mod."github.com/Microsoft/go-winio"] + version = "v0.6.2" + hash = "sha256-tVNWDUMILZbJvarcl/E7tpSnkn7urqgSHa2Eaka5vSU=" [mod."github.com/alitto/pond"] version = "v1.8.3" hash = "sha256-Iaiw4a8Up0tB2iu8xdmXKHwXBGWBBGnqMGfZYWNc1ng=" @@ -99,14 +102,14 @@ schema = 3 version = "v0.0.0-20140422174119-9fd32a8b3d3d" hash = "sha256-NDxQzO5C5M/aDz5/pjUHfZUh4VwIXovbb3irtxWCwjY=" [mod."github.com/bgentry/speakeasy"] - version = "v0.1.1-0.20220910012023-760eaf8b6816" + version = "v0.2.0" hash = "sha256-Tx3sPuhsoVwrCfJdIwf4ipn7pD92OQNYvpCxl1Z9Wt0=" [mod."github.com/bits-and-blooms/bitset"] - version = "v1.8.0" - hash = "sha256-ySle5MJXSGMHJa1HSf/ZMDTYXdow9ct7JXth4k5Po50=" + version = "v1.13.0" + hash = "sha256-1jccFEH9In72Jt3wSn4vi4/MJd/UDfDrC9DlmsGVc9o=" [mod."github.com/cenkalti/backoff/v4"] - version = "v4.1.3" - hash = "sha256-u6MEDopHoTWAZoVvvXOKnAg++xre53YgQx0gmf6t2KU=" + version = "v4.3.0" + hash = "sha256-wfVjNZsGG1WoNC5aL+kdcy6QXPgZo4THAevZ1787md8=" [mod."github.com/cespare/xxhash/v2"] version = "v2.3.0" hash = "sha256-7hRlwSR+fos1kx4VZmJ/7snR7zHh8ZFKX+qqqqGcQpY=" @@ -120,8 +123,8 @@ schema = 3 version = "v1.11.3" hash = "sha256-kDiT0MVVRnnQ0ugZWVHcZmv3UgwnxEW6xzt+mV22dTI=" [mod."github.com/cockroachdb/fifo"] - version = "v0.0.0-20240606204812-0bbfbd93a7ce" - hash = "sha256-M/9/e4i7gXA2kYjSEMlQd94vijLLmWZVUXOKiFeINbk=" + version = "v0.0.0-20240616162244-4768e80dfb9a" + hash = "sha256-1SXf9xOjxzr9bHpKPUSnRS0Ek+zxMEFAuqpOchyLAbo=" [mod."github.com/cockroachdb/logtags"] version = "v0.0.0-20230118201751-21c54148d20b" hash = "sha256-7dQH6j1o99fuxHKkw0RhNC5wJKkvRLMDJpUiVnDx6h8=" @@ -170,9 +173,9 @@ schema = 3 [mod."github.com/cosmos/ibc-go/modules/capability"] version = "v1.0.1" hash = "sha256-iRhj2WTr99DgAl80h25pxtkO6iHYjyHflwpxKKG5b6E=" - [mod."github.com/cosmos/ibc-go/v8"] - version = "v8.5.1" - hash = "sha256-F4VZbKo1n9fLSxLSR+/ZaisbJ2v+EHjpXVpCovGTiyQ=" + [mod."github.com/cosmos/ibc-go/v9"] + version = "v9.0.0-20250211202654-9c448bbbe4ab" + hash = "sha256-JuxfeIvkQuYFZP0kvQzp6ldSkt8/qSiBuSJ01iVaS1M=" [mod."github.com/cosmos/ics23/go"] version = "v0.11.0" hash = "sha256-mgU/pqp4kASmW/bP0z6PzssfjRp7GU9ioyvNlDdGC+E=" @@ -204,8 +207,8 @@ schema = 3 hash = "sha256-dVXYagl8K+JMrIt6dqcoQTjUwwMCqrMmAfpIZimWlyE=" replaced = "github.com/crypto-org-chain/cronos/versiondb" [mod."github.com/danieljoos/wincred"] - version = "v1.1.2" - hash = "sha256-Nnklfg12vmWCOhELGyoRqEF4w4srp0WbPwreaChYLKs=" + version = "v1.2.1" + hash = "sha256-hmJediHYMONMEvrRnMs88OXEp4SDt1Pmi8t8eOEk83o=" [mod."github.com/davecgh/go-spew"] version = "v1.1.2-0.20180830191138-d8f796af33cc" hash = "sha256-fV9oI51xjHdOmEx6+dlq7Ku2Ag+m/bmbzPo6A4Y74qc=" @@ -213,8 +216,8 @@ schema = 3 version = "v4.3.0" hash = "sha256-ADbhI5Ad+q3OxooIiYeLAq5mMONk1gPIAnTch9zKsIM=" [mod."github.com/desertbit/timer"] - version = "v0.0.0-20180107155436-c41aec40b27f" - hash = "sha256-abLOtEcomAqCWLphd2X6WkD/ED764w6sa6unox4BXss=" + version = "v1.0.1" + hash = "sha256-Uk1Ep6lHLGEadcSF/2R9Bk6zwc5OUbTf/WCHrPatWEM=" [mod."github.com/dgraph-io/badger/v4"] version = "v4.2.0" hash = "sha256-hsNONsIJIYmMzjTXdNxjheL2Zz3Z86J8Uxj2r0el/DY=" @@ -225,14 +228,17 @@ schema = 3 version = "v1.0.1" hash = "sha256-yuvxYYngpfVkUg9yAmG99IUVmADTQA0tMbBXe0Fq0Mc=" [mod."github.com/dvsekhvalnov/jose2go"] - version = "v1.6.0" - hash = "sha256-IXn2BuUp4fi/i2zf1tGGW1m9xoYh3VCksB6GJ5Sf06g=" + version = "v1.7.0" + hash = "sha256-kBuUrroBiwDTaO7JGo5bh6nEMNkICSjg2dFZQMGM7Q0=" [mod."github.com/emicklei/dot"] version = "v1.6.2" hash = "sha256-X7aNKLKZ7pJBG/wdP+TWuQnlNLNdbUDd+kC5kF4uBtU=" + [mod."github.com/ethereum/go-ethereum"] + version = "v1.14.12" + hash = "sha256-GZWvZcQXAg3EoVTvf+W60g9boa5MOsEfFHw1ZVl0reE=" [mod."github.com/fatih/color"] - version = "v1.15.0" - hash = "sha256-7b+scFVQeEUoXfeCDd8X2gS8GMoWA+HxjK8wfbypa5s=" + version = "v1.17.0" + hash = "sha256-QsKMy3MsvjbYNcA9jP8w6c3wpmWDZ0079bybAEzmXR0=" [mod."github.com/felixge/httpsnoop"] version = "v1.0.4" hash = "sha256-c1JKoRSndwwOyOxq9ddCe+8qn7mG9uRq2o/822x5O/c=" @@ -240,8 +246,8 @@ schema = 3 version = "v1.7.0" hash = "sha256-MdT2rQyQHspPJcx6n9ozkLbsktIOJutOqDuKpNAtoZY=" [mod."github.com/getsentry/sentry-go"] - version = "v0.27.0" - hash = "sha256-PTkTzVNogqFA/5rc6INLY6RxK5uR1AoJFOO+pOPdE7Q=" + version = "v0.28.1" + hash = "sha256-IR3xr8/XLKEnkpXUD470sjQVhI59Fsq74+Q4i/jcMh4=" [mod."github.com/go-kit/kit"] version = "v0.13.0" hash = "sha256-EncDzq0JVtY+NLlW5lD+nbVewNYTTrfzlOxI4PuwREw=" @@ -279,14 +285,14 @@ schema = 3 version = "v1.5.4" hash = "sha256-N3+Lv9lEZjrdOWdQhFj6Y3Iap4rVLEQeI8/eFFyAMZ0=" [mod."github.com/golang/snappy"] - version = "v0.0.4" - hash = "sha256-Umx+5xHAQCN/Gi4HbtMhnDCSPFAXSsjVbXd8n5LhjAA=" + version = "v0.0.5-0.20220116011046-fa5810519dcb" + hash = "sha256-4GVLPBwJIXYFJU+Uvoa/sb5VHea7yJhwE7feABa7ucs=" [mod."github.com/google/btree"] version = "v1.1.3" hash = "sha256-/6Us2eNRFi2IIp7p5uPUXLridilAdk4SmZhcTYR0csw=" [mod."github.com/google/flatbuffers"] - version = "v1.12.1" - hash = "sha256-v9/ewAmNdQ4SNBlBwgHkxn3IVJAf31D7zVlxwEK/LRs=" + version = "v24.3.25+incompatible" + hash = "sha256-b96yDt5Agzf8/VYrueYjuwvHE7cD8J1H/gVavQH+BRI=" [mod."github.com/google/go-cmp"] version = "v0.6.0" hash = "sha256-qgra5jze4iPGP0JSTVeY5qV5AvEnEu39LYAuUCIkMtg=" @@ -333,8 +339,8 @@ schema = 3 version = "v1.7.5" hash = "sha256-oXUvMoee8GT69MA0E2JHxYm1Q2q8BtmwlfxFshDKXmI=" [mod."github.com/hashicorp/go-hclog"] - version = "v1.5.0" - hash = "sha256-u3Jqg7Qex11IZ7vbk4hRGgLy6e0cF70CCx7ERF0GUHo=" + version = "v1.6.3" + hash = "sha256-BK2s+SH1tQyUaXCH4kC0/jgqiSu638UFbwamfKjFOYg=" [mod."github.com/hashicorp/go-immutable-radix"] version = "v1.3.1" hash = "sha256-65+A2HiVfS/GV9G+6/TkXXjzXhI/V98e6RlJWjxy+mg=" @@ -342,8 +348,8 @@ schema = 3 version = "v0.5.3" hash = "sha256-5jQftEvEhL88yWeVnu+IZKzV5p9osZcgFmwP1zlrjzY=" [mod."github.com/hashicorp/go-plugin"] - version = "v1.5.2" - hash = "sha256-bdBT9TyHUJkUogQZWj0waniVv/Qauy/iKEbegyK2HZA=" + version = "v1.6.1" + hash = "sha256-HEeJ8TV67PcAuUnGCOHphFpZ/BShvJo5B6Obu3P7t8M=" [mod."github.com/hashicorp/go-safetemp"] version = "v1.0.0" hash = "sha256-g5i9m7FSRInQzZ4iRpIsoUu685AY7fppUwjhuZCezT8=" @@ -363,8 +369,11 @@ schema = 3 version = "v0.1.1" hash = "sha256-jr4ZFM3XHSwGoZcRcmmdGTq4IqxBTnimojIPDgK0USU=" [mod."github.com/hdevalence/ed25519consensus"] - version = "v0.1.0" - hash = "sha256-MkqFWnyXt653RaJQUMWWxcW6NCskIxou8VEfj+8vd3Y=" + version = "v0.2.0" + hash = "sha256-KTbeKMOT/HCJjDHqyciQjJPPgpNk6H0VyQCCbeGgs7Y=" + [mod."github.com/holiman/uint256"] + version = "v1.3.1" + hash = "sha256-Mx2kd5H0sph6Nq8hI55nEn31saXvmg3df7hb/t8bHrQ=" [mod."github.com/huandu/skiplist"] version = "v1.2.0" hash = "sha256-/r4QP1SldMlhpkr1ZQFHImSYaeMZEtqBW7R53yN+JtQ=" @@ -477,8 +486,8 @@ schema = 3 version = "v1.33.0" hash = "sha256-jT/Y/izhZiCdrDbC/ty83FGs8UQavTU+OW03O4vKFkY=" [mod."github.com/sagikazarmark/locafero"] - version = "v0.4.0" - hash = "sha256-7I1Oatc7GAaHgAqBFO6Tv4IbzFiYeU9bJAfJhXuWaXk=" + version = "v0.6.0" + hash = "sha256-uAanQ7NRa13axM4zbOgMOyU+YhLALsQyT85XvqEdx2c=" [mod."github.com/sagikazarmark/slog-shim"] version = "v0.1.0" hash = "sha256-F92BQXXmn3mCwu3mBaGh+joTRItQDSDhsjU6SofkYdA=" @@ -547,8 +556,8 @@ schema = 3 version = "v0.14.3" hash = "sha256-tldEok5ebZ4R4B7H8dSlYS5oVuLvh89n9wUaVlDjYwg=" [mod."go.etcd.io/bbolt"] - version = "v1.4.0-alpha.0.0.20240404170359-43604f3112c5" - hash = "sha256-U/PkBhk4m6iKFDuR0ULO4EFXb8gFnKNGgNnwMU0OGoM=" + version = "v1.4.0-alpha.1" + hash = "sha256-CHCzkBBaVVcfjB2sKmvDFMGgx2YF3/aDpPFuqvbKIk0=" [mod."go.opencensus.io"] version = "v0.24.0" hash = "sha256-4H+mGZgG2c9I1y0m8avF4qmt8LUKxxVsTqR8mKgP4yo=" @@ -628,8 +637,8 @@ schema = 3 version = "v3.5.1" hash = "sha256-ps2GEc3P2xvlrU4TCtXz+nLTxyP0RrF7SScz5jUqE5E=" [mod."nhooyr.io/websocket"] - version = "v1.8.6" - hash = "sha256-DyaiCc/1iELrl6JSpz6WYMtFwUiSCOSoNF8IhSyP1ag=" + version = "v1.8.11" + hash = "sha256-93w5LmnBRdoPwo4gDoPBcAw9J14yzf484YeAyUX7nH0=" [mod."pgregory.net/rapid"] version = "v1.1.0" hash = "sha256-sVQY9EQ9Y5blYyVYfaOa+y12e+399OqdHiEY3BaDnqo=" diff --git a/integration_tests/cosmoscli.py b/integration_tests/cosmoscli.py index ac42d9567..c65ccf62c 100644 --- a/integration_tests/cosmoscli.py +++ b/integration_tests/cosmoscli.py @@ -1,6 +1,8 @@ +import hashlib import json import tempfile +import durations import requests from pystarport import cluster, cosmoscli @@ -309,6 +311,55 @@ def query_params(self, mod): res = res.get("params") or res return res + def ica_submit_tx( + self, + connid, + tx, + timeout_duration="1h", + event_query_tx=True, + **kwargs, + ): + default_kwargs = { + "home": self.data_dir, + "node": self.node_rpc, + "chain_id": self.chain_id, + "keyring_backend": "test", + } + args = ["ica", "controller", "send-tx"] + + duration_args = [] + if timeout_duration: + timeout = int(durations.Duration(timeout_duration).to_seconds() * 1e9) + duration_args = ["--packet-timeout-timestamp", timeout] + + rsp = json.loads( + self.raw( + "tx", + *args, + connid, + tx, + *duration_args, + "-y", + **(default_kwargs | kwargs), + ) + ) + if rsp["code"] == 0 and event_query_tx: + rsp = self.event_query_tx_for(rsp["txhash"]) + return rsp + + def ibc_denom_trace(self, path, node): + denom_hash = hashlib.sha256(path.encode()).hexdigest().upper() + return json.loads( + self.raw( + "q", + "ibc-transfer", + "denom", + denom_hash, + node=node, + output="json", + ) + )["denom"] + class ClusterCLI(cluster.ClusterCLI): def __init__(self, *args, **kwargs): diff --git a/integration_tests/ibc_utils.py b/integration_tests/ibc_utils.py index 2f41c5d3b..8ee71e85d 100644 --- a/integration_tests/ibc_utils.py +++ b/integration_tests/ibc_utils.py @@ -128,12 +128,17 @@ def check_balance_change(): raw( "query", "ibc-transfer", - "denom-trace", + "denom", denom_hash, node=cluster["ibc-1"].node_rpc(0), output="json", ) - ) == {"denom_trace": {"path": f"transfer/{dst_channel}", "base_denom": denom}} + ) == { + "denom": { + "base": denom, + "trace": [{"port_id": "transfer", "channel_id": dst_channel}], + } + } # transfer back rsp = cluster["ibc-1"].ibc_transfer( @@ -236,7 +241,10 @@ def check_fee(): path = f"transfer/{dst_channel}/{base_denom}" denom_hash = hashlib.sha256(path.encode()).hexdigest().upper() denom_trace = chains[0].ibc_denom_trace(path, cluster["ibc-1"].node_rpc(0)) - assert denom_trace == {"path": f"transfer/{dst_channel}", "base_denom": base_denom} + assert denom_trace == { + "base": base_denom, + "trace": [{"port_id": "transfer", "channel_id": dst_channel}], + } current = chains[1].balances(receiver) assert current == [ diff --git a/integration_tests/shell.nix b/integration_tests/shell.nix index fedc22462..fd9c78178 100644 --- a/integration_tests/shell.nix +++ b/integration_tests/shell.nix @@ -10,7 +10,7 @@ pkgs.mkShell { # lint tools test-env - nixfmt + nixfmt-rfc-style lint-ci # tools diff --git a/integration_tests/test_nft_transfer.py b/integration_tests/test_nft_transfer.py index e75f51251..bd6835903 100644 --- a/integration_tests/test_nft_transfer.py +++ b/integration_tests/test_nft_transfer.py @@ -485,6 +485,22 @@ def test_nft_transfer(cluster): # Test packet timeout # transfer nft on mid chain (with very less timeout so that the packet times out) + rsp = json.loads( + cli_src.raw( + "q", + "ibc", + "client", + "consensus-state-heights", + "07-tendermint-0", + home=cli_src.data_dir, + node=cli_src.node_rpc, + output="json", + ) + )["consensus_state_heights"] + latest = sorted(rsp, key=lambda x: int(x["revision_height"]), reverse=True)[0] + packet_timeout_height = ( + latest["revision_number"] + "-" + str(int(latest["revision_height"]) + 1) + ) rsp = json.loads( cli_src.raw( "tx", @@ -496,7 +512,9 @@ def test_nft_transfer(cluster): denomid, tokenid, "-y", - packet_timeout_height="0-1", + "--absolute-timeouts", + packet_timeout_height=packet_timeout_height, + packet_timeout_timestamp=time.time_ns(), home=cli_src.data_dir, from_=addr_src, keyring_backend="test", diff --git a/nix/build_overlay.nix b/nix/build_overlay.nix index 640374bf2..0e9b0c7c9 100644 --- a/nix/build_overlay.nix +++ b/nix/build_overlay.nix @@ -10,10 +10,10 @@ let in { go_1_23 = super.go_1_23.overrideAttrs (old: rec { - version = "1.23.4"; + version = "1.23.6"; src = final.fetchurl { url = "https://go.dev/dl/go${version}.src.tar.gz"; - hash = "sha256-rTRaxCHpCBQpOpaZzKGd1SOCUcP2h5gLvK4oSVsmNTE="; + hash = "sha256-A5xbBOZSedrO7opvcecL0Fz1uAF4K293xuGeLtBREiI="; }; # https://github.com/NixOS/nixpkgs/pull/372367 patches = replaceLast ./go_no_vendor_checks-1.23.patch old.patches; diff --git a/nix/solomachine.nix b/nix/solomachine.nix index 250aac198..2c07a7a21 100644 --- a/nix/solomachine.nix +++ b/nix/solomachine.nix @@ -12,13 +12,13 @@ rustPlatform.buildRustPackage rec { version = "0.1.4"; src = fetchFromGitHub { - owner = "crypto-com"; + owner = "yihuang"; repo = pname; - rev = "v${version}"; - sha256 = "sha256-+jfRbPm31/pBuseUS89cuYSAPw2l/509MVTaUcuyaGY="; + rev = "d34c17e6f79ae1fbb6d02f25ec55ceef426854fd"; + hash = "sha256-fxH2gGVCYe1GAGwNJXeAf1QBZftNCuWG4TCJSiV/mCs="; }; - cargoSha256 = "sha256-9Mx70yBoNy711PFC5y2VoXD3kqmcMvDsjP9AaC1VfCM="; + cargoHash = "sha256-9Mx70yBoNy711PFC5y2VoXD3kqmcMvDsjP9AaC1VfCM="; cargoBuildFlags = "-p solo-machine -p mnemonic-signer"; nativeBuildInputs = [ protobuf diff --git a/pytest.ini b/pytest.ini index 92e0d8525..b4cc35d0b 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,2 +1,3 @@ [pytest] testpaths = integration_tests +python_files = python_files = integration_tests/*.py integration_tests/**/*.py \ No newline at end of file diff --git a/third_party/ibc-go b/third_party/ibc-go index 91169d134..9c448bbbe 160000 --- a/third_party/ibc-go +++ b/third_party/ibc-go @@ -1 +1 @@ -Subproject commit 91169d134d659b87acaf4903652cdcb1a55f5657 +Subproject commit 9c448bbbe4ab031c66bfcc371dc8c47374b62f52 diff --git a/x/chainmain/client/cli/query.go b/x/chainmain/client/cli/query.go index 2d77c1147..83aa61ec0 100644 --- a/x/chainmain/client/cli/query.go +++ b/x/chainmain/client/cli/query.go @@ -15,7 +15,7 @@ import ( authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - ibctypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + ibctypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types" "github.com/crypto-org-chain/chain-main/v4/config" "github.com/crypto-org-chain/chain-main/v4/x/chainmain/types" ) diff --git a/x/chainmain/keeper/keeper.go b/x/chainmain/keeper/keeper.go index 01ef97a16..a4a1c520e 100644 --- a/x/chainmain/keeper/keeper.go +++ b/x/chainmain/keeper/keeper.go @@ -1,6 +1,7 @@ package keeper import ( + "context" "fmt" "cosmossdk.io/log" @@ -30,6 +31,7 @@ func NewKeeper(cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey) *Kee } // Logger returns a module-specific logger. -func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) +func (k Keeper) Logger(ctx context.Context) log.Logger { + sdkCtx := sdk.UnwrapSDKContext(ctx) + return sdkCtx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) } diff --git a/x/nft-transfer/client/cli/tx.go b/x/nft-transfer/client/cli/tx.go index 694eca66d..78d237fdc 100644 --- a/x/nft-transfer/client/cli/tx.go +++ b/x/nft-transfer/client/cli/tx.go @@ -12,8 +12,7 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/spf13/cobra" - clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" - channelutils "github.com/cosmos/ibc-go/v8/modules/core/04-channel/client/utils" + clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" "github.com/crypto-org-chain/chain-main/v4/x/nft-transfer/types" ) @@ -71,38 +70,24 @@ corresponding to the counterparty channel. Any timeout set to 0 is disabled.`), return err } - // if the timeouts are not absolute, retrieve latest block height and block timestamp - // for the consensus state connected to the destination port/channel + // NOTE: relative timeouts using block height are not supported. + // if the timeouts are not absolute, CLI users rely solely on local clock time in order to calculate relative timestamps. if !absoluteTimeouts { - consensusState, height, _, err := channelutils.QueryLatestConsensusState(clientCtx, srcPort, srcChannel) - if err != nil { - return err + if !timeoutHeight.IsZero() { + return errors.New("relative timeouts using block height is not supported") } - if !timeoutHeight.IsZero() { - absoluteHeight := height - absoluteHeight.RevisionNumber += timeoutHeight.RevisionNumber - absoluteHeight.RevisionHeight += timeoutHeight.RevisionHeight - timeoutHeight = absoluteHeight + if timeoutTimestamp == 0 { + return errors.New("relative timeouts must provide a non zero value timestamp") } - if timeoutTimestamp != 0 { - // use local clock time as reference time if it is later than the - // consensus state timestamp of the counter party chain, otherwise - // still use consensus state timestamp as reference - now := time.Now().UnixNano() - consensusStateTimestamp := consensusState.GetTimestamp() - if now > 0 { - now := uint64(now) - if now > consensusStateTimestamp { - timeoutTimestamp = now + timeoutTimestamp - } else { - timeoutTimestamp = consensusStateTimestamp + timeoutTimestamp - } - } else { - return errors.New("local clock time is not greater than Jan 1st, 1970 12:00 AM") - } + // use local clock time as reference time for calculating timeout timestamp. + now := time.Now().UnixNano() + if now <= 0 { + return errors.New("local clock time is not greater than Jan 1st, 1970 12:00 AM") } + + timeoutTimestamp = uint64(now) + timeoutTimestamp } msg := types.NewMsgTransfer( @@ -112,7 +97,7 @@ corresponding to the counterparty channel. Any timeout set to 0 is disabled.`), }, } - cmd.Flags().String(flagPacketTimeoutHeight, types.DefaultRelativePacketTimeoutHeight, "Packet timeout block height. The timeout is disabled when set to 0-0.") + cmd.Flags().String(flagPacketTimeoutHeight, "0-0", "Packet timeout block height. The timeout is disabled when set to 0-0.") cmd.Flags().Uint64(flagPacketTimeoutTimestamp, types.DefaultRelativePacketTimeoutTimestamp, "Packet timeout timestamp in nanoseconds from now. Default is 10 minutes. The timeout is disabled when set to 0.") cmd.Flags().Bool(flagAbsoluteTimeouts, false, "Timeout flags are used as absolute timeouts.") flags.AddTxFlagsToCmd(cmd) diff --git a/x/nft-transfer/ibc_module.go b/x/nft-transfer/ibc_module.go index ce6d7264d..16bad5f81 100644 --- a/x/nft-transfer/ibc_module.go +++ b/x/nft-transfer/ibc_module.go @@ -1,6 +1,7 @@ package nfttransfer import ( + "context" "fmt" "math" "strings" @@ -9,12 +10,10 @@ import ( newsdkerrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" - porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" - host "github.com/cosmos/ibc-go/v8/modules/core/24-host" - ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" + channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" + porttypes "github.com/cosmos/ibc-go/v9/modules/core/05-port/types" + ibcexported "github.com/cosmos/ibc-go/v9/modules/core/exported" "github.com/crypto-org-chain/chain-main/v4/x/nft-transfer/keeper" "github.com/crypto-org-chain/chain-main/v4/x/nft-transfer/types" ) @@ -37,7 +36,7 @@ func NewIBCModule(k keeper.Keeper) IBCModule { // channel must be UNORDERED, use the correct port (by default 'nft'), and use the current // supported version. Only 2^32 channels are allowed to be created. func ValidateTransferChannelParams( - ctx sdk.Context, + ctx context.Context, keeper keeper.Keeper, order channeltypes.Order, portID string, @@ -57,7 +56,7 @@ func ValidateTransferChannelParams( } // Require portID is the portID transfer module is bound to - boundPort := keeper.GetPort(ctx) + boundPort := types.PortID if boundPort != portID { return newsdkerrors.Wrapf(porttypes.ErrInvalidPort, "invalid port: %s, expected %s", portID, boundPort) } @@ -67,12 +66,11 @@ func ValidateTransferChannelParams( // OnChanOpenInit implements the IBCModule interface func (im IBCModule) OnChanOpenInit( - ctx sdk.Context, + ctx context.Context, order channeltypes.Order, connectionHops []string, portID string, channelID string, - chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version string, ) (string, error) { @@ -88,22 +86,16 @@ func (im IBCModule) OnChanOpenInit( return "", newsdkerrors.Wrapf(types.ErrInvalidVersion, "got %s, expected %s", version, types.Version) } - // Claim channel capability passed back by IBC module - if err := im.keeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { - return "", err - } - return version, nil } // OnChanOpenTry implements the IBCModule interface. func (im IBCModule) OnChanOpenTry( - ctx sdk.Context, + ctx context.Context, order channeltypes.Order, connectionHops []string, portID, channelID string, - chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, counterpartyVersion string, ) (string, error) { @@ -115,23 +107,12 @@ func (im IBCModule) OnChanOpenTry( return "", newsdkerrors.Wrapf(types.ErrInvalidVersion, "invalid counterparty version: %s, expected %s", counterpartyVersion, types.Version) } - // Module may have already claimed capability in OnChanOpenInit in the case of crossing hellos - // (ie chainA and chainB both call ChanOpenInit before one of them calls ChanOpenTry) - // If module can already authenticate the capability then module already owns it so we don't need to claim - // Otherwise, module does not have channel capability and we must claim it from IBC - if !im.keeper.AuthenticateCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)) { - // Only claim channel capability passed back by IBC module if we do not already own it - if err := im.keeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { - return "", err - } - } - return types.Version, nil } // OnChanOpenAck implements the IBCModule interface func (im IBCModule) OnChanOpenAck( - ctx sdk.Context, + ctx context.Context, portID, channelID string, _ string, @@ -146,7 +127,7 @@ func (im IBCModule) OnChanOpenAck( // OnChanOpenConfirm implements the IBCModule interface func (im IBCModule) OnChanOpenConfirm( - ctx sdk.Context, + ctx context.Context, portID, channelID string, ) error { @@ -156,7 +137,7 @@ func (im IBCModule) OnChanOpenConfirm( // OnChanCloseInit implements the IBCModule interface func (im IBCModule) OnChanCloseInit( - ctx sdk.Context, + ctx context.Context, portID, channelID string, ) error { @@ -166,7 +147,7 @@ func (im IBCModule) OnChanCloseInit( // OnChanCloseConfirm implements the IBCModule interface func (im IBCModule) OnChanCloseConfirm( - ctx sdk.Context, + ctx context.Context, portID, channelID string, ) error { @@ -177,7 +158,8 @@ func (im IBCModule) OnChanCloseConfirm( // is returned if the packet data is successfully decoded and the receive application // logic returns without error. func (im IBCModule) OnRecvPacket( - ctx sdk.Context, + ctx context.Context, + channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress, ) ibcexported.Acknowledgement { @@ -191,12 +173,12 @@ func (im IBCModule) OnRecvPacket( // only attempt the application logic if the packet data // was successfully decoded if ack.Success() { - if err := im.keeper.OnRecvPacket(ctx, packet, data); err != nil { + if err := im.keeper.OnRecvPacket(ctx, channelVersion, packet, data); err != nil { ack = types.NewErrorAcknowledgement(err) } } - - ctx.EventManager().EmitEvent( + sdkCtx := sdk.UnwrapSDKContext(ctx) + sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypePacket, sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), @@ -214,7 +196,8 @@ func (im IBCModule) OnRecvPacket( // OnAcknowledgementPacket implements the IBCModule interface func (im IBCModule) OnAcknowledgementPacket( - ctx sdk.Context, + ctx context.Context, + channelVersion string, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, @@ -228,11 +211,11 @@ func (im IBCModule) OnAcknowledgementPacket( return newsdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal ICS-721 transfer packet data: %s", err.Error()) } - if err := im.keeper.OnAcknowledgementPacket(ctx, packet, data, ack); err != nil { + if err := im.keeper.OnAcknowledgementPacket(ctx, channelVersion, packet, data, ack); err != nil { return err } - - ctx.EventManager().EmitEvent( + sdkCtx := sdk.UnwrapSDKContext(ctx) + sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypePacket, sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), @@ -246,14 +229,14 @@ func (im IBCModule) OnAcknowledgementPacket( switch resp := ack.Response.(type) { case *channeltypes.Acknowledgement_Result: - ctx.EventManager().EmitEvent( + sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypePacket, sdk.NewAttribute(types.AttributeKeyAckSuccess, string(resp.Result)), ), ) case *channeltypes.Acknowledgement_Error: - ctx.EventManager().EmitEvent( + sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypePacket, sdk.NewAttribute(types.AttributeKeyAckError, resp.Error), @@ -266,7 +249,8 @@ func (im IBCModule) OnAcknowledgementPacket( // OnTimeoutPacket implements the IBCModule interface func (im IBCModule) OnTimeoutPacket( - ctx sdk.Context, + ctx context.Context, + channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress, ) error { @@ -275,11 +259,11 @@ func (im IBCModule) OnTimeoutPacket( return newsdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal ICS-721 transfer packet data: %s", err.Error()) } // refund tokens - if err := im.keeper.OnTimeoutPacket(ctx, packet, data); err != nil { + if err := im.keeper.OnTimeoutPacket(ctx, channelVersion, packet, data); err != nil { return err } - - ctx.EventManager().EmitEvent( + sdkCtx := sdk.UnwrapSDKContext(ctx) + sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeTimeout, sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), diff --git a/x/nft-transfer/keeper/genesis.go b/x/nft-transfer/keeper/genesis.go index 85ef635a5..1ce0d7c65 100644 --- a/x/nft-transfer/keeper/genesis.go +++ b/x/nft-transfer/keeper/genesis.go @@ -1,36 +1,20 @@ package keeper import ( - "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/crypto-org-chain/chain-main/v4/x/nft-transfer/types" ) // InitGenesis initializes the ibc nft-transfer state and binds to PortID. func (k Keeper) InitGenesis(ctx sdk.Context, state types.GenesisState) { - k.SetPort(ctx, state.PortId) - for _, trace := range state.Traces { k.SetClassTrace(ctx, trace) } - - // Only try to bind to port if it is not already bound, since we may already own - // port capability from capability InitGenesis - if !k.IsBound(ctx, state.PortId) { - // nft-transfer module binds to the nft-transfer port on InitChain - // and claims the returned capability - err := k.BindPort(ctx, state.PortId) - if err != nil { - panic(fmt.Sprintf("could not claim port capability: %v", err)) - } - } } // ExportGenesis exports ibc nft-transfer module's portID and class trace info into its genesis state. func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { return &types.GenesisState{ - PortId: k.GetPort(ctx), Traces: k.GetAllClassTraces(ctx), } } diff --git a/x/nft-transfer/keeper/keeper.go b/x/nft-transfer/keeper/keeper.go index 45852c91d..efeb64ec4 100644 --- a/x/nft-transfer/keeper/keeper.go +++ b/x/nft-transfer/keeper/keeper.go @@ -1,13 +1,13 @@ package keeper import ( + "context" + "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" - capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" - host "github.com/cosmos/ibc-go/v8/modules/core/24-host" + host "github.com/cosmos/ibc-go/v9/modules/core/24-host" "github.com/crypto-org-chain/chain-main/v4/x/nft-transfer/types" ) @@ -18,10 +18,8 @@ type Keeper struct { ics4Wrapper types.ICS4Wrapper channelKeeper types.ChannelKeeper - portKeeper types.PortKeeper nftKeeper types.NFTKeeper authKeeper types.AccountKeeper - scopedKeeper capabilitykeeper.ScopedKeeper } // NewKeeper creates a new IBC nft-transfer Keeper instance @@ -30,66 +28,27 @@ func NewKeeper( key storetypes.StoreKey, ics4Wrapper types.ICS4Wrapper, channelKeeper types.ChannelKeeper, - portKeeper types.PortKeeper, nftKeeper types.NFTKeeper, authKeeper types.AccountKeeper, - scopedKeeper capabilitykeeper.ScopedKeeper, ) Keeper { return Keeper{ cdc: cdc, storeKey: key, ics4Wrapper: ics4Wrapper, channelKeeper: channelKeeper, - portKeeper: portKeeper, nftKeeper: nftKeeper, authKeeper: authKeeper, - scopedKeeper: scopedKeeper, } } // Logger returns a module-specific logger. -func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", "x/"+host.SubModuleName+"-"+types.ModuleName) -} - -// SetPort sets the portID for the nft-transfer module. Used in InitGenesis -func (k Keeper) SetPort(ctx sdk.Context, portID string) { - store := ctx.KVStore(k.storeKey) - store.Set(types.PortKey, []byte(portID)) -} - -// GetPort returns the portID for the nft-transfer module. -func (k Keeper) GetPort(ctx sdk.Context) string { - store := ctx.KVStore(k.storeKey) - return string(store.Get(types.PortKey)) -} - -// IsBound checks if the transfer module is already bound to the desired port -func (k Keeper) IsBound(ctx sdk.Context, portID string) bool { - _, ok := k.scopedKeeper.GetCapability(ctx, host.PortPath(portID)) - return ok -} - -// BindPort defines a wrapper function for the ort Keeper's function in -// order to expose it to module's InitGenesis function -func (k Keeper) BindPort(ctx sdk.Context, portID string) error { - cap := k.portKeeper.BindPort(ctx, portID) - return k.ClaimCapability(ctx, cap, host.PortPath(portID)) -} - -// AuthenticateCapability wraps the scopedKeeper's AuthenticateCapability function -func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool { - return k.scopedKeeper.AuthenticateCapability(ctx, cap, name) -} - -// ClaimCapability allows the nft-transfer module that can claim a capability that IBC module -// passes to it -func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error { - return k.scopedKeeper.ClaimCapability(ctx, cap, name) +func (k Keeper) Logger(ctx context.Context) log.Logger { + sdkCtx := sdk.UnwrapSDKContext(ctx) + return sdkCtx.Logger().With("module", "x/"+host.SubModuleName+"-"+types.ModuleName) } // SetEscrowAddress attempts to save a account to auth module -func (k Keeper) SetEscrowAddress(ctx sdk.Context, portID, channelID string) { +func (k Keeper) SetEscrowAddress(ctx context.Context, portID, channelID string) { // create the escrow address for the tokens escrowAddress := types.GetEscrowAddress(portID, channelID) if !k.authKeeper.HasAccount(ctx, escrowAddress) { diff --git a/x/nft-transfer/keeper/msg_server.go b/x/nft-transfer/keeper/msg_server.go index d20ad7291..5a01d259a 100644 --- a/x/nft-transfer/keeper/msg_server.go +++ b/x/nft-transfer/keeper/msg_server.go @@ -19,7 +19,7 @@ func (k Keeper) Transfer(goCtx context.Context, msg *types.MsgTransfer) (*types. return nil, err } if err := k.SendTransfer( - ctx, msg.SourcePort, msg.SourceChannel, msg.ClassId, msg.TokenIds, + goCtx, msg.SourcePort, msg.SourceChannel, msg.ClassId, msg.TokenIds, sender, msg.Receiver, msg.TimeoutHeight, msg.TimeoutTimestamp, ); err != nil { return nil, err diff --git a/x/nft-transfer/keeper/packet.go b/x/nft-transfer/keeper/packet.go index df0df24f9..5162e173e 100644 --- a/x/nft-transfer/keeper/packet.go +++ b/x/nft-transfer/keeper/packet.go @@ -1,13 +1,14 @@ package keeper import ( + "context" "strings" newsdkerrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" + clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" "github.com/crypto-org-chain/chain-main/v4/x/nft-transfer/types" ) @@ -15,7 +16,7 @@ import ( // if the sending chain was the source chain. Otherwise, the sent tokens // were burnt in the original send so new tokens are minted and sent to // the sending address. -func (k Keeper) refundPacketToken(ctx sdk.Context, packet channeltypes.Packet, data types.NonFungibleTokenPacketData) error { +func (k Keeper) refundPacketToken(ctx context.Context, packet channeltypes.Packet, data types.NonFungibleTokenPacketData) error { sender, err := sdk.AccAddressFromBech32(data.Sender) if err != nil { return err @@ -52,7 +53,7 @@ func (k Keeper) refundPacketToken(ctx sdk.Context, packet channeltypes.Packet, d // if the token was away from origin chain . Otherwise, the sent tokens // were burnt in the sending chain and will unescrow the token to receiver // in the destination chain -func (k Keeper) createOutgoingPacket(ctx sdk.Context, +func (k Keeper) createOutgoingPacket(ctx context.Context, sourcePort, sourceChannel, destinationPort, @@ -134,7 +135,7 @@ func (k Keeper) createOutgoingPacket(ctx sdk.Context, // if the token was away from origin chain . Otherwise, the sent tokens // were burnt in the sending chain and will unescrow the token to receiver // in the destination chain -func (k Keeper) processReceivedPacket(ctx sdk.Context, packet channeltypes.Packet, +func (k Keeper) processReceivedPacket(ctx context.Context, packet channeltypes.Packet, data types.NonFungibleTokenPacketData, ) error { receiver, err := sdk.AccAddressFromBech32(data.Receiver) @@ -166,8 +167,8 @@ func (k Keeper) processReceivedPacket(ctx sdk.Context, packet channeltypes.Packe return err } } - - ctx.EventManager().EmitEvent( + sdkCtx := sdk.UnwrapSDKContext(ctx) + sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeClassTrace, sdk.NewAttribute(types.AttributeKeyTraceHash, classTrace.Hash().String()), diff --git a/x/nft-transfer/keeper/relay.go b/x/nft-transfer/keeper/relay.go index 4139d0686..56a54c64e 100644 --- a/x/nft-transfer/keeper/relay.go +++ b/x/nft-transfer/keeper/relay.go @@ -1,15 +1,13 @@ package keeper import ( + "context" + sdkerrors "cosmossdk.io/errors" - "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v8/modules/core/24-host" - coretypes "github.com/cosmos/ibc-go/v8/modules/core/types" + clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" "github.com/crypto-org-chain/chain-main/v4/x/nft-transfer/types" - "github.com/hashicorp/go-metrics" ) // SendTransfer handles nft-transfer sending logic. @@ -39,7 +37,7 @@ import ( // | C | p4/c4/p2/c2/nftClass | (p4,c4) | (p3,c3) | p2/c2/nftClass | B | // | B | p2/c2/nftClass | (p2,c2) | (p1,c1) | nftClass | A | func (k Keeper) SendTransfer( - ctx sdk.Context, + ctx context.Context, sourcePort, sourceChannel, classID string, @@ -54,8 +52,8 @@ func (k Keeper) SendTransfer( return sdkerrors.Wrapf(channeltypes.ErrChannelNotFound, "port ID (%s) channel ID (%s)", sourcePort, sourceChannel) } - destinationPort := sourceChannelEnd.GetCounterparty().GetPortID() - destinationChannel := sourceChannelEnd.GetCounterparty().GetChannelID() + destinationPort := sourceChannelEnd.Counterparty.PortId + destinationChannel := sourceChannelEnd.Counterparty.ChannelId // get the next sequence sequence, found := k.channelKeeper.GetNextSequenceSend(ctx, sourcePort, sourceChannel) @@ -66,11 +64,6 @@ func (k Keeper) SendTransfer( ) } - channelCap, ok := k.scopedKeeper.GetCapability(ctx, host.ChannelCapabilityPath(sourcePort, sourceChannel)) - if !ok { - return sdkerrors.Wrap(channeltypes.ErrChannelCapabilityNotFound, "module does not own channel capability") - } - // See spec for this logic: https://github.com/cosmos/ibc/blob/master/spec/app/ics-721-nft-transfer/README.md#packet-relay packet, err := k.createOutgoingPacket(ctx, sourcePort, @@ -89,28 +82,10 @@ func (k Keeper) SendTransfer( return err } - if _, err := k.ics4Wrapper.SendPacket(ctx, channelCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, packet.GetData()); err != nil { + if _, err := k.ics4Wrapper.SendPacket(ctx, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, packet.GetData()); err != nil { return err } - defer func() { - labels := []metrics.Label{ - telemetry.NewLabel(coretypes.LabelDestinationPort, destinationPort), - telemetry.NewLabel(coretypes.LabelDestinationChannel, destinationChannel), - } - - telemetry.SetGaugeWithLabels( - []string{"tx", "msg", "ibc", "nft-transfer"}, - float32(len(tokenIDs)), - []metrics.Label{telemetry.NewLabel("class_id", classID)}, - ) - - telemetry.IncrCounterWithLabels( - []string{"ibc", types.ModuleName, "send"}, - 1, - labels, - ) - }() return nil } @@ -119,7 +94,7 @@ func (k Keeper) SendTransfer( // and sent to the receiving address. Otherwise if the sender chain is sending // back tokens this chain originally transferred to it, the tokens are // unescrowed and sent to the receiving address. -func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, +func (k Keeper) OnRecvPacket(ctx context.Context, channelVersion string, packet channeltypes.Packet, data types.NonFungibleTokenPacketData, ) error { // validate packet data upon receiving @@ -135,7 +110,7 @@ func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, // acknowledgement written on the receiving chain. If the acknowledgement // was a success then nothing occurs. If the acknowledgement failed, then // the sender is refunded their tokens using the refundPacketToken function. -func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, data types.NonFungibleTokenPacketData, ack channeltypes.Acknowledgement) error { +func (k Keeper) OnAcknowledgementPacket(ctx context.Context, channelVersion string, packet channeltypes.Packet, data types.NonFungibleTokenPacketData, ack channeltypes.Acknowledgement) error { switch ack.Response.(type) { case *channeltypes.Acknowledgement_Error: return k.refundPacketToken(ctx, packet, data) @@ -148,6 +123,6 @@ func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Pac // OnTimeoutPacket refunds the sender since the original packet sent was // never received and has been timed out. -func (k Keeper) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, data types.NonFungibleTokenPacketData) error { +func (k Keeper) OnTimeoutPacket(ctx context.Context, channelVersion string, packet channeltypes.Packet, data types.NonFungibleTokenPacketData) error { return k.refundPacketToken(ctx, packet, data) } diff --git a/x/nft-transfer/keeper/trace.go b/x/nft-transfer/keeper/trace.go index d8fe4bebb..645a42fde 100644 --- a/x/nft-transfer/keeper/trace.go +++ b/x/nft-transfer/keeper/trace.go @@ -1,6 +1,8 @@ package keeper import ( + "context" + sdkerrors "cosmossdk.io/errors" "cosmossdk.io/store/prefix" storetypes "cosmossdk.io/store/types" @@ -10,8 +12,8 @@ import ( ) // GetClassTrace retrieves the full identifiers trace and base classId from the store. -func (k Keeper) GetClassTrace(ctx sdk.Context, classTraceHash tmbytes.HexBytes) (types.ClassTrace, bool) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.ClassTraceKey) +func (k Keeper) GetClassTrace(ctx context.Context, classTraceHash tmbytes.HexBytes) (types.ClassTrace, bool) { + store := prefix.NewStore(sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey), types.ClassTraceKey) bz := store.Get(classTraceHash) if bz == nil { return types.ClassTrace{}, false @@ -48,7 +50,7 @@ func (k Keeper) IterateClassTraces(ctx sdk.Context, cb func(denomTrace types.Cla // ClassPathFromHash returns the full class path prefix from an ibc classId with a hash // component. -func (k Keeper) ClassPathFromHash(ctx sdk.Context, classID string) (string, error) { +func (k Keeper) ClassPathFromHash(ctx context.Context, classID string) (string, error) { // trim the class prefix, by default "ibc/" hexHash := classID[len(types.ClassPrefix+"/"):] @@ -65,14 +67,14 @@ func (k Keeper) ClassPathFromHash(ctx sdk.Context, classID string) (string, erro } // HasClassTrace checks if a the key with the given denomination trace hash exists on the store. -func (k Keeper) HasClassTrace(ctx sdk.Context, denomTraceHash tmbytes.HexBytes) bool { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.ClassTraceKey) +func (k Keeper) HasClassTrace(ctx context.Context, denomTraceHash tmbytes.HexBytes) bool { + store := prefix.NewStore(sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey), types.ClassTraceKey) return store.Has(denomTraceHash) } // SetClassTrace sets a new {trace hash -> class trace} pair to the store. -func (k Keeper) SetClassTrace(ctx sdk.Context, denomTrace types.ClassTrace) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.ClassTraceKey) +func (k Keeper) SetClassTrace(ctx context.Context, denomTrace types.ClassTrace) { + store := prefix.NewStore(sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey), types.ClassTraceKey) bz := k.MustMarshalClassTrace(denomTrace) store.Set(denomTrace.Hash(), bz) } diff --git a/x/nft-transfer/module.go b/x/nft-transfer/module.go index 779c79320..407fc5f5d 100644 --- a/x/nft-transfer/module.go +++ b/x/nft-transfer/module.go @@ -18,7 +18,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" + porttypes "github.com/cosmos/ibc-go/v9/modules/core/05-port/types" "github.com/crypto-org-chain/chain-main/v4/x/nft-transfer/client/cli" "github.com/crypto-org-chain/chain-main/v4/x/nft-transfer/keeper" "github.com/crypto-org-chain/chain-main/v4/x/nft-transfer/simulation" diff --git a/x/nft-transfer/types/ack.go b/x/nft-transfer/types/ack.go index de904d816..69cce21a0 100644 --- a/x/nft-transfer/types/ack.go +++ b/x/nft-transfer/types/ack.go @@ -5,7 +5,7 @@ import ( sdkerrors "cosmossdk.io/errors" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" + channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" ) const ( diff --git a/x/nft-transfer/types/expected_keepers.go b/x/nft-transfer/types/expected_keepers.go index 12189a744..f231495b7 100644 --- a/x/nft-transfer/types/expected_keepers.go +++ b/x/nft-transfer/types/expected_keepers.go @@ -4,9 +4,8 @@ import ( context "context" sdk "github.com/cosmos/cosmos-sdk/types" - capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" - clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" + clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" nftexported "github.com/crypto-org-chain/chain-main/v4/x/nft/exported" nfttypes "github.com/crypto-org-chain/chain-main/v4/x/nft/types" ) @@ -14,8 +13,7 @@ import ( // ICS4Wrapper defines the expected ICS4Wrapper for middleware type ICS4Wrapper interface { SendPacket( - ctx sdk.Context, - chanCap *capabilitytypes.Capability, + ctx context.Context, sourcePort string, sourceChannel string, timeoutHeight clienttypes.Height, @@ -26,28 +24,23 @@ type ICS4Wrapper interface { // ChannelKeeper defines the expected IBC channel keeper type ChannelKeeper interface { - GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool) - GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) + GetChannel(ctx context.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool) + GetNextSequenceSend(ctx context.Context, portID, channelID string) (uint64, bool) } // NFTKeeper defines the expected nft keeper type NFTKeeper interface { - HasDenomID(ctx sdk.Context, id string) bool - GetDenom(ctx sdk.Context, id string) (denom nfttypes.Denom, err error) - IssueDenom(ctx sdk.Context, id, name, schema, uri string, creator sdk.AccAddress) error + HasDenomID(ctx context.Context, id string) bool + GetDenom(ctx context.Context, id string) (denom nfttypes.Denom, err error) + IssueDenom(ctx context.Context, id, name, schema, uri string, creator sdk.AccAddress) error - GetNFT(ctx sdk.Context, denomID, tokenID string) (nft nftexported.NFT, err error) + GetNFT(ctx context.Context, denomID, tokenID string) (nft nftexported.NFT, err error) MintNFT( - ctx sdk.Context, denomID, tokenID, tokenNm, + ctx context.Context, denomID, tokenID, tokenNm, tokenURI, tokenData string, sender, owner sdk.AccAddress, ) error - BurnNFTUnverified(ctx sdk.Context, denomID, tokenID string, owner sdk.AccAddress) error - TransferOwner(ctx sdk.Context, denomID, tokenID string, srcOwner, dstOwner sdk.AccAddress) error -} - -// PortKeeper defines the expected IBC port keeper -type PortKeeper interface { - BindPort(ctx sdk.Context, portID string) *capabilitytypes.Capability + BurnNFTUnverified(ctx context.Context, denomID, tokenID string, owner sdk.AccAddress) error + TransferOwner(ctx context.Context, denomID, tokenID string, srcOwner, dstOwner sdk.AccAddress) error } // AccountKeeper defines the contract required for account APIs. diff --git a/x/nft-transfer/types/genesis.go b/x/nft-transfer/types/genesis.go index eaed5d9d5..12c972776 100644 --- a/x/nft-transfer/types/genesis.go +++ b/x/nft-transfer/types/genesis.go @@ -1,7 +1,7 @@ package types import ( - host "github.com/cosmos/ibc-go/v8/modules/core/24-host" + host "github.com/cosmos/ibc-go/v9/modules/core/24-host" ) // NewGenesisState creates a new ibc nft-transfer GenesisState instance. diff --git a/x/nft-transfer/types/msgs.go b/x/nft-transfer/types/msgs.go index aac68c3dc..56f55b715 100644 --- a/x/nft-transfer/types/msgs.go +++ b/x/nft-transfer/types/msgs.go @@ -6,8 +6,8 @@ import ( newsdkerrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v8/modules/core/24-host" + clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v9/modules/core/24-host" ) // msg types diff --git a/x/nft-transfer/types/msgs_test.go b/x/nft-transfer/types/msgs_test.go index b263906cf..b5b6afe5f 100644 --- a/x/nft-transfer/types/msgs_test.go +++ b/x/nft-transfer/types/msgs_test.go @@ -5,7 +5,7 @@ import ( "github.com/cometbft/cometbft/crypto/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" - clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" + clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" "github.com/crypto-org-chain/chain-main/v4/x/nft-transfer/types" ) diff --git a/x/nft-transfer/types/packet.go b/x/nft-transfer/types/packet.go index 7c1698d65..85f9bc72a 100644 --- a/x/nft-transfer/types/packet.go +++ b/x/nft-transfer/types/packet.go @@ -9,18 +9,11 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) -var ( - // DefaultRelativePacketTimeoutHeight is the default packet timeout height (in blocks) relative - // to the current block height of the counterparty chain provided by the client state. The - // timeout is disabled when set to 0. - DefaultRelativePacketTimeoutHeight = "0-1000" - - // DefaultRelativePacketTimeoutTimestamp is the default packet timeout timestamp (in nanoseconds) - // relative to the current block timestamp of the counterparty chain provided by the client - // state. The timeout is disabled when set to 0. The default is currently set to a 10 minute - // timeout. - DefaultRelativePacketTimeoutTimestamp = uint64((time.Duration(10) * time.Minute).Nanoseconds()) -) +// DefaultRelativePacketTimeoutTimestamp is the default packet timeout timestamp (in nanoseconds) +// relative to the current block timestamp of the counterparty chain provided by the client +// state. The timeout is disabled when set to 0. The default is currently set to a 10 minute +// timeout. +var DefaultRelativePacketTimeoutTimestamp = uint64((time.Duration(10) * time.Minute).Nanoseconds()) // NewNonFungibleTokenPacketData constructs a new NonFungibleTokenPacketData instance func NewNonFungibleTokenPacketData( diff --git a/x/nft-transfer/types/trace.go b/x/nft-transfer/types/trace.go index 6e8aca478..d99f4e3ec 100644 --- a/x/nft-transfer/types/trace.go +++ b/x/nft-transfer/types/trace.go @@ -11,7 +11,7 @@ import ( tmtypes "github.com/cometbft/cometbft/types" sdkerrors "cosmossdk.io/errors" - host "github.com/cosmos/ibc-go/v8/modules/core/24-host" + host "github.com/cosmos/ibc-go/v9/modules/core/24-host" ) // ParseHexHash parses a hex hash in string format to bytes and validates its correctness. diff --git a/x/nft-transfer/types/tx.pb.go b/x/nft-transfer/types/tx.pb.go index f6d0828a2..b72aceb9f 100644 --- a/x/nft-transfer/types/tx.pb.go +++ b/x/nft-transfer/types/tx.pb.go @@ -10,7 +10,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" - types "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" + types "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/nft/keeper/collection.go b/x/nft/keeper/collection.go index 45b643fa0..2d961da6f 100644 --- a/x/nft/keeper/collection.go +++ b/x/nft/keeper/collection.go @@ -3,6 +3,8 @@ package keeper import ( + "context" + "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -18,7 +20,7 @@ import ( // SetGenesisCollection saves all NFTs and returns an error if there already exists or any one of the owner's bech32 // account address is invalid -func (k Keeper) SetGenesisCollection(ctx sdk.Context, collection types.Collection) error { +func (k Keeper) SetGenesisCollection(ctx context.Context, collection types.Collection) error { for _, nft := range collection.NFTs { if err := k.MintNFTUnverified( ctx, @@ -37,7 +39,7 @@ func (k Keeper) SetGenesisCollection(ctx sdk.Context, collection types.Collectio // SetCollection saves all NFTs and returns an error if there already exists or any one of the owner's bech32 account // address is invalid or any NFT's owner is not the creator of denomination -func (k Keeper) SetCollection(ctx sdk.Context, collection types.Collection, sender sdk.AccAddress) error { +func (k Keeper) SetCollection(ctx context.Context, collection types.Collection, sender sdk.AccAddress) error { for _, nft := range collection.NFTs { if err := k.MintNFT( ctx, @@ -56,7 +58,7 @@ func (k Keeper) SetCollection(ctx sdk.Context, collection types.Collection, send } // GetCollection returns the collection by the specified denom ID -func (k Keeper) GetCollection(ctx sdk.Context, denomID string) (types.Collection, error) { +func (k Keeper) GetCollection(ctx context.Context, denomID string) (types.Collection, error) { denom, err := k.GetDenom(ctx, denomID) if err != nil { return types.Collection{}, sdkerrors.Wrapf(types.ErrInvalidDenom, "denomID %s not existed ", denomID) @@ -67,13 +69,13 @@ func (k Keeper) GetCollection(ctx sdk.Context, denomID string) (types.Collection } // GetPaginateCollection returns the collection by the specified denom ID -func (k Keeper) GetPaginateCollection(ctx sdk.Context, request *types.QueryCollectionRequest, denomID string) (types.Collection, *query.PageResponse, error) { +func (k Keeper) GetPaginateCollection(ctx context.Context, request *types.QueryCollectionRequest, denomID string) (types.Collection, *query.PageResponse, error) { denom, err := k.GetDenom(ctx, denomID) if err != nil { return types.Collection{}, nil, sdkerrors.Wrapf(types.ErrInvalidDenom, "denomID %s not existed ", denomID) } var nfts []exported.NFT - store := ctx.KVStore(k.storeKey) + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) nftStore := prefix.NewStore(store, types.KeyNFT(denomID, "")) pageRes, err := query.Paginate(nftStore, request.Pagination, func(key []byte, value []byte) error { var baseNFT types.BaseNFT @@ -88,7 +90,7 @@ func (k Keeper) GetPaginateCollection(ctx sdk.Context, request *types.QueryColle } // GetCollections returns all the collections -func (k Keeper) GetCollections(ctx sdk.Context) (cs []types.Collection) { +func (k Keeper) GetCollections(ctx context.Context) (cs []types.Collection) { for _, denom := range k.GetDenoms(ctx) { nfts := k.GetNFTs(ctx, denom.Id) cs = append(cs, types.NewCollection(denom, nfts)) @@ -97,8 +99,8 @@ func (k Keeper) GetCollections(ctx sdk.Context) (cs []types.Collection) { } // GetTotalSupply returns the number of NFTs by the specified denom ID -func (k Keeper) GetTotalSupply(ctx sdk.Context, denomID string) uint64 { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetTotalSupply(ctx context.Context, denomID string) uint64 { + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) bz := store.Get(types.KeyCollection(denomID)) if len(bz) == 0 { return 0 @@ -107,8 +109,8 @@ func (k Keeper) GetTotalSupply(ctx sdk.Context, denomID string) uint64 { } // GetTotalSupplyOfOwner returns the amount of NFTs by the specified conditions -func (k Keeper) GetTotalSupplyOfOwner(ctx sdk.Context, id string, owner sdk.AccAddress) (supply uint64) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetTotalSupplyOfOwner(ctx context.Context, id string, owner sdk.AccAddress) (supply uint64) { + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) iterator := storetypes.KVStorePrefixIterator(store, types.KeyOwner(owner, id, "")) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { @@ -117,20 +119,20 @@ func (k Keeper) GetTotalSupplyOfOwner(ctx sdk.Context, id string, owner sdk.AccA return supply } -func (k Keeper) increaseSupply(ctx sdk.Context, denomID string) { +func (k Keeper) increaseSupply(ctx context.Context, denomID string) { supply := k.GetTotalSupply(ctx, denomID) supply++ - store := ctx.KVStore(k.storeKey) + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) bz := types.MustMarshalSupply(k.cdc, supply) store.Set(types.KeyCollection(denomID), bz) } -func (k Keeper) decreaseSupply(ctx sdk.Context, denomID string) { +func (k Keeper) decreaseSupply(ctx context.Context, denomID string) { supply := k.GetTotalSupply(ctx, denomID) supply-- - store := ctx.KVStore(k.storeKey) + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) if supply == 0 { store.Delete(types.KeyCollection(denomID)) return diff --git a/x/nft/keeper/denom.go b/x/nft/keeper/denom.go index e98c728d9..42015cc7f 100644 --- a/x/nft/keeper/denom.go +++ b/x/nft/keeper/denom.go @@ -3,6 +3,8 @@ package keeper import ( + "context" + sdkerrors "cosmossdk.io/errors" storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -10,19 +12,19 @@ import ( ) // HasDenomID returns whether the specified denom ID exists -func (k Keeper) HasDenomID(ctx sdk.Context, id string) bool { - store := ctx.KVStore(k.storeKey) +func (k Keeper) HasDenomID(ctx context.Context, id string) bool { + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) return store.Has(types.KeyDenomID(id)) } // HasDenomNm returns whether the specified denom name exists -func (k Keeper) HasDenomNm(ctx sdk.Context, name string) bool { - store := ctx.KVStore(k.storeKey) +func (k Keeper) HasDenomNm(ctx context.Context, name string) bool { + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) return store.Has(types.KeyDenomName(name)) } // SetDenom is responsible for saving the definition of denom -func (k Keeper) SetDenom(ctx sdk.Context, denom types.Denom) error { +func (k Keeper) SetDenom(ctx context.Context, denom types.Denom) error { if k.HasDenomID(ctx, denom.Id) { return sdkerrors.Wrapf(types.ErrInvalidDenom, "denomID %s has already exists", denom.Id) } @@ -31,7 +33,7 @@ func (k Keeper) SetDenom(ctx sdk.Context, denom types.Denom) error { return sdkerrors.Wrapf(types.ErrInvalidDenom, "denomName %s has already exists", denom.Name) } - store := ctx.KVStore(k.storeKey) + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) bz := k.cdc.MustMarshal(&denom) store.Set(types.KeyDenomID(denom.Id), bz) store.Set(types.KeyDenomName(denom.Name), []byte(denom.Id)) @@ -39,8 +41,8 @@ func (k Keeper) SetDenom(ctx sdk.Context, denom types.Denom) error { } // GetDenom returns the denom by id -func (k Keeper) GetDenom(ctx sdk.Context, id string) (denom types.Denom, err error) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetDenom(ctx context.Context, id string) (denom types.Denom, err error) { + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) bz := store.Get(types.KeyDenomID(id)) if len(bz) == 0 { @@ -52,8 +54,8 @@ func (k Keeper) GetDenom(ctx sdk.Context, id string) (denom types.Denom, err err } // GetDenom returns the denom by name -func (k Keeper) GetDenomByName(ctx sdk.Context, name string) (denom types.Denom, err error) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetDenomByName(ctx context.Context, name string) (denom types.Denom, err error) { + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) bz := store.Get(types.KeyDenomName(name)) denomID := string(bz) @@ -62,8 +64,8 @@ func (k Keeper) GetDenomByName(ctx sdk.Context, name string) (denom types.Denom, } // GetDenoms returns all the denoms -func (k Keeper) GetDenoms(ctx sdk.Context) (denoms []types.Denom) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetDenoms(ctx context.Context) (denoms []types.Denom) { + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) iterator := storetypes.KVStorePrefixIterator(store, types.KeyDenomID("")) defer iterator.Close() @@ -77,7 +79,7 @@ func (k Keeper) GetDenoms(ctx sdk.Context) (denoms []types.Denom) { // IsDenomCreator checks if address is the creator of Denom // Return the Denom if true, an error otherwise -func (k Keeper) IsDenomCreator(ctx sdk.Context, denomID string, address sdk.AccAddress) (types.Denom, error) { +func (k Keeper) IsDenomCreator(ctx context.Context, denomID string, address sdk.AccAddress) (types.Denom, error) { denom, err := k.GetDenom(ctx, denomID) if err != nil { return types.Denom{}, err diff --git a/x/nft/keeper/keeper.go b/x/nft/keeper/keeper.go index 01de49795..b40f4101c 100644 --- a/x/nft/keeper/keeper.go +++ b/x/nft/keeper/keeper.go @@ -3,6 +3,7 @@ package keeper import ( + "context" "fmt" "cosmossdk.io/log" @@ -30,12 +31,13 @@ func NewKeeper(cdc codec.Codec, storeKey storetypes.StoreKey) Keeper { } // Logger returns a module-specific logger. -func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", fmt.Sprintf("chainmain/%s", types.ModuleName)) +func (k Keeper) Logger(ctx context.Context) log.Logger { + sdkCtx := sdk.UnwrapSDKContext(ctx) + return sdkCtx.Logger().With("module", fmt.Sprintf("chainmain/%s", types.ModuleName)) } // IssueDenom issues a denom according to the given params -func (k Keeper) IssueDenom(ctx sdk.Context, +func (k Keeper) IssueDenom(ctx context.Context, id, name, schema, uri string, creator sdk.AccAddress, ) error { @@ -44,7 +46,7 @@ func (k Keeper) IssueDenom(ctx sdk.Context, // MintNFTUnverified mints an NFT without verifying if the owner is the creator of denom // Needed during genesis initialization -func (k Keeper) MintNFTUnverified(ctx sdk.Context, denomID, tokenID, tokenNm, tokenURI, tokenData string, owner sdk.AccAddress) error { +func (k Keeper) MintNFTUnverified(ctx context.Context, denomID, tokenID, tokenNm, tokenURI, tokenData string, owner sdk.AccAddress) error { if !k.HasDenomID(ctx, denomID) { return sdkerrors.Wrapf(types.ErrInvalidDenom, "denom ID %s not exists", denomID) } @@ -71,7 +73,7 @@ func (k Keeper) MintNFTUnverified(ctx sdk.Context, denomID, tokenID, tokenNm, to // MintNFT mints an NFT and manages the NFT's existence within Collections and Owners func (k Keeper) MintNFT( - ctx sdk.Context, denomID, tokenID, tokenNm, + ctx context.Context, denomID, tokenID, tokenNm, tokenURI, tokenData string, sender, owner sdk.AccAddress, ) error { _, err := k.IsDenomCreator(ctx, denomID, sender) @@ -84,7 +86,7 @@ func (k Keeper) MintNFT( // EditNFT updates an already existing NFT func (k Keeper) EditNFT( - ctx sdk.Context, denomID, tokenID, tokenNm, + ctx context.Context, denomID, tokenID, tokenNm, tokenURI, tokenData string, owner sdk.AccAddress, ) error { if !k.HasDenomID(ctx, denomID) { @@ -120,7 +122,7 @@ func (k Keeper) EditNFT( // TransferOwner transfers the ownership of the given NFT to the new owner func (k Keeper) TransferOwner( - ctx sdk.Context, denomID, tokenID string, srcOwner, dstOwner sdk.AccAddress, + ctx context.Context, denomID, tokenID string, srcOwner, dstOwner sdk.AccAddress, ) error { if !k.HasDenomID(ctx, denomID) { return sdkerrors.Wrapf(types.ErrInvalidDenom, "denom ID %s not exists", denomID) @@ -139,7 +141,7 @@ func (k Keeper) TransferOwner( } // BurnNFT deletes a specified NFT -func (k Keeper) BurnNFT(ctx sdk.Context, denomID, tokenID string, owner sdk.AccAddress) error { +func (k Keeper) BurnNFT(ctx context.Context, denomID, tokenID string, owner sdk.AccAddress) error { if !k.HasDenomID(ctx, denomID) { return sdkerrors.Wrapf(types.ErrInvalidDenom, "denom ID %s not exists", denomID) } @@ -163,7 +165,7 @@ func (k Keeper) BurnNFT(ctx sdk.Context, denomID, tokenID string, owner sdk.AccA // BurnNFTUnverified deletes a specified NFT without verifying if the owner is the creator of denom // Needed for IBC transfer of NFT -func (k Keeper) BurnNFTUnverified(ctx sdk.Context, denomID, tokenID string, owner sdk.AccAddress) error { +func (k Keeper) BurnNFTUnverified(ctx context.Context, denomID, tokenID string, owner sdk.AccAddress) error { if !k.HasDenomID(ctx, denomID) { return sdkerrors.Wrapf(types.ErrInvalidDenom, "denom ID %s not exists", denomID) } diff --git a/x/nft/keeper/nft.go b/x/nft/keeper/nft.go index c633d6d37..4d87400af 100644 --- a/x/nft/keeper/nft.go +++ b/x/nft/keeper/nft.go @@ -3,6 +3,8 @@ package keeper import ( + "context" + sdkerrors "cosmossdk.io/errors" storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -11,8 +13,8 @@ import ( ) // GetNFT gets the specified NFT -func (k Keeper) GetNFT(ctx sdk.Context, denomID, tokenID string) (nft exported.NFT, err error) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetNFT(ctx context.Context, denomID, tokenID string) (nft exported.NFT, err error) { + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) bz := store.Get(types.KeyNFT(denomID, tokenID)) if bz == nil { @@ -26,8 +28,8 @@ func (k Keeper) GetNFT(ctx sdk.Context, denomID, tokenID string) (nft exported.N } // GetNFTs returns all NFTs by the specified denom ID -func (k Keeper) GetNFTs(ctx sdk.Context, denom string) (nfts []exported.NFT) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetNFTs(ctx context.Context, denom string) (nfts []exported.NFT) { + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) iterator := storetypes.KVStorePrefixIterator(store, types.KeyNFT(denom, "")) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { @@ -41,7 +43,7 @@ func (k Keeper) GetNFTs(ctx sdk.Context, denom string) (nfts []exported.NFT) { // IsOwner checks if the sender is the owner of the given NFT // Return the NFT if true, an error otherwise -func (k Keeper) IsOwner(ctx sdk.Context, denomID, tokenID string, owner sdk.AccAddress) (types.BaseNFT, error) { +func (k Keeper) IsOwner(ctx context.Context, denomID, tokenID string, owner sdk.AccAddress) (types.BaseNFT, error) { nft, err := k.GetNFT(ctx, denomID, tokenID) if err != nil { return types.BaseNFT{}, err @@ -55,20 +57,20 @@ func (k Keeper) IsOwner(ctx sdk.Context, denomID, tokenID string, owner sdk.AccA } // HasNFT checks if the specified NFT exists -func (k Keeper) HasNFT(ctx sdk.Context, denomID, tokenID string) bool { - store := ctx.KVStore(k.storeKey) +func (k Keeper) HasNFT(ctx context.Context, denomID, tokenID string) bool { + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) return store.Has(types.KeyNFT(denomID, tokenID)) } -func (k Keeper) setNFT(ctx sdk.Context, denomID string, nft types.BaseNFT) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) setNFT(ctx context.Context, denomID string, nft types.BaseNFT) { + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) bz := k.cdc.MustMarshal(&nft) store.Set(types.KeyNFT(denomID, nft.GetID()), bz) } // deleteNFT deletes an existing NFT from store -func (k Keeper) deleteNFT(ctx sdk.Context, denomID string, nft exported.NFT) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) deleteNFT(ctx context.Context, denomID string, nft exported.NFT) { + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) store.Delete(types.KeyNFT(denomID, nft.GetID())) } diff --git a/x/nft/keeper/owners.go b/x/nft/keeper/owners.go index e55e21272..ac266157b 100644 --- a/x/nft/keeper/owners.go +++ b/x/nft/keeper/owners.go @@ -3,14 +3,16 @@ package keeper import ( + "context" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/crypto-org-chain/chain-main/v4/x/nft/types" ) // GetOwner gets all the ID collections owned by an address and denom ID -func (k Keeper) GetOwner(ctx sdk.Context, address sdk.AccAddress, denom string) (types.Owner, error) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetOwner(ctx context.Context, address sdk.AccAddress, denom string) (types.Owner, error) { + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) iterator := storetypes.KVStorePrefixIterator(store, types.KeyOwner(address, denom, "")) defer iterator.Close() @@ -45,8 +47,8 @@ func (k Keeper) GetOwner(ctx sdk.Context, address sdk.AccAddress, denom string) } // GetOwners gets all the ID collections -func (k Keeper) GetOwners(ctx sdk.Context) (owners types.Owners, err error) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) GetOwners(ctx context.Context) (owners types.Owners, err error) { + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) iterator := storetypes.KVStoreReversePrefixIterator(store, types.KeyOwner(nil, "", "")) defer iterator.Close() @@ -76,22 +78,22 @@ func (k Keeper) GetOwners(ctx sdk.Context) (owners types.Owners, err error) { return owners, nil } -func (k Keeper) deleteOwner(ctx sdk.Context, denomID, tokenID string, owner sdk.AccAddress) { - store := ctx.KVStore(k.storeKey) +func (k Keeper) deleteOwner(ctx context.Context, denomID, tokenID string, owner sdk.AccAddress) { + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) store.Delete(types.KeyOwner(owner, denomID, tokenID)) } -func (k Keeper) setOwner(ctx sdk.Context, +func (k Keeper) setOwner(ctx context.Context, denomID, tokenID string, owner sdk.AccAddress, ) { - store := ctx.KVStore(k.storeKey) + store := sdk.UnwrapSDKContext(ctx).KVStore(k.storeKey) bz := types.MustMarshalTokenID(k.cdc, tokenID) store.Set(types.KeyOwner(owner, denomID, tokenID), bz) } -func (k Keeper) swapOwner(ctx sdk.Context, denomID, tokenID string, srcOwner, dstOwner sdk.AccAddress) { +func (k Keeper) swapOwner(ctx context.Context, denomID, tokenID string, srcOwner, dstOwner sdk.AccAddress) { // delete old owner key k.deleteOwner(ctx, denomID, tokenID, srcOwner)