Specify agent version for lodestar
Is your feature request related to a problem? Please describe.
Right now lodestar is always identified as the default agent version of libp2p, for example js-libp2p/0.36.2, see https://github.com/libp2p/js-libp2p/blob/1f38ab7ac8380c9501b252d076bb356662978882/src/identify/consts.ts#L5
Describe the solution you'd like
- We should be able to provide our own version, for example
lodestar/0.41.0usingidentifyoption https://github.com/libp2p/js-libp2p/blob/1f38ab7ac8380c9501b252d076bb356662978882/src/index.ts#L112 - Inform other clients to identify lodestar using this new agent version
We can switch to js-libp2p/lodestar/1.0.0 or similar to not break crawler regex and communicate with community about the change
Imo we should change the agent version to what we want eg: lodestar/${version}.
This is something we would have wanted to do for a 1.0 release if we would have followed our original timeline.
The only two active crawlers I'm aware of is the one from Miga Labs and Blockprint. Are there any others you may know of? If it's just two, maybe we can just relay the info for them to update.
Imo we should change the agent version to what we want eg:
lodestar/${version}. This is something we would have wanted to do for a 1.0 release if we would have followed our original timeline.
@wemeetagain the issue is that now everyone else in the network won't be able to detect us. It doesn't matter when we change it, it matter when others change it.
There are another 4 crawlers: Prysm, Lighthouse, Teku and Nimbus. It's very critical that their logging systems attribute errors to clients based on the agentVersion.
Lets make issues with all clients announcing our intention. Ideally clients can have similar logic as this: https://github.com/ChainSafe/eth2-crawler/blob/d5da38aaecdc36b7d852a8ce60be68156c6a8dc0/models/peer.go#L49
agentString.startsWith('lodestar') || agentString.startsWith('js-libp2p')
This issue isn't urgent and its better to take the right steps than do something halfway.
@dapplion @wemeetagain Most have either implemented or will implement in their next releases. We should be good to go forward for a PR here.