Zebra/zebra-consensus/src
Janito Vaqueiro Ferreira Filho 0960e4fb0b
Update to Tokio 1.13.0 (#2994)
* Update `tower` to version `0.4.9`

Update to latest version to add support for Tokio version 1.

* Replace usage of `ServiceExt::ready_and`

It was deprecated in favor of `ServiceExt::ready`.

* Update Tokio dependency to version `1.13.0`

This will break the build because the code isn't ready for the update,
but future commits will fix the issues.

* Replace import of `tokio::stream::StreamExt`

Use `futures::stream::StreamExt` instead, because newer versions of
Tokio don't have the `stream` feature.

* Use `IntervalStream` in `zebra-network`

In newer versions of Tokio `Interval` doesn't implement `Stream`, so the
wrapper types from `tokio-stream` have to be used instead.

* Use `IntervalStream` in `inventory_registry`

In newer versions of Tokio the `Interval` type doesn't implement
`Stream`, so `tokio_stream::wrappers::IntervalStream` has to be used
instead.

* Use `BroadcastStream` in `inventory_registry`

In newer versions of Tokio `broadcast::Receiver` doesn't implement
`Stream`, so `tokio_stream::wrappers::BroadcastStream` instead. This
also requires changing the error type that is used.

* Handle `Semaphore::acquire` error in `tower-batch`

Newer versions of Tokio can return an error if the semaphore is closed.
This shouldn't happen in `tower-batch` because the semaphore is never
closed.

* Handle `Semaphore::acquire` error in `zebrad` test

On newer versions of Tokio `Semaphore::acquire` can return an error if
the semaphore is closed. This shouldn't happen in the test because the
semaphore is never closed.

* Update some `zebra-network` dependencies

Use versions compatible with Tokio version 1.

* Upgrade Hyper to version 0.14

Use a version that supports Tokio version 1.

* Update `metrics` dependency to version 0.17

And also update the `metrics-exporter-prometheus` to version 0.6.1.
These updates are to make sure Tokio 1 is supported.

* Use `f64` as the histogram data type

`u64` isn't supported as the histogram data type in newer versions of
`metrics`.

* Update the initialization of the metrics component

Make it compatible with the new version of `metrics`.

* Simplify build version counter

Remove all constants and use the new `metrics::incement_counter!` macro.

* Change metrics output line to match on

The snapshot string isn't included in the newer version of
`metrics-exporter-prometheus`.

* Update `sentry` to version 0.23.0

Use a version compatible with Tokio version 1.

* Remove usage of `TracingIntegration`

This seems to not be available from `sentry-tracing` anymore, so it
needs to be replaced.

* Add sentry layer to tracing initialization

This seems like the replacement for `TracingIntegration`.

* Remove unnecessary conversion

Suggested by a Clippy lint.

* Update Cargo lock file

Apply all of the updates to dependencies.

* Ban duplicate tokio dependencies

Also ban git sources for tokio dependencies.

* Stop allowing sentry-tracing git repository in `deny.toml`

* Allow remaining duplicates after the tokio upgrade

* Use C: drive for CI build output on Windows

GitHub Actions uses a Windows image with two disk drives, and the
default D: drive is smaller than the C: drive. Zebra currently uses a
lot of space to build, so it has to use the C: drive to avoid CI build
failures because of insufficient space.

Co-authored-by: teor <teor@riseup.net>
2021-11-02 18:46:57 +00:00
..
block Fix or disable the new clippy::question_mark lint (#2946) 2021-10-25 19:34:34 +00:00
chain Return a transaction verifier from `zebra_consensus::init` (#2665) 2021-08-25 15:07:26 +00:00
checkpoint Update to Tokio 1.13.0 (#2994) 2021-11-02 18:46:57 +00:00
parameters Replace smart quotes with ascii quotes 2021-03-15 03:18:10 -04:00
primitives Update to Tokio 1.13.0 (#2994) 2021-11-02 18:46:57 +00:00
transaction Reject a mempool transaction if it has internal spend conflicts (#2843) 2021-10-28 02:49:28 +00:00
block.rs Update to Tokio 1.13.0 (#2994) 2021-11-02 18:46:57 +00:00
chain.rs Update to Tokio 1.13.0 (#2994) 2021-11-02 18:46:57 +00:00
checkpoint.rs Ignore AlreadyInChain error in the syncer (#2890) 2021-10-20 11:07:19 +10:00
config.rs Allow deliberate instances of the clippy::derivable_impls lint (#2788) 2021-09-22 10:43:27 -03:00
error.rs Reject a mempool transaction if it has internal spend conflicts (#2843) 2021-10-28 02:49:28 +00:00
lib.rs Ignore AlreadyInChain error in the syncer (#2890) 2021-10-20 11:07:19 +10:00
parameters.rs move genesis parameters to zebra-chain (#1151) 2020-10-12 14:08:23 -07:00
primitives.rs Merge pull request #2318 from ZcashFoundation/redpallas-verifier 2021-07-02 02:50:23 -04:00
script.rs Send looked up UTXOs to the transaction verifier (#2849) 2021-10-12 00:25:20 +00:00
transaction.rs Reject a mempool transaction if it has internal spend conflicts (#2843) 2021-10-28 02:49:28 +00:00