lightninglabs / lightning-terminal

Lightning Terminal: Your Home for Lightning Liquidity
MIT License
488 stars 82 forks source link

Time to next Autopilot Autofees Run in UI / CLI, with option to change time of day #708

Open zapomatic opened 5 months ago

zapomatic commented 5 months ago

Is your feature request related to a problem? Please describe.

Autopilot Autofees management is currently fairly opaque in terms of when it will run next. The documentation says 3 days, so you can get your next run time by manually querying litcli autopilot list and running a unix timestamp conversion of created_at (or examining the last batch of fee updates and checking the day/time), however this is cumbersome.

Additionally, it may be that Autofees was started at a time of day that is not the most optimal time to update fees (e.g. if it runs at 10pm, but traffic on the node tends to spike in the 10pm hour, then triggering autofees at this time will cause a temporary increase of Fee Insufficient errors as downstream peers propagate the new fee quote. For this reason, a node operator might want to use litcli or the Lightning Terminal UI to change the next date/time that Autofees should run (resetting the 3 day timer from that point). This would allow a node to optimize updating fees at the lowest time of day for node routing activity. The only way to currently fix this problem is to stop autofees (by remove the connect session? Also a funky experience) and then re-enabling autofees at the specific time of day desired.

Describe the solution you'd like

Add a UI element that exposes the next fee adjustment run date/time and allows the operator to update the value, resetting the timer to that runtime.

levmi commented 5 months ago

Hi - thanks for your report and request! Appreciate you using Terminal and Autofees. This request makes a lot of sense and we can start to take a look at how we could implement this in the coming weeks. I'll circle back with some potential designs when we have them and we can work from there.