From 5b2c7dfd1065539aadbde5dea10331ed141f6b05 Mon Sep 17 00:00:00 2001 From: Daniel N <2color@users.noreply.github.com> Date: Thu, 5 Sep 2024 13:57:13 +0200 Subject: [PATCH 1/5] feat: add signed peer record to identify spec --- identify/README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/identify/README.md b/identify/README.md index 2d7f141b2..e568cf1a9 100644 --- a/identify/README.md +++ b/identify/README.md @@ -37,7 +37,7 @@ and spec status. - [listenAddrs](#listenaddrs) - [observedAddr](#observedaddr) - [protocols](#protocols) - + - [signedPeerRecord](#signedpeerrecord) ## Overview @@ -81,6 +81,7 @@ message Identify { repeated bytes listenAddrs = 2; optional bytes observedAddr = 4; repeated string protocols = 3; + optional bytes signedPeerRecord = 8; } ``` @@ -133,3 +134,10 @@ clients only support initiating requests while some servers (only) support responding to requests. To prevent clients from initiating requests to other clients, which given them being clients they fail to respond, clients should not advertise `foo` in their `protocols` list. + +### signedPeerRecord + +This is a serialized [SignedEnvelope](https://github.com/libp2p/go-libp2p/blob/master/core/record/pb/envelope.proto) containing a [PeerRecord](https://github.com/libp2p/go-libp2p/blob/master/core/peer/pb/peer_record.proto), +signed by the sending node. It contains the same addresses as the `listenAddrs` field, but in a form that lets us share authenticated addrs with other peers. + +This field was introduced in a backwards compatible manner (meaning that it is sent along with the `listenAddrs` field), therefore, it is optional and may be omitted by older implementations. \ No newline at end of file From f16a3f408af19a677cb1e97a020c1e79c7b3878c Mon Sep 17 00:00:00 2001 From: Daniel N <2color@users.noreply.github.com> Date: Fri, 6 Sep 2024 16:26:19 +0200 Subject: [PATCH 2/5] fix: address feedback --- identify/README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/identify/README.md b/identify/README.md index e568cf1a9..4e5488733 100644 --- a/identify/README.md +++ b/identify/README.md @@ -137,7 +137,11 @@ advertise `foo` in their `protocols` list. ### signedPeerRecord -This is a serialized [SignedEnvelope](https://github.com/libp2p/go-libp2p/blob/master/core/record/pb/envelope.proto) containing a [PeerRecord](https://github.com/libp2p/go-libp2p/blob/master/core/peer/pb/peer_record.proto), +This is a serialized [SignedEnvelope][envelope-rfc] containing a [PeerRecord][peer-record-rfc], signed by the sending node. It contains the same addresses as the `listenAddrs` field, but in a form that lets us share authenticated addrs with other peers. -This field was introduced in a backwards compatible manner (meaning that it is sent along with the `listenAddrs` field), therefore, it is optional and may be omitted by older implementations. \ No newline at end of file +This field was introduced in a backwards compatible manner (meaning that it is sent along with the `listenAddrs` field), therefore, it is optional and may be omitted by older implementations. If the `signedPeerRecord` is present, implementations MUST use the data contained within it and ignore duplicated fields present in the main identify message + + +[envelope-rfc]: ../RFC/0002-signed-envelopes.md#wire-format +[peer-record-rfc]: ../RFC/0003-routing-records.md#address-record-format From 0b0d5b9fc67fea07b9aa5be9b464c4b201d0f024 Mon Sep 17 00:00:00 2001 From: Daniel Norman <1992255+2color@users.noreply.github.com> Date: Wed, 11 Sep 2024 10:26:24 +0200 Subject: [PATCH 3/5] Update identify/README.md --- identify/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/identify/README.md b/identify/README.md index 4e5488733..0eb24e5e2 100644 --- a/identify/README.md +++ b/identify/README.md @@ -140,7 +140,7 @@ advertise `foo` in their `protocols` list. This is a serialized [SignedEnvelope][envelope-rfc] containing a [PeerRecord][peer-record-rfc], signed by the sending node. It contains the same addresses as the `listenAddrs` field, but in a form that lets us share authenticated addrs with other peers. -This field was introduced in a backwards compatible manner (meaning that it is sent along with the `listenAddrs` field), therefore, it is optional and may be omitted by older implementations. If the `signedPeerRecord` is present, implementations MUST use the data contained within it and ignore duplicated fields present in the main identify message +This field was introduced in a backwards compatible manner (meaning that it is sent along with the `listenAddrs` field), therefore, it is optional and may be omitted by older implementations. If the `signedPeerRecord` is present and the implementation supports SignedEnvelope, it MUST use the data contained within it and ignore duplicated fields present in the main identify message [envelope-rfc]: ../RFC/0002-signed-envelopes.md#wire-format From 9810e69dce11b06cfebfdbb2e58b8cc1130a57f9 Mon Sep 17 00:00:00 2001 From: Daniel Norman <1992255+2color@users.noreply.github.com> Date: Wed, 11 Sep 2024 14:52:18 +0200 Subject: [PATCH 4/5] Update identify/README.md Co-authored-by: Alex Potsides --- identify/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/identify/README.md b/identify/README.md index 0eb24e5e2..9b6c5ab34 100644 --- a/identify/README.md +++ b/identify/README.md @@ -140,7 +140,9 @@ advertise `foo` in their `protocols` list. This is a serialized [SignedEnvelope][envelope-rfc] containing a [PeerRecord][peer-record-rfc], signed by the sending node. It contains the same addresses as the `listenAddrs` field, but in a form that lets us share authenticated addrs with other peers. -This field was introduced in a backwards compatible manner (meaning that it is sent along with the `listenAddrs` field), therefore, it is optional and may be omitted by older implementations. If the `signedPeerRecord` is present and the implementation supports SignedEnvelope, it MUST use the data contained within it and ignore duplicated fields present in the main identify message +This field was introduced in a backwards compatible manner (meaning that it is sent along with the `listenAddrs` field), therefore it is optional. + +If the `signedPeerRecord` is present the implementation MUST use the data contained within it and ignore duplicated fields present in the main identify message [envelope-rfc]: ../RFC/0002-signed-envelopes.md#wire-format From ba3d797399dca105267825645e855ed03242086a Mon Sep 17 00:00:00 2001 From: Daniel N <2color@users.noreply.github.com> Date: Wed, 11 Sep 2024 14:54:27 +0200 Subject: [PATCH 5/5] chore: update revision use r3 to account for #502 --- identify/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/identify/README.md b/identify/README.md index 9b6c5ab34..a4a62711f 100644 --- a/identify/README.md +++ b/identify/README.md @@ -5,7 +5,7 @@ | Lifecycle Stage | Maturity Level | Status | Latest Revision | |-----------------|----------------|--------|-----------------| -| 3A | Recommendation | Active | r1, 2021-08-09 | +| 3A | Recommendation | Active | r3, 2024-09-11 | Authors: [@vyzo]