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 |
0x03 | benchmark_ms | 4 | raida |
0x10 | ip4 | 4 | all |
0x11 | ip6 | 16 | all |
0x12 | network_speed_bps | 8 | 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) |
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/drd/rke allow dn 4 or 5; beacon allows dn ≥ 4.
- 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. |