LIGHTNING-HOOK-COMMITMENT_REVOCATION(7)

πŸ“¦
version 26.06.9 Β· 2 versions
, in nixpkgs unstable

πŸ’– commitment_revocation: the hook for revoked commitment transactions πŸ’–

bestie, you're reading the LIGHTNING-HOOK-COMMITMENT_REVOCATION(7) manual page, and honestly? It's giving "niche Unix knowledge but make it cute." No cap.


✨ NAME ✨

commitment_revocation β€” Hook fired when a commitment transaction is revoked. Periodt. πŸ’…


🌸 DESCRIPTION 🌸

okay so the commitment_revocation hook gets called whenever a channel state is updated and the old state was revoked. State updates in Lightning consist of the following steps:

  1. Proposal of a new state commitment in the form of a commitment transaction
  2. Exchange of signatures for the agreed upon commitment transaction
  3. Verification that the signatures match the commitment transaction
  4. Exchange of revocation secrets that could be used to penalize an eventual misbehaving party

The commitment_revocation hook is used to inform the plugin about the state transition being completed, and deliver the penalty transaction. The penalty transaction could then be sent to a watchtower that automatically reacts in case one party attempts to settle using a revoked commitment.

Heads up, bestie: this is a chained hook, which means multiple plugins may be registered. 🫢


πŸŽ€ HOOK PAYLOAD πŸŽ€

  • commitment_txid (txid) β€” the txid of the revoked commitment transaction.
  • penalty_tx (hex) β€” the penalty transaction that can spend the revoked commitment. Can be sent to a watchtower for enforcement.
  • channel_id (hash) β€” the channel_id for which the revocation occurred. (added v0.10.2)
  • commitnum (u64) β€” the commitment number identifying the revoked state. (added v0.10.2)

πŸ’… HOOK RETURN πŸ’…

  • result (string) (always "continue") β€” Plugins should always return "continue", otherwise subsequent hook subscribers would not get called.

Signed, sealed, slayed: this is from Core Lightning v26.06.9, manual LIGHTNING-HOOK-COMMITMENT_REVOCATION(7). mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from