watchtower: start using the DeleteSession message (watchtowers)

https://github.com/lightningnetwork/lnd/pull/7069

Host: ellemouton  -  PR author: ellemouton

Notes

  • It would be good to have a high level understanding of how watchtowers work and to understand what type of data the watchtower client needs to send to the watchtower server. The watchtower/wtwire package is a good place to start.
  • The second last commit in the PR, titled lntest/itest: add session deletion itest, adds a new itest to test changes in the PR. Reading this test could be a useful way to understand the end goal of the PR before jumping into the individual commits.

Questions

  • Did you review the PR? If yes, what’s your overall verdict? (ACK, NACK, concept ACK, unknown)
  • What is a watchtower “session”?
  • This PR makes use of an existing message, DeleteSession, that has just not been used yet. Why is it that the client needs to send this message to the watchtower server? What happens if this message is not ever sent to the server? Why can’t the server just determine by itself when the session should be deleted?
  • Why is migration6 required?
  • When is a session considered “closable”? In other words, when is it ok to send the DeleteSession method?
  • What is the purpose of the point of the new SessionCloseRange config option? Is it ok to just set this option to zero? If not, why not?
  • Any other questions?