fix — Group 2, Code 80

Repair a disagreeing RAIDA using ticket-backed evidence.

Purpose

fix repairs a disagreeing RAIDA using evidence gathered from the wider network, commonly ticket material plus ownership-state knowledge. It is the direct repair step after discovery.

Legacy wire reference — verify before relying

This byte layout was restored from the pre-V2 documentation (commit ceba44b) and reflects the version-0 fix protocol. It has not been cross-checked against the current raidax implementation. fix2 is the second-generation repair path and may use a different layout.

How fix works

The client receives a "fail" from up to 12 RAIDA on a token. It requests tickets from 13 or more good RAIDA, then sends every ticket (good or empty) to each fracked RAIDA. The fracked RAIDA validates each ticket against the issuing RAIDA via validate_ticket. If 13 of 25 RAIDA agree on the same serial number, the fracked RAIDA rotates its AN to the PAN that the client supplies.

PAN derivation

The PAN for each serial number is computed deterministically from the RAIDA index, the coin's denomination + SN, and a 16-byte PAN Generator that the client sends:

Example

PAN = MD5(RAIDA_ID || denomination || serial_number || PAN_Generator)

Important: the client must send a different PAN Generator to each RAIDA, otherwise any RAIDA admin could compute every RAIDA's PAN and steal the token.

Request body

One 5-byte SN record per token (DN + SN), followed by the 16-byte PAN Generator, followed by 25 ticket slots (5 bytes each — sized to hold a 4-byte ticket plus padding; empty slots are zero-filled).

CH CH CH CH CH CH CH CH CH CH CH CH CH CH CH CH DN SN SN SN SN DN SN SN SN SN ... PG PG PG PG PG PG PG PG PG PG PG PG PG PG PG PG // 16-byte PAN Generator TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK // RAIDA 0-4 TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK // RAIDA 5-9 TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK // RAIDA 10-14 TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK // RAIDA 15-19 TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK TK // RAIDA 20-24 3E 3E

Response

All-pass and all-fail return only the terminator. Mixed returns a 5-byte mixed bitfield followed by a 4-byte Master Ticket plus the terminator.