Expand description
Protocol-wide limits and sentinel values for the DIG L2 block format.
Requirement: BLK-005 / NORMATIVE § BLK-005 / SPEC §2.11 (protocol constants).
Rationale: Centralizing these values avoids magic numbers in validation (crate::validation),
builders (crate::builder), and hashing (crate::hash). Limits are chosen to bound worst-case
block work (cost, size) and slash-proposal abuse while staying aligned with mainnet-style CLVM budgets.
Types: Numeric limits use the widths required by BLK-005 (u32 for byte/count caps, u64 for
height/timestamp fields). Cost and Bytes32 are defined in crate::primitives (BLK-006).
Constants§
- DFSP_
ACTIVATION_ HEIGHT - Block height at which DFSP (decentralized fraud/slashing protocol) features activate.
- EMPTY_
ROOT - Digest of the empty byte string, i.e. SHA-256 of
"". - HASH_
LEAF_ PREFIX - Domain-separation prefix for Merkle leaf nodes (0x01).
- HASH_
TREE_ PREFIX - Domain-separation prefix for Merkle internal nodes (0x02).
- MAX_
BLOCK_ SIZE - Maximum serialized block size in bytes (10 MiB).
- MAX_
COST_ PER_ BLOCK - CLVM execution budget allowed in a single block.
- MAX_
FUTURE_ TIMESTAMP_ SECONDS - Maximum allowed block timestamp skew into the future (seconds).
- MAX_
SLASH_ PROPOSALS_ PER_ BLOCK - Upper bound on slash-proposal payloads included in one block.
- MAX_
SLASH_ PROPOSAL_ PAYLOAD_ BYTES - Maximum size of a single slash-proposal payload in bytes (64 KiB).
- ZERO_
HASH - 32 zero bytes — a distinct sentinel from
EMPTY_ROOT.