Expand description
weirdnet-sync/v1 messages and length-prefixed CBOR framing.
After the authenticated channel is up, payloads that carry records, cursors or
certificates are sealed under crate::sync_key. An Envelope carries the type and
epoch in the clear so the receiver can pick the key; the body is sealed.
Structs§
- Ack
- Envelope
- What goes on the request-response wire: type and epoch in the clear, body sealed.
- Hello
- HelloOk
- Page
- Pull
- Refuse
- Roster
Msg
Enums§
- Message
- Application-level message, before sealing.
Constants§
- PAGE_
MAX - Largest sealed page (and the reply cap to set on a sync node). Still under weirdnet-net’s 8 MiB default.
- PROTOCOL
- Request-response protocol id, same style as
/weirdnet/link/1.
Statics§
- SYNC_
PROFILE - Identifier profile:
/weirdnet/sync/1for request-response, otherwiseWEIRDNET.
Functions§
- decode
- decode_
framed - encode
- Length-prefixed CBOR (u32 big-endian length, then the item). For a raw stream;
Node::requestalready framesEnvelopeas CBOR through libp2p. - encode_
framed - page_
for_ type - Build a
Pagemessage from a log page, dropping ops whose typ does not match (they stay in the log for a later pull of that type).
Type Aliases§
- Cursors
- Last seq applied from each node, as sent in Hello.
- Refuse
Reason