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

FieldBytesDescription
CH (challenge)16Standard 16-byte challenge (challenge-response / replay protection).
SI (session id)4Client-chosen session id; pages are reserved under this id for the pickup step.
SH (shard id)1Source shard (1 = CloudCoin v1, 2 = SuperCoin v2).
ST1Reserved / shard sub-type byte.
SM (sum AN)16XOR-sum authenticity number authorizing deletion of the whole batch.
coinsvarRepeating old-coin id: DN(1) + SN(4) = 5 bytes each.
EOF2Terminator (0x3E3E).

Response Body parameters

FieldBytesDescription
(per denomination, repeating)varSame 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.