diff --git a/.changelog/unreleased/dependencies/2714-remove-liquidity.md b/.changelog/unreleased/dependencies/2714-remove-liquidity.md new file mode 100644 index 00000000000..80d24c0506d --- /dev/null +++ b/.changelog/unreleased/dependencies/2714-remove-liquidity.md @@ -0,0 +1,2 @@ +- Remove [Liquidity](https://github.com/Gravity-Devs/liquidity) + ([\#2716](https://github.com/cosmos/gaia/pull/2716)) diff --git a/app/app.go b/app/app.go index fc3d4af3e1b..9a6312423c4 100644 --- a/app/app.go +++ b/app/app.go @@ -356,6 +356,7 @@ func (app *GaiaApp) setupUpgradeStoreLoaders() { } for _, upgrade := range Upgrades { + upgrade := upgrade if upgradeInfo.Name == upgrade.UpgradeName { storeUpgrades := upgrade.StoreUpgrades app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index c94adad21df..d5159f4f357 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -1,8 +1,6 @@ package keepers import ( - liquiditykeeper "github.com/gravity-devs/liquidity/x/liquidity/keeper" - liquiditytypes "github.com/gravity-devs/liquidity/x/liquidity/types" tmos "github.com/tendermint/tendermint/libs/os" // unnamed import of statik for swagger UI support @@ -86,13 +84,12 @@ type AppKeepers struct { UpgradeKeeper upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly - IBCKeeper *ibckeeper.Keeper - ICAHostKeeper icahostkeeper.Keeper - EvidenceKeeper evidencekeeper.Keeper - TransferKeeper ibctransferkeeper.Keeper - FeeGrantKeeper feegrantkeeper.Keeper - AuthzKeeper authzkeeper.Keeper - LiquidityKeeper liquiditykeeper.Keeper + IBCKeeper *ibckeeper.Keeper + ICAHostKeeper icahostkeeper.Keeper + EvidenceKeeper evidencekeeper.Keeper + TransferKeeper ibctransferkeeper.Keeper + FeeGrantKeeper feegrantkeeper.Keeper + AuthzKeeper authzkeeper.Keeper // ICS ProviderKeeper ibcproviderkeeper.Keeper @@ -226,14 +223,6 @@ func NewAppKeeper( &stakingKeeper, appKeepers.GetSubspace(slashingtypes.ModuleName), ) - appKeepers.LiquidityKeeper = liquiditykeeper.NewKeeper( - appCodec, - appKeepers.keys[liquiditytypes.StoreKey], - appKeepers.GetSubspace(liquiditytypes.ModuleName), - appKeepers.BankKeeper, - appKeepers.AccountKeeper, - appKeepers.DistrKeeper, - ) // register the staking hooks // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks @@ -398,7 +387,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino paramsKeeper.Subspace(slashingtypes.ModuleName) paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypes.ParamKeyTable()) paramsKeeper.Subspace(crisistypes.ModuleName) - paramsKeeper.Subspace(liquiditytypes.ModuleName) paramsKeeper.Subspace(ibctransfertypes.ModuleName) paramsKeeper.Subspace(ibchost.ModuleName) diff --git a/app/keepers/keys.go b/app/keepers/keys.go index 28b48428547..0cd4d6dbbf2 100644 --- a/app/keepers/keys.go +++ b/app/keepers/keys.go @@ -1,8 +1,6 @@ package keepers import ( - liquiditytypes "github.com/gravity-devs/liquidity/x/liquidity/types" - routertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types" icahosttypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types" ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" @@ -33,7 +31,7 @@ func (appKeepers *AppKeepers) GenerateKeys() { authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, - evidencetypes.StoreKey, liquiditytypes.StoreKey, ibctransfertypes.StoreKey, + evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey, feegrant.StoreKey, authzkeeper.StoreKey, routertypes.StoreKey, icahosttypes.StoreKey, providertypes.StoreKey, ) diff --git a/app/modules.go b/app/modules.go index 5943420c062..39af9a77374 100644 --- a/app/modules.go +++ b/app/modules.go @@ -1,9 +1,6 @@ package gaia import ( - "github.com/gravity-devs/liquidity/x/liquidity" - liquiditytypes "github.com/gravity-devs/liquidity/x/liquidity/types" - "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router" routertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types" ica "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts" @@ -67,7 +64,6 @@ var maccPerms = map[string][]string{ stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, govtypes.ModuleName: {authtypes.Burner}, - liquiditytypes.ModuleName: {authtypes.Minter, authtypes.Burner}, ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, providertypes.ConsumerRewardsPool: nil, } @@ -104,7 +100,6 @@ var ModuleBasics = module.NewBasicManager( evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, vesting.AppModuleBasic{}, - liquidity.AppModuleBasic{}, router.AppModuleBasic{}, ica.AppModuleBasic{}, globalfee.AppModule{}, @@ -141,7 +136,6 @@ func appModules( authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), ibc.NewAppModule(app.IBCKeeper), params.NewAppModule(app.ParamsKeeper), - liquidity.NewAppModule(appCodec, app.LiquidityKeeper, app.AccountKeeper, app.BankKeeper, app.DistrKeeper), globalfee.NewAppModule(app.GetSubspace(globalfee.ModuleName)), app.TransferModule, app.ICAModule, @@ -172,7 +166,6 @@ func simulationModules( params.NewAppModule(app.ParamsKeeper), evidence.NewAppModule(app.EvidenceKeeper), authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), - liquidity.NewAppModule(appCodec, app.LiquidityKeeper, app.AccountKeeper, app.BankKeeper, app.DistrKeeper), ibc.NewAppModule(app.IBCKeeper), app.TransferModule, app.ProviderModule, @@ -205,7 +198,6 @@ func orderBeginBlockers() []string { banktypes.ModuleName, govtypes.ModuleName, crisistypes.ModuleName, - liquiditytypes.ModuleName, ibctransfertypes.ModuleName, ibchost.ModuleName, icatypes.ModuleName, @@ -233,7 +225,6 @@ func orderEndBlockers() []string { crisistypes.ModuleName, govtypes.ModuleName, stakingtypes.ModuleName, - liquiditytypes.ModuleName, ibctransfertypes.ModuleName, ibchost.ModuleName, icatypes.ModuleName, @@ -280,7 +271,6 @@ func orderInitBlockers() []string { ibchost.ModuleName, icatypes.ModuleName, evidencetypes.ModuleName, - liquiditytypes.ModuleName, authz.ModuleName, feegrant.ModuleName, routertypes.ModuleName, diff --git a/docs/guidelines/code-guidelines.md b/docs/guidelines/code-guidelines.md index 2c5b2548a4d..b0b8821621a 100644 --- a/docs/guidelines/code-guidelines.md +++ b/docs/guidelines/code-guidelines.md @@ -2,7 +2,7 @@ If you want to contribute to a project and improve it, your help is welcome. We want to make Gaia as good as it can be. Contributing is also a great way to learn more about blockchain technology and improve it. Please read this document and follow our guidelines to make the process as smooth as possible. We are happy to review your code but please ensure that you have a reasonable and clean pull request. -This documents idiomatic conventions in the Go code that we follow at Uber. A lot of these are general guidelines for Go, while others extend upon external resources: +This documents idiomatic conventions in the Go code that we follow for gaia development. A lot of these are general guidelines for Go, while others extend upon external resources: 1. [Effective Go](https://golang.org/doc/effective_go.html) 2. [Go Common Mistakes](https://github.com/golang/go/wiki/CommonMistakes) diff --git a/go.mod b/go.mod index 004c262084b..09b24ca250e 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,6 @@ require ( github.com/golang/protobuf v1.5.3 github.com/google/gofuzz v1.2.0 github.com/gorilla/mux v1.8.0 - github.com/gravity-devs/liquidity v1.6.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/ory/dockertest/v3 v3.10.0 github.com/rakyll/statik v0.1.7 @@ -94,7 +93,6 @@ require ( github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.10.2 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect @@ -190,9 +188,6 @@ replace ( // use cosmos style protobufs github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - // Liquidity force withdrawal: https://www.mintscan.io/cosmos/proposals/801 - github.com/gravity-devs/liquidity => github.com/gravity-devs/liquidity v1.6.0-forced-withdrawal - // Comet github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.29 diff --git a/go.sum b/go.sum index ec1361f3b60..172cc9a43a8 100644 --- a/go.sum +++ b/go.sum @@ -531,8 +531,6 @@ github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= -github.com/gravity-devs/liquidity v1.6.0-forced-withdrawal h1:XQAMyrO6tovGLwpclVa4Z4DI02u2jW+uCJyBFeRqtxY= -github.com/gravity-devs/liquidity v1.6.0-forced-withdrawal/go.mod h1:0oxsaI8Ukf40W1xDSQ+LKbbXEcS17UkU4RbJ2fPMpl8= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= @@ -542,8 +540,6 @@ github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.10.2 h1:ERKrevVTnCw3Wu4I3mtR15QU3gtWy86cBo6De0jEohg= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.10.2/go.mod h1:chrfS3YoLAlKTRE5cFWvCbt8uGAjshktT4PveTUpsFQ= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s=