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

Make Zebra send notfound, and use received notfound to finish requests #2726

Closed
Tracked by #2309
teor2345 opened this issue Sep 2, 2021 · 2 comments · Fixed by #3466
Closed
Tracked by #2309

Make Zebra send notfound, and use received notfound to finish requests #2726

teor2345 opened this issue Sep 2, 2021 · 2 comments · Fixed by #3466
Assignees
Labels
A-network Area: Network protocol updates or fixes A-rust Area: Updates to Rust code C-design Category: Software design work C-enhancement Category: This is an improvement

Comments

@teor2345
Copy link
Contributor

teor2345 commented Sep 2, 2021

Motivation

zcashd and Zebra don't actually need notfound messages:
https://github.com/zcash/zcash/blob/e7b425298f6d9a54810cb7183f00be547e4d9415/src/main.cpp#L5632
https://github.com/ZcashFoundation/zebra/blob/main/zebra-network/src/peer/connection.rs#L115

But Zebra should send notfound as much as possible, so that inv routing works efficiently.
This also helps with testing #2156.

We might also want to use them for SPV clients - does the Zcash network have any of those?

Suggested Solution

  • send notfound so Zebra peers know that we've replied with all the transactions/blocks we have
  • make sure Zebra checks for notfound when it's waiting for more blocks or transactions (we might already do this)

Rejected Alternatives

zcashd doesn't do this, and it isn't really supported by the protocol.

  • send notfound to tell peers when our mempool is empty
    • make Zebra check for notfound when waiting for a MempoolTransactionIds reply, rather than timing out because there is no reply
@teor2345 teor2345 mentioned this issue Sep 2, 2021
59 tasks
@teor2345 teor2345 added A-network Area: Network protocol updates or fixes A-rust Area: Updates to Rust code C-design Category: Software design work C-enhancement Category: This is an improvement P-Medium and removed P-Medium labels Sep 2, 2021
@mpguerra mpguerra added this to the 2021 Sprint 20 milestone Sep 15, 2021
@mpguerra mpguerra removed this from the 2021 Sprint 20 milestone Sep 27, 2021
@mpguerra mpguerra added P-Optional and removed P-Low labels Oct 4, 2021
@teor2345
Copy link
Contributor Author

teor2345 commented Dec 7, 2021

This is required for #2156 - Zebra should send notfound as much as possible, so that inv routing works efficiently.

@teor2345 teor2345 changed the title Work out when Zebra should send notfound, and how it should handle received notfound Make Zebra send notfound, and use received notfound to finish requests Dec 7, 2021
@teor2345 teor2345 self-assigned this Dec 8, 2021
@mpguerra
Copy link
Contributor

@teor2345 can you please add your estimate to this issue when you get a chance, probably no need to do a planning poker session with the whole team since you're already working on it

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 A-rust Area: Updates to Rust code C-design Category: Software design work C-enhancement Category: This is an improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants