mirror of
https://github.com/luxfi/api.git
synced 2026-09-24 00:24:53 +00:00
dc7d3dbe612b6840b4ce1f273506d083cabc2f39
Message types must stay under 0x40 because MsgErrorFlag IS 0x40: a type with bit 6 set arrives indistinguishable from an error response, so every reply to it decodes as a remote error whose text is the raw response bytes. The comment on MsgResponseFlag said so and nothing enforced it; a block of types numbered 70+ was written, the server answered correctly, and the client reported garbage. validators.State has eight methods and no eight-wide run remains below the limit, so a type per method could not be spelled correctly even once. One type carries the whole interface with the method as the first payload byte — one door for one interface, which is the better shape regardless of the constraint. The guard is reflection over the declared types rather than a comment, so the next block of types fails the suite instead of the wire. Co-authored-by: Hanzo Dev <[email protected]>
Languages
Go
79.5%
Cap'n Proto
12.8%
ZAP
7.7%