-
Notifications
You must be signed in to change notification settings - Fork 901
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
Shutdown fixes #847
Merged
Merged
Shutdown fixes #847
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Looks like this needs more testing... |
Fixes: #801 |
rustyrussell
force-pushed
the
shutdown-fixes
branch
from
February 1, 2018 03:11
bb6459a
to
d87d902
Compare
Has some
This is |
Yeah, suspect that's an unrelated issue, but I've fixed it once and for all, with the final commit. And rebased... |
rustyrussell
force-pushed
the
shutdown-fixes
branch
2 times, most recently
from
February 2, 2018 01:52
d6bb842
to
3288334
Compare
Had to fix a small conflict, will merge if CI is happy. |
See: lightning/bolts#367 Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
We shouldn't fail negotiation just because they exceeded what we thought fair: we're better off as long as it's actually <= final commitment fee. Signed-off-by: Rusty Russell <[email protected]>
This follows the proposal to make the funder send the first offer. The dual loops are because there's initially very little restriction on the amounts, then once they're first established they tighten as necessary. Signed-off-by: Rusty Russell <[email protected]>
This is a transitional patch so we can still close channels cleanly; for want of a better option, I hooked it into --deprecated-apis. Signed-off-by: Rusty Russell <[email protected]>
It was taking over 10 minutes under valgrind, causing Travis to time it out. This shrinks it to its essential tests, and also batches. Signed-off-by: Rusty Russell <[email protected]>
Maintaining it was always fraught, since the command could go away if the JSON RPC died. Most recently, it was broken again on shutdown (see below). In future we may allow pay commands to block on previous payments, so it won't even be a 1:1 mapping. Generalize it: keep commands in a simple list and do a lookup when a payment fails/succeeds. Valgrind error file: valgrind-errors.5732 ==5732== Invalid read of size 8 ==5732== at 0x4149FD: remove_cmd_from_hout (pay.c:292) ==5732== by 0x468BAB: notify (tal.c:237) ==5732== by 0x469077: del_tree (tal.c:400) ==5732== by 0x4690C7: del_tree (tal.c:410) ==5732== by 0x46948A: tal_free (tal.c:509) ==5732== by 0x40F1EA: main (lightningd.c:362) ==5732== Address 0x69df148 is 1,512 bytes inside a block of size 1,544 free'd ==5732== at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5732== by 0x469150: del_tree (tal.c:421) ==5732== by 0x46948A: tal_free (tal.c:509) ==5732== by 0x4198F2: free_htlcs (peer_control.c:1281) ==5732== by 0x40EBA9: shutdown_subdaemons (lightningd.c:209) ==5732== by 0x40F1DE: main (lightningd.c:360) ==5732== Block was alloc'd at ==5732== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5732== by 0x468C30: allocate (tal.c:250) ==5732== by 0x4691F7: tal_alloc_ (tal.c:448) ==5732== by 0x40A279: new_htlc_out (htlc_end.c:143) ==5732== by 0x41FD64: send_htlc_out (peer_htlcs.c:397) ==5732== by 0x41511C: send_payment (pay.c:388) ==5732== by 0x41589E: json_sendpay (pay.c:513) ==5732== by 0x40D9B1: parse_request (jsonrpc.c:600) ==5732== by 0x40DCAC: read_json (jsonrpc.c:667) ==5732== by 0x45C706: next_plan (io.c:59) ==5732== by 0x45D1DD: do_plan (io.c:387) ==5732== by 0x45D21B: io_ready (io.c:397) Signed-off-by: Rusty Russell <[email protected]>
cdecker
force-pushed
the
shutdown-fixes
branch
from
February 2, 2018 18:18
87a0ef5
to
89fb750
Compare
rustyrussell
added a commit
to niftynei/lightning
that referenced
this pull request
Jun 28, 2021
Based on a commit by @niftynei, but: - Separated quickclose logic from main loop. - I made it indep of anchor_outputs, use and option instead. - Disable if they've specified how to negotiate. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: `experimental-quick-close` option to enable draft fast mutual close protocol (as per lightning-rfc ElementsProject#847)
rustyrussell
added a commit
to niftynei/lightning
that referenced
this pull request
Jun 28, 2021
This follows lightning/bolts#847. For anchor_outputs, we pass down a max_feerate to closingd, and set the fee ceiling to MAX. It uses that to estimate the desired closing fee. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: Anchor output mutual close allow a fee higher than the final commitment transaction (as per lightning-rfc ElementsProject#847)
rustyrussell
added a commit
to niftynei/lightning
that referenced
this pull request
Jun 29, 2021
Based on a commit by @niftynei, but: - Separated quickclose logic from main loop. - I made it indep of anchor_outputs, use and option instead. - Disable if they've specified how to negotiate. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: `experimental-quick-close` option to enable draft fast mutual close protocol (as per lightning-rfc ElementsProject#847)
rustyrussell
added a commit
to niftynei/lightning
that referenced
this pull request
Jun 29, 2021
This follows lightning/bolts#847. For anchor_outputs, we pass down a max_feerate to closingd, and set the fee ceiling to MAX. It uses that to estimate the desired closing fee. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: Anchor output mutual close allow a fee higher than the final commitment transaction (as per lightning-rfc ElementsProject#847)
rustyrussell
added a commit
to niftynei/lightning
that referenced
this pull request
Jul 1, 2021
Based on a commit by @niftynei, but: - Separated quickclose logic from main loop. - I made it indep of anchor_outputs, use and option instead. - Disable if they've specified how to negotiate. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: `experimental-quick-close` option to enable draft fast mutual close protocol (as per lightning-rfc ElementsProject#847)
rustyrussell
added a commit
to niftynei/lightning
that referenced
this pull request
Jul 1, 2021
This follows lightning/bolts#847. For anchor_outputs, we pass down a max_feerate to closingd, and set the fee ceiling to MAX. It uses that to estimate the desired closing fee. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: Anchor output mutual close allow a fee higher than the final commitment transaction (as per lightning-rfc ElementsProject#847)
rustyrussell
added a commit
to niftynei/lightning
that referenced
this pull request
Jul 2, 2021
Based on a commit by @niftynei, but: - Separated quickclose logic from main loop. - I made it indep of anchor_outputs, use and option instead. - Disable if they've specified how to negotiate. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: `experimental-quick-close` option to enable draft fast mutual close protocol (as per lightning-rfc ElementsProject#847)
rustyrussell
added a commit
to niftynei/lightning
that referenced
this pull request
Jul 2, 2021
This follows lightning/bolts#847. For anchor_outputs, we pass down a max_feerate to closingd, and set the fee ceiling to MAX. It uses that to estimate the desired closing fee. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: Anchor output mutual close allow a fee higher than the final commitment transaction (as per lightning-rfc ElementsProject#847)
rustyrussell
added a commit
to niftynei/lightning
that referenced
this pull request
Sep 1, 2021
Based on a commit by @niftynei, but: - Separated quickclose logic from main loop. - I made it indep of anchor_outputs, use and option instead. - Disable if they've specified how to negotiate. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: `experimental-quick-close` option to enable draft fast mutual close protocol (as per lightning-rfc ElementsProject#847)
rustyrussell
added a commit
to niftynei/lightning
that referenced
this pull request
Sep 1, 2021
This follows lightning/bolts#847. For anchor_outputs, we pass down a max_feerate to closingd, and set the fee ceiling to MAX. It uses that to estimate the desired closing fee. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: Anchor output mutual close allow a fee higher than the final commitment transaction (as per lightning-rfc ElementsProject#847)
rustyrussell
added a commit
to niftynei/lightning
that referenced
this pull request
Sep 2, 2021
Based on a commit by @niftynei, but: - Separated quickclose logic from main loop. - I made it indep of anchor_outputs, use and option instead. - Disable if they've specified how to negotiate. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: `experimental-quick-close` option to enable draft fast mutual close protocol (as per lightning-rfc ElementsProject#847)
rustyrussell
added a commit
to niftynei/lightning
that referenced
this pull request
Sep 2, 2021
This follows lightning/bolts#847. For anchor_outputs, we pass down a max_feerate to closingd, and set the fee ceiling to MAX. It uses that to estimate the desired closing fee. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: Anchor output mutual close allow a fee higher than the final commitment transaction (as per lightning-rfc ElementsProject#847)
rustyrussell
added a commit
to niftynei/lightning
that referenced
this pull request
Sep 3, 2021
Based on a commit by @niftynei, but: - Separated quickclose logic from main loop. - I made it indep of anchor_outputs, use and option instead. - Disable if they've specified how to negotiate. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: `experimental-quick-close` option to enable draft fast mutual close protocol (as per lightning-rfc ElementsProject#847)
rustyrussell
added a commit
to niftynei/lightning
that referenced
this pull request
Sep 3, 2021
This follows lightning/bolts#847. For anchor_outputs, we pass down a max_feerate to closingd, and set the fee ceiling to MAX. It uses that to estimate the desired closing fee. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: Anchor output mutual close allow a fee higher than the final commitment transaction (as per lightning-rfc ElementsProject#847)
rustyrussell
added a commit
to niftynei/lightning
that referenced
this pull request
Sep 8, 2021
Based on a commit by @niftynei, but: - Separated quickclose logic from main loop. - I made it indep of anchor_outputs, use and option instead. - Disable if they've specified how to negotiate. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: `experimental-quick-close` option to enable draft fast mutual close protocol (as per lightning-rfc ElementsProject#847)
rustyrussell
added a commit
to niftynei/lightning
that referenced
this pull request
Sep 8, 2021
This follows lightning/bolts#847. For anchor_outputs, we pass down a max_feerate to closingd, and set the fee ceiling to MAX. It uses that to estimate the desired closing fee. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: Anchor output mutual close allow a fee higher than the final commitment transaction (as per lightning-rfc ElementsProject#847)
rustyrussell
added a commit
to niftynei/lightning
that referenced
this pull request
Sep 8, 2021
This follows lightning/bolts#847. For anchor_outputs, we pass down a max_feerate to closingd, and set the fee ceiling to MAX. It uses that to estimate the desired closing fee. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: Anchor output mutual close allow a fee higher than the final commitment transaction (as per lightning-rfc ElementsProject#847)
rustyrussell
added a commit
that referenced
this pull request
Sep 9, 2021
This follows lightning/bolts#847. For anchor_outputs, we pass down a max_feerate to closingd, and set the fee ceiling to MAX. It uses that to estimate the desired closing fee. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: Anchor output mutual close allow a fee higher than the final commitment transaction (as per lightning-rfc #847)
kandycoder
pushed a commit
to kandycoder/lightning
that referenced
this pull request
Sep 21, 2021
This follows lightning/bolts#847. For anchor_outputs, we pass down a max_feerate to closingd, and set the fee ceiling to MAX. It uses that to estimate the desired closing fee. Signed-off-by: Rusty Russell <[email protected]> Changelog-EXPERIMENTAL: Anchor output mutual close allow a fee higher than the final commitment transaction (as per lightning-rfc ElementsProject#847)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Builds on #841
This is basically a rewrite of closingd to do negotiation properly. Doing so revealed a spec bug, so I've created a patch for that too, and assumed it's going to be accepted. If not, we don't really care; by default we just don't enforce sane negotiation anyway.