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

Optional ipfs daemon --agent-version-suffix= #7898

Closed
lidel opened this issue Feb 4, 2021 · 5 comments · Fixed by #8419
Closed

Optional ipfs daemon --agent-version-suffix= #7898

lidel opened this issue Feb 4, 2021 · 5 comments · Fixed by #8419
Assignees
Labels
kind/bug A bug in existing code (including security flaws) kind/feature A new feature need/community-input Needs input from the wider community need/maintainers-input Needs input from the current maintainer(s) need/triage Needs initial labeling and prioritization topic/config Topic config topic/dht Topic dht topic/libp2p Topic libp2p
Milestone

Comments

@lidel
Copy link
Member

lidel commented Feb 4, 2021

I propose we add support for running ipfs daemon with optional --agent-version-suffix= parameter.

This would enable vendors that bundle go-ipfs binary to customize AgentVersion (listed in ipfs id and announced to other peers) without the need for creating a fake libp2p protocol just to tell one cohort of go-ipfs nodes from another.

The first users of this would be Brave browser and IPFS Desktop:

  • --agent-version-suffix=brave/1.19.85go-ipfs/0.9.0/brave/1.19.85
  • --agent-version-suffix=desktop/0.14.0go-ipfs/0.9.0/desktop/0.14.0

Rationale

This would be opt-in, so does not introduce any new tracking vector, it simply aims to make things easier for vendors and to introduce common convention that preserves version number of go-ipfs.

In the current situation, where vendor can rebuild go-ipfs binary and change agentVersion, but then we lose information about % of different go-ipfs nodes on the DHT. By making it a suffix, and making it work without rebuild, we will decrease the number of opaque AgentVersions, making it easier for us to track upgrade dynamics etc.

CLI param, ENV or Config?

No preference atm – all will work for Brave.

  • Config option would work fine
  • Env variable IPFS_AGENT_VERSION_SUFFIX (similar to IPFS_PATH) is good enough too
  • Explicit flag for ipfs daemon would be preferred, because it has added value if user has multiple go-ipfs nodes running on same localhost (eg. ipfs-desktop and brave). It enables things like ps aux | grep brave to quickly identify specific daemon instance.

cc @andrew @bbondy

@lidel lidel added kind/bug A bug in existing code (including security flaws) topic/dht Topic dht topic/libp2p Topic libp2p need/triage Needs initial labeling and prioritization need/community-input Needs input from the wider community kind/feature A new feature topic/config Topic config need/maintainers-input Needs input from the current maintainer(s) labels Feb 4, 2021
@lidel
Copy link
Member Author

lidel commented Jul 26, 2021

Added to maintenance board, we want to land this by EOY so vendors like IPFS Cluster, Brave or Berty could add their own version suffix for improved metrics.

@BigLep BigLep added this to the go-ipfs 0.12 milestone Aug 5, 2021
@BigLep BigLep modified the milestones: go-ipfs 0.12, go-ipfs 0.11 Sep 2, 2021
@schomatis
Copy link
Contributor

@lidel Going with the preferred CLI param option as suggested. Let me know if you'd like something different.

@schomatis
Copy link
Contributor

schomatis commented Sep 8, 2021

@lidel The agent version comes from the user agent in

https://github.com/ipfs/go-ipfs/blob/65d570c6cbe24f313fc6f02c3dc16aabc53306d1/version.go#L14

Do we care to also modify this as well with the new option or just the agent version propagated over the wire? I'm going with the second option leaving user agent as is but let me know otherwise.

@schomatis
Copy link
Contributor

I'm now realizing that UserAgent linked above is also used by libp2p to the point of being almost exactly a synonim with the agent version so I'll modify the original UserAgent as well unless noted otherwise.

@guseggert guseggert mentioned this issue Nov 23, 2021
80 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) kind/feature A new feature need/community-input Needs input from the wider community need/maintainers-input Needs input from the current maintainer(s) need/triage Needs initial labeling and prioritization topic/config Topic config topic/dht Topic dht topic/libp2p Topic libp2p
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants