Open kilrau opened 5 years ago
@palango @Dominik1999 Would PFS usage improve our error reporting for not being able to find routes? I believe it should.
Would PFS usage improve our error reporting for not being able to find routes? I believe it should.
I should get better as the quality of the routes tried increases, but we can never guarantee that the routes actually work. So the point made in the issue still holds.
but we can never guarantee that the routes actually work. So the point made in the issue still holds.
Yep that's what I meant. That it would at least improve the current situation.
Another reason why cancelling locked payments is desirable (and not refunding): https://github.com/raiden-network/raiden/pull/4150#issuecomment-501689779
There are a few approaches that can be taken to improve this (roughly ordered from the easiest to hardest to implement):
reveal_timeout
is around 10min
, and we use that as the amount of time available for the off-chain protocol to finish.reveal_timeout
. This setting is always tricky because it handles blockchain congestion. We could do a few things here:reveal_timeout
:
gas_price
can be constant. Here than the reveal_timeout
would have to be quite large, set for the worst case. (This is not a good option).gas_price
can vary, and under congestion the cost of registering a secret would increase. This is the current approach, right now we assume the gas_price
chosen by web3 will result in a transaction mined within 5min, we add a 5min margin on that, this gives a minimum lock expiration of 10min, maybe this can be closer to the initial 5min (related PR https://github.com/raiden-network/raiden/pull/2670).reveal_timeout
:
gas_price
can be constant and the expiration would vary. The advantage here would be cost efficiency, and fast errors when there is no congestion, the problem is that it would be hard to properly find a path in the network.Related issue: https://github.com/raiden-network/raiden/issues/451
Edit: One important point here. The behavior on some of these options would be surprising to the user, on the cases were the payment is known to have failed but the lock is not expired yet, the channel capacity will not change. Additionally, this can have weird interactions with how we prevent repeated payments. For these cases I would prefer a separate REST API endpoint.
Intro
E.g. payment calls hanging for several minutes, before erroring in "Internal server error". I have experienced this myself and I believe @offerm brought it up before.
Only errors that are thrown instantly are on initial validation (e.g. insufficient balance). Everything that passes initial validation is not instant. I understand this is not an easy problem to solve, because feedback from failures on the route if someone on the route is not responsive only return after lock expirmes. Consider failing locked transfers earlier (timeout), consider reporting back on the rest of the fucntioning route.
Consider moving away from active "refund payments" as way to notify about a failed route" to cancel locked payments and notify via p2p messages.
PFS should improve (due to higher routing success), but definitely will not solve this.
Problem Definition
Above.
System Description
N/A