DRD List Set — Group 16, Code 144

Adds or updates entries on the caller’s white/black list, in batches of one or more 6-byte entries. Whitelisted users can send the owner QMail without paying the inbox fee; blacklisted users are denied. Setting an entry that already exists flips its type.

Quick reference

Command Group16 (DRD)
Command Code144 (0x90)
Server functioncmd_drd_list_set in cmd_drd.c
Request bodychallenge(16) + owner DN(1) SN(4) AN(16) + N × entry(6) + terminator(2). Minimum 45 bytes (N = 1).
AuthenticationOwner AN — only the list owner can modify it
Batch validationAll entries validated before any write; a bad entry rejects the whole batch
Success responseStatus 250, no payload
SemanticsUpsert per entry: new entries are added, existing entries have their type replaced

Request body

Diagram shows a single-entry request (45 bytes). Each additional entry appends 6 bytes before the terminator. LDN/LSN = listed user’s denomination/serial; TY = list type (00 white, 01 black).

Challenge random (12 bytes, part 1 of 2) 0 7 Challenge random (part 2) 8 11 Challenge CRC32 (BE) 12 15 DN 16 Owner Serial Number (BE) 17 20 AN (part 1 of 3) 21 23 Owner Authenticity Number (part 2 of 3) 24 31 AN (part 3 of 3) 32 36 LDN 37 Listed SN... 38 39 Listed SN (cont.) 40 41 TY 42 3E 3E (term) 43 44
Request body layout, N entries

+-------------------+------------------------------+------------------------+------------+
| challenge/CRC     | owner identity + auth        | N x 6-byte entries     | terminator |
| 16 bytes          | DN(1) SN(4) AN(16)           | LDN(1) LSN(4) TY(1)    | 2 bytes    |
+-------------------+------------------------------+------------------------+------------+
| body[0..15]       | body[16..36]                 | body[37..37+6N-1]      | 3E 3E      |
+-------------------+------------------------------+------------------------+------------+
total = 39 + 6N bytes
Body offsetSizeFieldDescription
0–1516Challenge12 random bytes + big-endian CRC32 of them.
161Owner denominationList owner’s coin denomination.
17–204Owner serial numberList owner’s coin serial number, big-endian.
21–3616Owner ANVerified against the coin database before anything is written.
37 + 6i1Listed denominationEntry i: denomination of the user being listed.
38 + 6i4Listed serial numberEntry i: serial of the user being listed, big-endian.
42 + 6i1List type0x00 whitelist, 0x01 blacklist. Any other value rejects the whole batch.
last 22TerminatorFixed 3E 3E. The entry region must be an exact multiple of 6 bytes.

Response

Status-only. 250 means every entry in the batch was written (added or type-updated). On ERROR_INVALID_PARAMETER (bad list type) nothing was written — entries are validated before the first database write.

Status codes

DecimalHexSymbolMeaning
2500xFASTATUS_SUCCESSAll entries written.
160x10ERROR_INVALID_PACKET_LENGTHBody under 45 bytes.
390x27ERROR_COINS_NOT_DIVEntry region is not a multiple of 6 bytes.
400x28ERROR_INVALID_SN_OR_DENOMINATIONOwner denomination/serial is not a coin this RAIDA holds.
1980xC6ERROR_INVALID_PARAMETERA list type byte was neither 0x00 nor 0x01. Nothing written.
2000xC8ERROR_INVALID_ANOwner AN mismatch. Nothing written.
2520xFCERROR_INTERNALDatabase failure mid-batch; earlier entries in this request may have been written. Safe to retry — the operation is idempotent.

Common mistakes

Listed users are not validated

The listed denomination/serial is stored as-is. You can whitelist a user who has no directory record yet (or ever); the entry simply applies whenever that coin identity sends mail.

White and black are one table

A user cannot be on both lists. Setting an existing entry with a different type moves them between lists; it does not create a second entry.