Skip to main content

Module ant_protocol

Module ant_protocol 

Source
Expand description

Wire protocol re-exports from the ant_protocol crate.

This module existed as first-party ant-node code until version 0.11. The wire contract now lives in the ant_protocol crate so ant-client and ant-node can evolve their release cycles independently. Everything this module previously exported is re-exported below verbatim, including the chunk submodule path so downstream callers of ant_node::ant_protocol::chunk::* keep working.

Internal ant-node code can keep using crate::ant_protocol::…; the imports resolve to the same types they always did. New code should prefer ant_protocol::… directly.

Modules§

chunk
Chunk message types for the ANT protocol.

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.
CLOSE_GROUP_MAJORITY
Minimum number of close group members that must agree for a decision to be valid.
CLOSE_GROUP_SIZE
Number of nodes in a Kademlia close group.
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.
XORNAME_LEN
Byte length of an XorName.

Type Aliases§

XorName
Content-addressed identifier (32 bytes).