-
Notifications
You must be signed in to change notification settings - Fork 984
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
(libp2p-identity) Confusing deprecation(s) on making PeerId from ed25519 PublicKey bytes #3802
Comments
Sorry for the confusion! Are you depending on The latter deprecation warnings are not released yet I think? You should be able to use A PR would be much appreciated and sorry for the confusion! |
Thanks @thomaseizinger for understanding and the explanation! I'll send a PR to hopefully clear it up. I will add |
Does that not work already? That was definitely an oversight, sorry for that! |
No worries! To answer your question about which version I was using, it was I did try |
Background
Suppose we want to create a new
PeerId
from someone's public key bytes, we can do this:Which works as expected ✔️.
...But with a deprecation notice says to use
PublicKey::into_ed25519
instead of thePublicKey::Ed25519
enum:rust-libp2p/identity/src/keypair.rs
Lines 394 to 401 in 96288b8
Which doesn't do the same thing, and also has it's own deprecation direction here:
rust-libp2p/identity/src/keypair.rs
Lines 111 to 118 in 96288b8
...which is also deprecated since
v0.2.0
, which is odd because identity is atv0.1.1
🤔 .THAT deprecation notice says to use
Keypair::try_into_ed25519
, which doesn't seem to exist.So I'm sure you can sense my confusion.
The issue is:
It's really confusing as to why the method that works points to 2 others which don't work or don't exist.
Potential Solution
Unless there is a clear reason or working deprecation path, remove the deprecations? I'm not privy to the logic as to why this is all here.
The text was updated successfully, but these errors were encountered: