Skip to content

Upgrade Moonbeam to Polkadot SDK stable2512#3633

Open
arturgontijo wants to merge 49 commits intomasterfrom
artur/moonbeam-polkadot-stable2512
Open

Upgrade Moonbeam to Polkadot SDK stable2512#3633
arturgontijo wants to merge 49 commits intomasterfrom
artur/moonbeam-polkadot-stable2512

Conversation

@arturgontijo
Copy link
Contributor

@arturgontijo arturgontijo commented Jan 16, 2026

Summary

Upgrades all Polkadot SDK dependencies from moonbeam-polkadot-stable2506 to moonbeam-polkadot-stable2512, along with the necessary adaptations across the node, runtime, precompiles, and tests.

Related PRs

Changes

Dependency Upgrades

  • All polkadot-sdk workspace dependencies updated from branch moonbeam-polkadot-stable2506moonbeam-polkadot-stable2512
  • Moonkit updated from moonbeam-polkadot-stable2506moonbeam-polkadot-stable2512
  • Frontier (EVM) updated from moonbeam-polkadot-stable2506moonbeam-polkadot-stable2512
  • Added pallet-author-slot-filter dependency to runtime/common
  • Added rocksdb feature to Frontier dependencies

Runtime API Changes

  • execute_block and check_inherents now use <Block as BlockT>::LazyBlock instead of Block
  • Removed GetCoreSelectorApi implementation (no longer required by the SDK)
  • XcmPaymentApi::query_delivery_fees now accepts an additional asset_id: VersionedAssetId parameter and uses AssetExchanger
  • Added new weigh_message() weight function to pallet_xcm weights (moonbase, moonbeam, moonriver)

Node Service Changes

  • Removed cumulus_primitives_core::GetCoreSelectorApi trait bound from runtime API requirements
  • Replaced Proposer wrapper with direct use of ProposerFactory
  • Added collator_peer_id: PeerId parameter to collator/consensus startup
  • Added ParachainTracingExecuteBlock support via new tracing_execute_block field in spawn_tasks
  • Renamed additional_relay_keysadditional_relay_state_keys in lookahead collator params

Parachain Inherent Data Refactor

  • ParachainInherentData split into BasicParachainInherentData + InboundMessagesData
  • set_validation_data call now takes separate data and inbound_messages_data parameters
  • Updated all runtime test helpers (moonbase, moonbeam, moonriver) accordingly

Precompile Updates

  • Removed SelectCore config from cumulus_pallet_parachain_system::Config in mock runtimes (crowdloan-rewards, relay-encoder)
  • Removed unnecessary dummy precompile code insertion in proxy precompile tests

Weight Updates

  • cumulus_pallet_xcmp_queue::take_first_concatenated_xcm now takes a n: u32 component parameter (all runtimes)

Test Fixes

  • Adjusted event indices in multiple Moonwall TypeScript tests to account for upstream event ordering changes (proxy, author-mapping, balance, sudo, randomness, XCM payment API, storage-growth tests)
  • Fixed XCM mock tests (statemint/statemine-like configurations)
  • Added using_fake_author() to initialize_pending_block()

Relevant Upstream PRs (polkadot-sdk)

PR Description
#9480 Lazy decode block extrinsics — introduces LazyBlock type used in execute_block and check_inherents
#8860 XCMP and DMP improvements — splits ParachainInherentData into BasicParachainInherentData + InboundMessagesData, adds offchain processing of inbound messages
#9002 Forward CoreInfo via a digest to the runtime — moves core selection to collator side, removes GetCoreSelectorApi / SelectCore
#8903 ParachainSystem: Do not emit the SelectCore digest — preparation for core selection rework
#9756 FRAME: Register on_initialize after each pallet — changes event ordering (explains shifted event indices in tests)
#10145 Send PeerId via UMP — adds collator_peer_id parameter to collator consensus
#9871 trace_block: Support overwriting execute_block — introduces ParachainTracingExecuteBlock
#9963 Query delivery fees v2 — reworks XCM delivery fee querying
#10243 pallet-xcm: API changes to use VersionedAssetId instead of u32 to specify asset for fees
#9539 take_first_concatenated_xcm() improvements — adds n parameter to weight function
#9869 Remove deprecated/unused consensus code — removes Proposer wrapper
#9732 Remove the deprecated CheckInherents logic
#9662 Remove deprecated collator-related code in cumulus
#9262 Adds support for additional relay state keys in parachain validation data inherent — renames additional_relay_keysadditional_relay_state_keys

Relevant Moonkit PRs

PR Description
#89 Update to polkadot-sdk stable2512
#92 [author-slot-filter] Add using_fake_author logic
#86 Add slot based collator

⚠️ Breaking Changes ⚠️

Runtime API

  • Core::execute_block signature changed (#9480): The execute_block runtime API now accepts <Block as BlockT>::LazyBlock instead of Block. Extrinsics are lazily decoded, deferring deserialization until needed. The same applies to check_inherents. Downstream tools that call these APIs directly must be updated.

  • GetCoreSelectorApi removed (#9002, #8903): The GetCoreSelectorApi runtime API and the SelectCore config type on cumulus_pallet_parachain_system::Config have 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 configuring SelectCore must remove it.

  • XcmPaymentApi bumped to v2 (#9963, #10243): query_delivery_fees now requires an additional asset_id: VersionedAssetId parameter, 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

  • Proposer wrapper removed (#9869): cumulus_client_consensus_proposer::Proposer has been removed. Use sc_basic_authorship::ProposerFactory directly.

  • collator_peer_id now required (#10145): Collator startup functions (start_consensus, lookahead params) now require a PeerId parameter. The peer ID is sent via UMP for protocol-level identification.

  • tracing_execute_block field added to SpawnTasksParams (#9871): sc_service::SpawnTasksParams now includes a tracing_execute_block field. Parachains should pass Some(Arc::new(ParachainTracingExecuteBlock::new(client))) to support trace_block RPC.

  • additional_relay_keys renamed (#9262): The lookahead collator parameter additional_relay_keys has been renamed to additional_relay_state_keys.

Parachain Inherent Data

  • ParachainInherentData split (#8860): The monolithic ParachainInherentData struct has been split into BasicParachainInherentData (validation data, relay chain state, collator peer ID, relay parent descendants) and InboundMessagesData (downward + horizontal messages). The set_validation_data inherent call now takes both as separate parameters. This enables offchain pre-processing of inbound messages before passing them to the runtime.

  • CheckInherents logic removed (#9732): The CheckInherents parameter in register_validate_block has been removed. Inherent validation is now handled via ConsensusHook and pallet logic. Runtimes no longer need to implement CheckInherents.

Event Ordering

  • Event indices shifted by +1 (#9756): FRAME now registers on_initialize weight 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_xcm signature changed (#9539): The weight function now takes a n: u32 component parameter instead of being a zero-argument function. Weight implementations must be updated to match the new trait signature.

  • pallet_xcm::WeightInfo::weigh_message added: A new required method on the pallet_xcm::WeightInfo trait. Custom weight implementations must add this function.

@coderabbitai
Copy link

coderabbitai bot commented Jan 16, 2026

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Workspace-wide migration to Polkadot/Substrate stable2512, API and weight signature updates (LazyBlock, parametric XCM weights), removal of explicit SelectCore/GetCoreSelectorApi usages, node service changes to pass collator_peer_id and wire tracing, JS/frontend patch, test expectation updates, and small CI/package tweaks.

Changes

Cohort / File(s) Summary
Workspace & Build
Cargo.toml, Makefile, .github/workflows/build.yml, package.json, test/package.json
Bumped many workspace deps/branches 2506→2512, updated POLKADOT/BRIDGE pins in Makefile, added libclang-dev to CI, added pnpm patchedDependencies, and bumped test chopsticks.
Runtime API & Traits
runtime/common/src/apis.rs
Core/BlockBuilder/TryRuntime execute_block and check_inherents now accept <Block as BlockT>::LazyBlock; removed GetCoreSelectorApi impl; query_delivery_fees now takes an asset_id and delegates via AssetExchanger.
SelectCore Removal
runtime/*/src/lib.rs, precompiles/*/src/mock.rs
Removed explicit type SelectCore = DefaultCoreSelector<Runtime> across multiple runtimes and mocks (rely on default selector).
XCM Weight Changes
runtime/*/src/weights/cumulus_pallet_xcmp_queue.rs, runtime/*/src/weights/pallet_xcm.rs
take_first_concatenated_xcm now accepts n: u32 and returns base + per-n linear weight; added weigh_message() -> Weight.
Node Service & Tracing
node/service/src/lib.rs, node/service/src/lazy_loading/mod.rs, node/cli/src/command.rs
Added collator_peer_id: PeerId into consensus/start flows and params, simplified RuntimeApi trait bounds, wired ParachainTracingExecuteBlock into spawned tasks, updated parachain account derivation to polkadot_primitives::v9::AccountId.
RPC Adjustment
node/service/src/rpc.rs
Removed graph.clone() argument from Eth::new in create_full (Eth RPC construction no longer takes graph).
Frontend/JS Patch
patches/@acala-network__chopsticks-core.patch, dist/.../blockchain/*
Added private extrinsicMeta field/getter on Block and switched parachain validation-data to use parent.extrinsicMeta.
Tests: Event & Gas Expectations
test/suites/dev/**, test/.../test-*
Adjusted many test event index expectations (mostly +1 shifts) and updated several gas/inline-snapshot values to match runtime changes.
Parachain Inherent Restructure
runtime/*/tests/common/mod.rs
Replaced ParachainInherentData with BasicParachainInherentData + InboundMessagesData; updated set_validation_data calls.
Assets / Benchmarks
runtime/*/tests/xcm_mock/*
Added pub type ReserveId = u128, extended BenchmarkHelper generics to include ReserveIdParameter, and added ReserveData = ReserveId to pallet_assets::Config.
Primitives & Precompiles
primitives/account/src/lib.rs, precompiles/proxy/src/tests.rs, precompiles/*/src/mock.rs
Extended EthereumSignature::From<MultiSignature> to handle Eth variant; removed dummy precompile code setup in one proxy test; removed explicit SelectCore in several mocks.
Misc & Infra
.gitignore, scripts/verify-licenses.sh, zombienet/configs/*, docs/cherry-picks/*
Ignored .pi/, added "BSD-3-Clause OR GPL-2.0" to license checks, replaced chain_spec_path with named chain in zombienet configs, and added cherry-picks docs.
Other Runtime Tooling
runtime/common/Cargo.toml
Added pallet-author-slot-filter to workspace deps, features, try-runtime and cargo-udeps ignore.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Node as Node
participant Consensus as Consensus
participant Relay as RelayChainTasks
participant Tracing as ParachainTracingExecuteBlock
participant RPC as RPC

Node->>Consensus: start_consensus(collator_peer_id)
Consensus->>Relay: spawn relay tasks (with collator_peer_id)
Relay->>Tracing: ParachainTracingExecuteBlock::new(client.clone())
Relay->>RPC: include tracing instance in RPC task spawn
RPC->>Tracing: use tracing to execute block tracing

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

D9-needsaudit👮, agent-review, weights-updates

Suggested reviewers

  • arturgontijo
  • librelois
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'Upgrade Moonbeam to Polkadot SDK stable2512' directly and clearly describes the primary change—a dependency upgrade from stable2506 to stable2512 across all Polkadot SDK dependencies.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description check ✅ Passed The pull request description clearly documents an upgrade from moonbeam-polkadot-stable2506 to stable2512 with comprehensive details of all API changes, runtime modifications, node service updates, and test adjustments.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch artur/moonbeam-polkadot-stable2512
📝 Coding Plan for PR comments
  • Generate coding plan

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

Moonbase Weight Difference Report

File Extrinsic Old New Change Percent
runtime/moonbase/src/weights/cumulus_pallet_xcmp_queue.rs take_first_concatenated_xcm 5.44us 4.02us -26.08%

Moonriver Weight Difference Report

File Extrinsic Old New Change Percent
runtime/moonriver/src/weights/cumulus_pallet_xcmp_queue.rs take_first_concatenated_xcm 5.76us 4.02us -30.18%

Moonbeam Weight Difference Report

File Extrinsic Old New Change Percent
runtime/moonbeam/src/weights/cumulus_pallet_xcmp_queue.rs take_first_concatenated_xcm 5.76us 4.02us -30.18%

@RomarQ RomarQ added dependencies Pull requests that update a dependency file B5-clientnoteworthy Changes should be mentioned in any downstream projects' release notes B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes labels Jan 16, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

WASM runtime size check:

Compared to target branch

Moonbase runtime: 2064 KB (-36 KB) ✅

Moonbeam runtime: 2188 KB (-24 KB) ✅

Moonriver runtime: 2188 KB (-24 KB) ✅

Compared to latest release (runtime-4202)

Moonbase runtime: 2064 KB (+128 KB compared to latest release) ⚠️

Moonbeam runtime: 2188 KB (+156 KB compared to latest release) ⚠️

Moonriver runtime: 2188 KB (+156 KB compared to latest release) ⚠️

@arturgontijo arturgontijo force-pushed the artur/moonbeam-polkadot-stable2512 branch from a13b535 to ebc8ddd Compare January 16, 2026 22:13
# 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
@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Coverage Report

@@                          Coverage Diff                           @@
##           master   artur/moonbeam-polkadot-stable2512      +/-   ##
======================================================================
- Coverage   77.15%                               77.13%   -0.02%     
  Files         389                                  389              
+ Lines       77169                                77195      +26     
======================================================================
+ Hits        59535                                59543       +8     
+ Misses      17634                                17652      +18     
Files Changed Coverage
/node/service/src/lib.rs 56.72% (-0.02%) 🔽
/precompiles/proxy/src/tests.rs 96.87% (-0.01%) 🔽
/primitives/account/src/lib.rs 62.93% (-0.55%) 🔽
/runtime/common/src/apis.rs 53.18% (+0.31%) 🔼
/runtime/moonbase/src/weights/cumulus_pallet_xcmp_queue.rs 67.21% (-2.28%) 🔽
/runtime/moonbase/src/weights/pallet_xcm.rs 4.90% (-0.20%) 🔽
/runtime/moonbase/tests/common/mod.rs 94.46% (+0.05%) 🔼
/runtime/moonbeam/src/weights/cumulus_pallet_xcmp_queue.rs 67.21% (-2.28%) 🔽
/runtime/moonbeam/tests/common/mod.rs 92.58% (+0.07%) 🔼
/runtime/moonriver/src/weights/cumulus_pallet_xcmp_queue.rs 67.21% (-2.28%) 🔽
/runtime/moonriver/tests/common/mod.rs 93.87% (+0.06%) 🔼

Coverage generated Thu Mar 12 16:14:59 UTC 2026

# 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
@manuelmauro manuelmauro self-assigned this Mar 9, 2026
@manuelmauro manuelmauro requested a review from a team as a code owner March 11, 2026 08:56
… file

Convert Notion export (CSV + markdown) into a single .md file with
inline markdown tables, shortened link labels, and deduplicated URLs.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 9

🧹 Nitpick comments (4)
test/suites/dev/common/test-proxy/test-proxy-balance.ts (1)

27-27: Event index adjustments align with SDK upgrade expectations.

The incremented indices (+1 for each ExtrinsicSuccess assertion) are consistent with the PR objective stating that the Polkadot SDK stable2512 upgrade introduces additional events in block results.

As an optional improvement, consider finding events by method name rather than hardcoded indices to make tests more resilient to future runtime changes:

const extrinsicSuccessEvent = result!.events.find(
  (e) => e.event.method === "ExtrinsicSuccess"
);
expect(extrinsicSuccessEvent).to.exist;

This would prevent test breakage when event ordering changes in future upgrades.
,

Also applies to: 42-42, 72-72

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/suites/dev/common/test-proxy/test-proxy-balance.ts` at line 27, Replace
brittle index-based assertions that check result!.events[8].event.method (and
similar at the other two locations) with searches for the event by method name;
specifically, locate the "ExtrinsicSuccess" event via result!.events.find(e =>
e.event.method === "ExtrinsicSuccess") (or equivalent) and assert it exists,
updating the three occurrences that reference hardcoded indices so tests no
longer depend on event ordering.
patches/@acala-network__chopsticks-core.patch (1)

1-142: Consider tracking upstream for patch removal.

This patch modifies compiled distribution files, which is fragile and will likely break on any chopsticks-core version bump.

Consider:

  1. Opening an upstream issue/PR at @acala-network/chopsticks for a proper fix
  2. Adding a comment in package.json or creating a tracking issue noting when this patch can be removed
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@patches/`@acala-network__chopsticks-core.patch around lines 1 - 142, This
change patches compiled artifacts to add Block.extrinsicMeta and update
getValidationData to use parent.extrinsicMeta; instead of committing distro
edits, open an upstream issue/PR against `@acala-network/chopsticks` to land the
fix in source (mention Block.extrinsicMeta and the change in
inherent/parachain/validation-data.js/getValidationData), and add a short
tracking note in package.json (or a repo-level TRACKING.md) that references the
upstream issue/PR number and the chopsticks-core version when this patch can be
removed; also add a one-line TODO comment next to the current patch entry so
reviewers know this is temporary and should be reverted once upstream fixes it.
test/suites/dev/moonbase/test-sudo/test-sudo.ts (1)

82-87: Consider using consistent assertion style for better error messages.

Line 82 uses expect(result!.events.length === 7).to.be.true while T01 (line 32) uses expect(result!.events.length).to.eq(7). The latter provides more informative failure messages by showing actual vs expected values.

♻️ Suggested consistency fix
-        expect(result!.events.length === 7).to.be.true;
+        expect(result!.events.length).to.eq(7);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/suites/dev/moonbase/test-sudo/test-sudo.ts` around lines 82 - 87,
Replace the boolean-style length assertion with a value equality assertion for
consistency and better failure messages: change the check that uses
result!.events.length === 7 to use expect(result!.events.length).to.eq(7);
ensure similar event assertions remain as-is (they use
context.polkadotJs().events.* helpers like system.NewAccount, balances.Endowed,
system.ExtrinsicFailed) so only update the length assertion around the result
variable to the .to.eq form to match the other tests.
node/service/src/rpc.rs (1)

286-307: Remove commented-out graph.clone() argument from the Eth::new call.

The commented-out // graph.clone() at line 289 serves no purpose. The Eth::new constructor in the current Frontier version (moonbeam-polkadot-stable2512) no longer requires the graph parameter, unlike earlier versions. The comment should be removed entirely rather than left as dead code. The graph parameter remains necessary for EthFilter::new and TxPool::new, but it has been removed from the Eth::new API.

Suggested cleanup
	io.merge(
		Eth::<_, _, _, _, _, _, MoonbeamEthConfig<_, _>>::new(
			Arc::clone(&client.clone()),
			Arc::clone(&pool),
-			// graph.clone(),
			convert_transaction,
			Arc::clone(&sync),
			signers,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@node/service/src/rpc.rs` around lines 286 - 307, Remove the dead
commented-out argument by deleting the leftover "// graph.clone()" within the
Eth::new(...) invocation; ensure the call to Eth::<_, _, _, _, _, _,
MoonbeamEthConfig<_, _>>::new(...) only contains the actual live arguments
(convert_transaction, Arc::clone(&sync), signers, etc.). Do not change usages of
graph elsewhere—keep graph.clone for EthFilter::new and TxPool::new where
required—but remove this commented fragment to clean up the Eth::new call site.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Cargo.toml`:
- Around line 267-273: The workspace disables SQL for fc-db but the code still
references the SQL backend; update the fc-db dependency declaration that
currently reads like `fc-db = { workspace = true }` to include `features =
["sql"]` so the `FrontierBackendConfig::Sql` match arm can call
`fc_db::sql::Backend::new()` and construct `fc_db::sql::BackendConfig::Sqlite()`
successfully; alternatively, remove the unused SQL branch by deleting the
`FrontierBackendConfig::Sql` handling in the service lib (and the related CLI
usage) if you intend to keep SQL support disabled.

In `@test/suites/dev/moonbase/test-author/test-author-failed-association.ts`:
- Line 46: The test contains a no-op assertion: the line that passes a boolean
expression into expect (the expect around result?.events.length === 7) never
calls an assertion method and will always pass; fix it by replacing that usage
with a real assertion that calls an assertion method on the length value (i.e.,
invoke expect on result?.events.length and call the framework's equality matcher
such as .to.equal(7) for Chai or .toBe(7) for Jest) in the
test-author-failed-association.ts test so the event count is actually asserted.

In `@test/suites/dev/moonbase/test-author/test-author-non-author-clearing.ts`:
- Line 31: The assertion currently uses a boolean expression
(`expect(result?.events.length === 5)`) which is a no-op; change it to assert
the length properly by calling an assertion matcher on the events length (e.g.,
use `expect(result?.events.length).toBe(5)` or
`expect(result?.events).toHaveLength(5)`), referencing the `result` variable and
its `events` property in the test `test-author-non-author-clearing.ts`.

In `@test/suites/dev/moonbase/test-author/test-author-registered-clear.ts`:
- Around line 26-29: The test currently has a no-op assertion using
`expect(result?.events.length === 6)` and then reads `result.events[6]` which is
out of bounds for length 6; change the length assertion to a real Chai assertion
on `result?.events.length` (not a boolean expression) and update the expected
length to 7 (or adjust the accessed index) so `result.events[6]` is valid,
keeping references to `result`, `result.events`, `expect`, and the
`api.events.*` checks (`api.events.balances.Unreserved`,
`api.events.authorMapping.KeysRemoved`, `api.events.system.ExtrinsicSuccess`)
intact.

In `@test/suites/dev/moonbase/test-author/test-author-simple-association.ts`:
- Line 50: The current assertion expect(result?.events.length === 9) is a no-op
because it asserts a boolean expression rather than using the assertion matcher;
change the call to use the testing library's matcher on the value itself, e.g.,
replace the expect invocation around the boolean with
expect(result?.events.length).to.equal(9) (or .toBe(9) if using Jest) so the
test actually asserts the length; update the expect call referencing
result?.events.length in test-author-simple-association.ts accordingly.

In `@test/suites/dev/moonbase/test-author/test-author-unregistered-clear.ts`:
- Line 20: The assertion expect(result?.events.length === 7) is a no-op; change
the expect call to test the value with a matcher instead of comparing inside
expect — replace it with a proper assertion on result?.events.length (for
example, expect(result?.events.length).to.equal(7) if using Chai or
expect(result?.events.length).toBe(7) if using Jest) so the test actually fails
when the length is not 7; update the expect invocation that references
result?.events.length accordingly.

In `@test/suites/dev/moonbase/test-randomness/test-randomness-vrf-lottery4.ts`:
- Around line 48-49: The log message incorrectly says "Estimated Gas for
startLottery" while the value in estimatedGas corresponds to fulfillRequest;
update the log call that prints estimatedGas to reference fulfillRequest instead
of startLottery (locate the log(...) call near the
expect(estimatedGas).to.equal(165855n) assertion), so the message accurately
reflects the function/operation being measured (fulfillRequest).

In `@test/suites/dev/moonbase/test-xcm-v4/test-xcm-payment-api.ts`:
- Around line 136-146: The test currently only checks deliveryFees.isOk is false
which allows any failure; update the assertion to verify the specific error for
"delivery fees not configured" by inspecting deliveryFees.asErr and asserting
the expected variant/message from the xcmPaymentApi response (e.g. check a
specific enum variant or error string) instead of just isOk; locate the call to
polkadotJs.call.xcmPaymentApi.queryDeliveryFees and replace the broad
expect(deliveryFees.isOk).to.be.false with an assertion that deliveryFees.asErr
matches the concrete "delivery fees not configured" variant/message.

In `@test/suites/dev/moonbase/test-xcm-v5/test-xcm-payment-api.ts`:
- Around line 150-160: The test currently only checks deliveryFees.isOk ===
false which accepts any error; change the assertion to require
deliveryFees.isErr and assert the specific error variant/message that represents
"no delivery fees configured" from
polkadotJs.call.xcmPaymentApi.queryDeliveryFees (look up the exact enum/variant
returned) and assert against that expected value (use the
deliveryFees.unwrapErr() or pattern-match the error to confirm the expected
variant/message) so the test fails for malformed asset_id or unrelated runtime
errors; update references to deliveryFees and queryDeliveryFees in the test
accordingly.

---

Nitpick comments:
In `@node/service/src/rpc.rs`:
- Around line 286-307: Remove the dead commented-out argument by deleting the
leftover "// graph.clone()" within the Eth::new(...) invocation; ensure the call
to Eth::<_, _, _, _, _, _, MoonbeamEthConfig<_, _>>::new(...) only contains the
actual live arguments (convert_transaction, Arc::clone(&sync), signers, etc.).
Do not change usages of graph elsewhere—keep graph.clone for EthFilter::new and
TxPool::new where required—but remove this commented fragment to clean up the
Eth::new call site.

In `@patches/`@acala-network__chopsticks-core.patch:
- Around line 1-142: This change patches compiled artifacts to add
Block.extrinsicMeta and update getValidationData to use parent.extrinsicMeta;
instead of committing distro edits, open an upstream issue/PR against
`@acala-network/chopsticks` to land the fix in source (mention Block.extrinsicMeta
and the change in inherent/parachain/validation-data.js/getValidationData), and
add a short tracking note in package.json (or a repo-level TRACKING.md) that
references the upstream issue/PR number and the chopsticks-core version when
this patch can be removed; also add a one-line TODO comment next to the current
patch entry so reviewers know this is temporary and should be reverted once
upstream fixes it.

In `@test/suites/dev/common/test-proxy/test-proxy-balance.ts`:
- Line 27: Replace brittle index-based assertions that check
result!.events[8].event.method (and similar at the other two locations) with
searches for the event by method name; specifically, locate the
"ExtrinsicSuccess" event via result!.events.find(e => e.event.method ===
"ExtrinsicSuccess") (or equivalent) and assert it exists, updating the three
occurrences that reference hardcoded indices so tests no longer depend on event
ordering.

In `@test/suites/dev/moonbase/test-sudo/test-sudo.ts`:
- Around line 82-87: Replace the boolean-style length assertion with a value
equality assertion for consistency and better failure messages: change the check
that uses result!.events.length === 7 to use
expect(result!.events.length).to.eq(7); ensure similar event assertions remain
as-is (they use context.polkadotJs().events.* helpers like system.NewAccount,
balances.Endowed, system.ExtrinsicFailed) so only update the length assertion
around the result variable to the .to.eq form to match the other tests.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0b890952-b82b-4358-b8bc-0a23dd5127bb

📥 Commits

Reviewing files that changed from the base of the PR and between 48d5a83 and aabd12c.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (53)
  • .github/workflows/build.yml
  • .github/workflows/weight-diff-report.yml
  • .gitignore
  • Cargo.toml
  • Makefile
  • node/cli/src/command.rs
  • node/service/src/lazy_loading/mod.rs
  • node/service/src/lib.rs
  • node/service/src/rpc.rs
  • package.json
  • patches/@acala-network__chopsticks-core.patch
  • precompiles/crowdloan-rewards/src/mock.rs
  • precompiles/proxy/src/tests.rs
  • precompiles/relay-encoder/src/mock.rs
  • primitives/account/src/lib.rs
  • runtime/common/Cargo.toml
  • runtime/common/src/apis.rs
  • runtime/moonbase/src/lib.rs
  • runtime/moonbase/src/weights/cumulus_pallet_xcmp_queue.rs
  • runtime/moonbase/src/weights/pallet_xcm.rs
  • runtime/moonbase/tests/common/mod.rs
  • runtime/moonbase/tests/xcm_mock/statemint_like.rs
  • runtime/moonbeam/src/lib.rs
  • runtime/moonbeam/src/weights/cumulus_pallet_xcmp_queue.rs
  • runtime/moonbeam/src/weights/pallet_xcm.rs
  • runtime/moonbeam/tests/common/mod.rs
  • runtime/moonbeam/tests/xcm_mock/statemint_like.rs
  • runtime/moonriver/src/lib.rs
  • runtime/moonriver/src/weights/cumulus_pallet_xcmp_queue.rs
  • runtime/moonriver/src/weights/pallet_xcm.rs
  • runtime/moonriver/tests/common/mod.rs
  • runtime/moonriver/tests/xcm_mock/statemine_like.rs
  • scripts/verify-licenses.sh
  • test/package.json
  • test/suites/dev/common/test-proxy/test-proxy-author-mapping.ts
  • test/suites/dev/common/test-proxy/test-proxy-balance.ts
  • 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-balance/test-balance-extrinsics.ts
  • test/suites/dev/moonbase/test-polkadot-js/test-polkadot-api.ts
  • test/suites/dev/moonbase/test-randomness/test-randomness-babe-lottery2.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-randomness/test-randomness-vrf-lottery5.ts
  • test/suites/dev/moonbase/test-storage-growth/test-precompile-storage-growth.ts
  • test/suites/dev/moonbase/test-sudo/test-sudo.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
  • zombienet/configs/moonbeam-polkadot.toml
  • zombienet/configs/moonriver-kusama.toml
💤 Files with no reviewable changes (6)
  • precompiles/crowdloan-rewards/src/mock.rs
  • runtime/moonriver/src/lib.rs
  • runtime/moonbase/src/lib.rs
  • precompiles/relay-encoder/src/mock.rs
  • precompiles/proxy/src/tests.rs
  • runtime/moonbeam/src/lib.rs

- Add Title column to all tables (commit column was misused for this)
- Update Commit column to actual hashes on moonbeam-polkadot-stable2512
- Verify all 'Included' items exist on the branch, all 'Dropped' do not
- Fix evm EIP-7939: change from Dropped to Included (still on 0.43.x fork)
- Flag frontier PR#1855 and PR#1832 as not yet cherry-picked
- Clear commit column for Dropped items (no longer on current branch)
Change status from 'PR Upstream Merged' to 'Permanent' — the
WILD_MULTI_ASSET_MAX_LIMIT constant does not exist in upstream
stable2512 and there is no upstream PR.
… file

Convert Notion export (CSV + markdown) into a single .md file with
inline markdown tables, shortened link labels, and deduplicated URLs.
Verify all commits against moonbeam-polkadot-stable2506 branches.
Add Title column and update Commit column to actual hashes on branch.
Fix WildMultiAsset status to Permanent (no upstream PR exists).
Flag ParachainTracingExecuteBlock as not found on the branch.
'Forbid transactions without chain ID by default' (cdd4ecd9a) was
present on the moonbeam-polkadot-stable2512 frontier branch and in
the stable2506 doc, but missing from the stable2512 doc.
Documents the cherry-pick tracking process, table schema, verification
method (merge-base diffing), upstream remote mapping, and common
pitfalls learned from the stable2506→stable2512 upgrade.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/cherry-picks/polkadot-sdk-stable2506.md`:
- Line 44: Edit the table entry that currently reads "Do client side check of
withdraw-ability" and hyphenate "client-side" so the title becomes "Do
client-side check of withdraw-ability"; locate the row containing that string in
the table (the cell alongside the moonbeam-foundation/frontier commit and
polkadot-evm/frontier PR links) and update only the title text to the hyphenated
form.

In `@docs/cherry-picks/polkadot-sdk-stable2512.md`:
- Around line 75-76: Update the table rows referencing PRs
[polkadot-evm/frontier#1855] and [polkadot-evm/frontier#1832] so the "Cherry
pick" column matches the note; either replace the "Included" cell value with
"Not yet cherry-picked onto the branch" for those two rows, or change the
trailing note to state they are included—ensure consistency between the
"Included" cell and the final note for the entries mentioning
createAndFinalizeBlock() and eth_blockNumber mapping-sync.
- Around line 83-84: Update the status notes for the two table rows "Update to
polkadot-sdk stable2512" and "Add slot based collator" so they no longer say the
PR "can be merged"—replace those pending/mergeable notes with a merged-complete
note (e.g., "Merged" or "Completed") to match the "PR Merged" status in both
rows and ensure the table accurately reflects the final state.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4199b633-35bc-45ea-88ec-e12382cd6023

📥 Commits

Reviewing files that changed from the base of the PR and between aabd12c and 30d27e3.

📒 Files selected for processing (2)
  • docs/cherry-picks/polkadot-sdk-stable2506.md
  • docs/cherry-picks/polkadot-sdk-stable2512.md

…adot-stable2512

# Conflicts:
#	.github/workflows/build.yml
Six test files used `expect(value === n)` which passes a boolean to
expect() without calling an assertion method, making the check a no-op
that never fails. Changed all occurrences to `expect(value).to.equal(n)`
so the event length is actually asserted.
The log incorrectly referenced startLottery while the estimate was
for the fulfillRequest operation.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
test/suites/dev/moonbase/test-author/test-author-unregistered-clear.ts (1)

20-23: Prefer event-type membership checks over fixed offsets.

These assertions are tightly coupled to the exact event ordering/count, which already shifted in this SDK bump. Unless the order itself is part of the contract, asserting that NewAccount, Endowed, and ExtrinsicFailed are present will make this test much less upgrade-sensitive.

♻️ Possible rewrite
-        expect(result?.events.length).to.equal(7);
-        expect(api.events.system.NewAccount.is(result!.events[2].event)).to.be.true;
-        expect(api.events.balances.Endowed.is(result!.events[3].event)).to.be.true;
-        expect(api.events.system.ExtrinsicFailed.is(result!.events[6].event)).to.be.true;
+        const events = result!.events.map(({ event }) => event);
+        expect(events.some((event) => api.events.system.NewAccount.is(event))).to.be.true;
+        expect(events.some((event) => api.events.balances.Endowed.is(event))).to.be.true;
+        expect(events.some((event) => api.events.system.ExtrinsicFailed.is(event))).to.be.true;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/suites/dev/moonbase/test-author/test-author-unregistered-clear.ts`
around lines 20 - 23, The test currently asserts specific events by fixed
indices (result?.events[2], [3], [6]) which is brittle; update the assertions in
the test to check membership instead of offsets by searching result?.events for
any event where api.events.system.NewAccount.is(evt.event),
api.events.balances.Endowed.is(evt.event), and
api.events.system.ExtrinsicFailed.is(evt.event) return true (e.g., use
Array.prototype.some or find on result.events) and assert those are
present—replace the index-based expects with presence checks that reference
result?.events and the api.events.*.is helpers.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@test/suites/dev/moonbase/test-author/test-author-unregistered-clear.ts`:
- Around line 20-23: The test currently asserts specific events by fixed indices
(result?.events[2], [3], [6]) which is brittle; update the assertions in the
test to check membership instead of offsets by searching result?.events for any
event where api.events.system.NewAccount.is(evt.event),
api.events.balances.Endowed.is(evt.event), and
api.events.system.ExtrinsicFailed.is(evt.event) return true (e.g., use
Array.prototype.some or find on result.events) and assert those are
present—replace the index-based expects with presence checks that reference
result?.events and the api.events.*.is helpers.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 007a1256-6007-4523-991d-771b6725a522

📥 Commits

Reviewing files that changed from the base of the PR and between b08f5f1 and 578400f.

📒 Files selected for processing (7)
  • test/suites/dev/moonbase/test-author/test-author-failed-association.ts
  • test/suites/dev/moonbase/test-author/test-author-missing-deposit-fail.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-vrf-lottery4.ts
🚧 Files skipped from review as they are similar to previous changes (5)
  • test/suites/dev/moonbase/test-author/test-author-simple-association.ts
  • test/suites/dev/moonbase/test-author/test-author-registered-clear.ts
  • test/suites/dev/moonbase/test-author/test-author-failed-association.ts
  • test/suites/dev/moonbase/test-randomness/test-randomness-vrf-lottery4.ts
  • test/suites/dev/moonbase/test-author/test-author-non-author-clearing.ts

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
docs/cherry-picks/polkadot-sdk-stable2512.md (1)

75-76: ⚠️ Potential issue | 🟡 Minor

Resolve the Included vs not yet cherry-picked contradiction.

Line 75 and Line 76 still conflict internally: Cherry pick says Included, but the note says these are Not yet cherry-picked onto the branch. Please align those fields so the ledger has a single source of truth for whether these fixes are actually present.

🤖 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` around lines 75 - 76, The table
rows for "Wait for chain head and eth \"latest\" in createAndFinalizeBlock()"
and "Avoid eth_blockNumber returning 0x00 when mapping-sync lags" have
conflicting status fields: the Cherry-pick column shows "Included" while the
note column says "Not yet cherry-picked onto the branch"; update those entries
so both columns agree (either mark both as "Included" and remove the "Not yet
cherry-picked onto the branch" note, or change the Cherry-pick column to "Not
yet cherry-picked" to match the note) and ensure the PR links
([polkadot-evm/frontier#1855] and [polkadot-evm/frontier#1832]) remain intact
for traceability.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/cherry-picks/polkadot-sdk-stable2512.md`:
- Around line 11-12: The table has commit links placed under the "Upstream PR"
column for entries like "Add storage benchmark --keys-limit option" and
"ParachainTracingExecuteBlock"; move any non-PR references (raw commit links
such as moonbeam-foundation/polkadot-sdk@ef91563 and
moonbeam-foundation/polkadot-sdk@3e68f82) into the "Commit" or "Note" column and
clear the "Upstream PR" cell unless there is an actual upstream PR URL (ensure
the "ParachainTracingExecuteBlock" row reflects the PRs only in the Upstream PR
column and the commit hashes in Commit/Note), and apply the same change for the
duplicate occurrence mentioned in the comment.
- Line 50: The sentence "Could be dropped since it related to was fixed in
[paritytech/polkadot-sdk#2292]..." is ambiguous—replace it with an explicit
decision sentence: state whether this cherry-pick should be kept or dropped
(e.g., "Keep: investigations show the SDK fix in paritytech/polkadot-sdk#2292
did not fully resolve the issue, so this cherry-pick is required"), and preserve
the references to paritytech/polkadot-sdk#2292, paritytech/polkadot-sdk#1833,
and the investigation note by Eloïs so readers know testing is still needed to
confirm. Ensure the new text unambiguously communicates the current decision
(Keep or Drop) and any next steps (test/reproduce) in one clear sentence.

---

Duplicate comments:
In `@docs/cherry-picks/polkadot-sdk-stable2512.md`:
- Around line 75-76: The table rows for "Wait for chain head and eth \"latest\"
in createAndFinalizeBlock()" and "Avoid eth_blockNumber returning 0x00 when
mapping-sync lags" have conflicting status fields: the Cherry-pick column shows
"Included" while the note column says "Not yet cherry-picked onto the branch";
update those entries so both columns agree (either mark both as "Included" and
remove the "Not yet cherry-picked onto the branch" note, or change the
Cherry-pick column to "Not yet cherry-picked" to match the note) and ensure the
PR links ([polkadot-evm/frontier#1855] and [polkadot-evm/frontier#1832]) remain
intact for traceability.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 702c97f1-1910-4873-a47a-6fc966a3a16e

📥 Commits

Reviewing files that changed from the base of the PR and between 578400f and 5e3f034.

📒 Files selected for processing (1)
  • docs/cherry-picks/polkadot-sdk-stable2512.md

Both PRs are not yet present on the moonbeam-polkadot-stable2512
frontier branch. Changed Cherry pick column from Included to Pending
to match the existing note and Applied: No status.
Frontier: b6d0dfba -> 8ff24823 (cherry-picks #1832, #1855)
Moonkit: 134e246f -> 038e6723 (updated frontier pin)
The test accesses events[6] (7th event) but asserted length === 6.
The old no-op expect() never caught this; our fix exposed the mismatch.
coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 12, 2026
Copy link
Collaborator

@librelois librelois left a comment

Choose a reason for hiding this comment

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

Findings

  1. Build-breaking RPC constructor mismatch

    • File: node/service/src/rpc.rs
    • The Eth::new(...) call no longer matches the Frontier stable2512 signature.
    • graph.clone() was commented out, but the remaining arguments were not realigned, so later parameters are now passed in the wrong positions.
    • Risk: this should fail to compile.
  2. Build-breaking lookahead consensus param mismatch

    • File: node/service/src/lib.rs
    • The lookahead collator params were updated as if they used the slot-based API.
    • In the checked stable2512 moonkit sources, lookahead::Params still expects additional_relay_keys and does not expose collator_peer_id.
    • Risk: this should fail to compile.
  3. Build-breaking trait bound removal

    • File: node/service/src/lib.rs
    • GetCoreSelectorApi was removed from the service bounds, but the slot-based collator path still requires it in stable2512 moonkit.
    • Risk: the service should fail to type-check when the slot-based path is compiled.
  4. Likely bridge test regression

    • Files: zombienet/configs/moonbeam-polkadot.toml, zombienet/configs/moonriver-kusama.toml
    • These configs now launch rococo-local, but the bridge scripts and test flows still treat the networks as Polkadot/Kusama.
    • Risk: Moonbeam/Moonriver bridge zombienet scenarios may boot with relay-chain assumptions that no longer match the transfer destinations and bridge setup.

Suggestions

  1. Fix the stable2512 API migrations in:

    • node/service/src/rpc.rs
    • node/service/src/lib.rs
  2. Reconcile the relay-chain change:

    • Either keep these zombienet configs on polkadot-local / kusama-local
    • Or update the bridge scripts/tests so they consistently target rococo-local
  3. After fixing the above, run:

    • a targeted node build
    • the affected bridge zombienet scenario

The extrinsic metadata decode fix is now upstream via
AcalaNetwork/chopsticks#1005, so the local patch on
@acala-network/chopsticks-core is no longer needed.
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 D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants