-
Notifications
You must be signed in to change notification settings - Fork 275
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] How to integrate signed peer records? #347
Comments
Yes, very much, i.e. it is on our roadmap (see As far as I can tell go-libp2p already does via a combination of the two suggestions above, more specifically via:
See libp2p/go-libp2p#747 for details. Unfortunately the identify protocol specification has not been updated. |
Is there any reasoning why version
I might set out and try to update the spec then. |
I would guess that
That would be very much appreciated. Thank you Thomas! |
I tried to update the spec and I am in-between two minds. For one, we are defining a completely new protocol here (i.e. I am tempted to - instead of specifying go's variation of identify as Thoughts? |
It doesn't have a new protocol ID. Unfortunately, because we run identify before we know the peer's protocols (at the moment) negotiating between two versions would take a full round-trip and add a round-trip to connection initiation. Instead, we just added the field to the the protocol. It's backwards compatible, and old versions will simply ignore it. |
I think the move to signed peer records in the identify protocol should happen in a non-breaking way at the Protocol Buffer level and not in a "breaking" way at the protocol name level. In other words, I am in favor of the go-libp2p way, adding the I agree that the additional field in the Protocol Buffer schema adds complexity to the protocol, though I would argue that (a) complexity is rather small, especially since we can ultimately deprecate the old Given that With the above in mind, what do you think @thomaseizinger? I am sorry for (a) this not being properly specified before rolled out in go-libp2p and (b) the extra work you already did in #350. |
Alright, that completely changes the game then :) I'll drop #350 then and update the spec to reflect what Migration to a new protocol identifier can be done at a later stage (if ever). |
Friendly ping. Help here would still be very much appreciated @thomaseizinger 😇 |
Thanks! I did not forget about it, just got a lot on my plate at the moment :) Safe to say that this is up for grabs if anyone else wants to pick it up 😅 |
Speaking as a new user of libp2p, the remaining references to |
@Stebalien Are there any other issues apart from this that are blockers for an upgrade to a new ID? It is my understanding that this is primarily a I am not familiar with the |
go-libp2p added signed peer records (https://github.com/libp2p/go-libp2p/blob/8cf67ba1d06271050c4211eb383189214bb535c1/p2p/protocol/identify/pb/identify.proto#L45) ages ago (with the assumption that the spec change would be made). However, we never changed the protocol name because that's an unrelated issue. In terms of how to implement the protocol name change... there isn't actually a round-trip issue as long as we prefer the old name (
Eventually, once most of the network has upgraded, we can switch the clients to preferring the new protocol. |
Cool that is good to know! It is OT for this issue but I might open another one soon then where we can discuss moving to a new identifier. |
The
/identify
protocol was conceived before signed peer records were added.Is there a plan of integrating signed peer records into
/identify
? I think there are a number of ways:/identify/1.1.0
wherelistenAddrs
is deprecated and a new fieldlistenPeerRecords
is added.(1) could be implemented in a backwards-compatible way where upgraded peers always populate both fields.
(2) could also be a good chance to do #45
Given the simplicity of the identify protocol, it might just be easier to design a completely new one. Nodes can always stay backwards compatible by supporting both protocols simultaneously.
The text was updated successfully, but these errors were encountered: