Make curve25519-dalek and ed25519-dalek required in akd_core - #497
Draft
rootkiller6788 wants to merge 1 commit into
Draft
Make curve25519-dalek and ed25519-dalek required in akd_core#497rootkiller6788 wants to merge 1 commit into
rootkiller6788 wants to merge 1 commit into
Conversation
The ecvrf module and the VRF verification path in verify/base.rs use these crates unconditionally, but they were marked optional and gated behind the vrf feature. Since vrf is not part of the default feature set, akd_core fails to compile with --no-default-features: error[E0433]: failed to resolve: use of unresolved module or unlinked crate `curve25519_dalek` Fix by making both dependencies required, turning the vrf feature into an empty backwards-compatible no-op, and un-gating the Vrf error plumbing in VerificationError that the verification code always uses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #493.
curve25519-dalekanded25519-dalekare markedoptional = trueinakd_core/Cargo.toml, enabled only by thevrffeature. However, theecvrfmodule is declared unconditionally inlib.rs(pub mod ecvrf;) andverify/base.rsuses VRF types unconditionally, so no code path actually gates the use of these crates.Because
vrfis not part of--no-default-features, the crate does not compile in that configuration:Changes
akd_core/Cargo.toml: makecurve25519-dalekanded25519-dalekrequired dependencies. Thevrffeature becomes an empty no-op kept for backwards compatibility with crates that enableakd_core/vrf(e.g. theakdcrate).akd_core/src/verify/mod.rs: un-gate theVerificationError::Vrfvariant and itsFrom<VrfError>impl, which the verification code always uses.Testing
Verified locally:
cargo check -p akd_core --no-default-features(previously failed, now passes)cargo check -p akd_core(default features)cargo check -p akd_core --features nostdcargo check -p akd_core --features protobuf,serde_serializationcargo check -p akd_core --no-default-features --features nostdcargo check -p akdcargo clippy -p akd_corecargo test -p akd_core(42 passed)cargo test -p akd --lib(106 passed)