Module protocol

Source
Expand description

Network protocol definitions for syncing a commonware_storage::adb::any::Any database.

This module defines the network protocol used for syncing a commonware_storage::adb::any::Any database to a server’s database state. It includes message types, error handling, and validation logic for safe network communication.

The protocol supports:

  • Getting server metadata (database size, target hash, operation bounds)
  • Fetching operations with cryptographic proofs
  • Error handling

Structs§

ErrorResponse
Error response.
GetOperationsRequest
Request for operations from the server.
GetOperationsResponse
Response with operations and proof.
GetServerMetadataResponse
Response with server metadata.

Enums§

ErrorCode
Error codes for protocol errors.
Message
Network protocol messages for syncing a commonware_storage::adb::any::Any database.
ProtocolError
Errors that can occur during protocol operations.

Constants§

MAX_MESSAGE_SIZE
Maximum message size in bytes (10MB).