Skip to content

Conversation

@carlaKC
Copy link
Contributor

@carlaKC carlaKC commented Feb 2, 2021

One UX issue that people have run into using autoloop is that they don't know why no swaps are being executed, and need to go digging in debug logs to get an explanation. This PR surfaces a variety of reasons for not executing a swap to help better explain our logic, and updates our docs to provide recommendations for updating config to address these reasons.

This PR also relaxes our requirement that no "unrestricted" swaps are in flight, which was causing problems in practice where autoloop can't coexist with manually initiated swaps.

Pull Request Checklist

  • Update release_notes.md if your PR contains major features, breaking changes or bugfixes

@carlaKC carlaKC force-pushed the autoloop-1-disqualified branch 2 times, most recently from f6d87f0 to ea6524a Compare February 3, 2021 07:31
@carlaKC carlaKC requested review from bhandras and guggero February 3, 2021 07:34
Copy link
Member

@bhandras bhandras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice improvement! LGTM 🥇

Copy link
Contributor

@guggero guggero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK, LGTM 💯

This is extremely useful! Both the returned reason in the RPC as well as the log messages.

@carlaKC carlaKC force-pushed the autoloop-1-disqualified branch from ea6524a to 32b4580 Compare February 8, 2021 07:37
In an effort to surface more information about why autoloop is not
executing, we add an error when suggest swaps is called with no rules.
In other cases we can surface a reason enum with each rule that is set,
but in the case where we have no rules, there are no results to
accompany with reasons.
In practice, this restriction has proven to be too strict. Autoloop will
now only hold off on a swap for a channel if a manual swap is
specifically using that channel.
This commit switches up our eligible channels logic to rather return
a struct containing information about our current swap traffic. This
change is made in preparation for returning reasons indicating why we
did not perform a swap for a specific channel - when we only return
eligible swaps, we lose the information about why all the excluded
channels weren't used.
@carlaKC carlaKC force-pushed the autoloop-1-disqualified branch from 32b4580 to cf50ffd Compare February 8, 2021 07:39
@carlaKC carlaKC merged commit fe42664 into lightninglabs:master Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants