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

2. Route peer requests based on missing inventory #3465

Merged
merged 11 commits into from
Feb 8, 2022
Merged

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Feb 4, 2022

Motivation

Zebra needs to stop asking the same peer for the same block multiple times.

Solution

  • send inbound notfound messages to the inv collector
  • use notfound inventory to route inventory requests in the peer set
  • test that it all works

Part of #2156.

Review

@oxarbitrage is reviewing this PR.

Reviewer Checklist

  • Code implements Specs and Designs
  • Tests for Expected Behaviour
  • Tests for Errors

Follow Up Work

@teor2345 teor2345 added C-enhancement Category: This is an improvement P-Medium ⚡ C-security Category: Security issues I-slow Problems with performance or responsiveness I-remote-node-overload Zebra can overload other nodes on the network A-network Area: Network protocol updates or fixes labels Feb 4, 2022
@teor2345 teor2345 self-assigned this Feb 4, 2022
@teor2345 teor2345 changed the base branch from main to notfound-inv-api February 4, 2022 03:24
@oxarbitrage oxarbitrage self-requested a review February 4, 2022 14:03
Base automatically changed from notfound-inv-api to main February 6, 2022 23:05
@codecov
Copy link

codecov bot commented Feb 7, 2022

Codecov Report

Merging #3465 (95870a3) into main (499ae89) will decrease coverage by 0.01%.
The diff coverage is 73.95%.

@@            Coverage Diff             @@
##             main    #3465      +/-   ##
==========================================
- Coverage   78.34%   78.32%   -0.02%     
==========================================
  Files         267      273       +6     
  Lines       31526    31807     +281     
==========================================
+ Hits        24698    24914     +216     
- Misses       6828     6893      +65     

oxarbitrage
oxarbitrage previously approved these changes Feb 7, 2022
Copy link
Contributor

@oxarbitrage oxarbitrage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, i just have a minor question.

zebra-network/src/peer/handshake.rs Show resolved Hide resolved
zebra-consensus/src/transaction/tests.rs Show resolved Hide resolved
@teor2345 teor2345 requested a review from oxarbitrage February 8, 2022 00:17
@mergify mergify bot merged commit 9be13a4 into main Feb 8, 2022
@mergify mergify bot deleted the notfound-route branch February 8, 2022 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-network Area: Network protocol updates or fixes C-enhancement Category: This is an improvement C-security Category: Security issues I-remote-node-overload Zebra can overload other nodes on the network I-slow Problems with performance or responsiveness
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants