github n0-computer/iroh v0.96.0

12 hours ago

⚠️ Breaking Changes

removed

  • enum iroh::endpoint::AddEndpointAddrError
  • enum iroh::endpoint::GetMappingAddressError
  • mod iroh::net_report:
    • struct iroh::net_report::Metrics
    • enum iroh::net_report::Probe
    • struct iroh::net_report::RelayLatencies
    • struct iroh::net_report::Options
    • struct iroh::net_report::QuicConfig
  • enum iroh::endpoint::ConnectionType was removed, the closest equivalent is iroh::TransportAddr, which has variants Relay and Ip,- note: now that we can have multiple paths per connection, these types now describe paths not connections. Look at the iroh::endpoint::Connection::paths method and the iroh::endpoint::PathInfo struct for more details on how you can learn the type of the currently selected path.
  • enum iroh::endpoint::ControlMsg
  • enum iroh::endpoint::AuthenticationError
  • enum iroh::endpoint::AddEndpointAddrError
  • enum iroh::endpoint::DirectAddrInfo
  • enum iroh::endpoint::GetMappingAddressError
  • struct iroh::endpoint::CryptoServerConfig
  • struct iroh::endpoint::RetryError
  • struct iroh::endpoint::WeakConnectionHandle
  • fn iroh::endpoint::AuthenticationError::from(source: iroh_quinn_proto::connection::ConnectionError) -> Self
  • fn iroh::endpoint::Endpoint::conn_type(&self, endpoint_id: iroh_base::key::EndpointId) -> Option<n0_watcher::Direct<iroh::endpoint::ConnectionType>>
  • fn iroh::endpoint::Endpoint::latency(&self, endpoint_id: iroh_base::key::EndpointId) -> Option<core::time::Duration>
  • variant iroh::endpoint::AuthenticationErrro::ConnectionError
  • variant iroh::endpoint::ConnectWithOptsError::AddEndpointAddr
  • variant iroh::endpoint::Source::Saved

Changed

Connection Changes

  • struct iroh::endpoint::Connection now has a type parameter:
    • iroh::endpoint::Connection is aliased from Connection<HandshakeCompleted>
    • iroh::endpoint::IncomingZeroRttConnection is aliased from Connection<IncomingZeroRtt>
    • iroh::endpoint::IncomingZeroRttConnection is aliased from Connection<OutgoingZeroRtt>
  • fn iroh::endpoint::Incoming::accept_with(self, server_config: Arc<iroh_quinn_proto::config::ServerConfig>) -> Result<iroh::endpoint::Accepting, iroh_quinn_proto::connection::ConnectionError> changed to iroh::endpoint::Incoming::accept_with(self, server_config: Arc<iroh::endpoint::ServerConfig) -> Result<iroh::endpoint::Accepting, iroh::endpoint::ConnectionError>
  • fn iroh::endpoint::Incoming::retry(self) -> core::result::Result<(), iroh_quinn::incoming::RetryError> changed to iroh::endpoint::Incoming::retry(self) -> Result<(), iroh::endpoin::RetryError>
  • variant iroh::endpoint::ConnectWithOptsError::NoAddress: source iroh::endpoint::GetMappingAddressError changed to iroh::endpoint::ConnectWithOptsError::NoAddress: source iroh::discovery::DiscoveryError

Net Report

  • struct iroh::net_report::Report is now iroh::NetReport
  • const iroh::net_report::TIMEOUT is now iroh::NET_REPORT_TIMEOUT

Server & Transport Config

  • struct iroh::endpoint::ServerConfig, use the iroh::endpoint::Endpoint::create_server_config_builder to get a ServerConfigBuilder, which allows you to add custom configuration for when the endpoint acts as a server that accepts connections
  • struct iroh::endpoint::TransportConfig is now iroh::endpoint::QuicTransportConfig, use the iroh::endpoint::QuicTransportConfig::builder method to get a QuicTransportConfigBuilder to add custom configuration for the QUIC transport
  • fn iroh::endpoint::Builder::transport_config(self, transport_config: iroh_quinn_proto::config::transport::TransportConfig) -> Self changed to fn iroh::endpoint::Builder::transport_config(self, transport_config: iroh::endpoint::QuicTransportConfig) -> Self

Bind Address

  • iroh::endpoint::Builder::bind_addr_v4(self, addr: SocketAddrV4) was replaced by iroh::endpoint::Builder::bind_addr(self, addr: ToSocketAddr)-> Result<Self, InvalidSocketAddr>
  • iroh::endpoint::Builder::bind_addr_v6(self, addr: SocketAddrV6) was replaced by iroh::endpoint::Builder::bind_addr(self, addr: ToSocketAddr)-> Result<Self, InvalidSocketAddr>

Metrics

  • iroh::metrics::MagicsockMetrics has entirely new set of fields

