Skip to content
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

Adds BlockNumberProvider in multisig, proxy and nft pallets #5723

Merged
merged 11 commits into from
Nov 22, 2024

Conversation

gupnik
Copy link
Contributor

@gupnik gupnik commented Sep 16, 2024

Step in #3268

This PR adds the ability for these pallets to specify their source of the block number. This is useful when these pallets are migrated from the relay chain to a parachain and vice versa.

This change is backwards compatible:

  1. If the BlockNumberProvider continues to use the system pallet's block number
  2. When a pallet deployed on the relay chain is moved to a parachain, but still uses the relay chain's block number

However, we would need migrations if the deployed pallets are upgraded on an existing parachain, and the BlockNumberProvider uses the relay chain block number.

@gupnik gupnik added the T1-FRAME This PR/Issue is related to core FRAME, the framework. label Sep 16, 2024
@gupnik gupnik requested a review from a team as a code owner September 16, 2024 11:24
prdoc/pr_5723.prdoc Outdated Show resolved Hide resolved
Copy link
Contributor

@kianenigma kianenigma left a comment

Choose a reason for hiding this comment

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

LGTM as abstractions to add, excluding the possible need for a migration.

@kianenigma
Copy link
Contributor

The metric through which you have chosen to migrate Nft pallet seems wrong btw -- this pallet is not priority as it is not on the relay chain.

@gupnik gupnik requested a review from gui1117 November 13, 2024 04:47
Copy link
Contributor

@gui1117 gui1117 left a comment

Choose a reason for hiding this comment

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

Looks good to me,
Using different types make the change easier to check.

@gupnik gupnik added this pull request to the merge queue Nov 22, 2024
Merged via the queue into master with commit 7c5224c Nov 22, 2024
191 of 199 checks passed
@gupnik gupnik deleted the gupnik/block-number-provider branch November 22, 2024 05:37
Krayt78 pushed a commit to Krayt78/polkadot-sdk that referenced this pull request Dec 18, 2024
…tech#5723)

Step in paritytech#3268

This PR adds the ability for these pallets to specify their source of
the block number. This is useful when these pallets are migrated from
the relay chain to a parachain and vice versa.

This change is backwards compatible:
1. If the `BlockNumberProvider` continues to use the system pallet's
block number
2. When a pallet deployed on the relay chain is moved to a parachain,
but still uses the relay chain's block number

However, we would need migrations if the deployed pallets are upgraded
on an existing parachain, and the `BlockNumberProvider` uses the relay
chain block number.

---------

Co-authored-by: Kian Paimani <[email protected]>
dudo50 pushed a commit to paraspell-research/polkadot-sdk that referenced this pull request Jan 4, 2025
…tech#5723)

Step in paritytech#3268

This PR adds the ability for these pallets to specify their source of
the block number. This is useful when these pallets are migrated from
the relay chain to a parachain and vice versa.

This change is backwards compatible:
1. If the `BlockNumberProvider` continues to use the system pallet's
block number
2. When a pallet deployed on the relay chain is moved to a parachain,
but still uses the relay chain's block number

However, we would need migrations if the deployed pallets are upgraded
on an existing parachain, and the `BlockNumberProvider` uses the relay
chain block number.

---------

Co-authored-by: Kian Paimani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T1-FRAME This PR/Issue is related to core FRAME, the framework.
Projects
Status: Scheduled
Development

Successfully merging this pull request may close these issues.

9 participants