change(deps): Upgrade tracing-subscriber and related dependencies (#4517)
* Upgrade tracing and related dependencies ```sh cargo upgrade --workspace tracing-error tracing-subscrber color-eyre tracing-flame tracing-journald sentry sentry-tracing metrics metrics-exporter-prometheus reqwest ``` * Update duplicate dependency checks * Enable the tracing/env-filter feature * Fix type inference for metrics Manual changes, plus: ```sh fastmod "as _" "as f64" ``` * Tidy up some unrelated test code * Update metrics-exporter-prometheus API And make unused dependencies optional. * Adjust test regexes to new tracing format Also fix some regex bugs, and refactor to simplify. * Disable color-eyre span traces and track caller in release builds * Add a feature that enables extra debugging in release builds * Clean up some redundant features * Increase a test timeout
This commit is contained in:
parent
bfa319de10
commit
ca0520b2e8
|
@ -266,7 +266,7 @@ jobs:
|
||||||
needs_zebra_state: false
|
needs_zebra_state: false
|
||||||
saves_to_disk: true
|
saves_to_disk: true
|
||||||
disk_suffix: checkpoint
|
disk_suffix: checkpoint
|
||||||
height_grep_text: 'flushing database to disk height=Height'
|
height_grep_text: 'flushing database to disk .*height.*=.*Height'
|
||||||
|
|
||||||
# Test that Zebra syncs and fully validates a few thousand blocks from a cached mandatory checkpoint disk
|
# Test that Zebra syncs and fully validates a few thousand blocks from a cached mandatory checkpoint disk
|
||||||
#
|
#
|
||||||
|
@ -309,7 +309,7 @@ jobs:
|
||||||
needs_zebra_state: false
|
needs_zebra_state: false
|
||||||
saves_to_disk: true
|
saves_to_disk: true
|
||||||
disk_suffix: tip
|
disk_suffix: tip
|
||||||
height_grep_text: 'estimated progress to chain tip sync_percent=99.* current_height=Height'
|
height_grep_text: 'current_height.*=.*Height'
|
||||||
|
|
||||||
# Test that Zebra can answer a synthetic RPC call, using a cached Zebra tip state
|
# Test that Zebra can answer a synthetic RPC call, using a cached Zebra tip state
|
||||||
#
|
#
|
||||||
|
|
|
@ -363,7 +363,7 @@ jobs:
|
||||||
# disk description.
|
# disk description.
|
||||||
#
|
#
|
||||||
# The regex used to grep the sync height is provided by ${{ inputs.height_grep_text }},
|
# The regex used to grep the sync height is provided by ${{ inputs.height_grep_text }},
|
||||||
# this allows to dynamically change the height as needed by different situations or
|
# this allows to dynamically change the height as needed by different situations or
|
||||||
# based on the logs output from different tests
|
# based on the logs output from different tests
|
||||||
#
|
#
|
||||||
# Passes the sync height to subsequent steps using $SYNC_HEIGHT env variable
|
# Passes the sync height to subsequent steps using $SYNC_HEIGHT env variable
|
||||||
|
|
|
@ -813,22 +813,6 @@ dependencies = [
|
||||||
"termcolor",
|
"termcolor",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "color-eyre"
|
|
||||||
version = "0.5.11"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1f1885697ee8a177096d42f158922251a41973117f6d8a234cee94b9509157b7"
|
|
||||||
dependencies = [
|
|
||||||
"backtrace",
|
|
||||||
"color-spantrace 0.1.6",
|
|
||||||
"eyre",
|
|
||||||
"indenter",
|
|
||||||
"once_cell",
|
|
||||||
"owo-colors 1.3.0",
|
|
||||||
"tracing-error 0.1.2",
|
|
||||||
"url",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "color-eyre"
|
name = "color-eyre"
|
||||||
version = "0.6.1"
|
version = "0.6.1"
|
||||||
|
@ -836,24 +820,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8ebf286c900a6d5867aeff75cfee3192857bb7f24b547d4f0df2ed6baa812c90"
|
checksum = "8ebf286c900a6d5867aeff75cfee3192857bb7f24b547d4f0df2ed6baa812c90"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"backtrace",
|
"backtrace",
|
||||||
"color-spantrace 0.2.0",
|
"color-spantrace",
|
||||||
"eyre",
|
"eyre",
|
||||||
"indenter",
|
"indenter",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"owo-colors 3.4.0",
|
"owo-colors",
|
||||||
"tracing-error 0.2.0",
|
"tracing-error",
|
||||||
]
|
"url",
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "color-spantrace"
|
|
||||||
version = "0.1.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b6eee477a4a8a72f4addd4de416eb56d54bc307b284d6601bafdee1f4ea462d1"
|
|
||||||
dependencies = [
|
|
||||||
"once_cell",
|
|
||||||
"owo-colors 1.3.0",
|
|
||||||
"tracing-core",
|
|
||||||
"tracing-error 0.1.2",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -863,9 +836,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1ba75b3d9449ecdccb27ecbc479fdc0b87fa2dd43d2f8298f9bf0e59aacc8dce"
|
checksum = "1ba75b3d9449ecdccb27ecbc479fdc0b87fa2dd43d2f8298f9bf0e59aacc8dce"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"owo-colors 3.4.0",
|
"owo-colors",
|
||||||
"tracing-core",
|
"tracing-core",
|
||||||
"tracing-error 0.2.0",
|
"tracing-error",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1210,21 +1183,11 @@ dependencies = [
|
||||||
"syn 1.0.92",
|
"syn 1.0.92",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "dashmap"
|
|
||||||
version = "4.0.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c"
|
|
||||||
dependencies = [
|
|
||||||
"cfg-if 1.0.0",
|
|
||||||
"num_cpus",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "debugid"
|
name = "debugid"
|
||||||
version = "0.7.3"
|
version = "0.8.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d6ee87af31d84ef885378aebca32be3d682b0e0dc119d5b4860a2c5bb5046730"
|
checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"uuid",
|
"uuid",
|
||||||
|
@ -1433,12 +1396,6 @@ dependencies = [
|
||||||
"cfg-if 1.0.0",
|
"cfg-if 1.0.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "endian-type"
|
|
||||||
version = "0.1.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "enum-iterator"
|
name = "enum-iterator"
|
||||||
version = "0.7.0"
|
version = "0.7.0"
|
||||||
|
@ -2528,6 +2485,15 @@ dependencies = [
|
||||||
"regex-automata",
|
"regex-automata",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "matchers"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
|
||||||
|
dependencies = [
|
||||||
|
"regex-automata",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "matches"
|
name = "matches"
|
||||||
version = "0.1.9"
|
version = "0.1.9"
|
||||||
|
@ -2593,9 +2559,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "metrics"
|
name = "metrics"
|
||||||
version = "0.17.1"
|
version = "0.18.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "55586aa936c35f34ba8aa5d97356d554311206e1ce1f9e68fe7b07288e5ad827"
|
checksum = "2e52eb6380b6d2a10eb3434aec0885374490f5b82c8aaf5cd487a183c98be834"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash",
|
"ahash",
|
||||||
"metrics-macros",
|
"metrics-macros",
|
||||||
|
@ -2603,11 +2569,12 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "metrics-exporter-prometheus"
|
name = "metrics-exporter-prometheus"
|
||||||
version = "0.7.0"
|
version = "0.9.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "aee04ed06085ea4eb1e1378c4fd973d95e0d3e32897913cd58aedc3b10e71452"
|
checksum = "8b93b470b04c005178058e18ac8bb2eb3fda562cf87af5ea05ba8d44190d458c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hyper",
|
"hyper",
|
||||||
|
"indexmap",
|
||||||
"ipnet",
|
"ipnet",
|
||||||
"metrics",
|
"metrics",
|
||||||
"metrics-util",
|
"metrics-util",
|
||||||
|
@ -2619,37 +2586,29 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "metrics-macros"
|
name = "metrics-macros"
|
||||||
version = "0.4.1"
|
version = "0.5.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0daa0ab3a0ae956d0e2c1f42511422850e577d36a255357d1a7d08d45ee3a2f1"
|
checksum = "49e30813093f757be5cf21e50389a24dc7dbb22c49f23b7e8f51d69b508a5ffa"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"lazy_static",
|
|
||||||
"proc-macro2 1.0.36",
|
"proc-macro2 1.0.36",
|
||||||
"quote 1.0.15",
|
"quote 1.0.15",
|
||||||
"regex",
|
|
||||||
"syn 1.0.92",
|
"syn 1.0.92",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "metrics-util"
|
name = "metrics-util"
|
||||||
version = "0.10.2"
|
version = "0.12.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1174223789e331d9d47a4a953dac36e397db60fa8d2a111ac505388c6c7fe32e"
|
checksum = "65a9e83b833e1d2e07010a386b197c13aa199bbd0fca5cf69bfa147972db890a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash",
|
|
||||||
"aho-corasick",
|
|
||||||
"atomic-shim",
|
"atomic-shim",
|
||||||
"crossbeam-epoch",
|
"crossbeam-epoch",
|
||||||
"crossbeam-utils",
|
"crossbeam-utils",
|
||||||
"dashmap",
|
|
||||||
"hashbrown",
|
"hashbrown",
|
||||||
"indexmap",
|
|
||||||
"metrics",
|
"metrics",
|
||||||
"num_cpus",
|
"num_cpus",
|
||||||
"ordered-float",
|
|
||||||
"parking_lot 0.11.2",
|
"parking_lot 0.11.2",
|
||||||
"quanta",
|
"quanta",
|
||||||
"radix_trie",
|
|
||||||
"sketches-ddsketch",
|
"sketches-ddsketch",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -2752,15 +2711,6 @@ dependencies = [
|
||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "nibble_vec"
|
|
||||||
version = "0.1.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43"
|
|
||||||
dependencies = [
|
|
||||||
"smallvec 1.8.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nodrop"
|
name = "nodrop"
|
||||||
version = "0.1.14"
|
version = "0.1.14"
|
||||||
|
@ -2975,15 +2925,6 @@ dependencies = [
|
||||||
"zcash_note_encryption 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"zcash_note_encryption 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "ordered-float"
|
|
||||||
version = "2.10.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87"
|
|
||||||
dependencies = [
|
|
||||||
"num-traits",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ordered-map"
|
name = "ordered-map"
|
||||||
version = "0.4.2"
|
version = "0.4.2"
|
||||||
|
@ -3003,12 +2944,6 @@ dependencies = [
|
||||||
"stable_deref_trait",
|
"stable_deref_trait",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "owo-colors"
|
|
||||||
version = "1.3.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "2386b4ebe91c2f7f51082d4cefa145d030e33a1842a96b12e4885cc3c01f7a55"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "owo-colors"
|
name = "owo-colors"
|
||||||
version = "3.4.0"
|
version = "3.4.0"
|
||||||
|
@ -3654,16 +3589,6 @@ version = "0.7.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09"
|
checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "radix_trie"
|
|
||||||
version = "0.2.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd"
|
|
||||||
dependencies = [
|
|
||||||
"endian-type",
|
|
||||||
"nibble_vec",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rand"
|
name = "rand"
|
||||||
version = "0.7.3"
|
version = "0.7.3"
|
||||||
|
@ -4210,9 +4135,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sentry"
|
name = "sentry"
|
||||||
version = "0.23.0"
|
version = "0.26.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "546b9b6f76c26c60ffbcf0b7136e15169fe13d43949b4aadb7c1edc1c3f3a26f"
|
checksum = "904eca4fb30c6112a1dae60c0a9e29cfb42f42129da4260f1ee20e94151b62e3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"httpdate",
|
"httpdate",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
|
@ -4224,9 +4149,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sentry-backtrace"
|
name = "sentry-backtrace"
|
||||||
version = "0.23.0"
|
version = "0.26.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9cd0cba2aff36ac98708f7a6e7abbdde82dbaf180d5870c41084dc1b473648b9"
|
checksum = "1671189d1b759879fa4bdde46c50a499abb14332ed81f84fc6f60658f41b2fdb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"backtrace",
|
"backtrace",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
|
@ -4236,14 +4161,12 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sentry-contexts"
|
name = "sentry-contexts"
|
||||||
version = "0.23.0"
|
version = "0.26.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9bacf1c62427c6c97b896640d0c4dd204bbd3b79dd192d7cb40891aa5ee11d58"
|
checksum = "db80ceff16bb1a4b2689b8758e5e61e405fc4d8ff9f2d1b5b845b76ce37fa34e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hostname",
|
"hostname",
|
||||||
"lazy_static",
|
|
||||||
"libc",
|
"libc",
|
||||||
"regex",
|
|
||||||
"rustc_version",
|
"rustc_version",
|
||||||
"sentry-core",
|
"sentry-core",
|
||||||
"uname",
|
"uname",
|
||||||
|
@ -4251,11 +4174,10 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sentry-core"
|
name = "sentry-core"
|
||||||
version = "0.23.0"
|
version = "0.26.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f9a957270c9a430218f8031c866493061a27e35a70250e9527f093563a33ce6b"
|
checksum = "6c9f509d3959ed4dbbd80ca42572caad682aaa1cdd92c719e0815d0e87f82c96"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"sentry-types",
|
"sentry-types",
|
||||||
|
@ -4265,26 +4187,28 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sentry-tracing"
|
name = "sentry-tracing"
|
||||||
version = "0.23.0"
|
version = "0.26.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d291df287241b0ef97f5bf9e9a595691ef8dfb49bc6acfd55b9dc2ade681f1c9"
|
checksum = "d4e2796e40502893ed0d04646e507f91e74f1cbf09e370d42bb1cdbcaeeca9bb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"sentry-core",
|
"sentry-core",
|
||||||
"tracing-core",
|
"tracing-core",
|
||||||
"tracing-subscriber 0.2.25",
|
"tracing-subscriber 0.3.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sentry-types"
|
name = "sentry-types"
|
||||||
version = "0.23.0"
|
version = "0.26.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f4dd2266fee014a86e250e98e389191ecd23be546b5c42b6a2fb9af2972fadac"
|
checksum = "254b600e93e9ef00a48382c9f1e86d27884bd9a5489efa4eb9210c20c72e88a6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
|
||||||
"debugid",
|
"debugid",
|
||||||
|
"getrandom 0.2.5",
|
||||||
|
"hex",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
|
"time 0.3.7",
|
||||||
"url",
|
"url",
|
||||||
"uuid",
|
"uuid",
|
||||||
]
|
]
|
||||||
|
@ -5405,7 +5329,7 @@ dependencies = [
|
||||||
name = "tower-batch"
|
name = "tower-batch"
|
||||||
version = "0.2.25"
|
version = "0.2.25"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"color-eyre 0.6.1",
|
"color-eyre",
|
||||||
"ed25519-zebra",
|
"ed25519-zebra",
|
||||||
"futures",
|
"futures",
|
||||||
"futures-core",
|
"futures-core",
|
||||||
|
@ -5512,16 +5436,6 @@ dependencies = [
|
||||||
"valuable",
|
"valuable",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tracing-error"
|
|
||||||
version = "0.1.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b4d7c0b83d4a500748fa5879461652b361edf5c9d51ede2a2ac03875ca185e24"
|
|
||||||
dependencies = [
|
|
||||||
"tracing",
|
|
||||||
"tracing-subscriber 0.2.25",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing-error"
|
name = "tracing-error"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
|
@ -5529,18 +5443,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e"
|
checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-subscriber 0.3.9",
|
"tracing-subscriber 0.3.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing-flame"
|
name = "tracing-flame"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bd520fe41c667b437952383f3a1ec14f1fa45d653f719a77eedd6e6a02d8fa54"
|
checksum = "0bae117ee14789185e129aaee5d93750abe67fdc5a9a62650452bfe4e122a3a9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-subscriber 0.2.25",
|
"tracing-subscriber 0.3.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -5555,12 +5469,13 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing-journald"
|
name = "tracing-journald"
|
||||||
version = "0.1.0"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8fe1f0ed2b7a5fcb6da2bc9e783587d9a0c8b9535e50224afe04e543eae8a2d6"
|
checksum = "ba316a74e8fc3c3896a850dba2375928a9fa171b085ecddfc7c054d39970f3fd"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"libc",
|
||||||
"tracing-core",
|
"tracing-core",
|
||||||
"tracing-subscriber 0.2.25",
|
"tracing-subscriber 0.3.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -5574,16 +5489,6 @@ dependencies = [
|
||||||
"tracing-core",
|
"tracing-core",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tracing-serde"
|
|
||||||
version = "0.1.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1"
|
|
||||||
dependencies = [
|
|
||||||
"serde",
|
|
||||||
"tracing-core",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing-subscriber"
|
name = "tracing-subscriber"
|
||||||
version = "0.1.6"
|
version = "0.1.6"
|
||||||
|
@ -5593,7 +5498,7 @@ dependencies = [
|
||||||
"ansi_term 0.11.0",
|
"ansi_term 0.11.0",
|
||||||
"chrono",
|
"chrono",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"matchers",
|
"matchers 0.0.1",
|
||||||
"owning_ref",
|
"owning_ref",
|
||||||
"regex",
|
"regex",
|
||||||
"smallvec 0.6.14",
|
"smallvec 0.6.14",
|
||||||
|
@ -5603,35 +5508,20 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing-subscriber"
|
name = "tracing-subscriber"
|
||||||
version = "0.2.25"
|
version = "0.3.11"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71"
|
checksum = "4bc28f93baff38037f64e6f43d34cfa1605f27a49c34e8a04c5e78b0babf2596"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term 0.12.1",
|
"ansi_term 0.12.1",
|
||||||
"chrono",
|
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"matchers",
|
"matchers 0.1.0",
|
||||||
"regex",
|
"regex",
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"sharded-slab",
|
"sharded-slab",
|
||||||
"smallvec 1.8.0",
|
"smallvec 1.8.0",
|
||||||
"thread_local",
|
"thread_local",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-core",
|
"tracing-core",
|
||||||
"tracing-log",
|
"tracing-log",
|
||||||
"tracing-serde",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tracing-subscriber"
|
|
||||||
version = "0.3.9"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "9e0ab7bdc962035a87fba73f3acca9b8a8d0034c2e6f60b84aeaaddddc155dce"
|
|
||||||
dependencies = [
|
|
||||||
"sharded-slab",
|
|
||||||
"thread_local",
|
|
||||||
"tracing-core",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -5752,9 +5642,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "uuid"
|
name = "uuid"
|
||||||
version = "0.8.2"
|
version = "1.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
|
checksum = "93bbc61e655a4833cf400d0d15bf3649313422fa7572886ad6dab16d79886365"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"getrandom 0.2.5",
|
"getrandom 0.2.5",
|
||||||
"serde",
|
"serde",
|
||||||
|
@ -6256,7 +6146,7 @@ dependencies = [
|
||||||
"bs58",
|
"bs58",
|
||||||
"byteorder",
|
"byteorder",
|
||||||
"chrono",
|
"chrono",
|
||||||
"color-eyre 0.6.1",
|
"color-eyre",
|
||||||
"criterion",
|
"criterion",
|
||||||
"displaydoc",
|
"displaydoc",
|
||||||
"ed25519-zebra",
|
"ed25519-zebra",
|
||||||
|
@ -6311,7 +6201,7 @@ dependencies = [
|
||||||
"blake2b_simd 1.0.0",
|
"blake2b_simd 1.0.0",
|
||||||
"bls12_381",
|
"bls12_381",
|
||||||
"chrono",
|
"chrono",
|
||||||
"color-eyre 0.6.1",
|
"color-eyre",
|
||||||
"dirs",
|
"dirs",
|
||||||
"displaydoc",
|
"displaydoc",
|
||||||
"futures",
|
"futures",
|
||||||
|
@ -6335,9 +6225,9 @@ dependencies = [
|
||||||
"tower-batch",
|
"tower-batch",
|
||||||
"tower-fallback",
|
"tower-fallback",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-error 0.1.2",
|
"tracing-error",
|
||||||
"tracing-futures",
|
"tracing-futures",
|
||||||
"tracing-subscriber 0.2.25",
|
"tracing-subscriber 0.3.11",
|
||||||
"zcash_proofs",
|
"zcash_proofs",
|
||||||
"zebra-chain",
|
"zebra-chain",
|
||||||
"zebra-script",
|
"zebra-script",
|
||||||
|
@ -6374,7 +6264,7 @@ dependencies = [
|
||||||
"tor-rtcompat",
|
"tor-rtcompat",
|
||||||
"tower",
|
"tower",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-error 0.1.2",
|
"tracing-error",
|
||||||
"tracing-futures",
|
"tracing-futures",
|
||||||
"zebra-chain",
|
"zebra-chain",
|
||||||
"zebra-test",
|
"zebra-test",
|
||||||
|
@ -6435,7 +6325,7 @@ version = "1.0.0-beta.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode",
|
"bincode",
|
||||||
"chrono",
|
"chrono",
|
||||||
"color-eyre 0.6.1",
|
"color-eyre",
|
||||||
"dirs",
|
"dirs",
|
||||||
"displaydoc",
|
"displaydoc",
|
||||||
"futures",
|
"futures",
|
||||||
|
@ -6468,14 +6358,14 @@ dependencies = [
|
||||||
name = "zebra-test"
|
name = "zebra-test"
|
||||||
version = "1.0.0-beta.10"
|
version = "1.0.0-beta.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"color-eyre 0.5.11",
|
"color-eyre",
|
||||||
"futures",
|
"futures",
|
||||||
"hex",
|
"hex",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"insta",
|
"insta",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"owo-colors 3.4.0",
|
"owo-colors",
|
||||||
"proptest",
|
"proptest",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"regex",
|
"regex",
|
||||||
|
@ -6485,20 +6375,20 @@ dependencies = [
|
||||||
"tokio",
|
"tokio",
|
||||||
"tower",
|
"tower",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-error 0.1.2",
|
"tracing-error",
|
||||||
"tracing-subscriber 0.2.25",
|
"tracing-subscriber 0.3.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zebra-utils"
|
name = "zebra-utils"
|
||||||
version = "1.0.0-beta.10"
|
version = "1.0.0-beta.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"color-eyre 0.6.1",
|
"color-eyre",
|
||||||
"hex",
|
"hex",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"structopt",
|
"structopt",
|
||||||
"tracing-error 0.1.2",
|
"tracing-error",
|
||||||
"tracing-subscriber 0.2.25",
|
"tracing-subscriber 0.3.11",
|
||||||
"zebra-chain",
|
"zebra-chain",
|
||||||
"zebra-consensus",
|
"zebra-consensus",
|
||||||
"zebra-state",
|
"zebra-state",
|
||||||
|
@ -6511,7 +6401,7 @@ dependencies = [
|
||||||
"abscissa_core",
|
"abscissa_core",
|
||||||
"atty",
|
"atty",
|
||||||
"chrono",
|
"chrono",
|
||||||
"color-eyre 0.5.11",
|
"color-eyre",
|
||||||
"dirs",
|
"dirs",
|
||||||
"futures",
|
"futures",
|
||||||
"gumdrop",
|
"gumdrop",
|
||||||
|
@ -6546,11 +6436,11 @@ dependencies = [
|
||||||
"tonic-build",
|
"tonic-build",
|
||||||
"tower",
|
"tower",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-error 0.1.2",
|
"tracing-error",
|
||||||
"tracing-flame",
|
"tracing-flame",
|
||||||
"tracing-futures",
|
"tracing-futures",
|
||||||
"tracing-journald",
|
"tracing-journald",
|
||||||
"tracing-subscriber 0.2.25",
|
"tracing-subscriber 0.3.11",
|
||||||
"vergen",
|
"vergen",
|
||||||
"zebra-chain",
|
"zebra-chain",
|
||||||
"zebra-consensus",
|
"zebra-consensus",
|
||||||
|
|
21
deny.toml
21
deny.toml
|
@ -36,18 +36,15 @@ skip = [
|
||||||
# dependencies starting at the specified crate, up to a certain depth, which is
|
# dependencies starting at the specified crate, up to a certain depth, which is
|
||||||
# by default infinite
|
# by default infinite
|
||||||
skip-tree = [
|
skip-tree = [
|
||||||
# ticket #2983: criterion dependencies
|
# wait for criterion to de-duplicate itertools transitive dependencies
|
||||||
{ name = "criterion", version = "=0.3.5" },
|
{ name = "criterion", version = "=0.3.5" },
|
||||||
|
|
||||||
# ticket #3000: tower-fallback dependencies
|
# ticket #3000: upgrade tower-fallback dependencies
|
||||||
{ name = "pin-project", version = "=0.4.29" },
|
{ name = "pin-project", version = "=0.4.29" },
|
||||||
|
|
||||||
# ticket #3315: ordered-map dependencies that should be dev-dependencies
|
# wait for ordered-map to release a dependency fix
|
||||||
{ name = "ordered-map", version = "=0.4.2" },
|
{ name = "ordered-map", version = "=0.4.2" },
|
||||||
|
|
||||||
# ticket #2984: owo-colors dependencies
|
|
||||||
{ name = "color-eyre", version = "=0.5.11" },
|
|
||||||
|
|
||||||
# wait for structopt upgrade (or upgrade to clap 3)
|
# wait for structopt upgrade (or upgrade to clap 3)
|
||||||
{ name = "heck", version = "=0.3.3" },
|
{ name = "heck", version = "=0.3.3" },
|
||||||
|
|
||||||
|
@ -64,20 +61,18 @@ skip-tree = [
|
||||||
# wait for curve25519-dalek to upgrade
|
# wait for curve25519-dalek to upgrade
|
||||||
{ name = "digest", version = "=0.9.0" },
|
{ name = "digest", version = "=0.9.0" },
|
||||||
|
|
||||||
# Wait for inferno -> num-format to upgrade
|
# wait for inferno -> num-format to upgrade
|
||||||
{ name = "arrayvec", version = "=0.4.12" },
|
{ name = "arrayvec", version = "=0.4.12" },
|
||||||
|
|
||||||
# upgrade sentry, metrics-exporter-prometheus, reqwest, hyper,
|
# wait for tokio-test -> tokio-stream to upgrade
|
||||||
# which needs #2953: upgrade tracing to the latest major version
|
|
||||||
#
|
|
||||||
# also wait for tower-test and tokio-test to upgrade
|
|
||||||
{ name = "tokio-util", version = "=0.6.9" },
|
{ name = "tokio-util", version = "=0.6.9" },
|
||||||
{ name = "tracing-subscriber", version = "=0.1.6" },
|
|
||||||
|
|
||||||
# upgrade abscissa and arti
|
# upgrade abscissa and arti
|
||||||
|
{ name = "darling", version = "=0.10.2" },
|
||||||
{ name = "darling", version = "=0.12.4" },
|
{ name = "darling", version = "=0.12.4" },
|
||||||
{ name = "darling", version = "=0.13.4" },
|
{ name = "tracing-subscriber", version = "=0.1.6" },
|
||||||
|
|
||||||
|
# wait for primitive-types to upgrade
|
||||||
{ name = "proc-macro-crate", version = "=0.1.5" },
|
{ name = "proc-macro-crate", version = "=0.1.5" },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ tracing = "0.1.31"
|
||||||
tracing-futures = "0.2.5"
|
tracing-futures = "0.2.5"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
color-eyre = "0.6.0"
|
color-eyre = "0.6.1"
|
||||||
ed25519-zebra = "3.0.0"
|
ed25519-zebra = "3.0.0"
|
||||||
rand = { version = "0.8.5", package = "rand" }
|
rand = { version = "0.8.5", package = "rand" }
|
||||||
tokio = { version = "1.18.2", features = ["full"] }
|
tokio = { version = "1.18.2", features = ["full"] }
|
||||||
|
|
|
@ -71,7 +71,7 @@ redjubjub = "0.5.0"
|
||||||
zebra-test = { path = "../zebra-test/", optional = true }
|
zebra-test = { path = "../zebra-test/", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
color-eyre = "0.6.0"
|
color-eyre = "0.6.1"
|
||||||
criterion = { version = "0.3.5", features = ["html_reports"] }
|
criterion = { version = "0.3.5", features = ["html_reports"] }
|
||||||
itertools = "0.10.3"
|
itertools = "0.10.3"
|
||||||
spandoc = "0.2.2"
|
spandoc = "0.2.2"
|
||||||
|
|
|
@ -27,7 +27,7 @@ serde = { version = "1.0.137", features = ["serde_derive"] }
|
||||||
|
|
||||||
futures = "0.3.21"
|
futures = "0.3.21"
|
||||||
futures-util = "0.3.21"
|
futures-util = "0.3.21"
|
||||||
metrics = "0.17.1"
|
metrics = "0.18.1"
|
||||||
thiserror = "1.0.31"
|
thiserror = "1.0.31"
|
||||||
tokio = { version = "1.18.2", features = ["time", "sync", "tracing"] }
|
tokio = { version = "1.18.2", features = ["time", "sync", "tracing"] }
|
||||||
tower = { version = "0.4.12", features = ["timeout", "util", "buffer"] }
|
tower = { version = "0.4.12", features = ["timeout", "util", "buffer"] }
|
||||||
|
@ -51,15 +51,15 @@ proptest = { version = "0.10.1", optional = true }
|
||||||
proptest-derive = { version = "0.3.0", optional = true }
|
proptest-derive = { version = "0.3.0", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
color-eyre = "0.6.0"
|
color-eyre = "0.6.1"
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
proptest = "0.10.1"
|
proptest = "0.10.1"
|
||||||
proptest-derive = "0.3.0"
|
proptest-derive = "0.3.0"
|
||||||
rand07 = { package = "rand", version = "0.7" }
|
rand07 = { package = "rand", version = "0.7" }
|
||||||
spandoc = "0.2.2"
|
spandoc = "0.2.2"
|
||||||
tokio = { version = "1.18.2", features = ["full"] }
|
tokio = { version = "1.18.2", features = ["full"] }
|
||||||
tracing-error = "0.1.2"
|
tracing-error = "0.2.0"
|
||||||
tracing-subscriber = "0.2.25"
|
tracing-subscriber = "0.3.11"
|
||||||
|
|
||||||
zebra-chain = { path = "../zebra-chain", features = ["proptest-impl"] }
|
zebra-chain = { path = "../zebra-chain", features = ["proptest-impl"] }
|
||||||
zebra-state = { path = "../zebra-state", features = ["proptest-impl"] }
|
zebra-state = { path = "../zebra-state", features = ["proptest-impl"] }
|
||||||
|
|
|
@ -347,7 +347,7 @@ where
|
||||||
}
|
}
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"checkpoint.queued.continuous.height",
|
"checkpoint.queued.continuous.height",
|
||||||
pending_height.0 as f64
|
pending_height.0 as f64,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Now find the start of the checkpoint range
|
// Now find the start of the checkpoint range
|
||||||
|
@ -369,7 +369,7 @@ where
|
||||||
if let Some(block::Height(target_checkpoint)) = target_checkpoint {
|
if let Some(block::Height(target_checkpoint)) = target_checkpoint {
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"checkpoint.processing.next.height",
|
"checkpoint.processing.next.height",
|
||||||
target_checkpoint as f64
|
target_checkpoint as f64,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// Use the start height if there is no potential next checkpoint
|
// Use the start height if there is no potential next checkpoint
|
||||||
|
@ -578,7 +578,7 @@ where
|
||||||
.keys()
|
.keys()
|
||||||
.next_back()
|
.next_back()
|
||||||
.expect("queued has at least one entry")
|
.expect("queued has at least one entry")
|
||||||
.0 as f64
|
.0 as f64,
|
||||||
);
|
);
|
||||||
|
|
||||||
let is_checkpoint = self.checkpoint_list.contains(height);
|
let is_checkpoint = self.checkpoint_list.contains(height);
|
||||||
|
@ -767,7 +767,7 @@ where
|
||||||
|
|
||||||
let block_count = rev_valid_blocks.len();
|
let block_count = rev_valid_blocks.len();
|
||||||
tracing::info!(?block_count, ?current_range, "verified checkpoint range");
|
tracing::info!(?block_count, ?current_range, "verified checkpoint range");
|
||||||
metrics::counter!("checkpoint.verified.block.count", block_count as _);
|
metrics::counter!("checkpoint.verified.block.count", block_count as u64);
|
||||||
|
|
||||||
// All the blocks we've kept are valid, so let's verify them
|
// All the blocks we've kept are valid, so let's verify them
|
||||||
// in height order.
|
// in height order.
|
||||||
|
|
|
@ -32,9 +32,9 @@ tokio-stream = { version = "0.1.8", features = ["sync", "time"] }
|
||||||
tokio-util = { version = "0.7.2", features = ["codec"] }
|
tokio-util = { version = "0.7.2", features = ["codec"] }
|
||||||
tower = { version = "0.4.12", features = ["retry", "discover", "load", "load-shed", "timeout", "util", "buffer"] }
|
tower = { version = "0.4.12", features = ["retry", "discover", "load", "load-shed", "timeout", "util", "buffer"] }
|
||||||
|
|
||||||
metrics = "0.17.1"
|
metrics = "0.18.1"
|
||||||
tracing-futures = "0.2.5"
|
tracing-futures = "0.2.5"
|
||||||
tracing-error = { version = "0.1.2", features = ["traced-error"] }
|
tracing-error = { version = "0.2.0", features = ["traced-error"] }
|
||||||
tracing = "0.1.31"
|
tracing = "0.1.31"
|
||||||
|
|
||||||
# tor dependencies
|
# tor dependencies
|
||||||
|
|
|
@ -519,7 +519,7 @@ impl AddressBook {
|
||||||
metrics::gauge!("candidate_set.gossiped", m.never_attempted_gossiped as f64);
|
metrics::gauge!("candidate_set.gossiped", m.never_attempted_gossiped as f64);
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"candidate_set.alternate",
|
"candidate_set.alternate",
|
||||||
m.never_attempted_alternate as f64
|
m.never_attempted_alternate as f64,
|
||||||
);
|
);
|
||||||
metrics::gauge!("candidate_set.failed", m.failed as f64);
|
metrics::gauge!("candidate_set.failed", m.failed as f64);
|
||||||
metrics::gauge!("candidate_set.pending", m.attempt_pending as f64);
|
metrics::gauge!("candidate_set.pending", m.attempt_pending as f64);
|
||||||
|
@ -529,7 +529,7 @@ impl AddressBook {
|
||||||
// TODO: rename to address_book.responded.stopped_responding
|
// TODO: rename to address_book.responded.stopped_responding
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"candidate_set.disconnected",
|
"candidate_set.disconnected",
|
||||||
m.recently_stopped_responding as f64
|
m.recently_stopped_responding as f64,
|
||||||
);
|
);
|
||||||
|
|
||||||
std::mem::drop(_guard);
|
std::mem::drop(_guard);
|
||||||
|
|
|
@ -678,7 +678,7 @@ where
|
||||||
// the value is the remote version of the most recent rejected handshake from each peer
|
// the value is the remote version of the most recent rejected handshake from each peer
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"zcash.net.peers.version.obsolete",
|
"zcash.net.peers.version.obsolete",
|
||||||
remote_version.0.into(),
|
remote_version.0 as f64,
|
||||||
"remote_ip" => their_addr.to_string(),
|
"remote_ip" => their_addr.to_string(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -709,7 +709,7 @@ where
|
||||||
// the value is the remote version of the most recent connected handshake from each peer
|
// the value is the remote version of the most recent connected handshake from each peer
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"zcash.net.peers.version.connected",
|
"zcash.net.peers.version.connected",
|
||||||
remote_version.0.into(),
|
remote_version.0 as f64,
|
||||||
"remote_ip" => their_addr.to_string(),
|
"remote_ip" => their_addr.to_string(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -681,7 +681,7 @@ where
|
||||||
handshakes
|
handshakes
|
||||||
.len()
|
.len()
|
||||||
.checked_sub(1)
|
.checked_sub(1)
|
||||||
.expect("the pool always contains an unresolved future") as f64
|
.expect("the pool always contains an unresolved future") as f64,
|
||||||
);
|
);
|
||||||
|
|
||||||
let crawler_action = tokio::select! {
|
let crawler_action = tokio::select! {
|
||||||
|
|
|
@ -17,7 +17,7 @@ futures = "0.3.21"
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
itertools = "0.10.3"
|
itertools = "0.10.3"
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
metrics = "0.17.1"
|
metrics = "0.18.1"
|
||||||
mset = "0.1.0"
|
mset = "0.1.0"
|
||||||
proptest = { version = "0.10.1", optional = true }
|
proptest = { version = "0.10.1", optional = true }
|
||||||
proptest-derive = { version = "0.3.0", optional = true }
|
proptest-derive = { version = "0.3.0", optional = true }
|
||||||
|
@ -35,7 +35,7 @@ zebra-chain = { path = "../zebra-chain" }
|
||||||
zebra-test = { path = "../zebra-test/", optional = true }
|
zebra-test = { path = "../zebra-test/", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
color-eyre = "0.6.0"
|
color-eyre = "0.6.1"
|
||||||
once_cell = "1.12.0"
|
once_cell = "1.12.0"
|
||||||
spandoc = "0.2.2"
|
spandoc = "0.2.2"
|
||||||
|
|
||||||
|
|
|
@ -301,13 +301,16 @@ impl StateService {
|
||||||
if let Some(tip_block_height) = tip_block_height {
|
if let Some(tip_block_height) = tip_block_height {
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"state.full_verifier.committed.block.height",
|
"state.full_verifier.committed.block.height",
|
||||||
tip_block_height.0 as _
|
tip_block_height.0 as f64,
|
||||||
);
|
);
|
||||||
|
|
||||||
// This height gauge is updated for both fully verified and checkpoint blocks.
|
// This height gauge is updated for both fully verified and checkpoint blocks.
|
||||||
// These updates can't conflict, because the state makes sure that blocks
|
// These updates can't conflict, because the state makes sure that blocks
|
||||||
// are committed in order.
|
// are committed in order.
|
||||||
metrics::gauge!("zcash.chain.verified.block.height", tip_block_height.0 as _);
|
metrics::gauge!(
|
||||||
|
"zcash.chain.verified.block.height",
|
||||||
|
tip_block_height.0 as f64,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
tracing::trace!("finished processing queued block");
|
tracing::trace!("finished processing queued block");
|
||||||
|
|
|
@ -161,19 +161,19 @@ impl FinalizedState {
|
||||||
|
|
||||||
if self.queued_by_prev_hash.is_empty() {
|
if self.queued_by_prev_hash.is_empty() {
|
||||||
self.max_queued_height = f64::NAN;
|
self.max_queued_height = f64::NAN;
|
||||||
} else if self.max_queued_height.is_nan() || self.max_queued_height < height.0 as _ {
|
} else if self.max_queued_height.is_nan() || self.max_queued_height < height.0 as f64 {
|
||||||
// if there are still blocks in the queue, then either:
|
// if there are still blocks in the queue, then either:
|
||||||
// - the new block was lower than the old maximum, and there was a gap before it,
|
// - the new block was lower than the old maximum, and there was a gap before it,
|
||||||
// so the maximum is still the same (and we skip this code), or
|
// so the maximum is still the same (and we skip this code), or
|
||||||
// - the new block is higher than the old maximum, and there is at least one gap
|
// - the new block is higher than the old maximum, and there is at least one gap
|
||||||
// between the finalized tip and the new maximum
|
// between the finalized tip and the new maximum
|
||||||
self.max_queued_height = height.0 as _;
|
self.max_queued_height = height.0 as f64;
|
||||||
}
|
}
|
||||||
|
|
||||||
metrics::gauge!("state.checkpoint.queued.max.height", self.max_queued_height);
|
metrics::gauge!("state.checkpoint.queued.max.height", self.max_queued_height);
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"state.checkpoint.queued.block.count",
|
"state.checkpoint.queued.block.count",
|
||||||
self.queued_by_prev_hash.len() as f64
|
self.queued_by_prev_hash.len() as f64,
|
||||||
);
|
);
|
||||||
|
|
||||||
highest_queue_commit
|
highest_queue_commit
|
||||||
|
@ -193,13 +193,16 @@ impl FinalizedState {
|
||||||
metrics::counter!("state.checkpoint.finalized.block.count", 1);
|
metrics::counter!("state.checkpoint.finalized.block.count", 1);
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"state.checkpoint.finalized.block.height",
|
"state.checkpoint.finalized.block.height",
|
||||||
finalized.height.0 as _
|
finalized.height.0 as f64,
|
||||||
);
|
);
|
||||||
|
|
||||||
// This height gauge is updated for both fully verified and checkpoint blocks.
|
// This height gauge is updated for both fully verified and checkpoint blocks.
|
||||||
// These updates can't conflict, because the state makes sure that blocks
|
// These updates can't conflict, because the state makes sure that blocks
|
||||||
// are committed in order.
|
// are committed in order.
|
||||||
metrics::gauge!("zcash.chain.verified.block.height", finalized.height.0 as _);
|
metrics::gauge!(
|
||||||
|
"zcash.chain.verified.block.height",
|
||||||
|
finalized.height.0 as f64,
|
||||||
|
);
|
||||||
metrics::counter!("zcash.chain.verified.block.total", 1);
|
metrics::counter!("zcash.chain.verified.block.total", 1);
|
||||||
|
|
||||||
Ok(finalized)
|
Ok(finalized)
|
||||||
|
@ -207,7 +210,7 @@ impl FinalizedState {
|
||||||
metrics::counter!("state.checkpoint.error.block.count", 1);
|
metrics::counter!("state.checkpoint.error.block.count", 1);
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"state.checkpoint.error.block.height",
|
"state.checkpoint.error.block.height",
|
||||||
finalized.height.0 as _
|
finalized.height.0 as f64,
|
||||||
);
|
);
|
||||||
|
|
||||||
Err(())
|
Err(())
|
||||||
|
|
|
@ -52,7 +52,7 @@ pub(crate) fn block_precommit_metrics(block: &Block, hash: block::Hash, height:
|
||||||
);
|
);
|
||||||
|
|
||||||
metrics::counter!("state.finalized.block.count", 1);
|
metrics::counter!("state.finalized.block.count", 1);
|
||||||
metrics::gauge!("state.finalized.block.height", height.0 as _);
|
metrics::gauge!("state.finalized.block.height", height.0 as f64);
|
||||||
|
|
||||||
metrics::counter!(
|
metrics::counter!(
|
||||||
"state.finalized.cumulative.transactions",
|
"state.finalized.cumulative.transactions",
|
||||||
|
|
|
@ -422,7 +422,7 @@ impl NonFinalizedState {
|
||||||
/// Update the metrics after `block` is committed
|
/// Update the metrics after `block` is committed
|
||||||
fn update_metrics_for_committed_block(&self, height: block::Height, hash: block::Hash) {
|
fn update_metrics_for_committed_block(&self, height: block::Height, hash: block::Hash) {
|
||||||
metrics::counter!("state.memory.committed.block.count", 1);
|
metrics::counter!("state.memory.committed.block.count", 1);
|
||||||
metrics::gauge!("state.memory.committed.block.height", height.0 as _);
|
metrics::gauge!("state.memory.committed.block.height", height.0 as f64);
|
||||||
|
|
||||||
if self
|
if self
|
||||||
.best_chain()
|
.best_chain()
|
||||||
|
@ -436,7 +436,7 @@ impl NonFinalizedState {
|
||||||
== hash
|
== hash
|
||||||
{
|
{
|
||||||
metrics::counter!("state.memory.best.committed.block.count", 1);
|
metrics::counter!("state.memory.best.committed.block.count", 1);
|
||||||
metrics::gauge!("state.memory.best.committed.block.height", height.0 as _);
|
metrics::gauge!("state.memory.best.committed.block.height", height.0 as f64);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.update_metrics_for_chains();
|
self.update_metrics_for_chains();
|
||||||
|
@ -444,7 +444,10 @@ impl NonFinalizedState {
|
||||||
|
|
||||||
/// Update the metrics after `self.chain_set` is modified
|
/// Update the metrics after `self.chain_set` is modified
|
||||||
fn update_metrics_for_chains(&self) {
|
fn update_metrics_for_chains(&self) {
|
||||||
metrics::gauge!("state.memory.chain.count", self.chain_set.len() as _);
|
metrics::gauge!("state.memory.chain.count", self.chain_set.len() as f64);
|
||||||
metrics::gauge!("state.memory.best.chain.length", self.best_chain_len() as _);
|
metrics::gauge!(
|
||||||
|
"state.memory.best.chain.length",
|
||||||
|
self.best_chain_len() as f64,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,10 +107,8 @@ async fn test_populated_state_responds_correctly(
|
||||||
|
|
||||||
let from_coinbase = transaction.is_coinbase();
|
let from_coinbase = transaction.is_coinbase();
|
||||||
for (index, output) in transaction.outputs().iter().cloned().enumerate() {
|
for (index, output) in transaction.outputs().iter().cloned().enumerate() {
|
||||||
let outpoint = transparent::OutPoint {
|
let outpoint = transparent::OutPoint::from_usize(transaction_hash, index);
|
||||||
hash: transaction_hash,
|
|
||||||
index: index as _,
|
|
||||||
};
|
|
||||||
let utxo = transparent::Utxo {
|
let utxo = transparent::Utxo {
|
||||||
output,
|
output,
|
||||||
height,
|
height,
|
||||||
|
|
|
@ -21,12 +21,12 @@ tokio = { version = "1.18.2", features = ["full"] }
|
||||||
tower = { version = "0.4.12", features = ["util"] }
|
tower = { version = "0.4.12", features = ["util"] }
|
||||||
futures = "0.3.21"
|
futures = "0.3.21"
|
||||||
|
|
||||||
color-eyre = "0.5.11"
|
color-eyre = "0.6.1"
|
||||||
owo-colors = "3.4.0"
|
owo-colors = "3.4.0"
|
||||||
spandoc = "0.2.2"
|
spandoc = "0.2.2"
|
||||||
thiserror = "1.0.31"
|
thiserror = "1.0.31"
|
||||||
tracing-subscriber = "0.2.25"
|
tracing-subscriber = { version = "0.3.11", features = ["env-filter"] }
|
||||||
tracing-error = "0.1.2"
|
tracing-error = "0.2.0"
|
||||||
tracing = "0.1.31"
|
tracing = "0.1.31"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
|
@ -9,11 +9,11 @@ publish = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
structopt = "0.3.26"
|
structopt = "0.3.26"
|
||||||
color-eyre = "0.6.0"
|
color-eyre = "0.6.1"
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
serde_json = "1.0.81"
|
serde_json = "1.0.81"
|
||||||
tracing-error = { version = "0.1.2", features = ["traced-error"] }
|
tracing-error = "0.2.0"
|
||||||
tracing-subscriber = { version = "0.2.25", features = ["tracing-log"] }
|
tracing-subscriber = "0.3.11"
|
||||||
|
|
||||||
zebra-chain = { path = "../zebra-chain" }
|
zebra-chain = { path = "../zebra-chain" }
|
||||||
zebra-consensus = { path = "../zebra-consensus" }
|
zebra-consensus = { path = "../zebra-consensus" }
|
||||||
|
|
|
@ -21,6 +21,9 @@ enable-sentry = ["sentry", "sentry-tracing"]
|
||||||
|
|
||||||
# Production features that modify dependency behaviour
|
# Production features that modify dependency behaviour
|
||||||
|
|
||||||
|
# Enable additional error debugging in release builds
|
||||||
|
error-debug = ["color-eyre/track-caller", "color-eyre/capture-spantrace"]
|
||||||
|
|
||||||
# Remove verbose logging at compile-time in release or all builds.
|
# Remove verbose logging at compile-time in release or all builds.
|
||||||
#
|
#
|
||||||
# Release builds are defined as "cfg(not(debug_assertions))".
|
# Release builds are defined as "cfg(not(debug_assertions))".
|
||||||
|
@ -67,18 +70,19 @@ tokio = { version = "1.18.2", features = ["time", "rt-multi-thread", "macros", "
|
||||||
tower = { version = "0.4.12", features = ["hedge", "limit"] }
|
tower = { version = "0.4.12", features = ["hedge", "limit"] }
|
||||||
pin-project = "1.0.10"
|
pin-project = "1.0.10"
|
||||||
|
|
||||||
color-eyre = { version = "0.5.11", features = ["issue-url"] }
|
color-eyre = { version = "0.6.1", default_features = false, features = ["issue-url"] }
|
||||||
thiserror = "1.0.31"
|
thiserror = "1.0.31"
|
||||||
|
|
||||||
tracing-flame = "0.1.0"
|
tracing-flame = "0.2.0"
|
||||||
tracing-journald = "0.1.0"
|
tracing-journald = "0.3.0"
|
||||||
tracing-subscriber = { version = "0.2.25", features = ["tracing-log"] }
|
tracing-subscriber = { version = "0.3.11", features = ["env-filter"] }
|
||||||
tracing-error = "0.1.2"
|
tracing-error = "0.2.0"
|
||||||
metrics = "0.17.1"
|
|
||||||
metrics-exporter-prometheus = "0.7.0"
|
|
||||||
tracing-futures = "0.2.5"
|
tracing-futures = "0.2.5"
|
||||||
tracing = "0.1.31"
|
tracing = "0.1.31"
|
||||||
|
|
||||||
|
metrics = "0.18.1"
|
||||||
|
metrics-exporter-prometheus = { version = "0.9.0", default-features = false, features = ["http-listener"] }
|
||||||
|
|
||||||
dirs = "4.0.0"
|
dirs = "4.0.0"
|
||||||
inferno = { version = "0.11.3", default-features = false }
|
inferno = { version = "0.11.3", default-features = false }
|
||||||
atty = "0.2.14"
|
atty = "0.2.14"
|
||||||
|
@ -87,8 +91,8 @@ num-integer = "0.1.45"
|
||||||
rand = { version = "0.8.5", package = "rand" }
|
rand = { version = "0.8.5", package = "rand" }
|
||||||
|
|
||||||
# prod feature enable-sentry
|
# prod feature enable-sentry
|
||||||
sentry-tracing = { version = "0.23.0", optional = true }
|
sentry-tracing = { version = "0.26.0", optional = true }
|
||||||
sentry = { version = "0.23.0", default-features = false, features = ["backtrace", "contexts", "reqwest", "rustls"], optional = true }
|
sentry = { version = "0.26.0", default-features = false, features = ["backtrace", "contexts", "reqwest", "rustls"], optional = true }
|
||||||
|
|
||||||
# prod feature release_max_level_info
|
# prod feature release_max_level_info
|
||||||
#
|
#
|
||||||
|
@ -111,7 +115,7 @@ abscissa_core = { version = "0.5", features = ["testing"] }
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
once_cell = "1.12.0"
|
once_cell = "1.12.0"
|
||||||
regex = "1.5.6"
|
regex = "1.5.6"
|
||||||
reqwest = "0.11"
|
reqwest = "0.11.10"
|
||||||
semver = "1.0.9"
|
semver = "1.0.9"
|
||||||
# zebra-rpc needs the preserve_order feature, it also makes test results more stable
|
# zebra-rpc needs the preserve_order feature, it also makes test results more stable
|
||||||
serde_json = { version = "1.0.81", features = ["preserve_order"] }
|
serde_json = { version = "1.0.81", features = ["preserve_order"] }
|
||||||
|
@ -126,6 +130,9 @@ tonic = "0.7.2"
|
||||||
proptest = "0.10.1"
|
proptest = "0.10.1"
|
||||||
proptest-derive = "0.3.0"
|
proptest-derive = "0.3.0"
|
||||||
|
|
||||||
|
# enable span traces and track caller in tests
|
||||||
|
color-eyre = { version = "0.6.1", features = ["issue-url"] }
|
||||||
|
|
||||||
zebra-chain = { path = "../zebra-chain", features = ["proptest-impl"] }
|
zebra-chain = { path = "../zebra-chain", features = ["proptest-impl"] }
|
||||||
zebra-consensus = { path = "../zebra-consensus/", features = ["proptest-impl"] }
|
zebra-consensus = { path = "../zebra-consensus/", features = ["proptest-impl"] }
|
||||||
zebra-network = { path = "../zebra-network", features = ["proptest-impl"] }
|
zebra-network = { path = "../zebra-network", features = ["proptest-impl"] }
|
||||||
|
|
|
@ -186,7 +186,7 @@ where
|
||||||
"block hash already queued for inbound download: ignored block"
|
"block hash already queued for inbound download: ignored block"
|
||||||
);
|
);
|
||||||
|
|
||||||
metrics::gauge!("gossip.queued.block.count", self.pending.len() as _);
|
metrics::gauge!("gossip.queued.block.count", self.pending.len() as f64);
|
||||||
metrics::counter!("gossip.already.queued.dropped.block.hash.count", 1);
|
metrics::counter!("gossip.already.queued.dropped.block.hash.count", 1);
|
||||||
|
|
||||||
return DownloadAction::AlreadyQueued;
|
return DownloadAction::AlreadyQueued;
|
||||||
|
@ -200,7 +200,7 @@ where
|
||||||
"too many blocks queued for inbound download: ignored block"
|
"too many blocks queued for inbound download: ignored block"
|
||||||
);
|
);
|
||||||
|
|
||||||
metrics::gauge!("gossip.queued.block.count", self.pending.len() as _);
|
metrics::gauge!("gossip.queued.block.count", self.pending.len() as f64);
|
||||||
metrics::counter!("gossip.full.queue.dropped.block.hash.count", 1);
|
metrics::counter!("gossip.full.queue.dropped.block.hash.count", 1);
|
||||||
|
|
||||||
return DownloadAction::FullQueue;
|
return DownloadAction::FullQueue;
|
||||||
|
@ -356,7 +356,7 @@ where
|
||||||
?MAX_INBOUND_CONCURRENCY,
|
?MAX_INBOUND_CONCURRENCY,
|
||||||
"queued hash for download"
|
"queued hash for download"
|
||||||
);
|
);
|
||||||
metrics::gauge!("gossip.queued.block.count", self.pending.len() as _);
|
metrics::gauge!("gossip.queued.block.count", self.pending.len() as f64);
|
||||||
|
|
||||||
DownloadAction::AddedToQueue
|
DownloadAction::AddedToQueue
|
||||||
}
|
}
|
||||||
|
|
|
@ -237,7 +237,7 @@ where
|
||||||
);
|
);
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"mempool.currently.queued.transactions",
|
"mempool.currently.queued.transactions",
|
||||||
self.pending.len() as _
|
self.pending.len() as f64,
|
||||||
);
|
);
|
||||||
|
|
||||||
return Err(MempoolError::AlreadyQueued);
|
return Err(MempoolError::AlreadyQueued);
|
||||||
|
@ -252,7 +252,7 @@ where
|
||||||
);
|
);
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"mempool.currently.queued.transactions",
|
"mempool.currently.queued.transactions",
|
||||||
self.pending.len() as _
|
self.pending.len() as f64,
|
||||||
);
|
);
|
||||||
|
|
||||||
return Err(MempoolError::FullQueue);
|
return Err(MempoolError::FullQueue);
|
||||||
|
@ -370,7 +370,7 @@ where
|
||||||
);
|
);
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"mempool.currently.queued.transactions",
|
"mempool.currently.queued.transactions",
|
||||||
self.pending.len() as _
|
self.pending.len() as f64,
|
||||||
);
|
);
|
||||||
metrics::counter!("mempool.queued.transactions.total", 1);
|
metrics::counter!("mempool.queued.transactions.total", 1);
|
||||||
|
|
||||||
|
@ -411,7 +411,7 @@ where
|
||||||
assert!(self.cancel_handles.is_empty());
|
assert!(self.cancel_handles.is_empty());
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"mempool.currently.queued.transactions",
|
"mempool.currently.queued.transactions",
|
||||||
self.pending.len() as _
|
self.pending.len() as f64,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -456,6 +456,6 @@ where
|
||||||
ZS::Future: Send,
|
ZS::Future: Send,
|
||||||
{
|
{
|
||||||
fn drop(self: Pin<&mut Self>) {
|
fn drop(self: Pin<&mut Self>) {
|
||||||
metrics::gauge!("mempool.currently.queued.transactions", 0 as _);
|
metrics::gauge!("mempool.currently.queued.transactions", 0 as f64);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,6 +46,6 @@ where
|
||||||
// broadcast requests don't return errors, and we'd just want to ignore them anyway
|
// broadcast requests don't return errors, and we'd just want to ignore them anyway
|
||||||
let _ = broadcast_network.ready().await?.call(request).await;
|
let _ = broadcast_network.ready().await?.call(request).await;
|
||||||
|
|
||||||
metrics::counter!("mempool.gossiped.transactions.total", txs_len as _);
|
metrics::counter!("mempool.gossiped.transactions.total", txs_len as u64);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -532,14 +532,14 @@ impl Storage {
|
||||||
fn update_rejected_metrics(&mut self) {
|
fn update_rejected_metrics(&mut self) {
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"mempool.rejected.transaction.ids",
|
"mempool.rejected.transaction.ids",
|
||||||
self.rejected_transaction_count() as _
|
self.rejected_transaction_count() as f64,
|
||||||
);
|
);
|
||||||
// This is just an approximation.
|
// This is just an approximation.
|
||||||
// TODO: make it more accurate #2869
|
// TODO: make it more accurate #2869
|
||||||
let item_size = size_of::<(transaction::Hash, SameEffectsTipRejectionError)>();
|
let item_size = size_of::<(transaction::Hash, SameEffectsTipRejectionError)>();
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"mempool.rejected.transaction.ids.bytes",
|
"mempool.rejected.transaction.ids.bytes",
|
||||||
(self.rejected_transaction_count() * item_size) as _
|
(self.rejected_transaction_count() * item_size) as f64,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -261,12 +261,12 @@ impl VerifiedSet {
|
||||||
fn update_metrics(&mut self) {
|
fn update_metrics(&mut self) {
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"zcash.mempool.size.transactions",
|
"zcash.mempool.size.transactions",
|
||||||
self.transaction_count() as _
|
self.transaction_count() as f64,
|
||||||
);
|
);
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"zcash.mempool.size.bytes",
|
"zcash.mempool.size.bytes",
|
||||||
self.transactions_serialized_size as _
|
self.transactions_serialized_size as f64,
|
||||||
);
|
);
|
||||||
metrics::gauge!("zcash.mempool.cost.bytes", self.total_cost as _);
|
metrics::gauge!("zcash.mempool.cost.bytes", self.total_cost as f64);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,9 +13,11 @@ impl MetricsEndpoint {
|
||||||
pub fn new(config: &ZebradConfig) -> Result<Self, FrameworkError> {
|
pub fn new(config: &ZebradConfig) -> Result<Self, FrameworkError> {
|
||||||
if let Some(addr) = config.metrics.endpoint_addr {
|
if let Some(addr) = config.metrics.endpoint_addr {
|
||||||
info!("Trying to open metrics endpoint at {}...", addr);
|
info!("Trying to open metrics endpoint at {}...", addr);
|
||||||
|
|
||||||
let endpoint_result = metrics_exporter_prometheus::PrometheusBuilder::new()
|
let endpoint_result = metrics_exporter_prometheus::PrometheusBuilder::new()
|
||||||
.listen_address(addr)
|
.with_http_listener(addr)
|
||||||
.install();
|
.install();
|
||||||
|
|
||||||
match endpoint_result {
|
match endpoint_result {
|
||||||
Ok(()) => {
|
Ok(()) => {
|
||||||
info!("Opened metrics endpoint at {}", addr);
|
info!("Opened metrics endpoint at {}", addr);
|
||||||
|
|
|
@ -853,11 +853,11 @@ where
|
||||||
fn update_metrics(&mut self) {
|
fn update_metrics(&mut self) {
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"sync.prospective_tips.len",
|
"sync.prospective_tips.len",
|
||||||
self.prospective_tips.len() as f64
|
self.prospective_tips.len() as f64,
|
||||||
);
|
);
|
||||||
metrics::gauge!(
|
metrics::gauge!(
|
||||||
"sync.downloads.in_flight",
|
"sync.downloads.in_flight",
|
||||||
self.downloads.in_flight() as f64
|
self.downloads.in_flight() as f64,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,8 +53,8 @@ use common::{
|
||||||
sync::{
|
sync::{
|
||||||
create_cached_database_height, sync_until, MempoolBehavior, LARGE_CHECKPOINT_TEST_HEIGHT,
|
create_cached_database_height, sync_until, MempoolBehavior, LARGE_CHECKPOINT_TEST_HEIGHT,
|
||||||
LARGE_CHECKPOINT_TIMEOUT, MEDIUM_CHECKPOINT_TEST_HEIGHT, STOP_AT_HEIGHT_REGEX,
|
LARGE_CHECKPOINT_TIMEOUT, MEDIUM_CHECKPOINT_TEST_HEIGHT, STOP_AT_HEIGHT_REGEX,
|
||||||
STOP_ON_LOAD_TIMEOUT, SYNC_FINISHED_REGEX_TMP_STOP_EARLY, TINY_CHECKPOINT_TEST_HEIGHT,
|
STOP_ON_LOAD_TIMEOUT, SYNC_FINISHED_REGEX, SYNC_FINISHED_REGEX_TMP_STOP_EARLY,
|
||||||
TINY_CHECKPOINT_TIMEOUT,
|
TINY_CHECKPOINT_TEST_HEIGHT, TINY_CHECKPOINT_TIMEOUT,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1122,10 +1122,11 @@ fn lightwalletd_integration_test(test_type: LightwalletdTestType) -> Result<()>
|
||||||
.with_failure_regex_iter(zebrad_failure_messages, zebrad_ignore_messages);
|
.with_failure_regex_iter(zebrad_failure_messages, zebrad_ignore_messages);
|
||||||
|
|
||||||
if test_type.needs_zebra_cached_state() {
|
if test_type.needs_zebra_cached_state() {
|
||||||
zebrad.expect_stdout_line_matches(r"loaded Zebra state cache tip=.*Height\([0-9]{7}\)")?;
|
zebrad
|
||||||
|
.expect_stdout_line_matches(r"loaded Zebra state cache .*tip.*=.*Height\([0-9]{7}\)")?;
|
||||||
} else {
|
} else {
|
||||||
// Timeout the test if we're somehow accidentally using a cached state
|
// Timeout the test if we're somehow accidentally using a cached state
|
||||||
zebrad.expect_stdout_line_matches("loaded Zebra state cache tip=None")?;
|
zebrad.expect_stdout_line_matches("loaded Zebra state cache .*tip.*=.*None")?;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait until `zebrad` has opened the RPC endpoint
|
// Wait until `zebrad` has opened the RPC endpoint
|
||||||
|
@ -1201,13 +1202,13 @@ fn lightwalletd_integration_test(test_type: LightwalletdTestType) -> Result<()>
|
||||||
|
|
||||||
if matches!(test_type, UpdateCachedState | FullSyncFromGenesis { .. }) {
|
if matches!(test_type, UpdateCachedState | FullSyncFromGenesis { .. }) {
|
||||||
// Wait for Zebra to sync its cached state to the chain tip
|
// Wait for Zebra to sync its cached state to the chain tip
|
||||||
zebrad.expect_stdout_line_matches(regex::escape("sync_percent=100"))?;
|
zebrad.expect_stdout_line_matches(SYNC_FINISHED_REGEX)?;
|
||||||
|
|
||||||
// Wait for lightwalletd to sync to Zebra's tip
|
// Wait for lightwalletd to sync to Zebra's tip
|
||||||
lightwalletd.expect_stdout_line_matches(regex::escape("Ingestor waiting for block"))?;
|
lightwalletd.expect_stdout_line_matches(regex::escape("Ingestor waiting for block"))?;
|
||||||
|
|
||||||
// Check Zebra is still at the tip (also clears and prints Zebra's logs)
|
// Check Zebra is still at the tip (also clears and prints Zebra's logs)
|
||||||
zebrad.expect_stdout_line_matches(regex::escape("sync_percent=100"))?;
|
zebrad.expect_stdout_line_matches(SYNC_FINISHED_REGEX)?;
|
||||||
|
|
||||||
// lightwalletd doesn't log anything when we've reached the tip.
|
// lightwalletd doesn't log anything when we've reached the tip.
|
||||||
// But when it gets near the tip, it starts using the mempool.
|
// But when it gets near the tip, it starts using the mempool.
|
||||||
|
|
|
@ -45,7 +45,7 @@ pub const BETWEEN_NODES_DELAY: Duration = Duration::from_secs(2);
|
||||||
/// The amount of time we wait for lightwalletd to update to the tip.
|
/// The amount of time we wait for lightwalletd to update to the tip.
|
||||||
///
|
///
|
||||||
/// The cached tip can be a few days old, and Zebra needs time to activate its mempool.
|
/// The cached tip can be a few days old, and Zebra needs time to activate its mempool.
|
||||||
pub const LIGHTWALLETD_UPDATE_TIP_DELAY: Duration = Duration::from_secs(10 * 60);
|
pub const LIGHTWALLETD_UPDATE_TIP_DELAY: Duration = Duration::from_secs(20 * 60);
|
||||||
|
|
||||||
/// The amount of time we wait for lightwalletd to do a full sync to the tip.
|
/// The amount of time we wait for lightwalletd to do a full sync to the tip.
|
||||||
///
|
///
|
||||||
|
|
|
@ -350,12 +350,12 @@ impl LightwalletdTestType {
|
||||||
|
|
||||||
if self.needs_zebra_cached_state() {
|
if self.needs_zebra_cached_state() {
|
||||||
// Fail if we need a cached Zebra state, but it's empty
|
// Fail if we need a cached Zebra state, but it's empty
|
||||||
zebrad_failure_messages.push("loaded Zebra state cache tip=None".to_string());
|
zebrad_failure_messages.push("loaded Zebra state cache .*tip.*=.*None".to_string());
|
||||||
}
|
}
|
||||||
if *self == LaunchWithEmptyState {
|
if *self == LaunchWithEmptyState {
|
||||||
// Fail if we need an empty Zebra state, but it has blocks
|
// Fail if we need an empty Zebra state, but it has blocks
|
||||||
zebrad_failure_messages
|
zebrad_failure_messages
|
||||||
.push(r"loaded Zebra state cache tip=.*Height\([1-9][0-9]*\)".to_string());
|
.push(r"loaded Zebra state cache .*tip.*=.*Height\([1-9][0-9]*\)".to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
let zebrad_ignore_messages = Vec::new();
|
let zebrad_ignore_messages = Vec::new();
|
||||||
|
|
|
@ -39,14 +39,17 @@ pub const STOP_AT_HEIGHT_REGEX: &str = "stopping at configured height";
|
||||||
/// - we have synced all known checkpoints,
|
/// - we have synced all known checkpoints,
|
||||||
/// - the syncer has stopped downloading lots of blocks, and
|
/// - the syncer has stopped downloading lots of blocks, and
|
||||||
/// - we are regularly downloading some blocks via the syncer or block gossip.
|
/// - we are regularly downloading some blocks via the syncer or block gossip.
|
||||||
|
///
|
||||||
|
/// The trailing `\.` is required, so the regex finds the fractional percentage,
|
||||||
|
/// and the other integers on that line are ignored.
|
||||||
pub const SYNC_FINISHED_REGEX: &str =
|
pub const SYNC_FINISHED_REGEX: &str =
|
||||||
"finished initial sync to chain tip, using gossiped blocks sync_percent=100";
|
r"finished initial sync to chain tip, using gossiped blocks .*sync_percent.*=.*100\.";
|
||||||
|
|
||||||
/// Temporary workaround for slow syncs - stop at 97%.
|
/// Temporary workaround for slow syncs - stop at 97%.
|
||||||
///
|
///
|
||||||
/// TODO: revert this change (#4456)
|
/// TODO: revert this change (#4456)
|
||||||
pub const SYNC_FINISHED_REGEX_TMP_STOP_EARLY: &str =
|
pub const SYNC_FINISHED_REGEX_TMP_STOP_EARLY: &str =
|
||||||
"estimated progress to chain tip sync_percent=97";
|
r"estimated progress to chain tip .*sync_percent.*=.*97\.";
|
||||||
|
|
||||||
/// The maximum amount of time Zebra should take to reload after shutting down.
|
/// The maximum amount of time Zebra should take to reload after shutting down.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in New Issue