Skip to content

Commit

Permalink
BACKPORT-CONFLICT
Browse files Browse the repository at this point in the history
  • Loading branch information
lexnv authored and github-actions[bot] committed Jan 14, 2025
1 parent 117c417 commit 2a32935
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
15 changes: 15 additions & 0 deletions prdoc/pr_7133.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json

title: Sufix litep2p to the identify agent version for visibility

doc:
- audience: [Node Dev, Node Operator]
description: |
This PR adds the `(litep2p)` suffix to the agent version (user agent) of the identify protocol.
The change is needed to gain visibility into network backends and determine exactly the number of validators that are running litep2p.
Using tools like subp2p-explorer, we can determine if the validators are running litep2p nodes.

crates:
- name: sc-network
bump: patch
7 changes: 7 additions & 0 deletions substrate/client/network/src/litep2p/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,19 @@ impl Discovery {
_peerstore_handle: Arc<dyn PeerStoreProvider>,
) -> (Self, PingConfig, IdentifyConfig, KademliaConfig, Option<MdnsConfig>) {
let (ping_config, ping_event_stream) = PingConfig::default();
<<<<<<< HEAD
let user_agent = format!("{} ({})", config.client_version, config.node_name);
let (identify_config, identify_event_stream) = IdentifyConfig::new(
"/substrate/1.0".to_string(),
Some(user_agent),
config.public_addresses.clone().into_iter().map(Into::into).collect(),
);
=======
let user_agent = format!("{} ({}) (litep2p)", config.client_version, config.node_name);

let (identify_config, identify_event_stream) =
IdentifyConfig::new("/substrate/1.0".to_string(), Some(user_agent));
>>>>>>> 105c5b94 (litep2p: Sufix litep2p to the identify agent version for visibility (#7133))

let (mdns_config, mdns_event_stream) = match config.transport {
crate::config::TransportConfig::Normal { enable_mdns, .. } => match enable_mdns {
Expand Down

0 comments on commit 2a32935

Please sign in to comment.