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

identify spec #97

Merged
merged 7 commits into from May 1, 2019

Conversation

@vyzo
Copy link
Contributor

commented Oct 10, 2018

No description provided.

@vyzo vyzo requested review from bigs, mgoelzer, raulk and marten-seemann Oct 10, 2018

@ghost ghost assigned vyzo Oct 10, 2018

@ghost ghost added the in progress label Oct 10, 2018


These are the addresses on which the peer is listening as multi-addresses.

### observedAddr

This comment has been minimized.

Copy link
@tomaka

tomaka Oct 10, 2018

Member

There are two possibilities here: this can be either the stack of protocols the listener used in order to reach back the dialer, or the stack of protocols we think the dialer used to reach us.
For the sake of forward compatibility, I think it'd be a nice idea to define this more precisely, and I'd be in favour of the former.

This comment has been minimized.

Copy link
@vyzo

vyzo Oct 10, 2018

Author Contributor

Added a source disambiguator, per discussion in meatspace.

This comment has been minimized.

Copy link
@tomaka

tomaka Oct 10, 2018

Member

Per discussion I'm not satisfied with the wording, because I'd like to disambiguate what is returned when p2p-circuit is used, but I can't find any appropriate wording.

This comment has been minimized.

Copy link
@vyzo

vyzo Oct 10, 2018

Author Contributor

We can add an example for circuit addresses specifically, as they seem to be the contentious issue.

This comment has been minimized.

Copy link
@vyzo

vyzo Oct 10, 2018

Author Contributor

Added some examples, hopefully it's clearer now.

This comment has been minimized.

Copy link
@bigs

bigs Oct 12, 2018

Contributor

maybe something like: "This address describes the dialed peer's observed route to the dialing peer."

so wordy tho

This comment has been minimized.

Copy link
@vyzo

vyzo Oct 12, 2018

Author Contributor

yeah, and it's not really any better than the current wording.


### protocols

This is a list of protocols supported by the peer.

This comment has been minimized.

Copy link
@raulk

raulk Oct 11, 2018

Member

not ordered in any specific manner.

This comment has been minimized.

Copy link
@vyzo

vyzo Oct 11, 2018

Author Contributor

right, but do we need to say that?

This comment has been minimized.

Copy link
@raulk

raulk Oct 11, 2018

Member

A list implies order. If order is not important, then we can say it's an unordered set. We shouldn't be sending duplicates anyway, right?

This comment has been minimized.

Copy link
@vyzo

vyzo Oct 12, 2018

Author Contributor

it's a list on the wire, there is no set datatype.

This comment has been minimized.

Copy link
@dryajov

dryajov Oct 13, 2018

Member

might be worth clarifying that this are multistream protocols (or protocol strings)?

@@ -0,0 +1,56 @@
# Identify v1.0.0

The identify protocol is used to identify a peer and its capabilities.

This comment has been minimized.

Copy link
@raulk

raulk Oct 11, 2018

Member

can we unpack the definition of "identify a peer"? the recursive definition is confusing for a spec

This comment has been minimized.

Copy link
@vyzo

vyzo Oct 11, 2018

Author Contributor

uhm ok; me loves recursion.

This comment has been minimized.

Copy link
@vyzo

vyzo Oct 11, 2018

Author Contributor

i really can't think of a non-verbose way of expressing this.

This comment has been minimized.

Copy link
@raulk

raulk Oct 11, 2018

Member

How about "the identify protocol is used to interrogate a peer for basic information and its capabilities, the details of which are defined below"?

This comment has been minimized.

Copy link
@vyzo

vyzo Oct 12, 2018

Author Contributor

query, not interrogate.

### protocolVersion

The protocol version identifies the family of protocols used by the peer.
The current protocol version is `ipfs/0.1.0`; if the protocol does not match

This comment has been minimized.

Copy link
@raulk

raulk Oct 11, 2018

Member

with the current logic, the micro/patch version can be different. only major and minor need to be equal.

This comment has been minimized.

