-
Notifications
You must be signed in to change notification settings - Fork 138
Delete channel alias scids when quotes expire #1710
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
base: main
Are you sure you want to change the base?
Conversation
// Start the main event loop in a separate go routine. | ||
h.Wg.Add(1) | ||
go func() { | ||
defer h.Wg.Done() |
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.
we could use h.ContextGuard.Goroutine
here (and above if you like)
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.
TIL go1.25.0 apparently also adds a WaitGroup.Go method for handling the Add(1)/Done pattern.
Need to bump configured go version to |
5a74347
to
08f114e
Compare
Pull Request Test Coverage Report for Build 16778492979Details
💛 - Coveralls |
For the LiT tests I'll have to make a PR that bumps all versions that are included with this PR |
@GeorgeTsagk, remember to re-request review from reviewers when ready |
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.
I think this all looks perfectly reasonable. Needs some rebasing, and still seems to be blocked on lightninglabs/lndclient#236. Will take another pass when it's about ready to go.
We use the new LND RPC endpoint that looks up the base scid for an alias, in order to use it to delete the mapping shortly after. In addition we break the order handler main loop into it's go routine, which was previously never really running as it followed the HTLC interceptor setup which was a blocking call.
08f114e
to
3afa23d
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.
This LGTM. I take it the LiT tests should be updated after this one is merged?
It's a dep bump issue, I believe currently the dependency is bumped in the feature bits itest PR, but maybe worth separating as we don't know when that is getting merged. |
Description
Previously when we'd garbage collect quotes we'd only delete the quote entry locally on tapd. What we didn't do is clear the state that was produced in LND, which keeps track of alias scid -> base scid mappings to facilitate routing.
We use the new method
XFindBaseLocalChanAlias
to retrieve the base scid that corresponds to our quotes, and then we call LND to delete the alias.Depends on:
lightningnetwork/lnd#10133
lightninglabs/lndclient#236