Skip to content

remove_channel_in_nodes (and channel_failed with !is_permanent) don't update lowest_inbound_channel_fees #1686

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

Open
TheBlueMatt opened this issue Aug 29, 2022 · 2 comments
Milestone

Comments

@TheBlueMatt
Copy link
Collaborator

While both of these shouldn't cause incorrect routing behavior, they may result in the lowest_inboud_channel_fees value being spuriously high, which could cause slower than optimal routing.

I don't think the right solution here is to just fix the behavior in question, though, I think we really should revisit the lowest_inbound_channel_fees behavior entirely - when I last benchmarked the difference between A* and dijkstra's performance on our router A* was a good bit faster, but our router has changed a lot since then, and I think there's a good chance A* isn't faster anymore (it does imply an extra map lookup during routing!). Before we yank it out entirely, though, I think we should look into storing the lowest_inbound_channel_fees field in the per-channel data as well, avoiding the extra map lookup, which may leave A* a lot faster still.

@TheBlueMatt TheBlueMatt added this to the 0.1.1 milestone Aug 29, 2022
@naumenkogs
Copy link
Contributor

How exactly having lowest_inbound_channel_fees on the per-channel basis would avoid network_nodes.get(&$src_node_id).map(|node| node.lowest_inbound_channel_fees), unless you rework a big chunk of the algorithm?

I don't mind algo rework, but your mention of it sounds more natural and easy than what I see in the code, so just double-checking we're talking about the same thing.

@TheBlueMatt
Copy link
Collaborator Author

In the common case (ie calling add_entries_to_cheapest_to_target_node), we're already looking at network_channels and have looked up the channel in the channels map. In that case, we could take the min-fees from the channel map and pass it through to add_entry, we'd just have to have other add_entry calls pass a None or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants