Programmatically set agentVersion in Identify #686
Labels
exp/beginner
Can be confidently tackled by newcomers
good first issue
Good issue for new contributors
help wanted
Seeking public contribution on this issue
kind/enhancement
A net-new feature or improvement to an existing feature
status/ready
Ready to be worked
Overview
When handling Identify requests we are just sending a static, constant
agentVersion
of'js-libp2p/0.1.0'
. This is unhelpful and should be dynamic. The agentVersion can be set to any string. What we should be doing is specifying the package name and package version in the agentVersion. This can enable us to better identify applications on the network and see how the public network is upgrading over time.Proposed Changes
agentVersion
ofjs-libp2p/<libp2p.version>
ex: (js-libp2p/0.28.3
)agentVersion
of<package.name>/<package.version>
ex: (ipfs/0.47.0
)js-libp2p/<libp2p.version> UserAgent=<process.version>
)js-libp2p/<libp2p.version> UserAgent=<navigator.userAgent>
)go-libp2p already does this for Identify, without the UserAgent information. At a minimum we should include the app name and version name, but the UserAgent would also be useful.
The text was updated successfully, but these errors were encountered: