dependabot[bot] 2b6e07f656 chore(deps): bump redb from 3.1.3 to 4.1.0 (#4172)
Bumps [redb](https://github.com/cberner/redb) from 3.1.3 to 4.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cberner/redb/releases">redb's
releases</a>.</em></p>
<blockquote>
<h2>4.1.0</h2>
<p><strong>This release contains a large number of bug fixes discovered
by AI coding agents</strong></p>
<ul>
<li>Fix a bug where <code>MultimapValue::len()</code> and
<code>is_empty()</code> returned stale counts after
consuming entries via <code>next_back()</code>.</li>
<li>Fix a bug where <code>restore_savepoint()</code> used in a
non-<code>Immediate</code> durability transaction and when
there are persistent savepoints newer than the one being restored, could
fail
with <code>SavepointError::InvalidSavepoint</code>, but the savepoint
would actually be partially applied.
The call now fails up front with
<code>SavepointError::ImmediateDurabilityRequired</code>.</li>
<li>Fix a bug in <code>restore_savepoint()</code> where modifications
made earlier in the transaction might
not be reverted.</li>
<li>Fix a bug where renaming a table that was already modified in the
same transaction could cause
the database to become corrupted.</li>
<li>Fix a bug where calling <code>restore_savepoint()</code> after
modifying a table in the same
transaction could cause the table to become corrupted in a future
transaction.</li>
<li>Fix a panic when <code>delete_table()</code> was called on a table
that had been modified in the same
transaction.</li>
<li>Fix a panic in <code>restore_savepoint()</code> when passed a
<code>Savepoint</code> from a different <code>Database</code>.
<code>SavepointError::InvalidSavepoint</code> is now returned
instead.</li>
<li>Fix a bug where a transaction that created a persistent savepoint
and was then
aborted could cause the database file to grow excessively, until the
<code>Database</code> was dropped.</li>
<li>Fix a panic in <code>check_integrity()</code> when called while
another transaction is still alive.
<code>DatabaseError::TransactionInProgress</code> is now returned
instead.</li>
<li>Fix a bug where aborting a transaction that called
<code>restore_savepoint()</code> with a savepoint
when a newer savepoint existed could cause database space to be
leaked.</li>
<li>Fix a bug where aborting a transaction that called
<code>restore_savepoint()</code> would leave more
recent savepoints invalid.</li>
<li>Improve performance when reading concurrently from multiple threads.
Around 15% speedup on some benchmarks.</li>
<li>Optimize cache usage, and general write performance. Around 1.5x
speedup on some benchmarks.</li>
<li>Optimize memory usage.</li>
<li>Other performance optimizations.</li>
</ul>
<h2>4.0.0</h2>
<ul>
<li>Implement <code>Drop</code> on <code>AccessGuardMut</code> and
<code>AccessGuardMutInPlace</code>, which requires that these be dropped
before the <code>Table</code> they borrow from.
This fixes a critical bug where the accessor could outlive the
<code>Table</code>, and be dropped after the
transaction had already committed. This could cause data loss due to the
data in the accessor
being written out after the transaction had already completed.</li>
<li>Remove <code>Legacy</code> type. To migrate off the
<code>Legacy</code> type, use the <code>Legacy</code> type in the 3.x
release
and copy the data to a table with plain tuples, before upgrading to the
4.x release.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/cberner/redb/blob/master/CHANGELOG.md">redb's
changelog</a>.</em></p>
<blockquote>
<h2>4.1.0 - 2026-04-19</h2>
<p><strong>This release contains a large number of bug fixes discovered
by AI coding agents</strong></p>
<ul>
<li>Fix a bug where <code>MultimapValue::len()</code> and
<code>is_empty()</code> returned stale counts after
consuming entries via <code>next_back()</code>.</li>
<li>Fix a bug where <code>restore_savepoint()</code> used in a
non-<code>Immediate</code> durability transaction and when
there are persistent savepoints newer than the one being restored, could
fail
with <code>SavepointError::InvalidSavepoint</code>, but the savepoint
would actually be partially applied.
The call now fails up front with
<code>SavepointError::ImmediateDurabilityRequired</code>.</li>
<li>Fix a bug in <code>restore_savepoint()</code> where modifications
made earlier in the transaction might
not be reverted.</li>
<li>Fix a bug where renaming a table that was already modified in the
same transaction could cause
the database to become corrupted.</li>
<li>Fix a bug where calling <code>restore_savepoint()</code> after
modifying a table in the same
transaction could cause the table to become corrupted in a future
transaction.</li>
<li>Fix a panic when <code>delete_table()</code> was called on a table
that had been modified in the same
transaction.</li>
<li>Fix a panic in <code>restore_savepoint()</code> when passed a
<code>Savepoint</code> from a different <code>Database</code>.
<code>SavepointError::InvalidSavepoint</code> is now returned
instead.</li>
<li>Fix a bug where a transaction that created a persistent savepoint
and was then
aborted could cause the database file to grow excessively, until the
<code>Database</code> was dropped.</li>
<li>Fix a panic in <code>check_integrity()</code> when called while
another transaction is still alive.
<code>DatabaseError::TransactionInProgress</code> is now returned
instead.</li>
<li>Fix a bug where aborting a transaction that called
<code>restore_savepoint()</code> with a savepoint
when a newer savepoint existed could cause database space to be
leaked.</li>
<li>Fix a bug where aborting a transaction that called
<code>restore_savepoint()</code> would leave more
recent savepoints invalid.</li>
<li>Improve performance when reading concurrently from multiple threads.
Around 15% speedup on some benchmarks.</li>
<li>Optimize cache usage, and general write performance. Around 1.5x
speedup on some benchmarks.</li>
<li>Optimize memory usage.</li>
<li>Other performance optimizations.</li>
</ul>
<h2>4.0.0 - 2026-04-02</h2>
<ul>
<li>Implement <code>Drop</code> on <code>AccessGuardMut</code> and
<code>AccessGuardMutInPlace</code>, which requires that these be dropped
before the <code>Table</code> they borrow from.
This fixes a critical bug where the accessor could outlive the
<code>Table</code>, and be dropped after the
transaction had already committed. This could cause data loss due to the
data in the accessor
being written out after the transaction had already completed.</li>
<li>Remove <code>Legacy</code> type. To migrate off the
<code>Legacy</code> type, use the <code>Legacy</code> type in the 3.x
release
and copy the data to a table with plain tuples, before upgrading to the
4.x release.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/cberner/redb/commit/6ed1f981ba4deab0b2adbdd7bccb46ec409b2191"><code>6ed1f98</code></a>
Bump version to 4.1.0</li>
<li><a
href="https://github.com/cberner/redb/commit/0a87cb7c6bbef9d42a3d13317b5beaf4063e16e6"><code>0a87cb7</code></a>
Update changelog</li>
<li><a
href="https://github.com/cberner/redb/commit/03966a5050a3a6bef1045032d698f65b84a1eec9"><code>03966a5</code></a>
Require callers of get_page to provide a PageHint</li>
<li><a
href="https://github.com/cberner/redb/commit/a75927ff26d64f389e0050140654a39f239213a3"><code>a75927f</code></a>
Remove some TODO comments</li>
<li><a
href="https://github.com/cberner/redb/commit/a39779be8857b644476e64ddbe557082dd03644d"><code>a39779b</code></a>
Avoid allocating a page for a branch that will be immediately
merged</li>
<li><a
href="https://github.com/cberner/redb/commit/6374134252e7e128e5f98a4f04cf8bfdab9b3191"><code>6374134</code></a>
Document that Table{,Multimap}Definition::new panic on empty names</li>
<li><a
href="https://github.com/cberner/redb/commit/ba043e3816a81d93734e4533bc87465885496f61"><code>ba043e3</code></a>
Avoid copying keys in leaf overwrite paths</li>
<li><a
href="https://github.com/cberner/redb/commit/f42c468e008cfb7331d685ab2b675934bcec12ca"><code>f42c468</code></a>
Fix MultimapValue::next_back() not decrementing remaining counter</li>
<li><a
href="https://github.com/cberner/redb/commit/3756148e34e912206a382ef4224b3942d2d8aaa4"><code>3756148</code></a>
Clarify API contract for Key and Value traits</li>
<li><a
href="https://github.com/cberner/redb/commit/45523720a87ca0803264335e28538baabe6e04ae"><code>4552372</code></a>
Consolidate WriteTransaction savepoint lifecycle state</li>
<li>Additional commits viewable in <a
href="https://github.com/cberner/redb/compare/v3.1.3...v4.1.0">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-30 10:27:21 +02:00
2026-04-07 18:38:38 +02:00
2024-04-29 10:08:12 +00:00
2026-04-02 10:21:54 +02:00
2024-01-23 14:36:54 +00:00
2026-04-20 14:22:35 +02:00
2023-11-08 11:47:24 +01:00
2024-01-23 14:36:54 +00:00

iroh

less net work for networks

Documentation Crates.io downloads Chat Youtube License: MIT License: Apache 2.0 CI


What is iroh?

Iroh gives you an API for dialing by public key. You say “connect to that phone”, iroh will find & maintain the fastest connection for you, regardless of where it is.

Hole-punching

The fastest route is a direct connection, so if necessary, iroh tries to hole-punch. Should this fail, it can fall back to an open ecosystem of public relay servers. To ensure these connections are as fast as possible, we continuously measure iroh.

Built on QUIC

Iroh uses noq to establish QUIC connections between endpoints. This way you get authenticated encryption, concurrent streams with stream priorities, a datagram transport and avoid head-of-line-blocking out of the box.

Compose Protocols

Use pre-existing protocols built on iroh instead of writing your own:

  • iroh-blobs for BLAKE3-based content-addressed blob transfer scaling from kilobytes to terabytes
  • iroh-gossip for establishing publish-subscribe overlay networks that scale, requiring only resources that your average phone can handle
  • iroh-docs for an eventually-consistent key-value store of iroh-blobs blobs
  • iroh-willow for an (in-construction) implementation of the willow protocol

Getting Started

Rust Library

It's easiest to use iroh from rust. Install it using cargo add iroh, then on the connecting side:

const ALPN: &[u8] = b"iroh-example/echo/0";

let endpoint = Endpoint::bind().await?;

// Open a connection to the accepting endpoint
let conn = endpoint.connect(addr, ALPN).await?;

// Open a bidirectional QUIC stream
let (mut send, mut recv) = conn.open_bi().await?;

// Send some data to be echoed
send.write_all(b"Hello, world!").await?;
send.finish()?;

// Receive the echo
let response = recv.read_to_end(1000).await?;
assert_eq!(&response, b"Hello, world!");

// As the side receiving the last application data - say goodbye
conn.close(0u32.into(), b"bye!");

// Close the endpoint and all its connections
endpoint.close().await;

And on the accepting side:

let endpoint = Endpoint::bind().await?;

let router = Router::builder(endpoint)
    .accept(ALPN.to_vec(), Arc::new(Echo))
    .spawn()
    .await?;

// The protocol definition:
#[derive(Debug, Clone)]
struct Echo;

impl ProtocolHandler for Echo {
    async fn accept(&self, connection: Connection) -> Result<()> {
        let (mut send, mut recv) = connection.accept_bi().await?;

        // Echo any bytes received back directly.
        let bytes_sent = tokio::io::copy(&mut recv, &mut send).await?;

        send.finish()?;
        connection.closed().await;

        Ok(())
    }
}

The full example code with more comments can be found at echo.rs.

Or use one of the pre-existing protocols, e.g. iroh-blobs or iroh-gossip.

Other Languages

If you want to use iroh from other languages, make sure to check out iroh-ffi, the repository for FFI bindings.

Repository Structure

This repository contains a workspace of crates:

  • iroh: The core library for hole-punching & communicating with relays.
  • iroh-relay: The relay server implementation. This is the code we run in production (and you can, too!).
  • iroh-base: Common types like Hash, key types or RelayUrl.
  • iroh-dns-server: DNS server implementation powering the n0_discovery for EndpointIds, running at dns.iroh.link.
  • iroh-net-report: Analyzes your host's networking ability & NAT.

License

Copyright 2025 N0, INC.

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

S
Description
IP addresses break, dial keys instead. A library that adds QUIC + NAT Traversal to your apps.
Readme
435 MiB
Languages
Rust 99.6%
Shell 0.3%