Copy link
@vyzo

vyzo Oct 11, 2018

Author Contributor

ok, will update. We'd also like to get to a point we don't close conns because of this.


### agentVersion

This is a free-form string, identifying the implementation of the peer.

This comment has been minimized.

Copy link
@raulk

raulk Oct 11, 2018

Member

can we encourage a particular format, even if non-normative? the default is go-libp2p/<semver>, and IPFS changes this to "go-ipfs/" + version.CurrentVersionNumber + "/" + version.CurrentCommit.

https://github.com/ipfs/go-ipfs/blob/master/core/core.go#L99

This comment has been minimized.

Copy link
@vyzo

vyzo Oct 11, 2018

Author Contributor

nah, let's let people call their agents whatever they want!

This comment has been minimized.

Copy link
@vyzo

vyzo Oct 11, 2018

Author Contributor

although an example might be useful.

This comment has been minimized.

Copy link
@raulk

raulk Oct 11, 2018

Member

example sounds good

@bigs
Copy link
Contributor

left a comment

observedAddr semantics are shockingly hard to describe. beyond that, i'm good


These are the addresses on which the peer is listening as multi-addresses.

### observedAddr

This comment has been minimized.

Copy link
@bigs

bigs Oct 12, 2018

Contributor

maybe something like: "This address describes the dialed peer's observed route to the dialing peer."

so wordy tho

### listenAddrs

These are the addresses on which the peer is listening as multi-addresses.

This comment has been minimized.

Copy link
@richardschneider

richardschneider Nov 9, 2018

Contributor

Does the multiaddress also include /ipfs/Qm...? If so, is /p2p also supported?

This comment has been minimized.

Copy link
@Stebalien

Stebalien Nov 9, 2018

Contributor

It doesn't include it. Well, it shouldn't.

@daviddias

This comment has been minimized.

Copy link
Member

commented Nov 22, 2018

Please make sure to take https://github.com/libp2p/js-libp2p-switch/issues/78 into account

@yusefnapora

This comment has been minimized.

Copy link
Contributor

commented Apr 16, 2019

@vyzo this looks pretty solid to me - should we merge?

I don't have the context behind @daviddias comment about the js / go interop, so maybe we need to address the changes made there?

@vyzo

This comment has been minimized.

Copy link
Contributor Author

commented Apr 16, 2019

We also have identify/push now, which is the active update variant of the protocol and should be in the spec.

@vyzo

This comment has been minimized.

Copy link
Contributor Author

commented Apr 16, 2019

@yusefnapora feel free to edit!

@ghost ghost assigned yusefnapora May 1, 2019

@yusefnapora

This comment has been minimized.

Copy link
Contributor

commented May 1, 2019

@vyzo I added a bit about identify/push - lmk if it looks alright. If so, I think we should press the button 😃

@vyzo
Copy link
Contributor Author

left a comment

LGTM, but I can't actually approve as I am the original author of the pr :)

@yusefnapora

This comment has been minimized.

Copy link
Contributor

commented May 1, 2019

hehe, fair enough :) I'll let you do the honor of pressing the big green button then

@vyzo

This comment has been minimized.

Copy link
Contributor Author

commented May 1, 2019

Any objections to merging this?

`/ipfs/id/push/1.0.0` as the protocol id string. When the remote peer accepts the stream,
the local peer will send an `Identify` message and close the stream.

## The Identify Message

This comment has been minimized.

Copy link
@Stebalien

Stebalien May 1, 2019

Contributor

We should probably note that any missing fields should be ignored (so we can do a partial identify push).

This comment has been minimized.

Copy link
@vyzo

vyzo May 1, 2019

Author Contributor

@yusefnapora want to add it?

@vyzo

This comment has been minimized.

Copy link
Contributor Author

commented May 1, 2019

Alright, let's merge!

@vyzo vyzo merged commit 039a62f into master May 1, 2019

@ghost ghost removed the in progress label May 1, 2019

@vyzo vyzo deleted the feat/identify branch May 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.