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

Removed requirement to broadcast an outdated commitment transaction #942

Merged
merged 2 commits into from
Jan 17, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions 05-onchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,16 @@ A node:
sufficient fee:
- SHOULD use this fee to perform a *mutual close*.
- otherwise:
- MUST use the *last commitment transaction*, for which it has a
- if the node knows or assumes its channel state is outdated it
- MUST NOT broadcast its *last commitment transaction*.
- SHOULD send an `error`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems related to #932. I think this is a weird place to add this requirement as BOLT 2 is where we define the p2p interaction, while BOLT 5 so far has been reserved primarily for on chain interaction. In other words, this seems to sort of "breach" layers.

This was discussed during the latest dev call, with some inclination to sort of merge this and #932, remove this line (as it's in #932) and keep the rest of the diff.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@lightning-developer I've prepared a commit on top of your branch that does this: t-bast@ae2d1e9

Can you cherry-pick it and update this PR? We can then include it and simply close #932.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done as requested.

- otherwise:
- MUST broadcast the *last commitment transaction*, for which it has a
signature, to perform a *unilateral close*.
- MUST spend any `to_local_anchor` output, providing sufficient fees as incentive to include the commitment transaction in a block
- MUST spend any `to_local_anchor` output, providing sufficient fees as incentive to include the commitment transaction in a block
Special care must be taken when spending to a third-party, because this re-introduces the vulnerability that was
addressed by adding the CSV delay to the non-anchor outputs.
- SHOULD use [replace-by-fee](https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki) or other mechanism on the spending transaction if it proves insufficient for timely inclusion in a block.
- SHOULD use [replace-by-fee](https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki) or other mechanism on the spending transaction if it proves insufficient for timely inclusion in a block.

## Rationale

Expand Down