github paritytech/polkadot-sdk polkadot-stable2506-9
Polkadot stable2506-9

latest release: polkadot-v1.19.9
5 hours ago

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

ℹ️ 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-9-rc1 and matching the old pattern will be
available under polkadot-v1.19.9.
The following crates were updated to the corresponding versions:

Click to see crates list
  • sp-trie@40.0.1
  • sc-authority-discovery@0.51.1
  • polkadot-collator-protocol@24.0.1
  • sc-network@0.51.2

Changelog

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

[#11078]: net: Strip previous p2p prefix before concatenating addresses

This PR ensures that a MultiaddrWithPeerId will always remain valid after a concatenating process.

The litep2p code will concatanate the provided multiaddr-with-peerID regardless if the address already contains a p2p/.. prefix:

fn add_reserved_peer(&self, peer: MultiaddrWithPeerId) -> Result<(), String> {
let _ = self.cmd_tx.unbounded_send(NetworkServiceCommand::AddPeersToReservedSet {
protocol: self.block_announce_protocol.clone(),
peers: HashSet::from_iter([peer.concat().into()]),
});
Ok(())
}

This then can lead to addresses for reserved peers to never be dialed by the network backend as they are considered invalid.

This has been discovered by running the networking benchmarks:

network_service1
.add_reserved_peer(MultiaddrWithPeerId {
multiaddr: listen_address2,
peer_id: peer_id2,
})
.unwrap();

Part of the cleanups for:

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

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.

Rust compiler versions

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

  • Rust Stable: 1.84.1

Don't miss a new polkadot-sdk release

NewReleases is sending notifications on new releases.