-
Notifications
You must be signed in to change notification settings - Fork 740
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
pallet-migrations: fix index access for singluar migrations #5695
Conversation
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
@@ -777,8 +777,10 @@ impl<T: SteppedMigration> SteppedMigrations for T { | |||
1 | |||
} | |||
|
|||
fn nth_id(_n: u32) -> Option<Vec<u8>> { | |||
Some(T::id().encode()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the actual issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh and this was not overwritten for a single migration that's not part of a tuple, right?
/cmd prdoc --pr 5695 --bump patch --audience "Runtime Dev" |
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
@@ -777,8 +777,10 @@ impl<T: SteppedMigration> SteppedMigrations for T { | |||
1 | |||
} | |||
|
|||
fn nth_id(_n: u32) -> Option<Vec<u8>> { | |||
Some(T::id().encode()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh and this was not overwritten for a single migration that's not part of a tuple, right?
Discovered a bug in the migrations pallet while debugging paritytech/try-runtime-cli#90. It only occurs when a single MBM is configured - hence it did not happen when Ajuna Network tried it... Changes: - Check len of the tuple before accessing its nth_id - Make nth_id return `None` on unary tuples and n>0 --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: ggwpez <[email protected]> (cherry picked from commit 0136463)
Discovered a bug in the migrations pallet while debugging paritytech/try-runtime-cli#90. It only occurs when a single MBM is configured - hence it did not happen when Ajuna Network tried it... Changes: - Check len of the tuple before accessing its nth_id - Make nth_id return `None` on unary tuples and n>0 --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: ggwpez <[email protected]> (cherry picked from commit 0136463)
Discovered a bug in the migrations pallet while debugging paritytech/try-runtime-cli#90. It only occurs when a single MBM is configured - hence it did not happen when Ajuna Network tried it... Changes: - Check len of the tuple before accessing its nth_id - Make nth_id return `None` on unary tuples and n>0 --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: ggwpez <[email protected]> (cherry picked from commit 0136463)
Git push to origin failed for stable2407 with exitcode 1 |
Discovered a bug in the migrations pallet while debugging paritytech/try-runtime-cli#90. It only occurs when a single MBM is configured - hence it did not happen when Ajuna Network tried it... Changes: - Check len of the tuple before accessing its nth_id - Make nth_id return `None` on unary tuples and n>0 --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: ggwpez <[email protected]> (cherry picked from commit 0136463)
Successfully created backport PR for |
Discovered a bug in the migrations pallet while debugging paritytech/try-runtime-cli#90. It only occurs when a single MBM is configured - hence it did not happen when Ajuna Network tried it... Changes: - Check len of the tuple before accessing its nth_id - Make nth_id return `None` on unary tuples and n>0 --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: ggwpez <[email protected]> (cherry picked from commit 0136463)
Successfully created backport PR for |
Git push to origin failed for stable2409 with exitcode 1 |
Backport #5695 into `stable2409` from ggwpez. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
Backport #5695 into `stable2407` from ggwpez. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
Discovered a bug in the migrations pallet while debugging paritytech/try-runtime-cli#90.
🚨 This can lead to your chain getting stuck. It happens when a single MBM is configured. Having no or more than one MBM will circumvent the issue.
Changes:
None
on unary tuples and n>0