Skip to content

Releases: paritytech/polkadot-sdk

Polkadot stable2512-2

23 Feb 10:28
00fbc91

Choose a tag to compare

This release contains the changes from polkadot-stable2512-1 to polkadot-stable2512-2.

This is a patch release for the latest stable version: stable2512. If your nodes are already running on this stable release,
you should upgrade to this patch version to get the latest fixes.

The tag corresponding to the current patch release polkadot-stable2512-2 and matching the old pattern will be
available under polkadot-v1.21.2.

The following crates were updated to the corresponding versions:

Click to see crates list - sp-trie@42.0.1 - frame-benchmarking@45.0.3 - pallet-dap@0.2.0 - pallet-statement@0.2.0 - pallet-bags-list@44.0.1 - pallet-nomination-pools@43.0.2 - snowbridge-verification-primitives@0.7.1 - polkadot-node-core-pvf-execute-worker@24.0.1 - polkadot-node-core-pvf-prepare-worker@24.0.1 - pallet-staking-async@0.10.1 - pallet-staking-async-ah-client@0.7.2 - pallet-staking-async-rc-client@0.7.1 - pallet-session@45.1.0 - snowbridge-beacon-primitives@0.18.1 - snowbridge-pallet-ethereum-client@0.18.2 - snowbridge-pallet-outbound-queue-v2@0.7.1 - snowbridge-pallet-ethereum-client-fixtures@0.26.1 - snowbridge-pallet-inbound-queue-fixtures@0.26.1 - snowbridge-pallet-inbound-queue-v2-fixtures@0.7.1 - snowbridge-core@0.18.1 - snowbridge-outbound-queue-primitives@0.7.1 - polkadot@0.1.1 - polkadot-jemalloc-shim@0.1.1 - frame-omni-bencher@0.17.3 - xcm-emulator@0.26.0 - emulated-integration-tests-common@28.0.0 - polkadot@30.0.2 - xcm-executor-integration-tests@0.13.1 - polkadot-omni-node@0.13.2 - westend-runtime@30.2.0 - asset-hub-westend-runtime@0.42.0 - staging-xcm-executor@24.0.1 - polkadot-sdk@2512.3.3

Changelog

Changelog for Runtime Dev

ℹ️ These changes are relevant to: All of those who rely on the runtime. A parachain team that is using a pallet. A DApp that is using a pallet. These are people who care about the protocol (WASM, not the meta-protocol (client).)

