Skip to content

Remove pathfinding "second chance" logic #6883

Open
@joostjager

Description

@joostjager

When a routing node has to fail a payment because the fee is insufficient, this may be caused by the sender not having the latest channel policy. The routing node may have increased its fees recently. If this failure happens, an up to date channel update is returned to the sender and they can choose to retry.

See also the explanation in code here:

// If nodes return a channel policy related failure, they may get a

The goal of this issue to discuss how desirable lnd's so called "second chance" logic still is.

Advantages:

  • After senders apply the updated channel policy, the previously chosen route may still be the best option. If they'd immediately penalize the node for returning fee_insufficient, that best route won't be chosen for the next attempt.

  • Routing nodes can adjust their fees upwards without losing traffic during the window where senders haven't received the update yet.

Disadvantages:

  • Because routing nodes can adjust their fees without being penalized, they may do this often. This leads to extra gossip traffic and more (first try) payment failures.

  • By always advertising zero fees, senders' pathfinders are attracted to that part of the graph and will explore it. Previously successful edges will have a high success probability for future payments and pull pathfinding even more towards that area. By always returning a fee_insufficient at first, nodes can still collect the non-zero fee that they really want to charge. They can keep broadcasting zero fee channel updates to "reset" senders' graphs so that they keep going to the area.

If the second chance logic were to be removed, an attached channel update would still be applied to the sender's graph, but the same channel wouldn't be retried immediately. After the failure has decayed, the sender will still use that updated policy if it leads to the best route. So even in the case where the channel update really doesn't reach the sender via gossip, they'll be able to use the channel with the new policy eventually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feesRelated to the fees paid for transactions (both LN and funding/commitment transactions)path finding

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions