store_sum — Group 8, Code 82

Store by sum proof.

Purpose

store_sum is the compact-batch sibling of 80 store. It accepts an aggregate proof instead of one full AN per coin, reducing wire size when the client already has a stable summed proof.

Legacy wire reference — verify before relying

This byte layout was restored from the pre-V2 documentation (commit ceba44b). It has not been cross-checked against the current raidax implementation in every detail.

Request body

One 5-byte DN+SN record per coin in the locker, followed by a single 16-byte aggregate SU sum and the terminator.

CH CH CH CH CH CH CH CH CH CH CH CH CH CH CH CH DN SN SN SN SN // first coin in the locker DN SN SN SN SN // second coin in the locker ... SU SU SU SU SU SU SU SU SU SU SU SU SU SU SU SU // 16-byte XOR sum of all per-coin ANs 3E 3E

The sum is computed with the same XOR-accumulator algorithm used by detect_sum: convert each AN to four little-endian 32-bit integers, XOR into a 4-int accumulator, serialize the accumulator back to 16 bytes.

Response

Status only. 241 = sum verified and locker stored; 242 = sum did not match (run 80 store per-coin to find which AN is wrong).