[#10955]: Snowbridge: Remove unused proof fields

When verifying Ethereum-to-Polkadot transfer messages, the key field in receipt_proof is not used. Remove it as a cleanup and update the tests accordingly.

[#11055]: staking-async/ah-client: emit event when session key update from AssettHub fails on relay chain

Emit SessionKeysUpdateFailed with the operation type and dispatch error for observability so set_keys/purge_kets failures from AssetHub are observable on-chain

[#10808]: Update retester CI to check expectations

Description

This PR makes a number of changes to the retester CI job that were recommended by @athei and other people at parity.

One of our main objectives with the changes in this PR is to harden the CI and ensure that the job status that we see in Github is representative of whether we got the results that we expect or not.

With this PR, we added two versioned controlled JSON files, one for each platform that we run differential tests on, which describe the status that we expect for each one of the tests that we run.

Part of the retester CI job is to run the differential tests and ensure that the results of running tests match the expectation files we have in the repo for the platform.

In this case:

  • CI is green if the test's execution matches the expectations that we've set in the expectations JSON files.
  • CI is red if the test's execution doesn't match the expectations that we've set in the expectations JSON files.

The CI job for retester no longer posts a comment with the status of all of the tests.

If the expectations do not match, then the new expectations file is uploaded to the CI job you would be required to update the expectation file to match.

[#11069]: frame-omni-bencher: enable jemalloc-allocator

Fix huge benchmark regression for storage-heavy extrinsics, enabling jemalloc-allocator via polkadot-jemalloc-shim for omni-bencher, marked as optional in the scope of PR #10590.
Revert also the dummy write/read workaround at the end of commit_db() introduced by #10947.

[#11028]: Add DecodeWithMemTracking derive to CompactProof

Description

Add DecodeWithMemTracking derive to CompactProof in substrate/primitives/trie/src/storage_proof.rs.

StorageProof already derived DecodeWithMemTracking but CompactProof in the same file was missed.

Integration

No integration changes required for downstream projects. CompactProof now implements DecodeWithMemTracking, which is a strictly additive trait implementation. Existing code using CompactProof will continue to work as before.

Review Notes

Single-line change adding DecodeWithMemTracking to the derive macro list on CompactProof:

-#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode, TypeInfo)]
+#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode, DecodeWithMemTracking, TypeInfo)]
 pub struct CompactProof {
     pub encoded_nodes: Vec<Vec<u8>>,
 }

CompactProof only contains Vec<Vec<u8>>, which already implements DecodeWithMemTracking, so the derive works without any manual implementation.

[#10957]: pallet-dap: mark funds as inactive and expect buffer account to be pre-funded

In pallet-dap, mark funds in the issuance buffer as inactive so they do not participate in governance.
In production, the buffer account must be pre-funded (e.g., via genesis allocation or transfer) before the pallet receives any funds.
Removed the InitBufferAccount migration since the buffer account is now expected to be pre-funded externally.
For delegated staking, redirect slashes to DAP for Westend AssetHub.
Removed DAP dependency from main staking-async crate, keep it only for test runtimes.

[#11031]: xcm-emulator: fix emulated integration tests for non-6s parachains

After AuraDigestProvider was introduced, emulated integration tests for parachains with slot_duration != relay_slot_duration (e.g. 12s Polkadot/Kusama chains) panic because FixedVelocityConsensusHook derives a parachain slot that doesn't match CurrentSlot.

Fix by advancing the relay block number by slot_duration / RELAY_CHAIN_SLOT_DURATION_MILLIS per parachain block (instead of always +1), and computing the aura digest slot inline using both durations. This removes the DigestProvider associated type from the Parachain trait and the AuraDigestProvider struct — the emulator now handles the digest automatically.

Downstream users must remove DigestProvider: AuraDigestProvider, from their decl_test_parachains! invocations.

[#10980]: Add StakingOperator proxy type to Westend AssetHub

Introduces StakingOperator proxy type that allows validator operational tasks (validate, chill, kick) and session key management (set_keys, purge_keys) without access to fund management operations.

This enables pure proxy stashes to delegate validator operations: now that pallet_staking_async_rc_client provides set_keys/purge_keys on AssetHub, pure proxies can fully utilize StakingOperator.

[#11114]: Force the linker not to drop jemalloc shim on Linux

Force the linker to keep the polkadot_jemalloc_shim crate and its #[global_allocator] in all binaries that depend on it. Without it, the linker might drop it since it is seen as a dependency with no referenced symbols. The issue happens only on a subset of combination of rust version and linker (e.g. on CI with Ubuntu 24.04, rust 1.88.0 + gcc/ld strips the jemalloc crate from the binary but not rust 1.92.0, and also rust 1.88.0 + clang/mold works fine).

[#11050]: staking-aync: remove stale prune_era_total_stake

Leftover from #10810 backport. The function was replaced by prune_era_single_entry_cleanups in #10502.

[#10880]: Remove failing assertion related to VoterList count mismatch

Updated bags-list so that on_insert queues items into PendingRebag instead of failing, and removed the invariant that required VoterList's count to equal the combined number of Nominators and Validators. This is safe while bags-list is locked. After unlocking, on_idle drains PendingRebag, and the counts converge back to consistency over time.

[#10793]: Snowbridge: Fix fork version slot selection for sync committee signature verification

Fixes fork version selection for sync committee signature verification to use signature_slot - 1 per the Ethereum Altair light-client spec. This prevents valid light client updates from being rejected at fork activation boundaries.

[#10666]: staking-async: allow session keys handling on AssetHub

Added session keys handling on AssetHub for staking-async:

  • Validators can now call set_keys and purge_keys on AssetHub, which forwards the request to the RelayChain via XCM.
  • Session keys are validated on AssetHub before forwarding. Only validated keys are sent to RC (no proof), as RC trusts AH's validation.
  • Proof of ownership is not yet supported since the related change has not been backported to stable2512.
  • Staking proxies can call set_keys and purge_keys on behalf of validators. The ProxyType::Staking filter on runtime has been updated to include these calls.
  • Validators are still allowed to call set_keys and purge_keys via relay-chain pallet-session's extrinsics. This option will be deprecated in the future.
  • No key deposit is required on AssetHub.
  • XCM delivery fees are charged from user's liquid balance before sending messages.
  • Workflow change: unlike the current flow for new validators on RC (bond -> set_keys -> validate), users on Asset Hub MUST call bond and validate BEFORE
    calling set_keys. Attempting to set keys before declaring intent to validate will fail with NotValidator.

[#10947]: benchmarking: fix DB read/write counts

PR #10802 added reset_read_write_count() at the end of commit_db() to prevent warmup operat...

Read more

Polkadot stable2603-rc2

23 Feb 13:23
polkadot-stable2603-rc2
9ed2595

Choose a tag to compare

Pre-release

This release contains the changes from polkadot-stable2512 to polkadot-stable2603-rc2.

⚠️ Warning: Pre-release Version

The currently published version is a pre-release and is not yet a final stable version. This release is provided for testing purposes only, and there is no guarantee that everything will work as expected. Errors and unusual behaviours of some features are to be expected.

Please use this version at your own risk and report any issues you encounter. We recommend waiting for the official release if you need a stable version.

Changelog

Changelog for Node Dev

ℹ️ These changes are relevant to: Those who build around the client side code. Alternative client builders, SMOLDOT, those who consume RPCs. These are people who are oblivious to the runtime changes. They only care about the meta-protocol, not the protocol itself.

[#10974]: slot_timer: Downgrade spammy log to debug

The log is quite spammy with 12core setup since the last ~2 blocks will be skipped in the last second of block production.

[#10658]: Omninode instant seal: Support relay parent offset

This brings support for relay parent offset to the omni-node instant seal consensus engine. Before instant seal was not working with relay parent offsets bigger than 0.

[#10493]: add external transient_storage to pallet_revive::ExecConfig

Description

This PR adds the ability to supply external copy of TransientStorage to pallet_revive::ExecConfig to be used during execution.
This is required by testing in foundry as we only enter pallet_revive during a CALL or CREATE instruction and we need to carryover
the transient storage to other following calls as they happen within an external tx.
For example this is required to support more testing scenarious inside foundry-polkadot because only a subset of execution happens on pallet-revive.
e.g:

fn example_test() { // this entrypoint is executed on the side of `foundry-polkadot`
Example contract = new Example(); // happens on pallet-revive
contract.setTransientStorage(5); // happens on pallet-revive

uint256 result = contract.getTransientStorage(); // happens on pallet-revive and returns `0` aka the default value 
// `result` above is `0` because `transient_storage` is reset after every call to `pallet-revive` and in `foundry-polkadot`
// only `CALL` and `CREATE` within function calls(already executed on foundry's revm) are forwarded to `pallet-revive`,
// so for assertion below to pass we would need to have our external `transient_storage` instance to be manually supplied
// to pallet-revive and be persistent within the wrapping call
assertEq(5, result); // fails without this PR with `5 != 0` 
}

link for the test-file inside foundry-polkadot:

[#10513]: Extract parachain types into a dedicated crate

Closes #10512.

Moves the common parachain primitives (accounts, balances, hashes, opaque block types) into a new parachains-common-types crate. The existing parachains-common crate re-exports these definitions, and polkadot-omni-node-lib now depends on the lightweight types crate to avoid pulling runtime pallets into omni-node builds.

[#10690]: statement-store: implement new rpc api

Implements the new simplified RPC API for the statement store as proposed in PR #10452.
The API surface has been reduced to two main functions: submit and subscribe_statement.

Submit changes:

  • Added support for the new expiry field where statements with an expiration timestamp
    lower than the current time are rejected.

Subscribe changes:

  • Implemented a configurable worker pool that manages all subscriptions.
  • New subscriptions are assigned to workers via a round-robin protocol.
  • When a new statement is accepted by the statement-store, all workers are notified and
    evaluate their assigned subscription filters, notifying each subscriber accordingly.
  • Existing statements matching the filter are sent on subscription.

Additional improvements:

  • Added periodical scanning and removal of expired statements.
  • Removed the old API methods (broadcast, posts, networkState, etc.) in favor of the
    simplified submit/subscribe interface.

[#9880]: ah-westend: Elastic Scaling with 3 cores on AssetHub Westend

This PR enables elastic scaling on AssetHubWestend with 3 bulk cores.

Guideline for enablement: https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/guides/enable_elastic_scaling/index.html

Next Steps

  • Ensure collators are running with 2509 or newer
  • Double check the changes locally
  • If AH Westend looks good, we'll enable ES to AHPaseo

cc @paritytech/sdk-node @sandreim

[#10542]: statement-store: Add latency bench

Adds a latency benchmark for the statement store to measure propagation performance across distributed nodes.

[#10960]: Warn when dropping an out of view candidate

This changes a debug log to a warning. The other log messages around the candidate state are also partially warnings. A candidate that is directly out of view counts clearly as a warning. Besides that this pull request also increases
the lookahead for Westend + Rococo to 5 to align it with Kusama.

[#10662]: Bulletin as parachain missing features

  • Node developers/operators could enable the transaction storage inherent data provider setup by using --enable-tx-storage-idp flag. This is especially useful in the context of bulletin chain.
  • Node developers will set up the network idle_connection_timeout to 1h when using --ipfs-server flag, again, useful in the context of bulletin chain.

[#10661]: statement-store: Add networking benchmark

Adds a benchmark for the statement store networking to measure performance
of statement propagation and validation under various conditions.

[#10617]: statement-store: use many workers for network statements processing

Adds --statement-network-workers CLI parameter to enable concurrent statement validation from the network.
Previously, statements were validated sequentially by a single worker. This change allows multiple workers
o process statements in parallel, improving throughput when statement store is enabled

[#9947]: Proposer/BlockBuilder: Accept proof recorder & extensions

This pull request fundamentally changes how Proposer and BlockBuilder are handling the proof recorder and extensions. Before this pull request the proof recorder was initialized by the BlockBuilder and the proposer statically enabled proof recording or disabled it. With this pull request the proof recorder is passed from the the caller down to the block builder. This also moves the responsibility for extracting the final storage proof to the caller and is not part of the block builder logic anymore. The extensions are now also configurable by the caller and are not longer "guessed" by the block builder.

This pull request also remvoes the cumulus-client-proposer crate as it is not really required anymore.

[#10891]: collator-protocol: Re-advertise collations when peer authority IDs are updated

The collator protocol contained a race-condition which could manifest as "Collation wasn't advertised".

A given peer ("A") can connect before the new authority keys are received via UpdatedAuthorityIds (nk -- new key).

  • T0: peer A connectsPeerConnected
  • T1: peer A sends its current view PeerViewChange
    • Peer A wants the block N
  • T2: validator_group.should_advertise_to: checks peer A for key nK (the new key)
    • We don't have this key stored and therefore return ShouldAdvertiseTo::NotAuthority
  • T3: UpdatedAuthorityIds arrives with (peer A, [nK])

At this point, we have the collation, peer A wants to collation, we know peer A is an authority but we never send the collation back. Then, the collation will expire with "Collation wasn't advertised".

To close the gap, the UpdatedAuthorityIds events will trigger a re-advertisement of collations

  • note: if the advertisement was already sent, the logic does not resend it (achieved in should_advertise_to).

Part of the stabilization of:

[#10785]: Fix inefficient do_propagate_statements

Fixes an O(n^2) complexity issue in send_statements_in_chunks. The loop in
find_sendable_chunk was inefficient because it was passing to_send[offset..]
after each chunk and then calling chunk.encoded_size() on the entire slice.

The fix uses an incremental approach that adds statements one by one until the
size limit is reached, only computing sizes for statements that will actually
be sent in each chunk.

For 300,000 statements, this reduces the processing time from ~2.5 seconds to ~0.33s.

[#10201]: telemtry: Downgrade spam log to debug

This PR downgrade the telemetry warning log to debug.

[#10954]: auth-discovery: Ensure DHT published addresses have ports

We have seen instances in production where validators will propagate multiaddresses without ports.
These addresses are effectively unreachable from the networking layer perspective.
They might be discovered via:

  • identify protocol
  • or simply a wrongly configured CLI for public addresses

To close the gap on this issue, this PR checks that the published addresses will always contain a port.

Closes:

Part of:

[#10573]: Bump trie-db to 0.31.0

Bumps `trie-...

Read more

Polkadot stable2603-rc1

19 Feb 07:26
polkadot-stable2603-rc1
343a04d

Choose a tag to compare

Pre-release

This release contains the changes from polkadot-stable2512-1 to polkadot-stable2603-rc1.

⚠️ Warning: Pre-release Version

The currently published version is a pre-release and is not yet a final stable version. This release is provided for testing purposes only, and there is no guarantee that everything will work as expected. Errors and unusual behaviours of some features are to be expected.

Please use this version at your own risk and report any issues you encounter. We recommend waiting for the official release if you need a stable version.

Changelog

Changelog for Node Dev

ℹ️ These changes are relevant to: Those who build around the client side code. Alternative client builders, SMOLDOT, those who consume RPCs. These are people who are oblivious to the runtime changes. They only care about the meta-protocol, not the protocol itself.

[#10223]: Removed dependency to sp-consensus-grandpa from sc-network-sync

Refactored warp sync to remove the dependency on GRANDPA consensus primitives from the network sync module.
Instead of directly verifying proofs with GRANDPA-specific parameters, warp sync now uses a more generic
verifier pattern. This makes the warp sync implementation independent of any specific consensus mechanism,
allowing it to work with different consensus algorithms in the future.

[#10690]: statement-store: implement new rpc api

Implements the new simplified RPC API for the statement store as proposed in PR #10452.
The API surface has been reduced to two main functions: submit and subscribe_statement.

Submit changes:

  • Added support for the new expiry field where statements with an expiration timestamp
    lower than the current time are rejected.

Subscribe changes:

  • Implemented a configurable worker pool that manages all subscriptions.
  • New subscriptions are assigned to workers via a round-robin protocol.
  • When a new statement is accepted by the statement-store, all workers are notified and
    evaluate their assigned subscription filters, notifying each subscriber accordingly.
  • Existing statements matching the filter are sent on subscription.

Additional improvements:

  • Added periodical scanning and removal of expired statements.
  • Removed the old API methods (broadcast, posts, networkState, etc.) in favor of the
    simplified submit/subscribe interface.

[#10796]: Fix size limit mismatch in process_initial_sync_burst

Fixes a debug assertion failure in process_initial_sync_burst where the size filter
used MAX_STATEMENT_NOTIFICATION_SIZE while find_sendable_chunk reserved additional
space for Compact<u32> vector length encoding (5 bytes).

This mismatch caused debug_assert_eq!(to_send.len(), sent) to fail when statements
were sized to fit the filter's larger limit but exceeded find_sendable_chunk's
stricter limit.

The fix extracts the size calculation into a shared max_statement_payload_size()
function that both locations now use, ensuring consistent size limits.

[#10770]: Statement-store: Follow-up improvements from PR #10718 review

This follow-up PR addresses review comments from PR #10718:

  • Removed unnecessary Result wrapper from statement_hashes() - method is infallible
  • Added debug assertion to validate sent count matches prepared count

[#10906]: collator-protocol: Remove stale pending collations from the waiting queue

This PR removes the stale pending collations from the waiting queue when the peer that advertised the collation disconnects.

When the peer reconnects, the peer data is freshly created without any prior information about advertised collations.
Then the state-pending collation is picked from the queue. The network request will not be emitted since the fn fetch_collation sees no prior advertisement via peer_data.has_advertised and returns Err(FetchError::NotAdvertised).

To avoid this, remove the stale entries immediately when the peer disconnects.

Part of the stabilization of:

[#10779]: remote-externalities: Support downloading from multiple RPC servers in parallel + major refactoring

Major refactoring of frame-remote-externalities to support downloading state from multiple
RPC servers in parallel. This improves reliability and performance when fetching remote state.

Breaking changes:

  • OnlineConfig::transports field renamed to transport_uris
  • Various internal API changes

[#10891]: collator-protocol: Re-advertise collations when peer authority IDs are updated

The collator protocol contained a race-condition which could manifest as "Collation wasn't advertised".

A given peer ("A") can connect before the new authority keys are received via UpdatedAuthorityIds (nk -- new key).

  • T0: peer A connectsPeerConnected
  • T1: peer A sends its current view PeerViewChange
    • Peer A wants the block N
  • T2: validator_group.should_advertise_to: checks peer A for key nK (the new key)
    • We don't have this key stored and therefore return ShouldAdvertiseTo::NotAuthority
  • T3: UpdatedAuthorityIds arrives with (peer A, [nK])

At this point, we have the collation, peer A wants to collation, we know peer A is an authority but we never send the collation back. Then, the collation will expire with "Collation wasn't advertised".

To close the gap, the UpdatedAuthorityIds events will trigger a re-advertisement of collations

  • note: if the advertisement was already sent, the logic does not resend it (achieved in should_advertise_to).

Part of the stabilization of:

[#10954]: auth-discovery: Ensure DHT published addresses have ports

We have seen instances in production where validators will propagate multiaddresses without ports.
These addresses are effectively unreachable from the networking layer perspective.
They might be discovered via:

  • identify protocol
  • or simply a wrongly configured CLI for public addresses

To close the gap on this issue, this PR checks that the published addresses will always contain a port.

Closes:

Part of:

[#10464]: collator-protocol: Readvertise collations after peer disconnects

There's a possible race case between peer connectivity and collation advertisement:

  • The advertisement was generated
  • peer disconnected before receiving the advertisement

As a result of that, when the peer reconnects, the previous collation (C0) is not sent.
This happens when the collator has produced another collation (C1).
However, from the logs it looks like the collation C1 is advertising, but C0 is skipped.

  • T0: peer disconnects without receiving C0
  • T1: peer reconnects
  • T2: collator advertises C1, but not C0

This PR aims to resubmit collations on PeerConect events to mitigate these cases

Closes #10463

[#10974]: slot_timer: Downgrade spammy log to debug

The log is quite spammy with 12core setup since the last ~2 blocks will be skipped in the last second of block production.

[#10718]: Statement-store: Propagate all statements to newly connected peers

When a new node connects, we now propagate all statements in our store to them. This happens in bursts of ~1MiB messages
over time to not completley use up all resources. If multiple peers are connecting, round robin between them.

[#10513]: Extract parachain types into a dedicated crate

Closes #10512.

Moves the common parachain primitives (accounts, balances, hashes, opaque block types) into a new parachains-common-types crate. The existing parachains-common crate re-exports these definitions, and polkadot-omni-node-lib now depends on the lightweight types crate to avoid pulling runtime pallets into omni-node builds.

[#10662]: Bulletin as parachain missing features

  • Node developers/operators could enable the transaction storage inherent data provider setup by using --enable-tx-storage-idp flag. This is especially useful in the context of bulletin chain.
  • Node developers will set up the network idle_connection_timeout to 1h when using --ipfs-server flag, again, useful in the context of bulletin chain.

[#9880]: ah-westend: Elastic Scaling with 3 cores on AssetHub Westend

This PR enables elastic scaling on AssetHubWestend with 3 bulk cores.

Guideline for enablement: https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/guides/enable_elastic_scaling/index.html

Next Steps

  • Ensure collators are running with 2509 or newer
  • Double check the changes locally
  • If AH Westend looks good, we'll enable ES to AHPaseo

cc @paritytech/sdk-node @sandreim

[#10882]: statement-store: make encode/hash faster

Optimizes statement encoding and hashing by pre-allocating memory for the encoded buffer.
This reduces allocation overhead and improves performance, particularly when receiving
statements from multiple peers. Benchmarks show ~16% speedup when receiving statements
from 16 peers.

[#10763]: Make some BEEFY keystore logic more generic

This PR:

  1. makes some BEEFY keystore methods more generic:
  • sign()
  • public_keys()
    This is done by implementing the specific logic in the BeefyAuthorityId.
  1. Removes the BeefyAuthorityId::SignatureHasher since for some algorithms it doesn't make sense to have a hasher.

Also since now the BeefyAuthorityId implements both the signing and the verification logic, we should have better consistency.

Related to #8707 (comment)

[#10542]: statement-store: Add latency bench

Adds a...

Read more

Polkadot stable2509-5

12 Feb 16:29
23005b8

Choose a tag to compare

This release contains the changes from polkadot-stable2512-1 to polkadot-stable2509-5.

ℹ️ Please note:

⚠️ This is a patch release for the stable version: stable2509 and contains only patches and fixes to the crates (list
below). No binary or docker images will be provided for this release.

The tag corresponding to the current patch release polkadot-stable2509-5 and matching the old pattern will be
available under polkadot-v1.20.5.
The following crates were updated to the corresponding versions:

Click to see crates list
  • sp-trie@41.1.1
  • frame-benchmarking@43.0.1
  • asset-hub-westend-runtime@0.36.3

Changelog

Changelog for Runtime Dev

ℹ️ These changes are relevant to: All of those who rely on the runtime. A parachain team that is using a pallet. A DApp that is using a pallet. These are people who care about the protocol (WASM, not the meta-protocol (client).)

[#11028]: Add DecodeWithMemTracking derive to CompactProof

Description

Add DecodeWithMemTracking derive to CompactProof in substrate/primitives/trie/src/storage_proof.rs.

StorageProof already derived DecodeWithMemTracking but CompactProof in the same file was missed.

Integration

No integration changes required for downstream projects. CompactProof now implements DecodeWithMemTracking, which is a strictly additive trait implementation. Existing code using CompactProof will continue to work as before.

Review Notes

Single-line change adding DecodeWithMemTracking to the derive macro list on CompactProof:

-#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode, TypeInfo)]
+#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode, DecodeWithMemTracking, TypeInfo)]
 pub struct CompactProof {
     pub encoded_nodes: Vec<Vec<u8>>,
 }

CompactProof only contains Vec<Vec<u8>>, which already implements DecodeWithMemTracking, so the derive works without any manual implementation.

[#10802]: benchmarking: fix timing leak from bulk setup operations

Fixes timing leaks in benchmarks with large setup operations (e.g., clearing 27k staking entries). After bulk deletions are committed, the first new allocation can trigger memory allocator overhead that leaks into benchmark timing.

The fix adds a memory allocator warmup step in commit_db() that performs a dummy write/clear cycle to absorb this overhead before timing starts.

Rust compiler versions

This release was built and tested against the following versions of rustc.
Other versions may work.

  • Rust Stable: 1.88.0

Polkadot stable2512-2-rc1

05 Feb 18:10
polkadot-stable2512-2-rc1
a2cbc4d

Choose a tag to compare

Pre-release

This release contains the changes from polkadot-stable2512-1 to polkadot-stable2512-2-rc1.

⚠️ Warning: Pre-release Version

The currently published version is a pre-release and is not yet a final stable version. This release is provided for testing purposes only, and there is no guarantee that everything will work as expected. Errors and unusual behaviours of some features are to be expected.

Please use this version at your own risk and report any issues you encounter. We recommend waiting for the official release if you need a stable version.

The following crates were updated to the corresponding versions:

Click to see crates list
  • snowbridge-beacon-primitives@0.18.1
  • frame-benchmarking@45.0.2
  • pallet-dap@0.2.0
  • pallet-statement@0.2.0
  • pallet-bags-list@44.0.1
  • pallet-nomination-pools@43.0.2
  • pallet-staking-async-ah-client@0.7.1
  • pallet-staking-async-rc-client@0.7.1
  • pallet-staking-async@0.10.0
  • pallet-session@45.1.0
  • snowbridge-pallet-ethereum-client@0.18.1
  • westend-runtime@30.2.0
  • asset-hub-westend-runtime@0.42.0
  • polkadot-sdk@2512.2.0

Changelog

Changelog for Runtime Dev

ℹ️ These changes are relevant to: All of those who rely on the runtime. A parachain team that is using a pallet. A DApp that is using a pallet. These are people who care about the protocol (WASM, not the meta-protocol (client).)

[#10793]: Snowbridge: Fix fork version slot selection for sync committee signature verification

Fixes fork version selection for sync committee signature verification to use signature_slot - 1 per the Ethereum Altair light-client spec. This prevents valid light client updates from being rejected at fork activation boundaries.

[#10880]: Remove failing assertion related to VoterList count mismatch

Updated bags-list so that on_insert queues items into PendingRebag instead of failing, and removed the invariant that required VoterList's count to equal the combined number of Nominators and Validators. This is safe while bags-list is locked. After unlocking, on_idle drains PendingRebag, and the counts converge back to consistency over time.

[#10986]: [Pool] Use active era for withdrawals

Standardising using active era in pools and staking. Current Era should only be used for election logic

[#10666]: staking-async: allow session keys handling on AssetHub

Added session keys handling on AssetHub for staking-async:

  • Validators can now call set_keys and purge_keys on AssetHub, which forwards the request to the RelayChain via XCM.
  • Session keys are validated on AssetHub before forwarding. Only validated keys are sent to RC (no proof), as RC trusts AH's validation.
  • Proof of ownership is not yet supported since the related change has not been backported to stable2512.
  • Staking proxies can call set_keys and purge_keys on behalf of validators. The ProxyType::Staking filter on runtime has been updated to include these calls.
  • Validators are still allowed to call set_keys and purge_keys via relay-chain pallet-session's extrinsics. This option will be deprecated in the future.
  • No key deposit is required on AssetHub.
  • XCM delivery fees are charged from user's liquid balance before sending messages.
  • Workflow change: unlike the current flow for new validators on RC (bond -> set_keys -> validate), users on Asset Hub MUST call bond and validate BEFORE
    calling set_keys. Attempting to set keys before declaring intent to validate will fail with NotValidator.

[#10980]: Add StakingOperator proxy type to Westend AssetHub

Introduces StakingOperator proxy type that allows validator operational tasks (validate, chill, kick) and session key management (set_keys, purge_keys) without access to fund management operations.

This enables pure proxy stashes to delegate validator operations: now that pallet_staking_async_rc_client provides
set_keys/purge_keys on AssetHub, pure proxies can fully utilize StakingOperator.

[#10947]: benchmarking: fix DB read/write counts

PR #10802 added reset_read_write_count() at the end of commit_db() to prevent warmup operations from appearing in benchmarking results. However, commit_db is called twice: one on on_before_start() closure before benchmark, and one after benchmark execution after benchmark.
This PR whitelists warmup key so that it doesn't appear in the read/write count.
We also regenerate staking-async and pallet-conviction-voting benchmarks (testing both v1 and v2)

[#10957]: pallet-dap: mark funds as inactive and expect buffer account to be pre-funded

In pallet-dap, mark funds in the issuance buffer as inactive so they do not participate in governance.
In production, the buffer account must be pre-funded (e.g., via genesis allocation or transfer) before the pallet receives any funds.
Removed the InitBufferAccount migration since the buffer account is now expected to be pre-funded externally.
For delegated staking, redirect slashes to DAP for Westend AssetHub.
Removed DAP dependency from main staking-async crate, keep it only for test runtimes.

Rust compiler versions

This release was built and tested against the following versions of rustc.
Other versions may work.

  • Rust Stable: 1.88.0

Runtimes

The information about the runtimes included in this release can be found below.
The runtimes have been built using srtool v0.18.3 and rustc 1.88.0 (6b00bc388 2025-06-23).

Westend

🏋️ Runtime Size:          1.84 MB (1930332 bytes)
🔥 Core Version:          westend-1021002 (parity-westend-0.tx27.au2)
🗜 Compressed:            Yes: 81.02%
🎁 Metadata version:      V14
🗳️ system.setCode hash:   0x06edfdb7de82f80e39020f461e1d236cad7535416952c725c65854ad05372311
🗳️ authorizeUpgrade hash: 0xff50006b6c3d1e6a4a09b86e7222f67b6ca8a10c1b96f71e5381fe72e46171f3
🗳️ Blake2-256 hash:       0xc5033b3a2749393b2e6e8963d31dcc36353ea41feb5ba085d4f18b3bac8b9d62
📦 IPFS:                  QmZEyTWx3beRfCN3dXnxgcYhcV545v6FisNH4Qyc5wzWut

Westend Assethub

🏋️ Runtime Size:          2.34 MB (2457225 bytes)
🔥 Core Version:          westmint-1021003 (westmint-0.tx16.au1)
🗜 Compressed:            Yes: 82.15%
🎁 Metadata version:      V14
🗳️ system.setCode hash:   0xca3c9b3b31888fdbaa4f399dfe8a38bb417ea3797f06508f52616b9d12700887
🗳️ authorizeUpgrade hash: 0xbd10b33e9402a0fdca1f7094697aabca362055d535d4f6a648d81deb9ccb5b70
🗳️ Blake2-256 hash:       0xbfd53f79b6df48dd84cfb49738a3900e9a5e5a0f17b2d5d1866e86a90974e5ab
📦 IPFS:                  QmScgRemUb1komeDh3nM4mnqFQC3KZtN18Qe5ACs67JZ5J

Unstable bulletin support v1

28 Jan 17:57
c7b9c08

Choose a tag to compare

Pre-release

⚠️ This is an unstable build to support work on the Bulletin chain

Polkadot stable2512-1

26 Jan 13:15
c6ba84f

Choose a tag to compare

This release contains the changes from polkadot-stable2512 to polkadot-stable2512-1.

This is a patch release for the latest stable version: stable2512. If your nodes are already running on this stable release,
you should upgrade to this patch version to get the latest fixes.

The tag corresponding to the current patch release polkadot-stable2512-1 and matching the old pattern will be
available under polkadot-v1.21.1.

The following crates were updated to the corresponding versions:

Click to expand
  • pallet-revive-proc-macro@0.7.1
  • sc-network-types@0.20.1
  • pallet-revive-uapi@0.10.1
  • pallet-revive-fixtures@0.9.1
  • sp-staking@42.1.0
  • frame-support@45.1.0
  • substrate-wasm-builder@31.1.0
  • frame-benchmarking@45.0.1
  • frame-executive@45.0.1
  • sc-network@0.55.1
  • sc-transaction-pool@44.1.0
  • pallet-assets@48.1.0
  • pallet-broker@0.24.1
  • pallet-dap@0.1.1
  • pallet-multi-asset-bounties@0.2.1
  • pallet-asset-conversion-tx-payment@27.0.1
  • pallet-nomination-pools@43.0.1
  • pallet-revive@0.12.2
  • pallet-staking-async@0.9.0
  • pallet-assets-precompiles@0.4.1
  • pallet-contracts@45.0.1
  • pallet-xcm-precompiles@0.3.1
  • parachains-common@27.1.0
  • westend-runtime@30.1.0
  • assets-common@0.27.1
  • asset-test-utils@29.0.1
  • penpal-runtime@0.35.1
  • asset-hub-rococo-runtime@0.31.1
  • asset-hub-westend-runtime@0.40.0
  • emulated-integration-tests-common@27.0.1
  • polkadot-sdk@2512.1.0

Changelog

Changelog for Node Dev

ℹ️ These changes are relevant to: Those who build around the client side code. Alternative client builders, SMOLDOT, those who consume RPCs. These are people who are oblivious to the runtime changes. They only care about the meta-protocol, not the protocol itself.

[#10312]: fatxpool: metrics for unfiltered timings of inblock events

This PR adds a new experimental metric substrate_sub_txpool_timing_event_in_block2 for the reliability dashboard. Unlike the existing in_block metric which records timing only for the first InBlock event per transaction, the new in_block2 metric records every InBlock event without filtering. This allows tracking transactions that appear in multiple blocks during chain reorganizations, providing better visibility into fork-related transaction behavior. The implementation adds the new histogram to EventsHistograms and updates handle_status() to record unfiltered InBlock events before applying deduplication logic.

This approach should allow for experimenting with new inblock confidence metric, without affecting the data currently shown on the Reliability Dashboard.

[#10859]: Upgrade litep2p to v0.13.0

This PR upgrades litep2p to the latest version, bringing multiple fixes with this release.

Specifically, this release enhances WebSocket stability by resolving AsyncWrite errors and ensuring that partial writes during the negotiation phase no longer trigger connection failures.

It also fixes large file download using Bitswap protocol by grouping blocks into batches of <= 2 MiB.

Changelog for Runtime Dev

ℹ️ These changes are relevant to: All of those who rely on the runtime. A parachain team that is using a pallet. A DApp that is using a pallet. These are people who care about the protocol (WASM, not the meta-protocol (client).)

[#10708]: [stable2512] pallet_revive changes

Backport all the changes we applied in #10552,

This is so the next runtime upgrade will not be a downgrade in terms of pallet_revive as we backported a substantial amount of code to unstable2507.

[#10476]: Allow for "Nick's Method" style deployments

Allow eth legacy transactions to not contain a chain id.

[#10657]: Add support for asset V3 to V5 conversion to match_asset of localPay

Add support for asset V3 to V5 conversion to match_asset of localPay.

[#10861]: [pallet-revive] weight charge in sr25519_verify and ecdsa_to_eth_address precompiles

I couldn't see where the weight is charged in those builtin pre-compiles and a quick test indicated that there's no charges implemented. Assuming those are compute-heavy functions, the missing weight charges seem like a DoS vector.

[#10365]: frame-executive: Remove unused deprecated tag

Recent compiler versions complain about useless deprecation warning on OnRuntimeUpgrade parameter in frame-executive.

[#10711]: Fix benchmarking for pallet-assets::set_reserves()

Parametrize pallet-assets::set_reserves() weight based on number of reserves provided instead of always assuming worst-case.

[#10802]: benchmarking: fix timing leak from bulk setup operations

Fixes timing leaks in benchmarks with large setup operations (e.g., clearing 27k staking entries). After bulk deletions are committed, the first new allocation can trigger memory allocator overhead that leaks into benchmark timing.

The fix adds a memory allocator warmup step in commit_db() that performs a dummy write/clear cycle to absorb this overhead before timing starts.

[#10646]: Update asset-conversion validation to use strict withdrawal checks

Description

Updates the transaction validation logic in asset-conversion-tx-payment.

The validation step currently accepts permissive withdrawal consequences (ReducedToZero, WouldDie) in Native assets and Exchanged asset . However, the underlying withdraw calls utilize Preservation::Preserve, Native assets and Exchanged asset

This change updates the match pattern to strictly accept WithdrawConsequence::Success, ensuring the validation logic correctly mirrors the strict preservation guarantees of the actual withdrawal

Changes

  • Restricted can_withdraw checks to only accept Success.

[#10792]: pallet-broker: Fix force_reserve

When issuing a force_reserve we are putting the reservation into the current and next region WorkPlan. The issue is that at the next sale rotation we override all unused cores. As the sale rotation isn't aware of the forcefully registered core, also the force reserved core is overwritten and the parachain loses their coretime for one region (it comes back in the next region). To fix this we now keep track of forcefully registered reserves. We input them alongside the other reservations into the workplan, but for the current region using any free cores from the previous sale.

[#10740]: Make BlockRatioFee no longer require pallet_revive

In polkadot-fellows/runtimes#1050 I am unifying the used WeightToFee formula to use BlockRatioFee everywhere. This type is exported by pallet_revive and is independent of any functionality here. However, so far it required the runtime to use pallet_revive in order to discover the Balance type. This PR removes this constraint so it can be used by all runtimes. Even the ones which do not use pallet_revive.

[#10576]: Introduce pallet-dap for AssetHub

This PR introduces the foundation for the Dynamic Allocation Pool (DAP) system:

  1. pallet-dap: A new pallet that implements OnUnbalanced, collecting funds (e.g., slashes) into a buffer account instead of burning them.

  2. AssetHub Westend integration: The runtime now uses pallet-dap to redirect staking slashes to the DAP buffer (via type Slash = Dap).

Treasury burns are now disabled so no need to integrate with DAP: treasury Burn parameter is set to zero in Westend RC, AssetHub and collective runtimes. This means no treasury funds are burned at the end of spend periods, preserving total issuance.

User and pallet initiated burns do NOT go through DAP currently but they burn directly instead, reducing total issuance immediately. It will be addressed in a follow-up change.

Changelog for Runtime User

ℹ️ These changes are relevant to: Anyone using the runtime. This can be a token holder or a dev writing a front end for a chain.

[#10502]: Allow nominators to be unslashable with configurable fast unbonding

Nominators can now be set as unslashable via runtime configuration. When unslashable, nominators use a configurable fast unbonding duration instead of the full bonding period.
Validators always use the full bonding duration regardless of this setting.

New config parameter NominatorFastUnbondDuration controls the unbonding time for non-slashable nominators (recommended: 2 eras).

[#10365]: frame-executive: Remove unused deprecated tag

Recent compiler versions complain about useless deprecation warning on OnRuntimeUpgrade parameter in frame-executive.

[#10064]: Add pallet_multi_asset_bounties to Westend Asset Hub testnet runtime.

Multi-asset bounties are now available in the Westend Asset Hub runtime.
This update also includes refactoring of pallet_multi_asset_bounties and kitchensink-runtime.

Rust compiler versions

This release was built and tested against the following versions of rustc.
Other versions may work.

  • Rust Stable: 1.88.0

Runtimes

The information about the runtim...

Read more

Polkadot stable2509-4

15 Jan 17:35
2b1d007

Choose a tag to compare

This release contains the changes from polkadot-stable2512 to polkadot-stable2509-4.

ℹ️ Please note:

⚠️ This is a patch release for the stable version: stable2509 and contains only patches and fixes to the crates (list
below). No binary or docker images will be provided for this release.

The tag corresponding to the current patch release polkadot-stable2509-4 and matching the old pattern will be
available under polkadot-v1.20.4.
The following crates were updated to the corresponding versions:

  • sp-metadata-ir@0.12.2
  • frame-support@43.0.1
  • substrate-wasm-builder@29.0.1
  • pallet-example-view-functions@0.5.1

Changelog

Changelog for Runtime Dev

ℹ️ These changes are relevant to: All of those who rely on the runtime. A parachain team that is using a pallet. A DApp that is using a pallet. These are people who care about the protocol (WASM, not the meta-protocol (client).)

[#10592]: fix: ensure metadata v15 is generated by frame-metadata

This is a companion PR to paritytech/frame-metadata#110.
This PR ensures that CheckMetadataHash generated with both v15 and v16 are the same.

Rust compiler versions

This release was built and tested against the following versions of rustc.
Other versions may work.

  • Rust Stable: 1.88.0

Polkadot stable2506-7

08 Jan 17:05
d173a5f

Choose a tag to compare

This release contains the changes from polkadot-stable2512 to polkadot-stable2506-7-rc1.

ℹ️ Please note:

⚠️ This is a patch release for the stable version: stable2506 and contains only patches and fixes to the crates (list
below). No binary or docker images will be provided for this release.

The tag corresponding to the current patch release polkadot-stable2506-7 and matching the old pattern will be
available under polkadot-v1.19.7.
The following crates were updated to the corresponding versions:

  • sp-metadata-ir@0.11.1
  • frame-support@41.0.1
  • substrate-wasm-builder@27.0.1
  • pallet-example-view-functions@0.3.1
  • sc-tracing@40.0.2

Changelog

Changelog for Runtime Dev

ℹ️ These changes are relevant to: All of those who rely on the runtime. A parachain team that is using a pallet. A DApp that is using a pallet. These are people who care about the protocol (WASM, not the meta-protocol (client).)

[#10592]: fix: ensure metadata v15 is generated by frame-metadata

This is a companion PR to paritytech/frame-metadata#110.
This PR ensures that CheckMetadataHash generated with both v15 and v16 are the same.

Rust compiler versions

This release was built and tested against the following versions of rustc.
Other versions may work.

  • Rust Stable: 1.84.1

Polkadot stable2512

22 Dec 12:30
1b9a876

Choose a tag to compare

This release contains the changes from polkadot-stable2509 to polkadot-stable2512.

ℹ️ Please note:

The node version for this release is: v1.21.0
The tag corresponding to the current release polkadot-stable2512 and matching the old pattern will be available under polkadot-v1.21.0.

Changelog

Changelog for Node Dev

ℹ️ These changes are relevant to: Those who build around the client side code. Alternative client builders, SMOLDOT, those who consume RPCs. These are people who are oblivious to the runtime changes. They only care about the meta-protocol, not the protocol itself.

[#9003]: fatxpool: add labels for mempool revalidation invalid txs counting

This PR considers errors propagated from mempool revalidation in the context of fork-aware transaction pool and groups them under unique labels to count them under mempool_revalidation_invalid_txs prometheus metric. This results in a breakdown of the type of root causes for why a transaction is considered invalid, helping with debugging.

[#10175]: revive-eth-rpc: fix blocks pruning

Fixes the blocks pruning for the revive eth rpc in case of forks or chain reversions.

[#9811]: Elastic scaling runtime upgrade tests

Add runtime upgrade tests for sync and async backing chains

[#9844]: prospective-parachains: add more logs

Log all candidate processing errors (especially FragmentValidityError) to observe how many
are dropped and why.

[#10305]: Cumulus: fix pre-connect to backers for single collator parachains

When running a single collator (most commonly on testnets), the block builder task is always able to claim a slot, so we're never triggering the pre-connect mechanism which happens for slots owned by other authors.

[#9927]: Log: log candidate_hash nor the pov_hash when collations expire

When collations expire we do not log the candidate_hash nor the pov_hash, making it hard to map the logged entries about Candidate generated and Candidate expired together.

This PR adds pov_hash and candidate_hash to the CollationStats struct and use these fields when we log "Collation expired".

[#10590]: sc-client-db: Make jemalloc optional

This changes sc-client-db to not always enable jemalloc by default for rocksdb. Instead it is now controlled by jemalloc-allocator feature. This is now also forwarded up to polkadot via polkadot-cli and sc-service. There we ultimately decide if jemalloc should be enabled or not.

[#10129]: Add upload evm code function

EVM Runtime Code Upload for Foundry Integrationю
This feature enables direct upload of EVM runtime bytecode (deployed contract code without constructor) to the pallet-revive, supporting Foundry's code migration functionality between REVM and pallet-revive execution environments.

[#10446]: collator-protocol: pre-connect fix

Keep the connections to backers open until the relay parent of the advertised collation expires.

[#9662]: Removes deprecated collator-related code in cumulus

Removes deprecated collator-related code in cumulus.

[#10416]: Added CID filtering to Bitswap server

This PR adds CID (Content Identifier) validation and filtering to the Bitswap server
implementation. The server now validates incoming CID requests before processing them.

[#9869]: Removes legacy consensus code that was no longer used.

Removes the ParachainConsensus trait and legacy consensus code that was no longer used.

[#9417]: Measure backed in block count vs backable

Added a mechanism to measure the difference between the number of candidates backed on chain versus offchain from the perspective of the node.

[#9904]: FinalityNotification: Directly include stale blocks

The finality notification was already carrying the information about the stale heads. However, most users of the stale heads were expanding these stale heads to all the stale blocks. So, we were iterating the same forks multiple times in the node for each finality notification. Also in a possible future where we start actually pruning headers as well, expanding these forks would fail.

So, this pull request is changing the finality notification to directly carry the stale blocks (which were calculated any way already).

[#9884]: Add criterion benches for statement-store

Description

Adds micro benches simulating concurrent work with the statement-store.

Integration

This PR does not not affect downstream projects.

[#10242]: Upgrade kvdb-rocksdb

This includes a fix for when we are writing a lot of state, e.g. after a warp sync. In this case the rocksdb will compact its own db to improve read speed.

[#10194]: Fix executor parameters classification

Executor parameters may be hashed in two ways: a full hash that changes if any parameter changes, and a prep_hash, which changes only if the parameter change will affect the prepared artifact (thus requiring artifact recompilation).
This PR aims to fix a bug in the initial classification and to add a test that should prevent those bugs from happening in the future.

[#10541]: test-utils/fix: Parachains test-utils relay parent descendants mock data

This PR ensures that the parachains test-utils crate has 2 relay parent descendants for testing purposes.

Effectively fixes a panic because we missed this mock data for chains that started with RP_offset > 0:

 Unable to verify provided relay parent descendants. expected_rp_descendants_num: 1 error: InvalidNumberOfDescendants { expected: 2, received: 0 }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Detected in:

Unblocks:

Inspired by a similar fix I've introduced in:

[#9821]: wasmtime: support for perfmap added

This PR add support for perfmap in wasmtime executor.

For more technical details refer to this doc.

Instruction on how to configure profiling on substrate nodes (tested with cumulus benchmarks) is here.

The following environment variable needs to be set when executing the node binary:

export WASMTIME_PROFILING_STRATEGY=perfmap

[#9774]: Fix executor param fetching session index

Fix executor environment parameters fetching inconsistency

[#9443]: move released primitives and APIs out of staging

Solves #9400

No logic change, only moves types from polkadot/primitives/src/vstaging into polkadot/primitives/src/v9 (renamed from v8 to v9).

[#9685]: Upgrade litep2p to v0.12.0

litep2p v0.12.0 adds ability to track whether publishing a DHT record or provider was successful. This PR brings this functionality to substrate. Particularly, this fixes authority-discovery unnecessarily republishing DHT records due to litep2p not emitting KademliaEvent::PutRecordSuccess before v0.12.0.

[#10525]: fix(rpc-spec-v2): best block not announced immediately after initialised

Description

Fixes polkadot-api/polkadot-api#1244

The current chainHead_v1 implementation is not spec-compliant, as it states:

  • Generates an initialized notification
  • Generates one newBlock notification for each non-finalized block
  • Then a bestBlockChanged notification
  • When a new block arrives, generates a newBlock notification
  • When the node finalizes a block, generates a finalized notification

And the current implemention only emits the bestBlockChanged notification after initialized iif the best block is different from the finalized block.

PAPI recently is using this part of the spec as an assumption. Most chains are unaffected, but those that produce blocks on-demand (e.g. manual-seal) then have polkadot-api hanging until there's a higher block different than the finalized one.

Integration

This PR doesn't change any of the APIs of the node. Upgrade should be automatic.

Review Notes

This PR removes that condition so that the bestBlockChanged notification is always emited. All tests are updated to this new behaviour

[#9418]: frame/revive: ETH block storage

This PR constructs the Ethereum block in the following way:

  • events (logs) are captured via an environmental! variable to reduce reliance on pallet storage
    • A maximum of 512 events is allowed per transaction, with the size of an event capped to self.ext.max_value_size()
  • A memory-efficient intermediate block builder is deserialized and serialized back to the pallet storage
    • The intermediate block builder builds the transaction and event root hashes using low level RLP encoding primitives to achieve around 90% pallet storage optimization
    • For more details, see #9764
  • A fixup is included for 7702 transaction rlp serialization/deserialization is added to ensure we can build the Ethereum block hash from live Ethereum blocks.
  • The maximum CALL_PARAMS_MAX_SIZE is increased to 512 to 244 to accommodate the transaction added to the Eth call

This PR also includes benchmarking:

Testing Done

  • pallet storage testing and capturing of events / transactions are added at tests/block_hash.rs
  • incremental block storage is tested in evm/block_hash.rs, which ensures RLP encoding / hash builder and identic...
Read more