BW_DOWNLOAD — Group 0, Code 20

The caller asks for N bytes and the RAIDA streams N bytes of incompressible filler. The caller times the second half of the reply to measure its download rate from this RAIDA.

LIVE FLEET-WIDE since 16 October 2026

Both probe commands are dispatched on every RAIDA. Type 0 must be allowed on the node (allow_type0), which is the compiled default. Verified against the server source and a live probe of the fleet on 6 November 2026.

Quick reference

Command Group0 (Status)
Command Code20 (0x14)
Server functioncmd_bw_download in bw_probe.c
Body layoutChallenge (16) + bytes (4) + terminator (2) = 22 bytes
TransportTCP only
EncryptionType 0 only, no coin, no key
AuthenticationNone
Success responseStatus 250 with bytes bytes of filler then 3E 3E

Purpose and limits

The bandwidth probe lets any RAIDA or client time a real transfer against a RAIDA instead of trusting a figure the operator typed in or a third-party speed test. There is no authentication and no encryption: the request is a plain Type 0 frame carrying only the standard challenge, so a client behind NAT needs nothing but an outbound TCP connection. Each RAIDA also runs the probe itself, 5–15 minutes after boot and then about once a day, against up to three random peers per direction, and advertises the best rate rounded to two significant figures as upload_bps and download_bps in its DRD server record. Operator-claimed figures in the node’s configuration override the measurement.

Why timed transfers, not a public speed test

No third party sees the fleet’s or the clients’ addresses, no outside service can change its terms or endpoints, and NAT does not matter: an upload is timed by the receiving RAIDA, and a download by the caller, over the second half of the transfer so that TCP slow start is excluded.

What keeps it from being a free megabyte pump is TCP only (no UDP reflection) plus these limits, refused with 251 ERROR_SERVER_BUSY:

LimitValueScope
Requests6 per 10 minutesper source IP, both commands together
Download burst4 per 10 secondsnode-wide
Uploads in flight2node-wide; the slot is taken at the header, before the body is read
Bytes3 GiB per hournode-wide, per direction

Request

The normal 32-byte Type 0 request header: byte 2 = RAIDA id, byte 4 = 0, byte 5 = 20, bytes 6–7 = coin id, byte 16 = 0, bytes 22–23 = 22. Body:

OffsetSizeFieldDescription
0–1516Challenge12 random bytes followed by their big-endian CRC32.
16–194bytesBig-endian. How many filler bytes to send back: 65,536 (64 KiB) to 12,582,912 (12 MiB). 64 KiB is the smallest transfer whose timing means anything; 12 MiB keeps the reply inside the 24-bit response length.
20–212Terminator3E 3E.

Response

Status 250. The body is exactly bytes pseudo-random bytes (xorshift filler, not compressible) followed by the terminator. Time the arrival of the second half: by then slow start is over and the figure reflects the path, not the handshake. Rate in bits per second = second-half bytes × 8 / second-half seconds.

Status codes

CodeSymbolMeaning
250STATUS_SUCCESSFiller follows.
218ERROR_TCP_REQUIREDSent over UDP.
198ERROR_INVALID_PARAMETERbytes outside 64 KiB–12 MiB.
251ERROR_SERVER_BUSYA rate limit above was hit. Try another RAIDA or later.
16ERROR_INVALID_PACKET_LENGTHBody is not 22 bytes.
34ERROR_INVALID_ENCRYPTIONThe node does not allow Type 0.

Common mistakes

Timing the whole reply

Including the first half folds the TCP ramp into the number and under-reports every fast link. Measure a 1 MiB transfer first, then the full size, and keep the better figure.

Hammering one node

Six requests per ten minutes per IP, counting both directions. A client measuring the fleet should spread its probes across RAIDAs.