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
commitbf88eb98173758691b3e8cea65a6ab8a90d5ca65 (patch)
tree6369b9ae6dbc5736fadf7a614092d947a4b6e84e /src
parent1f39bf244b8572746a1c65b75d24b132627d6d05 (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.