DRD Post User — Group 16, Code 140
Creates or updates the caller’s own directory record: first name, last name, inbox fee, two avatar symbols, and the class-rejection byte (minimum sender denomination). The caller proves ownership by presenting the coin’s Authenticity Number; nobody else can write your record.
Quick reference
| Command Group | 16 (DRD) |
| Command Code | 140 (0x8C) |
| Server function | cmd_drd_post_user in cmd_drd.c |
| Request body | Variable: challenge(16) + record fields(34 + names) + terminator(2). Minimum 52 bytes (both names empty). |
| Authentication | Owner AN, verified against the coin database like detect |
| Success response | Status 250, no payload |
| Semantics | Upsert: creates the record, or replaces every field except created_at |
| Distribution | Client sends the same request to all 25 RAIDAs |
Purpose
post_user is how a user appears in (or updates) the directory. The record is keyed by the caller’s coin PQ (denomination + serial number); posting again with the same PQ overwrites the name, fee, and symbols, refreshes updated_at, and preserves the original created_at so account age cannot be faked.
The inbox fee is the decimal CloudCoin amount a stranger must pay to send this user QMail, expressed as an 8-byte big-endian count of 10−8 CC units (see the fee encoding section of the overview). Negative fees are rejected. Names are UTF-8, at most 63 bytes each; either or both may be empty.
The class-rejection byte sets the minimum denomination a sender’s address coin must have for this user to accept their QMail. It is signed, using the standard denomination encoding: 0x00 = 1 CC (.bit), 0x01 = 10 CC (.byte), and 0xFF = −1 = 0.1 CC (a dime) — so 0xFF ranks below 0x00, not above it. The default 0x00 means “accept all denominations” (no filtering); any other value rejects senders whose denomination is lower. Example: 0x01 rejects 1 CC and all fractional addresses, accepting 10 CC and up. Valid values are 0 or a denomination in −8…+6.
Request body
Diagram shows an example with a 5-byte first name (ALICE) and 5-byte last name (SMITH): 62 bytes total. FL/LL = first/last name length; S1/S2 = symbols; CR = class rejection; T = terminator.
Request body layout (variable length)
+-------------------+------------------------------+-------------------------------+------------+
| challenge/CRC | identity + auth | record fields | terminator |
| 16 bytes | DN(1) SN(4) AN(16) | fee(8) S1(1) S2(1) CR(1) | 2 bytes |
| | | FL(1) first LL(1) last | |
+-------------------+------------------------------+-------------------------------+------------+
| body[0..15] | body[16..36] | body[37..N-3] | 3E 3E |
+-------------------+------------------------------+-------------------------------+------------+
minimum total = 52 bytes (FL = 0, LL = 0)
maximum total = 52 + 63 + 63 = 178 bytes
| Body offset | Size | Field | Description |
|---|---|---|---|
| 0–11 | 12 | Challenge random | Random bytes generated by the client. |
| 12–15 | 4 | Challenge CRC32 | Big-endian CRC32 of bytes 0–11. |
| 16 | 1 | Denomination | Caller’s coin denomination (signed, −8 to +6). Keys the record. |
| 17–20 | 4 | Serial Number | Caller’s coin serial number, big-endian. Keys the record. |
| 21–36 | 16 | Authenticity Number | Caller’s AN for this RAIDA. Compared to the stored AN; mismatch → ERROR_INVALID_AN, nothing written. |
| 37–44 | 8 | Inbox fee | Big-endian signed int64, units of 10−8 CC. Must be ≥ 0. |
| 45 | 1 | First symbol | Avatar symbol index 0–255. Not validated by the server. |
| 46 | 1 | Second symbol | Second avatar symbol index. |
| 47 | 1 | Class rejection (CR) | Signed minimum sender denomination. 0x00 = accept all (default); otherwise 0 or a denomination in −8…+6 — anything else → ERROR_INVALID_PARAMETER. Remember 0xFF is −1 (0.1 CC), below 0x00. |
| 48 | 1 | First-name length (FL) | 0–63. Anything larger → ERROR_INVALID_PARAMETER. |
| 49... | FL | First name | UTF-8 bytes, no NUL terminator. |
| 49+FL | 1 | Last-name length (LL) | 0–63. The last name must end exactly at the terminator; extra bytes → error. |
| 50+FL... | LL | Last name | UTF-8 bytes, no NUL terminator. |
| last 2 | 2 | Terminator | Fixed 3E 3E. |
Response
Success is a status-only response: standard RAIDA response header with status 250 (STATUS_SUCCESS) and no payload. There is no way to distinguish create from update in the response; clients that care should get_user first.
Status codes
| Decimal | Hex | Symbol | Meaning |
|---|---|---|---|
| 250 | 0xFA | STATUS_SUCCESS | Record created or updated. |
| 16 | 0x10 | ERROR_INVALID_PACKET_LENGTH | Body shorter than 52 bytes. |
| 40 | 0x28 | ERROR_INVALID_SN_OR_DENOMINATION | Denomination/serial is not a coin this RAIDA holds. |
| 198 | 0xC6 | ERROR_INVALID_PARAMETER | Negative fee, a class-rejection value that is neither 0 nor a denomination in −8…+6, a name length over 63, or name lengths inconsistent with the body size. |
| 200 | 0xC8 | ERROR_INVALID_AN | AN does not match the stored AN. Nothing is written. |
| 252 | 0xFC | ERROR_INTERNAL | Database failure. |
Common mistakes
Sending the fee as a float or decimal string
The fee field is a binary big-endian int64 in 10−8 CC units. 10992.934002 CC goes on the wire as 00 00 00 FF F2 FE 1C 88, not as text and not as IEEE floating point.
Expecting created_at to update
Re-posting refreshes updated_at only. created_at keeps its original value by design — it is the anti-scam account-age signal.
Posting to fewer than 25 RAIDAs
Each RAIDA’s directory is independent. A record posted to only some servers will be missing from searches served by the others; re-post to all 25.