Skip to content

State trie migrations ah#604

Merged
fellowship-merge-bot[bot] merged 48 commits into
polkadot-fellows:mainfrom
nkpar:state-trie-migrations-ah
Mar 7, 2025
Merged

State trie migrations ah#604
fellowship-merge-bot[bot] merged 48 commits into
polkadot-fellows:mainfrom
nkpar:state-trie-migrations-ah

Conversation

@nkpar
Copy link
Copy Markdown
Contributor

@nkpar nkpar commented Feb 25, 2025

  • Does not require a CHANGELOG entry

nkprt and others added 14 commits February 17, 2025 12:13
Eliminated the conditional `state-trie-version-1` feature and all associated code, including configurations, parameterization, and tests. The `state-trie-migration` pallet is now always included without feature gating.
Reorganized and reordered runtime configuration types to enhance readability and consistency. Adjusted type alias placements, added missing types, and restructured constants for better maintainability and alignment across pallets.
Replaces `EnsureSignedBy<RootMigController, AccountId>` with `EnsureRoot<AccountId>` for `ControlOrigin`. This simplifies migration control logic by ensuring only the root origin has full authority over the pallet.
Updated `ControlOrigin` to support either Root or Fellowship origins. Modified `SignedFilter` to use `EnsureSigned`.
cargo fmt
Bump spec_version for AH Kusama
@nkpar nkpar marked this pull request as draft February 25, 2025 10:52
Copy link
Copy Markdown
Member

@ggwpez ggwpez left a comment

Choose a reason for hiding this comment

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

I think we need clarity on the bot accounts to use for the migration; otherwise looks good

Comment thread system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs Outdated
Comment thread system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs Outdated
Comment thread system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs Outdated
Comment thread system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs
@nkpar nkpar marked this pull request as ready for review February 26, 2025 00:01
@nkpar
Copy link
Copy Markdown
Contributor Author

nkpar commented Feb 26, 2025

Comment thread .github/workflows/check-migrations.yml Outdated
@ggwpez ggwpez mentioned this pull request Feb 26, 2025
64 tasks
@nkpar nkpar requested a review from ggwpez February 26, 2025 12:45
Comment thread relay/polkadot/src/lib.rs
Comment thread system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs
@ggwpez ggwpez mentioned this pull request Mar 5, 2025
@github-actions github-actions Bot requested a review from ggwpez March 5, 2025 20:58
Copy link
Copy Markdown
Contributor

@bkchr bkchr left a comment

Choose a reason for hiding this comment

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

One question regarding the changes in the CI code, otherwise looks good.

Comment thread .github/workflows/runtimes-matrix.json Outdated
"is_relay": false,
"blocktime": 12000
"blocktime": 12000,
"runtime_args": "--overwrite-state-version 1"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do we need this? The on chain version is still 0?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@bkchr As I updated state version in this PR - otherwise check will fail

Copy link
Copy Markdown
Member

@ggwpez ggwpez Mar 6, 2025

Choose a reason for hiding this comment

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

The externalities initialize with the state version of the snapshot (0) and then at the end of the block it is 1 and fails to match the state root. Now instead we initialise with 1.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are we building a block because of the possible multi block migrations?

Comment thread system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs Outdated
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Comment thread system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs
Comment thread system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs Outdated
Comment thread system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs Outdated
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Comment thread system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs Outdated
nkpar and others added 2 commits March 6, 2025 15:02
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Comment thread .github/workflows/runtimes-matrix.json Outdated
Comment thread .github/workflows/check-migrations.yml Outdated
Comment thread .github/workflows/check-migrations.yml Outdated
nkpar and others added 4 commits March 6, 2025 18:11
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <git@kchr.de>
Comment thread .github/workflows/check-migrations.yml Outdated
Comment thread .github/workflows/check-migrations.yml Outdated
@ggwpez
Copy link
Copy Markdown
Member

ggwpez commented Mar 7, 2025

/merge

@fellowship-merge-bot fellowship-merge-bot Bot merged commit 22d1ab8 into polkadot-fellows:main Mar 7, 2025
@fellowship-merge-bot
Copy link
Copy Markdown
Contributor

Enabled auto-merge in Pull Request

Available commands
  • /merge: Enables auto-merge for Pull Request
  • /merge cancel: Cancels auto-merge for Pull Request
  • /merge help: Shows this menu

For more information see the documentation

@nkpar nkpar deleted the state-trie-migrations-ah branch March 7, 2025 12:31
fellowship-merge-bot Bot pushed a commit that referenced this pull request Mar 10, 2025
Release 1.4.2 for:
- #535 (PAH and KAH)
- #614 (P Collectives)
- #604 (PAH and KAH)

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@kianenigma kianenigma mentioned this pull request Jul 2, 2025
11 tasks
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