Skip to content
Back
Reference

Shred stream data dictionary

Define every network observation, common header, data header, coding header, Merkle element, recovery key, entry, and transaction field used in a raw shred pipeline.

Representation layers

LayerStructureDelivered directlyPurpose
NetworkIPv4 and UDP observationYes, as packet metadataRoute and admit one datagram
Service verificationVerification datagramDuring activationProve control of a destination
Solana transportShredYes, as UDP payloadCarry data or recovery material
RecoveryFEC-set stateNo, receiver-derivedReconstruct missing data shreds
LedgerEntry streamNo, receiver-derivedRestore Proof of History batches
TransactionVersioned transactionNo, receiver-derivedDecode signed messages and instructions
ExecutionStatus, logs, balances, account writesNoProduced later by replay or RPC

There is no documented shredstream.sh wrapper around the raw shred. Offset zero of the live UDP payload is offset zero of the Solana shred.

Network observation fields

FieldTypeSourceMeaningRequired handling
source_ipIPv4 addressIP headerSender addressMust equal 64.130.40.90 for documented service traffic
source_portUnsigned 16-bit portUDP headerSender portValue and stability are not currently specified
destination_ipIPv4 addressIP header or socket contextRegistered customer addressCompare with the configured interface or NAT path
destination_portUnsigned 16-bit portUDP header or socket bindingRegistered customer portBind and firewall the configured value
received_lengthByte countReceive APIActual UDP payload lengthReject truncation and values above 1,228
receive_timestampClock-specific timestampNIC, kernel, or applicationObservation time at a named boundaryRecord clock and timestamp type
interface_indexInterface identifierPacket metadata or captureIngress interfaceUseful on multihomed receivers
rx_queueQueue identifierNIC or socket metadataHardware or software receive queueUse for affinity and drop diagnosis
ancillary_flagsBit setReceive APITruncation and control-message stateReject MSG_TRUNC and count MSG_CTRUNC

source_ip, source_port, destination_ip, destination_port, timestamps, interface index, and queue are not bytes inside the shred payload.

Verification datagram

FieldTypeDocumented value or rule
first_lineASCII textSHRED-FANOUT-VERIFY/1
valid_forDuration600 seconds
source_ipIPv4 address64.130.40.90
transportProtocolUDP
remaining payload formatByte sequencenot currently specified
token encodingEncodingnot currently specified
destination identifier encodingEncodingnot currently specified

Parse the documented prefix and treat the remaining bytes as an opaque challenge unless a separate current interface defines them. Do not apply the shred parser to a verification datagram.

Shred common header

FieldOffsetWidthLogical typeMeaning
signature064Ed25519 signatureLeader authentication material
variant641Discriminator byteSelects role, legacy or Merkle family, proof count, and flags
slot658Unsigned 64-bit little-endianSlot number
index734Unsigned 32-bit little-endianPosition within the data or coding index space
version772Unsigned 16-bit little-endianCluster-lineage shred version
fec_set_index794Unsigned 32-bit little-endianFirst data index of the FEC set

Data-shred header

FieldOffsetWidthLogical typeMeaning
parent_offset832Unsigned 16-bit little-endianSlot minus parent slot
flags851Bit fieldReference tick plus completion bits
reference_tickIn flags bits 0 through 56 bitsSaturating unsigned valueTiming reference carried by the data shred
data_completeIn flags bit 61 bitBooleanCurrent data unit ends at this shred
last_in_slotIn flags bit 7 with data-complete state1 bitBooleanThis is the final data shred in the slot
size862Unsigned 16-bit little-endianEnd offset of header plus ledger data
dataVariant-derivedVariable bytesSerialized ledger byte sliceInput to ordered deshredding
paddingVariant-derivedVariable bytesNon-ledger bytesNever append to the ledger stream

Coding-shred header

FieldOffsetWidthLogical typeMeaning
num_data_shreds832Unsigned 16-bit little-endianData shard count k
num_coding_shreds852Unsigned 16-bit little-endianParity shard count m
position872Unsigned 16-bit little-endianCoding position from zero through m minus one
erasure_positionDerivedIntegerk plus positionLocal Reed-Solomon shard index
first_coding_indexDerivedUnsigned integerindex minus positionConsistency key for coding members
coding_payloadVariant-derivedFixed per compatible setReed-Solomon parity bytesInput to recovery, never entry bytes

Variant fields

FieldApplies toMeaning
shred_typeEvery variantData or coding role
format_familyEvery variantLegacy or Merkle
proof_sizeMerkle variantsNumber of proof entries encoded by the discriminator
chainedMerkle variantsWhether a preceding-root commitment is present
retransmitter_signedMerkle variantsWhether an extra retransmitter signature is present
signed_messageEvery variantVariant-defined bytes or root authenticated by the leader signature

The exact numeric discriminants and legal flag combinations come from the pinned Agave release. A receiver must not accept an unknown combination by masking it into a known family.

Merkle material

FieldTypeMeaningPresence
leafHash inputDomain-separated hash of the protected shard representationDerived for every Merkle shred
proofOrdered hash arraySibling nodes used to reconstruct the Merkle rootMerkle variants
merkle_rootHashRoot reconstructed from leaf, proof, and erasure positionDerived for every Merkle shred
chained_rootHashCommitment to the preceding FEC set rootChained Merkle variants
retransmitter_signatureEd25519 signature bytesSeparate retransmission evidenceRetransmitter-signed variants
leader_signatureEd25519 signature bytesAuthenticates the variant-defined rootEvery Merkle shred

Proof position uses the erasure-shard position, not the global coding index. Proof bytes, chained roots, and retransmitter signatures are not ledger data.

Receiver-derived identity fields

