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
Published at
2023-06-09 12:46:05Event JSON
{
"id": "c7651fa4d3df432c51f0aa6030d80ad668f5442882ea2515f3817f006c811fbb",
"pubkey": "208e7a4699791a0264a0298ffa60456c51ac8d8992096a1b67389965eccc82ff",
"created_at": 1686314765,
"kind": 1,
"tags": [
[
"e",
"9526f7c7c06d2c44ce2bb2e0282c88fd2229736f99d283465fab3bfc507e5ee9",
"",
"reply"
],
[
"p",
"9456f7acb763eaab2e02bd8e60cf17df74f352c2ae579dce1f1dd25c95dd611c"
]
],
"content": "📅 Original date posted:2016-04-01\n📝 Original message:\nHello all,\n\nI noticed in the meantime Rusty recently introduced htlc ids in the\nform of absolute \"lnd-like 64 bits unique id\" vs the previous relative\n\"order-I-added-them-in\" id. I like it better and I think this is\nclosely related to the issue at hand.\n\n\u003e This is used so we know what the other side has received when they send\n\u003ean \"update_commit\" message, and so we know where to restart the\n\u003econversation after reconnect (\"authenticate\" message).\n\nTo me those two cases should be handled differently because they do\nnot happen at the same level:\n- at the protocol level I would only use the htlc id. It is currently\nalready used in add/fulfill/fail, so it would make sense to have it in\nthe update_commit msg as well, instead of relying on the acknowledge\nfield\n- at the transport level (including the reconnect scenario) I would\nrely on the acknowledge field to know which messages should be\nreplayed\n\nYes it is kind of redundant, and probably less optimal, but it does\nseparate clearly the transport from the protocol and testing might be\neasier.\n\nAlso @lnd guys: what's the thing with odd/even htlc ids? Is it just so\nthat we can use the same keyspace for incoming/outgoing htlcs and\nquickly tell the direction of a given htlc, or is there something\nelse?\n\nCheers,\n\nPierre",
"sig": "26a1332a2ba2631c677c78dd9edbacffd2978ceaf7f727bc61ed7955faac321fef0febe7187db0970bd30ccf248b92cac901288f0c52bf424167af1af5af2931"
}