Discovery → AddressLookup

  • module iroh::discovery renamed to iroh::address_lookup
  • trait iroh::discovery::Discovery renamed to iroh::address_lookup::AddressLookup
  • fn iroh::endpoint::Endpoint::discovery renamed to iroh::endpoint::Endpoint::address_lookup
  • fn iroh::endpoint::Builder::set_user_data_for_discovery renamed to iroh::endpoint::Builder::set_user_data_for_address_lookup
  • fn iroh::endpoint::Builder::discovery renamed to iroh::endpoint::Builder::address_lookup
  • struct iroh::discovery::MdnsDiscovery renamed to iroh::address_lookup::MdnsAddressLookup
  • struct iroh::discovery::DhtDiscovery renamed to iroh::address_lookup::DhtAddressLookup
  • struct iroh::discovery::StaticDiscovery renamed to iroh::address_lookup::MemoryLookup
  • trait iroh::discovery::DynIntoDiscovery renamed to iroh::address_lookup::DynIntoAddressLookup
  • trait iroh::discovery::IntoDiscovery renamed to iroh::address_lookup::IntoAddressLookup
  • struct iroh::discovery::DnsDiscovery renamed to iroh::address_lookup::DnsAddressLookup
  • enum iroh::discovery::DiscoveryError renamed to iroh::address_lookup::AddressLookupError
  • enum iroh::discovery::IntoDiscoveryError renamed to iroh::address_lookup::IntoAddressLookupError
  • struct iroh::discovery::DiscoveryItem renamed to iroh::address_lookup::AddressLookupItem
  • struct iroh::discovery::ConcurrentDiscovery renamed to iroh::address_lookup::ConcurrentAddressLookup
  • feature discovery-local-network renamed to address-lookup-mdns
  • feature discovery-pkarr-dht renamed to address-lookup-pkarr-dht

