DRD Server Post — Group 16, Code 149

Authenticated write of one server-role descriptor into DRD storage.

Quick reference

Command Group16 (DRD)
Command Code149
Server functioncmd_drd_server_post
Header versionHV=2 only (HV=1 returns 219)
AccessAuthenticated by identity coin dn+sn+AN in body
WritesUpsert into role table(s) in drd.db
Response31 bytes (role,dn,sn,raida_id,created_at,updated_at,last_seen_at)

Request body

After the 16-byte challenge prefix, payload fields are:

OffsetSizeFieldDescription
08session_idMust be all zero under AUTH_COIN.
82coin_typeMust be 0x0006.
101dnIdentity denomination.
114snIdentity serial (BE).
151reservedMust be zero.
1616ANAuthenticity number for this RAIDA.
321role0=raida, 1=qmail, 2=beacon, 3=drd, 4=rke.
332field_countNumber of TLVs that follow.
35...varTLVstag(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).

TagNameLenRoles
0x01raida_id1raida
0x02jurisdiction1..64 UTF-8raida,qmail
0x03benchmark_ms4raida
0x10ip44all
0x11ip616all
0x12network_speed_bps8 (one symmetric link rate, bits/second; see What a RAIDA reports)all
0x20ram8qmail,beacon,drd,rke
0x21processor1..64 UTF-8qmail,beacon,drd,rke
0x22storage_available8qmail
0x23max_object8qmail
0x24accepting_uploads1 (0/1)qmail
0x25version4qmail
0x30welfare_bytes8qmail,drd,rke
0x31tiers1..255qmail
0x32min_mailbox_class1 (0..4: minimum sender address-coin denomination code, 0 = 1 CC @bit, 4 = 10,000 CC @giga; absent = 0)qmail,beacon,drd,rke
0x33subscriptions_available1 (0/1)qmail,beacon,drd,rke
0x34subscription_url1..255 UTF-8qmail,beacon,drd,rke
0x35registration_needed1 (0/1)beacon
0x36encryption_types1..63qmail,beacon,drd,rke
0x40is_a_raida1all (ignored on write)
0x7Freserved32all (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.

  • 0x02 jurisdiction: also supported for QMail, 1..64 bytes.
  • 0x26 listening port: 2 bytes, 1..65535.
  • 0x27 access policy: 1 byte, 0 or 1.
  • 0x28 upload_bps and 0x29 download_bps: 8 bytes each, bits/second, nonnegative and at most INT64_MAX.
  • 0x2A key_id: 1 byte, nonzero. 0x2B node_id: 1 byte. QMail clients support node IDs 0..24.
  • 0x2C framing: 1 byte. QMail clients require framing 2 and encryption_types containing the exact token 9 for Content Server sessions.
  • 0x41 reputation: 1 byte, 0..100. QMail publishes its automatically tracked rolling 30-day uptime here as an owner report.
  • 0x43 withdrawn: 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 returns 40; bad AN returns 200.
  • field_count must match parsed TLV count exactly, or request fails as malformed (16).
  • Duplicate TLV tag or TLV overrun returns 16.
  • role=raida requires dn=5 plus TLVs raida_id and jurisdiction.
  • 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

FieldSizeDescription
role1Echoed role.
dn1Echoed denomination.
sn4Echoed serial (BE).
raida_id1Slot for role=raida, otherwise 0xFF.
created_at8Server-stamped Unix seconds.
updated_at8Server-stamped Unix seconds (fact changes only).
last_seen_at8Server-stamped Unix seconds (every successful post).

Status codes

CodeSymbolMeaning
250STATUS_SUCCESSDescriptor accepted and stored.
16ERROR_INVALID_PACKET_LENGTHMalformed body, duplicate tag, TLV overrun, or field_count mismatch.
36ERROR_EMPTY_REQUESTBody missing.
40ERROR_INVALID_SN_OR_DENOMINATIONIdentity coin not found on this RAIDA.
198ERROR_INVALID_PARAMETERIdentity/role/TLV validation failure, reserved field non-zero, or RAIDA slot conflict.
200ERROR_INVALID_ANIdentity AN mismatch.
219ERROR_UNSUPPORTED_PROTOCOLCommand 149 sent as HV=1.
252ERROR_INTERNALStorage-layer failure.
254ERROR_MEMORY_ALLOCAllocation failure while building response.