zebra/zebrad
Henry de Valence 49aa41544d sync: try to ignore spurious inv messages.
Closes #697.

per  https://github.com/ZcashFoundation/zebra/issues/697#issuecomment-662742971

The response to a getblocks message is an inv message with the hashes of the
following blocks. However, inv messages are also sent unsolicited to gossip new
blocks across the network. Normally, this wouldn't be a problem, because for
every other request we filter only for the messages that are relevant to us.
But because the response to a getblocks message is an inv, the network layer
doesn't (and can't) distinguish between the response inv and the unsolicited
inv.

But there is a mitigation we can do. In our sync algorithm we have two phases:
(1) "ObtainTips" to get a set of tips to chase down, (2) repeatedly call
"ExtendTips" to extend those as far as possible. The unsolicited inv messages
have length 1, but when extending tips we expect to get more than one hash. So
we could reject responses in ExtendTips that have length 1 in order to ignore
these messages. This way we automatically ignore gossip messages during initial
block sync (while we're extending a tip) but we don't ignore length-1 responses
while trying to obtain tips (while querying the network for new tips).
2020-07-22 17:55:52 -07:00
..
src sync: try to ignore spurious inv messages. 2020-07-22 17:55:52 -07:00
tests cleanup warnings throughout codebase 2020-05-27 15:42:29 -04:00
Cargo.toml enable new tracing instrumentation in tokio 2020-07-22 14:39:54 -04:00
README.md Create workspace skeleton based on design.md 2019-08-29 14:46:54 -07:00

README.md

Zebrad

Zebrad is an application.

Getting Started

This application is authored using Abscissa, a Rust application framework.

For more information, see:

Documentation