According to BOLT #3, when constructing a HTLC output in the version of the local node (both received and offered HTLC), it requires that the payment to the local node is locked with
CHECKMULTISIG opcode that requires both
remotehtlcsig in order to spend it.
As far as what I have seen, nodes do not exchange their htlcsignatures (although we can derive the htlc public keys through basepoint).
So the question: suppose after I receive an HTLC from a node and I successfully pass it to the other nodes, the node that sent the HTLC to me became unresponsive. Now I will need to broadcast my version of the commitment transaction to the Bitcoin blockchain so that I can claim the funds that are locked with the
payment_hash (when I receive one). But, in order to spend that output, my witness stack will need to have
0 <remotehtlcsig> <localhtlcsig> <payment_preimage>. Now, if the remote node is offline, how will I get my hands on the
remotehtlcsig in order to get back the funds locked in the HTLC?
Just to provide additional details, below is a local node version of the received HTLC output according to BOLT #3
# To remote node with revocation key OP_DUP OP_HASH160 <RIPEMD160(SHA256(revocationpubkey))> OP_EQUAL OP_IF OP_CHECKSIG OP_ELSE <remote_htlcpubkey> OP_SWAP OP_SIZE 32 OP_EQUAL OP_IF # To local node via HTLC-success transaction. OP_HASH160 <RIPEMD160(payment_hash)> OP_EQUALVERIFY 2 OP_SWAP <local_htlcpubkey> 2 OP_CHECKMULTISIG OP_ELSE # To remote node after timeout. OP_DROP <cltv_expiry> OP_CHECKLOCKTIMEVERIFY OP_DROP OP_CHECKSIG OP_ENDIF OP_ENDIF