LIGHTNING-HOOK-COMMITMENT_REVOCATION(7)
π 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:
- Proposal of a new state commitment in the form of a commitment transaction
- Exchange of signatures for the agreed upon commitment transaction
- Verification that the signatures match the commitment transaction
- 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) β thechannel_idfor 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
- nixpkgs unstable: clightning 26.06.9
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms