Skip to content

Commit

Permalink
Chain Upgrade v3 (#375)
Browse files Browse the repository at this point in the history
* fix(deps): bump ledger modules

* fix(StargateQueries): use a sync pool when unmarshalling responses of protobuf objects, fix route

* fix(iid): fix DeleteController subtraction func

* feat(entity): add MsgRevokeEntityAccountAuthz

* chore(docs): add MsgRevokeEntityAccountAuthz to entity specs

* fix(claims): fix claims processPayment distribution for evaluations

* chore(iid): remove unnecesary panics

* feat(claims): add INVALIDATED as evaluation option, skip eval payment then, add invalidated to collection

* fix(claims): update status to invalidated where missed

* feat(claims): add collection update messages

* fix(modules): add extra validation for messages, and enum validation

* chore(scripts): fix local script to include denom metadata on startup

* feat(upgrade): add upgrade v3, which incluide claims module v2 migrations
  • Loading branch information
Michael-Ixo authored Mar 22, 2024
1 parent f4193c3 commit 2246089
Show file tree
Hide file tree
Showing 55 changed files with 9,315 additions and 677 deletions.
3 changes: 2 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/ixofoundation/ixo-blockchain/v2/app/keepers"
"github.com/ixofoundation/ixo-blockchain/v2/app/upgrades"
v2 "github.com/ixofoundation/ixo-blockchain/v2/app/upgrades/v2"
v3 "github.com/ixofoundation/ixo-blockchain/v2/app/upgrades/v3"
"github.com/ixofoundation/ixo-blockchain/v2/lib/ixo"
"github.com/rakyll/statik/fs"
"github.com/spf13/cast"
Expand All @@ -52,7 +53,7 @@ var (
DefaultNodeHome = os.ExpandEnv("$HOME/.ixod")

// scheduled upgrades and forks
Upgrades = []upgrades.Upgrade{v2.Upgrade}
Upgrades = []upgrades.Upgrade{v2.Upgrade, v3.Upgrade}
Forks = []upgrades.Fork{}

// If EnableSpecificWasmProposals is "", and this is "true", then enable all x/wasm proposals.
Expand Down
3 changes: 3 additions & 0 deletions app/upgrades/v3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# v3

v3 release changes is availabale [here](https://github.com/ixofoundation/ixo-blockchain/releases/tag/v3.0.0).
16 changes: 16 additions & 0 deletions app/upgrades/v3/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package v3

import (
store "github.com/cosmos/cosmos-sdk/store/types"

"github.com/ixofoundation/ixo-blockchain/v2/app/upgrades"
)

// UpgradeName defines the on-chain upgrade name for the Ixo v3 upgrade.
const UpgradeName = "v3"

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: CreateUpgradeHandler,
StoreUpgrades: store.StoreUpgrades{},
}
25 changes: 25 additions & 0 deletions app/upgrades/v3/upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package v3

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
ctx.Logger().Info("🚀 executing Ixo v3 upgrade 🚀")

// Run migrations before applying any other state changes.
// NOTE: DO NOT PUT ANY STATE CHANGES BEFORE RunMigrations().
migrations, err := mm.RunMigrations(ctx, configurator, fromVM)
if err != nil {
return nil, err
}

return migrations, nil
}
}
Loading

0 comments on commit 2246089

Please sign in to comment.