BW_UPLOAD — Group 0, Code 21
The caller sends N bytes of filler and the RAIDA, which is the only side that can see when the bytes actually arrive, times the second half and answers with the rate. This is how a client or a peer measures its upload rate to this RAIDA, NAT or not.
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 Group | 0 (Status) |
| Command Code | 21 (0x15) |
| Server function | cmd_bw_upload in bw_probe.c; admitted at the header by bw_upload_admit |
| Body layout | Challenge (16) + filler (N) + terminator (2), N = 64 KiB to 8 MiB |
| Request header | Extended length: bytes 22–23 = FF FF, real body length as 32-bit big-endian at bytes 10–13 (the same convention as QMail 6/75) |
| Transport | TCP only |
| Encryption | Type 0 only, no coin, no key |
| Authentication | None |
| Success response | Status 250 with a 20-byte payload |
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:
| Limit | Value | Scope |
|---|---|---|
| Requests | 6 per 10 minutes | per source IP, both commands together |
| Download burst | 4 per 10 seconds | node-wide |
| Uploads in flight | 2 | node-wide; the slot is taken at the header, before the body is read |
| Bytes | 3 GiB per hour | node-wide, per direction |
Request
The 32-byte Type 0 header with the extended-length convention: byte 5 = 21, bytes 22–23 = FF FF as a sentinel, and the full body length (16 + N + 2) as a 32-bit big-endian value at bytes 10–13. The server checks the length and takes one of its two upload slots before allocating anything, so an oversized or over-limit declaration is refused at the header. Body:
| Offset | Size | Field | Description |
|---|---|---|---|
| 0–15 | 16 | Challenge | 12 random bytes followed by their big-endian CRC32. |
| 16+ | N | filler | Any bytes; use incompressible data so a compressing middlebox cannot flatter the result. N from 65,536 to 8,388,608. |
| 16+N | 2 | Terminator | 3E 3E. |
Response
| Offset | Size | Field | Description |
|---|---|---|---|
| 0–7 | 8 | rate_bps | Big-endian bits per second over the second half of the body as it arrived at this RAIDA. 0 if the interval was too short to time. |
| 8–11 | 4 | bytes_received | Big-endian. N as received. |
| 12–19 | 8 | elapsed_us | Big-endian microseconds the second half took. |
Status codes
| Code | Symbol | Meaning |
|---|---|---|
| 250 | STATUS_SUCCESS | Measurement in the payload. |
| 218 | ERROR_TCP_REQUIRED | Sent over UDP. |
| 198 | ERROR_INVALID_PARAMETER | N outside 64 KiB–8 MiB, or the header sentinel and length disagree. |
| 251 | ERROR_SERVER_BUSY | Both upload slots are busy or another limit was hit. Try another RAIDA or later. |
| 16 | ERROR_INVALID_PACKET_LENGTH | Body length does not match the declared length. |
| 34 | ERROR_INVALID_ENCRYPTION | The node does not allow Type 0. |
Common mistakes
Using the 16-bit length field
Bytes 22–23 must be the FF FF sentinel; the real length lives at bytes 10–13. A plain header with a 16-bit length cannot describe a 64 KiB body.
Timing it yourself
The sender’s clock stops when the last byte leaves its socket buffer, not when it arrives. Use the rate the RAIDA reports.