-
Notifications
You must be signed in to change notification settings - Fork 15
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
Dry-run multi-block migrations #17
Comments
The inherents issue is fixed, so this is unblocked :) |
Broadly, there seem to be two approaches we could take for adding 1. Run MBMs in existing
|
Yea i think initially we can do option 1, to get something going quick since the first MBMs are being written.
"should not" and "do not" is exactly why we need to test it. Streaming some data in from an inherent to a MBM would work i guess - but very non-standard to do. |
My main reservation towards option 1 is that it might miss something like checking the weight of each step. Can we strictly ensure that a dry-run-ed MBM with approach 1 will detect if it is overweight? If these two are the only options, I would also lean towards 1. I agree that getting something out the door to test MBMs is important and trumps everything else. But, even though I would support a more sophisticated approach, I don't like option 2 per-se, as it is not the right abstraction. If try-runtime provides a good system to expresses "please dry-run 5 empty blocks for me", which was always part of the plan, testing MBMs is more or less trivial. I think this is what we should aim for, and then testing all types of migrations will be a specialized version of this. In other words, if try-runtime can create empty blocks for a given, which I believe with the correct inherent extension it can, even the existing Even now, I believe the main advantage of |
It seems there is consensus that we should pursue option 2, even if it will take longer. My first question about implementing it is what is the best way to get the MBM migration status from try-runtime-cli while mining empty blocks? Initially I was thinking to directly query the event storage, but I don't think I'd be able to decode it because the We also I don't think can query the pallet storage directly, because the key it's under varies across runtimes. We could introduce a new runtime api for querying MBM status, but that's far less than ideal because it creates non-trivial work for runtime devs to implement. The approach that seems best would be to modify @bkchr @ggwpez @kianenigma let me know if this sounds sensible. |
I think this new return type of https://paritytech.github.io/polkadot-sdk/master/sp_runtime/enum.ExtrinsicInclusionMode.html I think if you update this code to respect this new type, you would already have MBM testing done: try-runtime-cli/core/src/commands/fast_forward.rs Lines 153 to 222 in 226514e
|
I think just for PoC, we can also use chopsticks, since it exposes a block-mining RPC and the possibility to decode events.
Kind of, yes. Although there is a hail-mary last resort option, where a failed migration can decide what to do. In that case, one option is |
Unfortunately as @ggwpez said just checking the
I am worried devex will suck if we start requiring two completely different tools to test a runtime upgrade. Also, I'm not sure Chopsticks handles pre/post hooks. For now proceed with modifying the |
What solid MBM status? What do you need to know besides if they are still running? |
Need to also know whether or not it succeeded. |
Hmm? Run |
Do you mean some try-runtime feature-gated code that will panic if the MBMs fail? |
No I mean as we have for |
Original issue paritytech/substrate#14291
Originally posted by @liamaharon in paritytech/substrate#14275 (comment)
Kian response:
The text was updated successfully, but these errors were encountered: