protocol: Depend on `cypheraddr` not `cyphernet`

`radicle-protocol` depends on `cyphernet`, but only uses the module
`cyphernet::addr`, which is a re-export of `cypheraddr`, which is
unnecessary (as `cypheraddr` alone would do), and invites accidentally
pulling in more dependencies via `cyphernet`.

To prevent accidentally depending on further types from `cyphernet`,
change this to more conservativeley depend on `cypheraddr`.
This commit is contained in:
Lorenz Leutgeb 2026-02-15 13:51:02 +01:00 committed by Fintan Halpenny
parent d530f1265e
commit a1fa38018e
5 changed files with 7 additions and 5 deletions

3
Cargo.lock generated
View File

@ -679,6 +679,7 @@ dependencies = [
"amplify", "amplify",
"base32", "base32",
"cyphergraphy", "cyphergraphy",
"serde",
"sha3", "sha3",
] ]
@ -3083,7 +3084,7 @@ dependencies = [
"bloomy", "bloomy",
"bytes", "bytes",
"crossbeam-channel", "crossbeam-channel",
"cyphernet", "cypheraddr",
"fastrand", "fastrand",
"log", "log",
"nonempty", "nonempty",

View File

@ -25,6 +25,7 @@ bytes = "1.11.1"
chrono = { version = "0.4.26", default-features = false } chrono = { version = "0.4.26", default-features = false }
colored = "2.1.0" colored = "2.1.0"
crossbeam-channel = "0.5.6" crossbeam-channel = "0.5.6"
cypheraddr = "0.4.0"
cyphernet = "0.5.2" cyphernet = "0.5.2"
dunce = "1.0.5" dunce = "1.0.5"
fastrand = { version = "2.0.0", default-features = false } fastrand = { version = "2.0.0", default-features = false }

View File

@ -15,7 +15,7 @@ test = ["radicle/test", "radicle-crypto/test", "radicle-crypto/cyphernet", "qche
bloomy = "1.2" bloomy = "1.2"
bytes = { workspace = true } bytes = { workspace = true }
crossbeam-channel = { workspace = true } crossbeam-channel = { workspace = true }
cyphernet = { workspace = true, features = ["tor"] } cypheraddr = { workspace = true, features = ["serde", "tor"] }
fastrand = { workspace = true } fastrand = { workspace = true }
log = { workspace = true, features = ["std"] } log = { workspace = true, features = ["std"] }
nonempty = { workspace = true, features = ["serialize"] } nonempty = { workspace = true, features = ["serialize"] }

View File

@ -15,7 +15,7 @@ use std::string::FromUtf8Error;
use bytes::{Buf, BufMut}; use bytes::{Buf, BufMut};
use cyphernet::addr::tor; use cypheraddr::tor;
use radicle::crypto::{PublicKey, Signature, Unverified}; use radicle::crypto::{PublicKey, Signature, Unverified};
use radicle::git; use radicle::git;
@ -257,7 +257,7 @@ impl Encode for Refs {
} }
} }
impl Encode for cyphernet::addr::tor::OnionAddrV3 { impl Encode for cypheraddr::tor::OnionAddrV3 {
fn encode(&self, buf: &mut impl BufMut) { fn encode(&self, buf: &mut impl BufMut) {
self.into_raw_bytes().encode(buf) self.into_raw_bytes().encode(buf)
} }

View File

@ -2,7 +2,7 @@ use std::{mem, net};
use bytes::Buf; use bytes::Buf;
use bytes::BufMut; use bytes::BufMut;
use cyphernet::addr::{tor, HostName, NetAddr}; use cypheraddr::{tor, HostName, NetAddr};
use radicle::crypto::Signature; use radicle::crypto::Signature;
use radicle::git::Oid; use radicle::git::Oid;
use radicle::identity::RepoId; use radicle::identity::RepoId;