Skip to content

Commit

Permalink
feat(cosmos): Next upgrade is agoric-upgrade-16 (#9565)
Browse files Browse the repository at this point in the history
## Description

Updates the upgrade handler for `upgrade-16`. 

### Security Considerations

None

### Scaling Considerations

None

### Documentation Considerations

A new release will be created from this which will contain the usual
documentation

### Testing Considerations

a3p integration tests updated

### Upgrade Considerations

Next chain software upgrade
  • Loading branch information
mhofman committed Jun 22, 2024
1 parent d492653 commit d45b478
Show file tree
Hide file tree
Showing 22 changed files with 12 additions and 18 deletions.
2 changes: 1 addition & 1 deletion a3p-integration/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"agoricSyntheticChain": {
"fromTag": "latest"
"fromTag": "use-upgrade-15"
},
"scripts": {
"build": "yarn run build:sdk && yarn run build:submissions && yarn run build:synthetic-chain",
Expand Down
5 changes: 5 additions & 0 deletions a3p-integration/proposals/a:upgrade-16/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Proposal to upgrade the chain software to agoric-upgrade-16

The `agoric-upgrade-16` software upgrade executes core proposals defined in
its upgrade handler. See `CoreProposalSteps` in the `upgrade16Handler` in
[golang/cosmos/app/app.go](../../../golang/cosmos/app/app.go).
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"agoricProposal": {
"releaseNotes": false,
"sdkImageTag": "unreleased",
"planName": "UNRELEASED_UPGRADE",
"planName": "agoric-upgrade-16",
"upgradeInfo": {
"coreProposals": []
},
Expand Down
11 changes: 0 additions & 11 deletions a3p-integration/proposals/a:upgrade-next/README.md

This file was deleted.

10 changes: 5 additions & 5 deletions golang/cosmos/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ func NewAgoricApp(
for name := range upgradeNamesOfThisVersion {
app.UpgradeKeeper.SetUpgradeHandler(
name,
unreleasedUpgradeHandler(app, name),
upgrade16Handler(app, name),
)
}

Expand Down Expand Up @@ -908,8 +908,8 @@ func NewAgoricApp(
}

var upgradeNamesOfThisVersion = map[string]bool{
"UNRELEASED_UPGRADE": true,
"UNRELEASED_TEST_UPGRADE": true,
"agoric-upgrade-16": true,
"agorictest-upgrade-16": true,
}

func isFirstTimeUpgradeOfThisVersion(app *GaiaApp, ctx sdk.Context) bool {
Expand All @@ -921,8 +921,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) {
// upgrade16Handler performs standard upgrade actions plus custom actions for upgrade-16.
func upgrade16Handler(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

0 comments on commit d45b478

Please sign in to comment.