Open martinatime opened 2 years ago
The routes are served by lnd, and it seems that lnd does not like the 100k route for 200k payments. It might be worth filing a lnd bug (for the mission control component).
The main issue I see with adding the feature in reblanace-lnd is that this would be the very first instance of rebalance-lnd writing to disk. The "old" route needs to be persisted somewhere, and it needs to be read again. This adds a lot of complexity, for a rather minimal benefit.
I'll add a bug to lnd.
It seems when I manually repeat a successful rebalance it will use the same routing so maybe lnd's internal routing mechanism remembers the last successful route with the same parameters.
I'm not certain if needing to persist the route outside of memory is needed. Maybe something like the following would work. Inside of Logic in try_route if it is successful store the route in a self variable. Then in rebalance if the repeatable flag is on (and maybe other considerations/conditions are met) then call try_route on the same route object again.
I agree, that might work. Those "other considerations" are rather major, I think. The amount needs to be recomputed/checked (maybe we already reached our goal?). Ignored routes (those given explicitly, and those that result out of failures) might need to be carried over. A new invoice needs to be created.
I'll think about it.
I also observed that after a successful rebalance, executing the previous rebalance-lnd call leads to the very same route tested first, often up to five time successfully repeatable.
I even wrote a simple bash
script to repeat a successful rebalance multiple times. Works well without persistence.
Would be a nice to have a flag --repeat-successful x
in rebalance-lnd that just tells it to execute the same lnd commands after successful rebalance x
times.
Here's the situation that I continually hit. I'll be attempting to rebalance channel A for like 100k sats and it will be successful. If I manually re-run rebalance-lnd again it will transfer another 100k. If I attempt to change the amount up, say double it to 200k, it will typically not go through and will attempt all of the potential routes again. But if I drop it back down to 100k it will again be successful.
So the request would be to build into rebalance-lnd a replayable option where if the transaction is successful it attempts to run the same transaction again. This would be similar to the incremental script in #33 but would allow for as many transactions as it takes to make the channel "balanced" based on the criteria set in the options.
In the meantime I'm going to play with the concepts that the scripts in #33 to see if that gets me closer to what I'm looking for.
I would also be interested in any thoughts about this such as this being a bad idea.