iroh 0.22.0 - Cleanup on aisle five
by digWelcome to a new release of iroh, the open-source distributed systems toolkit with tools for direct connections, moving data, and syncing state.
In v0.22, we’ve focused on fixing bugs and adding stability.
🏞️ Improved Handling of Existing Local Content
We've untangled a few subtle interactions in the downloader in this release. These interactions involved attempting to download content that you already had and attempting to download content from yourself.
Previously, if you tried to download a blob that you already had, the blob downloader would first attempt to open connections to peers before checking if you already had this blob locally. That process is now reversed: we check if you have a blob or collection locally before attempting to download it.
The second, more insidious, bug happened when your own NodeId was listed as a potential provider of the content you were trying to download. Now, if your own NodeId is the only listed provider, the download will fail with the “No Providers” error.
For more information, checkout PR #2586.
🚊 Fix regression: Fast direct connections
In iroh, we relate many different addresses to one NodeId and we send data over the lowest latency path to that NodeId.
Previously, we would wait until we knew the latency of a node's direct address before we attempted to send to that address. In many scenarios, specifically the ones where we would need to hole-punch before being able to connect directly anyway, waiting for the Ping/Pong process to determine the latency was fine.
However, there are real scenarios where you already know the public direct address of the node you want to talk to. In this case, the connection should be instant since you know that no hole-punching is needed to establish a direct connection.
The changes in this release make that possible. If you know that a node has a direct, public address, when you supply that address using a NodeAddr, iroh will now immediately attempt to connect to that address.
For more information, checkout PR #2580.
🔁 More Robust Gossip Dispatcher
We’ve made some changes in iroh-gossip to ensure we close and clean up connections safely and reliably.
The net::Gossip struct now tracks the client-side subscribers per topic. The topic will quit once all the handles to a GossipTopic are dropped.
This change completely removes the iroh_gossip::dispatcher and pulls most of those APIs into the GossipTopic. These APIs are not yet stable and may undergo another round of changes as we work with iroh_gossip more.
See below for the specific adjustments that need to be made to upgrade iroh-gossip.
Check out PR #2570 for more details.
⚠️ Breaking Changes
Protocol Changes
API Changes
-
iroh-gossipiroh_gossip::dispatcheris removed with everything that was in it. Use the new API fromiroh_gossip::net::Gossipinstead (see below).iroh_gossip::net::Gossipmethods changed:- changed:
joinnow returns aGossipTopic - removed:
broadcast,broadcast_neighbors,subscribe,subscribe_all,quit.- for
subscribeusejoininstead, which returns aGossipTopic - for
broadcastandbroadcast_neighborsuse the respective methods onGossipTopic. quitis obsolete now, the topic will be quitted once allGossipTopichandles are dropped.subscribe_allis no longer available
- for
- changed:
iroh_gossip::net::JoinTopicFutis removed (it is now obsolete)
-
iroh-net- Refactored the module structure for users of the
iroh-relayfeature in iroh-net- moved
iroh_net::relay::iroh_relay::*toiroh_net::relay::server::*iroh_net::relay::ClientConnHandlertoiroh_net::relay::server::ClientConnHandleriroh_net::relay::Metricstoiroh_net::relay::server::Metricsiroh_net::relay::MaybeTlsStreamServertoiroh_net::relay::server::MaybeTlsStreamServeriroh_net::relay::http::Clienttoiroh_net::relay::HttpClientiroh_net::relay::http::ClientBuildertoiroh_net::relay::HttpClientBuilderiroh_net::relay::http::ClientReceivertoiroh_net::relay::HttpClientReceiveriroh_net::relay::http::ClientErrortoiroh_net::relay::HttpClientErroriroh_net::relay::http::TlsConfigtoiroh_net::relay::server::TlsConfig
- removed
iroh_net::relay::http::ServerHandle. The server can now be aborted via itstask_handle()function or by dropping it. - renamed
iroh_net::relay::RelayClienttoiroh_net::relay::RelayConn - renamed and moved
iroh_net::relay::Servertoiroh_net::relay::server::ServerActorTask - unexposed
iroh_net::relay::http::{Server, ServerBuilder}. Useiroh_net::relay::server::Serverinstead.
- moved
- Properly feature-gate the iroh server implementation behind
#[cfg(feature = "iroh-relay")]by feature-gating the wholeiroh_net::relay::servermodule.
- Refactored the module structure for users of the
-
iroh- Unknown fields in the configuration file will now cause an error.
- Configuring the GC Policy in the configuration file has changed.
- Example:
[gc_policy] enabled = true interval = 1234
But wait, there's more!
Many bugs were squashed, and smaller features were added. For all those details, check out the full changelog: https://github.com/n0-computer/iroh/releases/tag/v0.22.0.
If you want to know what is coming up, check out the 0.23.0 milestone, and if you have any wishes, let us know about the issues! If you need help using iroh or just want to chat, please join us on discord! And to keep up with all things iroh, check out our Twitter.
To get started, take a look at our docs, dive directly into the code, or chat with us in our discord channel.