Expand description
Tier 1 structural validation (SVL-*): cheap, pure checks on headers and block bodies before CLVM or state.
Normative: structural_validation NORMATIVE / SPEC §5 (validation pipeline).
§Module layout
Most checks are implemented as methods on the types they inspect so call sites read naturally
(header.validate(), block.validate_structure(), …). This file holds module-level documentation
and may later host shared helpers (for example constants-only predicates) that are not tied to a
single type.
| ID | Responsibility | Primary API |
|---|---|---|
| SVL-001 | Header version vs height / DFSP activation | crate::L2BlockHeader::validate, crate::L2BlockHeader::validate_with_dfsp_activation |
| SVL-002 | DFSP roots empty before activation height | crate::L2BlockHeader::validate_with_dfsp_activation (chained from crate::L2BlockHeader::validate) |
| SVL-003 | Declared total_cost / block_size vs protocol caps | crate::L2BlockHeader::validate_with_dfsp_activation (chained from crate::L2BlockHeader::validate) |
| SVL-004 | Header timestamp vs now + MAX_FUTURE_TIMESTAMP_SECONDS | crate::L2BlockHeader::validate_with_dfsp_activation_at_unix (tests), same pipeline in crate::L2BlockHeader::validate |
| SVL-004 | timestamp vs now + MAX_FUTURE_TIMESTAMP_SECONDS | crate::L2BlockHeader::validate_with_dfsp_activation, crate::L2BlockHeader::validate_with_dfsp_activation_at_unix |
| SVL-005 | Header/body count fields agree | crate::L2Block::validate_structure |
| SVL-006 | Merkle roots, duplicate/double-spend, slash caps, filter, bincode size | crate::L2Block::validate_structure |
Rationale: Keeping SVL-001 on crate::L2BlockHeader reuses the existing
BLK-007 helpers [L2BlockHeader::protocol_version_for_height_with_activation] and
[L2BlockHeader::protocol_version_for_height], avoiding a second copy of the fork rule.