Skip to content

Scorer: Only update max liquidity bounds for temporary_channel_failure(0x1007) #2673

Open
@tnull

Description

@tnull

Currently, it seems we would update the max liquidity bound even if forwarding would fail due to, e.g., fee_insufficient(0x100d):

2023-10-19 12:08:04 INFO (LDK): Got route: path 0:
 node_id: 0296b2db342fcf87ea94d981757fdf4d3e545bd5cef4919f58b5d38dfdd73bf5c9, short_channel_id: 893285027868704769, fee_msat: 4000, cltv_expiry_delta: 80
 node_id: 035e4ff418fc8b5554c5d9eea66396c227bd429a3251c8cbc711002ba215bfc226, short_channel_id: 888839702390636544, fee_msat: 0, cltv_expiry_delta: 40
 node_id: 033fc997c1622281b143fce0cce0711f18fdc8129684840b835d6a4c5ef9d49ddf, short_channel_id: 804725963415420929, fee_msat: 0, cltv_expiry_delta: 40
 node_id: 03cde60a6323f7122d5178255766e38114b4722ede08f7c9e0c5df9b912cc201d6, short_channel_id: 713570951859798016, fee_msat: 40000000, cltv_expiry_delta: 80
 blinded_tail: None
...
2023-10-19 12:08:07 INFO (LDK): Onion Error[from 035e4ff418fc8b5554c5d9eea66396c227bd429a3251c8cbc711002ba215bfc226: fee_insufficient(0x100d) htlc_msat(000002625a000088)] Node indicated the fee amount does not meet the required level (lightning::ln::onion_utils 696)
2023-10-19 12:08:07 DEBUG (LDK): Not able to penalize channel with SCID 893285027868704769 as we do not have graph info for it (likely a route-hint last-hop). (lightning::routing::scoring 1461)
2023-10-19 12:08:07 DEBUG (LDK): Setting min liquidity of 0 from SCID 888839702390636544, towards NodeId(035e4ff418fc8b5554c5d9eea66396c227bd429a3251c8cbc711002ba215bfc226) to 40000000 (lightning::routing::scoring 1322)
2023-10-19 12:08:07 DEBUG (LDK): Setting max liquidity of SCID 804725963415420929, towards NodeId(033fc997c1622281b143fce0cce0711f18fdc8129684840b835d6a4c5ef9d49ddf) from 9900000000 to 40000000 (lightning::routing::scoring 1309)

However, this doesn't make a lot of sense: a node telling us the fee wasn't high enough doesn't tell us anything about their available liquidity. We therefore shouldn't update the (max) liquidity bounds at all in such cases.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions