From 8892bdac9fdc27b1a1a138c87c60cc476047a633 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 19 Feb 2024 20:14:10 +0800 Subject: [PATCH 1/5] Problem: no upgrade plan for testnet --- CHANGELOG.md | 1 + app/upgrades.go | 15 +-------------- .../configs/upgrade-testnet-test-package.nix | 2 +- integration_tests/test_upgrade.py | 2 +- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b72b891f6..d3e56a2bae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### State Machine Breaking - [#1318](https://github.com/crypto-org-chain/cronos/pull/1318) Add packet_sequence index in relayer event. +- [#](https://github.com/crypto-org-chain/cronos/pull/) Add `v1.1.0-testnet-1` upgrade plan for testnet. *February 5, 2024* diff --git a/app/upgrades.go b/app/upgrades.go index 8747431025..fa7564a67c 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -119,25 +119,12 @@ func (app *App) RegisterUpgradeHandlers(cdc codec.BinaryCodec, clientKeeper clie return m, nil }) - testnetPlanName := "v1.1.0-testnet" + testnetPlanName := "v1.1.0-testnet-1" 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 }) diff --git a/integration_tests/configs/upgrade-testnet-test-package.nix b/integration_tests/configs/upgrade-testnet-test-package.nix index 709e8080f7..c4372c68bf 100644 --- a/integration_tests/configs/upgrade-testnet-test-package.nix +++ b/integration_tests/configs/upgrade-testnet-test-package.nix @@ -13,5 +13,5 @@ let 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; } ] diff --git a/integration_tests/test_upgrade.py b/integration_tests/test_upgrade.py index b5ae672788..54cdb6813e 100644 --- a/integration_tests/test_upgrade.py +++ b/integration_tests/test_upgrade.py @@ -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", From 41507176732e7d22b11e53a30d467ae49fabe2ea Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 19 Feb 2024 20:15:14 +0800 Subject: [PATCH 2/5] Update CHANGELOG.md Signed-off-by: mmsqe --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3e56a2bae..20d53e6f87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ ### State Machine Breaking - [#1318](https://github.com/crypto-org-chain/cronos/pull/1318) Add packet_sequence index in relayer event. -- [#](https://github.com/crypto-org-chain/cronos/pull/) Add `v1.1.0-testnet-1` upgrade plan for testnet. +- [#1322](https://github.com/crypto-org-chain/cronos/pull/1322) Add `v1.1.0-testnet-1` upgrade plan for testnet. *February 5, 2024* From ec57b6cc9df892d233cd60f706c38163c6f183db Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 19 Feb 2024 20:28:16 +0800 Subject: [PATCH 3/5] fix test --- integration_tests/test_upgrade.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/integration_tests/test_upgrade.py b/integration_tests/test_upgrade.py index 54cdb6813e..f311bbee05 100644 --- a/integration_tests/test_upgrade.py +++ b/integration_tests/test_upgrade.py @@ -206,8 +206,6 @@ def exec(c, tmp_path_factory, testnet=True): rsp = cli.query_params("icaauth") assert rsp["params"]["min_timeout_duration"] == "3600s", rsp - max_callback_gas = cli.query_params()["max_callback_gas"] - assert max_callback_gas == "50000", max_callback_gas if not testnet: # migrate to sdk v0.47 c.supervisorctl("stop", "all") From 44a08a0f6092d12125ca6acf466dfc54a7a9d424 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 19 Feb 2024 20:41:39 +0800 Subject: [PATCH 4/5] Update CHANGELOG.md Co-authored-by: yihuang Signed-off-by: mmsqe --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20d53e6f87..05dd566cc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### 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. *February 5, 2024* From 90610b49c2e5ea2cf8018893881560f8081489c7 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 19 Feb 2024 21:08:14 +0800 Subject: [PATCH 5/5] cleanup --- app/upgrades.go | 7 ------- integration_tests/configs/upgrade-testnet-test-package.nix | 4 ++-- integration_tests/test_upgrade.py | 2 ++ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/app/upgrades.go b/app/upgrades.go index fa7564a67c..b26c55c034 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -146,13 +146,6 @@ func (app *App) RegisterUpgradeHandlers(cdc codec.BinaryCodec, clientKeeper clie }, } 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)) } } } diff --git a/integration_tests/configs/upgrade-testnet-test-package.nix b/integration_tests/configs/upgrade-testnet-test-package.nix index c4372c68bf..3ba625a91d 100644 --- a/integration_tests/configs/upgrade-testnet-test-package.nix +++ b/integration_tests/configs/upgrade-testnet-test-package.nix @@ -7,8 +7,8 @@ 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" [ diff --git a/integration_tests/test_upgrade.py b/integration_tests/test_upgrade.py index f311bbee05..54cdb6813e 100644 --- a/integration_tests/test_upgrade.py +++ b/integration_tests/test_upgrade.py @@ -206,6 +206,8 @@ def exec(c, tmp_path_factory, testnet=True): rsp = cli.query_params("icaauth") assert rsp["params"]["min_timeout_duration"] == "3600s", rsp + max_callback_gas = cli.query_params()["max_callback_gas"] + assert max_callback_gas == "50000", max_callback_gas if not testnet: # migrate to sdk v0.47 c.supervisorctl("stop", "all")