Module validation

Module validation 

Source
Expand description

Content validation utilities for CHIE Protocol.

This module provides comprehensive validation functions for content, chunks, proofs, and other protocol elements.

Structs§

ContentLimits
Content size limits.

Enums§

ContentValidationError
Content validation errors.

Functions§

calculate_expected_chunks
Calculate expected number of chunks for content.
sanitize_cid
Sanitize content ID (CID) for safe filesystem usage.
validate_bandwidth
Validate bandwidth calculation is reasonable.
validate_chunk_index
Validate chunk index is within bounds.
validate_content_size
Validate content size against limits.
validate_proof_structure
Validate bandwidth proof structure.
validate_request_timestamp
Validate chunk request timestamp is within acceptable window.
validate_response_signature
Validate chunk response has proper signature length.