[Lightning-dev] Acknowledgements in BOLT #2

Pierre pm+lists at acinq.fr
Fri Apr 1 13:32:15 UTC 2016

Hello all,

I noticed in the meantime Rusty recently introduced htlc ids in the
form of absolute "lnd-like 64 bits unique id" vs the previous relative
"order-I-added-them-in" id. I like it better and I think this is
closely related to the issue at hand.

> This is used so we know what the other side has received when they send
>an "update_commit" message, and so we know where to restart the
>conversation after reconnect ("authenticate" message).

To me those two cases should be handled differently because they do
not happen at the same level:
- at the protocol level I would only use the htlc id. It is currently
already used in add/fulfill/fail, so it would make sense to have it in
the update_commit msg as well, instead of relying on the acknowledge
- at the transport level (including the reconnect scenario) I would
rely on the acknowledge field to know which messages should be

Yes it is kind of redundant, and probably less optimal, but it does
separate clearly the transport from the protocol and testing might be

Also @lnd guys: what's the thing with odd/even htlc ids? Is it just so
that we can use the same keyspace for incoming/outgoing htlcs and
quickly tell the direction of a given htlc, or is there something



More information about the Lightning-dev mailing list