pub fn normalize_and_validate_canonical_sequence<N: Network>(
state: &CanonicalSequenceState,
batch: &ReactiveInputBatch<N>,
) -> Result<CanonicalSequenceValidation, ReactiveError>Expand description
Validate a composite-source envelope and normalize harmless coverage overlap.
This has the same fail-closed rollback/finality/identity contract as
validate_canonical_sequence. In addition, an equal or older
ChainControl::CanonicalProgress whose exact compatible identity is
retained is omitted from CanonicalSequenceValidation::normalized_chain_controls.
A compatible stale blockful ChainControl::Barrier is retained with the
same opaque id and block: None, preserving the synchronization event
without forwarding regressive coverage. An equal-height control that fills
absent parent/timestamp metadata is retained and applied. Older compatible
metadata enrichment is deliberately dropped together with its non-forwarded
control so the returned state remains identical to what the runtime will
observe. Unknown or conflicting stale identities remain errors.
ยงErrors
Returns ReactiveError::InvalidInputRecord for malformed or conflicting
record identity/payload metadata, and
ReactiveError::InvalidChainControl when canonical overlap cannot be
proven redundant or when rollback, adjacency, identity, coverage, or
finality validation fails.