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

"ipfs id" address format is inconsistent #7378

Closed
Stebalien opened this issue May 27, 2020 · 2 comments · Fixed by #7397
Closed

"ipfs id" address format is inconsistent #7378

Stebalien opened this issue May 27, 2020 · 2 comments · Fixed by #7397
Labels
effort/hours Estimated to take one or several hours exp/wizard Extensive knowledge (implications, ramifications) required kind/bug A bug in existing code (including security flaws) kind/discussion Topical discussion; usually not changes to codebase P2 Medium: Good to have, but can wait until someone steps up topic/commands Topic commands

Comments

@Stebalien
Copy link
Member

Version information:

v0.5.1

Description:

ipfs id QmSelf prints out:

{
	"ID": "QmSelf",
	"PublicKey": "...",
	"Addresses": [
		"/ip4/104.131.131.82/udp/4001/quic/p2p/QmSelf",
		"/ip4/104.131.131.82/tcp/4001/p2p/QmSelf"
	],
	"AgentVersion": "go-ipfs/0.5.1/8431e2e",
	"ProtocolVersion": "ipfs/0.1.0"
}

ipfs id QmOtherPeer prints out:

{
	"ID": "QmOtherPeer",
	"PublicKey": "...",
	"Addresses": [
		"/ip4/104.131.131.82/udp/4001/quic", // note the lack of peer ID.
		"/ip4/104.131.131.82/tcp/4001"
	],
	"AgentVersion": "go-ipfs/0.5.1/8431e2e",
	"ProtocolVersion": "ipfs/0.1.0"
}

We should either drop the /p2p/... part from ipfs id QmSelf, or add it to ipfs id QmOtherPeer. Unfortunately, both solutions are breaking. I'd prefer the first solution because the /p2p/Qm... part is redundant. However, that option is also the more breaking option.

@Stebalien Stebalien added kind/bug A bug in existing code (including security flaws) topic/commands Topic commands exp/wizard Extensive knowledge (implications, ramifications) required P2 Medium: Good to have, but can wait until someone steps up kind/discussion Topical discussion; usually not changes to codebase effort/hours Estimated to take one or several hours labels May 27, 2020
@Stebalien
Copy link
Member Author

cc @achingbrain what does js-ipfs do?

@achingbrain
Copy link
Member

js-ipfs includes /p2p in the QmSelf addresses list but doesn't support args to the jsipfs id command right now.

Were it to, it'd just print out whatever js-libp2p gives us which would be similar to the output of jsipfs swarm peers so would most likely include the /p2p.

Stebalien added a commit that referenced this issue May 30, 2020
Consistently append `/p2p/QmMyId to addresses when calling `ipfs id Me` and `ipfs id NotMe`.

Fixes #7378.
Stebalien added a commit that referenced this issue May 30, 2020
Consistently append `/p2p/QmMyId` to addresses when calling `ipfs id Me` and `ipfs id NotMe`.

Fixes #7378.
ralendor pushed a commit to ralendor/go-ipfs that referenced this issue Jun 6, 2020
Consistently append `/p2p/QmMyId` to addresses when calling `ipfs id Me` and `ipfs id NotMe`.

Fixes ipfs#7378.
ralendor pushed a commit to ralendor/go-ipfs that referenced this issue Jun 8, 2020
Consistently append `/p2p/QmMyId` to addresses when calling `ipfs id Me` and `ipfs id NotMe`.

Fixes ipfs#7378.
ralendor pushed a commit to ralendor/go-ipfs that referenced this issue Jun 8, 2020
Consistently append `/p2p/QmMyId` to addresses when calling `ipfs id Me` and `ipfs id NotMe`.

Fixes ipfs#7378.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/hours Estimated to take one or several hours exp/wizard Extensive knowledge (implications, ramifications) required kind/bug A bug in existing code (including security flaws) kind/discussion Topical discussion; usually not changes to codebase P2 Medium: Good to have, but can wait until someone steps up topic/commands Topic commands
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants