lnd icon indicating copy to clipboard operation
lnd copied to clipboard

[WIP] wtclient: replay pending and unacked updates

Open ellemouton opened this issue 3 years ago • 2 comments

This PR demonstrates 3 main issues and fixes 2 of them at the moment:

  1. If backupTasks have been "bound" to a session's pendingQueue and then the associated Tower is removed, those pending updates are just quietly lost at the moment. This PR makes sure that these tasks are "unbound" and replayed onto the main task pipeline.
  2. If a CommittedUpdate has been persisted but the session does not respond with an Ack and then the client requests to remove the tower, this will currently fail with "tower has unacked updates". However, since these updates are still on the session's pending queue, they can still be recovered and replayed onto the main task pipeline as long as LND is not restarted since then the task is lost from the pending queue.
  3. As a follow up from 2, we demonstrate that if LND is restarted between the CommittedUpdate being persisted and the client requesting that the tower be removed, then this will fail with "tower has unacked updates". This PR does not fix this issue (yet) as im trying to determine if we can actually recover the info we need to to be able to reconstruct the backupTask

Fixes https://github.com/lightningnetwork/lnd/issues/4420

ellemouton avatar Sep 07 '22 12:09 ellemouton

@Bladez1753 , accidental comment?

ellemouton avatar Sep 08 '22 09:09 ellemouton

@ellemouton, remember to re-request review from reviewers when ready

lightninglabs-deploy avatar Oct 06 '22 11:10 lightninglabs-deploy

note to myself to checkout this failure: https://github.com/lightningnetwork/lnd/actions/runs/5011209617/jobs/8981798576?pr=6895

ellemouton avatar May 18 '23 13:05 ellemouton

Concept Ack

saubyk avatar Jun 07 '23 00:06 saubyk

@ellemouton, remember to re-request review from reviewers when ready

lightninglabs-deploy avatar Jul 17 '23 12:07 lightninglabs-deploy

We got the approvals. Retagged it for 0.17.0

saubyk avatar Jul 18 '23 18:07 saubyk