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). - GetCommitment
ByPin - Request a retained commitment by its pin (commitment hash).
- 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). - Pointer
Fetch Request - Ask a peer for the pointer record it holds at an address.
- Pointer
Fetch Response - Response to
PointerFetchRequest. - Pointer
Fresh Offer - A newly paid pointer state, with the proof that paid for it.
- Pointer
Hints - The pointer states the sender holds that the receiver should hold too.
- Pointer
State Request - Ask a peer which state it holds at each of some addresses.
- Pointer
State Response - Response to
PointerStateRequest. - Pointer
State Summary - A pointer state, as a hint or as an answer about what a node holds.
- Replication
Message - Top-level replication message envelope.
- Subtree
Audit Challenge - Gossip-triggered contiguous-subtree storage audit challenge (ADR-0002).
- Subtree
Slice Challenge - Round 2 of the storage audit (ADR-0002 / V2-685): the surprise slice challenge.
- Subtree
Slice Opening - A single block the round-2 slice challenge opens: which committed key, and which 1 KiB block within it.
- 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.
- GetCommitment
ByPin Response - Response to
GetCommitmentByPin. - 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
Slice Item - One opened block in a
SubtreeSliceResponse. - Subtree
Slice Response - Response to a
SubtreeSliceChallenge(round 2).
Constants§
- ABSENT_
KEY_ DIGEST - Sentinel digest value indicating the challenged key is absent from storage.
- MAX_
POINTER_ HINTS_ PER_ MESSAGE - Most hints one
PointerHintsmessage carries. A sender with more splits them across messages; a receiver ignores anything past this in one message. - MAX_
POINTER_ RECORDS_ PER_ ITEM - Most records one
SubtreeSliceItem::PointerRecordmay carry: the one held now and the one it replaced. - MAX_
POINTER_ STATE_ REQUEST_ ADDRESSES - Most addresses one
PointerStateRequestasks about. A responder answers only this many, and the requester treats the rest as unanswered.
Functions§
- compute_
audit_ digest - Compute
AuditKeyDigest(K_i) = BLAKE3(nonce || challenged_peer_id || K_i || record_bytes_i).