light-client icon indicating copy to clipboard operation
light-client copied to clipboard

secretReveal$ should not be emit transfer failed just because the secret request amount is too small

Open hackaugusto opened this issue 4 years ago • 2 comments

If a payment is split into multiple transfers, it is possible for a target to send multiple secret requests, each with a slightly larger amount. In that case, receiving a secret request with an amount smaller than the target is not a failure.

https://github.com/raiden-network/light-client/blob/0abfd9ee9d4359b150048f7018dd13fe07175086/raiden-ts/src/transfers/epics/secret.ts#L125-L129

Related to https://github.com/raiden-network/light-client/issues/2036 https://github.com/raiden-network/light-client/issues/2067 https://github.com/raiden-network/raiden/issues/3520

hackaugusto avatar Aug 12 '20 14:08 hackaugusto

Good point. This was an optimization done to inform the user early when a transfer had failed due to mediators taking more fees than we expected (since it could theoretically still succeed if the target somehow received and sent an updated amount, but in practice this never happens). Is it correct to think this never happens in practice today, and we should re-evaluate this only when Raiden implements multi-transfer payments?

andrevmatos avatar Aug 12 '20 14:08 andrevmatos

Is it correct to think this never happens in practice today, and we should re-evaluate this only when Raiden implements multi-transfer payments?

As of raiden==1.1.1 yes, the related issue linked in the issue is the one used to track split payments

hackaugusto avatar Aug 12 '20 15:08 hackaugusto