1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! `SPEC.md` §5.1 tells consumers to read the framing bounds as `dig_nat::<NAME>`. This file uses
//! exactly those paths, so the SPEC's claim is compiled rather than merely asserted in prose.
//!
//! Before 0.13.0 two of them did not resolve: `MAX_FIRST_FRAME_CHUNK_LENS` was `pub` on `mux` but
//! never re-exported at the crate root, and `MAX_INCLUSION_PROOF_B64` existed only as a test-local
//! `const` — so the word GUARANTEED in the spec rested on a premise no consumer could read and no
//! encoder enforced (#1655).
use ;
/// The published values, read through the public paths `SPEC.md` documents. Pinning them here means a
/// change to any shared byte-identical wire constant cannot land as a silent edit — it has to come with
/// a deliberate change to the number a second implementation is required to match.
/// The resource ceiling is a bound on ONE allocation made from a peer-declared number, so the byte cost
/// at the ceiling is part of the published contract, not an implementation detail: 8 MB of `u64`.
///
/// Pinned rather than recomputed, because every raise of this number raises that allocation with it.
/// The sender's paging threshold must stay strictly inside the hard arithmetic ceiling: the gap is the
/// deliberate margin that keeps a paged prologue representable even as fixed fields are added.
///
/// Checked at COMPILE time, since both sides are constants — a run-time assertion over two `const`s
/// only fires for whoever runs the suite, while this one fails the build for whoever edits the number.
const _: = assert!;