alexbosworth / lightning

Lightning client methods
MIT License
127 stars 33 forks source link

Working with mission control #131

Closed vindard closed 1 year ago

vindard commented 1 year ago

Description

I'm looking into solving the problem of failed probes being registered in mission control for payments that would otherwise succeed. Specifically this would happen for:

For Muun, we currently simply skip the probe to Magnetron node, but for Breez this is a bit trickier since most probes work, but in odd cases the probe would fail of the recipient requires a new channel to be opened.

A potential solution to this I'm thinking of is to somehow be able to delete the pair for the Breez attempt from mission control to allow the subsequent payment attempt to go through.

Questions

Given all this:

  1. Do you think it makes sense to try to use some combination of querymc and importmc to selectively remove recent Breez failures from fee probes?

  2. Are these rpc endpoints exposed in this library as yet?

alexbosworth commented 1 year ago

LND doesn't let them support probing yet but it will soon, although remains to be seen their timeline to support that feature once merged

XImportMissionControl isn't supported, except if you do lnd.default.xImportMissionControl

If you did that I would also use the lnd.default.queryMissionControl method

IMO it's overkill to do this, I'd rather just special case to probe to their well known nodes and then restructure the route using https://github.com/alexbosworth/bolt07#routefromchannels

vindard commented 1 year ago

Ok thanks that helps, closing this now then

vindard commented 1 year ago

I found a potentially easier way to do this which was to parse the invoice for the channel id. I believe on-the-fly channels (probe will fail) get the 1x0x0 channel id. Waiting on confirmation from Roy.

alexbosworth commented 1 year ago

Technically speaking I think also the change to LND to support probing is already up in PR, so could cherry pick that one and support probing, however it might be complicated to support. Something maybe to give as feedback on LND I think so that virtualized channels can function 1:1 with regular channels