-
Notifications
You must be signed in to change notification settings - Fork 912
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
Closing weight fix #5004
Closing weight fix #5004
Conversation
…ill be. We had an out-by-two error when calculating weights, because we grab weights on unsigned txs. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Compare against lightningd's, and the actual tx. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Saves us actually creating the witness to measure it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
0fdb8aa
to
5aaa03f
Compare
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.
Good catch
ack 4ac8e23
ACK 5aaa03f |
5aaa03f
to
ca593a4
Compare
More elements fixes: @cdecker please review! |
And in particular, fix onchaind grinding code which used the actual number of inputs and outputs (which already includes the fee output); that breaks with the next patch which fixes other calculations. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This fixes lightningd's chronic weight underestimate. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Fixed: closingd: more accurate weight estimation helps mutual closing near min/max feerates.
Firstly, we were not adding the extra fee output on our dummy tx, because the fee amount was 0. We probably should always do this, even if it's 0. Secondly, there are 6 witnesses, not 1, for elements txs. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
And skip some tests: I'd simply be pasting in the results, which is not very useful. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ca593a4
to
d6e603e
Compare
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.
LGTM, but I'm a little bit out of context with elements
ack d6e603e
ACK d6e603e |
I was getting regular failures in the #4984 branch. This was caused by the closing fee estimation being wrong in elements, however, AFAICT the flaky retester has been covering it up (prior to this it would sometimes pass).
In debugging this, I discovered that our non-elements closing weight was also wrong, though not enough to trigger an error. New test, more debugging...
Can we remove the flaky stuff please after release? It's just deferring pain, not removing it!