Prop#340: Move stream_id to body so it is optional
IIRC, some months ago, @nickm asked @dgoulet and me if we want the stream_id in the message header or not, for Prop340. It is looking like the answer is "no". The following commands would reduce overhead and/or round trips with packed cells, but have no stream_id:
- RELAY_COMMAND_CONFLUX_LINK, RELAY_COMMAND_CONFLUX_LINKED, RELAY_COMMAND_CONFLUX_LINK_ACK
- RELAY_COMMAND_CONFLUX_SWITCH
- RELAY_COMMAND_SENDME
In fact, most relay commands have stream_id 0, and would omit it if it was optional, saving room for other data. It looks like only 8 commands use stream_id.
I think we should move stream_id to message_body for Prop#340 only for the commands that use it, unless there is a super-compelling reason to have it in the message header.
Additionally, for congestion control, it would be optimal if an integer number of cells fit cleanly into a TLS record and outbuf. Wide circuit IDs made them 514 bytes, though, which means we end up with partial cells in both of these locations.
Is it possible to also adjust the total cell length to be 512 bytes, for these packed cells, as part of this proposal, since it depends on circuit crypto upgrades too?