-
Notifications
You must be signed in to change notification settings - Fork 97
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
State migration #74
Comments
@cheme could you please post some status on what needs to be done for Kusama? Aka does the migration works on its own or is that driven by some offchain thingy? After Kusama was successful, we should also directly start doing it for Polkadot. |
Looks ready to go with next kusuma runtime. This line set at 1 (switch to hybrid state when new runtime released) : runtimes/relay/kusama/src/lib.rs Line 146 in 94b2798
Start of migration added to Unreleased runtimes/relay/kusama/src/lib.rs Line 1731 in 94b2798
Unrealeased set as runtime migration https://github.com/polkadot-fellows/runtimes/blob/94b2798b69ba6779764e20a50f056e48db78ebef/relay/kusama/src/lib.rs#L1654C35-L1654C35 Not that if there is many migration runing together, might be an idea to lower the limit per block: runtimes/relay/kusama/src/lib.rs Line 2714 in 94b2798
here up to 4800 item or 408000 octet which in case of max out blocks can add : runtimes/relay/kusama/src/lib.rs Line 1468 in 94b2798
Warning if the start line get remove from unreleased, the line 146 must be set to 0 (to avoid hybrid state). |
@bkchr the weight use in each block is an important point that should be in release note I think. As a relay chain we could also ignore this weight to prevent any issue. |
actually I did use 2 * 10 ^ 12 for block weight but on relay it may be 6*10^12 so would not be worrying then |
The migration will run entirely on chain and doesn't require any external interactions? |
on chain, no possible external interactions. |
Kusama is done? I queried
The Events also look fine. Just ~480 blocks to migrate everything? Looks like it did about 4800 keys in some blocks, nice 😳 |
4800 was the limit indeed. |
I just tried and it still works. |
@cheme so did it finished successfully? |
Yes, but if warp sync did pass, all is fine. |
@cheme can you prepare the changes for Polkadot? |
Will do (tomorrow most likely), I think since block time is longer on polkadot, keeping the same config as kusuma should be fine. |
Ping @cheme |
BTW, we also need to migrate the system chains. |
#170 But the manual rpc approach can probably do the job, just the amount of energy to manage that worries me (and also the fact that we rely on a dedicated external trusted entity). |
Ohh fuck, have overseen this! Sorry!
I thought this was also just some bot doing this? Or what you mean by manual in this case? |
yes manual by a bot, still need to run the bot (need slashable fee deposit, also I am not sure anymore if it should target a specific account (seems like a liability: should be open to everyone, but I don't remember how we ensure a single call is done per blocks). |
I mean just opening this for one account sounds fine to me. I mean we are speaking here about a one time migration.
This could be done with a storage value that is set to |
So the kusama state is 240 MiB? interesting. I am still missing a tool like paritytech/polkadot-sdk#449, I wonder if there is an ecosystem tool for this that I am not aware of? |
@cheme I would not use the automatic migration on a system chain, as any error will likely cause the parachain to stop. Maybe on a kusama system chain, but 100% not for Polkadot. I wrote a TS bot that still should work fine to trigger the migrations one by one, and it should all be free. Have we ever used the signed migration? ref: https://github.com/paritytech/polkadot-scripts/blob/master/src/services/state_trie_migration.ts |
Long time ago we did some with @PierreBesson when doing rococo and westand (I think statemine). But for me it is a bit too long ago. |
After Polkadot is done, we need to work on the parachains. As said above, I don't see any real problem in using the offchain bot. |
I added a list to the issue description. Please tick of the ones that are done. |
Kusama is already done. Polkadot should be finished after the next runtime upgrade. |
@cheme can you please also add it for the missing ones? |
is there new ones? (I mean asset-hub and collectives were done). |
We need to migrate all parachains and relay chain to state version 1. There is a pallet for doing this. With 1.0.0 Kusama will enable the state migration. After that we also need to migrate the parachains and Polkadot and its parachains. This issue works as a tracking issue.
Bridge-Hub [ ], [ ], [ ], [ ]Bridge-Hub [ ], [ ], [ ], [ ]Coretime [ ], [ ], [ ], [ ]Glutton [ ], [ ], [ ], [ ]People [ ], [ ], [ ], [ ]Three check marks: migration deployed, RPC reports done, migration removed from the runtime.
The text was updated successfully, but these errors were encountered: