switch_shard_sum — Group 10, Code 170
Delete a batch of legacy/other-shard coins (verified by one XOR-sum AN) and reserve fresh destination SNs on this RAIDA.
Source-derived reference
Field layout below is read from raidax/cmd_shards.c (cmd_switch_shard_sum). Minimum body size: 45 bytes. Verify against the current build before relying.
Purpose
Deletes the old coins on the source shard (legacy_delete / cc2_delete), then reserves free destination pages under the session id and returns their SNs. The matching new ANs are NOT set here; the client follows up with pickup_coins. Value cap: under 1,000,000.
Request Body parameters
| Field | Bytes | Description |
|---|---|---|
| CH (challenge) | 16 | Standard 16-byte challenge (challenge-response / replay protection). |
| SI (session id) | 4 | Client-chosen session id; pages are reserved under this id for the pickup step. |
| SH (shard id) | 1 | Source shard (1 = CloudCoin v1, 2 = SuperCoin v2). |
| ST | 1 | Reserved / shard sub-type byte. |
| SM (sum AN) | 16 | XOR-sum authenticity number authorizing deletion of the whole batch. |
| coins | var | Repeating old-coin id: DN(1) + SN(4) = 5 bytes each. |
| EOF | 2 | Terminator (0x3E3E). |
Response Body parameters
| Field | Bytes | Description |
|---|---|---|
| (per denomination, repeating) | var | Same range+single free-SN format as get_sns: DN(1) + NR(1) + NS(1) + ranges + singles. These are the destination SNs reserved (under SI) for the client to claim with pickup_coins. |