uor_addr/ring/shapes/bounds.rs
1//! Ring-element grammar constants (UOR-Framework Amendment 43 §2).
2//!
3//! The `HostBounds` capacity profile is the shared
4//! [`crate::bounds::AddrBounds`]; only the format-specific grammar
5//! constants live here.
6
7/// Maximum Witt level admissible per Amendment 43 §2's tower (0..=3,
8/// inclusive). The Witt-level byte at canonical-bytes offset 0 must
9/// satisfy `witt_level ≤ MAX_WITT_LEVEL`.
10pub const MAX_WITT_LEVEL: u8 = 3;
11
12/// Maximum total byte width of a `RingElement`'s structurally-tagged
13/// serialization (Witt-level byte + up to four little-endian coefficient
14/// bytes — at most 5; the generous ceiling guards the fixed stack
15/// buffer).
16pub const RING_VALUE_MAX_BYTES: usize = 3968;