-
Notifications
You must be signed in to change notification settings - Fork 913
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
pay: Track payment completion time for successful payments #5398
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cdecker
force-pushed
the
pay-settlement-time
branch
from
July 10, 2022 13:49
a6a21ae
to
7ee4cc9
Compare
postgres is unhappy
|
Got it, the column was wrongly set to be |
cdecker
force-pushed
the
pay-settlement-time
branch
5 times, most recently
from
July 12, 2022 15:05
fc8a609
to
3232e53
Compare
cdecker
force-pushed
the
pay-settlement-time
branch
from
July 19, 2022 07:50
3232e53
to
0461bfa
Compare
cdecker
force-pushed
the
pay-settlement-time
branch
from
August 3, 2022 15:48
0461bfa
to
a11f237
Compare
cdecker
force-pushed
the
pay-settlement-time
branch
from
September 12, 2022 11:47
a11f237
to
5aca549
Compare
We'll want to use these to track durations for `sendpays` and `pays`.
cdecker
force-pushed
the
pay-settlement-time
branch
from
September 12, 2022 12:45
5aca549
to
c22c4c5
Compare
The completion of a successful payment is defined as the first completion of a successful part, hence we just collect the minimum completion time of successes. Changelog-Added: JSON-RPC: `pay` and `listpays` now lists the completion time.
cdecker
force-pushed
the
pay-settlement-time
branch
from
September 12, 2022 16:01
c22c4c5
to
e7511a4
Compare
ACK e7511a4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Track completion time for succesful payments
BY adding the
completed_at
field to thepayments
table, and thesendpay
,listsendpays
andwaitsendpay
output we can derive thecompletion time for a payment by taking the lowest
completed_at
among all parts that were sent. By definition the earliest successful
part guarantees that the payment as a whole will complete, even if
some parts are delayed or stuck. This is because any successful part
communicates the
payment_preimage
which is the same across allparts.
For unsuccessful payments we might want to use the first
completed_at
after the lastcreated_at
time, i.e., the first partthat did not cause a new part to be sent. This usually means we ran
out of routes or time, and
pay
didn't start any new attempts. Isthat a good interpretation of the completion time for unsuccessful
payments?