Skip to content
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

STREAM: Retry R00 Errors #467

Closed
emschwartz opened this issue Oct 25, 2019 · 2 comments
Closed

STREAM: Retry R00 Errors #467

emschwartz opened this issue Oct 25, 2019 · 2 comments

Comments

@emschwartz
Copy link
Member

@emschwartz emschwartz commented Oct 25, 2019

In this test run, the STREAM client stopped because of an R00 error:

[DEBUG interledger_stream::client] Prepare 1 with amount 2000 was rejected with code: R00 (2000 left to send)
[ERROR interledger_stream::client] Send money stopped because of error: SendMoneyError("Packet was rejected with error: R00 ")
[ERROR interledger_spsp::client] Error sending payment: SendMoneyError("Packet was rejected with error: R00 ")

I'm not sure why it timed out, but in any case the STREAM sender should retry on RXX errors.

@dora-gt

This comment has been minimized.

Copy link
Member

@dora-gt dora-gt commented Nov 19, 2019

Just taking a glance at this problem, I think these lines are causing the behavior.

self.poll_pending_requests()?;

Referring to the ILPv4 RFC,

Relative errors indicate that the payment did not have enough of a margin in terms of money or time. However, it is impossible to tell whether the sender did not provide enough error margin or the path suddenly became too slow or illiquid. The sender MAY retry the payment with a larger safety margin.

We could retry for this error but we have to consider the strategy on it to amend the margin.

R00 Transfer Timed Out

  1. How often we should retry
  2. When we should give up retrying

I'm not sure in this case we should adopt some strategies like exponential backoff, I think just retrying some predefined times and then giving up are sufficient, at least for R00 error.

R01 Insufficient Source Amount

Should we tell CongestionController to increase the amount? At least, I think we should not just retry with the same amount that was failed.

R02 Insufficient Timeout

I think we cannot retry because we are already doing at our best effort (just reducing round trip time). So I think just letting it error is OK.

R99 Application Error

Maybe this is not defined in Stream, so just letting it error might be OK.

@dora-gt dora-gt closed this Nov 19, 2019
@dora-gt

This comment has been minimized.

Copy link
Member

@dora-gt dora-gt commented Nov 19, 2019

(Sorry I wrongly pushed close button)

@dora-gt dora-gt reopened this Nov 19, 2019
kincaidoneil added a commit that referenced this issue Feb 28, 2020
- fix #513: compute min source amount necessary to deliver money to fix T04 issues
- fix #634: distribute dust amounts across remaining packets
- fix #633: only apply T00, T01, F99 to fail-fast behavior
- fix #467: continue on R01, other relative others should be terminal
- increase default slippage to 1.5%
@gakonst gakonst closed this in #635 Mar 25, 2020
gakonst pushed a commit that referenced this issue Mar 25, 2020
- fix #513: compute min source amount necessary to deliver money to fix T04 issues
- fix #634: distribute dust amounts across remaining packets
- fix #633: only apply T00, T01, F99 to fail-fast behavior
- fix #467: continue on R01, other relative others should be terminal
- increase default slippage to 1.5%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.