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

channeld: don't ever send back-to-back feerate changes, fix feerate logic. #4480

Conversation

rustyrussell
Copy link
Contributor

@rustyrussell rustyrussell commented Apr 18, 2021

There are several reports of desynchronizaion with LND here; a simple
approach is to only have one feerate change in flight at any time.

But I also found that our fee state machine was a bit screwed (thanks to CI flake!), so that may also have caused this problem.

Fixes: #4152

@rustyrussell rustyrussell added this to the v0.10.1 milestone Apr 18, 2021
@rustyrussell rustyrussell force-pushed the guilt/reduce-feerate-signature-disagreements branch from 04fc6d5 to 16ea05f Compare April 18, 2021 05:28
common/fee_states.c Show resolved Hide resolved
channeld/channeld.c Outdated Show resolved Hide resolved
@cdecker
Copy link
Member

cdecker commented Apr 20, 2021

Needs a nice changelog message :-)

ACK 16ea05f

@rustyrussell rustyrussell force-pushed the guilt/reduce-feerate-signature-disagreements branch from 16ea05f to f046c04 Compare April 20, 2021 21:24
We don't always get two transactions on line 1019; the comment is
confused (only one penalty tx successfully comes out of l3).  So make
sure we get the other transactions when we expect them, and then
make this test more specific.

Signed-off-by: Rusty Russell <[email protected]>
There are several reports of desynchronization with LND here; a simple
approach is to only have one feerate change in flight at any time.

Even if this turns out to be our fault, it's been a historic area of
confusion, so this restriction seems reasonable.

Changelog-Fixed: Protocol: Don't create more than one feerate change at a time, as this seems to desync with LND.
Fixes: ElementsProject#4152
Signed-off-by: Rusty Russell <[email protected]>
By iterating through them forward, we would often increment
them more than once!  Always print feestate transitions,
which is how I worked this out.

Changelog-Fixed: Protocol: handle complex feerate transitions correctly.
Signed-off-by: Rusty Russell <[email protected]>
This may have made our feestates fully resolved, so we can send
update_fee again.  Without this fix our tests sometimes timeout.

Also add debugging so we can see when we suppressed a feechange.

Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell rustyrussell force-pushed the guilt/reduce-feerate-signature-disagreements branch from f046c04 to bf7947b Compare April 21, 2021 06:27
@rustyrussell rustyrussell changed the title channeld: don't ever send back-to-back feerate changes. channeld: don't ever send back-to-back feerate changes, fix feerate logic. Apr 21, 2021
@cdecker
Copy link
Member

cdecker commented Apr 21, 2021

ACK bf7947b

@rustyrussell rustyrussell merged commit caf7c23 into ElementsProject:master Apr 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad commit_sig signature
3 participants