Why Nostr? What is Njump?
2023-06-09 12:46:05
in reply to

Pierre [ARCHIVE] on Nostr: 📅 Original date posted:2016-04-01 📝 Original message: Hello all, I noticed in ...

📅 Original date posted:2016-04-01
📝 Original message:
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
field
- at the transport level (including the reconnect scenario) I would
rely on the acknowledge field to know which messages should be
replayed

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

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
else?

Cheers,

Pierre
Author Public Key
npub1yz88535e0ydqye9q9x8l5cz9d3g6ervfjgyk5xm88zvktmxvstlsuy4pdt