Zebra/zebra-network/src
Jane Lusby 15698245e1
Deduplicate metrics dependencies (#1561)
## Motivation

This PR is motivated by the regression identified in https://github.com/ZcashFoundation/zebra/issues/1349. That PR notes that the metrics stopped working for most of the crates other than `zebrad`.

## Solution

This PR resolves the regression by deduplicating the `metrics` crate dependency. During a recent change we upgraded the metrics version in `zebrad` and a couple other of our crates, but we never updated the dependencies in `zebra-state`, `zebra-consensus`, or `zebra-network`. This caused the metrics macros to attempt to retrieve the current metrics exporter through the wrong function. We would install the metrics exporter in `0.13`, but then attempt to look it up through the `0.12` crate, which contains a different instance of the metrics exporter static variable which is unset. Doing this causes the metrics macros to return `None` for the current exporter after which they just silently give up.

## Related Issues

closes https://github.com/ZcashFoundation/zebra/issues/1349

## Follow Up Work

I noticed we have quite a few duplicate dependencies in our tree. We might be able to save some compilation time by auditing those and deduplicating them as much as possible.

- https://github.com/ZcashFoundation/zebra/issues/1582
Co-authored-by: teor <teor@riseup.net>
2021-01-12 12:28:56 +10:00
..
peer Revert unused instrument macros 2021-01-06 13:07:23 -08:00
peer_set Deduplicate metrics dependencies (#1561) 2021-01-12 12:28:56 +10:00
protocol Rewrite GetData handling to match the zcashd implementation (#1518) 2021-01-04 13:25:35 +10:00
address_book.rs Fix some "needless lifetime" clippy lints 2020-10-12 08:54:23 +10:00
config.rs Update the peerset buffer size and sync timeout 2020-09-08 12:44:33 -07:00
constants.rs zebra: move to 1.x-based versioning. (#1476) 2020-12-08 08:53:07 +10:00
isolated.rs deps: move to tokio 0.3, tower 0.4 2020-11-20 10:08:16 -08:00
lib.rs Disable the nightly clippy unnecessary_wraps lint (#1403) 2020-12-01 12:20:57 +10:00
meta_addr.rs Call `zebra_test::init` where needed. (#1227) 2020-11-10 10:29:25 +10:00
peer.rs Ensure received client request oneshots are used via the type system 2021-01-06 13:07:23 -08:00
peer_set.rs Implement Inventory Tracking RFC (#963) 2020-09-01 14:28:54 -07:00
policies.rs Fix sync algorithm. (#887) 2020-08-12 16:48:01 -07:00
protocol.rs Refactor protocol into internal, external modules. 2019-11-27 05:06:01 -05:00
timestamp_collector.rs Upgrade tokio, futures, hyper to released versions. 2019-12-13 17:42:15 -05:00