Skip to main content

IROH_MAX_RESPONSE_BYTES

Constant IROH_MAX_RESPONSE_BYTES 

Source
const IROH_MAX_RESPONSE_BYTES: usize = _; // 1_440_000_000usize
Expand description

The maximum number of bytes we are willing to buffer when reading an API response from an iroh QUIC stream. This must be large enough to accommodate the largest possible signed session outcome. A session can contain up to broadcast_rounds_per_session (default 3600) rounds, each peer produces one unit per round, and each unit can be up to ALEPH_BFT_UNIT_BYTE_LIMIT bytes. The response is JSON-serialized which hex-encodes the consensus bytes, roughly doubling the size. We use 2x the raw max as a conservative upper bound. For a 4-peer federation this is ~1.44 GB.