-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faster feedback failure receiving invoice (updated) #148
Faster feedback failure receiving invoice (updated) #148
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #148 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 1 1
Lines 97 105 +8
======================================
- Misses 97 105 +8 ☔ View full report in Codecov by Sentry. |
5bbf51d
to
174c992
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! Tested it and it seems to be working well. A few nits below and I think it would be good to squash the three commits into one since the second and third commit are reverting changes that were made in the first commit.
As I'm playing around with LNDK, I'm also starting to feel like 30 seconds is maybe still too long for the timeout. Maybe 15 seconds instead. Any thoughts there?
896edc3
to
25e9378
Compare
Addressed all comments in squashed commit 25e9378
30 seconds is definitely too long in the context of making a payment in the real world. But I don't know what a reasonable expectation is in the context of onion messaging realities. But I've reduced it to 15 seconds in this PR. I also notice that we have a separate hardcoded 20 second timeout in our connect peer calls, so in reality attempting to fetch an invoice could take 20+15 seconds before a timeout happens. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one more nit and then good to go
a9e864f
to
3e58b4d
Compare
@mrfelton Just needs a
Actually if we hit the connect_peer timeout, the payment should just fail and not reach the 15s timeout. But it definitely might be worth adding another timeout config option if people need it eventually. |
This commit introduces a parameter in the RPC to allow users to modify the timeout when receiving an invoice from the offer creator. Additionally, it adds a configuration parameter for the server to set up a default value if no parameter is used. The default timeout value is also decreased from 100 seconds to 20 seconds.
3e58b4d
to
856eb68
Compare
re-pushed with format |
I would think it more rare that connecting to a peer would take longer than a second or two. It's the onion message exchange that seems to take time. Possibly what we need more than configurable timeouts on the peer connect would be fallbacks to connecting to other peers if we can't connect directly to the first one we attempt. |
Yeah good point! If an offer includes more than one blinded path option, we should loop through the other options in the case of a connection failure. This is relevant to a PR I'm working on now so I'll try to include it. |
Updated version of #122 that has been rebased ontop of latest codebase.
Additionally, it adds:
Default
instead of customnew_default
method, as per pr comment