Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helia identifies itself to the network #122

Closed
Tracked by #4336
BigLep opened this issue May 16, 2023 · 4 comments · Fixed by #128
Closed
Tracked by #4336

Helia identifies itself to the network #122

BigLep opened this issue May 16, 2023 · 4 comments · Fixed by #128
Labels

Comments

@BigLep
Copy link
Contributor

BigLep commented May 16, 2023

Done Criteria

Helia identifies itself to the network by default. Specifically this mean:

  • libp2p identity - will be identifiable from DHT bootstrappers for example. Kubo does this.
  • user-agent header when making HTTP calls - This is relevant for example when making calls to cid.contact

We want to also get the Helia version as well (e.g., “helia/vX.Y.Z”) just as Kubo does.

We should only set the "user agent" if a user hasn't specified an override one.

Why Important

This enables Helia's prevalence to be detected/measured. This is important for getting signal on Helia's adoption in production, which in turn affects things like:

  1. funding and resourcing decisions
  2. client considerations for network/protocol upgrades

Notes

  1. At the end of this, problab should be able to generate the Helia equivalent of https://probelab.io/ipfsdht/#active-kubo-versions
@achingbrain
Copy link
Member

user-agent header when making HTTP calls

JS used to be forbidden from overriding user-agent in fetch requests - that changed with whatwg/fetch#37

Firefox fixed it: https://bugzilla.mozilla.org/show_bug.cgi?id=1188932
Chromium has not fixed it: https://bugs.chromium.org/p/chromium/issues/detail?id=571722

So currently this isn't possible with 90-odd% of browsers.

See CI failures in libp2p/js-ipni-content-routing#12

@BigLep
Copy link
Contributor Author

BigLep commented May 19, 2023

Thanks for the info @achingbrain . So I think to close this issue we do two things:

  1. Make sure it works for identify (which we can control)
  2. Ensure the right info is being passed from Helia to js-libp2p so that HTTP content routings systems can pick this up in future. (I assume this is done when number 1 above is done).

achingbrain added a commit that referenced this issue May 19, 2023
If the user has configured identify but not overridden the agent version, add helia and its version number to the string.

Fixes #122
@github-project-automation github-project-automation bot moved this from 🥞 Todo to 🎉 Done in Helia Working Group (inactive) May 19, 2023
github-actions bot pushed a commit that referenced this issue May 19, 2023
## [@helia/interface-v1.1.1](https://github.com/ipfs/helia/compare/@helia/interface-v1.1.0...@helia/interface-v1.1.1) (2023-05-19)

### Bug Fixes

* add helia version to agent version ([#128](#128)) ([48e19ec](48e19ec)), closes [#122](#122)
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version @helia/interface-v1.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit that referenced this issue May 19, 2023
## [helia-v1.1.1](helia-v1.1.0...helia-v1.1.1) (2023-05-19)

### Bug Fixes

* add helia version to agent version ([#128](#128)) ([48e19ec](48e19ec)), closes [#122](#122)
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version helia-v1.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

This was referenced Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
2 participants