diff options
Diffstat (limited to 'src/transport')
| -rw-r--r-- | src/transport/tor.rs | 8 |
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. |
