Skip to content
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: bad update_fee after shutdown when all HTLCs cleared. #367

Conversation

rustyrussell
Copy link
Collaborator

I got an unexpected update_fee message after shutdown exchange,
which is currently legal:

A: shutdown (no htlcs)
B: receive shutdown
B: reply with shutdown & closing_signed

A: send update_fee & commitment_signed
A: receive shutdown

Simplest to ban any updates (currently, just update_fee) from adding a
new commitment tx while we're at the end of shutdown.

Signed-off-by: Rusty Russell [email protected]

rustyrussell added a commit to rustyrussell/lightning that referenced this pull request Jan 30, 2018
rustyrussell added a commit to rustyrussell/lightning that referenced this pull request Feb 1, 2018
rustyrussell added a commit to rustyrussell/lightning that referenced this pull request Feb 2, 2018
cdecker pushed a commit to rustyrussell/lightning that referenced this pull request Feb 2, 2018
cdecker pushed a commit to ElementsProject/lightning that referenced this pull request Feb 2, 2018
HTLCs will be added or accepted. Once any HTLCs are cleared, the peer
may immediately begin closing negotiation, so we ban further updates
the commitment transaction (in particular, `update_fee` would be
possible otherwise).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: to the commitment transaction.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed!

I got an unexpected update_fee message after `shutdown` exchange,
which is currently legal:

A: shutdown (no htlcs)
                          B: receive shutdown
                          B: reply with shutdown & closing_signed

A: send update_fee & commitment_signed
A: receive shutdown

Simplest to ban any updates (currently, just update_fee) from adding a
new commitment tx while we're at the end of shutdown.

Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell rustyrussell force-pushed the dont-send-feechange-at-end-of-shutdown branch from ba03a76 to 5f998e5 Compare February 5, 2018 23:41
@rustyrussell rustyrussell merged commit 120003e into lightning:master Feb 5, 2018
@rustyrussell
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants