iroh 0.21.0 - Fix, clean & polish
by digWelcome to a new release of iroh, the open-source distributed systems toolkit with tools for direct connections, moving data, and syncing state.
This time around a lot of work went into fixing subtle bugs, improving documentation, and polishing APIs. We hope this will help you enjoy iroh even more!
👾 Iroh vs Tokio
The tokio_util
LocalPoolHandle
does not properly handle Drop
during shutdown. Its threads are just spawned as detached. So any Drop
implementation that runs in a local pool thread will be stopped as soon as the process terminates.
This in turn can have some serious consequences if the Drop
operation performs IO, like closing files and committing database transactions.
In order to fix this, we now have our own implementation of a LocalPool
, which more gracefully handles shutdown. The only thing you should notice about this, is that things are more stable.
For details check out PR 2517
🐳 Docker Round 2
Our docker images are now published to docker hub, and tested in CI. Check them out at
- https://hub.docker.com/r/n0computer/iroh
- https://hub.docker.com/r/n0computer/iroh-relay
- https://hub.docker.com/r/n0computer/iroh-dns-server
For details checkout PR 2520
🎯 Realigning APIs
Based on the Rust API, we have updated both the CLI and the FFI APIs, to make them as similar as possible.
For example, listing all blobs, looks like this now
// Rust
let blobs = iroh.blobs().list().await?;
# Python
blobs = await iroh.blobs().list()
// Kotlin
val blobs = iroh.blobs().list()
// Swift
let blobs = try await iroh.blobs().list()
# CLI
iroh blobs list blobs
For details check out iroh-ffi PR 167 and PR 2522.
⚠️ Breaking Changes
Protocol Changes
- iroh-relay
- Clients will dial
/relay
instead of/derp
, this means all0.21
nodes are only compatible with relays>= 0.20
- Clients will dial
API Changes
iroh-cli
- top level commands
author
->authors
blob
->blobs
doc
->docs
tag
->tags
- sub commands
new
->create
- added
metrics_dump_path
on the top level CLI parameters, which if set will make sure metrics are collected at regular intervals and written to the provided path in CSV format.
- top level commands
iroh
- removed deprecated
client::MemIroh
useiroh::client::Iroh
insteadclient::QuicIroh
useiroh::client::Iroh
insteadclient::MemDoc
useiroh::client::docs::Doc
insteadclient::QuicDoc
useiroh::client::docs::Doc
instead
- removed deprecated
iroh-net
- renamed
- field:
magicsock::metrics::Metrics::update_endpoints
->update_direct_addrs
.
- field:
- relay server is now behind the
iroh-relay
feature flag - removed
endpoint::Builder::peers_path
- added
endpoint::Builder::known_nodes
- renamed
- no automatic storage of known peers anymore in
iroh-net
- Public interfaces using
tokio_util::task::LocalPoolHandle
now use our ownLocalPool
/LocalPoolHandle
.
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.21.0.
If you want to know what is coming up, check out the 0.22.0 milestone, and if you have any wishes, let us know in our 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/X.
To get started, take a look at our docs, dive directly into the code, or chat with us in our discord channel.