Skip to main content

Module protocol

Module protocol 

Source
Expand description

Wire protocol messages for the replication subsystem.

All messages use postcard serialization for compact, fast encoding. Peer IDs are transmitted as raw [u8; 32] byte arrays.

Re-exports§

pub use super::config::MAX_REPLICATION_MESSAGE_SIZE;

Structs§

AuditChallenge
Storage audit challenge (Section 15).
FetchRequest
Request to fetch a specific record by key.
FreshReplicationOffer
Fresh replication offer (includes record + PoP).
KeyVerificationResult
Per-key verification result from a peer.
NeighborSyncRequest
Neighbor sync request carrying hint sets (Section 6.2).
NeighborSyncResponse
Neighbor sync response carrying own hint sets.
PaidNotify
Paid-list notification carrying key + PoP (Section 7.3).
ReplicationMessage
Top-level replication message envelope.
VerificationRequest
Batched verification request for multiple keys (Section 9).
VerificationResponse
Batched verification response with per-key results.

Enums§

AuditResponse
Response to audit challenge.
FetchResponse
Response to a fetch request.
FreshReplicationResponse
Response to a fresh replication offer.
ReplicationMessageBody
All replication protocol message types.
ReplicationProtocolError
Errors from replication protocol encode/decode operations.

Constants§

ABSENT_KEY_DIGEST
Sentinel digest value indicating the challenged key is absent from storage.

Functions§

compute_audit_digest
Compute AuditKeyDigest(K_i) = BLAKE3(nonce || challenged_peer_id || K_i || record_bytes_i).