Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

askrene-bias-channel: bias call add up. #8072

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

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 <[email protected]>
@Lagrang3 Lagrang3 force-pushed the askrene-additive-bias branch from 5129604 to 7a3eac0 Compare February 24, 2025 07:26
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