Skip to content

Commit 562e8a5

Browse files
cleanup and update to non patched versions
1 parent b750b04 commit 562e8a5

File tree

9 files changed

+293
-106
lines changed

9 files changed

+293
-106
lines changed

Cargo.lock

Lines changed: 280 additions & 79 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,3 @@ unexpected_cfgs = { level = "warn", check-cfg = ["cfg(iroh_docsrs)", "cfg(iroh_l
4040

4141
[workspace.lints.clippy]
4242
unused-async = "warn"
43-
44-
45-
[patch.crates-io]
46-
crypto_box = { git = "https://github.com/dignifiedquire/nacl-compat", branch = "rand-09" }
47-
mainline = { git = "https://github.com/dignifiedquire/mainline", branch = "feat-rand-09" }

iroh-dns-server/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ iroh-metrics = { version = "0.35", features = ["service"] }
3232
lru = "0.13"
3333
n0-future = "0.1.2"
3434
n0-snafu = "0.2.2"
35-
pkarr = { version = "4", features = ["relays", "dht"], default-features = false }
35+
pkarr = { version = "5", features = ["relays", "dht"], default-features = false }
3636
rcgen = "0.13"
3737
redb = "2.6.3"
3838
regex = "1.10.3"

iroh-relay/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ iroh-metrics = { version = "0.35", default-features = false }
3636
n0-future = "0.1.2"
3737
num_enum = "0.7"
3838
pin-project = "1"
39-
pkarr = { version = "4", default-features = false, features = ["signed_packet"] }
39+
pkarr = { version = "5", default-features = false, features = ["signed_packet"] }
4040
postcard = { version = "1", default-features = false, features = [
4141
"alloc",
4242
"use-std",

iroh/Cargo.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ workspace = true
2424
aead = { version = "=0.6.0-rc.2", features = ["bytes"] }
2525
backon = { version = "1.4" }
2626
bytes = "1.7"
27-
crypto_box = { version = "0.9.1", features = ["serde", "chacha20"] }
27+
crypto_box = { version = "0.10.0-pre.0", features = ["serde", "chacha20"] }
2828
data-encoding = "2.2"
2929
der = { version = "0.8.0-rc.9", features = ["alloc", "derive"] }
3030
derive_more = { version = "2.0.1", features = [
@@ -45,9 +45,7 @@ n0-watcher = "0.3"
4545
nested_enum_utils = "0.2.1"
4646
netwatch = { version = "0.9" }
4747
pin-project = "1"
48-
pkarr = { version = "4", default-features = false, features = [
49-
"relays",
50-
] }
48+
pkarr = { version = "5", default-features = false, features = ["relays"] }
5149
quinn = { package = "iroh-quinn", version = "0.14.0", default-features = false, features = ["rustls-ring"] }
5250
quinn-proto = { package = "iroh-quinn-proto", version = "0.13.0" }
5351
quinn-udp = { package = "iroh-quinn-udp", version = "0.5.7" }

iroh/src/discovery.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -781,15 +781,16 @@ mod tests {
781781
#[tokio::test]
782782
#[traced_test]
783783
async fn endpoint_discovery_simple_shared_with_arc() -> Result {
784+
let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
784785
let disco_shared = TestDiscoveryShared::default();
785786
let (ep1, _guard1) = {
786-
let secret = SecretKey::generate(rand::thread_rng());
787+
let secret = SecretKey::generate(&mut rng);
787788
let disco = disco_shared.create_discovery(secret.public());
788789
let disco = Arc::new(disco);
789790
new_endpoint(secret, disco).await
790791
};
791792
let (ep2, _guard2) = {
792-
let secret = SecretKey::generate(rand::thread_rng());
793+
let secret = SecretKey::generate(&mut rng);
793794
let disco = disco_shared.create_discovery(secret.public());
794795
let disco = Arc::new(disco);
795796
new_endpoint(secret, disco).await

iroh/src/endpoint.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2193,25 +2193,17 @@ fn is_cgi() -> bool {
21932193
// https://github.com/n0-computer/iroh/issues/1183
21942194
#[cfg(test)]
21952195
mod tests {
2196-
use std::time::{Duration, Instant};
2196+
use std::time::Duration;
21972197

2198-
use iroh_base::{NodeAddr, NodeId, SecretKey};
2199-
use n0_future::{BufferedStreamExt, StreamExt, stream, task::AbortOnDropHandle};
2198+
use iroh_base::{NodeAddr, SecretKey};
22002199
use n0_snafu::{Error, Result, ResultExt};
22012200
use n0_watcher::Watcher;
2202-
use quinn::ConnectionError;
22032201
use rand::SeedableRng;
2204-
use tracing::{Instrument, error_span, info, info_span};
2202+
use tracing::{Instrument, info, info_span};
22052203
use tracing_test::traced_test;
22062204

22072205
use super::Endpoint;
2208-
use crate::{
2209-
RelayMode,
2210-
discovery::static_provider::StaticProvider,
2211-
endpoint::{ConnectOptions, Connection, ConnectionType},
2212-
protocol::{AcceptError, ProtocolHandler, Router},
2213-
test_utils::{run_relay_server, run_relay_server_with},
2214-
};
2206+
use crate::{RelayMode, test_utils::run_relay_server};
22152207

22162208
const TEST_ALPN: &[u8] = b"n0/iroh/test";
22172209

iroh/src/key.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl Debug for SharedSecret {
4646

4747
impl SharedSecret {
4848
pub fn new(this: &crypto_box::SecretKey, other: &crypto_box::PublicKey) -> Self {
49-
SharedSecret(crypto_box::ChaChaBox::from_clamped(other, this))
49+
SharedSecret(crypto_box::ChaChaBox::new_from_clamped(other, this))
5050
}
5151

5252
/// Seals the provided cleartext.

iroh/src/magicsock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3051,7 +3051,7 @@ mod tests {
30513051
#[traced_test]
30523052
async fn test_direct_addresses() {
30533053
let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
3054-
let ms = Handle::new(Default::default()).await.unwrap();
3054+
let ms = Handle::new(default_options(&mut rng)).await.unwrap();
30553055

30563056
// See if we can get endpoints.
30573057
let eps0 = ms.direct_addresses().initialized().await;

0 commit comments

Comments
 (0)