diff --git a/.changelog/unreleased/dependencies/2714-remove-liquidity.md b/.changelog/unreleased/dependencies/2714-remove-liquidity.md new file mode 100644 index 0000000000000..80d24c0506d8a --- /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 fc3d4af3e1b42..9a6312423c45f 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 c94adad21dfc3..d5159f4f357ee 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 28b484285478e..0cd4d6dbbf2f5 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 5943420c06255..39af9a7737454 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 2c5b2548a4d74..b0b8821621a49 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 004c262084bc1..09b24ca250ee3 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 ec1361f3b60ef..172cc9a43a873 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=