-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat: introduce libp2p-identity
crate
#3350
Conversation
This allows crates to depend on the Keypair type without activing one of the algorithms.
These docs will never render because this code is only available without any features and we build docs with all features.
Makes sense to me Thomas 👍 |
Now that we have dummy public keys, we no longer need this.
This pull request has merge conflicts. Could you please resolve them @thomaseizinger? 🙏 |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Friendly ping @mxinden. |
This comment was marked as resolved.
This comment was marked as resolved.
This pull request has merge conflicts. Could you please resolve them @thomaseizinger? 🙏 |
Update here. I won't get to releasing this today, thus not yet merging. Otherwise other pull requests are red in the meantime. I hope to get to this Saturday or Monday. @thomaseizinger no need to resolve merge conflicts in the meantime. Sorry for the delay. |
As discussed, semver check failure for |
Thank you for releasing this! As part of the next breaking change, I want to remove the |
This kind of breaks my own implementation lol. I tried to keep |
I am happy to add features to make exporting easier to use. I am not sure why our Getting the conditional compilation code right is extremely tricky with the current situation and I don't want to put that burden on any of our users hence the deprecation of the direct access to the enum. If you get that wrong and your code happens to be another library, you can easily produce unresolvable compile-errors for the users of your library. We could add a |
The specs don't mention anything about key types being deprecated so I think we could add support for encoding the older key types via protobuf. @mxinden may have more context here on why we don't currently support them. What is your usecase for using non-ed25519 keys? Those should certainly be the preferred ones. |
That actually doesn't matter. I'll open a discussion and see what I can do there. |
I introduced the protobuf functionality in #2090 in order to import IPFS configs in https://github.com/mxinden/rust-libp2p-server/. I only implemented ed25519 because I didn't need any other. I am not aware of any other reason why the others are not implemented. In other words, contributions welcome. |
I opened an issue here: #3630 |
This patch combines the `libp2p_core::identity` and `libp2p_core::peer_id` modules into a new crate: `libp2p-identity`. Resolves libp2p#3349. Pull-Request: libp2p#3350.
Description
This patch combines the
libp2p_core::identity
andlibp2p_core::peer_id
modules into a new crate:libp2p-identity
.Resolves #3349.
Notes
This initial patch only moves the code and adds feature flags. What is yet undecided is how we want to adjust the public API as part of this. The goal would be that the first release (0.1) is backwards compatible with what we currently ship. In a 2nd release, we then harden the public API such that breaking changes will be very unlikely in the future. As part of
0.2
, I also want to remove the dependency onmultiaddr
to enable multiformats/rust-multiaddr#73 which requiresmultiaddr
to depend onlibp2p-identity
.What do people think about this plan? @mxinden @jxs @elenaf9
Links to any relevant issues
Open Questions
Further tasks
Keypair
andPublicKey
opaque structs. I think we should not have conditional enum variants. Those are a hazard. Someone could be exhaustively matching on them with one feature combination and adding a dependency that activates another suddenly causes the program to fail to compile. Even worse, this can happen in dependencies that don't add the necessarycfg
s.Change checklist