mirror of
https://github.com/luxfi/proto.git
synced 2026-10-30 15:21:09 +00:00
Three fields the protocol defines, the senders fill and the receivers read were never written to the wire. Chits.AcceptedHeight was dropped by marshalChits, so every Chits a responder sent arrived claiming height zero whatever frontier it had answered from. Handshake.AllChains and GetPeerList.AllChains were dropped the same way, so a node started with --track-all-chains asked for every network's IPs and every peer read the bit as false and answered as though it had never asked. All three go on the tail under the convention the Handshake already uses for IpMldsaSig and Chains: written unconditionally, read behind HasMore. A peer too old to write them ends its frame early and the field keeps the zero it has carried all along, and a decoder too old to read them stops where it always stopped. No flag day. TestHandshakeChainsEmptyIsNotAbsent built a legacy frame by chopping the last four bytes, which assumed Chains was the tail. It now truncates at each appended field in turn and checks every vintage decodes, and the lying-count test writes to the count where the count now sits. Co-authored-by: Hanzo Dev <[email protected]>