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: Initialize dev-upgrade-17 #10088

Merged
merged 1 commit into from
Sep 16, 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
9 changes: 9 additions & 0 deletions a3p-integration/proposals/a:upgrade-17/README.md
Original file line number Diff line number Diff line change
@@ -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`.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
14 changes: 0 additions & 14 deletions a3p-integration/proposals/n:upgrade-next/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion golang/cosmos/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ func NewAgoricApp(
for _, name := range upgradeNamesOfThisVersion {
app.UpgradeKeeper.SetUpgradeHandler(
name,
unreleasedUpgradeHandler(app, name),
upgrade17Handler(app, name),
)
}

Expand Down
17 changes: 4 additions & 13 deletions golang/cosmos/app/upgrade.go
Copy link
Member

Choose a reason for hiding this comment

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

There is a change missing to isPrimaryUpgradeName

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, thanks. I think I'd like to refactor that function, but will do so on master. Updated here to keep the current form.

Copy link
Member Author

Choose a reason for hiding this comment

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

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)))
}
Expand All @@ -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)

Expand Down
Loading