Skip to main content

Module mesh_chain

Module mesh_chain 

Source
Expand description

Chain replication protocol for mesh networking (K6.4).

Defines request/response types for incremental chain synchronization between mesh nodes. Chain events are exchanged as serialized JSON (with optional RVF segment format for efficiency).

Structs§

ChainBridgeEvent
Bridge event anchoring a remote chain’s head in the local chain.
ChainSyncRequest
Request to sync chain events from a peer.
ChainSyncResponse
Response with chain events for sync.
SyncFrame
Sync frame header (wraps RVF segment payloads).
SyncStateDigest
Compact state digest for sync stream initialization.

Enums§

ChainForkStatus
Fork detection result.
ChainSyncStrategy
Strategy for catching up a behind peer.
SyncPayloadType
Payload type within a sync frame.
SyncStreamType
Discriminator for QUIC sync streams.

Constants§

CHECKPOINT_CATCHUP_THRESHOLD
Threshold for switching from event-by-event to checkpoint sync.

Functions§

detect_chain_fork
Compare local and remote chain state to detect sync needs.
stream_priority
QUIC stream priority per SyncStreamType (lower = higher priority).
sync_strategy
Determine sync strategy based on how far behind the peer is.