-
Notifications
You must be signed in to change notification settings - Fork 115
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
3. Send notfound when Zebra doesn't have a block or transaction #3466
Conversation
0efc271
to
f6217cf
Compare
b99d195
to
cb561d3
Compare
f6217cf
to
389c828
Compare
Codecov Report
@@ Coverage Diff @@
## main #3466 +/- ##
==========================================
+ Coverage 78.34% 80.29% +1.95%
==========================================
Files 267 275 +8
Lines 31526 32054 +528
==========================================
+ Hits 24698 25738 +1040
+ Misses 6828 6316 -512 |
2fad60e
to
09d0f12
Compare
09d0f12
to
0a32208
Compare
2e7f394
to
e049a17
Compare
0a32208
to
ab9b09c
Compare
45fce08
to
47880aa
Compare
@jvff this should be ready for review now. I'd like to focus on the functionality changes, because this PR series has taken longer than I expected. |
47880aa
to
70395ee
Compare
f00e190
to
dfeda1c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a lot of comments, but I don't think any of them should block merging the PR 🤔
dfeda1c
to
7f81526
Compare
```sh fastmod Advertised Available zebra* fastmod advertised available zebra* ```
… an InventoryStatus And rename it to ResponseStatus. Split the methods between ResponseStatus and an InventoryStatus alias.
This makes them more likely to get updated when the module changes.
The code that these tests use hasn't actually changed much, and they are only failing on some platforms (coverage, macOS). So it seems like the extra concurrent inbound tests have pushed them past their time limit. (Perhaps due to TCP system calls, or extra serialization work.)
Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>
This prevents `MockService<zebra_state>` timeouts in the `sync_block_too_high_extend_tips` test, at the cost of reducing coverage of different execution orders.
7f81526
to
6c9994c
Compare
@jvff thanks for the reviews. This PR series took much longer than I expected to write and test, so I'd really like to get it merged. |
Motivation
Currently, Zebra just ignores block or transaction requests it can't answer.
But we should tell peers we don't have that inventory, so they can try another peer.
Solution
Related non-feature fixes:
Tests:
notfound
block messages to peers - single block requestnotfound
transaction messages to peers (including Tx and Wtx) - multi-transaction requestCloses #2726.
Review
I'd like reviews to focus on the functionality changes.
(I will open another PR to deal with some edge cases around peers not sending
notfound
, and Zebra cancelling requests.)@jvff can review this PR.
This PR is based on PR #3465.
Reviewer Checklist
Follow Up Work
notfound
message to the inv collector