Check that shreds are reaching your server
Three checks, each one layer deeper: packets reach the machine, your program can read them, and what it reads is the chain's current slot. If one fails, the checklist below tells you where to look.
Verify delivery in three checks. First watch the port with tcpdump to see packets reach the machine. Then run a small listener to prove your program can read them. Finally read the slot number inside each shred and compare it with the current slot from any public RPC: a small, steady gap means the data is live.
Steps#
- On the wire. Run
sudo tcpdump -ni any udp port 8001 -c 20with your own port. Twenty lines of UDP traffic, mostly a little over 1,200 bytes each, mean packets reach the machine. Nothing at all means they stop before it; go to the checklist below. - In your socket. Save the script below and run
python3 verify_delivery.py 8001. tcpdump sees packets before the firewall does, so this step proves the host firewall lets them through to a program. Stop any other program bound to the same port first. - Current slot. The script reads the slot from each shred's header, and after 200 datagrams asks a public RPC for the current slot with
getSlot. A gap of a few slots is normal for live data. Thousands of slots behind would mean old data, and that is a reason to email support. - Hand over to a decoder. Once all three checks pass, decode real transactions with the quickstart.
verify_delivery.py#
It uses only the Python standard library, so it runs on any recent server without installing anything.
"""Check that Solana shreds reach this server: listen on a UDP port, read each shred's slot, compare with RPC.Python 3.9+ standard library only:python3 verify_delivery.py 8001 # stop after 200 datagrams, then ask RPC for the current slotpython3 verify_delivery.py 8001 --count 50 --rpc https://api.mainnet-beta.solana.compython3 verify_delivery.py 8001 --no-rpc # offline: just report what arrivesShred header offsets (Agave ledger/src/shred.rs): variant byte at 64, slot u64 LE at 65, index u32 LE at 73."""import argparseimport jsonimport socketimport structimport urllib.requestDATA, CODING = {0x90, 0xB0}, {0x60, 0x70}def classify(buf):"""Return (kind, slot, index) for a shred, or None for any other datagram."""if len(buf) < 83:return Nonehi = buf[64] & 0xF0kind = "data" if hi in DATA else "coding" if hi in CODING else Noneif kind is None:return Noneslot, index = struct.unpack_from("<QI", buf, 65)return kind, slot, indexdef rpc_slot(url):body = json.dumps({"jsonrpc": "2.0", "id": 1, "method": "getSlot", "params": [{"commitment": "processed"}]}).encode()req = urllib.request.Request(url, data=body, headers={"Content-Type": "application/json"})with urllib.request.urlopen(req, timeout=10) as r:return json.load(r)["result"]def main():ap = argparse.ArgumentParser()ap.add_argument("port", type=int)ap.add_argument("--count", type=int, default=200, help="stop after this many datagrams")ap.add_argument("--rpc", default="https://api.mainnet-beta.solana.com")ap.add_argument("--no-rpc", action="store_true")a = ap.parse_args()sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)sock.bind(("0.0.0.0", a.port))print(f"listening on udp/{a.port}", flush=True)shreds, newest = 0, 0for _ in range(a.count):buf, _src = sock.recvfrom(2048)shred = classify(buf)if shred is None:# Not a shred: during activation this is the verification packet. Reply to support with the token in it.print(f"not a shred, {len(buf)} bytes: {buf!r}", flush=True)continuekind, slot, index = shredshreds += 1newest = max(newest, slot)print(f"{len(buf):5d} bytes {kind:6s} slot {slot} index {index}", flush=True)print(f"{shreds} shreds received, newest slot {newest}")if shreds and not a.no_rpc:current = rpc_slot(a.rpc)print(f"RPC current slot {current}: the stream is {current - newest} slots behind it")if __name__ == "__main__":main()
The verification packet#
During activation, before the stream starts, we send one or more verification packets to your address. They are not shreds, so the script prints them as "not a shred" with their contents; send us the token you find there. If none arrives, ask support for a new packet, and use the token from the newest one, because each new token replaces the one before.
Two habits help here. Do not filter on the source port: the port we send from is not fixed, and a rule that expects one can drop the packet silently. And keep the listener running until we confirm, since nothing is resent automatically.
Nothing arrives: the checklist#
- Wrong address. Compare the IPv4 address and port you sent us with the ones your server actually uses. A typo in either sends the stream somewhere else.
- Host firewall. Allow inbound UDP to your port from any source address and any source port, then repeat step 2.
- Cloud firewall. Security groups and provider firewalls sit in front of the machine. Open the port there too; tcpdump on the server never sees what they block.
- NAT. If the address we send to belongs to a router or gateway, it must forward the port to this machine. Carrier-grade NAT cannot be forwarded at all.
- Port in use. Only one program can usually read a UDP port. Stop other listeners before you run the script.
- Still nothing? Email support@solanashreds.xyz with the address and port, the output of step 1, and the time you ran it.
Packets arrive but do not decode#
If tcpdump and the script both see traffic but your own decoder prints nothing, the problem is downstream of delivery: assembling shreds into block components, framing entries, or slicing transactions. The decoding pipeline walks through those stages, and the TypeScript decoder is a tested reference to compare against. Every packet on the port is either a shred or a verification packet, so anything else that shows up there is not from us.
How this was tested#
We replayed mainnet slot 470,901,815, shredded by Agave 4.4.1's own Shredder, over loopback to the script, followed by one datagram that is not a shred. Test: bash test_verify.sh on Python 3.11, offline.
| Check | Result |
|---|---|
| Shreds reported for slot 470,901,815 | 704 of 704 |
| Split by kind | 352 data and 352 coding, as the shredder recorded |
| Summary line | names slot 470,901,815 as the newest |
| A datagram that is not a shred | shown as "not a shred", not counted |
The RPC comparison was run separately against a public mainnet endpoint, which answered getSlot normally.
What these checks do not prove#
They prove that live shreds reach your program. They do not prove that you receive every shred: UDP can drop packets on any hop, and a short check will not notice a small loss rate. To measure loss, count shreds per slot over time and compare data indexes against the gaps you see.
They also say nothing about speed. The slot gap in step 3 depends on your RPC endpoint as much as on the stream, so do not read it as a latency figure.
Questions#
Why do I see packets in tcpdump but not in my program?#
tcpdump captures before the host firewall decides what to drop, so a firewall rule can block the packets after tcpdump has already shown them. Another program bound to the same port can also be taking them first.
Why are shreds about 1,200 bytes?#
Each datagram is at most 1,228 bytes, sized so it is not split into fragments on the way. Data shreds are a little smaller than coding shreds, so you will see both sizes.
How far behind the current slot should the stream be?#
Only a few slots for live data. A large and growing gap means old data or a stalled receiver; compare the numbers again a minute later before you raise it with support.
Next#
With delivery confirmed, decode your first transaction. If you have not activated yet, start with ordering and activation. For how shreds compare with the other ways to read the chain, see where each kind of Solana data comes from, and for what changes between packet and transaction, packets are not data. Slot or block height explains the number the script prints.
Sources#
- Agave v4.4.1 ledger/src/shred.rs: common header offsets (variant at 64, slot at 65, index at 73) (checked 2026-11-18)
- Solana RPC getSlot (checked 2026-11-18)
- tcpdump manual page (checked 2026-11-18)
- Fixture: mainnet slot 470,901,815, shredded locally with the Agave 4.4.1 Shredder (704 shreds) (checked 2026-11-18)
Raw shreds on your own server
Ultra Low Latency Shreds is $200 and Standard Shreds is $100. You pay in crypto, tell us which IPv4 address and UDP port should receive the stream, and we wire it up by hand.