Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Finish transition to the new PeerIds format #6044

Closed
tomaka opened this issue May 15, 2020 · 7 comments
Closed

Finish transition to the new PeerIds format #6044

tomaka opened this issue May 15, 2020 · 7 comments

Comments

@tomaka
Copy link
Contributor

tomaka commented May 15, 2020

Internally, PeerIds are now both an identity-multihash of the public key and a SHA256-multihash of that public key.

For Kademlia purposes, we use the SHA256 version.
All PeerIds are also displayed to the user as the SHA256 version.

The end goal is to transition these two to the identity version.

As a first step, we should show PeerIds to the user through their identity versions, so that all the configurations can be updated.

@tomaka
Copy link
Contributor Author

tomaka commented May 15, 2020

cc libp2p/rust-libp2p#1576

There are two approaches:

  • Change the Display implementation of PeerId to the new one in libp2p.
  • In Substrate, change everywhere we print a PeerId to show the identity version by manually base58-encoding the multihash. The problem with that approach is that we might miss some locations.

@romanb
Copy link
Contributor

romanb commented May 16, 2020

When nodes using libp2p-kad are eventually upgraded, there will inevitably be a period where nodes have two identities in the DHT, right (assuming you don't stop and upgrade all your nodes at once but do a rolling upgrade)?

@tomaka
Copy link
Contributor Author

tomaka commented Jun 2, 2020

I think the final step towards this is to remove support for the old representation.

While this will create a mild incompatibility between nodes regarding Kademlia, I don't think it is problematic. The random discovery should continue to work (albeit in an awkward way), and the authority-discovery is "best effort" mechanism and is not critical for the network to function properly.

@tomaka
Copy link
Contributor Author

tomaka commented Jun 2, 2020

I think the final step towards this is to remove support for the old representation.

Of course we should wait for a couple month to do that.

@tomaka
Copy link
Contributor Author

tomaka commented Jul 31, 2020

#6064 is in Polkadot 0.8.0 but not in versions 0.7.x.

According to the telemetry, there are currently only 9 Kusama nodes left that are on versions 0.7.x and that are in sync. Notably, there are quite a few nodes on versions 0.7.x and that seem to be stuck. I think it is reasonable for users to expect that versions 0.7.x no longer work properly.

I believe that we could finish this now.

@kaichaosun
Copy link
Contributor

No sure if it's related to this issue #7082.

@romanb
Copy link
Contributor

romanb commented Sep 11, 2020

This should be complete with #7077 which includes libp2p/rust-libp2p#1608.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants