← Dev log
Ferry·distributed & realtime

A chunk constant that could never have worked

A 64KiB bincode chunk plus envelope overhead and the Noise AEAD tag exceeds the 65535-byte max frame size, so every large send failed with PayloadTooLarge.

It could not have worked

A race, an ordering, one column holding two things. The shape ruled it out before the code ran.

net::chunk::DEFAULT_CHUNK_BYTES was 64KiB. A real bincode-encoded chunk at that size, plus envelope overhead — item id string, sequence number, length prefix, enum tag — plus the Noise AEAD tag, exceeds the 65535-byte max frame size. Every large send over a real channel would have failed with PayloadTooLarge.

It had never been caught because nothing had ever sent a real-sized chunk over a real authenticated channel using that constant. core::transfer had its own separate, smaller 32KiB constant, and that was the only one actually exercised. So there were two constants for one concept, and the wrong one was the exported default.

Fixed by lowering it to 32KiB and making it the single source of truth, deleting core's private copy. The two-node harness work is what surfaced it — the first thing to push real bytes through the real framing layer.