Skip to content

Commit

Permalink
chore: reverted to ibc vanilla and removed code dependent on forked i…
Browse files Browse the repository at this point in the history
…bc ver (#458)
  • Loading branch information
omritoptix authored Dec 18, 2023
1 parent 2b0ea5d commit a49d54c
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 348 deletions.
39 changes: 0 additions & 39 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package app

import (
"encoding/json"
"fmt"
"io"
"math/big"
"net/http"
Expand Down Expand Up @@ -72,7 +71,6 @@ import (
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
clientkeeper "github.com/cosmos/ibc-go/v6/modules/core/02-client/keeper"

"github.com/cosmos/cosmos-sdk/x/mint"
mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper"
Expand Down Expand Up @@ -113,7 +111,6 @@ import (

ante "github.com/dymensionxyz/dymension/app/ante"
appparams "github.com/dymensionxyz/dymension/app/params"
v2upgrade "github.com/dymensionxyz/dymension/app/upgrades/v2"
rollappmodule "github.com/dymensionxyz/dymension/x/rollapp"
rollappmodulekeeper "github.com/dymensionxyz/dymension/x/rollapp/keeper"
rollappmoduletypes "github.com/dymensionxyz/dymension/x/rollapp/types"
Expand Down Expand Up @@ -895,7 +892,6 @@ func New(

app.SetAnteHandler(anteHandler)
app.SetEndBlocker(app.EndBlocker)
app.setupUpgradeHandlers()

if loadLatest {
if err := app.LoadLatestVersion(); err != nil {
Expand Down Expand Up @@ -1128,38 +1124,3 @@ func (app *App) GetTxConfig() client.TxConfig {
func (app *App) ExportState(ctx sdk.Context) map[string]json.RawMessage {
return app.mm.ExportGenesis(ctx, app.AppCodec())
}

// TODO: Create upgrade interface and setup generic upgrades handling a la osmosis
func (app *App) setupUpgradeHandlers() {
UpgradeName := "v2"

app.UpgradeKeeper.SetUpgradeHandler(
UpgradeName,
v2upgrade.CreateUpgradeHandler(
app.mm, app.configurator,
app.BankKeeper,
app.IBCKeeper.ClientKeeper.(clientkeeper.Keeper),
app.RollappKeeper,
app.StakingKeeper,
app.appCodec,
),
)

// When a planned update height is reached, the old binary will panic
// writing on disk the height and name of the update that triggered it
// This will read that value, and execute the preparations for the upgrade.
upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk()
if err != nil {
panic(fmt.Errorf("failed to read upgrade info from disk: %w", err))
}

// Pre upgrade handler
switch upgradeInfo.Name {
// do nothing
}

if upgradeInfo.Name == "v2" && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
// configure store loader with the store upgrades
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, v2upgrade.GetStoreUpgrades()))
}
}
33 changes: 0 additions & 33 deletions app/upgrades/v2/constants.go

This file was deleted.

214 changes: 0 additions & 214 deletions app/upgrades/v2/upgrade.go

This file was deleted.

57 changes: 0 additions & 57 deletions cmd/dymd/cmd/hotfix.go

This file was deleted.

1 change: 0 additions & 1 deletion cmd/dymd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig appparams.EncodingConfig
)

rootCmd.AddCommand(InspectCmd(a.appExport, a.newApp, app.DefaultNodeHome))
rootCmd.AddCommand(HotfixCmd(a.appExport, a.newApp, app.DefaultNodeHome))

// add keybase, auxiliary RPC, query, and tx child commands
rootCmd.AddCommand(
Expand Down
Loading

0 comments on commit a49d54c

Please sign in to comment.