Skip to content

feat: upgrade to polkadot SDK 2503#444

Merged
gonzamontiel merged 20 commits intomainfrom
feat/update-2503
Mar 26, 2026
Merged

feat: upgrade to polkadot SDK 2503#444
gonzamontiel merged 20 commits intomainfrom
feat/update-2503

Conversation

@undercover-cactus
Copy link
Copy Markdown
Contributor

@undercover-cactus undercover-cactus commented Feb 12, 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

Breaking changes

Notable changes

What changes in Frontier

Changes example :

#[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)

@stiiifff stiiifff added B5-clientnoteworthy Changes should be mentioned in any downstream projects' release notes B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D9-needsaudit👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited breaking Needs to be mentioned in breaking changes labels Feb 23, 2026
@undercover-cactus undercover-cactus self-assigned this Mar 3, 2026
undercover-cactus and others added 9 commits March 18, 2026 10:49
- Migrate pallet_referenda Track API: TracksInfo::tracks() now returns
  an Iterator<Item = Cow<Track>> instead of &[(Id, TrackInfo)].
  Use .collect(), track.id / track.info.* access pattern throughout.
- Convert TrackInfo.name from &str to [u8; 128] (str_array), using
  from_utf8() + trim_end_matches('\0') for string comparisons.
- Add authorization_list field to pallet_evm::Call::call (EIP-7702).
- Simplify ExistentialDeposit config: remove cfg split, use single
  ED=0 now that PR #7379 handles benchmarks with zero ED.
- Re-enable pallet_identity benchmark_helper and benchmark entries
  across mainnet and stagenet runtimes.
- Update pallet_collective alias comments re: PR #6435 status.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
let Ok(track_name) = from_utf8(&track.info.name) else {
return false;
};
let track_name = track_name.trim_end_matches('\0');
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.

I think this will break pallet referenda origin parsing, see my comment there.

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.

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.

the concern is that track_info.name is now a fixed-size NUL-padded array. So
str::from_utf8(&track_info.name) gives a string that can still contain trailing \0. Then GovOrigin::from_str(...) tries to parse that raw padded string, and for custom origins, "general_admin\0..." will not match the expected "general_admin".

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.

So the precompile may fail to build the correct custom origin from a padded name, and therefore revert before dispatching to pallet_referenda

.in_field("trackId")
})?
.into()
GovOrigin::from_str(str::from_utf8(&track_info.name).map_err(|_| {
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.

This now parses the full buffer directly, but the runtime track code trims trailing \0, so this may fail when trying to decode values with trailing 0's.

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.

I have added a call to trim_end_matches('\0') for the name. Having it in both places make sure we have properly sanitize the string.

Copy link
Copy Markdown
Contributor

@gonzamontiel gonzamontiel 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 most of the PR is okay, there are some potentially failing tests, we will see when the CI is green. After the requested changes are explained / fixed, I'll approve.

@undercover-cactus undercover-cactus marked this pull request as ready for review March 25, 2026 15:33
@undercover-cactus undercover-cactus requested review from a team as code owners March 25, 2026 15:33
@gonzamontiel gonzamontiel merged commit b8cc9ee into main Mar 26, 2026
27 of 29 checks passed
@gonzamontiel gonzamontiel deleted the feat/update-2503 branch March 26, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B5-clientnoteworthy Changes should be mentioned in any downstream projects' release notes B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes breaking Needs to be mentioned in breaking changes D9-needsaudit👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants