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
Per-key audit challenge.
FetchRequest
Request to fetch a specific record by key.
FreshReplicationOffer
Fresh replication offer (includes record + PoP).
GetCommitmentByPin
Request a retained commitment by its pin (commitment hash).
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.
SubtreeAuditChallenge
Gossip-triggered contiguous-subtree storage audit challenge (ADR-0002).
SubtreeSliceChallenge
Round 2 of the storage audit (ADR-0002 / V2-685): the surprise slice challenge.
SubtreeSliceOpening
A single block the round-2 slice challenge opens: which committed key, and which 1 KiB block within it.
VerificationRequest
Batched verification request for multiple keys (Section 9).
VerificationResponse
Batched verification response with per-key results.

Enums§

AuditResponse
Response to a per-key audit challenge.
FetchResponse
Response to a fetch request.
FreshReplicationResponse
Response to a fresh replication offer.
GetCommitmentByPinResponse
Response to GetCommitmentByPin.
RejectKind
Why a responder rejected an audit challenge, in a form the auditor can act on without string-matching.
ReplicationMessageBody
All replication protocol message types.
ReplicationProtocolError
Errors from replication protocol encode/decode operations.
SubtreeAuditResponse
Response to a contiguous-subtree storage audit challenge (ADR-0002).
SubtreeSliceItem
One opened block in a SubtreeSliceResponse.
SubtreeSliceResponse
Response to a SubtreeSliceChallenge (round 2).

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).