You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make an interface with four methods, describing an upgrade:
type Upgrade interface {
UpgradeVersion() String // e.g. v7
UpgradeHeight() int64
CreateUpgradeHandler(mm, configurator, keepers) upgradetypes.UpgradeHandler
StoreUpgrades() store.StoreUpgrades
// Perhaps should be a separate interface? It gets called in begin block once, to do some quick migration in case of a hard fork not going through upgrades module.
RunForkLogic(ctx)
}
Then we just make a list of upgrader structs in the app.go, and have a standalone routine that registers the handlers, beginblock & store loader updates.
The text was updated successfully, but these errors were encountered:
Closes: #1375
## What is the purpose of the change
Simplifies a lot of the upgrades management logic / boilerplate. The goal is that every new upgrade should from the app.go level, just require a one line update. And all the complexity would otherwise be held to within each upgrades module.
This PR is marked as draft until Changelog update + docs update to the `app/upgrades` README.
## Brief change log
* Introduces an Upgrade and Fork struct
* Adapt existing upgrades to use it
## Testing and Verifying
This should be covered by the existing test for the v4 upgrade, which tests that upgrade handler execution happens.
## Documentation and Release Note
- Does this pull request introduce a new feature or user-facing behavior changes? no
- Is a relevant changelog entry added to the `Unreleased` section in `CHANGELOG.md`? Needs to be Done
- How is the feature or change documented? (not applicable / specification (`x/<module>/spec/`) / [Osmosis docs repo](https://github.com/osmosis-labs/docs) / not documented)
We need to make the following improvements to our upgrades packages:
Define a type alias for Create Upgrade Handler
Make an interface with four methods, describing an upgrade:
Then we just make a list of upgrader structs in the
app.go
, and have a standalone routine that registers the handlers, beginblock & store loader updates.The text was updated successfully, but these errors were encountered: