Skip to content

Conversation

@Lagrang3
Copy link
Collaborator

The channel bias feature is not being used yet by any plugin, so this hopefully doesn't break any working code.
When askrene-bias-channel is called the bias quantity is added on top of any previous biased already present on that channel instead of overwriting it.

Changelog-Changed: askrene-bias-channel: bias call add up.

The use case I envision is the following in the context of a payment plugin:

Stack biases on channels that fail often with weird errors and avoid DoS:

  • plugin sends payment for computed route
  • route fails with weird error such as WIRE_AMOUNT_BELOW_MINIMUM indicating that we need to update the gossmap
  • we don't have to trust this channel is behaving correctly, so we update the gossmap and we add some negative bias to it.
  • next time we fail the payment again with the same channel we add more bias to it. Eventually this channel will be completely avoided.

@Lagrang3 Lagrang3 added this to the v25.05 milestone Feb 10, 2025
@Lagrang3 Lagrang3 requested a review from cdecker as a code owner February 10, 2025 12:53
@Lagrang3 Lagrang3 force-pushed the askrene-additive-bias branch 2 times, most recently from 627b2fa to 5129604 Compare February 11, 2025 08:07
@Lagrang3 Lagrang3 mentioned this pull request Feb 18, 2025
@rustyrussell
Copy link
Contributor

But you can't do this atomically. So if you have a system where you really want to control biases in absolute terms, this is bad. For example, you might set it absolutely based on timing detection (i.e. bias against slow channels).

So should we add a new parameter "relative" (bool, default false) which makes it cumulative like this?

@Lagrang3
Copy link
Collaborator Author

Lagrang3 commented Feb 24, 2025

OK. A boolean relative flag would help having both use cases.

@Lagrang3 Lagrang3 force-pushed the askrene-additive-bias branch from 5129604 to 7a3eac0 Compare February 24, 2025 07:26
The channel bias feature is not being used yet by any plugin, so this
hopefully doesn't break any working code.
When askrene-bias-channel is called the bias quantity is added on top of
any previous biased already present on that channel instead of
overwriting it.

Changelog-Changed: askrene-bias-channel: bias call add up.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
@rustyrussell rustyrussell force-pushed the askrene-additive-bias branch from 7a3eac0 to 0c7e1f0 Compare May 8, 2025 02:39
@rustyrussell rustyrussell enabled auto-merge (rebase) May 8, 2025 02:40
@rustyrussell
Copy link
Contributor

Trivial rebase!

@rustyrussell rustyrussell merged commit 556e38c into ElementsProject:master May 8, 2025
12 of 13 checks passed
@rustyrussell rustyrussell mentioned this pull request May 8, 2025
@Lagrang3 Lagrang3 deleted the askrene-additive-bias branch May 12, 2025 06:00
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 this pull request may close these issues.

2 participants