Skip to content

Commit eb39fe4

Browse files
authored
Removed Gaia liquid staking module (#426)
1 parent 869cbcb commit eb39fe4

File tree

4 files changed

+11
-68
lines changed

4 files changed

+11
-68
lines changed

app/app.go

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import (
2828
"github.com/cosmos/cosmos-sdk/x/group"
2929
groupmodule "github.com/cosmos/cosmos-sdk/x/group/module"
3030
"github.com/cosmos/cosmos-sdk/x/protocolpool"
31-
"github.com/cosmos/gaia/v25/x/liquid"
3231
"github.com/cosmos/gogoproto/proto"
3332
icacontroller "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller"
3433
ibccallbacks "github.com/cosmos/ibc-go/v10/modules/apps/callbacks"
@@ -122,8 +121,6 @@ import (
122121
"github.com/cosmos/cosmos-sdk/x/staking"
123122
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
124123
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
125-
liquidkeeper "github.com/cosmos/gaia/v25/x/liquid/keeper"
126-
liquidtypes "github.com/cosmos/gaia/v25/x/liquid/types"
127124
ica "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts"
128125
icacontrollerkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller/keeper"
129126
icacontrollertypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller/types"
@@ -257,7 +254,6 @@ type App struct {
257254
SlashingKeeper slashingkeeper.Keeper
258255
MintKeeper mintkeeper.Keeper
259256
DistrKeeper distrkeeper.Keeper
260-
LiquidKeeper *liquidkeeper.Keeper
261257
GovKeeper govkeeper.Keeper
262258
UpgradeKeeper *upgradekeeper.Keeper
263259
EvidenceKeeper evidencekeeper.Keeper
@@ -287,7 +283,7 @@ type App struct {
287283
sm *module.SimulationManager
288284
}
289285

290-
// New returns a reference to an initialized Gaia.
286+
// New returns a reference to an initialized App.
291287
// NewSimApp returns a reference to an initialized SimApp.
292288
func New(
293289
logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool,
@@ -349,7 +345,6 @@ func New(
349345
icacontrollertypes.StoreKey,
350346
paramstypes.StoreKey,
351347
CapabilityStoreKey,
352-
liquidtypes.StoreKey,
353348
)
354349
tkeys := storetypes.NewTransientStoreKeys(paramstypes.TStoreKey)
355350
memkeys := storetypes.NewMemoryStoreKeys(CapabilityMemStoreKey)
@@ -481,16 +476,6 @@ func New(
481476
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
482477
)
483478

484-
app.LiquidKeeper = liquidkeeper.NewKeeper(
485-
appCodec,
486-
runtime.NewKVStoreService(keys[liquidtypes.StoreKey]),
487-
app.AccountKeeper,
488-
app.BankKeeper,
489-
app.StakingKeeper,
490-
app.DistrKeeper,
491-
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
492-
)
493-
494479
app.FeeGrantKeeper = feegrantkeeper.NewKeeper(
495480
appCodec,
496481
runtime.NewKVStoreService(keys[feegrant.StoreKey]),
@@ -503,7 +488,6 @@ func New(
503488
stakingtypes.NewMultiStakingHooks(
504489
app.DistrKeeper.Hooks(),
505490
app.SlashingKeeper.Hooks(),
506-
app.LiquidKeeper.Hooks(),
507491
),
508492
)
509493

@@ -583,7 +567,7 @@ func New(
583567

584568
app.GovKeeper = *govKeeper.SetHooks(
585569
govtypes.NewMultiGovHooks(
586-
// register the governance hooks
570+
// register the governance hooks
587571
),
588572
)
589573

@@ -613,7 +597,7 @@ func New(
613597

614598
app.EpochsKeeper.SetHooks(
615599
epochstypes.NewMultiEpochHooks(
616-
// insert epoch hooks receivers here
600+
// insert epoch hooks receivers here
617601
),
618602
)
619603

@@ -763,7 +747,6 @@ func New(
763747
transfer.NewAppModule(app.TransferKeeper),
764748
ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper),
765749
ibctm.NewAppModule(tmLightClientModule),
766-
liquid.NewAppModule(appCodec, app.LiquidKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
767750
)
768751

769752
// BasicModuleManager defines the module BasicManager is in charge of setting up basic,
@@ -804,7 +787,6 @@ func New(
804787
ibctransfertypes.ModuleName,
805788
ibcexported.ModuleName,
806789
icatypes.ModuleName,
807-
liquidtypes.ModuleName,
808790
wasmtypes.ModuleName,
809791
)
810792

@@ -857,7 +839,6 @@ func New(
857839
icatypes.ModuleName,
858840
// wasm after ibc transfer
859841
wasmtypes.ModuleName,
860-
liquidtypes.ModuleName,
861842
}
862843

863844
exportModuleOrder := []string{
@@ -886,7 +867,6 @@ func New(
886867
icatypes.ModuleName,
887868
// wasm after ibc transfer
888869
wasmtypes.ModuleName,
889-
liquidtypes.ModuleName,
890870
}
891871

892872
app.mm.SetOrderInitGenesis(genesisModuleOrder...)
@@ -1066,15 +1046,15 @@ func (app *App) LegacyAmino() *codec.LegacyAmino {
10661046
return app.legacyAmino
10671047
}
10681048

1069-
// AppCodec returns Gaia's app codec.
1049+
// AppCodec returns app codec.
10701050
//
10711051
// NOTE: This is solely to be used for testing purposes as it may be desirable
10721052
// for modules to register their own custom testing types.
10731053
func (app *App) AppCodec() codec.Codec {
10741054
return app.appCodec
10751055
}
10761056

1077-
// InterfaceRegistry returns Gaia's InterfaceRegistry
1057+
// InterfaceRegistry returns InterfaceRegistry
10781058
func (app *App) InterfaceRegistry() types.InterfaceRegistry {
10791059
return app.interfaceRegistry
10801060
}

app/upgrades.go

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"strings"
99
"time"
1010

11-
"cosmossdk.io/math"
1211
storetypes "cosmossdk.io/store/types"
1312
circuittypes "cosmossdk.io/x/circuit/types"
1413
"cosmossdk.io/x/nft"
@@ -25,8 +24,6 @@ import (
2524
//minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
2625
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
2726
protocolpooltypes "github.com/cosmos/cosmos-sdk/x/protocolpool/types"
28-
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
29-
liquidtypes "github.com/cosmos/gaia/v25/x/liquid/types"
3027
icacontrollertypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller/types"
3128
icatypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/types"
3229
ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
@@ -48,7 +45,6 @@ var v053StoreUpgrades = storetypes.StoreUpgrades{
4845
group.StoreKey,
4946
icacontrollertypes.StoreKey,
5047
nft.StoreKey,
51-
liquidtypes.StoreKey,
5248
},
5349
Renamed: []storetypes.StoreRename{
5450
// {OldKey: "oldkey", NewKey: "newkey"},
@@ -104,39 +100,11 @@ func (app *App) RegisterUpgradeHandlers(cfg module.Configurator) {
104100
return nil, err
105101
}
106102

107-
/*
108-
// Pre-seed legacy x/params for mint
109-
if ss, ok := app.ParamsKeeper.GetSubspace(minttypes.ModuleName); ok {
110-
if !ss.Has(sdkCtx, minttypes.KeyInflationRateChange) {
111-
p := minttypes.DefaultParams()
112-
p.MintDenom = "afet"
113-
// TODO: if your chain had custom values, set them here:
114-
ss.SetParamSet(sdkCtx, &p)
115-
}
116-
}
117-
*/
118-
119103
err = migrateConsensusParamsFromParamsStore(app, sdkCtx)
120104
if err != nil {
121105
return nil, err
122106
}
123107

124-
// Bootstrap liquid staking
125-
err = app.StakingKeeper.IterateValidators(ctx, func(_ int64, v stakingtypes.ValidatorI) (stop bool) {
126-
lv := liquidtypes.LiquidValidator{
127-
OperatorAddress: v.GetOperator(),
128-
LiquidShares: math.LegacyZeroDec(),
129-
}
130-
err := app.LiquidKeeper.SetLiquidValidator(ctx, lv)
131-
if err != nil {
132-
return false
133-
}
134-
return false
135-
})
136-
if err != nil {
137-
return nil, err
138-
}
139-
140108
// If you must pin any module "from" versions, adjust fromVM here.
141109
return app.mm.RunMigrations(ctx, cfg, fromVM)
142110
},

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ require (
88
github.com/CosmWasm/wasmd v0.61.2
99
github.com/CosmWasm/wasmvm/v3 v3.0.0 // indirect
1010
github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect
11-
github.com/cosmos/gaia/v25 v25.1.1
1211
github.com/cosmos/gogogateway v1.2.0 // indirect
1312
github.com/cosmos/gogoproto v1.7.0
1413
github.com/cosmos/iavl v1.2.6 // indirect

go.sum

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -820,8 +820,8 @@ github.com/cometbft/cometbft v0.38.19 h1:vNdtCkvhuwUlrcLPAyigV7lQpmmo+tAq8CsB8gZ
820820
github.com/cometbft/cometbft v0.38.19/go.mod h1:UCu8dlHqvkAsmAFmWDRWNZJPlu6ya2fTWZlDrWsivwo=
821821
github.com/cometbft/cometbft-db v1.0.4 h1:cezb8yx/ZWcF124wqUtAFjAuDksS1y1yXedvtprUFxs=
822822
github.com/cometbft/cometbft-db v1.0.4/go.mod h1:M+BtHAGU2XLrpUxo3Nn1nOCcnVCiLM9yx5OuT0u5SCA=
823-
github.com/containerd/continuity v0.4.5 h1:ZRoN1sXq9u7V6QoHMcVWGhOwDFqZ4B9i5H6un1Wh0x4=
824-
github.com/containerd/continuity v0.4.5/go.mod h1:/lNJvtJKUQStBzpVQ1+rasXO1LAWtUQssk28EZvJ3nE=
823+
github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg=
824+
github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM=
825825
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
826826
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
827827
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
@@ -832,8 +832,6 @@ github.com/cosmos/cosmos-db v1.1.3 h1:7QNT77+vkefostcKkhrzDK9uoIEryzFrU9eoMeaQOP
832832
github.com/cosmos/cosmos-db v1.1.3/go.mod h1:kN+wGsnwUJZYn8Sy5Q2O0vCYA99MJllkKASbs6Unb9U=
833833
github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA=
834834
github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec=
835-
github.com/cosmos/gaia/v25 v25.1.1 h1:PVfU1tY/ImLv387SxS7aLUejWhKpCXxy92FYwxHFGsc=
836-
github.com/cosmos/gaia/v25 v25.1.1/go.mod h1:nk61Mb7EUU9hnfblUyYEwO/W5IajYOQQrArz8r0iQAY=
837835
github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY=
838836
github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw=
839837
github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE=
@@ -1339,8 +1337,6 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4
13391337
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
13401338
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
13411339
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
1342-
github.com/moby/sys/user v0.3.0 h1:9ni5DlcW5an3SvRSx4MouotOygvzaXbaSrc/wGDFWPo=
1343-
github.com/moby/sys/user v0.3.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs=
13441340
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
13451341
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
13461342
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
@@ -1386,10 +1382,10 @@ github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeD
13861382
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
13871383
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
13881384
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
1389-
github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
1390-
github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
1391-
github.com/opencontainers/runc v1.2.3 h1:fxE7amCzfZflJO2lHXf4y/y8M1BoAqp+FVmG19oYB80=
1392-
github.com/opencontainers/runc v1.2.3/go.mod h1:nSxcWUydXrsBZVYNSkTjoQ/N6rcyTtn+1SD5D4+kRIM=
1385+
github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI=
1386+
github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8=
1387+
github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss=
1388+
github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8=
13931389
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
13941390
github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
13951391
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=

0 commit comments

Comments
 (0)