Skip to content
Docs

Inspect your first shred packet

This page lets you prove that the paid shred stream reaches your application before you add shred decoding.

Before you start

  • Have a paid destination whose verification token was accepted in the dashboard.
  • Keep the verified public IP address and UDP port unchanged.
  • Allow inbound UDP from 64.130.40.90 through every cloud, edge, and host firewall.
  • Have Python 3, tcpdump, and sudo access on the receiving Linux server.
  • Substitute the verified UDP port consistently for 9000 in every command.

Prove network arrival first

Do not begin with a shred decoder. First confirm that UDP datagrams from the service reach the verified port. Every stream datagram originates from ${SOURCE_IP}, the same source used for the verification challenge.

Run this command on the destination server after replacing 9000 with the verified port:

bash

sudo tcpdump -n -i any -vv -c 20 'src host 64.130.40.90 and udp dst port 9000'

The command captures metadata for 20 matching packets and exits. It does not print the binary payload. Confirm that each displayed source address is ${SOURCE_IP} and each destination port is the registered port. The source UDP port is not currently specified and can be ignored.

If tcpdump prints nothing, the problem occurs before application decoding. Check the dashboard destination, cloud firewall, network ACL, public routing, NAT mapping, and host firewall. Use the exact source CIDR ${SOURCE_IP}/32 in allow rules.

Receive a bounded sample in Python

Stop any other process that owns the verified port, then run this receiver. It accepts 1,000 datagrams from ${SOURCE_IP}, records size statistics, prints the first accepted payload as hexadecimal, and fails if a service datagram exceeds the documented ${WIRE.maxPacketBytes} byte maximum.

bash

python3 - <<'PY'
import socket
import statistics
import time

HOST = "0.0.0.0"
PORT = 9000
EXPECTED_SOURCE = "64.130.40.90"
TARGET_PACKETS = 1000
MAX_PACKET_BYTES = 1228

sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 8 * 1024 * 1024)
sock.bind((HOST, PORT))
sock.settimeout(10.0)

sizes = []
started = time.monotonic()

while len(sizes) < TARGET_PACKETS:
    try:
        data, peer = sock.recvfrom(65535)
    except socket.timeout:
        raise SystemExit("receiver timeout: no accepted datagram for 10 seconds")
    if not peer[0] == EXPECTED_SOURCE:
        continue
    if len(data) > MAX_PACKET_BYTES:
        raise SystemExit(
            f"packet too large: {len(data)} bytes exceeds {MAX_PACKET_BYTES}"
        )
    if not sizes:
        print(f"first_source={peer[0]}:{peer[1]}")
        print(f"first_bytes={len(data)}")
        print(f"first_32_bytes_hex={data[:32].hex()}")
    sizes.append(len(data))

elapsed = time.monotonic() - started
print(f"packets={len(sizes)}")
print(f"elapsed_seconds={elapsed:.6f}")
print(f"packets_per_second={len(sizes) / elapsed:.2f}")
print(f"minimum_bytes={min(sizes)}")
print(f"maximum_bytes={max(sizes)}")
print(f"mean_bytes={statistics.fmean(sizes):.2f}")
PY

The command is intentionally bounded. It exits after 1,000 accepted packets or after a ten-second idle timeout. It does not claim that ten seconds is a product timeout; the value controls only this local diagnostic.

Interpret the output

first_source must show ${SOURCE_IP}. The following source port can vary because the source UDP port is not currently specified. first_bytes is the UDP payload length delivered to the application. first_32_bytes_hex is a lossless hexadecimal view of the first 32 payload bytes, not a decoded shred.

maximum_bytes must not exceed ${WIRE.maxPacketBytes} for service datagrams under the documented wire contract. The feed's measured mean packet size is ${FEED.meanPacketBytes} bytes. A 1,000-packet local sample can differ from that measured mean and should not be treated as a contract violation by itself.

packets_per_second measures only the bounded interval seen by this process. The published measured feed rate is ${FEED.packetsPerSecond.toLocaleString("en-US")} packets per second and ${FEED.mbps} Mbps. Scheduler pauses, socket drops, start timing, and feed variation affect a short sample. A peak rate, minimum rate, and acceptable sample deviation are not currently specified.

Confirm application ownership

Only one process can normally bind the same address and UDP port without special socket options. If the Python sample reports an address-in-use error, your production receiver may already own the port. Do not stop a production process merely to run a diagnostic. Use tcpdump to observe delivery without taking ownership of the socket.

Check the binding with:

bash

sudo ss -ulnp | grep ':9000 '

An empty result means no visible UDP listener matches the textual port filter. A displayed process on another bind address may still fail to receive traffic delivered to the intended local interface. Match the verified public routing and local bind configuration.

Check for local drops

Run netstat -su before and after a sample. Compare the UDP receive-error and packet-receive counters exposed by the host. Counter names vary by operating system. The supported operating systems and required monitoring tool are not currently specified.

A packet visible in tcpdump but absent from the application can indicate a closed socket, wrong bind address, local firewall decision, full socket queue, or process scheduling delay. Increase observation before changing the network. Record tcpdump counts, application counts, and kernel UDP counters over the same UTC interval.

The service does not retransmit a datagram, preserve order, or apply backpressure. Your receiver must keep draining the socket and tolerate missing or reordered shreds. Do not infer transport reliability from a successful 1,000-packet sample.

Move from arrival to decoding

After the sample succeeds, restore or start the intended receiver on the verified port. Keep source filtering for ${SOURCE_IP}. Pass the complete UDP payload to the shred-processing stage without removing bytes based on an assumed service wrapper. Delivery is raw UDP, and an additional service envelope is not part of the documented contract.

The detailed Solana shred payload schema, variant parsing rules, and decoding library are not currently specified by the product facts. Keep arrival validation separate from protocol decoding so a decoder error cannot be misreported as a delivery failure.

Record the first accepted UTC timestamp, source IP, destination port, packet count, byte count, size range, and kernel drop delta. These observations form a useful activation record. A required audit format and retention period are not currently specified.

Parameters

NameTypeDefaultNotes
PORTUDP port9000 in examplesReplace with the verified destination port in tcpdump, ss, and Python.
EXPECTED_SOURCEIPv4 address64.130.40.90Accept and count only datagrams from the fixed service source.
TARGET_PACKETScount1000Controls the local diagnostic sample and is not a product limit.
MAX_PACKET_BYTESbytes1228Fails the diagnostic when an accepted service datagram exceeds the wire maximum.
socket idle timeoutseconds10.0Controls only the local Python sample; a product delivery timeout is not currently specified.

When it goes wrong

tcpdump exits without a packet. Example error: `0 packets captured`.

Cause. Traffic from 64.130.40.90 does not reach the host because the destination, route, NAT mapping, or firewall is wrong.

Fix. Compare the verified pair with every network layer and permit the exact source CIDR to the UDP port.

Python cannot own the port. Example error: `OSError: [Errno 98] Address already in use`.

Cause. Another process is already bound to the destination port.

Fix. Inspect the owner with ss and use tcpdump for non-invasive confirmation or schedule a controlled receiver handoff.

The bounded receiver gets no accepted packet. Example error: `receiver timeout: no accepted datagram for 10 seconds`.

Cause. No stream packet arrived from the expected source during the local diagnostic window.

Fix. Confirm the destination is verified, compare tcpdump output, and restore the exact source and destination firewall rule.

The diagnostic rejects a datagram. Example error: `packet too large: 1300 bytes exceeds 1228`.

Cause. The packet matched the source filter but exceeded the documented service maximum.

Fix. Capture metadata and the packet safely, confirm the source address, and send the UTC timestamp and destination ID to support.

Questions

What proves that my first packet came from shredstream.sh?
Confirm that the IPv4 source is ${SOURCE_IP}, the protocol is UDP, and the destination port matches the verified destination. Source-IP allowlisting is the documented delivery authentication. The source UDP port and per-packet cryptographic authentication are not currently specified, so do not build an acceptance rule around either one.
Should the first packet be exactly 1,216 bytes?
No. ${FEED.meanPacketBytes} bytes is the measured mean packet size, not a required size for every datagram. The documented maximum is ${WIRE.maxPacketBytes} bytes. Inspect a sample distribution and retain each complete payload. Do not pad, truncate, or reject a packet merely because its size differs from the published mean.
Why inspect packets before decoding shreds?
Arrival checks isolate the paid delivery path from application parsing. First prove that packets from ${SOURCE_IP} reach the verified UDP port, then confirm application counts and sizes. Only then add shred decoding. This order prevents a payload parser failure from being mistaken for a firewall, NAT, routing, or activation failure.