lodestar icon indicating copy to clipboard operation
lodestar copied to clipboard

Specify agent version for lodestar

Open twoeths opened this issue 3 years ago • 5 comments

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.0 using identify option https://github.com/libp2p/js-libp2p/blob/1f38ab7ac8380c9501b252d076bb356662978882/src/index.ts#L112
  • Inform other clients to identify lodestar using this new agent version

twoeths avatar Aug 22 '22 09:08 twoeths

We can switch to js-libp2p/lodestar/1.0.0 or similar to not break crawler regex and communicate with community about the change

dapplion avatar Aug 25 '22 09:08 dapplion

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 avatar Aug 25 '22 13:08 wemeetagain

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.

philknows avatar Aug 25 '22 14:08 philknows

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.

dapplion avatar Aug 26 '22 08:08 dapplion

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.

wemeetagain avatar Aug 26 '22 15:08 wemeetagain

@dapplion @wemeetagain Most have either implemented or will implement in their next releases. We should be good to go forward for a PR here.

philknows avatar Sep 29 '22 13:09 philknows