Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: release v2.3.0-mainnet #660

Merged
merged 15 commits into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/on-chain-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
GENESIS_DESMOS_VERSION: "v2.2.1-testnet"
GENESIS_URL: "https://raw.githubusercontent.com/RiccardoM/desmos-states/master/morpheus-apollo-2-2721215.json"
UPGRADE_NAME: "v2.3.0"
GENESIS_DESMOS_VERSION: "v1.0.1"
GENESIS_URL: "https://raw.githubusercontent.com/RiccardoM/desmos-states/master/desmos-mainnet-780000.json"
Comment on lines +25 to +26
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to match the current mainnet data

UPGRADE_NAME: "v2.1.0"
RiccardoM marked this conversation as resolved.
Show resolved Hide resolved
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
Expand Down
32 changes: 29 additions & 3 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ import (
ibc "github.com/cosmos/ibc-go/modules/core"
ibcclientclient "github.com/cosmos/ibc-go/modules/core/02-client/client"
ibcclienttypes "github.com/cosmos/ibc-go/modules/core/02-client/types"
ibcconnectiontypes "github.com/cosmos/ibc-go/modules/core/03-connection/types"
porttypes "github.com/cosmos/ibc-go/modules/core/05-port/types"
ibchost "github.com/cosmos/ibc-go/modules/core/24-host"
ibckeeper "github.com/cosmos/ibc-go/modules/core/keeper"
Expand Down Expand Up @@ -99,6 +100,7 @@ import (
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"

storetypes "github.com/cosmos/cosmos-sdk/store/types"
vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
Expand Down Expand Up @@ -689,8 +691,30 @@ func (app *DesmosApp) RegisterTendermintService(clientCtx client.Context) {
}

func (app *DesmosApp) registerUpgradeHandlers() {
app.upgradeKeeper.SetUpgradeHandler("v2.3.0", func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
return app.mm.RunMigrations(ctx, app.configurator, vm)
app.upgradeKeeper.SetUpgradeHandler("v2.3.0", func(ctx sdk.Context, plan upgradetypes.Plan, _ module.VersionMap) (module.VersionMap, error) {
app.IBCKeeper.ConnectionKeeper.SetParams(ctx, ibcconnectiontypes.DefaultParams())
fromVM := map[string]uint64{
RiccardoM marked this conversation as resolved.
Show resolved Hide resolved
authtypes.ModuleName: 1,
banktypes.ModuleName: 1,
capabilitytypes.ModuleName: 1,
crisistypes.ModuleName: 1,
distrtypes.ModuleName: 1,
evidencetypes.ModuleName: 1,
govtypes.ModuleName: 1,
minttypes.ModuleName: 1,
paramstypes.ModuleName: 1,
slashingtypes.ModuleName: 1,
stakingtypes.ModuleName: 1,
upgradetypes.ModuleName: 1,
vestingtypes.ModuleName: 1,
ibchost.ModuleName: 1,
genutiltypes.ModuleName: 1,
ibctransfertypes.ModuleName: 1,

profilestypes.ModuleName: 1,
}

return app.mm.RunMigrations(ctx, app.configurator, fromVM)
})

upgradeInfo, err := app.upgradeKeeper.ReadUpgradeInfoFromDisk()
Expand All @@ -699,7 +723,9 @@ func (app *DesmosApp) registerUpgradeHandlers() {
}

if upgradeInfo.Name == "v2.3.0" && !app.upgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
storeUpgrades := storetypes.StoreUpgrades{}
storeUpgrades := storetypes.StoreUpgrades{
Added: []string{authz.ModuleName, feegrant.ModuleName},
}
RiccardoM marked this conversation as resolved.
Show resolved Hide resolved

// configure store loader that checks if version == upgradeHeight and applies store upgrades
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))
Expand Down
8 changes: 4 additions & 4 deletions contrib/upgrade_testnet/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '3'
services:
desmosnode0:
container_name: desmosnode0
image: "desmoslabs/desmos-cosmovisor:v2.0.0"
image: "desmoslabs/desmos-cosmovisor:v1.0.1"
RiccardoM marked this conversation as resolved.
Show resolved Hide resolved
command: "start"
ports:
- "26656-26657:26656-26657"
Expand All @@ -19,7 +19,7 @@ services:

desmosnode1:
container_name: desmosnode1
image: "desmoslabs/desmos-cosmovisor:v2.0.0"
image: "desmoslabs/desmos-cosmovisor:v1.0.1"
command: "start"
ports:
- "26666-26667:26656-26657"
Expand All @@ -35,7 +35,7 @@ services:

desmosnode2:
container_name: desmosnode2
image: "desmoslabs/desmos-cosmovisor:v2.0.0"
image: "desmoslabs/desmos-cosmovisor:v1.0.1"
command: "start"
ports:
- "26676-26677:26656-26657"
Expand All @@ -51,7 +51,7 @@ services:

desmosnode3:
container_name: desmosnode3
image: "desmoslabs/desmos-cosmovisor:v2.0.0"
image: "desmoslabs/desmos-cosmovisor:v1.0.1"
command: "start"
ports:
- "26686-26687:26656-26657"
Expand Down
2 changes: 1 addition & 1 deletion contrib/upgrade_testnet/submit_upgrade_proposal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ sleep 6s

echo ""
echo "===> Getting proposal id"
PROPOSAL_ID=$(desmos q tx $TX_HASH --output json 2>&1 | jq .logs[0].events[4].attributes[0].value -r)
PROPOSAL_ID=$(desmos q tx $TX_HASH --output json 2>&1 | jq .logs[0].events[2].attributes[0].value -r)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert the changes to match Cosmos v0.42 events list

echo "Proposal ID: $PROPOSAL_ID"

echo ""
Expand Down