Skip to content

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

Closed as not planned

Description

@TheBlueMatt

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.

Activity

  1. added this to the 0.1.1 milestone on Aug 29, 2022
  2. naumenkogs commented on Sep 7, 2022

    @naumenkogs
    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.

  3. TheBlueMatt commented on Sep 8, 2022

    @TheBlueMatt
    CollaboratorAuthor

    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.

  4. TheBlueMatt commented on Sep 18, 2025

    @TheBlueMatt
    CollaboratorAuthor

    We dropped the A* logic in a3f7b79

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions