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
commit151d0a71ac8aef450c90c243966fb64aa63a63c7 (patch)
treed6f05dde994f9edb14bc76ab4f3cec7bf533c57a /src
parent71254ad7a860579d1b544735719be92093d216f9 (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.