What is involved in the "database compaction" of a Lightning Network node?

As lightning network channels route payments, channel updates require the 2 channel peers (Alice & Bob) to do a round of signing and trade commitment transactions for the most up-to-date channel balance.

Is this the primary reason that the channel.db file may grow so dramatically?

For each update, Alice must keep a full record of all revocation keys from all past commitment transactions in case Bob broadcasts an invalid past channel state. If these keys are deleted, Alice will be vulnerable to Bob stealing money and Alice would not be able to create & broadcast the correct penalty transaction to punish Bob.

Database compaction is typically run on startup of the node, but what exactly is involved in that compaction? Are the revocation keys being indexed / compressed in some lossless/recoverable fashion?

Do other implementations than LND have the same process?



from Recent Questions - Bitcoin Stack Exchange https://ift.tt/iwgtk3I
via IFTTT

Comments

Popular posts from this blog

Do Kwon’s Detention Prolonged Until 2024 As Montenegro Responds To Extradition Requests

Sam Bankman-Fried Trial Begins Tomorrow: 3 Reasons Ex-SEC Official Foresees Conviction

Ethereum Price Plummets 9% As Fed Chair Passes Hawkish Remarks