tunnel: expire handled tunnels after TUNNEL_TIMEOUT as Python does

This commit is contained in:
DeFiDude committed 2026-10-25 03:18:33 -06:00
1 parent 1801cf291a
commit fbbc311192
6 files changed
+38 -31

No files matched your search

+8 -2
View File
@@ -53,13 +53,19 @@ is gone.
`TunnelSynthesisData::unpack` accepts exactly 176 bytes. Announces join the
tunnel named by their interface's latest synthesis, which `handle_tunnel` and
`TunnelTable::insert` record and `TunnelTable::void_interface` clears; writing
`interface_id` directly no longer rebinds an interface.
`interface_id` directly no longer rebinds an interface. `handle_tunnel` no
longer takes a timeout: a tunnel expires `TUNNEL_TIMEOUT` after its synthesis,
as in Python. `TunnelTable::cull_expired` and `cull_expired_batch` also drop
tunnels set to expire more than twice `TUNNEL_TIMEOUT` ahead.
`TcpClientConfig`, `BackboneClientConfig` and `I2PClientConfig` gain
`tunnel_identity`. With a `TunnelIdentity` set, the client opens every
connection with a tunnel synthesis signed by it; the runtime sets it from
`ReticulumHandle::transport_identity`. Build these configs with `new` so the
field defaults to `None`.
field defaults to `None`. A KISS-framed TCP client never synthesizes. Every
TCP, Backbone and I2P client, the shared-instance TCP client included, drops
its queued traffic when a connection opens after an outage or a failed
attempt, and the Unix shared-instance client drops it when it reconnects.
Interface stats carry Python 1.5's per-interface counters.
`IngressController` counts announces and path requests received and sent;
+1 -1
View File
@@ -1887,7 +1887,7 @@ pub fn rns_transport::tunnel::TunnelTable::void_interface(&mut self, rns_transpo
impl core::default::Default for rns_transport::tunnel::TunnelTable
pub fn rns_transport::tunnel::TunnelTable::default() -> Self
pub fn rns_transport::tunnel::build_tunnel_synthesis_packet(&rns_identity::identity::Identity, [u8; 32]) -> core::option::Option<alloc::vec::Vec<u8>>
pub fn rns_transport::tunnel::handle_tunnel(&mut rns_transport::tunnel::TunnelTable, [u8; 32], rns_transport::messages::InterfaceId, f64)
pub fn rns_transport::tunnel::handle_tunnel(&mut rns_transport::tunnel::TunnelTable, [u8; 32], rns_transport::messages::InterfaceId)
pub fn rns_transport::tunnel::interface_hash(&str) -> [u8; 32]
pub enum rns_transport::InterfaceCapacityError
pub rns_transport::InterfaceCapacityError::Empty
+2 -1
View File
@@ -52,7 +52,7 @@
"compatibility": "reviewed-snapshot",
"snapshot": "api/snapshots/rns-transport.txt",
"itemCount": 1944,
"sha256": "17482aaa9841b518a977d549534c7328ca73aec60e6dc1b977d6e54c246c1cb7"
"sha256": "cc186fce5185f4b3a3a71f4629ac59b609538be81fa7e8948c74382e25b2820f"
},
{
"name": "rns-link",
@@ -114,6 +114,7 @@
"migrationGuide": "api/migrations/1.4.md",
"removed": {
"rns-transport": [
"pub fn rns_transport::tunnel::handle_tunnel(&mut rns_transport::tunnel::TunnelTable, [u8; 32], rns_transport::messages::InterfaceId, f64)",
"pub rns_transport::actor::DiscoveryPathRequest::requesting_interface: rns_transport::messages::InterfaceId",
"pub rns_transport::actor::DiscoveryPathRequest::timeout: f64",
"pub rns_transport::actor::TransportActor::discovery_path_requests: std::collections::hash::map::HashMap<[u8; 16], rns_transport::actor::DiscoveryPathRequest>",