Skip to main content

Module chunk

Module chunk 

Source
Expand description

Chunk message types for the ANT protocol.

Chunks are immutable, content-addressed data blocks where the address is the BLAKE3 hash of the content. Maximum size is 4MB.

This module defines the wire protocol messages for chunk operations using postcard serialization for compact, fast encoding.

Structs§

ChunkGetRequest
Request to retrieve a chunk.
ChunkMessage
Wire-format wrapper that pairs a sender-assigned request_id with a ChunkMessageBody.
ChunkPutRequest
Request to store a chunk.
ChunkQuoteRequest
Request a storage quote for a chunk.
MerkleCandidateQuoteRequest
Request a merkle candidate quote for batch payments.

Enums§

ChunkGetResponse
Response to a GET request.
ChunkMessageBody
Enum of all chunk protocol message types.
ChunkPutResponse
Response to a PUT request.
ChunkQuoteResponse
Response with a storage quote.
MerkleCandidateQuoteResponse
Response with a merkle candidate quote.
ProtocolError
Errors that can occur during protocol operations.

Constants§

CHUNK_PROTOCOL_ID
Protocol identifier for chunk operations.
DATA_TYPE_CHUNK
Data type identifier for chunks.
MAX_CHUNK_SIZE
Maximum chunk size in bytes (4MB).
MAX_WIRE_MESSAGE_SIZE
Maximum wire message size in bytes (5MB).
PROOF_TAG_MERKLE
Version byte prefix for merkle payment proofs.
PROOF_TAG_SINGLE_NODE
Version byte prefix for payment proof serialization. Allows the verifier to detect proof type before deserialization.
PROTOCOL_VERSION
Current protocol version.

Type Aliases§

XorName
Content-addressed identifier (32 bytes).