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
Introduce Retry InvoiceRequest Flow #3010
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #3010 +/- ##
==========================================
- Coverage 89.17% 89.14% -0.04%
==========================================
Files 118 118
Lines 97986 97783 -203
Branches 97986 97783 -203
==========================================
- Hits 87376 87165 -211
+ Misses 8419 8371 -48
- Partials 2191 2247 +56 ☔ View full report in Codecov by Sentry. |
Updated from pr3010.04 to pr3010.05 (diff): Addressed @TheBlueMatt comments Updates:
|
This will be used to recreate InvoiceRequest messages for retries for the payments that are still awaiting receiving an invoice.
We need to retry InvoiceRequest messages in a smaller time duration than timer_tick_occurred. This function provides the base for doing the retry, by getting the InvoiceRequest for PendingOutboundPayments and using a new reply_path to create and enqueue InvoiceRequest messages.
1. And introduce static CALL_COUNTER, to trigger the `timer_tick_occurred` code only every 10th call. 2. Decrease Freshness timer duration. 3. This is done so that `retry_invoice_request_messages` can be called faster than the rest of the code without introducing a secondary timer.
I don't buy that we need a new counter. There's a lot of things that hang on the timer rate, but this is a great opportunity to redefine the constants in seconds and multiply out a rate. Looking at all the things we do in the timer tick, as far as I can tell the only one that doesn't have a counter and a limit constant already is |
Hi Matt! I think this will definitely be a more maintainable way to handle this change than introducing a counter! Thanks a lot! |
resolves #2836
Description:
invoice_request
messages on new reply_paths that are still awaiting invoices.Changes:
PendingOutboundPayments::AwaitingInvoice
variant to accommodate instances without invoice requests.pay_for_offer
to create invoice request messages into a separate function for reuse with retry message flow.retry_tick_occurred
function in ChannelManager to handle generating invoice request messages for AwaitingInvoice payments and enqueueing them.retry_tick_occurred
toln_background_processor
with a timer duration of 5 seconds for timely retries without overwhelming the system with too many onion messages.