-
Notifications
You must be signed in to change notification settings - Fork 5
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
Regen network/in place migrations #1
Conversation
To see the loading panic (with unknown store keys):
Output...
|
So here are my thoughts: There should be a method on type StoreUpgrades struct {
New []StoreKey
Renamed []StoreRename
Deleted []StoreKey
}
type StoreRename struct {
OldKey StoreKey
NewKey StoreKey
} The upgrade keeper gets these changes:
The reason for doing the upgrades in the new binary I can think of are:
How does that sound? |
Sounds good. I wonder if the cosmos team will approve this change to BaseApp, but since the framework isn't configurable enough to allow these changes without modifying the code, and this feature would be an essential piece of future apps, I think this should be fine. I would accept a |
Exactly. It doesn't even need to be a constructor param, it can be
SetUpgradeKeeper.
…On Mon, Jul 15, 2019, 04:56 Ethan Frey ***@***.***> wrote:
Sounds good. I wonder if the cosmos team will approve this change to
BaseApp, but since the framework isn't configurable enough to allow these
changes without modifying the code, and this feature would be an essential
piece of future apps, I think this should be fine.
I would accept a nil upgrade.Keeper in the constructor (actually just
refer to an interface with that one method), and do the normal load if not
present, so apps not using the upgrade module can work as normal. We just
add an optional hook for this, and don't directly import the module in
BaseApp either. This would be minimally invasive to others building on the
sdk and should be acceptable.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=AAAL6FVXSRQZ42BI5TYF55TP7Q3TPA5CNFSM4ICOTOIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ5CYNY#issuecomment-511323191>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAL6FXXCIQZ2PLCALBYLBTP7Q3TPANCNFSM4ICOTOIA>
.
|
I will make those changes in a different PR, rebased on the upgrade handler one |
This PR seems to contain quite important migrations (for supply): |
Implementation of LoadLatestVersionAndUpgrade along with the BaseApp changes are not ready for review in cosmos#4724 |
I would consider making a new "in-place migrations" branch based on top of cosmos#4724 to replace this one. Hopefully, that can pass basic tests. |
6e7b705
to
57e9aa9
Compare
I just added a db dump in last commit (which we don't want to merge... too big). Basic tests pass now, and nice example to set up using upgrades in the SimApp |
* require old chain halts before upgrade * Update proto/ibc/core/client/v1/client.proto Co-authored-by: Federico Kunze <[email protected]> * start address reviews * Apply suggestions from code review Co-authored-by: colin axnér <[email protected]> * address reviews * rework upgrade to ensure there is never more than one upgrade client in store * fix tests * fix conditional * make proto-gen * remove if statement skipping tests in upgrade keeper test * address reviews * correctly escape and unescape merkle keys * add small conditional check Co-authored-by: Federico Kunze <[email protected]> Co-authored-by: colin axnér <[email protected]> Co-authored-by: Colin Axner <[email protected]>
I moved this code to
regen-network/old-in-place-migrations
and pushing new code based on #2 to this branch (to keep the name).Idea is to create a unit test scenario for testing inplace migrations
Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/
)Added entries in
PENDING.md
with issue #rereviewed
Files changed
in the github PR explorerFor Admin Use: