Open JssDWt opened 1 month ago
[!IMPORTANT]
Review skipped
Auto reviews are limited to specific labels.
Labels to auto review (1)
* llm-reviewPlease check the settings in the CodeRabbit UI or the
.coderabbit.yaml
file in this repository. To trigger a single review, invoke the@coderabbitai review
command.You can disable this status message by setting the
reviews.review_status
tofalse
in the CodeRabbit configuration file.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Release notes need to be moved to the v0.18.1
file.
@jssdwt, remember to re-request review from reviewers when ready
Maybe it's related to this?
Maybe it's related to https://github.com/lightningnetwork/lnd/issues/8870#issuecomment-2192464477?
Hmm I don't think so, not having the edge available means somehow that our own ChanAnnouncment
didn't got through? Not receiving the node announcment would just leave us with a NodeAnnouncement Shell
, we add during adding the edge to the db.
Concept Ack from my side as well, I think it's the best way to fix broken channels suffering from the Edge not Found
problem. I think we still have not traced down the origin of the problem, this gives us at least the possibility to mitigate the problem.
Sorry for letting this sit for so long. Updated with your feedback now @yyforyongyu
what about passing the graph db as a config to the localchan_manager
, so that we can when recreating the edge just call AddChannelEdge
and short-circuit all the other stuff which is done in the gossiper ? Later during the ChanUpdate (PropagateChanPolicyUpdate
) all the necessary stuff is done (adding the update to the Topology etc.).
It's a mitigation to a unknown bug anyways which we will find as soon as we improved logging in the gossiper.
Handled most comments. Still have to create a test.
Added a test for createEdge
Now also added a test to the UpdatePolicy function
Handled Ziggie's comments.
If this gets a thumbs up, we'll try it out in production to see whether it helps with our edge not found
issues.
Awesome job @JssDWt 🎉, thanks for fixing this in LND. Just a little style nit.
I will approve this PR once you give us feedback how your local testing went but it's gtg from my side.
Change Description
Description of change / link to associated issue.If a node contains a channel, but doesn't have a corresponding edge in the graph database, updating the channel policy would fail. In this commit the edge is recreated if the channel exists. This ensures a node can recover from a missing edge in the graph database by calling
updatechanpolicy
.Alternative for https://github.com/lightningnetwork/lnd/pull/8768, namely option 2 in https://github.com/lightningnetwork/lnd/pull/8768#issuecomment-2143799767 Partially fixes https://github.com/lightningnetwork/lnd/issues/7261 by allowing to recreate the edge by calling
updatechanpolicy
.Steps to Test
I'm not sure how to create an integration test where I can modify the graph database to delete an edge in order to test this. Please advise.
Pull Request Checklist
Testing
Code Style and Documentation
[skip ci]
in the commit message for small changes.📝 Please see our Contribution Guidelines for further guidance.