Skip to main content

Module structural

Module structural 

Source
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.

IDResponsibilityPrimary API
SVL-001Header version vs height / DFSP activationcrate::L2BlockHeader::validate, crate::L2BlockHeader::validate_with_dfsp_activation
SVL-002DFSP roots empty before activation heightcrate::L2BlockHeader::validate_with_dfsp_activation (chained from crate::L2BlockHeader::validate)
SVL-003Declared total_cost / block_size vs protocol capscrate::L2BlockHeader::validate_with_dfsp_activation (chained from crate::L2BlockHeader::validate)
SVL-004Header timestamp vs now + MAX_FUTURE_TIMESTAMP_SECONDScrate::L2BlockHeader::validate_with_dfsp_activation_at_unix (tests), same pipeline in crate::L2BlockHeader::validate
SVL-004timestamp vs now + MAX_FUTURE_TIMESTAMP_SECONDScrate::L2BlockHeader::validate_with_dfsp_activation, crate::L2BlockHeader::validate_with_dfsp_activation_at_unix
SVL-005Header/body count fields agreecrate::L2Block::validate_structure
SVL-006Merkle roots, duplicate/double-spend, slash caps, filter, bincode sizecrate::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.