I have multiple private channels open and I want to issue an invoice via the addinvoice lncli call. I want to include _one_ of these channels as a routing hint via the --private flag and not all of them. Therefore, I propose adding a new flag to addinvoice that allows a user to specify individual private channels for routing hints instead of exposing all of their private channels in one invoice.
lnduname -a on *Nix)Would be nice to even be able to suggest a public channel as a routing hint as well.
Would be nice to even be able to suggest a public channel as a routing hint as well.
If the payer already knows the public channel, I think this wouldn't have any effect though. It _would_ have an effect if #2346 gets implemented because then the payer's node would attempt to route through this public channel. The current routing algorithm just lumps all of the route hints with all of the known edges and may not send the payment through the hints.
Ah yeah, would need #2346.
I'll give an example, I spun up a node N1, I already have a node N and I have a balance channel from N -> N1, having priority for that channel would be nice to have even if public until N1 has enough channels of it's own to not depend on N.
I personally don't have a problem with it but it goes against the spec to have public routes in the r field.
I think the new flag should be something like:
lncli [auth] addinvoice --routehints='{
"hints": [440904162803712, [460695372103680, 467292441870336]]
}' 10000`
where the array inside the array specifies a sequence of channel ids belonging to private routes to be used in pathfinding, which isn't currently done. Since #2346 isn't implemented yet (and would require multiple iterations of findPath potentially so I'm not even sure if it's a good idea...), I'm not sure that multiple private routes should be specified in a single hop hint as the effect would be the same as if the inner array was split into [440904162803712, 460695372103680, 467292441870336] for example.
Oops, meant to comment. Taking this one!
Most helpful comment
Would be nice to even be able to suggest a public channel as a routing hint as well.