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
Use static key for ChannelPackager #4459
Conversation
a50a077
to
187a6dc
Compare
Although the existing tests pass the case where the migration is done when a pending payment exists, on channel re-establishment the payment is cancelled by the receiver with I believe it is related to the following log message I see: So this PR still a work in progress. |
2b93b2f
to
0971d14
Compare
I found the root cause of the earlier problem. The Decay log which uses the |
I have a turbo branch that I'd be willing to share based on 0.9, it's a bit old but the code may help you choose an approach.
The second approach will work, but is a little clunky and may introduce code debt. |
@Crypt-iQ thanks for looking at this. I submitted another PR that depends on this one and deals with skipping funding confirmation (#4424). See this #4424 (comment) as I have made some major changes on the initial version. |
I'd like to avoid a migration and I think we don't need this to implement turbo channels - one less step. |
Use lnwire.ChannelD as ChannelPackager key instead of short channel id. This makes it safe to use the ChannelPackager when the short channel id changes.
This adds a migration step necessary to change the keys used in ChannelPackager from lnwire.ShortChannelId to lnwire.ChannelID.
0971d14
to
1d81262
Compare
Rebased |
@cfromknecht: review reminder |
I'm going to close this pull since #5955 gets around this. Also this isn't enough - the circuits in the circuitmap are based on ShortChannelID and if the ID changes, you risk a force close since packets won't be routed properly during the ID upgrade. |
This PR follows the suggestion here #4424 to make the ChannelPackager use
lnwire.ChannelD
as key which doesn't change on confirmation.A migration is needed to handle existing keys by renaming existing keys (copy buckets) to the new format.