Skip to main content

CHUNK_SIZE

Constant CHUNK_SIZE 

Source
pub const CHUNK_SIZE: usize = _; // 40_960usize
Expand description

Bytes per chunk on the wire. A FileChunk is base64-encoded inside a JSON envelope, so the raw chunk must leave room for ~34% base64 expansion plus the envelope and still fit under gossipsub’s transmit limit. 40 KiB raw → ~55 KiB on the wire, comfortably under even the 64 KiB gossipsub default (and well under the 256 KiB ceiling huddle sets explicitly — see network::start_network_with).