aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-01 20:55:10 +0100
committertv <tv@krebsco.de>2026-11-01 20:55:10 +0100
commit9b6fa949eb8bc137f76faff2dfda495ad1d4305f (patch)
tree2a302fa0d15066f074c7cde56fd241ba9a0f0364 /src
parent03055343b9731cc6c1e7b2b697a9e27b6078974b (diff)
tor: read max sync message
Diffstat (limited to 'src')
-rw-r--r--src/transport/tor.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/transport/tor.rs b/src/transport/tor.rs
index b091abb..26dab14 100644
--- a/src/transport/tor.rs
+++ b/src/transport/tor.rs
@@ -65,9 +65,11 @@ pub(crate) const SCHEME: &str = "tor";
/// The onion service's nickname in arti's state (one per node).
const NICKNAME: &str = "continuum";
-/// The largest message read. Sync messages above 16 chunks travel as blobs, and a chunk
-/// is at most 4 MiB.
-const MAX_MESSAGE: usize = 8 << 20;
+/// The largest message read and sent: the largest sync message a node of any
+/// configuration sends whole (`MAX_SYNC_MESSAGE`: 16 chunks of 4 MiB; larger ones travel
+/// as blobs), with room for its envelope. Over Tor at `MIN_RATE` that is a quarter of an
+/// hour, which is the transport's delivery limit then.
+const MAX_MESSAGE: usize = crate::swarm::blob::MAX_SYNC_MESSAGE + (1 << 20);
/// How long reaching an onion service may take (building circuits, the rendezvous).
const CONNECT_TIMEOUT: Duration = Duration::from_secs(60);
/// How long the challenge handshake may take, a few round trips.