A ZAP field is an offset. Eight of these replies held a map, which has no
order to give one, so the reply could not cross between two processes at
all. Two more held values whose fields are every one unexported —
netip.AddrPort, time.Time — and those are worse: they are not refused, they
derive an EMPTY layout, so the reply crossed, reported no error and carried
nothing. GetNodeIPReply has one field, so its whole answer was blank. And a
health check says what it likes, so its details were an `any`, which has no
shape until it holds something.
Each map is now a list of a stated element type, ordered by the key it was
an object of. An address is the text netip already wrote for it, an instant
is three numbers, and a check details are the bytes of their own JSON —
the one shape an object, a string and a list all share.
The JSON does not move. Every list marshals to the object it replaced and
reads one back, and wire_test.go holds that against the old shape spelled
out as a literal rather than against itself. The order is new where there
was none: a map answered the same question two ways.
APIReply also states the status it carries, so the 503 a probe reads and
the healthy a person reads are one fact computed once.
A JSONTxID, a GetTxArgs, a GetBlockArgs and the ids inside them are what
P and X reply with, and each holds an ids.ID — [32]byte, bytes_fixed[32]
on the wire, which the derived codec refuses to carry. So none of those
calls could cross the op-call plane. zap_gen.go is generated by
zip.Codecs from the same layout the plane encodes against, and the JSON
edge does not move: encoding/json reads the tags and knows nothing about
a ZAP codec.
- Add zap/ package with zero-copy binary wire protocol
- Support for VM client/server communication over ZAP
- Wire format: [4-byte length][1-byte message type][payload]
- Includes sender, transport, and VM implementations