-
Notifications
You must be signed in to change notification settings - Fork 229
deps!: update pkarr to v3 #3186
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
Conversation
4bdd95e
to
65eefe1
Compare
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3186/docs/iroh/ Last updated: 2025-04-30T10:14:29Z |
65eefe1
to
7fac5d9
Compare
@Frando The wasm error is what I get for updating to Long story short you need to add Edit: if you know a better way to do this, let me know, would love to learn. |
560bb0d
to
fdc5561
Compare
I am not sure how would iroh-relay run in wasm, but anyway, I think the .cargo/config.toml should go in that crate. |
Note: While all tests pass this is not yet good to go. the PkarrClient in
So let's wait for a new release that fixes these issues. |
@Frando published However, Github CI has been failing for me for no reason, even when I rerun older commits that already passed, I seen no issues on mac or linux, so it should be fine, but I am not feeling too much confidence in CIs at the moment, so keep that in mind. |
|
Alright, I updated this PR:
Let's see what CI says, but I think this should be good to go now. Requested a review from @rklaehn as the biggest changes are in the pkarr dht discovery impl. It became quite a bit simpler, as more of the logic to use both relays and the DHT is now handled by pkarr itself. There's also some changes in the DNS server. To make sure that we don't break anything: @Arqu, can we testdrive this on staging or in a test environment somehow easily? |
@@ -101,13 +101,13 @@ mod tests { | |||
30, | |||
dns::rdata::RData::AAAA(Ipv6Addr::LOCALHOST.into()), | |||
)); | |||
SignedPacket::from_packet(&keypair, &packet)? | |||
SignedPacket::new(&keypair, &packet.answers, Timestamp::now())? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not important here, but if there are other places where you have similar verbosity, reminder that the new SignedPacket::builder()
api is much nicer.
Yes, we can set this up on the staging dns instance and do some tests. |
iroh/src/discovery/pkarr/dht.rs
Outdated
tracing::info!("discovered node info from DHT {:?}", &node_info); | ||
Some(Ok(DiscoveryItem::new(node_info, "mainline", None))) | ||
tracing::info!("discovered node info {:?}", node_info); | ||
Some(Ok(DiscoveryItem::new(node_info, "dht", None))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this always dht
or should we rename this to pkarr
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, it supports both relay and DHT, so changed to pkarr
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes seem like a straightforward API update.
I tried the dht_discovery example. It still seems to work.
Not sure if pkarr has gotten heavier with this update, but since it is an optional feature I guess we will have to live with it.
Did a quick cargo tree, and didn't see anything unusual. Just the usual rust madness.
Description
Updates pkarr from v2 to v3. The pkarr client now supports both relays and DHT, so the DHT discovery code becomes a bit simpler.
Breaking Changes
pkarr::SignedPacket
, as used as a parameter iniroh::dns::node_info::NodeInfo::to_pkarr_signed_packet
andiroh::dns::node_info::NodeInfo::from_pkarr_signed_packet
is now expectingpkarr
at major version3
instead of2
Notes & open questions
Change checklist