Laundry list of inter-peer wire protocol changes



Summary:

In this email thread, Rusty Russell is discussing the use of a binary format for encrypted messages instead of a text-based one like JSON. He suggests using protobuf as a good choice for this. However, to keep the JSON users happy, he plans on providing a binary with crypto and generated JSON interface. Rusty also discusses two changes in the protocol: length prefix for initial key exchange and HTLC pipelining. The former refers to using a length word before exchanging a 33-byte EC key for DH, which will allow extension later if needed. For the latter, lnd's protocol supports multiple in-flight HTLC negotiations, which increases throughput but adds complexity. Lightning-c uses a simple one-at-a-time scheme with alternating priority. Lastly, Rusty mentions the use of shachain vs elkrem for generating revocation secrets for old commitment txs. He likes both but prefers shachain and plans on writing a better explanation for it.


Updated on: 2023-05-23T22:06:50.229317+00:00