Acknowledgements in BOLT #2



Summary:

Pierre had raised concerns about the placement of acknowledgements in BOLT #2, which Rusty agrees with, and wants to document. The current draft has an "acknowledge" field in the header, indicating the number of non-"authenticate" messages received and processed so far. This helps know what the other side has received when they send an "update_commit" message and to restart the conversation after reconnecting through the "authenticate" message. However, the current spec requires that acks never go backwards, meaning an implementation needs to write persistently to disk before every new packet sent. To avoid this, Rusty suggests moving the "ack" back into the update_commit/authenticate messages. Doing so would allow retransmission from previous received update_revocation on reconnect, and fee updates should work too. An implied "ack" is already present in the update_revocation message, which corresponds to the update_commit. One will need to be added to the "authenticate" message, used for connection re-establishment. Rusty states that this change is not significant and can be implemented easily through callbacks when a packet is acked. It will fire all at once when receiving an update_commit/update_revocation packet. Rusty plans to implement this and report back if anything is missed.


Updated on: 2023-05-23T23:24:11.374955+00:00