Zebra/zebra-state/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
..
service Deduplicate metrics dependencies (#1561) 2021-01-12 12:28:56 +10:00
config.rs Increase the open file limit on unix platforms 2020-12-02 15:32:36 +10:00
constants.rs chain: fix consensus-critical coinbase encoding bug 2020-12-01 10:14:44 +10:00
error.rs Use error message derives in zebra-state 2020-12-04 10:44:36 +10:00
lib.rs Disable the nightly clippy unnecessary_wraps lint (#1403) 2020-12-01 12:20:57 +10:00
request.rs consensus: check Merkle roots 2020-12-01 10:14:44 +10:00
response.rs network: correct data modeling for headers messages 2020-12-02 10:24:31 -08:00
service.rs Rename State method names (#1500) 2020-12-11 10:23:26 +10:00
tests.rs consensus: check Merkle roots 2020-12-01 10:14:44 +10:00
util.rs swap best_chain_len and related constants to u32 for consistency (#1257) 2020-11-06 14:00:10 +10:00
utxo.rs state: track UTXO provenance 2020-11-23 22:18:43 -08:00