Skip to main content

Crate hns_light_sync

Crate hns_light_sync 

Source
Expand description

Bounded multi-peer Handshake light-header synchronization.

A round requests the same locator from a bounded peer set, validates every response independently on a clone of the current chain, chooses the greatest-chainwork result, and requires configurable peer agreement. Equal-work divergent tips fail closed. Durable checkpoints and deep reorg recovery remain storage-adapter responsibilities.

Structs§

HeaderRoundOutcome
Completed agreement round plus the exact newly accepted header batch.
HeaderRoundRequest
Request shared by every peer selected for one round.
HeaderSync
Bounded multi-peer header synchronizer.
PeerId
Opaque peer identity; debug output never reveals it.
PeerStatus
Name-free per-peer synchronization status.
SyncConfig
Header synchronization policy.
SyncStatus
Immutable synchronization summary.

Enums§

SyncError
Header synchronization configuration, round, peer, or consensus failure.
SyncState
Header authority synchronization state.

Constants§

DEFAULT_MAX_PEERS
Default maximum simultaneously tracked peers.
DEFAULT_MAX_PEER_FAILURES
Default invalid-round failures before a peer is locally banned.
DEFAULT_MINIMUM_PEER_AGREEMENT
Default minimum matching valid responses.
DEFAULT_ROUND_TIMEOUT_SECONDS
Default header round deadline.