⛰️ Features

  • (example) Improve path stat printing in transfer example (#3860) - (c168e73)
  • (iroh) Introduce EndpointHooks (#3688) - (1efd2b5)
  • (iroh) Add fast-apple-datapath feature and enable it by default (#3724) - (a5f4a08)
  • (iroh) [breaking] Encapsulate the quinn::TransportConfig to enforce certain minimums when used with multipath (#3721) - (cc932ef)
  • (iroh) Improve shutdown handling - (bb3e94a)
  • (iroh) [breaking] Newtype ServerConfig and RetryError, organize the quinn re-exports (#3757) - (aa6b918)
  • (iroh) Implement latency based connection updates (#3797) - (5cb5716)
  • (iroh) Ping paths and trigger holepunching on networkchange (#3796) - (ff24cfc)
  • (iroh) [breaking] Allow multiple IP transports, including filtering by interface (#3692) - (2359acf)
  • (metrics) Add connection latency tracking (#3606) - (b7e5bb0)
  • (multipath) Add back basic metrics (#3672) - (faa2119)
  • (relay,dns) Add healthz routes (#3783) - (31a6b10)
  • Do not force relay URLs to be absolute (#3623) - (9bae228)
  • Add AcceptError::from_boxed (#3620) - (280cfc6)
  • Relay only configuration - (7f17d98)
  • Instead of duplicating the entire connection API, have a type parameter (#3619) - (5809a56)
  • Prune old, inactive paths (#3666) - (7fb80b9)
  • Qlog support in iroh - (2d9681c)
  • Expose known remote addrs (#3752) - (4c4f242)
  • Add must_use attributes to Router::spawn (#3772) - (0a9b7a0)
  • Improve RelayMap and RelayMode configuration (#3734) - (c0dacd0)
  • Basic holepunch metrics (#3748) - (37bda14)
  • Update to released iroh-quinn (#3834) - (e25c5da)

🐛 Bug Fixes

  • (ci) Better cli caching (#3779) - (94caac0)
  • (deps) Update to newest quinn main and fix api usage (#3802) - (8e9b5c0)
  • (docs) Fix link to EndpointTicket (#3814) - (ccf876e)
  • (iroh) Typo(s) (#3630) - (1cc5897)
  • (iroh) Clear EndpointStateActor::selected_path once the last connection closes (#3650) - (4b6824c)
  • (iroh) [breaking] Correct the error structure (#3663) - (dab9d5f)
  • (iroh) Only switch paths if the new path is actually better - (fbdf2c7)
  • (iroh) Accurately set RecvMeta::dst_ip, remove normalized_local_addr (#3770) - (692bb53)
  • (iroh) Ensure the selected holepunched path is set to PathStatus::Available (#3771) - (561d2fd)
  • (iroh) Retry holepunching - (a58aff4)
  • (iroh) Improve handling of no available transports - (5e79a56)
  • (iroh) Actually use user-provided bind addrs (#3835) - (fecc909)
  • (iroh) Properly set quinn paths to available when holepunched (#3864) - (a774841)
  • (iroh-bench) Gracefully close the quinn benchmark (#3621) - (0799d4f)
  • (iroh-dns-server) Inverted validation logic in DoH JSON response handler (#3737) - (2efbff6)
  • (multipath) Fix remote state actor termination (#3676) - (d328bf2)
  • (tests) Also run the tests in isolation in the default profile (#3664) - (13fe787)
  • Stop polling transports when the magicsock is closing (#3615) - (e101d26)
  • Update to main net-tools (#3726) - (1d6e453)
  • Update deny warnings (#3819) - (99242af)

🚜 Refactor

  • (deps) Remove rustls-pemfile (#3747) - (06772c3)
  • (example) Reduce timeouts and add close - (e750ccf)
  • (iroh) Simplify internal transports sending (#3708) - (8d56889)
  • (iroh) Avoid storing the TransportsSender (#3712) - (3f4d365)
  • (iroh) [breaking] Remove Endpoint::latency (#3717) - (783e2ef)
  • (iroh) [breaking] Make net-report private (#3758) - (5b616f0)
  • (iroh) Do not export quinn-proto encoding traits (#3803) - (f12467b)
  • (iroh) Spawn RemoteStateActor in JoinSet and remove guarded_channel.rs (#3681) - (37f69e0)
  • (iroh) [breaking] Improve BindError (#3837) - (acbca8c)
  • (iroh) [breaking] No longer fall back to a random free port when using endpoint::Builder::bind_addr with an unusable port (#3836) - (f2b6026)
  • (iroh) [breaking] Bind addrs with prefix len 0 are default routes (#3838) - (e0fcf7d)
  • (iroh) Remove mutexes from RemoteMap (#3841) - (99268b8)
  • (iroh) Move socket actor_sender out of shared socket state (#3890) - (a738ac7)
  • (iroh-dns-server) [breaking] Add storage path config and add tests for DNS-over-HTTPS (#3745) - (3bf1e24)
  • (multipath) Make registering connections with the magicsock async (#3629) - (e0f10ce)
  • (multipath) Stop inactive endpoint actors (#3643) - (25fe805)
  • (multipath) Rename EndpointMap/EndpointState to RemoteMap/RemoteState (#3673) - (34f52c6)
  • (multipath) Move discovery into EndpointStateActor (#3645) - (01545ee)
  • Improve path watching, add path stats (#3622) - (d1c1dab)
  • Minor cleanups in endpoint state (#3626) - (7887fb5)
  • Use Connection::on_closed in endpoint state actor (#3627) - (1d5937c)
  • Remove the TransportsSenderActor - (6380246)
  • Disallow certain Source variants to be constructed externally - (50fdda3)
  • Remove Endpoint::conn_type (#3647) - (2f924d9)
  • Use boxed watcher, not watchable, on connection (#3632) - (492b74e)
  • Remove Endpoint::path_selection (#3668) - (1a7a88b)
  • Prefer EndpointAddr::from_parts over EndpointAddr { ... } (#3662) - (25c2d4d)
  • Add Side re-export (#3739) - (136ff04)
  • Use qlog_from_env in iroh bench (#3743) - (3eff16d)
  • Adapt to new UnorderedRecvStream in iroh-quinn - (952b50e)
  • [breaking] Goodbye magic (#3887) - (2d8b2d4)

📚 Documentation

  • (endpoint::Builder) Clarify that clearing relay transport doesn't alter holepunching (#3833) - (52c4284)
  • (iroh) Improve builder docs about discovery (#3801) - (56fc0f7)
  • (iroh) Add detail & example to online method (#3722) - (94f8a83)
  • (iroh-relay) Add section on how to use as a library (#3715) - (40a5ce6)

⚡ Performance

🧪 Testing

  • (iroh) Fix test_two_devices_setup_teardown hanging (#3675) - (59a7e85)
  • (iroh) Fix test_active_relay_inactive test being flaky (#3680) - (160d535)
  • (iroh) Fix doctests for bind_addr to use port 0 (#3839) - (0dba0ff)
  • (iroh) Reduce flakyness of holepunching test (#3877) - (8ed8cfa)
  • Mark test_active_relay_inactive as non flaky - (e620b5e)
  • Reduce testing rounds in potentially slow tests (#3782) - (45a8b7d)
  • Improve timeouts for shutdown and reduce some more test rounds - (95dee08)

⚙️ Miscellaneous Tasks

Bench

  • Add ipv6 option and metrics feature - (147e6bb)

Deps

Example

  • Add qlog support to transfer example - (6bca5d0)
  • (iroh) In transfer example print stats independent of endpoint shutdown (#3872) - (5c4b9b4)
  • Improve transfer example (#3873) - (f4bfc9d)

Multipath

Don't miss a new iroh release

NewReleases is sending notifications on new releases.