Description
I am confused with the sending node requirements here at the bullet point "if there are updates pending on the receiving node's commitment transaction". The general overview under number 1 and diagram lead me to believe that sending shutdown
with committed HTLC's is fine. So I think the referenced bullet point above is referring to uncommitted updates instead. If so, does this count HTLC's where we owe signatures to the remote party?
A B
<--add--
<--sig---
---rev-->
---shutdown-->
// allowed even though the add may be considered a "pending" update depending on your terminology?
My second point of confusion involves both the sending node and the receiving node requirements. The sending node "SHOULD fail to route any HTLC added after it has sent shutdown". Here I am assuming that this is when the sending node is receiving HTLC's from the counter-party as the sender routing through the channel they just sent a shutdown on would be a spec-violation. The receiving node "once there are no outstanding updates on the peer, UNLESS it has already sent a shutdown... MUST reply to a shutdown message with a shutdown". These two requirements seem to be at odds with one another, let's assume A & B start on a clean commitment state:
A B
--shutdown-->
<-----add----
Let's say that B received the shutdown message and then sent the add. While it is a spec violation (as B should have sent shutdown), A is unable to do anything here. It could be the case that B sent the add before receiving the shutdown message, and A has already sent the shutdown message. My question boils down to this: when does it become appropriate for A to enforce that B sends a shutdown if there is a clean channel state, rather than sending more HTLC's? If the answer is never, then the "MUST reply to a shutdown message with a shutdown" could use wording instead of "MUST".