Transaction downloader and verifier.
The main struct
Downloads allows downloading and verifying transactions.
It is used by the mempool to get transactions into it. It is also able to
just verify transactions that were directly pushed.
The verification itself is done by the
Verified transactions are returned to the caller in
This is in contrast to the block downloader and verifiers which don’t
return anything and forward the verified blocks to the state themselves.
The mempool downloader doesn’t send verified transactions to the
service. So Zebra must spawn a task that regularly polls the downloader for
ready transactions. (To ensure that transactions propagate across the entire
network in each 75s block interval, the polling interval should be around
Polling the downloader from
Mempool::poll_ready is not sufficient.
Service::poll_ready] is only called when there is a service request.
But we want to download and gossip transactions,
even when there are no other service requests.
- A marker struct for the oneshot channels which cancel a pending download and verify.
- Represents a [
Stream] of download and verification tasks.
- Errors that can occur while downloading and verifying a transaction.
- The maximum number of concurrent inbound download and verify tasks.
- Controls how long we wait for a transaction download request to complete.
- Controls how long we wait for a transaction verify request to complete.
- BoxError 🔒