FieldTypeDerivationUse
cluster_idTrusted configurationGenesis or deployment contextPrevent cross-cluster key collisions
shred_typeEnumParsed variantSeparate data and coding identities
shred_idTuplecluster_id, slot, shred_type, indexDeduplication and timing match
fec_idTuplecluster_id, slot, fec_set_indexRecovery-state lookup
canonical_bytes_hashHashReceived UDP payloadDetect conflicting duplicates
leader_pubkeyEd25519 public keyTrusted leader schedule for slotSignature verification
parent_slotUnsigned 64-bitslot minus parent_offsetFork and ledger relationship
data_endOffsetData header size fieldEnd of ledger bytes in the shred
completion_kindEnumData flagsData-complete, last-in-slot, or neither
arrival_rankUnsigned integerOrder among copies of shred_idFirst-detection and duplicate metrics

FEC-set state

FieldTypeMeaning
slotUnsigned 64-bitSlot shared by every set member
fec_set_indexUnsigned 32-bitFirst data index for the set
num_data_shredsUnsigned integerRequired data shard count k
num_coding_shredsUnsigned integerAvailable parity shard count m
shard_sizeByte countProtected size shared by compatible members
present_dataBit setData positions currently available
present_codingBit setCoding positions currently available
missing_dataBit setData positions not yet present
recoverableBooleanAt least k compatible total shards are available
authenticated_rootHash or absentCommon Merkle context for Merkle sets
recovery_attemptsCounterNumber of reconstruction attempts
completed_atTimestamp or absentTime the set became usable
invalid_reasonEnum or absentStructural, proof, conflict, or recovery failure

A set becomes mathematically recoverable when at least k compatible shards are available. Every reconstructed data shred still requires full sanitation and authentication.

Ordered data stream

FieldTypeMeaning
slotUnsigned 64-bitSlot being assembled
first_data_indexUnsigned 32-bitFirst index in the contiguous range
last_data_indexUnsigned 32-bitLast index in the contiguous range
bytesByte sequenceConcatenated sanitized data slices
data_complete_boundariesIndex listEnds of entry-bearing data units
last_in_slot_indexOptional indexFinal data shred when observed
gap_setIndex setMissing unrecovered data indices

Concatenate data slices only. Coding payload, headers, padding, and Merkle material never enter this byte stream.

Entry structure

FieldLogical typeMeaning
num_hashesUnsigned 64-bitNumber of Proof of History hashes represented before the entry hash
hash32-byte hashProof of History result for the entry
transactionsVector of versioned transactionsTransactions recorded in this entry

Entry boundaries are produced by the ledger serialization, not by UDP packet boundaries. One entry can span shreds, and one shred can contain parts of more than one entry.

Versioned transaction structure

FieldLogical typeMeaning
signaturesCompact-length vector of 64-byte signaturesSignatures corresponding to required signer keys
messageLegacy or versioned messageSigned transaction message
message_versionLegacy marker or version numberSelects message decoding

Message header

FieldLogical typeMeaning
num_required_signaturesUnsigned byteCount of signer account keys
num_readonly_signed_accountsUnsigned byteSigner keys that are read-only
num_readonly_unsigned_accountsUnsigned byteNon-signer keys that are read-only

Legacy and versioned message fields

FieldApplies toMeaning
headerAll messagesSigner and read-only counts
account_keysLegacy messageOrdered static public keys
static_account_keysVersioned messageKeys stored directly in the message
recent_blockhashAll messagesRecent blockhash used by transaction processing
instructionsAll messagesCompact vector of compiled instructions
address_table_lookupsVersion 0 messageLookup-table account plus writable and read-only index lists
loaded_addressesVersion 0, derivedPublic keys resolved from address lookup tables

Address lookup contents are not carried inside the shred beyond the lookup references in the transaction. Resolving loaded addresses requires the relevant on-chain lookup-table state.

Compiled instruction fields

FieldLogical typeMeaning
program_id_indexUnsigned byteIndex of the program account in the resolved account-key list
accountsCompact vector of unsigned-byte indicesAccounts passed to the program
dataCompact byte vectorProgram-defined instruction payload

Instruction data has no universal schema. Decode it only with the selected program’s instruction definition and the correct program version.

Fields not present in raw shreds

Field or recordWhy it is absent
commitment levelDetermined later by cluster voting and fork state
finalized flagDetermined later by consensus
transaction execution statusProduced during replay
log messagesProduced during execution
compute units consumedProduced during execution
pre and post balancesProduced by execution and RPC metadata
account-state diffDerived from replay or account updates
block timeAssigned or estimated outside the raw shred header
RPC context slotRPC response metadata, not shred bytes
provider sequence numberNo service envelope is documented
provider receive timestampNo sender timestamp field is documented

Seeing a signed transaction in a valid leader shred does not mean that transaction succeeded, became rooted, or was finalized.

Questions

Does shredstream.sh add fields around each shred?
No service envelope is documented. One live UDP payload is one raw Solana shred, so payload offset zero is the shred signature. Source address, destination address, ports, receive timestamp, interface, and queue are network or receiver metadata. They are not fields inserted before the Solana bytes.
Are entries aligned to shred boundaries?
No. Entry serialization is independent of UDP fragmentation into shreds. One entry can span several data shreds, while one data shred can contain bytes from multiple entries. The receiver orders sanitized data slices, recovers gaps, respects completion boundaries, and then runs the ledger entry decoder over the continuous bytes.
Do raw shreds contain transaction status and logs?
No. Raw shreds can be reconstructed into entries and signed transactions, but execution status, log messages, compute consumption, account changes, balances, commitment, and finalization arise later during replay and consensus. A transaction observed in a shred remains proposed data until those later stages supply their own evidence.