MESSAGE-FORMATTING

FieldValue
NameMessage Formatting
Slug89
Statusraw
CategoryStandards Track
EditorMarcin Pawlowski
ContributorsYoungjoon Lee [email protected], Alexander Mozeika [email protected], Álvaro Castro-Castilla [email protected], Filip Dimitrijevic [email protected]

Timeline

  • 2026-05-28d45eed2 — Chore: mirror blochain specs into github/mdbook (#347)

Revision History

VersionChangesDate
1.0.0Initial revision.2026-04-09

Introduction

This document defines an implementation-friendly specification of the Message Formatting, which is introduced in the Formatting section.

In this document we are reusing notation from Notation.

Overview

The message contains a header and a payload. The header informs the protocol about the version of the protocol and the payload type. The message contains a drop or a non-drop payload. The length of a payload is fixed to prevent adversaries from distinguishing types of messages based on their length.

Construction

Message

The Message is a structure that contains a public_header, private_header and a payload.

class Message:
      public_header: PublicHeader,
      private_header: Private_Header,
      payload: bytes

Public Header

The public_header must be generated as the outcome of the [1.0.0] Message Encapsulation Mechanism.

The public_header is defined as follows:

class PublicHeader:
        version: byte,
      public_key: PublicKey,
      proof_of_quota: ProofOfQuota,
      signature: Signature

Where:

  • version=0x01 is version of the protocol.
  • public_key is , a public key from the set as defined in the Message Encapsulation spec.
  • proof_of_quota is , a corresponding proof of quota for the key from the it also contains the key nullifier.
  • signature is , a signature of the concatenation of the -th encapsulation of the payload and the private header , that can be verified by the public key .

Private Header

The private_header must be generated as the outcome of the [1.0.0] Message Encapsulation Mechanism.

The private header contains a set of encrypted blending headers .

private_header: list[BlendingHeader]

The size of the set is limited to BlendingHeader entries, as defined in the Global Parameters.

The BlendingHeader () is defined as follows:

class BlendingHeader:
      public_key: PublicKey,
      proof_of_quota: ProofOfQuota,
      signature: Signature,
      proof_of_selection: ProofOfSelection
      is_last: byte

Where:

  • public_key is , a public key from the set .
  • proof_of_quota is , a corresponding proof of quota for the key from the it also contains the key nullifier.
  • signature is , a signature of the concatenation of -th encapsulation of the payload and the private header , that can be verified by public key .
  • proof_of_selection is , a proof of selection of the node index assuming valid proof of quota .
  • is_last is , a flag that indicates that this is the last encapsulation.

Payload

The payload must be formatted according to the [1.0.0] Payload Formatting. The formatted payload must be generated as the outcome of the [1.0.0] Message Encapsulation Mechanism.

Maximum Payload Length

The Max_Payload_Length parameter defines the maximum length of the payload, which for version 1 of the Blend Protocol is fixed as Max_Payload_Length=34003. That is, 34kB for the payload body (Max_Body_Length) and 3 bytes for the payload header. More information about payload formatting can be found in [1.0.0] Payload Formatting.