LIGHTNING-ASKRENE-BIAS-CHANNEL(7)

πŸ“¦
version 26.06.9 Β· 2 versions
, in nixpkgs unstable

πŸ’… LIGHTNING-ASKRENE-BIAS-CHANNEL(7) β€” askrene-bias-channel

okay bestie, welcome to lightning-askrene-bias-channel, section 7 of the Lightning manual. this is the RPC that lets you manually push askrene's vibe check on a channel one way or the other 🌸


✨ NAME ✨

askrene-bias-channel β€” the command that slaps a manual bias on a channel inside a layer πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

askrene-bias-channel layer short_channel_id_dir bias [description]
[relative]

πŸ’– DESCRIPTION πŸ’–

Command added in v24.11. yep, it's a newer one, not some ancient legacy thing πŸ‘‘

The askrene-bias-channel RPC command tells askrene to favor or disfavor a channel when it's considering it for routing. it's giving "i have opinions about this channel specifically" and honestly? valid.

  • layer (string) β€” the name of the layer you want to apply this bias to.
  • short_channel_id_dir (short_channel_id_dir) β€” the short channel id and direction to apply this bias to. direction matters, bestie, don't forget it πŸ™ˆ
  • bias (integer) β€” the bias itself. positive = good, negative = bad, and 0 = no bias at all. the useful values are +/-1 through +/-10, though -100 through +100 are possible values. so like yeah you can go to the extremes, but the sweet spot is tiny πŸ’€
  • description (string, optional) β€” description/annotation to display in askrene-listlayers(7). cute lil note for future you 🫢
  • relative (boolean, optional) β€” the bias will be added to the previous value. the default is False. (added v25.05) so flip this on when you wanna stack on top of whatever's already there ✨

🌈 RETURN VALUE 🌈

On success, an object containing biases is returned. it's an array of objects, and each object contains:

  • layer (string) β€” the name of the layer this bias applies to.
  • short_channel_id_dir (short_channel_id_dir) β€” the short channel id and direction.
  • bias (integer) β€” the bias (-100 to +100).
  • timestamp (u64) β€” the UNIX timestamp when this bias was created. (added v25.12) ⭐
  • description (string, optional) β€” the manpage literally describes this one as "The bias (-100 to +100)" 😭 that's what it says, we're keeping it, no cap.

πŸ‘‘ AUTHOR πŸ‘‘

Rusty Russell rusty@rustcorp.com.au is mainly responsible. icon behavior, honestly πŸ’…


🧚 SEE ALSO 🧚


πŸ”₯ RESOURCES πŸ”₯

Main web site: https://github.com/ElementsProject/lightning


πŸ“ EXAMPLES πŸ“

Example 1

Request:

$ lightning-cli askrene-bias-channel -k "layer"="test_layers" "short_channel_id_dir"="109x1x1/1" "bias"=1

{
  "id": "example:askrene-bias-channel#1",
  "method": "askrene-bias-channel",
  "params": {
    "layer": "test_layers",
    "short_channel_id_dir": "109x1x1/1",
    "bias": 1
  }
}

Response:

{
  "biases": [
    {
      "layer": "test_layers",
      "short_channel_id_dir": "109x1x1/1",
      "bias": 1
    }
  ]
}

Example 2

Request:

$ lightning-cli askrene-bias-channel "test_layers" "109x1x1/1" "-5" "bigger bias"

{
  "id": "example:askrene-bias-channel#2",
  "method": "askrene-bias-channel",
  "params": [
    "test_layers",
    "109x1x1/1",
    -5,
    "bigger bias"
  ]
}

Response:

{
  "biases": [
    {
      "layer": "test_layers",
      "short_channel_id_dir": "109x1x1/1",
      "description": "bigger bias",
      "bias": -5
    }
  ]
}

ok that's the whole page, go bias some channels responsibly bestie πŸ«ΆπŸ’œ

Core Lightning v26.06.9 β€” that's the version this page came from, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from