From ea47c4cb05490b97533f3a3ffa1ad2081ec30223 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Sat, 14 Sep 2024 09:35:44 -0400 Subject: [PATCH] feat(cosmos): Next upgrade is agoric-upgrade-17 --- .../{n:upgrade-next => a:upgrade-17}/.gitignore | 0 .../.yarnrc.yml | 0 .../proposals/a:upgrade-17/README.md | 9 +++++++++ .../agd-tools.js | 0 .../initial.test.js | 0 .../localchain.test.js | 0 .../package.json | 5 +++-- .../{n:upgrade-next => a:upgrade-17}/prepare.sh | 0 .../priceFeed-follower-auction.test.js | 0 .../provisionPool.test.js | 0 .../synthetic-chain-excerpt.js | 0 .../{n:upgrade-next => a:upgrade-17}/test.sh | 0 .../tsconfig.json | 0 .../vatDetails.js | 0 .../{n:upgrade-next => a:upgrade-17}/yarn.lock | 0 .../proposals/n:upgrade-next/README.md | 14 -------------- golang/cosmos/app/app.go | 2 +- golang/cosmos/app/upgrade.go | 17 ++++------------- 18 files changed, 17 insertions(+), 30 deletions(-) rename a3p-integration/proposals/{n:upgrade-next => a:upgrade-17}/.gitignore (100%) rename a3p-integration/proposals/{n:upgrade-next => a:upgrade-17}/.yarnrc.yml (100%) create mode 100644 a3p-integration/proposals/a:upgrade-17/README.md rename a3p-integration/proposals/{n:upgrade-next => a:upgrade-17}/agd-tools.js (100%) rename a3p-integration/proposals/{n:upgrade-next => a:upgrade-17}/initial.test.js (100%) rename a3p-integration/proposals/{n:upgrade-next => a:upgrade-17}/localchain.test.js (100%) rename a3p-integration/proposals/{n:upgrade-next => a:upgrade-17}/package.json (89%) rename a3p-integration/proposals/{n:upgrade-next => a:upgrade-17}/prepare.sh (100%) rename a3p-integration/proposals/{n:upgrade-next => a:upgrade-17}/priceFeed-follower-auction.test.js (100%) rename a3p-integration/proposals/{n:upgrade-next => a:upgrade-17}/provisionPool.test.js (100%) rename a3p-integration/proposals/{n:upgrade-next => a:upgrade-17}/synthetic-chain-excerpt.js (100%) rename a3p-integration/proposals/{n:upgrade-next => a:upgrade-17}/test.sh (100%) rename a3p-integration/proposals/{n:upgrade-next => a:upgrade-17}/tsconfig.json (100%) rename a3p-integration/proposals/{n:upgrade-next => a:upgrade-17}/vatDetails.js (100%) rename a3p-integration/proposals/{n:upgrade-next => a:upgrade-17}/yarn.lock (100%) delete mode 100644 a3p-integration/proposals/n:upgrade-next/README.md diff --git a/a3p-integration/proposals/n:upgrade-next/.gitignore b/a3p-integration/proposals/a:upgrade-17/.gitignore similarity index 100% rename from a3p-integration/proposals/n:upgrade-next/.gitignore rename to a3p-integration/proposals/a:upgrade-17/.gitignore diff --git a/a3p-integration/proposals/n:upgrade-next/.yarnrc.yml b/a3p-integration/proposals/a:upgrade-17/.yarnrc.yml similarity index 100% rename from a3p-integration/proposals/n:upgrade-next/.yarnrc.yml rename to a3p-integration/proposals/a:upgrade-17/.yarnrc.yml diff --git a/a3p-integration/proposals/a:upgrade-17/README.md b/a3p-integration/proposals/a:upgrade-17/README.md new file mode 100644 index 00000000000..997f5e7dd1a --- /dev/null +++ b/a3p-integration/proposals/a:upgrade-17/README.md @@ -0,0 +1,9 @@ +# Proposal to upgrade the chain software + +This holds the draft proposal for agoric-upgrade-17, which will be added to +[agoric-3-proposals](https://github.com/Agoric/agoric-3-proposals) after it +passes. + +The "binaries" property of `upgradeInfo` is now required since Cosmos SDK 0.46, +however it cannot be computed for an unreleased upgrade. To disable the check, +`releaseNotes` is set to `false`. diff --git a/a3p-integration/proposals/n:upgrade-next/agd-tools.js b/a3p-integration/proposals/a:upgrade-17/agd-tools.js similarity index 100% rename from a3p-integration/proposals/n:upgrade-next/agd-tools.js rename to a3p-integration/proposals/a:upgrade-17/agd-tools.js diff --git a/a3p-integration/proposals/n:upgrade-next/initial.test.js b/a3p-integration/proposals/a:upgrade-17/initial.test.js similarity index 100% rename from a3p-integration/proposals/n:upgrade-next/initial.test.js rename to a3p-integration/proposals/a:upgrade-17/initial.test.js diff --git a/a3p-integration/proposals/n:upgrade-next/localchain.test.js b/a3p-integration/proposals/a:upgrade-17/localchain.test.js similarity index 100% rename from a3p-integration/proposals/n:upgrade-next/localchain.test.js rename to a3p-integration/proposals/a:upgrade-17/localchain.test.js diff --git a/a3p-integration/proposals/n:upgrade-next/package.json b/a3p-integration/proposals/a:upgrade-17/package.json similarity index 89% rename from a3p-integration/proposals/n:upgrade-next/package.json rename to a3p-integration/proposals/a:upgrade-17/package.json index c3bd2a7c3c1..e9f0eef469d 100644 --- a/a3p-integration/proposals/n:upgrade-next/package.json +++ b/a3p-integration/proposals/a:upgrade-17/package.json @@ -2,9 +2,10 @@ "agoricProposal": { "releaseNotes": false, "sdkImageTag": "unreleased", - "planName": "UNRELEASED_A3P_INTEGRATION", + "planName": "agoric-upgrade-17", "upgradeInfo": { - "coreProposals": [] + "coreProposals": [], + "releaseNotes": false }, "sdk-generate": [ "vats/test-localchain.js localchaintest-submission", diff --git a/a3p-integration/proposals/n:upgrade-next/prepare.sh b/a3p-integration/proposals/a:upgrade-17/prepare.sh similarity index 100% rename from a3p-integration/proposals/n:upgrade-next/prepare.sh rename to a3p-integration/proposals/a:upgrade-17/prepare.sh diff --git a/a3p-integration/proposals/n:upgrade-next/priceFeed-follower-auction.test.js b/a3p-integration/proposals/a:upgrade-17/priceFeed-follower-auction.test.js similarity index 100% rename from a3p-integration/proposals/n:upgrade-next/priceFeed-follower-auction.test.js rename to a3p-integration/proposals/a:upgrade-17/priceFeed-follower-auction.test.js diff --git a/a3p-integration/proposals/n:upgrade-next/provisionPool.test.js b/a3p-integration/proposals/a:upgrade-17/provisionPool.test.js similarity index 100% rename from a3p-integration/proposals/n:upgrade-next/provisionPool.test.js rename to a3p-integration/proposals/a:upgrade-17/provisionPool.test.js diff --git a/a3p-integration/proposals/n:upgrade-next/synthetic-chain-excerpt.js b/a3p-integration/proposals/a:upgrade-17/synthetic-chain-excerpt.js similarity index 100% rename from a3p-integration/proposals/n:upgrade-next/synthetic-chain-excerpt.js rename to a3p-integration/proposals/a:upgrade-17/synthetic-chain-excerpt.js diff --git a/a3p-integration/proposals/n:upgrade-next/test.sh b/a3p-integration/proposals/a:upgrade-17/test.sh similarity index 100% rename from a3p-integration/proposals/n:upgrade-next/test.sh rename to a3p-integration/proposals/a:upgrade-17/test.sh diff --git a/a3p-integration/proposals/n:upgrade-next/tsconfig.json b/a3p-integration/proposals/a:upgrade-17/tsconfig.json similarity index 100% rename from a3p-integration/proposals/n:upgrade-next/tsconfig.json rename to a3p-integration/proposals/a:upgrade-17/tsconfig.json diff --git a/a3p-integration/proposals/n:upgrade-next/vatDetails.js b/a3p-integration/proposals/a:upgrade-17/vatDetails.js similarity index 100% rename from a3p-integration/proposals/n:upgrade-next/vatDetails.js rename to a3p-integration/proposals/a:upgrade-17/vatDetails.js diff --git a/a3p-integration/proposals/n:upgrade-next/yarn.lock b/a3p-integration/proposals/a:upgrade-17/yarn.lock similarity index 100% rename from a3p-integration/proposals/n:upgrade-next/yarn.lock rename to a3p-integration/proposals/a:upgrade-17/yarn.lock diff --git a/a3p-integration/proposals/n:upgrade-next/README.md b/a3p-integration/proposals/n:upgrade-next/README.md deleted file mode 100644 index e4f2a2e1f16..00000000000 --- a/a3p-integration/proposals/n:upgrade-next/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Proposal to upgrade the chain software - -The `UNRELEASED_A3P_INTEGRATION` software upgrade may include core proposals -defined in its upgrade handler. See `CoreProposalSteps` in the -`unreleasedUpgradeHandler` in -[golang/cosmos/app/upgrade.go](../../../golang/cosmos/app/upgrade.go). - -This test proposal may also include `coreProposals` in its `upgradeInfo`, which -are executed after those defined in that upgrade handler. See `agoricProposal` -in [package.json](./package.json). - -The "binaries" property of `upgradeInfo` is now required since Cosmos SDK 0.46, -however it cannot be computed for an unreleased upgrade. To disable the check, -`releaseNotes` is set to `false`. diff --git a/golang/cosmos/app/app.go b/golang/cosmos/app/app.go index 52eb932eaa0..8d301b7ada6 100644 --- a/golang/cosmos/app/app.go +++ b/golang/cosmos/app/app.go @@ -876,7 +876,7 @@ func NewAgoricApp( for _, name := range upgradeNamesOfThisVersion { app.UpgradeKeeper.SetUpgradeHandler( name, - unreleasedUpgradeHandler(app, name), + upgrade17Handler(app, name), ) } diff --git a/golang/cosmos/app/upgrade.go b/golang/cosmos/app/upgrade.go index 12cd6eb4a77..91f16ed5640 100644 --- a/golang/cosmos/app/upgrade.go +++ b/golang/cosmos/app/upgrade.go @@ -11,11 +11,7 @@ import ( ) var upgradeNamesOfThisVersion = []string{ - "UNRELEASED_BASIC", // no-frills - "UNRELEASED_A3P_INTEGRATION", - "UNRELEASED_main", - "UNRELEASED_devnet", - "UNRELEASED_REAPPLY", + "agoric-upgrade-17", } // isUpgradeNameOfThisVersion returns whether the provided plan name is a @@ -49,13 +45,8 @@ func isPrimaryUpgradeName(name string) bool { return false } switch name { - case validUpgradeName("UNRELEASED_BASIC"), - validUpgradeName("UNRELEASED_A3P_INTEGRATION"), - validUpgradeName("UNRELEASED_main"), - validUpgradeName("UNRELEASED_devnet"): + case validUpgradeName("agoric-upgrade-17"): return true - case validUpgradeName("UNRELEASED_REAPPLY"): - return false default: panic(fmt.Errorf("unexpected upgrade name %s", validUpgradeName(name))) } @@ -72,8 +63,8 @@ func isFirstTimeUpgradeOfThisVersion(app *GaiaApp, ctx sdk.Context) bool { return true } -// unreleasedUpgradeHandler performs standard upgrade actions plus custom actions for the unreleased upgrade. -func unreleasedUpgradeHandler(app *GaiaApp, targetUpgrade string) func(sdk.Context, upgradetypes.Plan, module.VersionMap) (module.VersionMap, error) { +// upgrade17Handler performs standard upgrade actions plus custom actions for upgrade-17. +func upgrade17Handler(app *GaiaApp, targetUpgrade string) func(sdk.Context, upgradetypes.Plan, module.VersionMap) (module.VersionMap, error) { return func(ctx sdk.Context, plan upgradetypes.Plan, fromVm module.VersionMap) (module.VersionMap, error) { app.CheckControllerInited(false)