Skip to content

Conversation

@dastansam
Copy link
Contributor

@dastansam dastansam commented Mar 14, 2025

What?

closes #446

Tasks

  • Review release notes for stable2412 for breaking changes. Also check the release notes of the versions before (with a focus on stable2409 and 1.14.0).
  • Update Polkadot SDK dependencies to stable2412.
  • Update ORML dependencies to the according version.
  • Test node and runtime compatibility (e.g., compile-time errors, runtime APIs, storage migrations).
  • Audit custom pallets for deprecated or changed SDK interfaces.
  • Update benchmarks (if applicable) for weight calculations.

Additional Context

  • The Treasury::propose_spend(...) integrations tests needs a rework, since that extrinsic is now deprecated, and it should be replaced by Treasury::sped_local(...). We can ignore these tests for now and re-add them in a later PR.

Why?

Release analysis posts here.

Some notable PRs:

How?

Testing?

  • Pallet Unit Testing (e.g. cargo t -p pallet-funding)
  • Integration Tests (e.g. cargo t -p integration-tests)
  • Try Runtime CLI, to test if we have to run any migration in this upgrade.

Screenshots (optional)

Syncing with mainnet `polimec` Screenshot 2025-02-06 at 1 16 29

Copy link
Contributor Author

dastansam commented Mar 14, 2025

@dastansam dastansam mentioned this pull request Mar 14, 2025
9 tasks
@dastansam dastansam requested a review from lrazovic March 14, 2025 07:41
@dastansam dastansam self-assigned this Mar 14, 2025
@dastansam dastansam marked this pull request as ready for review March 14, 2025 07:41
Copy link
Member

@lrazovic lrazovic left a comment

Choose a reason for hiding this comment

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

A few minor nits, but overall looks quite good! I'm just a bit worried about this entire XCMv5, maybe a bit "premature" since AH is still not using it. Do you think it is a good idea to proceed with the update? Can we stick to XCMv4 for now and move to v5 after AH also migrates to v5?

@dastansam dastansam force-pushed the 03-14-upgrade_to_stable2412-2 branch 3 times, most recently from d116e92 to 2828880 Compare March 19, 2025 15:18
@dastansam dastansam requested a review from lrazovic March 19, 2025 15:19
@lrazovic lrazovic requested a review from Copilot April 3, 2025 09:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR upgrades dependencies to the stable2412-2 release and updates related interfaces and APIs across pallets, nodes, and integration tests. Key changes include:

  • Replacing deprecated APIs (e.g. sp_std, treasury extrinsics) with their new counterparts.
  • Updating transaction extension, xcm, and runtime API usages to align with the latest versions.
  • Upgrading various dependency versions in the Cargo.toml files to ensure compatibility with the new release.

Reviewed Changes

Copilot reviewed 92 out of 93 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pallets/democracy/src/benchmarking.rs Replaced sp_std::borrow::Cow with alloc::borrow::Cow
pallets/democracy/Cargo.toml Removed sp-std dependency from std configuration
nodes/parachain/src/service.rs Updated executor config and transaction pool builder usage
nodes/parachain/src/rpc.rs Removed DenyUnsafe property in RPC extensions
nodes/parachain/src/command.rs Updated RPC addressing signature and hwbench function call
nodes/parachain/src/chain_spec/* Replaced legacy account seed methods with sp_keyring alternatives
nodes/parachain/Cargo.toml Added sp-keyring workspace dependency and runtime bench updates
integration-tests/src/tests/* Switched from get_account_id_from_seed to get_public_from_string_or_panic and updated xcm & transaction extension APIs
integration-tests/Cargo.toml Upgraded dependencies, replacing xcm-fee-payment-runtime-api with xcm-runtime-apis
Cargo.toml Upgraded substrate-wasm-builder, orml dependencies, jsonrpsee and other Substrate components
Files not reviewed (1)
  • justfile: Language not supported
Comments suppressed due to low confidence (11)

nodes/parachain/src/service.rs:126

  • Confirm that wrapping the transaction pool builder result with Arc::from is intended instead of directly using the builder's build() result; verify that the type conversion is compatible with downstream usage.
let transaction_pool = Arc::from(

nodes/parachain/src/service.rs:235

  • Review the updated generic parameters in the aura::run invocation to ensure they match the expected signature for the new version of the API.
let fut = aura::run::<Block, sp_consensus_aura::sr25519::AuthorityPair, _, _, _, _, _, _, _, _>(params);

nodes/parachain/src/rpc.rs:22

  • Confirm that the removal of the deny_unsafe usage in RPC extensions does not compromise the security of RPC calls; ensure that the new approach meets security requirements.
pub use sc_rpc::DenyUnsafe;

nodes/parachain/src/command.rs:320

  • Ensure that the updated RPC address signature (returning a vector of endpoints) is correctly handled by all downstream consumers.
fn rpc_addr(&self, default_listen_port: u16) -> Result<Option<Vec<sc_cli::RpcEndpoint>>> {

integration-tests/src/tests/transaction_payment.rs:130

  • Double-check the new transaction extension API calls (validate and prepare) to ensure they correctly handle fee calculation and error propagation as expected by the updated runtime.
let (_, val, _) = signed_extension.validate(...).expect("tx extension validation failed");

integration-tests/src/tests/runtime_apis.rs:15

  • Verify that changing the parameter from 4u32 to 5u32 for the acceptable payment assets query is deliberate and aligns with the new runtime expectations.
let accepted_payment_assets = PolimecRuntime::query_acceptable_payment_assets(5u32).unwrap();

integration-tests/src/tests/governance.rs:238

  • Reminder: Uncomment and update the treasury proposal test once the treasury API changes are resolved to maintain comprehensive test coverage.
/// TODO: uncomment later and fix

integration-tests/src/tests/governance.rs:289

  • Ensure that the test for slashed treasury proposal funds is revisited and re-enabled with appropriate modifications once the treasury API update is fully integrated.
/// TODO: same here

integration-tests/Cargo.toml:81

  • Confirm that replacing xcm-fee-payment-runtime-api with xcm-runtime-apis is consistent across the codebase and does not introduce any compatibility issues.
xcm-runtime-apis.workspace = true

Cargo.toml:54

  • Review the upgraded substrate-wasm-builder version to ensure that it is fully compatible with the runtime build and does not introduce unexpected behavior.
substrate-wasm-builder = { version = "25.0.0" }

Cargo.toml:74

  • Ensure that upgrading orml-oracle to version 1.3.0 is compatible with the current SDK interfaces and that any breaking changes have been addressed.
orml-oracle = { version = "1.3.0", default-features = false }

@dastansam dastansam force-pushed the 03-14-upgrade_to_stable2412-2 branch from 2828880 to e205664 Compare April 8, 2025 17:47
@dastansam
Copy link
Contributor Author

moved back to xcm::v4 following fellowship upgrade

@dastansam dastansam force-pushed the 03-14-upgrade_to_stable2412-2 branch from e205664 to fc38ace Compare April 9, 2025 07:28
@dastansam dastansam force-pushed the 03-14-upgrade_to_stable2412-2 branch from fc38ace to 51c4399 Compare April 9, 2025 08:36
@lrazovic lrazovic mentioned this pull request Apr 25, 2025
@lrazovic lrazovic changed the title Upgrade to stable2412-2 ⬆️ Upgrade to Polkadot SDK stable2412-2 May 1, 2025
Copy link
Member

lrazovic commented May 2, 2025

Merge activity

  • May 2, 7:23 AM EDT: A user started a stack merge that includes this pull request via Graphite.
  • May 2, 7:23 AM EDT: @lrazovic merged this pull request with Graphite.

@lrazovic lrazovic merged commit d047441 into main May 2, 2025
1 check passed
@lrazovic lrazovic deleted the 03-14-upgrade_to_stable2412-2 branch May 2, 2025 11:23
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.

Upgrade Polkadot SDK from 1.13.0 to stable2412

3 participants