Open tnull opened 11 months ago
Hmm, maybe? Its still a failed payment and we still need to "punish" the node, however. For RGS users this can get hit sometimes, but best to punish that channel and avoid it if its updating its fee too often (and we'll decay that info eventually, especially if we're fetching a scorer from a probing server). For nodes not using RGS, the node is probably kinda buggy, or at least failing to get its updates out, in which case we definitely want to avoid it in the future.
At a high level, whenever a payment fails, we need to do something to avoid routing through that channel in the future, or if not need certainly need to very carefully consider it if we don't. If we start skipping scoring based on error code, an intermediary node is incentivized to always just return a specific error code so that we always try them again in the future because they "haven't failed". While we could add some new logic to handle specific cases like incorrect fee, I'm somewhat hesitant to do that, both because we no longer apply the updates, and because it might cause some other issues where nodes failing to get their update out in time and constantly updating their fees always end up seeing our payments and failing.
Hmm, maybe? Its still a failed payment and we still need to "punish" the node, however. For RGS users this can get hit sometimes, but best to punish that channel and avoid it if its updating its fee too often (and we'll decay that info eventually, especially if we're fetching a scorer from a probing server). For nodes not using RGS, the node is probably kinda buggy, or at least failing to get its updates out, in which case we definitely want to avoid it in the future.
Hm, but munching all the metrics together could really mess with the assumptions of our (historical) liquidity estimation, no?
At a high level, whenever a payment fails, we need to do something to avoid routing through that channel in the future, or if not need certainly need to very carefully consider it if we don't.
But we do? We'd avoid reusing any failed channels via PaymentParameters::previously_failed_channels
at least for the same payment?
If we start skipping scoring based on error code, an intermediary node is incentivized to always just return a specific error code so that we always try them again in the future because they "haven't failed". While we could add some new logic to handle specific cases like incorrect fee, I'm somewhat hesitant to do that, both because we no longer apply the updates, and because it might cause some other issues where nodes failing to get their update out in time and constantly updating their fees always end up seeing our payments and failing.
In any case, wouldn't using our per-channel scoring be a bad fit because for things like "insufficient fee" we'd really like to avoid the whole node for a while, not just a single channel?
Hm, but munching all the metrics together could really mess with the assumptions of our (historical) liquidity estimation, no?
Kinda? I mean, yes, we're learning that we can't send amount X over a channel, but in fact we've learned here that in this instance we can't send even 1 msat over the channel. Arguably based on this error code we should set the channel's available liquidity to zero instead, which I think wouldn't be a different metric. But even ignoring that specifically, I don't think we're mixing metrics tooo much here - we learned that we cant send a payment for a given amount, who cares why, we couldn't.
But we do? We'd avoid reusing any failed channels via PaymentParameters::previously_failed_channels at least for the same payment?
Right, I meant for future payments.
In any case, wouldn't using our per-channel scoring be a bad fit because for things like "insufficient fee" we'd really like to avoid the whole node for a while, not just a single channel?
Yea, having a node-level score rather than only channel-level scores is something we should consider, and something I've wanted to have in general, but we do have to be careful how we do it. In this case its easy - punish them! In cases where the node just often fails to forward, I do want to think a bit more about whether we want to be pushing at the node level (implying if you don't regularly rebalance your node we will avoid you, similar to what LND does) and whether that's a good result for the network.
Currently, it seems we would update the max liquidity bound even if forwarding would fail due to, e.g.,
fee_insufficient(0x100d)
: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.