-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BOLT 2: forget the check about update_*
messages, and check what must not happens during shutdown
#972
Conversation
update_*
messages, and check what must not happensupdate_*
messages, and check what must not happens
update_*
messages, and check what must not happensupdate_*
messages, and check what must not happens during shutdown
Any thoughts @Crypt-iQ ? |
The changes look fine, but I think we should specify when it's ok to send closing_signed |
Right, agreed, this only does half of what #970 was doing, we still need to clarify the "when can you send closing_signed" part. |
Good point! In this case, we can use the same idea to simplify the code, with the following way:
What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK a16bfe9
Eclair already handles receiving update_fee
after shutdown
and actually also sends update_fee
if the feerate changes a lot, so this would align with our behavior.
Another good thing that we can introduce here @t-bast is how manage the However, we can also add a line to specify that
Where the unreasonable definition is up to the implementation, in this way we will solve also the problem to when send the |
That would be unnecessary, we only need to have this paragraph in the section about |
Today |
I assume this does not include HTLC removal updates? Just checking to make sure. This would imply if a peer removes an HTLC and sends a fee update you'll just force-close on them? |
lnd doesn't do shutdown until the channel state is totally clean. lnd won't force close if you send messages at this point, it will just drop them. this will be fixed once the spec is a little more clear |
Ah that's...an interesting interpretation of the spec. But in practice I'd imagine that means this isn't a big deal - update_fee after channel is clear should be really rare, but before of course it may be common. That said it does imply lnd is willing to relay/send over a channel that will always reject the HTLC :/ |
The rational around this commit is that a node should not care about what he receive but only about what it must not receive. The actual Close Channel spec tell us exactly when we need to fail, we need just to remove the confusing part related to the `update_*` Signed-off-by: Vincenzo Palazzo <[email protected]>
a16bfe9
to
6287f95
Compare
Mh! I jump on this PR because I was looking inside some work in lnprototest and I think this PR should add some additional info related to the message that is banned on the shutdown. or it is fine in this way? |
The rationale around this PR that is a simplification of #970 is that a node should not care about what it receives but only about what it must not receive. Just to quote @TheBlueMatt
The actual Close Channel spec tell us exactly when we need to fail, we need just to remove the confusing part related to the
update_*
messagesSo, the concept proposed is to use a black list of messages that a node should never receive during a shutdown, and the actual status the black list contains only is just an
add_htlc
.lnprototest reference implementation: rustyrussell/lnprototest#37