Skip to content

Moves single block migrations from frame_executive to frame_system config#844

Merged
bkchr merged 9 commits into
polkadot-fellows:mainfrom
RomarQ:rq/move-single-block-migrations
Oct 12, 2025
Merged

Moves single block migrations from frame_executive to frame_system config#844
bkchr merged 9 commits into
polkadot-fellows:mainfrom
RomarQ:rq/move-single-block-migrations

Conversation

@RomarQ

@RomarQ RomarQ commented Aug 7, 2025

Copy link
Copy Markdown
Contributor

Depends on paritytech/polkadot-sdk#9451

Based on PR paritytech/polkadot-sdk#1781 and PRDoc, the new way for providing the single block migrations should be through SingleBlockMigrations in frame_system::Config. Providing them from frame_executive::Executive is still supported, but from what I understood is or will be deprecated.

SingleBlockMigrations this is the new way of configuring migrations that run in a single block. Previously they were defined as last generic argument of Executive. This shift is brings all central configuration about migrations closer into view of the developer (migrations that are configured in Executive will still work for now but is deprecated).

Will also open a PR on polkadot-sdk side, adding a deprecation warning.

@ggwpez ggwpez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like some pallets are actually missing migrations. Can you please add them so that the check will be green?

Thanks for the MR!

@RomarQ

RomarQ commented Aug 7, 2025

Copy link
Copy Markdown
Contributor Author

It looks like some pallets are actually missing migrations. Can you please add them so that the check will be green?

Thanks for the MR!

Yes, it requires a fix on the polkadot-sdk side, will open a PR there later today or tomorrow:

image

@RomarQ

RomarQ commented Aug 7, 2025

Copy link
Copy Markdown
Contributor Author

Should be fixed once we merge paritytech/polkadot-sdk#9451 and the changes are backported. Will change the PR status to DRAFT for now.

