Skip to content

Commit a34a700

Browse files
torrpriiusPronoss
authored andcommitted
metrics: Remove hard-coded gossipsub protocols from identify allowlist
1 parent d747e67 commit a34a700

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

misc/metrics/src/identify.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,8 @@ use crate::protocol_stack;
3737
const ALLOWED_PROTOCOLS: &[StreamProtocol] = &[
3838
#[cfg(feature = "dcutr")]
3939
libp2p_dcutr::PROTOCOL_NAME,
40-
#[cfg(feature = "gossipsub")]
41-
libp2p_swarm::StreamProtocol::new("/meshsub/1.2.0"),
42-
#[cfg(feature = "gossipsub")]
43-
libp2p_swarm::StreamProtocol::new("/meshsub/1.1.0"),
44-
#[cfg(feature = "gossipsub")]
45-
libp2p_swarm::StreamProtocol::new("/meshsub/1.0.0"),
46-
#[cfg(feature = "gossipsub")]
47-
libp2p_swarm::StreamProtocol::new("/floodsub/1.0.0"),
40+
// NOTE: Not including gossipsub here as users may configure custom protocol IDs
41+
// via ConfigBuilder::protocol_id. Hard-coding defaults would misclassify such setups.
4842
libp2p_identify::PROTOCOL_NAME,
4943
libp2p_identify::PUSH_PROTOCOL_NAME,
5044
#[cfg(feature = "kad")]

0 commit comments

Comments
 (0)