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

routing: add custom sender-sider bandwidth hint selection as a top level config option #8617

Open
Roasbeef opened this issue Apr 3, 2024 · 0 comments
Assignees
Labels
advanced Issues suitable for very experienced developers config Parameters/arguments/config file related issues/PRs enhancement Improvements to existing features / behaviour refactoring routing

Comments

@Roasbeef
Copy link
Member

Roasbeef commented Apr 3, 2024

For certain custom channel types, we'll wan to extend the default bandwidthHints that the router uses to introspect into the local balance of a channel to make decisions w.r.t which channel should be selected as an outgoing edge. As an example, given a TLV blob contained in an update_add_htlc message, and a custom blob that may be stored along side an OpenChannel/ChannleCommitment struct, even though channels ${X, Y, Z}$ may have enough bandwidth to satisfy a payment of amount $M$, we may actually want to take channel $A$ instead, as $F(htlc, A) == true$.

In this case, we want the creator of a new lnd process in an existing go program to be able to provide the function $F$ to us.

When we decide to make a payment, we'll make the following series of calls:

Here's an interface sketch that may be useful:

type TlvTrafficShaper interface {
    ShouldCarryPayment(amt lnwire.Millisatoshi, htlcTLV, channelBlob tlv.Blob) bool
}

The htlcTLV will just be what's present in the update_add_htlc, tho we'll also need a way to pass in a custom instance as path finding hasn't completed yet. channelBlob will be available based on the channels in the link.

@Roasbeef Roasbeef added enhancement Improvements to existing features / behaviour advanced Issues suitable for very experienced developers config Parameters/arguments/config file related issues/PRs routing refactoring labels Apr 3, 2024
@GeorgeTsagk GeorgeTsagk self-assigned this Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
advanced Issues suitable for very experienced developers config Parameters/arguments/config file related issues/PRs enhancement Improvements to existing features / behaviour refactoring routing
Projects
None yet
Development

No branches or pull requests

2 participants