Skip to content

Commit

Permalink
[stable2412] Backport #7133: Sufix litep2p to the identify agent vers…
Browse files Browse the repository at this point in the history
…ion for visibility (#7153)

Backport #7133 into `stable2412` from lexnv.

See the
[documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md)
on how to use this bot.

<!--
  # To be used by other automation, do not modify:
  original-pr-number: #${pull_number}
-->

Co-authored-by: Alexandru Vasile <[email protected]>
  • Loading branch information
1 parent 58b0963 commit 2b34f2d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
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
2 changes: 1 addition & 1 deletion substrate/client/network/src/litep2p/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ impl Discovery {
_peerstore_handle: Arc<dyn PeerStoreProvider>,
) -> (Self, PingConfig, IdentifyConfig, KademliaConfig, Option<MdnsConfig>) {
let (ping_config, ping_event_stream) = PingConfig::default();
let user_agent = format!("{} ({})", config.client_version, config.node_name);
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));
Expand Down

0 comments on commit 2b34f2d

Please sign in to comment.