Rusty Russell [ARCHIVE] on Nostr: 📅 Original date posted:2021-04-20 📝 Original message: Christian Decker ...
📅 Original date posted:2021-04-20
📝 Original message:
Christian Decker <decker.christian at gmail.com> writes:
> Rusty Russell <rusty at rustcorp.com.au> writes:
>>> This is in stark contrast to the leader-based approach, where both
>>> parties can just keep queuing updates without silent times to
>>> transferring the token from one end to the other.
>>
>> You've swayed me, but it needs new wire msgs to indicate "these are
>> your proposals I'm reflecting to you".
>>
>> OTOH they don't need to carry data, so we can probably just have:
>>
>> update_htlcs_ack:
>> * [`channel_id`:`channel_id`]
>> * [`u16`:`num_added`]
>> * [`num_added*u64`:`added`]
>> * [`u16`:`num_removed`]
>> * [`num_removed*u64`:`removed`]
>>
>> update_fee can stay the same.
>>
>> Thoughts?
>
> So this would pretty much be a batch-ack, sent after a whole series of
> changes were proposed to the leader, and referenced by their `htlc_id`,
> correct? This is one optimization step further than what I was thinking,
> but it can work. My proposal would have been to either reflect the whole
> message (nodes need to remember proposals they've sent anyway in case of
> disconnects, so matching incoming changes with the pending ones should
> not be too hard), or send back individual acks, containing the hash of
> the message if we want to safe on bytes transferred. Alternatively we
> could also use reference the change by its htlc_id.
[ Following up on an old thread ]
After consideration, I prefer alternation. It fits better with the
existing implementations, and it is more optimal than reflection for
optimized implementations.
In particular, you have a rule that says you can send updates and
commitment_signed when it's not your turn, and the leader either
responds with a "giving way" message, or ignores your changes and sends
its own.
A simple implementation *never* sends a commitment_signed until it
receives "giving way" so it doesn't have to deal with orphaned
commitments. A more complex implementation sends opportunistically and
then has to remember that it's committed if it loses the race. Such an
implementation is only slower than the current system if that race
happens.
I've been revisiting this because it makes things like splicing easier:
the current draft requires stopping changes while splicing is being
negotiated, which is not entirely trivial. With the simplified method,
you don't have to wait at all.
Cheers,
Rusty.
Published at
2023-06-09 13:02:18Event JSON
{
"id": "2c0e00d0129db8e488e3948a126df3af8527e78b520aaf469de8e5a534523c31",
"pubkey": "13bd8c1c5e3b3508a07c92598647160b11ab0deef4c452098e223e443c1ca425",
"created_at": 1686315738,
"kind": 1,
"tags": [
[
"e",
"5553893599fc04c98be25342f54aa462a3c042c383d72c4c91ba0e2e16004f4c",
"",
"reply"
],
[
"p",
"9456f7acb763eaab2e02bd8e60cf17df74f352c2ae579dce1f1dd25c95dd611c"
]
],
"content": "📅 Original date posted:2021-04-20\n📝 Original message:\nChristian Decker \u003cdecker.christian at gmail.com\u003e writes:\n\u003e Rusty Russell \u003crusty at rustcorp.com.au\u003e writes:\n\u003e\u003e\u003e This is in stark contrast to the leader-based approach, where both\n\u003e\u003e\u003e parties can just keep queuing updates without silent times to\n\u003e\u003e\u003e transferring the token from one end to the other.\n\u003e\u003e\n\u003e\u003e You've swayed me, but it needs new wire msgs to indicate \"these are\n\u003e\u003e your proposals I'm reflecting to you\".\n\u003e\u003e\n\u003e\u003e OTOH they don't need to carry data, so we can probably just have:\n\u003e\u003e\n\u003e\u003e update_htlcs_ack:\n\u003e\u003e * [`channel_id`:`channel_id`]\n\u003e\u003e * [`u16`:`num_added`]\n\u003e\u003e * [`num_added*u64`:`added`]\n\u003e\u003e * [`u16`:`num_removed`]\n\u003e\u003e * [`num_removed*u64`:`removed`]\n\u003e\u003e\n\u003e\u003e update_fee can stay the same.\n\u003e\u003e\n\u003e\u003e Thoughts?\n\u003e\n\u003e So this would pretty much be a batch-ack, sent after a whole series of\n\u003e changes were proposed to the leader, and referenced by their `htlc_id`,\n\u003e correct? This is one optimization step further than what I was thinking,\n\u003e but it can work. My proposal would have been to either reflect the whole\n\u003e message (nodes need to remember proposals they've sent anyway in case of\n\u003e disconnects, so matching incoming changes with the pending ones should\n\u003e not be too hard), or send back individual acks, containing the hash of\n\u003e the message if we want to safe on bytes transferred. Alternatively we\n\u003e could also use reference the change by its htlc_id.\n\n[ Following up on an old thread ]\n\nAfter consideration, I prefer alternation. It fits better with the\nexisting implementations, and it is more optimal than reflection for\noptimized implementations.\n\nIn particular, you have a rule that says you can send updates and\ncommitment_signed when it's not your turn, and the leader either\nresponds with a \"giving way\" message, or ignores your changes and sends\nits own.\n\nA simple implementation *never* sends a commitment_signed until it\nreceives \"giving way\" so it doesn't have to deal with orphaned\ncommitments. A more complex implementation sends opportunistically and\nthen has to remember that it's committed if it loses the race. Such an\nimplementation is only slower than the current system if that race\nhappens.\n\nI've been revisiting this because it makes things like splicing easier:\nthe current draft requires stopping changes while splicing is being\nnegotiated, which is not entirely trivial. With the simplified method,\nyou don't have to wait at all.\n\nCheers,\nRusty.",
"sig": "77174d63853e9baed06781f4fb4062ae9b58e9140c775551c9a5089aaf57e7666fda1d7c3f5a5a334f858a124c11b241517ef7d5eb45aad65a65e2316d52f476"
}