Skip to content

feat: identify #286

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

Merged
merged 11 commits into from
Feb 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 35 additions & 2 deletions content/concepts/introduction/protocols/identify.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,40 @@
---
title: "Identify"
description: "A way for nodes in libp2p to query and inform other nodes about their metadata."
description: "A way for nodes in libp2p to query and inform remote nodes about their metadata."
weight: 23
---

Coming soon!
The libp2p Identify protocol allows nodes in the libp2p network to share
and query information about each other. It is usually run right after a new libp2p
connection has been established and, at certain times, during the lifetime of the
connection.

The information exchanged includes:

- the protocol version: a network identifier, e.g. `/my-network/0.1.0`.
- the user agent: a free-form string identifying the local node's implementation, usually
in the format "agent-name/version".
- the public key: cryptographic identifier of the local node in the format of a peer ID.
- the observed address: the remote node's public IP address as observed by the local node.
- the listen addresses: the multiaddresses at which the local node can be reached.
- the list of [protocols](/concepts/introduction/protocols/overview) that the
local node supports.

There are two variations of the protocol: `identify` and `identify/push`.

The Identify protocol, for historical reasons identified by the protocol ID `/ipfs/id/1.0.0`,
is used to actively query a remote node for its metadata. The identify/push protocol, identified
by the protocol ID `/ipfs/id/push/1.0.0`, allows a node to push Identify data to the remote node
without querying. This is used whenever changes to the data sent in Identify happen,
e.g., when the node starts listening on a new address and adds or removes support
for a protocol.

{{< alert icon="" context="note">}}
It's worth noting that go-libp2p used to include a feature called 'Identify Delta'
(<insert protocol ID>) for some time. This protocol was used to reduce the size of
Identify Pushes, but proved to be less useful (and a lot more complex) than expected.
It has since been deprecated, but many nodes on the IPFS network still support
this protocol.
{{< /alert >}}

{{< alert icon="💡" context="note" text="See the Identify <a class=\"text-muted\" href=\"https://github.com/libp2p/specs/tree/master/identify\">technical specification</a> for more details." />}}