Skip to main content

MANAGED_DOWNLOAD_MAX_BYTES

Constant MANAGED_DOWNLOAD_MAX_BYTES 

Source
const MANAGED_DOWNLOAD_MAX_BYTES: u64 = _; // 1_073_741_824u64
Expand description

Upper bound on a managed zcashd archive download, in bytes.

The SHA256 pin only detects bad content after the whole body is written, so without a cap a compromised or malfunctioning endpoint (for example one that omits Content-Length and streams indefinitely) could fill Zebra’s state filesystem before verification runs and take the node down. Pinned release archives are far smaller than this; the bound exists only to fail fast on a runaway transfer.