Skip to content

statement-store: add event-fed v2 peer topology#12217

Draft
DenzelPenzel wants to merge 1 commit into
masterfrom
denzelpenzel/statement-v2-peer-topology-events
Draft

statement-store: add event-fed v2 peer topology#12217
DenzelPenzel wants to merge 1 commit into
masterfrom
denzelpenzel/statement-v2-peer-topology-events

Conversation

@DenzelPenzel
Copy link
Copy Markdown
Contributor

@DenzelPenzel DenzelPenzel commented May 27, 2026

Summary

This PR adds the initial statement-store v2 peer topology wiring. #11933

It introduces backend-neutral network events for peer discovery and identify
metadata:

  • Event::PeerDiscovered(PeerId)
  • Event::PeerIdentified { peer, supported_protocols }

Both libp2p and litep2p backends now emit these events from their existing
discovery/routing-table and identify paths.

The statement handler consumes these events and updates a new
PeersTopology module. The topology keeps a local view of statement-capable
peers learned from network discovery, identify metadata, and statement
notification connections.

Design notes

PeersTopology intentionally computes closest peers over the locally learned
peer set. It does not perform topic-specific Kademlia lookups.

The topology currently supports:

  • tracking seen / identified statement-capable peers;
  • tracking statement notification connection state;
  • filtering DHT-eligible peers to full V2 statement peers;
  • computing local DHT storage affinity;
  • selecting K closest connected DHT routing targets;
  • selecting explicit-affinity connection candidates for topics

@DenzelPenzel DenzelPenzel added the T0-node This PR/Issue is related to the topic “node”. label May 27, 2026
@DenzelPenzel DenzelPenzel marked this pull request as draft May 27, 2026 20:28
@DenzelPenzel DenzelPenzel requested a review from alexggh May 27, 2026 20:28
@paritytech-workflow-stopper
Copy link
Copy Markdown

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/26536834946
Failed job name: fmt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T0-node This PR/Issue is related to the topic “node”.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant