paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.com/
1.89k stars 696 forks source link

Adds `BlockNumberProvider` in multisig, proxy and nft pallets #5723

Open gupnik opened 2 months ago

gupnik commented 2 months ago

Step in https://github.com/paritytech/polkadot-sdk/issues/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.

kianenigma commented 2 weeks ago

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.