From 600ee378c12845de5e84346ee4fb7e9e6e0ffb3a Mon Sep 17 00:00:00 2001 From: Bernd Date: Wed, 6 Sep 2023 11:48:26 +0200 Subject: [PATCH 1/7] Remove liquidity module --- app/keepers/keepers.go | 24 ++++++------------------ app/keepers/keys.go | 4 +--- app/modules.go | 10 ---------- go.mod | 4 ---- 4 files changed, 7 insertions(+), 35 deletions(-) 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/go.mod b/go.mod index 004c262084b..a5abe49395a 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 @@ -190,9 +189,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 From 8b6e7969847157e7e807ed6880bdd83156a576e6 Mon Sep 17 00:00:00 2001 From: Bernd Date: Wed, 6 Sep 2023 11:49:35 +0200 Subject: [PATCH 2/7] Fix issue found by linter --- app/app.go | 1 + 1 file changed, 1 insertion(+) 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)) From aacc4040c7a6935b90b5e8f405dc83cc7befc4ea Mon Sep 17 00:00:00 2001 From: Bernd Date: Wed, 6 Sep 2023 12:39:26 +0200 Subject: [PATCH 3/7] Update docs --- .changelog/v11.0.0/dependencies/2652-liquidity-removal.md | 5 ++--- .changelog/v11.0.0/state-breaking/2652-liquidity-removal.md | 5 ++--- RELEASE_NOTES.md | 6 +++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.changelog/v11.0.0/dependencies/2652-liquidity-removal.md b/.changelog/v11.0.0/dependencies/2652-liquidity-removal.md index 53bc7b40872..da22120c5ea 100644 --- a/.changelog/v11.0.0/dependencies/2652-liquidity-removal.md +++ b/.changelog/v11.0.0/dependencies/2652-liquidity-removal.md @@ -1,3 +1,2 @@ -- Bump [Liquidity](https://github.com/Gravity-Devs/liquidity) to - [v1.6.0-forced-withdrawal](https://github.com/Gravity-Devs/liquidity/releases/tag/v1.6.0-forced-withdrawal) - ([\#2652](https://github.com/cosmos/gaia/pull/2652)) \ No newline at end of file +- Remove [Liquidity](https://github.com/Gravity-Devs/liquidity) + ([\#2716](https://github.com/cosmos/gaia/pull/2716)) \ No newline at end of file diff --git a/.changelog/v11.0.0/state-breaking/2652-liquidity-removal.md b/.changelog/v11.0.0/state-breaking/2652-liquidity-removal.md index 53bc7b40872..7de08883cc8 100644 --- a/.changelog/v11.0.0/state-breaking/2652-liquidity-removal.md +++ b/.changelog/v11.0.0/state-breaking/2652-liquidity-removal.md @@ -1,3 +1,2 @@ -- Bump [Liquidity](https://github.com/Gravity-Devs/liquidity) to - [v1.6.0-forced-withdrawal](https://github.com/Gravity-Devs/liquidity/releases/tag/v1.6.0-forced-withdrawal) - ([\#2652](https://github.com/cosmos/gaia/pull/2652)) \ No newline at end of file +- Remove[Liquidity](https://github.com/Gravity-Devs/liquidity) + ([\#2716](https://github.com/cosmos/gaia/pull/2716)) \ No newline at end of file diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 7930557978d..3ba07f4e541 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -2,11 +2,11 @@ A release notes template that should be adapted for every release - release: - release branch: - - the last release: + - the last release: - the last release branch: --> -# Gaia Release Notes +# Gaia Release Notes ## 📝 Changelog @@ -29,4 +29,4 @@ make install ## ⚡️ Download binaries -Binaries for linux, darwin, and windows are available below. \ No newline at end of file +Binaries for linux, darwin, and windows are available below. From 8ed24d0ac3574602d416e4c218727bddbda72c78 Mon Sep 17 00:00:00 2001 From: Bernd Date: Wed, 6 Sep 2023 11:50:16 +0200 Subject: [PATCH 4/7] Correction to coding guidlines --- docs/guidelines/code-guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From 3b8f2cbcfb2a6f4ce2d0d8f0f5116695c06dd5d3 Mon Sep 17 00:00:00 2001 From: Bernd Date: Thu, 7 Sep 2023 10:14:41 +0200 Subject: [PATCH 5/7] go mod tidy --- go.mod | 1 - go.sum | 4 ---- 2 files changed, 5 deletions(-) diff --git a/go.mod b/go.mod index a5abe49395a..09b24ca250e 100644 --- a/go.mod +++ b/go.mod @@ -93,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 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= From dc22ccdba05730db5531b47e99d94d827adfbf0d Mon Sep 17 00:00:00 2001 From: Bernd Date: Thu, 7 Sep 2023 11:05:38 +0200 Subject: [PATCH 6/7] Revert "Update docs" This reverts commit aacc4040c7a6935b90b5e8f405dc83cc7befc4ea. --- .changelog/v11.0.0/dependencies/2652-liquidity-removal.md | 5 +++-- .changelog/v11.0.0/state-breaking/2652-liquidity-removal.md | 5 +++-- RELEASE_NOTES.md | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.changelog/v11.0.0/dependencies/2652-liquidity-removal.md b/.changelog/v11.0.0/dependencies/2652-liquidity-removal.md index da22120c5ea..53bc7b40872 100644 --- a/.changelog/v11.0.0/dependencies/2652-liquidity-removal.md +++ b/.changelog/v11.0.0/dependencies/2652-liquidity-removal.md @@ -1,2 +1,3 @@ -- Remove [Liquidity](https://github.com/Gravity-Devs/liquidity) - ([\#2716](https://github.com/cosmos/gaia/pull/2716)) \ No newline at end of file +- Bump [Liquidity](https://github.com/Gravity-Devs/liquidity) to + [v1.6.0-forced-withdrawal](https://github.com/Gravity-Devs/liquidity/releases/tag/v1.6.0-forced-withdrawal) + ([\#2652](https://github.com/cosmos/gaia/pull/2652)) \ No newline at end of file diff --git a/.changelog/v11.0.0/state-breaking/2652-liquidity-removal.md b/.changelog/v11.0.0/state-breaking/2652-liquidity-removal.md index 7de08883cc8..53bc7b40872 100644 --- a/.changelog/v11.0.0/state-breaking/2652-liquidity-removal.md +++ b/.changelog/v11.0.0/state-breaking/2652-liquidity-removal.md @@ -1,2 +1,3 @@ -- Remove[Liquidity](https://github.com/Gravity-Devs/liquidity) - ([\#2716](https://github.com/cosmos/gaia/pull/2716)) \ No newline at end of file +- Bump [Liquidity](https://github.com/Gravity-Devs/liquidity) to + [v1.6.0-forced-withdrawal](https://github.com/Gravity-Devs/liquidity/releases/tag/v1.6.0-forced-withdrawal) + ([\#2652](https://github.com/cosmos/gaia/pull/2652)) \ No newline at end of file diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 3ba07f4e541..7930557978d 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -2,11 +2,11 @@ A release notes template that should be adapted for every release - release: - release branch: - - the last release: + - the last release: - the last release branch: --> -# Gaia Release Notes +# Gaia Release Notes ## 📝 Changelog @@ -29,4 +29,4 @@ make install ## ⚡️ Download binaries -Binaries for linux, darwin, and windows are available below. +Binaries for linux, darwin, and windows are available below. \ No newline at end of file From b9579e2daf240b8a47d91257c5137da235bdd284 Mon Sep 17 00:00:00 2001 From: Bernd Date: Thu, 7 Sep 2023 11:26:53 +0200 Subject: [PATCH 7/7] Updated docs --- .changelog/unreleased/dependencies/2714-remove-liquidity.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .changelog/unreleased/dependencies/2714-remove-liquidity.md 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))