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

Problem: no upgrade plan for testnet #1322

Merged
merged 5 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
### State Machine Breaking

- [#1318](https://github.com/crypto-org-chain/cronos/pull/1318) Add packet_sequence index in relayer event.
- [#1318](https://github.com/crypto-org-chain/cronos/pull/1318) Fix filter rule for eth_getLogs.
- [#1322](https://github.com/crypto-org-chain/cronos/pull/1322) Add `v1.1.0-testnet-1` upgrade plan for testnet.
mmsqe marked this conversation as resolved.
Show resolved Hide resolved

*February 5, 2024*

Expand Down
22 changes: 1 addition & 21 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,25 +119,12 @@
return m, nil
})

testnetPlanName := "v1.1.0-testnet"
testnetPlanName := "v1.1.0-testnet-1"

Check warning on line 122 in app/upgrades.go

View check run for this annotation

Codecov / codecov/patch

app/upgrades.go#L122

Added line #L122 was not covered by tests
app.UpgradeKeeper.SetUpgradeHandler(testnetPlanName, func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
m, err := app.mm.RunMigrations(ctx, app.configurator, fromVM)
if err != nil {
return m, err
}
params := app.CronosKeeper.GetParams(ctx)
params.MaxCallbackGas = cronostypes.MaxCallbackGasDefaultValue
if err := app.CronosKeeper.SetParams(ctx, params); err != nil {
return m, err
}

feeparams := app.FeeMarketKeeper.GetParams(ctx)
feeparams.BaseFeeChangeDenominator = 300
feeparams.ElasticityMultiplier = 4
feeparams.BaseFee = sdk.NewInt(10000000000000)
feeparams.MinGasPrice = sdk.NewDec(10000000000000)
app.FeeMarketKeeper.SetParams(ctx, feeparams)

return m, nil
})

Expand All @@ -159,13 +146,6 @@
},
}
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))
} else if upgradeInfo.Name == testnetPlanName {
storeUpgrades := storetypes.StoreUpgrades{
Deleted: []string{
authzkeeper.StoreKey,
},
}
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))
}
}
}
6 changes: 3 additions & 3 deletions integration_tests/configs/upgrade-testnet-test-package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ let
shortRev = builtins.substring 0 7 rev;
};
}).defaultNix;
# v1.1.0-rc1
released = (fetchFlake "crypto-org-chain/cronos" "e61acd9193ac455098987e578ee6374ecc249836").default;
# v1.1.0-rc3
released = (fetchFlake "crypto-org-chain/cronos" "b7b261a3652cdf3ee2e224e777a40ce6dbbb0da5").default;
current = pkgs.callPackage ../../. { };
in
pkgs.linkFarm "upgrade-test-package" [
{ name = "genesis"; path = released; }
{ name = "v1.1.0-testnet"; path = current; }
{ name = "v1.1.0-testnet-1"; path = current; }
]
2 changes: 1 addition & 1 deletion integration_tests/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def exec(c, tmp_path_factory, testnet=True):
)
print("old values", old_height, old_balance, old_base_fee)

plan_name = "v1.1.0-testnet" if testnet else "v1.1.0"
plan_name = "v1.1.0-testnet-1" if testnet else "v1.1.0"
rsp = cli.gov_propose_legacy(
"community",
"software-upgrade",
Expand Down
Loading