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§
- Audit
Challenge - Per-key audit challenge.
- Fetch
Request - Request to fetch a specific record by key.
- Fresh
Replication Offer - Fresh replication offer (includes record +
PoP). - KeyVerification
Result - Per-key verification result from a peer.
- Neighbor
Sync Request - Neighbor sync request carrying hint sets (Section 6.2).
- Neighbor
Sync Response - Neighbor sync response carrying own hint sets.
- Paid
Notify - Paid-list notification carrying key +
PoP(Section 7.3). - Replication
Message - Top-level replication message envelope.
- Subtree
Audit Challenge - Gossip-triggered contiguous-subtree storage audit challenge (ADR-0002).
- Subtree
Byte Challenge - Round 2 of the storage audit (ADR-0002): the surprise byte challenge.
- Verification
Request - Batched verification request for multiple keys (Section 9).
- Verification
Response - Batched verification response with per-key results.
Enums§
- Audit
Response - Response to a per-key audit challenge.
- Fetch
Response - Response to a fetch request.
- Fresh
Replication Response - Response to a fresh replication offer.
- Reject
Kind - Why a responder rejected an audit challenge, in a form the auditor can act on without string-matching.
- Replication
Message Body - All replication protocol message types.
- Replication
Protocol Error - Errors from replication protocol encode/decode operations.
- Subtree
Audit Response - Response to a contiguous-subtree storage audit challenge (ADR-0002).
- Subtree
Byte Item - One requested chunk in a
SubtreeByteResponse. - Subtree
Byte Response - Response to a
SubtreeByteChallenge(round 2). One item per requested key, in the requested order.
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).