How do Solana network upgrades affect shreds?
Solana network upgrades can introduce new shred variants, authentication proofs, recovery layouts, feature-gated behavior, and validator filtering rules. The cluster shred version separates incompatible genesis or hard-fork contexts, while per-packet variants identify supported formats. Raw-feed consumers must follow feature activation, decode old and new fixtures during transitions, and reject unknown packets instead of guessing their layout.
protocol desk · updated 2026-08-31
Shreds are a versioned wire format
A shred is not one eternal 1,200-byte struct. Its outer size stays near the network packet budget, but headers, variants, authentication material, payload capacity, and recovery metadata can evolve.
Validator clients must agree enough to produce, forward, validate, reconstruct, and replay the same ledger. A format change therefore needs coordinated software support and a protocol activation path. External decoders share the compatibility burden even though they do not vote.
The safe design treats every packet as versioned input. It validates the cluster context, reads the shred discriminator, dispatches to a supported parser, checks lengths before offsets, and rejects unknown variants.
Hardcoding one captured mainnet layout can be fast until activation day. Then the same unchecked offsets can turn a clean incompatibility into plausible but false transaction data.
Client release and feature state are separate
Installing a newer validator binary does not imply every supported protocol feature becomes active immediately. The binary contains code for a set of features and formats. Cluster feature state determines which behavior applies at a given slot.
This separation lets operators deploy software before coordinated activation. It reduces the risk of dividing the cluster between nodes that understand a new format and nodes that do not.
External consumers need both facts. The release tells them what the client can understand. The active feature set and slot context tell them what producers are allowed or expected to emit.
A decoder that switches behavior at deployment time can move too early. One that waits for observed parse failures moves too late. Activation-aware dispatch provides the correct boundary.
Shred version identifies cluster context
Solana validators advertise and check a compact shred version associated with the cluster's genesis and hard-fork context. Packets from an incompatible network should not enter local blockstore as if they belonged to the active cluster.
The value helps distinguish mainnet, test networks, private clusters, and divergent hard-fork histories. It is not a complete parser version. Two packets under one cluster shred version can still use different supported shred variants according to feature state.
Operators should obtain the expected value from the running cluster or client tooling. A stale configured value can make a healthy UDP stream appear empty because the receiver discards every packet.
Monitoring should count version mismatch separately from malformed packets and signature failures. The remedies differ: cluster configuration, format support, and untrusted input should not collapse into one invalid counter.
The variant selects packet interpretation
Shred headers contain discriminating information that tells a compatible client which format rules apply. Variants can differ between data and coding roles and between legacy and Merkle-authenticated designs.
The parser must inspect the discriminator before reading format-dependent offsets. It then validates the expected packet length, header fields, proof structure, recovery metadata, and payload boundaries.
Variant handling should be exhaustive. A default branch that treats unknown bytes as the oldest format is unsafe. New discriminants can make old offsets point into signatures or proof nodes, producing output that passes superficial application checks.
Fast paths can remain explicit. Dispatch once, call a specialized parser, and retain an unsupported-variant metric. Safety does not require interpreting every byte through a slow generic schema.
Merkle shreds changed authentication structure
Merkle-based shred formats add authenticated tree structure around groups of shreds. A receiver can validate inclusion relationships and chaining properties defined by the variant, while the leader remains the origin of authenticated block data.
The additional proof material changes header and payload allocation. A decoder written for a legacy payload length cannot assume the same entry-byte range in a Merkle shred. Coding and recovery logic must also use the metadata defined by the active variant.
Chained designs can link shred groups or slots in ways that strengthen equivocation evidence and continuity checks. Exact proof depths, chained fields, and resigned forms depend on the implemented variants.
The engineering requirement is stable: authentication is part of parsing, not an optional suffix to strip before applying old offsets.
Erasure recovery must match the variant
Coding shreds are computed over data according to the active shred construction rules. Recovery needs the correct data count, coding count, indices, shard layout, and protected byte region.
Mixing variants inside one recovery calculation can yield failure or corrupt output. The receiver groups by slot and recovery-set context, confirms compatible metadata, and invokes the matching reconstruction code.
Upgrades can change how fec sets are described or how proofs interact with recovered bytes. A reconstructed data shred still needs full validation under its variant before entry parsing.
Test fixtures should include loss patterns. A decoder that parses every complete captured packet can still fail the first time production traffic needs cross-version erasure recovery.
Activation boundaries are slot-sensitive
Protocol behavior is evaluated against bank and feature state at specific slots. An epoch or feature boundary can place old and new observations close together in wall-clock time.
UDP reordering makes current wall clock an unsafe parser switch. A late old-format shred can arrive after the receiver has already seen a new slot. The packet's slot and cluster context should select the applicable rules.
Keep overlapping decoder support around a transition. Retire an old path only after its maximum useful late-arrival and repair window has passed according to operational policy.
Rollback planning matters too. If cluster activation is delayed or a deployment is reverted before activation, consumers should remain on observed feature state rather than an anticipated calendar time.
Mixed software does not always mean mixed output
During a coordinated rollout, validators can run different binary versions while producing the same active wire format. New binaries understand inactive features but continue emitting compatible packets until activation.
This is the purpose of staged deployment. It lets stake upgrade before behavior changes. Compatibility depends on the feature, client support floor, and activation process, so operators still monitor version adoption.
An external decoder should not infer packet format solely from the producing validator's software version advertised in gossip. The active feature set and packet discriminator are stronger inputs.
Conversely, a binary version can change performance without changing bytes. Retransmit scheduling, peer filtering, recovery speed, or packet batching can shift latency while format tests remain green.
Gossip exposes useful upgrade context
Gossip records can advertise validator software versions, contact information, shred version, and other cluster metadata. This view helps identify adoption and incompatible peers.
Gossip is eventually consistent. A record can be stale after a restart or rolling deployment. It should inform monitoring, not override packet validation or bank feature state.
Turbine eligibility can filter incompatible shred versions or unusable endpoints. During upgrades, a mistaken cluster version or stale contact record can look like packet loss downstream.
Join CRDS changes with packet metrics. A sudden rise in unknown variants means something different from a rise in old-version peers or signature failures. Good labels shorten the incident.
Upgrade failure modes are sharp
The cleanest failure is an explicit unsupported-variant error before payload access. Less safe failures include incorrect payload offsets, wrong shred index interpretation, invalid recovery grouping, silent transaction truncation, and treating proof bytes as entry data.
Operational failures include accepting packets from the wrong cluster, dropping all packets after a shred-version change, saturating CPU on new proof verification, or overflowing queues because the variant changes packet processing cost.
Many failures appear partial. Vote transactions may continue parsing while larger application transactions cross a changed boundary and fail. Complete packets may decode while recovered packets do not.
Upgrade testing must cover semantic output and timing under loss, not only whether one header parses.
Build a compatibility matrix
A useful matrix has rows for cluster feature states and shred variants, with columns for decoder release, validation support, recovery support, entry parsing, and performance qualification.
Every supported cell needs captured or generated fixtures. Include data and coding shreds, first and last indices, partial final recovery sets, corrupted proofs, wrong leaders, wrong cluster versions, duplicates, reordering, and missing packets.
Negative fixtures are first-class. The decoder should reject an unknown discriminator, impossible count, short packet, invalid signature, bad Merkle proof, and cross-cluster version with a specific metric.
Record the source client commit and feature configuration beside each fixture. Anonymous packet dumps become ambiguous after the next upgrade.
Rehearse the transition, not only endpoints
Testing old format and new format separately misses the activation boundary. A replay should interleave late old-slot packets, early new-slot packets, duplicates from two feeds, and repair responses arriving after the switch.
The receiver should route every packet by slot context, preserve both code paths, and produce one ordered ledger stream per fork. Metrics should show which variant handled each packet and whether recovery crossed an unsupported combination.
Load testing should use the new verification and recovery cost. A parser can remain correct and still become operationally late if proof work doubles CPU or allocates on the receive thread.
Run canaries before the boundary where possible. A shadow decoder can validate new logic without supplying strategy decisions until confidence is established.
Raw feeds preserve upgrade responsibility
A decoded provider can hide some format transitions behind a stable application schema, at the cost of added provider processing and trust. A raw feed sends the bytes the source observes.
shredstream.sh's contract is raw UDP. It provides no ordering, retransmission, or backpressure and does not convert variants into one historical structure. The customer owns version dispatch, validation, recovery, parsing, and activation readiness.
That choice preserves early timing and protocol detail. It also makes upgrade work non-optional. A customer that cannot maintain a decoder should choose a higher-level feed or use a supported library with an explicit upgrade process.
Provider communication can announce expected changes, but the active cluster and packet bytes remain the correctness authority.
Deployment should fail closed and visibly
Unknown input should be dropped with a reason, counter, slot, leader, and bounded packet sample for analysis. It should not enter the strategy state as partially parsed data.
Failing closed creates temporary data loss when support is missing. Failing open creates fabricated market data. The latter is worse because it can pass downstream checks and drive actions.
Visibility reduces the cost of the safer choice. Alert on any unsupported variant before it reaches a strategy threshold. Track percentage by leader and slot. Preserve enough raw packets under controlled retention to reproduce the failure.
A complete outage at activation is obvious. A 0.2 percent misparse concentrated on recovered final sets is harder and may be more dangerous. Metrics need fine-grained labels.
Keep the hot path versioned
Version safety does not require abandoning performance. Parse fixed common fields once, branch on a validated discriminator, and use format-specific routines with preallocated buffers and bounded work.
Cache feature context by slot, but retain provenance and invalidation rules. Avoid an RPC lookup on every packet. Preload upcoming activation state and keep recent context for reordered traffic.
Separate packet intake from expensive proof and recovery work with bounded queues sized from observed bursts. If overload occurs, emit a clear drop reason instead of allowing old packets to accumulate.
Benchmark each variant at realistic packet rates and loss patterns. A microbenchmark of complete packet headers does not exercise the reconstruction path that controls entry readiness.
The operational conclusion
Network upgrades change both compatibility and performance. A receiver can remain byte-correct while becoming late, or remain fast while decoding the wrong layout.
The control loop is continuous: monitor client releases and feature proposals, obtain active cluster state, update versioned parsers, build fixtures, rehearse mixed traffic, canary, activate, and retain rollback support for late packets.
Exact constants belong to source code and cluster configuration. Stable invariants belong in architecture: validate cluster context, dispatch by variant, group recovery correctly, authenticate the leader, preserve slot order, and reject unknown input.
A raw shred feed provides the earliest representation and therefore exposes upgrades first. That is part of its value and part of its operating cost.
In practice
A cluster activates a new Merkle shred variant at slot 520,000,000 in this example. The receiver has two decoder paths and caches feature state by slot.
At 09:00:00.004 it receives a new-variant shred for slot 520,000,000 and validates its proof in 34 microseconds. At 09:00:00.006 a reordered legacy shred for slot 519,999,999 arrives. Slot-aware dispatch sends it to the old parser, where it validates in 21 microseconds.
A receiver that switched one global parser at the first new packet would reject the legitimate late shred. A receiver that guessed legacy layout for the new packet would read proof bytes as payload. Overlapping version support avoids both failures.
What this does not cover
This page does not enumerate current shred discriminants, header byte offsets, proof depths, fec-set parameters, feature identifiers, activation slots, or shred-version derivation. Those values are release and cluster specific and belong in versioned source references and tests.
Feature activation and upgrade coordination can differ between clusters and client families. Gossip version records can be stale, and a packet's cluster shred version does not fully describe its inner format. The worked example is illustrative rather than a mainnet activation claim or performance guarantee.
Related questions
- Is the Solana shred version the same as the shred format?
- No. The cluster shred version helps separate incompatible genesis or hard-fork contexts. The packet's shred variant and active feature state determine its inner layout and validation rules. One cluster shred version can support more than one format across a coordinated feature transition.
- Can a newer validator binary emit new shreds immediately?
- Not necessarily. A binary can contain support for a protocol feature before the cluster activates it. Staged deployment lets validators continue producing the active compatible format until feature state changes. Consumers should follow packet discriminators and cluster activation context rather than installation dates alone.
- Why must a decoder keep the old format after activation?
- UDP packets can be delayed and reordered, and repair can return data for older slots after a feature boundary. Slot-aware decoding may therefore need both old and new paths during an overlap window. Retiring old support at the first new packet can reject valid late data.
- What should happen when a decoder sees an unknown variant?
- The decoder should reject the packet before format-dependent payload access, emit a labeled metric and alert, and retain a bounded diagnostic sample under appropriate controls. Treating unknown bytes as a legacy layout can create plausible but false transactions, which is more dangerous than visible data loss.
- Does a raw shred provider handle format upgrades for customers?
- A raw provider forwards observed packet bytes and can communicate expected changes, but the customer's decoder remains responsible for variant support, feature-aware validation, erasure recovery, and parsing. shredstream.sh does not normalize packets into an ordered historical schema; its wire contract remains raw UDP.