ZeroCopyZeroCopy

Delivery format

Read the little-endian Solana shred headers, data flags and payload offsets used by the UDP datagrams delivered to your receivers.

Each UDP datagram contains one raw Solana shred, byte for byte as the leader signed it. A datagram is at most 1,228 bytes. Delivery includes only chained Merkle data and coding shreds for the cluster's current shred version. Legacy and unchained shreds are not delivered.

Shreds are not signature-verified before delivery. Verify the leader's signature in your receiver before accepting a shred. See processing the stream.

Common header

Offsets and sizes are in bytes, measured from the start of the datagram. Multi-byte integer fields use little-endian encoding. The signature is a byte sequence. The common header occupies 83 bytes.

FieldOffsetSizeMeaning
signature064Leader signature.
shred_variant641Shred type and Merkle variant.
slot658Slot containing the shred.
index734Shred index within its type in the slot.
version772Shred version.
fec_set_index794Identifier of the FEC set within the slot.

Data shred header

The data header follows the common header. Data payload starts at byte 88.

FieldOffsetSize
parent_offset832
flags851
size862

The data flags byte uses Agave's values:

ValueMeaning
0x40Data complete: the shred ends a batch of entries.
0xc0Last in slot: set with data complete on the slot's last data shred. Test (flags & 0xc0) == 0xc0.

The low six bits hold the reference tick.

These flags describe shred data. They do not establish execution or commitment.

Coding shred header

The coding header follows the common header. Coding payload starts at byte 89.

FieldOffsetSize
num_data_shreds832
num_coding_shreds852
position872

Use these fields with slot and fec_set_index to collect each FEC set and recover missing data shreds. Then decode entries and transactions with a decoder for the Merkle shred format. Reading the common header alone does not decode a block.

Transport

The stream uses plain UDP with no ordering, retransmission or authentication. Source addresses are supplied at setup; allowlist them. Handle duplicates and missing shreds as described in processing the stream.

On this page