Anthony Towns [ARCHIVE] on Nostr: 📅 Original date posted:2021-12-09 📝 Original message: On Thu, Dec 09, 2021 at ...
📅 Original date posted:2021-12-09
📝 Original message:
On Thu, Dec 09, 2021 at 12:34:00PM +1100, Lloyd Fournier wrote:
> I wanted to add a theoretical note that you might be aware of. The final
> message "Bob -> Alice: revoke_and_ack" is not strictly necessary. Alice
> does not care about Bob revoking a commit tx that gives her strictly more
> coins.
That's true if Alice is only sending new tx's paying Bob; and Rusty's
examples in the `option_simplified_update` proposal do only include new
HTLCs...
But I think it's intended to cover *all* update messages, and if Alice is
also including any `update_fulfill_htlc` or `update_fail_htlc` messages in
the commitment, she's potentially gaining funds, both for the amount of
fees she saves by avoiding extra transactions, but for the fulfill case,
potentially also because she doesn't need to worry about the fulfilled
htlc reaching its timeout.
Actually, as an alternative to the `option_simplified_update` approach,
has anyone considered an approach more like this:
* each node can unilaterally send various messages that always update
the state, eg:
+ new htlc/ptlc paying the other node (update_add_htlc)
+ secret reveal of htlc/ptlc paying self (update_fulfil_htlc)
+ rejection of htlc/ptlc paying self (update_fail_htlc)
+ timeout of htlc/ptlc paying the other node (not currently allowed?)
+ update the channel fee rate (update_fee)
* continue to allow these to occur at any time, asynchronously, but
to make it easier to keep track of them, add a uint64_t counter
to each message, that each peer increments by 1 for each message.
* each channel state (n) then corresponds to the accumulation of
updates from each each peer, up to message (a) for Alice, and message
(b) for Bob.
* so when updating to a new commitment (n+1), the proposal message
should just include both update values (a') and (b')
* nodes can then track the state by having a list of
htlcs/ptlcs/balances, etc for state (n), and a list of unapplied
update messages for themselves and the other party (a+1,...,a') and
(b+1,...,b'), and apply them in order when constructing the new state
(n+1) for a new commitment signing round
I think that retains both the interesting async bits (anyone can queue
state updates immediately) but also makes it fairly simple to maintain
the state?
> Bob's new commit tx can use the same revocation key as the previous
> one
That's a neat idea, but I think the fail/fulfill messages break it.
_But_ I think that means it would still be an interesting technique to
use for fast forwards which get updated for every add message...
> Not sending messages you don't need to is usually
> both more performant and simpler
The extra message from Bob allows Alice to discard the adaptor sigs
associated with the old state, which I think is probably worthwhile
anyway?
Cheers,
aj
Published at
2023-06-09 13:04:40Event JSON
{
"id": "9f25d64838717c3f4ebd78baaa1ba1bd468cdf55d0ff45a903b7b6e3df593e14",
"pubkey": "f0feda6ad58ea9f486e469f87b3b9996494363a26982b864667c5d8acb0542ab",
"created_at": 1686315880,
"kind": 1,
"tags": [
[
"e",
"86d882af7142eecbdb4ce698181b82aaa475c9b46541e1e4831400616b496e77",
"",
"root"
],
[
"e",
"e0c947a65137b4a4cfd748d11296b31ded313b01e4f7231b2dcfc6be3f25d8de",
"",
"reply"
],
[
"p",
"b5ff7c704f90e4eebfa414c0a017a84544c32586a1bd2fc86c74c2914d03c25e"
]
],
"content": "📅 Original date posted:2021-12-09\n📝 Original message:\nOn Thu, Dec 09, 2021 at 12:34:00PM +1100, Lloyd Fournier wrote:\n\u003e I wanted to add a theoretical note that you might be aware of. The final\n\u003e message \"Bob -\u003e Alice: revoke_and_ack\" is not strictly necessary. Alice\n\u003e does not care about Bob revoking a commit tx that gives her strictly more\n\u003e coins.\n\nThat's true if Alice is only sending new tx's paying Bob; and Rusty's\nexamples in the `option_simplified_update` proposal do only include new\nHTLCs...\n\nBut I think it's intended to cover *all* update messages, and if Alice is\nalso including any `update_fulfill_htlc` or `update_fail_htlc` messages in\nthe commitment, she's potentially gaining funds, both for the amount of\nfees she saves by avoiding extra transactions, but for the fulfill case,\npotentially also because she doesn't need to worry about the fulfilled\nhtlc reaching its timeout.\n\nActually, as an alternative to the `option_simplified_update` approach,\nhas anyone considered an approach more like this:\n\n * each node can unilaterally send various messages that always update\n the state, eg:\n + new htlc/ptlc paying the other node (update_add_htlc)\n + secret reveal of htlc/ptlc paying self (update_fulfil_htlc)\n + rejection of htlc/ptlc paying self (update_fail_htlc)\n + timeout of htlc/ptlc paying the other node (not currently allowed?)\n + update the channel fee rate (update_fee)\n\n * continue to allow these to occur at any time, asynchronously, but\n to make it easier to keep track of them, add a uint64_t counter\n to each message, that each peer increments by 1 for each message.\n\n * each channel state (n) then corresponds to the accumulation of\n updates from each each peer, up to message (a) for Alice, and message\n (b) for Bob.\n\n * so when updating to a new commitment (n+1), the proposal message\n should just include both update values (a') and (b')\n\n * nodes can then track the state by having a list of\n htlcs/ptlcs/balances, etc for state (n), and a list of unapplied\n update messages for themselves and the other party (a+1,...,a') and\n (b+1,...,b'), and apply them in order when constructing the new state\n (n+1) for a new commitment signing round\n\nI think that retains both the interesting async bits (anyone can queue\nstate updates immediately) but also makes it fairly simple to maintain\nthe state?\n\n\u003e Bob's new commit tx can use the same revocation key as the previous\n\u003e one\n\nThat's a neat idea, but I think the fail/fulfill messages break it.\n_But_ I think that means it would still be an interesting technique to\nuse for fast forwards which get updated for every add message...\n\n\u003e Not sending messages you don't need to is usually\n\u003e both more performant and simpler \n\nThe extra message from Bob allows Alice to discard the adaptor sigs\nassociated with the old state, which I think is probably worthwhile\nanyway?\n\nCheers,\naj",
"sig": "423d1ed5fa181f18573b11d17dab17ee99996d56ec15f65cec61f5eb7461655956ea5920e6e8d8f9297445ea1251ad5e53dd1fba74edc0060115459cc7dce68a"
}