Shard Services Overview (Group 10)

Convert legacy CloudCoin (CCv1/CCv2) coins into current RAIDAX (CCv3) coins using a durable per-RAIDA credit ledger.

Overview

New path: 176 credit → 178 list free CCv3 SNs → 177 mint. CCv3 dens are 1 / 10 / 100 / 1k / 10k / 100k / 1M. Header status only (250 ok, 243 mixed, 242 fail); 178 also returns a status byte per denomination. 172/174/175 stay for Go and older core.

Commands

CodeNameRole
176convert_authenticateAuthenticate legacy CCv1/CCv2 coins, delete passers, and credit a durable per-RAIDA ledger under a transaction id.
178convert_get_snsDiscover free CCv3 serial numbers — up to 1,020 per denomination, starting at a client-chosen SN. Requires the transaction ID opened by 176 on this RAIDA. Command 172 is not used.
177convert_pickupSpend ledger credits by minting client-chosen CCv3 coins with client-supplied ANs.

Flow

  1. 176 — txid + CT type byte + DN+SN+AN coin records. One coin type (CCv1 or CCv2) per request; both types may be credited to one txid in separate requests. Server computes face, fsyncs due, then deletes. COUNT=0 reads the due.
  2. 178 — Free CCv3 SNs, up to 1,020 per denomination, searched from a client-chosen start SN (txid required). Per-denomination status: 0 = contiguous from start, 1 = full list returned, 2 = first/last-available hints. Client keeps SNs free on ≥13 nodes.
  3. 177 — Same DN+SN list to all 25, each coin with a client-generated AN. Over-due → 92, whole call fails, credits remain. Busy SN → that bit 0 (243). Multiple pickups ok. Row kept as tombstone until 30-day GC.

Security: the transaction ID is a random 16-byte client secret and the pickup password, different on each of the 25 RAIDAs, so one node's knowledge is useless on the others. The server never stores the raw txid — the ledger row is keyed by SHA-256(txid), so reading the ledger database yields nothing spendable. There is no seed. The new coins' ANs are client-generated, one random AN per coin per RAIDA, stored by the client before sending 177. Ledger on disk; keys (key,shard,sn) / (key,den,sn). Expiry refreshes 30 days on every successful call.

Legacy (still dispatched)

170 page-reserve switch. 171 old pickup (unused). 172 GetSNs — Go + older core, 4-byte SI unchanged. 174 XOR switch — Go. 175 no-sum switch — older core. 173 never dispatched.