-
Notifications
You must be signed in to change notification settings - Fork 911
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
[bug]: lease_fee double counted, causes bkpr-listbalances to crash lightningd #5557
Comments
Ok got a test case that reproduces this, thinking about a fix. Suspect that you had initiated the channel open and then upgraded to v12 very soon after, but before the channel had opened. We wrote down the channel info once you restarted the node, even tho it wasn't open yet. When the channel actually confirmed onchain, we re-issued duplicate events. We ignore duplicate onchain events (so the channel_open event itself doesn't get written twice) but dont do any de-duping for channel events, which the Current thinking is to not record the channel until it's definitely open, which would avoid this entirely. |
Reproduce crash for ElementsProject#5557! If we record the channel open because bookkeeper was added after the channel open request started but the channel confirms later, we end up with re-recording any associated push or leased fees (paid or rcvd). In the case where you've paid for these fees, your channel balance goes negative and the node crashes the next time you call `listbalances`. Reported-by: @chrisguida
Clean up for ElementsProject#5557. If you've got duplicate 'lease_fee' entries, we delete them!
Reproduce crash for ElementsProject#5557! If we record the channel open because bookkeeper was added after the channel open request started but the channel confirms later, we end up with re-recording any associated push or leased fees (paid or rcvd). In the case where you've paid for these fees, your channel balance goes negative and the node crashes the next time you call `listbalances`. Reported-by: @chrisguida
Clean up for ElementsProject#5557. If you've got duplicate 'lease_fee' entries, we delete them!
See #5587 |
Possible, I'd installed all of the RCs leading up to this. So, possible I opened the channel then updated from the last RC to v0.12.0 while the channel was still opening. Don't remember though. |
Reproduce crash for #5557! If we record the channel open because bookkeeper was added after the channel open request started but the channel confirms later, we end up with re-recording any associated push or leased fees (paid or rcvd). In the case where you've paid for these fees, your channel balance goes negative and the node crashes the next time you call `listbalances`. Reported-by: @chrisguida
Clean up for #5557. If you've got duplicate 'lease_fee' entries, we delete them!
marking as fixed by #5587 |
Reproduce crash for #5557! If we record the channel open because bookkeeper was added after the channel open request started but the channel confirms later, we end up with re-recording any associated push or leased fees (paid or rcvd). In the case where you've paid for these fees, your channel balance goes negative and the node crashes the next time you call `listbalances`. Reported-by: @chrisguida
Clean up for #5557. If you've got duplicate 'lease_fee' entries, we delete them!
Issue and Steps to Reproduce
bkpr-listbalances
getinfo
outputbkpr-listaccountevents 58c817f67224a80373ad7f1eafc4c069b6ea41986a2c9404bd531a47f1997e1c
shows that the least fee was counted twice.deleting the duplicate lease_fee entry from the db fixes the issue.
cc @niftynei
The text was updated successfully, but these errors were encountered: