DRD Server Post — Group 16, Code 149
Authenticated write of one server-role descriptor into DRD storage.
Quick reference
| Command Group | 16 (DRD) |
| Command Code | 149 |
| Server function | cmd_drd_server_post |
| Header version | HV=2 only (HV=1 returns 219) |
| Access | Authenticated by identity coin dn+sn+AN in body |
| Writes | Upsert into role table(s) in drd.db |
| Response | 31 bytes (role,dn,sn,raida_id,created_at,updated_at,last_seen_at) |
Request body
After the 16-byte challenge prefix, payload fields are:
| Offset | Size | Field | Description |
|---|---|---|---|
| 0 | 8 | session_id | Must be all zero under AUTH_COIN. |
| 8 | 2 | coin_type | Must be 0x0006. |
| 10 | 1 | dn | Identity denomination. |
| 11 | 4 | sn | Identity serial (BE). |
| 15 | 1 | reserved | Must be zero. |
| 16 | 16 | AN | Authenticity number for this RAIDA. |
| 32 | 1 | role | 0=raida, 1=qmail, 2=beacon, 3=drd, 4=rke. |
| 33 | 2 | field_count | Number of TLVs that follow. |
| 35... | var | TLVs | tag(1)+len(2,BE)+value. Unknown tags are skipped. |
TLV tags
Known tags are role-gated. A known tag used on the wrong role is invalid (198).
| Tag | Name | Len | Roles |
|---|---|---|---|
0x01 | raida_id | 1 | raida |
0x02 | jurisdiction | 1..64 UTF-8 | raida,qmail |
0x03 | benchmark_ms | 4 | raida |
0x10 | ip4 | 4 | all |
0x11 | ip6 | 16 | all |
0x12 | network_speed_bps | 8 (one symmetric link rate, bits/second; see What a RAIDA reports) | all |
0x20 | ram | 8 | qmail,beacon,drd,rke |
0x21 | processor | 1..64 UTF-8 | qmail,beacon,drd,rke |
0x22 | storage_available | 8 | qmail |
0x23 | max_object | 8 | qmail |
0x24 | accepting_uploads | 1 (0/1) | qmail |
0x25 | version | 4 | qmail |
0x30 | welfare_bytes | 8 | qmail,drd,rke |
0x31 | tiers | 1..255 | qmail |
0x32 | min_mailbox_class | 1 (0..4: minimum sender address-coin denomination code, 0 = 1 CC @bit, 4 = 10,000 CC @giga; absent = 0) | qmail,beacon,drd,rke |
0x33 | subscriptions_available | 1 (0/1) | qmail,beacon,drd,rke |
0x34 | subscription_url | 1..255 UTF-8 | qmail,beacon,drd,rke |
0x35 | registration_needed | 1 (0/1) | beacon |
0x36 | encryption_types | 1..63 | qmail,beacon,drd,rke |
0x40 | is_a_raida | 1 | all (ignored on write) |
0x7F | reserved | 32 | all (must be zero) |
QMail discovery fields
The following implemented QMail tags extend the table above. Numeric fields use big-endian encoding; optional fields omitted from a Post retain their previous server-side value. Get replies report field presence separately from a zero value.
0x02jurisdiction: also supported for QMail, 1..64 bytes.0x26listening port: 2 bytes, 1..65535.0x27access policy: 1 byte, 0 or 1.0x28upload_bps and0x29download_bps: 8 bytes each, bits/second, nonnegative and at most INT64_MAX.0x2Akey_id: 1 byte, nonzero.0x2Bnode_id: 1 byte. QMail clients support node IDs 0..24.0x2Cframing: 1 byte. QMail clients require framing 2 and encryption_types containing the exact token 9 for Content Server sessions.0x41reputation: 1 byte, 0..100. QMail publishes its automatically tracked rolling 30-day uptime here as an owner report.0x43withdrawn: 1 byte, value 1; send as the only TLV to withdraw a QMail descriptor and set field_count to 0x8001 (withdrawal marker plus one TLV). A later regular publication makes it discoverable again.
Storage and bandwidth are owner reports, not independently verified capacity. Type 9 applies to connections to QMail Content Servers; advertising it does not add a Type-9 listener to RAIDAX. No advertisement lease is implemented.
What a RAIDA reports, and what it does not
The bandwidth tags are not interchangeable, and a RAIDA fills only one of them.
0x28 upload_bps and 0x29 download_bps are directional achieved
throughput: they describe transfers a server has actually measured. Nothing on a RAIDA times a
transfer, so a RAIDA never publishes 0x28 or 0x29 and a client must not expect
them from one. A standalone Content Server may publish both.
0x12 network_speed_bps is the single symmetric figure a RAIDA can publish. Since
2026-09-24 a RAIDA reports the negotiated link rate of the network interface that carries its
default route — and only when that interface holds the public address the node is publishing.
A node behind NAT reports nothing here, because its link rate describes the local network
rather than its path to the internet, and a figure that wrong is worse than an absent one. An
operator who knows the real uplink may declare it in the node’s configuration, and the
declaration takes precedence over the probe.
An absent speed means “not stated”, not zero and not broken
Get replies report field presence separately from value, so treat a missing
0x12 as unknown. Do not render it as 0, and do not treat the server as
unhealthy: on this fleet most nodes sit behind NAT and correctly publish no speed at all.
None of these figures are verified by the directory. They are the server’s own report, and the reporting node is paid for the traffic it carries, so a consumer that ranks servers by bandwidth should weight an unverified claim accordingly.
QMail server software version
Tag 0x25 is the existing four-byte unsigned big-endian version field.
QMail publishes its server release date as YYYYMMDD, for example
20260922 for September 22, 2026. Zero or an absent field means unknown.
This is the running Content Server executable's version, read from its validated
local status, not the desktop application's version or the date of publication. A RAIDA publishes this tag too, carrying its own build date, so the field is populated for RAIDA rows as well as Content Server rows — do not assume it is Content-Server-only. Because the value identifies the software that produced a row, it also tells a reader which rules generated that row's other figures, such as the speed semantics above.
Regular publications and retries carry this value. Withdrawal remains a single 0x43 TLV with field_count=0x8001 and includes neither version nor uptime metadata. Command 150 returns the stored version using the same 0x25 tag; no new wire command or DRD database column is required. Clients should display the version as reported, without treating it as proof of supported features. Use authenticated capability negotiation to determine which operations a server actually supports.
Validation rules
- Authentication check (
dn+sn+AN) runs before TLV parsing. Unknown coin returns40; bad AN returns200. field_countmust match parsed TLV count exactly, or request fails as malformed (16).- Duplicate TLV tag or TLV overrun returns
16. role=raidarequiresdn=5plus TLVsraida_idandjurisdiction.- Role/dn matrix: qmail allows dn 3, 4 or 5; drd/rke allow dn 4 or 5; beacon allows dn ≥ 4. Mega (dn 3, 1,000 CC) was admitted to the qmail role on 2026-09-22 so a Mega identity can host a Content Server; the other roles were unchanged. A denomination outside a role’s set is refused, and withdrawal is held to the same rule as publication.
- If both ip4 and ip6 are absent, server fills ip4 from observed peer address.
- RAIDA slot/coin binding is strict: conflicting slot claim is rejected (
198), not auto-taken over.
Response body
| Field | Size | Description |
|---|---|---|
| role | 1 | Echoed role. |
| dn | 1 | Echoed denomination. |
| sn | 4 | Echoed serial (BE). |
| raida_id | 1 | Slot for role=raida, otherwise 0xFF. |
| created_at | 8 | Server-stamped Unix seconds. |
| updated_at | 8 | Server-stamped Unix seconds (fact changes only). |
| last_seen_at | 8 | Server-stamped Unix seconds (every successful post). |
Status codes
| Code | Symbol | Meaning |
|---|---|---|
| 250 | STATUS_SUCCESS | Descriptor accepted and stored. |
| 16 | ERROR_INVALID_PACKET_LENGTH | Malformed body, duplicate tag, TLV overrun, or field_count mismatch. |
| 36 | ERROR_EMPTY_REQUEST | Body missing. |
| 40 | ERROR_INVALID_SN_OR_DENOMINATION | Identity coin not found on this RAIDA. |
| 198 | ERROR_INVALID_PARAMETER | Identity/role/TLV validation failure, reserved field non-zero, or RAIDA slot conflict. |
| 200 | ERROR_INVALID_AN | Identity AN mismatch. |
| 219 | ERROR_UNSUPPORTED_PROTOCOL | Command 149 sent as HV=1. |
| 252 | ERROR_INTERNAL | Storage-layer failure. |
| 254 | ERROR_MEMORY_ALLOC | Allocation failure while building response. |