-
Notifications
You must be signed in to change notification settings - Fork 999
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
Display the identity hash of PeerIds when relevant #1576
Conversation
Can we not end the transition period and remove the temporary |
That was actually my intention when opening this. The problem we're facing right now is that If we straight-up remove the migration code, then all these existing keys will become invalid. The only way to fix that is to first have a step where we show the correct version printed out. |
So if I understand correctly, you would want to tell users explicitly to re-copy these new peer IDs to wherever they are used? Since without such explicit instruction, I don't see how it could make a difference. And since such explicit upgrade instruction(s) are needed, you need to tell users something of the form "Please (re)start your node or execute command foo to get your new peer ID output. Replace your old peer ID with this new one everywhere, e.g. in your list of bootstrap nodes.", right? Why is it important then that "everywhere" in substrate that a peer ID is printed, the new version is shown for that purpose? What I'm trying to get at is, wouldn't a simple one-time upgrade hint in substrate where the new ID is displayed suffice as preparation for removing the migration code here, so there doesn't need to be another intermediate transition state in libp2p itself? |
I guess you would say that, although this could be done, it would be quite confusing for users to be told "This is your new peer ID, use it everywhere" but then not actually see it in any output (e.g. logs), which is fair enough. |
The
Debug
andDisplay
implementations callto_base58()
.This PR transitions
to_base58()
to the "proper" string representation of thePeerId
.In other words, identity
PeerId
s will now start with1...
rather thanQm...