Zebra/zebrad/src
Janito Vaqueiro Ferreira Filho 069f7716db
Create initial transaction crawler for the mempool (#2646)
* Create initial `mempool::Crawler` type

The mempool crawler is responsible for periodically asking peers for
transactions to insert into the local mempool. This initial
implementation will periodically ask for transactions, but won't do
anything with them yet.

Also, the crawler is currently configured to be always enabled, but this
should be fixed to avoid crawling while Zebra is still syncing the
chain.

* Add a timeout to peer responses

Prevent the crawler from getting stuck if there's communication with a
peer that takes too long to respond.

* Run the mempool crawler in Zebra

Spawn a task for the crawler when Zebra starts.

* Test if the crawler is sending requests

Create a mock for the `PeerSet` service to intercept requests and verify
that the transaction requests are sent periodically.

* Use `full` Tokio features when testing

Make it simpler to select the features for test builds.

Co-authored-by: teor <teor@riseup.net>

* Link to the issue for crawler activation

Make it easy to navigate from the `TODO` comment to the current project
planning.

Co-authored-by: teor <teor@riseup.net>

* Link to the issue for downloading transactions

Make it easy to navigate from the `TODO` comment to the current project
planning.

Co-authored-by: teor <teor@riseup.net>

Co-authored-by: teor <teor@riseup.net>
2021-08-24 11:23:53 -03:00
..
bin/zebrad Standardise clippy lints and require docs (#2238) 2021-06-04 08:48:40 +10:00
commands Create initial transaction crawler for the mempool (#2646) 2021-08-24 11:23:53 -03:00
components Create initial transaction crawler for the mempool (#2646) 2021-08-24 11:23:53 -03:00
application.rs Add the database format to the panic metadata (#2249) 2021-06-04 14:42:15 +10:00
commands.rs Log configured network in every log message (#1568) 2021-01-12 07:46:56 +10:00
components.rs Create initial transaction crawler for the mempool (#2646) 2021-08-24 11:23:53 -03:00
config.rs Add journald support through tracing-journald (#2034) 2021-04-22 09:31:06 +10:00
lib.rs Standardise clippy lints and require docs (#2238) 2021-06-04 08:48:40 +10:00
prelude.rs Fix a deadlock in TokioComponent. 2020-01-15 12:06:31 -08:00
sentry.rs Standardise clippy lints and require docs (#2238) 2021-06-04 08:48:40 +10:00