Skip to content

Commit

Permalink
remove bech32 ibc (#1994)
Browse files Browse the repository at this point in the history
* remove bech32 ibc

* comment out in v5 upgrade code

* CHANGELOG
  • Loading branch information
sunnya97 authored and mattverse committed Jul 20, 2022
1 parent 72b01cd commit b7df3ac
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 41 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Bring back the cliff vesting command: https://github.com/osmosis-labs/cosmos-sdk/pull/272
* Allow ScheduleUpgrade to come from same block: https://github.com/osmosis-labs/cosmos-sdk/pull/261

* [#1889](https://github.com/osmosis-labs/osmosis/pull/1825) Add proto responses to gamm LP messages:
* MsgJoinPoolResponse: share_out_amount and token_in fields
* MsgExitPoolResponse: token_out field
* [#1825](https://github.com/osmosis-labs/osmosis/pull/1825) Fixes Interchain Accounts (host side) by adding it to AppModuleBasics
* [#1699](https://github.com/osmosis-labs/osmosis/pull/1699) Fixes bug in sig fig rounding on spot price queries for small values
* [#1994](https://github.com/osmosis-labs/osmosis/pull/1994) Removed bech32ibc module

## v10.0.1

Expand Down
24 changes: 0 additions & 24 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ import (

// IBC Transfer: Defines the "transfer" IBC port
transfer "github.com/cosmos/ibc-go/v3/modules/apps/transfer"
"github.com/osmosis-labs/bech32-ibc/x/bech32ibc"
bech32ibckeeper "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/keeper"
bech32ibctypes "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types"
bech32ics20keeper "github.com/osmosis-labs/bech32-ibc/x/bech32ics20/keeper"

owasm "github.com/osmosis-labs/osmosis/v10/app/wasm"
_ "github.com/osmosis-labs/osmosis/v10/client/docs/statik"
Expand Down Expand Up @@ -100,8 +96,6 @@ type AppKeepers struct {
IBCKeeper *ibckeeper.Keeper
ICAHostKeeper *icahostkeeper.Keeper
TransferKeeper *ibctransferkeeper.Keeper
Bech32IBCKeeper *bech32ibckeeper.Keeper
Bech32ICS20Keeper *bech32ics20keeper.Keeper
EvidenceKeeper *evidencekeeper.Keeper
GAMMKeeper *gammkeeper.Keeper
LockupKeeper *lockupkeeper.Keeper
Expand Down Expand Up @@ -231,22 +225,6 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
AddRoute(ibctransfertypes.ModuleName, transferIBCModule)
// Note: the sealing is done after creating wasmd and wiring that up

appKeepers.Bech32IBCKeeper = bech32ibckeeper.NewKeeper(
appKeepers.IBCKeeper.ChannelKeeper, appCodec, appKeepers.keys[bech32ibctypes.StoreKey],
appKeepers.TransferKeeper,
)

// TODO: Should we be passing this instead of bank in many places?
// Where do we want send coins to be cross-chain?
appKeepers.Bech32ICS20Keeper = bech32ics20keeper.NewKeeper(
appKeepers.IBCKeeper.ChannelKeeper,
appKeepers.BankKeeper,
appKeepers.TransferKeeper,
appKeepers.Bech32IBCKeeper,
appKeepers.TransferKeeper,
appCodec,
)

// create evidence keeper with router
// If evidence needs to be handled for the app, set routes in router here and seal
appKeepers.EvidenceKeeper = evidencekeeper.NewKeeper(
Expand Down Expand Up @@ -374,7 +352,6 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(*appKeepers.UpgradeKeeper)).
AddRoute(ibchost.RouterKey, ibcclient.NewClientProposalHandler(appKeepers.IBCKeeper.ClientKeeper)).
AddRoute(poolincentivestypes.RouterKey, poolincentives.NewPoolIncentivesProposalHandler(*appKeepers.PoolIncentivesKeeper)).
AddRoute(bech32ibctypes.RouterKey, bech32ibc.NewBech32IBCProposalHandler(*appKeepers.Bech32IBCKeeper)).
AddRoute(txfeestypes.RouterKey, txfees.NewUpdateFeeTokenProposalHandler(*appKeepers.TxFeesKeeper)).
AddRoute(superfluidtypes.RouterKey, superfluid.NewSuperfluidProposalHandler(*appKeepers.SuperfluidKeeper, *appKeepers.EpochsKeeper))

Expand Down Expand Up @@ -539,7 +516,6 @@ func KVStoreKeys() []string {
authzkeeper.StoreKey,
txfeestypes.StoreKey,
superfluidtypes.StoreKey,
bech32ibctypes.StoreKey,
wasm.StoreKey,
tokenfactorytypes.StoreKey,
}
Expand Down
2 changes: 0 additions & 2 deletions app/keepers/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
transfer "github.com/cosmos/ibc-go/v3/modules/apps/transfer"
ibc "github.com/cosmos/ibc-go/v3/modules/core"
ibcclientclient "github.com/cosmos/ibc-go/v3/modules/core/02-client/client"
"github.com/osmosis-labs/bech32-ibc/x/bech32ibc"

"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/x/auth"
Expand Down Expand Up @@ -81,6 +80,5 @@ var AppModuleBasics = []module.AppModuleBasic{
epochs.AppModuleBasic{},
superfluid.AppModuleBasic{},
tokenfactory.AppModuleBasic{},
bech32ibc.AppModuleBasic{},
wasm.AppModuleBasic{},
}
7 changes: 1 addition & 6 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ import (

ica "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts"
icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types"
"github.com/osmosis-labs/bech32-ibc/x/bech32ibc"
bech32ibctypes "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types"
"github.com/osmosis-labs/bech32-ibc/x/bech32ics20"

"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/x/auth"
Expand Down Expand Up @@ -106,7 +103,7 @@ func appModules(
),
auth.NewAppModule(appCodec, *app.AccountKeeper, nil),
vesting.NewAppModule(*app.AccountKeeper, app.BankKeeper),
bech32ics20.NewAppModule(appCodec, *app.Bech32ICS20Keeper),
bank.NewAppModule(appCodec, *app.BankKeeper, app.AccountKeeper),
capability.NewAppModule(appCodec, *app.CapabilityKeeper),
crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants),
gov.NewAppModule(appCodec, *app.GovKeeper, app.AccountKeeper, app.BankKeeper),
Expand Down Expand Up @@ -139,7 +136,6 @@ func appModules(
app.EpochsKeeper,
),
tokenfactory.NewAppModule(appCodec, *app.TokenFactoryKeeper, app.AccountKeeper, app.BankKeeper),
bech32ibc.NewAppModule(appCodec, *app.Bech32IBCKeeper),
}
}

Expand Down Expand Up @@ -194,7 +190,6 @@ func OrderInitGenesis(allModuleNames []string) []string {
upgradetypes.ModuleName,
vestingtypes.ModuleName,
ibctransfertypes.ModuleName,
bech32ibctypes.ModuleName, // comes after ibctransfertypes
poolincentivestypes.ModuleName,
superfluidtypes.ModuleName,
tokenfactorytypes.ModuleName,
Expand Down
4 changes: 2 additions & 2 deletions app/upgrades/v5/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package v5

import (
ibcconnectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types"
bech32ibctypes "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types"
// bech32ibctypes "github.com/osmosis-labs/bech32-ibc/x/bech32ibc/types"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
Expand Down Expand Up @@ -44,7 +44,7 @@ func CreateUpgradeHandler(
// Override versions for authz & bech32ibctypes module as to not skip their
// InitGenesis for txfees module, we will override txfees ourselves.
delete(fromVM, authz.ModuleName)
delete(fromVM, bech32ibctypes.ModuleName)
// delete(fromVM, bech32ibctypes.ModuleName)

newVM, err := mm.RunMigrations(ctx, configurator, fromVM)
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ require (
github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/ory/dockertest/v3 v3.9.1
github.com/osmosis-labs/bech32-ibc v0.3.0-rc1
github.com/pkg/errors v0.9.1
github.com/rakyll/statik v0.1.7
github.com/regen-network/cosmos-proto v0.3.1
Expand Down
6 changes: 3 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,8 @@ github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8c
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no=
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY=
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE=
github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg=
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
Expand Down Expand Up @@ -1032,8 +1032,8 @@ github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4
github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs=
github.com/ory/dockertest/v3 v3.9.1 h1:v4dkG+dlu76goxMiTT2j8zV7s4oPPEppKT8K8p2f1kY=
github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM=
github.com/osmosis-labs/bech32-ibc v0.3.0-rc1 h1:frHKHEdPfzoK2iMF2GeWKudLLzUXz+6GJcdZ/TMcs2k=
github.com/osmosis-labs/bech32-ibc v0.3.0-rc1/go.mod h1:X5/FZHMPL+B3ufuVyY2/koxVjd4hIwyTLjYP1DZwppQ=
github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220620200611-3e46ff7501a1 h1:DGOm5SJcKVmgUVN8of2u4jj3vxEhAYs/+e+XqsxcrnQ=
github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220620200611-3e46ff7501a1/go.mod h1:pMiEr6WR7drhXAXK1FOdAKPazWCi7b+WOyWOF4O0OXY=
github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220709005907-f37e34d99505 h1:vrTGp5Yty0U3X4718KaZLhdznEeAs6010LEFpJH+z1k=
github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220709005907-f37e34d99505/go.mod h1:pMiEr6WR7drhXAXK1FOdAKPazWCi7b+WOyWOF4O0OXY=
github.com/osmosis-labs/iavl v0.17.3-osmo-v7 h1:6KcADC/WhL7yDmNQxUIJt2XmzNt4FfRmq9gRke45w74=
Expand Down
5 changes: 2 additions & 3 deletions osmoutils/partialord/partialord_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,19 @@ func TestAPI(t *testing.T) {
moduleNames := []string{
"auth", "authz", "bank", "capabilities",
"staking", "distribution", "epochs", "mint", "upgrades", "wasm", "ibc",
"ibctransfers", "bech32ibc",
"ibctransfers",
}
beginBlockOrd := partialord.NewPartialOrdering(moduleNames)
beginBlockOrd.FirstElements("upgrades", "epochs", "capabilities")
beginBlockOrd.After("ibctransfers", "ibc")
beginBlockOrd.After("bech32ibc", "ibctransfers")
beginBlockOrd.Before("mint", "distribution")
// This is purely just to test last functionality, doesn't make sense in context
beginBlockOrd.LastElements("auth", "authz", "wasm")

totalOrd := beginBlockOrd.TotalOrdering()
expTotalOrd := []string{
"upgrades", "epochs", "capabilities",
"bank", "staking", "mint", "ibc", "distribution", "ibctransfers", "bech32ibc",
"bank", "staking", "mint", "ibc", "distribution", "ibctransfers",
"auth", "authz", "wasm",
}
require.Equal(t, expTotalOrd, totalOrd)
Expand Down

0 comments on commit b7df3ac

Please sign in to comment.