-
Notifications
You must be signed in to change notification settings - Fork 106
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
4. Avoid repeated requests to peers after partial responses or errors #3505
Conversation
d0f2697
to
288a90b
Compare
Codecov Report
@@ Coverage Diff @@
## main #3505 +/- ##
==========================================
+ Coverage 78.34% 80.45% +2.11%
==========================================
Files 267 274 +7
Lines 31526 32229 +703
==========================================
+ Hits 24698 25931 +1233
+ Misses 6828 6298 -530 |
This comment was marked as resolved.
This comment was marked as resolved.
dfeda1c
to
7f81526
Compare
288a90b
to
c438be0
Compare
The rest of the PR is:
|
7f81526
to
6c9994c
Compare
df2f220
to
0c5f18d
Compare
276fb97
to
961edc0
Compare
This stops us waiting 3-4 sync resets (4 minutes) before we retry a missing block. Now we wait 1-2 sync resets (2 minutes), which is still a reasonable rate limit. This should speed up syncing near the tip, and on testnet.
2237ee7
to
a84efd3
Compare
Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>
The deny.toml CI failed due to temporary alpine linux Docker network errors. We can just ignore them for this PR, because this PR doesn't change any dependencies. |
* ZIPs were updated to remove ambiguity, this was tracked in #1267. * #2105 was fixed by #3039 and #2379 was closed by #3069 * #2230 was a duplicate of #2231 which was closed by #2511 * #3235 was obsoleted by #2156 which was fixed by #3505 * #1850 was fixed by #2944, #1851 was fixed by #2961 and #2902 was fixed by #2969 * We migrated to Rust 2021 edition in Jan 2022 with #3332 * #1631 was closed as not needed * #338 was fixed by #3040 and #1162 was fixed by #3067 * #2079 was fixed by #2445 * #4794 was fixed by #6122 * #1678 stopped being an issue * #3151 was fixed by #3934 * #3204 was closed as not needed * #1213 was fixed by #4586 * #1774 was closed as not needed * #4633 was closed as not needed * Clarify behaviour of difficulty spacing Co-authored-by: teor <teor@riseup.net> * Update comment to reflect implemented behaviour Co-authored-by: teor <teor@riseup.net> * Update comment to reflect implemented behaviour when retrying block downloads Co-authored-by: teor <teor@riseup.net> * Update `TODO` to remove closed issue and clarify when we might want to fix Co-authored-by: teor <teor@riseup.net> * Update `TODO` to remove closed issue and clarify what we might want to change in future Co-authored-by: teor <teor@riseup.net> * Clarify benefits of how we do block verification Co-authored-by: teor <teor@riseup.net> * Fix rustfmt errors --------- Co-authored-by: teor <teor@riseup.net>
Motivation
We want to avoid repeated requests to peers that don't have a block or transaction:
zcashd
doesn't respond to requests for missing blocks withnotfound
messages.So we have to check its responses, and track missing inventory in them.
When Zebra cancels a request because a peer is slow, or when a peer times out, we don't want to try that peer again.
We want to retry missing blocks or transactions after a few minutes:
Solution
Related changes (needed for tests):
connect_isolated_with_inbound
functionRelated Fixes:
Closes #2156.
Review
@oxarbitrage can review this PR, I'm happy to do a video review if that would help.
During reviews, I'd like to focus on any design issues or bugs in this PR.
Reviewer Checklist
Follow Up Work
We're finally done with these network fixes!