Skip to content

Adds BlockNumberProvider in multisig, proxy and nft pallets#5723

Merged
gupnik merged 11 commits intomasterfrom
gupnik/block-number-provider
Nov 22, 2024
Merged

Adds BlockNumberProvider in multisig, proxy and nft pallets#5723
gupnik merged 11 commits intomasterfrom
gupnik/block-number-provider

Conversation

@gupnik
Copy link
Copy Markdown
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
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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 <5588131+kianenigma@users.noreply.github.com>
chungquantin added a commit to r0gue-io/pop-node that referenced this pull request May 5, 2025
chungquantin added a commit to r0gue-io/pop-node that referenced this pull request May 5, 2025
chungquantin added a commit to r0gue-io/pop-node that referenced this pull request May 7, 2025
chungquantin added a commit to r0gue-io/pop-node that referenced this pull request May 7, 2025
chungquantin added a commit to r0gue-io/pop-node that referenced this pull request May 7, 2025
chungquantin added a commit to r0gue-io/pop-node that referenced this pull request May 8, 2025
* fix visibility for pallet_nfts types used as call arguments

Changes from the commit: paritytech/polkadot-sdk#3634

* [pallet-nfts, pallet_uniques] - Expose private structs

Changes made from upstream: paritytech/polkadot-sdk#6087

* Adds BlockNumberProvider in multisig, proxy and nft pallets

Upstream commit: paritytech/polkadot-sdk#5723

* Removed unused dependencies (partial progress)

Upstream commit: paritytech/polkadot-sdk#7329

* implement DecodeWithMemTracking for frame pallets

paritytech/polkadot-sdk#7598

* chore: bump pallet-nfts version to 34.1.0

* feat: adds BlockNumberProvider in nonfungbiles pallet

* chore: update lock file of pop-api to sync nfts

* chore: BlockNumberProvider for devnet nonfungibles

* chore: fix benchmarking to use new BlockNumberFor

* chore: revert changes

* fix: missing DecodeWithMemTracking

* chore: update weights of pallets

* refactor(nonfungibles): remove unused BlockNumberProvider type

* chore: remove unused Zero trait

* chore: revert non-relevant changes

* chore: revert non-relevant changes

This reverts commit 182486a.

* chore: benchmarking replace with BlockNumberProvider

* chore(pallet-nfts): update weights
chungquantin added a commit to r0gue-io/pop-node that referenced this pull request May 16, 2025
* fix visibility for pallet_nfts types used as call arguments

Changes from the commit: paritytech/polkadot-sdk#3634

* [pallet-nfts, pallet_uniques] - Expose private structs

Changes made from upstream: paritytech/polkadot-sdk#6087

* Adds BlockNumberProvider in multisig, proxy and nft pallets

Upstream commit: paritytech/polkadot-sdk#5723

* Removed unused dependencies (partial progress)

Upstream commit: paritytech/polkadot-sdk#7329

* implement DecodeWithMemTracking for frame pallets

paritytech/polkadot-sdk#7598

* chore: bump pallet-nfts version to 34.1.0

* feat: adds BlockNumberProvider in nonfungbiles pallet

* chore: update lock file of pop-api to sync nfts

* chore: BlockNumberProvider for devnet nonfungibles

* chore: fix benchmarking to use new BlockNumberFor

* chore: revert changes

* fix: missing DecodeWithMemTracking

* chore: update weights of pallets

* refactor(nonfungibles): remove unused BlockNumberProvider type

* chore: remove unused Zero trait

* chore: revert non-relevant changes

* chore: revert non-relevant changes

This reverts commit 182486a.

* chore: benchmarking replace with BlockNumberProvider

* chore(pallet-nfts): update weights
nova-scripter603 added a commit to nova-scripter603/pop-node that referenced this pull request Sep 29, 2025
* fix visibility for pallet_nfts types used as call arguments

Changes from the commit: paritytech/polkadot-sdk#3634

* [pallet-nfts, pallet_uniques] - Expose private structs

Changes made from upstream: paritytech/polkadot-sdk#6087

* Adds BlockNumberProvider in multisig, proxy and nft pallets

Upstream commit: paritytech/polkadot-sdk#5723

* Removed unused dependencies (partial progress)

Upstream commit: paritytech/polkadot-sdk#7329

* implement DecodeWithMemTracking for frame pallets

paritytech/polkadot-sdk#7598

* chore: bump pallet-nfts version to 34.1.0

* feat: adds BlockNumberProvider in nonfungbiles pallet

* chore: update lock file of pop-api to sync nfts

* chore: BlockNumberProvider for devnet nonfungibles

* chore: fix benchmarking to use new BlockNumberFor

* chore: revert changes

* fix: missing DecodeWithMemTracking

* chore: update weights of pallets

* refactor(nonfungibles): remove unused BlockNumberProvider type

* chore: remove unused Zero trait

* chore: revert non-relevant changes

* chore: revert non-relevant changes

This reverts commit 182486a53e92a12db77fb53b5f9661c9a06b9762.

* chore: benchmarking replace with BlockNumberProvider

* chore(pallet-nfts): update weights
code-blade543ew added a commit to code-blade543ew/pop-node that referenced this pull request Sep 30, 2025
* fix visibility for pallet_nfts types used as call arguments

Changes from the commit: paritytech/polkadot-sdk#3634

* [pallet-nfts, pallet_uniques] - Expose private structs

Changes made from upstream: paritytech/polkadot-sdk#6087

* Adds BlockNumberProvider in multisig, proxy and nft pallets

Upstream commit: paritytech/polkadot-sdk#5723

* Removed unused dependencies (partial progress)

Upstream commit: paritytech/polkadot-sdk#7329

* implement DecodeWithMemTracking for frame pallets

paritytech/polkadot-sdk#7598

* chore: bump pallet-nfts version to 34.1.0

* feat: adds BlockNumberProvider in nonfungbiles pallet

* chore: update lock file of pop-api to sync nfts

* chore: BlockNumberProvider for devnet nonfungibles

* chore: fix benchmarking to use new BlockNumberFor

* chore: revert changes

* fix: missing DecodeWithMemTracking

* chore: update weights of pallets

* refactor(nonfungibles): remove unused BlockNumberProvider type

* chore: remove unused Zero trait

* chore: revert non-relevant changes

* chore: revert non-relevant changes

This reverts commit 182486a53e92a12db77fb53b5f9661c9a06b9762.

* chore: benchmarking replace with BlockNumberProvider

* chore(pallet-nfts): update weights
cyber-smithmn added a commit to cyber-smithmn/pop-node that referenced this pull request Nov 20, 2025
* fix visibility for pallet_nfts types used as call arguments

Changes from the commit: paritytech/polkadot-sdk#3634

* [pallet-nfts, pallet_uniques] - Expose private structs

Changes made from upstream: paritytech/polkadot-sdk#6087

* Adds BlockNumberProvider in multisig, proxy and nft pallets

Upstream commit: paritytech/polkadot-sdk#5723

* Removed unused dependencies (partial progress)

Upstream commit: paritytech/polkadot-sdk#7329

* implement DecodeWithMemTracking for frame pallets

paritytech/polkadot-sdk#7598

* chore: bump pallet-nfts version to 34.1.0

* feat: adds BlockNumberProvider in nonfungbiles pallet

* chore: update lock file of pop-api to sync nfts

* chore: BlockNumberProvider for devnet nonfungibles

* chore: fix benchmarking to use new BlockNumberFor

* chore: revert changes

* fix: missing DecodeWithMemTracking

* chore: update weights of pallets

* refactor(nonfungibles): remove unused BlockNumberProvider type

* chore: remove unused Zero trait

* chore: revert non-relevant changes

* chore: revert non-relevant changes

This reverts commit 182486a53e92a12db77fb53b5f9661c9a06b9762.

* chore: benchmarking replace with BlockNumberProvider

* chore(pallet-nfts): update weights
gonzamontiel pushed a commit to datahaven-xyz/datahaven that referenced this pull request Mar 26, 2026
## Polkadot upgrade 2503

In this PR, we upgrade form Polkadot SDK 2412 to Polkadot SDK 2503. In
order to upgrade the SDK we need to upgrade some dependencies :
StorageHub and frontier simultaneously.


## What changes 

### Trivial changes

* paritytech/polkadot-sdk#7634 -> The new trait
is required in all the pallets using scale encoding.

* paritytech/polkadot-sdk#7043 -> Remove
deprecated `sp-std` and replace with `alloc` or `core`.

* paritytech/polkadot-sdk#6140 -> Accurate
weight reclaim with frame_system::WeightReclaim


### Breaking changes

* paritytech/polkadot-sdk#2072 -> There is a
change in `pallet-referenda`. Now, the tracks are retrieved as a list of
`Track`s. Also, the names of the tracks might have some trailing null
values (`\0`). This means display representation of the tracks' names
must be sanitized.

* paritytech/polkadot-sdk#5723 -> 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. (Not entirely sure it is breaking as it is
being marked as backward compatible).

* paritytech/polkadot-sdk#6338 -> Update
Referenda to Support Block Number Provider

### Notable changes

* paritytech/polkadot-sdk#5703 -> Not changes
required in the codebase but impact fastSync mode. Should improve
testing.

* paritytech/polkadot-sdk#5842 -> Removes
`libp2p` types in authority-discovery, and replace them with network
backend agnostic types from `sc-network-types`. The `sc-network`
interface is therefore updated accordingly.

## What changes in Frontier 

* polkadot-evm/frontier#1693 -> Add support for
EIP 7702 which has been enable with Pectra. This EIP add a new field
`AuthorizationList` in Ethereum transaction.

Changes example :

```rust
#[test]
fn validate_transaction_fails_on_filtered_call() {
...
            pallet_evm::Call::<Runtime>::call {
                source: H160::default(),
                target: H160::default(),
                input: Vec::new(),
                value: sp_core::U256::zero(),
                gas_limit: 21000,
                max_fee_per_gas: sp_core::U256::zero(),
                max_priority_fee_per_gas: Some(sp_core::U256::zero()),
                nonce: None,
                access_list: Vec::new(),
                authorization_list: Vec::new(),
            }
            .into(),
```

## ⚠️ Breaking Changes ⚠️

* Upgrade to Stirage hub v0.5.1
* Support for Ethereum latest upgrade (txs now have the
`authoriation_list` for support EIP 7702)

---------

Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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: Audited
Status: Done

Development

Successfully merging this pull request may close these issues.

9 participants