You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
multi: add revocation AuxSig signing and verification
When revoking a commitment via RevokeAndAck, sign both spending paths
(success and timeout) for each in-flight HTLC's second-level virtual
transaction. The signatures are packed into an HTLC-index-tagged blob
that the receiver can match to HTLCs unambiguously, regardless of
ordering differences between local and remote commitment views.
On the receiving side, verify all signatures against the breach-time
key ring before accepting the revocation. Store both primary and
alternate path signatures in the revocation log so the honest party
can reconstruct valid proofs for whichever spending path the
breaching party used on-chain.
Both signing and verification are gated by IsDeterministicHTLCs
(formerly IsSigHashDefault), ensuring backward compatibility with
peers that have not negotiated the feature.
Key changes:
- Add signLocalHtlcAuxSigs to produce dual-path AuxSigs per HTLC
- Add verifyRevocationAuxSigs to validate sigs at ReceiveRevocation
- Add injectRevocationAuxSigs to store sigs in the revocation log
- Add HTLC-index-tagged pack/unpack format for revocation sig blobs
- Add AuxSigAlt field to AuxSigDesc for alternate spending path
- Add IncomingHTLCLookup to BaseAuxJob for correct aux output lookup
when Incoming is flipped for alternate spending path generation
- Add WhoseCommit, HtlcTimeout fields to BaseAuxJob
- Add CustomRecords field to RevokeAndAck for carrying aux sig blobs
- Rename IsSigHashDefault to IsDeterministicHTLCs
- Use ResolveHtlcSigHashType instead of hardcoded SigHashAll
- Add ConfirmHeight to AuxNotifyOpts for porter height hints
0 commit comments