-
Notifications
You must be signed in to change notification settings - Fork 268
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
Eclair accepts payments after payment request timeout period. #748
Comments
Yes, this true but only for payment requests with a timeout that is less than 10 minutes which is still very uncommon (because we check and purge payment requests every 10 minutes). |
Issue is when you have some deadline for a payment - say a competition etc... then if you get a payment after the deadline you have to return the funds. Which with lighting is more trick than bitcoin as you have no return address by default. |
Expiry Tag time has been exceeded. Fixes ACINQ#748
Describe the issue
I create a payment request and specify a timeout of 1 second.
I check the payment request and it correctly contains the 1 second timeout.
I wait 10 seconds.
I pay the payment request from another node.
What behaviour did you expect?
The payment should be rejected.
BOLT#11
A payee SHOULD NOT accept a payment after timestamp plus expiry.
https://github.com/lightningnetwork/lightning-rfc/blob/master/11-payment-encoding.md#payer--payee-requirements
What was the actual behaviour (provide screenshots if the issue is GUI-related)?
The payment is accepted.
How reliably can you reproduce the issue, what are the steps to do so?
100% - steps are above.
What version of Eclair are you using, where did you get it (website, self-compiled, etc)?
HEAD as of 26th Oct 2018
What environment are you observing the error on (OS, JDK version)?
Linux/1.8
Any extra information that might be useful in the debugging process.
This match in LocalPaymentHandler has no logic to check the timeout.
In addition to the check on paymentRequest.amount here:
eclair/eclair-core/src/main/scala/fr/acinq/eclair/payment/LocalPaymentHandler.scala
Line 78 in 2de7c6b
We need a check on paymentRequest.expirySeconds in here:
eclair/eclair-core/src/main/scala/fr/acinq/eclair/payment/LocalPaymentHandler.scala
Line 88 in 2de7c6b
The text was updated successfully, but these errors were encountered: