Upgrade Moonbeam to Polkadot SDK stable2512#3633
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis pull request upgrades the codebase from moonbeam-polkadot-stable2506 to stable2512, including dependency updates across Polkadot SDK, Frontier, and Cumulus crates. Key changes include runtime API modifications (LazyBlock parameter types, removal of GetCoreSelectorApi), restructuring of parachain inherent data, addition of balance-related events and XCM weight functions, bridge relay timeout updates, and TypeScript API augmentations reflecting new event signatures and storage queries. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes This PR introduces substantial changes across multiple systems: runtime API signatures (LazyBlock transition, core selector removal), parachain inherent data restructuring, new balance events and weight functions, TypeScript API augmentations for three runtimes, dependency upgrades affecting numerous crates, and 15+ coordinated test updates. While some changes (test indices, similar weight updates) follow repetitive patterns, the breadth of heterogeneous modifications—combining runtime changes, node service wiring, TypeScript type systems, and test coordination—requires careful verification of interactions between components. Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests (beta)
|
Moonbase Weight Difference Report
Moonriver Weight Difference Report
Moonbeam Weight Difference Report
|
WASM runtime size check:Compared to target branchMoonbase runtime: 2056 KB (-44 KB) ✅ Moonbeam runtime: 2184 KB (-28 KB) ✅ Moonriver runtime: 2184 KB (-28 KB) ✅ Compared to latest release (runtime-4202)Moonbase runtime: 2056 KB (+120 KB compared to latest release) Moonbeam runtime: 2184 KB (+152 KB compared to latest release) Moonriver runtime: 2184 KB (+152 KB compared to latest release) |
a13b535 to
ebc8ddd
Compare
# Conflicts: # Cargo.lock # test/suites/dev/moonbase/test-pov/test-precompile-over-pov2.ts
# Conflicts: # runtime/moonbase/src/weights/cumulus_pallet_xcmp_queue.rs # runtime/moonbeam/src/weights/cumulus_pallet_xcmp_queue.rs # runtime/moonriver/src/weights/cumulus_pallet_xcmp_queue.rs # test/suites/dev/moonbase/test-randomness/test-randomness-babe-lottery2.ts
# Conflicts: # Cargo.lock # Cargo.toml # test/suites/dev/moonbase/test-author/test-author-failed-association.ts # test/suites/dev/moonbase/test-author/test-author-non-author-clearing.ts # test/suites/dev/moonbase/test-author/test-author-registered-clear.ts # test/suites/dev/moonbase/test-author/test-author-simple-association.ts # test/suites/dev/moonbase/test-author/test-author-unregistered-clear.ts # test/suites/dev/moonbase/test-randomness/test-randomness-babe-lottery3.ts # test/suites/dev/moonbase/test-randomness/test-randomness-vrf-lottery4.ts # test/suites/dev/moonbase/test-xcm-v4/test-xcm-payment-api.ts # test/suites/dev/moonbase/test-xcm-v5/test-xcm-payment-api.ts
There was a problem hiding this comment.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
runtime/moonriver/src/weights/bridge.rs (1)
22-54:⚠️ Potential issue | 🟠 MajorUnblock the weight-diff job for this custom weight file.
The report job is already failing on this file with
Could not find a weight implementation in the passed file, so the PR will stay red unless that parser is taught to handle theseWeightInfoExtimpls or this path is excluded from the report.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@runtime/moonriver/src/weights/bridge.rs` around lines 22 - 54, The weight-diff parser fails because it expects concrete WeightInfo implementations in this file but only finds the *WeightInfoExt impls (GrandpaWeightInfoExt, ParachainsWeightInfoExt, MessagesWeightInfoExt). Add minimal/stub implementations of the actual pallet WeightInfo traits for Runtime that the report expects (e.g. impl super::pallet_bridge_grandpa::WeightInfo for Runtime { fn submit_finality_proof(...) -> Weight { Self::submit_finality_proof_overhead_from_runtime() /* or mirror existing Weight::from_parts(...) */ } } and analogous impls for super::pallet_bridge_parachains::WeightInfo and super::pallet_bridge_messages::WeightInfo delegating to expected_extra_storage_proof_size, submit_parachain_heads_overhead_from_runtime, receive_messages_proof_overhead_from_runtime, receive_messages_delivery_proof_overhead_from_runtime). This provides the concrete symbols the parser needs while reusing the existing ext methods.
♻️ Duplicate comments (1)
docs/cherry-picks/polkadot-sdk-stable2512.md (1)
11-11:⚠️ Potential issue | 🟡 MinorKeep
Upstream PRcolumn PR-only for table consistency.Line 11 and Line 56 still use commit links in
Upstream PR. Move those commit refs toNote(orCommit) and leaveUpstream PRempty until an actual PR exists.🛠️ Suggested doc fix
-| Yes | Add storage benchmark --keys-limit option | [moonbeam-foundation/polkadot-sdk@3e68f82](https://github.com/moonbeam-foundation/polkadot-sdk/commit/3e68f824efd7347b2deeae21d3d8705a5a437382) | Included | Temporary | [moonbeam-foundation/polkadot-sdk@ef91563](https://github.com/moonbeam-foundation/polkadot-sdk/commit/ef915632fbda727583b13813417664ecefc000b8) | We don't need this cherry-pick anymore since the following upstream PR introduced the same behavior change: [paritytech/polkadot-sdk#7835](https://github.com/paritytech/polkadot-sdk/pull/7835/changes#diff-29eba3163978b333d93a2e7b3d0f3d3bafe2cc99891ebd0cc38d499bb80bb7a9R318) | +| Yes | Add storage benchmark --keys-limit option | [moonbeam-foundation/polkadot-sdk@3e68f82](https://github.com/moonbeam-foundation/polkadot-sdk/commit/3e68f824efd7347b2deeae21d3d8705a5a437382) | Included | Temporary | | Upstream candidate commit: [moonbeam-foundation/polkadot-sdk@ef91563](https://github.com/moonbeam-foundation/polkadot-sdk/commit/ef915632fbda727583b13813417664ecefc000b8). We don't need this cherry-pick anymore since the following upstream PR introduced the same behavior change: [paritytech/polkadot-sdk#7835](https://github.com/paritytech/polkadot-sdk/pull/7835/changes#diff-29eba3163978b333d93a2e7b3d0f3d3bafe2cc99891ebd0cc38d499bb80bb7a9R318) | @@ -| Yes | Address POV Underestimations | [moonbeam-foundation/frontier@ad9361c](https://github.com/moonbeam-foundation/frontier/commit/ad9361cc6d031be86908ca69dc98ecb5fb12dd5d) | Included | Needs PR upstream | [moonbeam-foundation/frontier@fdfdb95](https://github.com/moonbeam-foundation/frontier/commit/fdfdb95057402ff35f69869339262a108ffccf94) | [MOON-3292](https://opslayer.atlassian.net/browse/MOON-3292) | +| Yes | Address POV Underestimations | [moonbeam-foundation/frontier@ad9361c](https://github.com/moonbeam-foundation/frontier/commit/ad9361cc6d031be86908ca69dc98ecb5fb12dd5d) | Included | Needs PR upstream | | Upstream candidate commit: [moonbeam-foundation/frontier@fdfdb95](https://github.com/moonbeam-foundation/frontier/commit/fdfdb95057402ff35f69869339262a108ffccf94). [MOON-3292](https://opslayer.atlassian.net/browse/MOON-3292) |Also applies to: 56-56
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/cherry-picks/polkadot-sdk-stable2512.md` at line 11, The "Upstream PR" column contains commit links instead of PRs for the row with "Add storage benchmark --keys-limit option" (and the similar row at the second occurrence), so edit the table rows to clear the "Upstream PR" cell (leave it empty) and move the existing commit reference (e.g., moonbeam-foundation/polkadot-sdk@3e68f82 and moonbeam-foundation/polkadot-sdk@ef91563) into the "Note" or "Commit" column instead; ensure the table header ("Upstream PR") stays PR-only and both affected rows now show an empty Upstream PR cell with the commit refs relocated to the Note/Commit column.
🧹 Nitpick comments (3)
.github/workflows/weight-diff-report.yml (1)
80-80: Defensive filtering improves robustness, but regex only validates prefix.The filter
select((.[4] // "") | test("^-?[0-9]"))correctly preventstonumberfailures on empty or clearly non-numeric values. However, the regex only validates that the string starts with an optional minus and digit—values like"5abc"would pass but could failtonumber.In practice,
subweightoutput should be well-formed, andjq'stonumberis permissive with trailing content it can parse. This is acceptable for robustness against edge cases like malformed rows.♻️ Optional: stricter regex for full validation
If stricter validation is desired:
- jq -R 'split(",") | select((.[4] // "") | test("^-?[0-9]")) | {File: .[0], Extrinsic: .[1], Old: .[2], New: .[3], "Change Percent": (.[4] | tonumber)}' ${diffs_csv} | jq -s '.' > ${diffs_json} + jq -R 'split(",") | select((.[4] // "") | test("^-?[0-9]+(\\.[0-9]+)?$")) | {File: .[0], Extrinsic: .[1], Old: .[2], New: .[3], "Change Percent": (.[4] | tonumber)}' ${diffs_csv} | jq -s '.' > ${diffs_json}This ensures the entire value matches a numeric pattern (integer or decimal).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/weight-diff-report.yml at line 80, The jq filter currently uses select((.[4] // "") | test("^-?[0-9]")) which only checks the prefix and can let through values like "5abc"; update the regex in that select expression (in the jq pipeline that reads ${diffs_csv} and writes ${diffs_json}) to fully validate numeric strings, e.g. replace the test pattern with a full-match numeric regex such as "^-?[0-9]+(\\.[0-9]+)?$" so the field passed to tonumber is strictly an integer or decimal before conversion.test/suites/dev/moonbase/test-xcm-v5/test-xcm-payment-api.ts (1)
150-162: This only validates the zero-fee fallback.With the new
asset_idparameter,queryDeliveryFeescan still returnOk([])here even if the third argument is ignored or decoded incorrectly, because this path short-circuits when no delivery-fee config exists. Please add one case where delivery fees are configured/non-zero, or otherwise varyasset_idand assert the result changes, so the new API wiring is actually exercised.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@test/suites/dev/moonbase/test-xcm-v5/test-xcm-payment-api.ts` around lines 150 - 162, Current test only checks the zero-fee fallback and doesn't exercise the new asset_id handling in polkadotJs.call.xcmPaymentApi.queryDeliveryFees; add an additional test case that sets up a destination with a non-zero delivery-fee configuration (or vary the asset_id argument passed to queryDeliveryFees) and assert that deliveryFees.isOk is true and the returned fee assets array is non-empty or changes based on the asset_id. Specifically, locate the call to queryDeliveryFees (variables dest and xcmMessage) and add a case where the third argument encodes a valid asset_id or the chain is configured with delivery fees so the result is non-zero, then assert feeAssets.length > 0 (or that feeAssets differs between asset_id values) to ensure the new API wiring is exercised.node/service/src/lib.rs (1)
1015-1035: Consider collapsingstart_consensusinputs into a local params struct.The new
collator_peer_idpushes an already long positional argument list even further. A small local struct would make future SDK bumps safer and reduce call-site miswiring.Also applies to: 1041-1063
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@node/service/src/lib.rs` around lines 1015 - 1035, The call to start_consensus::<RuntimeApi, _>(...) has grown a long positional argument list (now including the collator peer id) and is error-prone; extract those parameters into a small local struct (e.g., StartConsensusParams or StartConsensusConfig) that contains fields for backend, client, block_import, prometheus_registry, telemetry handle, task_manager, relay_chain_interface, transaction_pool, keystore, para_id, collator_peer_id (from collator_key.expect(...) / network.local_peer_id()), overseer_handle, announce_block, force_authoring, relay_chain_slot_duration, block_authoring_duration, sync_service, node_extra_args, etc., populate that struct at the call site, and pass the struct (or its reference) into start_consensus::<RuntimeApi, _>(...) instead of the long positional list; apply the same refactor for the other call site around 1041-1063 to keep both sites consistent and reduce miswiring risk.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@runtime/common/src/apis.rs`:
- Around line 787-800: The zero-fee branch in query_delivery_fees currently
validates destination and message but ignores the asset_id parameter; add the
same versioned-to-latest conversion/validation for the VersionedAssetId
parameter (the _asset_id passed into query_delivery_fees) and map conversion
failures to XcmPaymentApiError::VersionedConversionFailed so the function
returns an error if asset_id cannot be converted, keeping the zero-fee semantics
only after all three versioned inputs are validated.
In `@runtime/moonbase/src/weights/cumulus_pallet_xcmp_queue.rs`:
- Around line 192-202: The take_first_concatenated_xcm(n: u32) Weight
implementation is marked TODO and currently uses a provisional per-item
multiplier that may undercharge; replace the approximate formula with a
conservative upper-bound calculation (use the documented max component n = 92)
by computing the weight using saturating_mul(92) (or otherwise multiply the
per-item term by 92) and add a safety margin to the base Weight, update the
comment to remove the TODO and note that this is a conservative worst-case bound
until proper benchmarking is available, and keep references to the same function
name (take_first_concatenated_xcm) and the per-item term (the
saturating_add(Weight::from_parts(17_448, 0).saturating_mul(...))) so reviewers
can easily find the change.
In `@runtime/moonbeam/src/weights/cumulus_pallet_xcmp_queue.rs`:
- Around line 192-202: The weight function take_first_concatenated_xcm currently
contains a TODO and an approximate linear formula
(saturating_add(...saturating_mul(n.into()))) which may undercharge XCMP queue;
replace this provisional formula with a conservative upper-bound weight—e.g.,
compute the worst-case by multiplying the per-component cost by the documented
maximum component count (92) or return a fixed upper-bound Weight that covers
all expected inputs, and remove the TODO; update the Weight::from_parts
expressions in take_first_concatenated_xcm to use that conservative value so the
runtime never underestimates the cost.
In `@runtime/moonriver/src/weights/cumulus_pallet_xcmp_queue.rs`:
- Around line 192-202: The weight implementation for take_first_concatenated_xcm
is marked as a TODO and currently uses an approximate per-item multiplier;
replace this provisional formula with a conservative upper-bound calculation:
treat n as its maximum allowed value (92) and compute the weight using that
worst-case n so the runtime never undercharges (update the saturating_mul use to
multiply by 92), remove the TODO comment, and add a short comment explaining
this is a conservative temporary upper bound until proper benchmarks produce the
exact formula.
In `@typescript-api/src/moonbase/interfaces/augment-api-events.ts`:
- Around line 388-395: The JSDoc for the conviction-voting events is stale:
update the comments for Delegated and Undelegated to match their actual payload
shapes (Delegated now carries [who, target, u16]—add the conviction/u16 to the
Delegated doc; Undelegated carries [account, u16]—mention the conviction/u16 in
that doc), and make this change in the upstream event documentation/source that
generates this file (so the regenerated augment-api-events.ts contains the
corrected JSDoc for Delegated and Undelegated).
In `@typescript-api/src/moonbeam/interfaces/augment-api-runtime.ts`:
- Line 9: The auto-generated augment-api-runtime.ts is missing the xcmPaymentApi
namespace (used by queryAcceptablePaymentAssets, queryWeightToAssetFee,
queryXcmWeight, queryDeliveryFees), so update the type generation or add a
manual augmentation: re-run or adjust yarn polkadot-types-from-chain to capture
stable2512 xcmPaymentApi signatures, or, if the generator cannot, add a typed
namespace declaration for xcmPaymentApi in augment-api-runtime.ts matching the
runtime API signatures (declare namespace xcmPaymentApi with the four query
methods and correct parameter/return types) so tests no longer need as any
assertions; ensure the change targets the functions
queryAcceptablePaymentAssets, queryWeightToAssetFee, queryXcmWeight, and
queryDeliveryFees.
---
Outside diff comments:
In `@runtime/moonriver/src/weights/bridge.rs`:
- Around line 22-54: The weight-diff parser fails because it expects concrete
WeightInfo implementations in this file but only finds the *WeightInfoExt impls
(GrandpaWeightInfoExt, ParachainsWeightInfoExt, MessagesWeightInfoExt). Add
minimal/stub implementations of the actual pallet WeightInfo traits for Runtime
that the report expects (e.g. impl super::pallet_bridge_grandpa::WeightInfo for
Runtime { fn submit_finality_proof(...) -> Weight {
Self::submit_finality_proof_overhead_from_runtime() /* or mirror existing
Weight::from_parts(...) */ } } and analogous impls for
super::pallet_bridge_parachains::WeightInfo and
super::pallet_bridge_messages::WeightInfo delegating to
expected_extra_storage_proof_size, submit_parachain_heads_overhead_from_runtime,
receive_messages_proof_overhead_from_runtime,
receive_messages_delivery_proof_overhead_from_runtime). This provides the
concrete symbols the parser needs while reusing the existing ext methods.
---
Duplicate comments:
In `@docs/cherry-picks/polkadot-sdk-stable2512.md`:
- Line 11: The "Upstream PR" column contains commit links instead of PRs for the
row with "Add storage benchmark --keys-limit option" (and the similar row at the
second occurrence), so edit the table rows to clear the "Upstream PR" cell
(leave it empty) and move the existing commit reference (e.g.,
moonbeam-foundation/polkadot-sdk@3e68f82 and
moonbeam-foundation/polkadot-sdk@ef91563) into the "Note" or "Commit" column
instead; ensure the table header ("Upstream PR") stays PR-only and both affected
rows now show an empty Upstream PR cell with the commit refs relocated to the
Note/Commit column.
---
Nitpick comments:
In @.github/workflows/weight-diff-report.yml:
- Line 80: The jq filter currently uses select((.[4] // "") | test("^-?[0-9]"))
which only checks the prefix and can let through values like "5abc"; update the
regex in that select expression (in the jq pipeline that reads ${diffs_csv} and
writes ${diffs_json}) to fully validate numeric strings, e.g. replace the test
pattern with a full-match numeric regex such as "^-?[0-9]+(\\.[0-9]+)?$" so the
field passed to tonumber is strictly an integer or decimal before conversion.
In `@node/service/src/lib.rs`:
- Around line 1015-1035: The call to start_consensus::<RuntimeApi, _>(...) has
grown a long positional argument list (now including the collator peer id) and
is error-prone; extract those parameters into a small local struct (e.g.,
StartConsensusParams or StartConsensusConfig) that contains fields for backend,
client, block_import, prometheus_registry, telemetry handle, task_manager,
relay_chain_interface, transaction_pool, keystore, para_id, collator_peer_id
(from collator_key.expect(...) / network.local_peer_id()), overseer_handle,
announce_block, force_authoring, relay_chain_slot_duration,
block_authoring_duration, sync_service, node_extra_args, etc., populate that
struct at the call site, and pass the struct (or its reference) into
start_consensus::<RuntimeApi, _>(...) instead of the long positional list; apply
the same refactor for the other call site around 1041-1063 to keep both sites
consistent and reduce miswiring risk.
In `@test/suites/dev/moonbase/test-xcm-v5/test-xcm-payment-api.ts`:
- Around line 150-162: Current test only checks the zero-fee fallback and
doesn't exercise the new asset_id handling in
polkadotJs.call.xcmPaymentApi.queryDeliveryFees; add an additional test case
that sets up a destination with a non-zero delivery-fee configuration (or vary
the asset_id argument passed to queryDeliveryFees) and assert that
deliveryFees.isOk is true and the returned fee assets array is non-empty or
changes based on the asset_id. Specifically, locate the call to
queryDeliveryFees (variables dest and xcmMessage) and add a case where the third
argument encodes a valid asset_id or the chain is configured with delivery fees
so the result is non-zero, then assert feeAssets.length > 0 (or that feeAssets
differs between asset_id values) to ensure the new API wiring is exercised.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 51d66b67-884b-40a6-a728-eb18f5219dc3
⛔ Files ignored due to path filters (2)
Cargo.lockis excluded by!**/*.lockpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (80)
.github/workflows/build.yml.github/workflows/weight-diff-report.yml.gitignoreCargo.tomlMakefiledocs/cherry-picks/polkadot-sdk-stable2506.mddocs/cherry-picks/polkadot-sdk-stable2512.mdnode/cli/src/command.rsnode/service/src/lazy_loading/mod.rsnode/service/src/lib.rsnode/service/src/rpc.rspackage.jsonprecompiles/crowdloan-rewards/src/mock.rsprecompiles/proxy/src/tests.rsprecompiles/relay-encoder/src/mock.rsprimitives/account/src/lib.rsruntime/common/Cargo.tomlruntime/common/src/apis.rsruntime/moonbase/src/lib.rsruntime/moonbase/src/weights/cumulus_pallet_xcmp_queue.rsruntime/moonbase/src/weights/pallet_xcm.rsruntime/moonbase/tests/common/mod.rsruntime/moonbase/tests/xcm_mock/statemint_like.rsruntime/moonbeam/src/lib.rsruntime/moonbeam/src/weights/bridge.rsruntime/moonbeam/src/weights/cumulus_pallet_xcmp_queue.rsruntime/moonbeam/src/weights/pallet_xcm.rsruntime/moonbeam/tests/common/mod.rsruntime/moonbeam/tests/xcm_mock/statemint_like.rsruntime/moonriver/src/lib.rsruntime/moonriver/src/weights/bridge.rsruntime/moonriver/src/weights/cumulus_pallet_xcmp_queue.rsruntime/moonriver/src/weights/pallet_xcm.rsruntime/moonriver/tests/common/mod.rsruntime/moonriver/tests/xcm_mock/statemine_like.rsscripts/verify-licenses.shtest/package.jsontest/suites/dev/common/test-proxy/test-proxy-author-mapping.tstest/suites/dev/common/test-proxy/test-proxy-balance.tstest/suites/dev/moonbase/test-author/test-author-failed-association.tstest/suites/dev/moonbase/test-author/test-author-missing-deposit-fail.tstest/suites/dev/moonbase/test-author/test-author-non-author-clearing.tstest/suites/dev/moonbase/test-author/test-author-registered-clear.tstest/suites/dev/moonbase/test-author/test-author-simple-association.tstest/suites/dev/moonbase/test-author/test-author-unregistered-clear.tstest/suites/dev/moonbase/test-balance/test-balance-extrinsics.tstest/suites/dev/moonbase/test-polkadot-js/test-polkadot-api.tstest/suites/dev/moonbase/test-randomness/test-randomness-babe-lottery2.tstest/suites/dev/moonbase/test-randomness/test-randomness-babe-lottery3.tstest/suites/dev/moonbase/test-randomness/test-randomness-vrf-lottery4.tstest/suites/dev/moonbase/test-randomness/test-randomness-vrf-lottery5.tstest/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.tstest/suites/dev/moonbase/test-sudo/test-sudo.tstest/suites/dev/moonbase/test-xcm-v4/test-xcm-payment-api.tstest/suites/dev/moonbase/test-xcm-v5/test-xcm-payment-api.tstypescript-api/src/moonbase/interfaces/augment-api-events.tstypescript-api/src/moonbase/interfaces/augment-api-query.tstypescript-api/src/moonbase/interfaces/augment-api-runtime.tstypescript-api/src/moonbase/interfaces/augment-api-tx.tstypescript-api/src/moonbase/interfaces/lookup.tstypescript-api/src/moonbase/interfaces/registry.tstypescript-api/src/moonbase/interfaces/types-lookup.tstypescript-api/src/moonbeam/interfaces/augment-api-events.tstypescript-api/src/moonbeam/interfaces/augment-api-query.tstypescript-api/src/moonbeam/interfaces/augment-api-runtime.tstypescript-api/src/moonbeam/interfaces/augment-api-tx.tstypescript-api/src/moonbeam/interfaces/lookup.tstypescript-api/src/moonbeam/interfaces/registry.tstypescript-api/src/moonbeam/interfaces/types-lookup.tstypescript-api/src/moonriver/interfaces/augment-api-events.tstypescript-api/src/moonriver/interfaces/augment-api-query.tstypescript-api/src/moonriver/interfaces/augment-api-runtime.tstypescript-api/src/moonriver/interfaces/augment-api-tx.tstypescript-api/src/moonriver/interfaces/lookup.tstypescript-api/src/moonriver/interfaces/registry.tstypescript-api/src/moonriver/interfaces/types-lookup.tszombienet/integration-tests/bridges/environments/moonbeam-moonriver/bridge.shzombienet/specs/README.mdzombienet/specs/kusama-local.jsonzombienet/specs/polkadot-local.json
💤 Files with no reviewable changes (7)
- node/service/src/rpc.rs
- precompiles/proxy/src/tests.rs
- precompiles/relay-encoder/src/mock.rs
- precompiles/crowdloan-rewards/src/mock.rs
- runtime/moonriver/src/lib.rs
- runtime/moonbeam/src/lib.rs
- runtime/moonbase/src/lib.rs
e173c13
Co-authored-by: Eloïs <c@elo.tf>
Summary
Upgrades all Polkadot SDK dependencies from
moonbeam-polkadot-stable2506tomoonbeam-polkadot-stable2512, along with the necessary adaptations across the node, runtime, precompiles, and tests.Related PRs
Changes
Dependency Upgrades
polkadot-sdkworkspace dependencies updated from branchmoonbeam-polkadot-stable2506→moonbeam-polkadot-stable2512moonbeam-polkadot-stable2506→moonbeam-polkadot-stable2512moonbeam-polkadot-stable2506→moonbeam-polkadot-stable2512pallet-author-slot-filterdependency toruntime/commonrocksdbfeature to Frontier dependenciesRuntime API Changes
execute_blockandcheck_inherentsnow use<Block as BlockT>::LazyBlockinstead ofBlockGetCoreSelectorApiimplementation (no longer required by the SDK)XcmPaymentApi::query_delivery_feesnow accepts an additionalasset_id: VersionedAssetIdparameter and usesAssetExchangerweigh_message()weight function topallet_xcmweights (moonbase, moonbeam, moonriver)Node Service Changes
cumulus_primitives_core::GetCoreSelectorApitrait bound from runtime API requirementsProposerwrapper with direct use ofProposerFactorycollator_peer_id: PeerIdparameter to collator/consensus startupParachainTracingExecuteBlocksupport via newtracing_execute_blockfield inspawn_tasksadditional_relay_keys→additional_relay_state_keysin lookahead collator paramsParachain Inherent Data Refactor
ParachainInherentDatasplit intoBasicParachainInherentData+InboundMessagesDataset_validation_datacall now takes separatedataandinbound_messages_dataparametersPrecompile Updates
SelectCoreconfig fromcumulus_pallet_parachain_system::Configin mock runtimes (crowdloan-rewards, relay-encoder)Weight Updates
cumulus_pallet_xcmp_queue::take_first_concatenated_xcmnow takes an: u32component parameter (all runtimes)Test Fixes
using_fake_author()toinitialize_pending_block()Relevant Upstream PRs (polkadot-sdk)
LazyBlocktype used inexecute_blockandcheck_inherentsParachainInherentDataintoBasicParachainInherentData+InboundMessagesData, adds offchain processing of inbound messagesCoreInfovia a digest to the runtime — moves core selection to collator side, removesGetCoreSelectorApi/SelectCoreSelectCoredigest — preparation for core selection reworkon_initializeafter each pallet — changes event ordering (explains shifted event indices in tests)collator_peer_idparameter to collator consensustrace_block: Support overwritingexecute_block— introducesParachainTracingExecuteBlockVersionedAssetIdinstead ofu32to specify asset for feestake_first_concatenated_xcm()improvements — addsnparameter to weight functionProposerwrapperCheckInherentslogicadditional_relay_keys→additional_relay_state_keysRelevant Moonkit PRs
[author-slot-filter]Addusing_fake_authorlogicRuntime API
Core::execute_blocksignature changed (#9480): Theexecute_blockruntime API now accepts<Block as BlockT>::LazyBlockinstead ofBlock. Extrinsics are lazily decoded, deferring deserialization until needed. The same applies tocheck_inherents. Downstream tools that call these APIs directly must be updated.GetCoreSelectorApiremoved (#9002, #8903): TheGetCoreSelectorApiruntime API and theSelectCoreconfig type oncumulus_pallet_parachain_system::Confighave been fully removed. Core selection is now handled on the collator side and forwarded to the runtime via a digest. Any runtime implementing this API or configuringSelectCoremust remove it.XcmPaymentApibumped to v2 (#9963, #10243):query_delivery_feesnow requires an additionalasset_id: VersionedAssetIdparameter, allowing fee estimation in non-native assets. The v1 signature is retained as#[changed_in(2)]. Clients querying delivery fees must pass the new parameter.Node / Collator
Proposerwrapper removed (#9869):cumulus_client_consensus_proposer::Proposerhas been removed. Usesc_basic_authorship::ProposerFactorydirectly.collator_peer_idnow required (#10145): Collator startup functions (start_consensus, lookahead params) now require aPeerIdparameter. The peer ID is sent via UMP for protocol-level identification.tracing_execute_blockfield added toSpawnTasksParams(#9871):sc_service::SpawnTasksParamsnow includes atracing_execute_blockfield. Parachains should passSome(Arc::new(ParachainTracingExecuteBlock::new(client)))to supporttrace_blockRPC.additional_relay_keysrenamed (#9262): The lookahead collator parameteradditional_relay_keyshas been renamed toadditional_relay_state_keys.Parachain Inherent Data
ParachainInherentDatasplit (#8860): The monolithicParachainInherentDatastruct has been split intoBasicParachainInherentData(validation data, relay chain state, collator peer ID, relay parent descendants) andInboundMessagesData(downward + horizontal messages). Theset_validation_datainherent call now takes both as separate parameters. This enables offchain pre-processing of inbound messages before passing them to the runtime.CheckInherentslogic removed (#9732): TheCheckInherentsparameter inregister_validate_blockhas been removed. Inherent validation is now handled viaConsensusHookand pallet logic. Runtimes no longer need to implementCheckInherents.Event Ordering
on_initializeweight after each pallet's execution rather than batching them. This emits an additional weight-related event early in the block, shifting all subsequent event indices by one. Any off-chain code or tests that reference events by index must be updated.Weights
take_first_concatenated_xcmsignature changed (#9539): The weight function now takes an: u32component parameter instead of being a zero-argument function. Weight implementations must be updated to match the new trait signature.pallet_xcm::WeightInfo::weigh_messageadded: A new required method on thepallet_xcm::WeightInfotrait. Custom weight implementations must add this function.