@RomarQ RomarQ marked this pull request as draft August 7, 2025 20:59
github-merge-queue Bot pushed a commit to paritytech/polkadot-sdk that referenced this pull request Sep 2, 2025
…e_upgrade (#9451)

Recently, when moving the single block migrations from
`frame_executive::Executive` to `SingleBlockMigrations` in
`frame_system::Config`, I noticed that `try_runtime_upgrade` was
ignoring the `SingleBlockMigrations` defined in frame_system. More
context at polkadot-fellows/runtimes#844

Based on PR #1781 and
[PRDoc](https://github.com/paritytech/polkadot-sdk/blob/beb9030b249cc078b3955232074a8495e7e0302a/prdoc/1.9.0/pr_1781.prdoc#L29),
the new way for providing the single block migrations should be through
`SingleBlockMigrations` in `frame_system::Config`. Providing them from
`frame_executive::Executive` is still supported, but from what I
understood is or will be deprecated.

> `SingleBlockMigrations` this is the new way of configuring migrations
that run in a single block. Previously they were defined as last generic
argument of Executive. This shift is brings all central configuration
about migrations closer into view of the developer (migrations that are
configured in Executive will still work for now but is deprecated).

## Follow-up Changes
Will try to open a pull request tomorrow for deprecating the use of
`OnRuntimeUpgrade` in `frame_executive::Executive`.
paritytech-release-backport-bot Bot pushed a commit to paritytech/polkadot-sdk that referenced this pull request Sep 2, 2025
…e_upgrade (#9451)

Recently, when moving the single block migrations from
`frame_executive::Executive` to `SingleBlockMigrations` in
`frame_system::Config`, I noticed that `try_runtime_upgrade` was
ignoring the `SingleBlockMigrations` defined in frame_system. More
context at polkadot-fellows/runtimes#844

Based on PR #1781 and
[PRDoc](https://github.com/paritytech/polkadot-sdk/blob/beb9030b249cc078b3955232074a8495e7e0302a/prdoc/1.9.0/pr_1781.prdoc#L29),
the new way for providing the single block migrations should be through
`SingleBlockMigrations` in `frame_system::Config`. Providing them from
`frame_executive::Executive` is still supported, but from what I
understood is or will be deprecated.

> `SingleBlockMigrations` this is the new way of configuring migrations
that run in a single block. Previously they were defined as last generic
argument of Executive. This shift is brings all central configuration
about migrations closer into view of the developer (migrations that are
configured in Executive will still work for now but is deprecated).

## Follow-up Changes
Will try to open a pull request tomorrow for deprecating the use of
`OnRuntimeUpgrade` in `frame_executive::Executive`.

(cherry picked from commit 7753112)
paritytech-release-backport-bot Bot pushed a commit to paritytech/polkadot-sdk that referenced this pull request Sep 2, 2025
…e_upgrade (#9451)

Recently, when moving the single block migrations from
`frame_executive::Executive` to `SingleBlockMigrations` in
`frame_system::Config`, I noticed that `try_runtime_upgrade` was
ignoring the `SingleBlockMigrations` defined in frame_system. More
context at polkadot-fellows/runtimes#844

Based on PR #1781 and
[PRDoc](https://github.com/paritytech/polkadot-sdk/blob/beb9030b249cc078b3955232074a8495e7e0302a/prdoc/1.9.0/pr_1781.prdoc#L29),
the new way for providing the single block migrations should be through
`SingleBlockMigrations` in `frame_system::Config`. Providing them from
`frame_executive::Executive` is still supported, but from what I
understood is or will be deprecated.

> `SingleBlockMigrations` this is the new way of configuring migrations
that run in a single block. Previously they were defined as last generic
argument of Executive. This shift is brings all central configuration
about migrations closer into view of the developer (migrations that are
configured in Executive will still work for now but is deprecated).

## Follow-up Changes
Will try to open a pull request tomorrow for deprecating the use of
`OnRuntimeUpgrade` in `frame_executive::Executive`.

(cherry picked from commit 7753112)
@RomarQ RomarQ marked this pull request as ready for review September 4, 2025 14:51
github-merge-queue Bot pushed a commit to paritytech/polkadot-sdk that referenced this pull request Sep 11, 2025
#9638)

Follow-up of #9451

Based on PR #1781 and
[PRDoc](https://github.com/paritytech/polkadot-sdk/blob/beb9030b249cc078b3955232074a8495e7e0302a/prdoc/1.9.0/pr_1781.prdoc#L29),
the new way for providing the single block migrations should be through
`SingleBlockMigrations` in `frame_system::Config`. Providing them from
`frame_executive::Executive` is still supported, but is deprecated.

> `SingleBlockMigrations` this is the new way of configuring migrations
that run in a single block. Previously they were defined as last generic
argument of Executive. This shift is brings all central configuration
about migrations closer into view of the developer (migrations that are
configured in Executive will still work for now but is deprecated).

`Executive` docs will look like:

<img width="800" alt="image"
src="https://github.com/user-attachments/assets/6f285c26-5c61-4350-a41b-aebc6b856601"
/>

Companion PR in polkadot-fellows/runtimes#844
github-merge-queue Bot pushed a commit to paritytech/polkadot-sdk that referenced this pull request Sep 12, 2025
#9638)

Follow-up of #9451

Based on PR #1781 and
[PRDoc](https://github.com/paritytech/polkadot-sdk/blob/beb9030b249cc078b3955232074a8495e7e0302a/prdoc/1.9.0/pr_1781.prdoc#L29),
the new way for providing the single block migrations should be through
`SingleBlockMigrations` in `frame_system::Config`. Providing them from
`frame_executive::Executive` is still supported, but is deprecated.

> `SingleBlockMigrations` this is the new way of configuring migrations
that run in a single block. Previously they were defined as last generic
argument of Executive. This shift is brings all central configuration
about migrations closer into view of the developer (migrations that are
configured in Executive will still work for now but is deprecated).

`Executive` docs will look like:

<img width="800" alt="image"
src="https://github.com/user-attachments/assets/6f285c26-5c61-4350-a41b-aebc6b856601"
/>

Companion PR in polkadot-fellows/runtimes#844
@RomarQ

RomarQ commented Sep 12, 2025

Copy link
Copy Markdown
Contributor Author

Hi @ggwpez,

Now, that these 2 PR's have been merged to polkadot-sdk repo, this PR can be merged.

@RomarQ

RomarQ commented Sep 18, 2025

Copy link
Copy Markdown
Contributor Author

Hi @ggwpez,

Now, that these 2 PR's have been merged to polkadot-sdk repo, this PR can be merged.

@ggwpez pinging you again about this

@RomarQ

RomarQ commented Sep 18, 2025

Copy link
Copy Markdown
Contributor Author

@bkontur and @gui1117 can you guys also have a look at this? Thanks

@github-actions github-actions Bot requested a review from ggwpez September 29, 2025 13:27
@github-actions

Copy link
Copy Markdown

Review required! Latest push from author must always be reviewed

@github-actions github-actions Bot requested a review from acatangiu October 10, 2025 09:02
@github-actions github-actions Bot requested a review from bkchr October 10, 2025 09:02
@bkchr bkchr merged commit 46bb077 into polkadot-fellows:main Oct 12, 2025
63 of 66 checks passed
@RomarQ RomarQ deleted the rq/move-single-block-migrations branch October 12, 2025 16:09
alvicsam pushed a commit to paritytech/polkadot-sdk that referenced this pull request Oct 17, 2025
…e_upgrade (#9451)

Recently, when moving the single block migrations from
`frame_executive::Executive` to `SingleBlockMigrations` in
`frame_system::Config`, I noticed that `try_runtime_upgrade` was
ignoring the `SingleBlockMigrations` defined in frame_system. More
context at polkadot-fellows/runtimes#844

Based on PR #1781 and
[PRDoc](https://github.com/paritytech/polkadot-sdk/blob/beb9030b249cc078b3955232074a8495e7e0302a/prdoc/1.9.0/pr_1781.prdoc#L29),
the new way for providing the single block migrations should be through
`SingleBlockMigrations` in `frame_system::Config`. Providing them from
`frame_executive::Executive` is still supported, but from what I
understood is or will be deprecated.

> `SingleBlockMigrations` this is the new way of configuring migrations
that run in a single block. Previously they were defined as last generic
argument of Executive. This shift is brings all central configuration
about migrations closer into view of the developer (migrations that are
configured in Executive will still work for now but is deprecated).

## Follow-up Changes
Will try to open a pull request tomorrow for deprecating the use of
`OnRuntimeUpgrade` in `frame_executive::Executive`.
alvicsam pushed a commit to paritytech/polkadot-sdk that referenced this pull request Oct 17, 2025
#9638)

Follow-up of #9451

Based on PR #1781 and
[PRDoc](https://github.com/paritytech/polkadot-sdk/blob/beb9030b249cc078b3955232074a8495e7e0302a/prdoc/1.9.0/pr_1781.prdoc#L29),
the new way for providing the single block migrations should be through
`SingleBlockMigrations` in `frame_system::Config`. Providing them from
`frame_executive::Executive` is still supported, but is deprecated.

> `SingleBlockMigrations` this is the new way of configuring migrations
that run in a single block. Previously they were defined as last generic
argument of Executive. This shift is brings all central configuration
about migrations closer into view of the developer (migrations that are
configured in Executive will still work for now but is deprecated).

`Executive` docs will look like:

<img width="800" alt="image"
src="https://github.com/user-attachments/assets/6f285c26-5c61-4350-a41b-aebc6b856601"
/>

Companion PR in polkadot-fellows/runtimes#844
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants