From 0cffae5dd08c81604a74e56c32b4c6c4083c4428 Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 12 Oct 2023 07:18:02 +1000 Subject: [PATCH 1/6] Remove unused dependency exceptions (#7726) --- deny.toml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/deny.toml b/deny.toml index 8e149b0bfbd..fcb321d3a67 100644 --- a/deny.toml +++ b/deny.toml @@ -63,15 +63,6 @@ skip-tree = [ # wait for rocksdb to upgrade { name = "bindgen", version = "=0.65.1" }, - # wait for console-subscriber to upgrade - { name = "prost-derive", version = "=0.11.9" }, - - # wait for console-subscriber to upgrade - { name = "prost-types", version = "=0.11.9" }, - - # wait for console-subscriber to upgrade - { name = "tonic", version = "=0.9.2" }, - # wait for tracing and many other crates to upgrade # this duplicate dependency currently only exists in testing builds { name = "regex-syntax", version = "=0.6.29" }, From ae52e3d23d1459a00da83bbd349aeb7eecb99f1d Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 12 Oct 2023 10:25:37 +1000 Subject: [PATCH 2/6] change(ui): Enable the progress bar feature by default, but only show progress bars when the config is enabled (#7615) * Add a progress bar config that is disabled unless the feature is on * Simplify the default config * Enable the progress bar feature by default, but require the config * Rename progress bars config to avoid merge conflicts * Use a log file when the progress bar is activated * Document how to configure progress bars * Handle log files in config_tests and check config path * Fix doc link * Fix path check * Fix config log matching * Fix clippy warning * Add tracing to config tests * It's zebrad not zebra * cargo fmt --all * Update release for config file changes * Fix config test failures * Allow printing to stdout in a method --- Cargo.lock | 1 + README.md | 17 ++- zebra-test/Cargo.toml | 1 + zebra-test/src/command.rs | 27 ++-- zebra-test/src/command/to_regex.rs | 11 +- zebrad/Cargo.toml | 2 +- zebrad/src/application.rs | 1 + zebrad/src/components/tracing.rs | 139 ++++++++++++++++-- zebrad/src/components/tracing/component.rs | 15 +- zebrad/src/lib.rs | 5 +- zebrad/tests/acceptance.rs | 77 ++++++++-- zebrad/tests/common/config.rs | 7 +- .../common/configs/v1.3.0-progress-bars.toml | 73 +++++++++ 13 files changed, 319 insertions(+), 57 deletions(-) create mode 100644 zebrad/tests/common/configs/v1.3.0-progress-bars.toml diff --git a/Cargo.lock b/Cargo.lock index 38544ca2f00..9b8d40c3b34 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5779,6 +5779,7 @@ dependencies = [ "humantime", "indexmap 2.0.1", "insta", + "itertools 0.11.0", "lazy_static", "once_cell", "owo-colors", diff --git a/README.md b/README.md index 48476db85cd..52cec8703ff 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ - [Getting Started](#getting-started) - [Docker](#docker) - [Building Zebra](#building-zebra) - - [Optional Features](#optional-features) + - [Optional Configs & Features](#optional-features) - [Known Issues](#known-issues) - [Future Work](#future-work) - [Documentation](#documentation) @@ -116,13 +116,24 @@ zebrad start See the [Installing Zebra](https://zebra.zfnd.org/user/install.html) and [Running Zebra](https://zebra.zfnd.org/user/run.html) sections in the book for more details. -#### Optional Features +#### Optional Configs & Features + +##### Configuring Progress Bars + +Configure `tracing.progress_bar` in your `zebrad.toml` to +[show key metrics in the terminal using progress bars](https://zfnd.org/experimental-zebra-progress-bars/). +When progress bars are active, Zebra automatically sends logs to a file. + +In future releases, the `progress_bar = "summary"` config will show a few key metrics, +and the "detailed" config will show all available metrics. Please let us know which metrics are +important to you! + +##### Custom Build Features You can also build Zebra with additional [Cargo features](https://doc.rust-lang.org/cargo/reference/features.html#command-line-feature-options): - `getblocktemplate-rpcs` for [mining support](https://zebra.zfnd.org/user/mining.html) - `prometheus` for [Prometheus metrics](https://zebra.zfnd.org/user/metrics.html) -- `progress-bar` [experimental progress bars](https://zfnd.org/experimental-zebra-progress-bars/) - `sentry` for [Sentry monitoring](https://zebra.zfnd.org/user/tracing.html#sentry-production-monitoring) - `elasticsearch` for [experimental Elasticsearch support](https://zebra.zfnd.org/user/elasticsearch.html) diff --git a/zebra-test/Cargo.toml b/zebra-test/Cargo.toml index ceb6a5b4ee5..3417e77263a 100644 --- a/zebra-test/Cargo.toml +++ b/zebra-test/Cargo.toml @@ -19,6 +19,7 @@ hex = "0.4.3" indexmap = "2.0.1" lazy_static = "1.4.0" insta = "1.33.0" +itertools = "0.11.0" proptest = "1.3.1" once_cell = "1.18.0" rand = "0.8.5" diff --git a/zebra-test/src/command.rs b/zebra-test/src/command.rs index 75f45fc6d65..d65d438307f 100644 --- a/zebra-test/src/command.rs +++ b/zebra-test/src/command.rs @@ -21,10 +21,11 @@ use tracing::instrument; #[macro_use] mod arguments; + pub mod to_regex; pub use self::arguments::Arguments; -use self::to_regex::{CollectRegexSet, ToRegex, ToRegexSet}; +use self::to_regex::{CollectRegexSet, ToRegexSet}; /// A super-trait for [`Iterator`] + [`Debug`]. pub trait IteratorDebug: Iterator + Debug {} @@ -791,7 +792,7 @@ impl TestChild { #[allow(clippy::unwrap_in_result)] pub fn expect_stdout_line_matches(&mut self, success_regex: R) -> Result where - R: ToRegex + Debug, + R: ToRegexSet + Debug, { self.apply_failure_regexes_to_outputs(); @@ -823,7 +824,7 @@ impl TestChild { #[allow(clippy::unwrap_in_result)] pub fn expect_stderr_line_matches(&mut self, success_regex: R) -> Result where - R: ToRegex + Debug, + R: ToRegexSet + Debug, { self.apply_failure_regexes_to_outputs(); @@ -855,7 +856,7 @@ impl TestChild { #[allow(clippy::unwrap_in_result)] pub fn expect_stdout_line_matches_silent(&mut self, success_regex: R) -> Result where - R: ToRegex + Debug, + R: ToRegexSet + Debug, { self.apply_failure_regexes_to_outputs(); @@ -887,7 +888,7 @@ impl TestChild { #[allow(clippy::unwrap_in_result)] pub fn expect_stderr_line_matches_silent(&mut self, success_regex: R) -> Result where - R: ToRegex + Debug, + R: ToRegexSet + Debug, { self.apply_failure_regexes_to_outputs(); @@ -1246,9 +1247,9 @@ impl TestOutput { #[allow(clippy::unwrap_in_result)] pub fn stdout_matches(&self, regex: R) -> Result<&Self> where - R: ToRegex + Debug, + R: ToRegexSet + Debug, { - let re = regex.to_regex().expect("regex must be valid"); + let re = regex.to_regex_set().expect("regex must be valid"); self.output_check( |stdout| re.is_match(stdout), @@ -1270,9 +1271,9 @@ impl TestOutput { #[allow(clippy::unwrap_in_result)] pub fn stdout_line_matches(&self, regex: R) -> Result<&Self> where - R: ToRegex + Debug, + R: ToRegexSet + Debug, { - let re = regex.to_regex().expect("regex must be valid"); + let re = regex.to_regex_set().expect("regex must be valid"); self.any_output_line( |line| re.is_match(line), @@ -1300,9 +1301,9 @@ impl TestOutput { #[allow(clippy::unwrap_in_result)] pub fn stderr_matches(&self, regex: R) -> Result<&Self> where - R: ToRegex + Debug, + R: ToRegexSet + Debug, { - let re = regex.to_regex().expect("regex must be valid"); + let re = regex.to_regex_set().expect("regex must be valid"); self.output_check( |stderr| re.is_match(stderr), @@ -1324,9 +1325,9 @@ impl TestOutput { #[allow(clippy::unwrap_in_result)] pub fn stderr_line_matches(&self, regex: R) -> Result<&Self> where - R: ToRegex + Debug, + R: ToRegexSet + Debug, { - let re = regex.to_regex().expect("regex must be valid"); + let re = regex.to_regex_set().expect("regex must be valid"); self.any_output_line( |line| re.is_match(line), diff --git a/zebra-test/src/command/to_regex.rs b/zebra-test/src/command/to_regex.rs index 04979ce6d13..66e00c874e0 100644 --- a/zebra-test/src/command/to_regex.rs +++ b/zebra-test/src/command/to_regex.rs @@ -2,6 +2,7 @@ use std::iter; +use itertools::Itertools; use regex::{Error, Regex, RegexBuilder, RegexSet, RegexSetBuilder}; /// A trait for converting a value to a [`Regex`]. @@ -135,15 +136,17 @@ pub trait CollectRegexSet { impl CollectRegexSet for I where I: IntoIterator, - I::Item: ToRegex, + I::Item: ToRegexSet, { fn collect_regex_set(self) -> Result { - let regexes: Result, Error> = - self.into_iter().map(|item| item.to_regex()).collect(); + let regexes: Result, Error> = self + .into_iter() + .map(|item| item.to_regex_set()) + .try_collect(); let regexes = regexes?; // This conversion discards flags and limits from Regex and RegexBuilder. - let regexes = regexes.iter().map(|regex| regex.as_str()); + let regexes = regexes.iter().flat_map(|regex_set| regex_set.patterns()); RegexSet::new(regexes) } diff --git a/zebrad/Cargo.toml b/zebrad/Cargo.toml index 646c61e28b9..ff38f3f5b23 100644 --- a/zebrad/Cargo.toml +++ b/zebrad/Cargo.toml @@ -52,7 +52,7 @@ features = [ [features] # In release builds, don't compile debug logging code, to improve performance. -default = ["release_max_level_info"] +default = ["release_max_level_info", "progress-bar"] # Default features for official ZF binary release builds default-release-binaries = ["default", "sentry"] diff --git a/zebrad/src/application.rs b/zebrad/src/application.rs index 133465ffa58..d8df9d3f009 100644 --- a/zebrad/src/application.rs +++ b/zebrad/src/application.rs @@ -434,6 +434,7 @@ impl Application for ZebradApp { // Override the default tracing filter based on the command-line verbosity. tracing_config.filter = tracing_config .filter + .clone() .or_else(|| Some(default_filter.to_owned())); } else { // Don't apply the configured filter for short-lived commands. diff --git a/zebrad/src/components/tracing.rs b/zebrad/src/components/tracing.rs index 439c5052e49..6b356004540 100644 --- a/zebrad/src/components/tracing.rs +++ b/zebrad/src/components/tracing.rs @@ -1,6 +1,10 @@ //! Tracing and logging infrastructure for Zebra. -use std::{net::SocketAddr, path::PathBuf}; +use std::{ + net::SocketAddr, + ops::{Deref, DerefMut}, + path::PathBuf, +}; use serde::{Deserialize, Serialize}; @@ -16,10 +20,59 @@ pub use endpoint::TracingEndpoint; #[cfg(feature = "flamegraph")] pub use flame::{layer, Grapher}; -/// Tracing configuration section. -#[derive(Clone, Debug, Deserialize, Serialize)] -#[serde(deny_unknown_fields, default)] +/// Tracing configuration section: outer config after cross-field defaults are applied. +/// +/// This is a wrapper type that dereferences to the inner config type. +/// +// +// TODO: replace with serde's finalizer attribute when that feature is implemented. +// we currently use the recommended workaround of a wrapper struct with from/into attributes. +// https://github.com/serde-rs/serde/issues/642#issuecomment-525432907 +#[derive(Clone, Debug, Default, Eq, PartialEq, Deserialize, Serialize)] +#[serde( + deny_unknown_fields, + default, + from = "InnerConfig", + into = "InnerConfig" +)] pub struct Config { + inner: InnerConfig, +} + +impl Deref for Config { + type Target = InnerConfig; + + fn deref(&self) -> &Self::Target { + &self.inner + } +} + +impl DerefMut for Config { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} + +impl From for Config { + fn from(mut inner: InnerConfig) -> Self { + inner.log_file = runtime_default_log_file(inner.log_file, inner.progress_bar); + + Self { inner } + } +} + +impl From for InnerConfig { + fn from(mut config: Config) -> Self { + config.log_file = disk_default_log_file(config.log_file.clone(), config.progress_bar); + + config.inner + } +} + +/// Tracing configuration section: inner config used to deserialize and apply cross-field defaults. +#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)] +#[serde(deny_unknown_fields, default)] +pub struct InnerConfig { /// Whether to use colored terminal output, if available. /// /// Colored terminal output is automatically disabled if an output stream @@ -108,10 +161,16 @@ pub struct Config { /// replaced with `.folded` and `.svg` for the respective files. pub flamegraph: Option, + /// Shows progress bars for block syncing, and mempool transactions, and peer networking. + /// Also sends logs to the default log file path. + /// + /// This config field is ignored unless the `progress-bar` feature is enabled. + pub progress_bar: Option, + /// If set to a path, write the tracing logs to that path. /// /// By default, logs are sent to the terminal standard output. - /// But if the `progress-bar` feature is activated, logs are sent to the standard log file path: + /// But if the `progress_bar` config is activated, logs are sent to the standard log file path: /// - Linux: `$XDG_STATE_HOME/zebrad.log` or `$HOME/.local/state/zebrad.log` /// - macOS: `$HOME/Library/Application Support/zebrad.log` /// - Windows: `%LOCALAPPDATA%\zebrad.log` or `C:\Users\%USERNAME%\AppData\Local\zebrad.log` @@ -131,6 +190,21 @@ pub struct Config { pub use_journald: bool, } +/// The progress bars that Zebra will show while running. +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Deserialize, Serialize)] +#[serde(rename_all = "lowercase")] +pub enum ProgressConfig { + /// Show a lot of progress bars. + Detailed, + + /// Show a few important progress bars. + // + // TODO: actually hide some progress bars in this mode. + #[default] + #[serde(other)] + Summary, +} + impl Config { /// Returns `true` if standard output should use color escapes. /// Automatically checks if Zebra is running in a terminal. @@ -152,12 +226,10 @@ impl Config { } } -impl Default for Config { +impl Default for InnerConfig { fn default() -> Self { - #[cfg(feature = "progress-bar")] - let default_log_file = dirs::state_dir() - .or_else(dirs::data_local_dir) - .map(|dir| dir.join("zebrad.log")); + // TODO: enable progress bars by default once they have been tested + let progress_bar = None; Self { use_color: true, @@ -166,11 +238,50 @@ impl Default for Config { buffer_limit: 128_000, endpoint_addr: None, flamegraph: None, - #[cfg(not(feature = "progress-bar"))] - log_file: None, - #[cfg(feature = "progress-bar")] - log_file: default_log_file, + progress_bar, + log_file: runtime_default_log_file(None, progress_bar), use_journald: false, } } } + +/// Returns the runtime default log file path based on the `log_file` and `progress_bar` configs. +fn runtime_default_log_file( + log_file: Option, + progress_bar: Option, +) -> Option { + if let Some(log_file) = log_file { + return Some(log_file); + } + + // If the progress bar is active, we want to use a log file regardless of the config. + // (Logging to a terminal erases parts of the progress bars, making both unreadable.) + if progress_bar.is_some() { + return default_log_file(); + } + + None +} + +/// Returns the configured log file path using the runtime `log_file` and `progress_bar` config. +/// +/// This is the inverse of [`runtime_default_log_file()`]. +fn disk_default_log_file( + log_file: Option, + progress_bar: Option, +) -> Option { + // If the progress bar is active, and we've likely substituted the default log file path, + // don't write that substitute to the config on disk. + if progress_bar.is_some() && log_file == default_log_file() { + return None; + } + + log_file +} + +/// Returns the default log file path. +fn default_log_file() -> Option { + dirs::state_dir() + .or_else(dirs::data_local_dir) + .map(|dir| dir.join("zebrad.log")) +} diff --git a/zebrad/src/components/tracing/component.rs b/zebrad/src/components/tracing/component.rs index 745315ae16a..1129cc64b23 100644 --- a/zebrad/src/components/tracing/component.rs +++ b/zebrad/src/components/tracing/component.rs @@ -79,14 +79,14 @@ impl Tracing { /// and the Zebra logo on startup. (If the terminal supports it.) // // This method should only print to stderr, because stdout is for tracing logs. - #[allow(clippy::print_stderr, clippy::unwrap_in_result)] + #[allow(clippy::print_stdout, clippy::print_stderr, clippy::unwrap_in_result)] pub fn new(network: Network, config: Config, uses_intro: bool) -> Result { // Only use color if tracing output is being sent to a terminal or if it was explicitly // forced to. let use_color = config.use_color_stdout(); let use_color_stderr = config.use_color_stderr(); - let filter = config.filter.unwrap_or_default(); + let filter = config.filter.clone().unwrap_or_default(); let flame_root = &config.flamegraph; // Only show the intro for user-focused node server commands like `start` @@ -139,7 +139,8 @@ impl Tracing { } if uses_intro { - eprintln!("Sending logs to {log_file:?}..."); + // We want this to appear on stdout instead of the usual log messages. + println!("Sending logs to {log_file:?}..."); } let log_file = File::options().append(true).create(true).open(log_file)?; Box::new(log_file) as BoxWrite @@ -305,7 +306,7 @@ impl Tracing { // // TODO: move this to its own module? #[cfg(feature = "progress-bar")] - { + if let Some(progress_bar_config) = config.progress_bar.as_ref() { use howudoin::consumers::TermLine; use std::time::Duration; @@ -315,7 +316,11 @@ impl Tracing { let terminal_consumer = TermLine::with_debounce(PROGRESS_BAR_DEBOUNCE); howudoin::init(terminal_consumer); - info!("activated progress bar"); + info!(?progress_bar_config, "activated progress bars"); + } else { + info!( + "set 'tracing.progress_bar =\"summary\"' in zebrad.toml to activate progress bars" + ); } Ok(Self { diff --git a/zebrad/src/lib.rs b/zebrad/src/lib.rs index 1995e8f3e47..9ebe9b3ffff 100644 --- a/zebrad/src/lib.rs +++ b/zebrad/src/lib.rs @@ -61,9 +61,10 @@ //! //! ### Metrics //! -//! * `prometheus`: export metrics to prometheus. -//! * `progress-bar`: shows key metrics in the terminal using progress bars, +//! * configuring a `tracing.progress_bar`: shows key metrics in the terminal using progress bars, //! and automatically configures Zebra to send logs to a file. +//! (The `progress-bar` feature is activated by default.) +//! * `prometheus`: export metrics to prometheus. //! //! Read the [metrics](https://zebra.zfnd.org/user/metrics.html) section of the book //! for more details. diff --git a/zebrad/tests/acceptance.rs b/zebrad/tests/acceptance.rs index 15611ee7466..c4fbdc707e2 100644 --- a/zebrad/tests/acceptance.rs +++ b/zebrad/tests/acceptance.rs @@ -161,7 +161,12 @@ use zebra_network::constants::PORT_IN_USE_ERROR; use zebra_node_services::rpc_client::RpcRequestClient; use zebra_state::{constants::LOCK_FILE_ERROR, database_format_version_in_code}; -use zebra_test::{args, command::ContextFrom, net::random_known_port, prelude::*}; +use zebra_test::{ + args, + command::{to_regex::CollectRegexSet, ContextFrom}, + net::random_known_port, + prelude::*, +}; mod common; @@ -605,7 +610,7 @@ fn config_tests() -> Result<()> { // Check that Zebra's previous configurations still work stored_configs_work()?; - // Runs `zebrad` serially to avoid potential port conflicts + // We run the `zebrad` app test after the config tests, to avoid potential port conflicts app_no_args()?; Ok(()) @@ -619,6 +624,8 @@ fn app_no_args() -> Result<()> { // start caches state, so run one of the start tests with persistent state let testdir = testdir()?.with_config(&mut persistent_test_config()?)?; + tracing::info!(?testdir, "running zebrad with no config (default settings)"); + let mut child = testdir.spawn_child(args![])?; // Run the program and kill it after a few seconds @@ -651,6 +658,8 @@ fn valid_generated_config(command: &str, expect_stdout_line_contains: &str) -> R // Add a config file name to tempdir path let generated_config_path = testdir.path().join("zebrad.toml"); + tracing::info!(?generated_config_path, "generating valid config"); + // Generate configuration in temp dir path let child = testdir.spawn_child(args!["generate", "-o": generated_config_path.to_str().unwrap()])?; @@ -664,6 +673,8 @@ fn valid_generated_config(command: &str, expect_stdout_line_contains: &str) -> R "generated config file not found" ); + tracing::info!(?generated_config_path, "testing valid config parsing"); + // Run command using temp dir and kill it after a few seconds let mut child = testdir.spawn_child(args![command])?; std::thread::sleep(LAUNCH_DELAY); @@ -702,6 +713,8 @@ fn last_config_is_stored() -> Result<()> { // Add a config file name to tempdir path let generated_config_path = testdir.path().join("zebrad.toml"); + tracing::info!(?generated_config_path, "generated current config"); + // Generate configuration in temp dir path let child = testdir.spawn_child(args!["generate", "-o": generated_config_path.to_str().unwrap()])?; @@ -715,6 +728,11 @@ fn last_config_is_stored() -> Result<()> { "generated config file not found" ); + tracing::info!( + ?generated_config_path, + "testing current config is in stored configs" + ); + // Get the contents of the generated config file let generated_content = fs::read_to_string(generated_config_path).expect("Should have been able to read the file"); @@ -815,6 +833,11 @@ fn invalid_generated_config() -> Result<()> { // Add a config file name to tempdir path. let config_path = testdir.path().join("zebrad.toml"); + tracing::info!( + ?config_path, + "testing invalid config parsing: generating valid config" + ); + // Generate a valid config file in the temp dir. let child = testdir.spawn_child(args!["generate", "-o": config_path.to_str().unwrap()])?; @@ -849,10 +872,14 @@ fn invalid_generated_config() -> Result<()> { secs = 3600 "; + tracing::info!(?config_path, "writing invalid config"); + // Write the altered config file so that Zebra can pick it up. fs::write(config_path.to_str().unwrap(), config_file.as_bytes()) .expect("Could not write the altered config file."); + tracing::info!(?config_path, "testing invalid config parsing"); + // Run Zebra in a temp dir so that it loads the config. let mut child = testdir.spawn_child(args!["start"])?; @@ -883,6 +910,8 @@ fn invalid_generated_config() -> Result<()> { fn stored_configs_work() -> Result<()> { let old_configs_dir = configs_dir(); + tracing::info!(?old_configs_dir, "testing older config parsing"); + for config_file in old_configs_dir .read_dir() .expect("read_dir call failed") @@ -892,10 +921,10 @@ fn stored_configs_work() -> Result<()> { let config_file_name = config_file_path .file_name() .expect("config files must have a file name") - .to_string_lossy(); + .to_str() + .expect("config file names are valid unicode"); - if config_file_name.as_ref().starts_with('.') || config_file_name.as_ref().starts_with('#') - { + if config_file_name.starts_with('.') || config_file_name.starts_with('#') { // Skip editor files and other invalid config paths tracing::info!( ?config_file_path, @@ -907,10 +936,7 @@ fn stored_configs_work() -> Result<()> { // ignore files starting with getblocktemplate prefix // if we were not built with the getblocktemplate-rpcs feature. #[cfg(not(feature = "getblocktemplate-rpcs"))] - if config_file_name - .as_ref() - .starts_with(GET_BLOCK_TEMPLATE_CONFIG_PREFIX) - { + if config_file_name.starts_with(GET_BLOCK_TEMPLATE_CONFIG_PREFIX) { tracing::info!( ?config_file_path, "skipping getblocktemplate-rpcs config file path" @@ -921,12 +947,41 @@ fn stored_configs_work() -> Result<()> { let run_dir = testdir()?; let stored_config_path = config_file_full_path(config_file.path()); + tracing::info!( + ?stored_config_path, + "testing old config can be parsed by current zebrad" + ); + // run zebra with stored config let mut child = run_dir.spawn_child(args!["-c", stored_config_path.to_str().unwrap(), "start"])?; - // zebra was able to start with the stored config - child.expect_stdout_line_matches("Starting zebrad".to_string())?; + let success_regexes = [ + // When logs are sent to the terminal, we see the config loading message and path. + format!( + "loaded zebrad config.*config_path.*=.*{}", + regex::escape(config_file_name) + ), + // If they are sent to a file, we see a log file message on stdout, + // and a logo, welcome message, and progress bar on stderr. + "Sending logs to".to_string(), + // TODO: add expect_stdout_or_stderr_line_matches() and check for this instead: + //"Thank you for running a mainnet zebrad".to_string(), + ]; + + tracing::info!( + ?stored_config_path, + ?success_regexes, + "waiting for zebrad to parse config and start logging" + ); + + let success_regexes = success_regexes + .iter() + .collect_regex_set() + .expect("regexes are valid"); + + // Zebra was able to start with the stored config. + child.expect_stdout_line_matches(success_regexes)?; // finish child.kill(false)?; diff --git a/zebrad/tests/common/config.rs b/zebrad/tests/common/config.rs index 884f205db21..b6eead94f3e 100644 --- a/zebrad/tests/common/config.rs +++ b/zebrad/tests/common/config.rs @@ -58,10 +58,9 @@ pub fn default_test_config() -> Result { env::var("ZEBRA_FORCE_USE_COLOR"), Err(env::VarError::NotPresent) ); - let tracing = tracing::Config { - force_use_color, - ..tracing::Config::default() - }; + + let mut tracing = tracing::Config::default(); + tracing.force_use_color = force_use_color; let mut state = zebra_state::Config::ephemeral(); state.debug_validity_check_interval = Some(DATABASE_FORMAT_CHECK_INTERVAL); diff --git a/zebrad/tests/common/configs/v1.3.0-progress-bars.toml b/zebrad/tests/common/configs/v1.3.0-progress-bars.toml new file mode 100644 index 00000000000..82da5039fd8 --- /dev/null +++ b/zebrad/tests/common/configs/v1.3.0-progress-bars.toml @@ -0,0 +1,73 @@ +# Default configuration for zebrad. +# +# This file can be used as a skeleton for custom configs. +# +# Unspecified fields use default values. Optional fields are Some(field) if the +# field is present and None if it is absent. +# +# This file is generated as an example using zebrad's current defaults. +# You should set only the config options you want to keep, and delete the rest. +# Only a subset of fields are present in the skeleton, since optional values +# whose default is None are omitted. +# +# The config format (including a complete list of sections and fields) is +# documented here: +# https://doc.zebra.zfnd.org/zebrad/config/struct.ZebradConfig.html +# +# zebrad attempts to load configs in the following order: +# +# 1. The -c flag on the command line, e.g., `zebrad -c myconfig.toml start`; +# 2. The file `zebrad.toml` in the users's preference directory (platform-dependent); +# 3. The default config. + +[consensus] +checkpoint_sync = true +debug_skip_parameter_preload = false + +[mempool] +eviction_memory_time = "1h" +tx_cost_limit = 80000000 + +[metrics] + +[network] +cache_dir = true +crawl_new_peer_interval = "1m 1s" +initial_mainnet_peers = [ + "dnsseed.z.cash:8233", + "dnsseed.str4d.xyz:8233", + "mainnet.seeder.zfnd.org:8233", + "mainnet.is.yolo.money:8233", +] +initial_testnet_peers = [ + "dnsseed.testnet.z.cash:18233", + "testnet.seeder.zfnd.org:18233", + "testnet.is.yolo.money:18233", +] +listen_addr = "0.0.0.0:8233" +max_connections_per_ip = 1 +network = "Mainnet" +peerset_initial_target_size = 25 + +[rpc] +debug_force_finished_sync = false +parallel_cpu_threads = 1 + +[state] +cache_dir = "cache_dir" +delete_old_database = true +ephemeral = false + +[sync] +checkpoint_verify_concurrency_limit = 1000 +download_concurrency_limit = 50 +full_verify_concurrency_limit = 20 +parallel_cpu_threads = 0 + +[tracing] +buffer_limit = 128000 +force_use_color = false +progress_bar = "summary" +use_color = true +use_journald = false + From 1dfebd791fe08922cebe53dbee01e3666c5f5525 Mon Sep 17 00:00:00 2001 From: Marek Date: Thu, 12 Oct 2023 22:00:43 +0200 Subject: [PATCH 3/6] fix(state): Limit the retrieval of note commitment subtrees (#7734) * Fix the combining of Sapling subtrees This commit fixes a bug due to which the function `sapling_subtrees` used to always include all subtrees from the non-finalized state without respecting the given limit. * Fix the combining of Orchard subtrees This commit fixes a bug due to which the function `orchard_subtrees` used to always include all subtrees from the non-finalized state without respecting the given limit. * Add additional checks when retrieving subtrees * Allow raw subtree insertions into `Chain` in tests * Derive `Default` for `Chain` * Derive `Default` for note commitment tree nodes * Use `pub(super)` for `DiskWriteBatch` Set the visibility of `DiskWriteBatch` to `pub(super)`. * Add tests for retrieving subtrees * Use `default()` for subtree roots in tests This change is unrelated to the PR. * Refactor docs for inserting subtrees This change is unrelated to the PR. --- zebra-chain/src/amount.rs | 4 +- zebra-chain/src/orchard/tree.rs | 2 +- zebra-chain/src/sapling/tree.rs | 2 +- zebra-chain/src/value_balance.rs | 2 +- zebra-rpc/src/methods/tests/snapshot.rs | 8 +- zebra-state/src/service/finalized_state.rs | 2 +- .../finalized_state/zebra_db/shielded.rs | 16 +- .../src/service/non_finalized_state/chain.rs | 27 ++- zebra-state/src/service/read/tests/vectors.rs | 156 +++++++++++++++++- zebra-state/src/service/read/tree.rs | 60 +++++++ 10 files changed, 262 insertions(+), 17 deletions(-) diff --git a/zebra-chain/src/amount.rs b/zebra-chain/src/amount.rs index ce36c043172..b07a59642bd 100644 --- a/zebra-chain/src/amount.rs +++ b/zebra-chain/src/amount.rs @@ -30,7 +30,7 @@ pub type Result = std::result::Result; // TODO: // - remove the default NegativeAllowed bound, to make consensus rule reviews easier // - put a Constraint bound on the type generic, not just some implementations -#[derive(Clone, Copy, Serialize, Deserialize)] +#[derive(Clone, Copy, Serialize, Deserialize, Default)] #[serde(try_from = "i64")] #[serde(into = "i64")] #[serde(bound = "C: Constraint + Clone")] @@ -509,7 +509,7 @@ impl Constraint for NegativeAllowed { /// 0..=MAX_MONEY, /// ); /// ``` -#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] +#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Default)] pub struct NonNegative; impl Constraint for NonNegative { diff --git a/zebra-chain/src/orchard/tree.rs b/zebra-chain/src/orchard/tree.rs index 3e571f424da..3b5cb768107 100644 --- a/zebra-chain/src/orchard/tree.rs +++ b/zebra-chain/src/orchard/tree.rs @@ -171,7 +171,7 @@ impl ZcashDeserialize for Root { } /// A node of the Orchard Incremental Note Commitment Tree. -#[derive(Copy, Clone, Eq, PartialEq)] +#[derive(Copy, Clone, Eq, PartialEq, Default)] pub struct Node(pallas::Base); impl Node { diff --git a/zebra-chain/src/sapling/tree.rs b/zebra-chain/src/sapling/tree.rs index 80b77ed28f1..bef003243c2 100644 --- a/zebra-chain/src/sapling/tree.rs +++ b/zebra-chain/src/sapling/tree.rs @@ -166,7 +166,7 @@ impl ZcashDeserialize for Root { /// /// Note that it's handled as a byte buffer and not a point coordinate (jubjub::Fq) /// because that's how the spec handles the MerkleCRH^Sapling function inputs and outputs. -#[derive(Copy, Clone, Eq, PartialEq)] +#[derive(Copy, Clone, Eq, PartialEq, Default)] pub struct Node([u8; 32]); impl AsRef<[u8; 32]> for Node { diff --git a/zebra-chain/src/value_balance.rs b/zebra-chain/src/value_balance.rs index f523135b7c8..43f7b11b469 100644 --- a/zebra-chain/src/value_balance.rs +++ b/zebra-chain/src/value_balance.rs @@ -20,7 +20,7 @@ mod tests; use ValueBalanceError::*; /// An amount spread between different Zcash pools. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Default)] pub struct ValueBalance { transparent: Amount, sprout: Amount, diff --git a/zebra-rpc/src/methods/tests/snapshot.rs b/zebra-rpc/src/methods/tests/snapshot.rs index efa89ac5b13..97fe46b6ef7 100644 --- a/zebra-rpc/src/methods/tests/snapshot.rs +++ b/zebra-rpc/src/methods/tests/snapshot.rs @@ -347,9 +347,7 @@ async fn test_mocked_rpc_response_data_for_network(network: Network) { // Mock the data for the response. let mut subtrees = BTreeMap::new(); - let subtree_root = [0u8; 32].as_slice().try_into().expect( - "The array [0u8; 32] should be convertible to a Sapling note commitment tree node.", - ); + let subtree_root = sapling::tree::Node::default(); for i in 0..2u16 { let subtree = NoteCommitmentSubtreeData::new(Height(i.into()), subtree_root); @@ -377,9 +375,7 @@ async fn test_mocked_rpc_response_data_for_network(network: Network) { // Mock the data for the response. let mut subtrees = BTreeMap::new(); - let subtree_root = [0u8; 32].try_into().expect( - "The array [0u8; 32] should be convertible to a Sapling note commitment tree node.", - ); + let subtree_root = orchard::tree::Node::default(); for i in 0..2u16 { let subtree = NoteCommitmentSubtreeData::new(Height(i.into()), subtree_root); diff --git a/zebra-state/src/service/finalized_state.rs b/zebra-state/src/service/finalized_state.rs index acafda7b2f8..e092f0610b3 100644 --- a/zebra-state/src/service/finalized_state.rs +++ b/zebra-state/src/service/finalized_state.rs @@ -42,7 +42,7 @@ pub use disk_format::{OutputIndex, OutputLocation, TransactionLocation, MAX_ON_D pub(super) use zebra_db::ZebraDb; -use disk_db::DiskWriteBatch; +pub(super) use disk_db::DiskWriteBatch; /// The finalized part of the chain state, stored in the db. /// diff --git a/zebra-state/src/service/finalized_state/zebra_db/shielded.rs b/zebra-state/src/service/finalized_state/zebra_db/shielded.rs index 75b5db8da64..58d9e43a6c1 100644 --- a/zebra-state/src/service/finalized_state/zebra_db/shielded.rs +++ b/zebra-state/src/service/finalized_state/zebra_db/shielded.rs @@ -295,6 +295,12 @@ impl ZebraDb { .collect(); } + // Make sure the amount of retrieved subtrees does not exceed the given limit. + #[cfg(debug_assertions)] + if let Some(limit) = limit { + assert!(list.len() <= limit.0.into()); + } + // Check that we got the start subtree. if list.get(&start_index).is_some() { list @@ -462,6 +468,12 @@ impl ZebraDb { .collect(); } + // Make sure the amount of retrieved subtrees does not exceed the given limit. + #[cfg(debug_assertions)] + if let Some(limit) = limit { + assert!(list.len() <= limit.0.into()); + } + // Check that we got the start subtree. if list.get(&start_index).is_some() { list @@ -645,7 +657,7 @@ impl DiskWriteBatch { // Sapling tree methods - /// Inserts the Sapling note commitment subtree. + /// Inserts the Sapling note commitment subtree into the batch. pub fn insert_sapling_subtree( &mut self, zebra_db: &ZebraDb, @@ -698,7 +710,7 @@ impl DiskWriteBatch { // Orchard tree methods - /// Inserts the Orchard note commitment subtree. + /// Inserts the Orchard note commitment subtree into the batch. pub fn insert_orchard_subtree( &mut self, zebra_db: &ZebraDb, diff --git a/zebra-state/src/service/non_finalized_state/chain.rs b/zebra-state/src/service/non_finalized_state/chain.rs index ef1e54215e8..b415b41d1fa 100644 --- a/zebra-state/src/service/non_finalized_state/chain.rs +++ b/zebra-state/src/service/non_finalized_state/chain.rs @@ -39,7 +39,7 @@ pub mod index; /// A single non-finalized partial chain, from the child of the finalized tip, /// to a non-finalized chain tip. -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct Chain { // Config // @@ -67,7 +67,7 @@ pub struct Chain { } /// The internal state of [`Chain`]. -#[derive(Clone, Debug, PartialEq, Eq)] +#[derive(Clone, Debug, PartialEq, Eq, Default)] pub struct ChainInner { // Blocks, heights, hashes, and transaction locations // @@ -2224,3 +2224,26 @@ impl PartialEq for Chain { } impl Eq for Chain {} + +#[cfg(test)] +impl Chain { + /// Inserts the supplied Sapling note commitment subtree into the chain. + pub(crate) fn insert_sapling_subtree( + &mut self, + subtree: NoteCommitmentSubtree, + ) { + self.inner + .sapling_subtrees + .insert(subtree.index, subtree.into_data()); + } + + /// Inserts the supplied Orchard note commitment subtree into the chain. + pub(crate) fn insert_orchard_subtree( + &mut self, + subtree: NoteCommitmentSubtree, + ) { + self.inner + .orchard_subtrees + .insert(subtree.index, subtree.into_data()); + } +} diff --git a/zebra-state/src/service/read/tests/vectors.rs b/zebra-state/src/service/read/tests/vectors.rs index 6b9bfb72cc8..2ac96578cc7 100644 --- a/zebra-state/src/service/read/tests/vectors.rs +++ b/zebra-state/src/service/read/tests/vectors.rs @@ -4,8 +4,11 @@ use std::sync::Arc; use zebra_chain::{ block::{Block, Height}, + orchard, parameters::Network::*, + sapling, serialization::ZcashDeserializeInto, + subtree::{NoteCommitmentSubtree, NoteCommitmentSubtreeData, NoteCommitmentSubtreeIndex}, transaction, }; @@ -14,7 +17,16 @@ use zebra_test::{ transcript::{ExpectedTranscriptError, Transcript}, }; -use crate::{init_test_services, populated_state, response::MinedTx, ReadRequest, ReadResponse}; +use crate::{ + init_test_services, populated_state, + response::MinedTx, + service::{ + finalized_state::{DiskWriteBatch, ZebraDb}, + non_finalized_state::Chain, + read::{orchard_subtrees, sapling_subtrees}, + }, + Config, ReadRequest, ReadResponse, +}; /// Test that ReadStateService responds correctly when empty. #[tokio::test] @@ -88,6 +100,136 @@ async fn populated_read_state_responds_correctly() -> Result<()> { Ok(()) } +/// Tests if Zebra combines the Sapling note commitment subtrees from the finalized and +/// non-finalized states correctly. +#[tokio::test] +async fn test_sapling_subtrees() -> Result<()> { + let dummy_subtree_root = sapling::tree::Node::default(); + + // Prepare the finalized state. + let db_subtree = NoteCommitmentSubtree::new(0, Height(1), dummy_subtree_root); + let db = ZebraDb::new(&Config::ephemeral(), Mainnet, true); + let mut db_batch = DiskWriteBatch::new(); + db_batch.insert_sapling_subtree(&db, &db_subtree); + db.write(db_batch) + .expect("Writing a batch with a Sapling subtree should succeed."); + + // Prepare the non-fianlized state. + let chain_subtree = NoteCommitmentSubtree::new(1, Height(3), dummy_subtree_root); + let mut chain = Chain::default(); + chain.insert_sapling_subtree(chain_subtree); + let chain = Some(Arc::new(chain)); + + // At this point, we have one Sapling subtree in the finalized state and one Sapling subtree in + // the non-finalized state. + + // Retrieve only the first subtree and check its properties. + let subtrees = sapling_subtrees(chain.clone(), &db, 0.into(), Some(1.into())); + let mut subtrees = subtrees.iter(); + assert_eq!(subtrees.len(), 1); + assert!(subtrees_eq(subtrees.next().unwrap(), &db_subtree)); + + // Retrieve both subtrees using a limit and check their properties. + let subtrees = sapling_subtrees(chain.clone(), &db, 0.into(), Some(2.into())); + let mut subtrees = subtrees.iter(); + assert_eq!(subtrees.len(), 2); + assert!(subtrees_eq(subtrees.next().unwrap(), &db_subtree)); + assert!(subtrees_eq(subtrees.next().unwrap(), &chain_subtree)); + + // Retrieve both subtrees without using a limit and check their properties. + let subtrees = sapling_subtrees(chain.clone(), &db, 0.into(), None); + let mut subtrees = subtrees.iter(); + assert_eq!(subtrees.len(), 2); + assert!(subtrees_eq(subtrees.next().unwrap(), &db_subtree)); + assert!(subtrees_eq(subtrees.next().unwrap(), &chain_subtree)); + + // Retrieve only the second subtree and check its properties. + let subtrees = sapling_subtrees(chain.clone(), &db, 1.into(), Some(1.into())); + let mut subtrees = subtrees.iter(); + assert_eq!(subtrees.len(), 1); + assert!(subtrees_eq(subtrees.next().unwrap(), &chain_subtree)); + + // Retrieve only the second subtree, using a limit that would allow for more trees if they were + // present, and check its properties. + let subtrees = sapling_subtrees(chain.clone(), &db, 1.into(), Some(2.into())); + let mut subtrees = subtrees.iter(); + assert_eq!(subtrees.len(), 1); + assert!(subtrees_eq(subtrees.next().unwrap(), &chain_subtree)); + + // Retrieve only the second subtree, without using any limit, and check its properties. + let subtrees = sapling_subtrees(chain, &db, 1.into(), None); + let mut subtrees = subtrees.iter(); + assert_eq!(subtrees.len(), 1); + assert!(subtrees_eq(subtrees.next().unwrap(), &chain_subtree)); + + Ok(()) +} + +/// Tests if Zebra combines the Orchard note commitment subtrees from the finalized and +/// non-finalized states correctly. +#[tokio::test] +async fn test_orchard_subtrees() -> Result<()> { + let dummy_subtree_root = orchard::tree::Node::default(); + + // Prepare the finalized state. + let db_subtree = NoteCommitmentSubtree::new(0, Height(1), dummy_subtree_root); + let db = ZebraDb::new(&Config::ephemeral(), Mainnet, true); + let mut db_batch = DiskWriteBatch::new(); + db_batch.insert_orchard_subtree(&db, &db_subtree); + db.write(db_batch) + .expect("Writing a batch with an Orchard subtree should succeed."); + + // Prepare the non-fianlized state. + let chain_subtree = NoteCommitmentSubtree::new(1, Height(3), dummy_subtree_root); + let mut chain = Chain::default(); + chain.insert_orchard_subtree(chain_subtree); + let chain = Some(Arc::new(chain)); + + // At this point, we have one Orchard subtree in the finalized state and one Orchard subtree in + // the non-finalized state. + + // Retrieve only the first subtree and check its properties. + let subtrees = orchard_subtrees(chain.clone(), &db, 0.into(), Some(1.into())); + let mut subtrees = subtrees.iter(); + assert_eq!(subtrees.len(), 1); + assert!(subtrees_eq(subtrees.next().unwrap(), &db_subtree)); + + // Retrieve both subtrees using a limit and check their properties. + let subtrees = orchard_subtrees(chain.clone(), &db, 0.into(), Some(2.into())); + let mut subtrees = subtrees.iter(); + assert_eq!(subtrees.len(), 2); + assert!(subtrees_eq(subtrees.next().unwrap(), &db_subtree)); + assert!(subtrees_eq(subtrees.next().unwrap(), &chain_subtree)); + + // Retrieve both subtrees without using a limit and check their properties. + let subtrees = orchard_subtrees(chain.clone(), &db, 0.into(), None); + let mut subtrees = subtrees.iter(); + assert_eq!(subtrees.len(), 2); + assert!(subtrees_eq(subtrees.next().unwrap(), &db_subtree)); + assert!(subtrees_eq(subtrees.next().unwrap(), &chain_subtree)); + + // Retrieve only the second subtree and check its properties. + let subtrees = orchard_subtrees(chain.clone(), &db, 1.into(), Some(1.into())); + let mut subtrees = subtrees.iter(); + assert_eq!(subtrees.len(), 1); + assert!(subtrees_eq(subtrees.next().unwrap(), &chain_subtree)); + + // Retrieve only the second subtree, using a limit that would allow for more trees if they were + // present, and check its properties. + let subtrees = orchard_subtrees(chain.clone(), &db, 1.into(), Some(2.into())); + let mut subtrees = subtrees.iter(); + assert_eq!(subtrees.len(), 1); + assert!(subtrees_eq(subtrees.next().unwrap(), &chain_subtree)); + + // Retrieve only the second subtree, without using any limit, and check its properties. + let subtrees = orchard_subtrees(chain, &db, 1.into(), None); + let mut subtrees = subtrees.iter(); + assert_eq!(subtrees.len(), 1); + assert!(subtrees_eq(subtrees.next().unwrap(), &chain_subtree)); + + Ok(()) +} + /// Returns test cases for the empty state and missing blocks. fn empty_state_test_cases() -> Vec<(ReadRequest, Result)> { let block: Arc = zebra_test::vectors::BLOCK_MAINNET_419200_BYTES @@ -109,3 +251,15 @@ fn empty_state_test_cases() -> Vec<(ReadRequest, Result( + (index, subtree_data): (&NoteCommitmentSubtreeIndex, &NoteCommitmentSubtreeData), + subtree: &NoteCommitmentSubtree, +) -> bool +where + N: PartialEq + Copy, +{ + index == &subtree.index && subtree_data == &subtree.into_data() +} diff --git a/zebra-state/src/service/read/tree.rs b/zebra-state/src/service/read/tree.rs index 3be272477fe..98869546952 100644 --- a/zebra-state/src/service/read/tree.rs +++ b/zebra-state/src/service/read/tree.rs @@ -74,6 +74,19 @@ where { let mut db_list = db.sapling_subtree_list_by_index_for_rpc(start_index, limit); + if let Some(limit) = limit { + let subtrees_num = u16::try_from(db_list.len()) + .expect("There can't be more than `u16::MAX` Sapling subtrees."); + + // Return the subtrees if the amount of them reached the given limit. + if subtrees_num == limit.0 { + return db_list; + } + + // If not, make sure the amount is below the limit. + debug_assert!(subtrees_num < limit.0); + } + // If there's no chain, then we have the complete list. let Some(chain) = chain else { return db_list; @@ -93,6 +106,17 @@ where // If there's no matching index, just update the list of trees. let Some(db_subtree) = db_list.get(&fork_index) else { db_list.insert(fork_index, fork_subtree); + + // Stop adding new subtrees once their amount reaches the given limit. + if let Some(limit) = limit { + let subtrees_num = u16::try_from(db_list.len()) + .expect("There can't be more than `u16::MAX` Sapling subtrees."); + + if subtrees_num == limit.0 { + break; + } + } + continue; }; @@ -104,6 +128,12 @@ where // Otherwise, the subtree is already in the list, so we don't need to add it. } + // Make sure the amount of retrieved subtrees does not exceed the given limit. + #[cfg(debug_assertions)] + if let Some(limit) = limit { + assert!(db_list.len() <= limit.0.into()); + } + // Check that we got the start subtree from the non-finalized or finalized state. // (The non-finalized state doesn't do this check.) if db_list.get(&start_index).is_some() { @@ -160,6 +190,19 @@ where { let mut db_list = db.orchard_subtree_list_by_index_for_rpc(start_index, limit); + if let Some(limit) = limit { + let subtrees_num = u16::try_from(db_list.len()) + .expect("There can't be more than `u16::MAX` Orchard subtrees."); + + // Return the subtrees if the amount of them reached the given limit. + if subtrees_num == limit.0 { + return db_list; + } + + // If not, make sure the amount is below the limit. + debug_assert!(subtrees_num < limit.0); + } + // If there's no chain, then we have the complete list. let Some(chain) = chain else { return db_list; @@ -179,6 +222,17 @@ where // If there's no matching index, just update the list of trees. let Some(db_subtree) = db_list.get(&fork_index) else { db_list.insert(fork_index, fork_subtree); + + // Stop adding new subtrees once their amount reaches the given limit. + if let Some(limit) = limit { + let subtrees_num = u16::try_from(db_list.len()) + .expect("There can't be more than `u16::MAX` Orchard subtrees."); + + if subtrees_num == limit.0 { + break; + } + } + continue; }; @@ -190,6 +244,12 @@ where // Otherwise, the subtree is already in the list, so we don't need to add it. } + // Make sure the amount of retrieved subtrees does not exceed the given limit. + #[cfg(debug_assertions)] + if let Some(limit) = limit { + assert!(db_list.len() <= limit.0.into()); + } + // Check that we got the start subtree from the non-finalized or finalized state. // (The non-finalized state doesn't do this check.) if db_list.get(&start_index).is_some() { From a3b3c6faaff774fff4555c2f44a6a575f77fb9e8 Mon Sep 17 00:00:00 2001 From: Marek Date: Mon, 16 Oct 2023 01:09:58 +0200 Subject: [PATCH 4/6] Run `cargo update` (#7742) --- Cargo.lock | 286 ++++++++++++++++++++++++----------------------------- 1 file changed, 128 insertions(+), 158 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9b8d40c3b34..17c4283671a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -91,9 +91,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -150,15 +150,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" dependencies = [ "utf8parse", ] @@ -208,9 +208,9 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "async-compression" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb42b2197bf15ccb092b62c74515dbd8b86d0effd934795f6687c93b6e679a2c" +checksum = "f658e2baef915ba0f26f1f7c42bfb8e12f532a01f449a090ded75ae7a07e9ba2" dependencies = [ "flate2", "futures-core", @@ -238,7 +238,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -249,7 +249,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -407,7 +407,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -429,7 +429,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.37", + "syn 2.0.38", "which", ] @@ -561,9 +561,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.6.2" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2f7349907b712260e64b0afe2f84692af14a454be26187d9df565c7f69266a" +checksum = "c79ad7fb2dd38f3dabd76b09c6a5a20c038fc0213ef1e9afd30eb777f120f019" dependencies = [ "memchr", "serde", @@ -794,7 +794,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1058,7 +1058,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1075,14 +1075,14 @@ dependencies = [ [[package]] name = "cxx-gen" -version = "0.7.107" +version = "0.7.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb5062549c7a2c56d9e807eb0244e18c5750616d62e77fd78d9886a2877662d3" +checksum = "1318697052dbc5a12f8e5e603441413d6096350c29b8361eb45a9c531be61dda" dependencies = [ "codespan-reporting", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1099,7 +1099,7 @@ checksum = "4a076022ece33e7686fb76513518e219cca4fce5750a8ae6d1ce6c0f48fd1af9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1147,7 +1147,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1169,7 +1169,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core 0.20.3", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1231,7 +1231,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1258,7 +1258,7 @@ checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ "curve25519-dalek", "ed25519", - "hashbrown 0.14.0", + "hashbrown 0.14.1", "hex", "rand_core 0.6.4", "serde", @@ -1335,25 +1335,14 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" +checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" dependencies = [ - "errno-dragonfly", "libc", "windows-sys 0.48.0", ] -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "eyre" version = "0.6.8" @@ -1375,9 +1364,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "ff" @@ -1416,9 +1405,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "miniz_oxide", @@ -1534,7 +1523,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1733,9 +1722,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" dependencies = [ "ahash", "allocator-api2", @@ -2039,12 +2028,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad227c3af19d4914570ad36d30409928b75967c298feb9ea1969db3a610bb14e" +checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.1", "serde", ] @@ -2089,9 +2078,9 @@ dependencies = [ [[package]] name = "insta" -version = "1.33.0" +version = "1.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aa511b2e298cd49b1856746f6bb73e17036bcd66b25f5e92cdcdbec9bd75686" +checksum = "5d64600be34b2fcfc267740a243fa7744441bb4947a619ac4e5bb6507f35fbfc" dependencies = [ "console", "lazy_static", @@ -2156,9 +2145,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ "libc", ] @@ -2273,9 +2262,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.148" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libgit2-sys" @@ -2301,9 +2290,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "librocksdb-sys" @@ -2349,9 +2338,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.7" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" +checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "lock_api" @@ -2421,9 +2410,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memoffset" @@ -2479,7 +2468,7 @@ checksum = "ddece26afd34c31585c74a4db0630c376df271c285d682d1e55012197830b6df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -2633,9 +2622,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", "libm", @@ -2893,9 +2882,9 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.7.3" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a4d085fd991ac8d5b05a147b437791b4260b76326baf0fc60cf7c9c27ecd33" +checksum = "c022f1e7b65d6a24c0dbbd5fb344c66881bc01f3e5ae74a1c8100f2f985d98a4" dependencies = [ "memchr", "thiserror", @@ -2904,9 +2893,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.3" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bee7be22ce7918f641a33f08e3f43388c7656772244e2bbb2477f44cc9021a" +checksum = "35513f630d46400a977c4cb58f78e1bfbe01434316e60c37d27b9ad6139c66d8" dependencies = [ "pest", "pest_generator", @@ -2914,22 +2903,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.3" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1511785c5e98d79a05e8a6bc34b4ac2168a0e3e92161862030ad84daa223141" +checksum = "bc9fc1b9e7057baba189b5c626e2d6f40681ae5b6eb064dc7c7834101ec8123a" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "pest_meta" -version = "2.7.3" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42f0394d3123e33353ca5e1e89092e533d2cc490389f2bd6131c43c634ebc5f" +checksum = "1df74e9e7ec4053ceb980e7c0c8bd3594e977fde1af91daba9c928e8e8c6708d" dependencies = [ "once_cell", "pest", @@ -2943,7 +2932,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.0.1", + "indexmap 2.0.2", ] [[package]] @@ -2963,7 +2952,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3048,7 +3037,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3107,9 +3096,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.67" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -3172,7 +3161,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.37", + "syn 2.0.38", "tempfile", "which", ] @@ -3187,7 +3176,7 @@ dependencies = [ "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3445,8 +3434,8 @@ checksum = "d119d7c7ca818f8a53c300863d4f87566aac09943aef5b355bb83969dae75d87" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.0", - "regex-syntax 0.8.0", + "regex-automata 0.4.1", + "regex-syntax 0.8.1", ] [[package]] @@ -3460,13 +3449,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d58da636bd923eae52b7e9120271cbefb16f399069ee566ca5ebf9c30e32238" +checksum = "465c6fc0621e4abc4187a2bda0937bfd4f722c2730b29562e19689ea796c9a4b" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.0", + "regex-syntax 0.8.1", ] [[package]] @@ -3483,9 +3472,9 @@ checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "regex-syntax" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3cbb081b9784b07cceb8824c8583f86db4814d172ab043f3c23f7dc600bf83d" +checksum = "56d84fdd47036b038fc80dd333d10b6aab10d5d31f4a366e20014def75328d33" [[package]] name = "reqwest" @@ -3555,9 +3544,9 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.2" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "911b295d2d302948838c8ac142da1ee09fa7863163b44e6715bc9357905878b8" +checksum = "9babe80d5c16becf6594aa32ad2be8fe08498e7ae60b77de8df700e67f191d7e" dependencies = [ "cc", "getrandom 0.2.10", @@ -3644,9 +3633,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.14" +version = "0.38.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f" +checksum = "745ecfa778e66b2b63c88a61cb36e0eea109e803b0b86bf9879fbc77c70e86ed" dependencies = [ "bitflags 2.4.0", "errno", @@ -3675,7 +3664,7 @@ checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", "ring 0.16.20", - "rustls-webpki 0.101.6", + "rustls-webpki", "sct", ] @@ -3688,16 +3677,6 @@ dependencies = [ "base64 0.21.4", ] -[[package]] -name = "rustls-webpki" -version = "0.100.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6a5fc258f1c1276dfe3016516945546e2d5383911efc0fc4f1cdc5df3a4ae3" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", -] - [[package]] name = "rustls-webpki" version = "0.101.6" @@ -3898,9 +3877,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" dependencies = [ "serde_derive", ] @@ -3916,13 +3895,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -3931,7 +3910,7 @@ version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ - "indexmap 2.0.1", + "indexmap 2.0.2", "itoa", "ryu", "serde", @@ -3978,7 +3957,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.0.1", + "indexmap 2.0.2", "serde", "serde_json", "serde_with_macros 3.3.0", @@ -4006,14 +3985,14 @@ dependencies = [ "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -4022,9 +4001,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] @@ -4052,9 +4031,9 @@ checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" [[package]] name = "similar" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "420acb44afdae038210c99e69aae24109f32f15500aa708e81d46c9f29d55fcf" +checksum = "2aeaf503862c419d66959f5d7ca015337d864e9c49485d771b732e2a20453597" [[package]] name = "sketches-ddsketch" @@ -4201,9 +4180,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.37" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -4288,22 +4267,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.48" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" +checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.48" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" +checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -4318,9 +4297,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" +checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" dependencies = [ "deranged", "itoa", @@ -4333,15 +4312,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -4409,7 +4388,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -4511,7 +4490,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.1", + "indexmap 2.0.2", "toml_datetime", "winnow", ] @@ -4522,7 +4501,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.0.1", + "indexmap 2.0.2", "serde", "serde_spanned", "toml_datetime", @@ -4566,7 +4545,7 @@ dependencies = [ "proc-macro2", "prost-build", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -4678,13 +4657,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -4908,17 +4887,17 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b11c96ac7ee530603dcdf68ed1557050f374ce55a5a07193ebf8cbc9f8927e9" +checksum = "f5ccd538d4a604753ebc2f17cd9946e89b77bf87f6a8e2309667c6f2e87855e3" dependencies = [ "base64 0.21.4", "log", "once_cell", "rustls 0.21.7", - "rustls-webpki 0.100.3", + "rustls-webpki", "url", - "webpki-roots 0.23.1", + "webpki-roots 0.25.2", ] [[package]] @@ -5052,7 +5031,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", "wasm-bindgen-shared", ] @@ -5086,7 +5065,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5113,7 +5092,7 @@ version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring 0.17.2", + "ring 0.17.3", "untrusted 0.9.0", ] @@ -5126,15 +5105,6 @@ dependencies = [ "webpki", ] -[[package]] -name = "webpki-roots" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" -dependencies = [ - "rustls-webpki 0.100.3", -] - [[package]] name = "webpki-roots" version = "0.25.2" @@ -5327,9 +5297,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.15" +version = "0.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" +checksum = "037711d82167854aff2018dfd193aa0fef5370f456732f0d5a0c59b0f1b4b907" dependencies = [ "memchr", ] @@ -5640,7 +5610,7 @@ dependencies = [ "hex", "howudoin", "humantime-serde", - "indexmap 2.0.1", + "indexmap 2.0.2", "itertools 0.11.0", "lazy_static", "metrics", @@ -5688,7 +5658,7 @@ dependencies = [ "futures", "hex", "hyper", - "indexmap 2.0.1", + "indexmap 2.0.2", "insta", "jsonrpc-core", "jsonrpc-derive", @@ -5740,7 +5710,7 @@ dependencies = [ "hex-literal", "howudoin", "humantime-serde", - "indexmap 2.0.1", + "indexmap 2.0.2", "insta", "itertools 0.11.0", "jubjub", @@ -5777,7 +5747,7 @@ dependencies = [ "futures", "hex", "humantime", - "indexmap 2.0.1", + "indexmap 2.0.2", "insta", "itertools 0.11.0", "lazy_static", @@ -5835,7 +5805,7 @@ dependencies = [ "howudoin", "humantime-serde", "hyper", - "indexmap 2.0.1", + "indexmap 2.0.2", "indicatif", "inferno", "insta", @@ -5902,5 +5872,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] From c43142332ae503323e46b082cba20f4c7f72ca78 Mon Sep 17 00:00:00 2001 From: Marek Date: Mon, 16 Oct 2023 01:10:08 +0200 Subject: [PATCH 5/6] chore: Update checkpoints (#7741) * Update Testnet checkpoints * Update Mainnet checkpoints --- .../src/checkpoint/main-checkpoints.txt | 50 ++++++++++++++++ .../src/checkpoint/test-checkpoints.txt | 59 +++++++++++++++++++ 2 files changed, 109 insertions(+) diff --git a/zebra-consensus/src/checkpoint/main-checkpoints.txt b/zebra-consensus/src/checkpoint/main-checkpoints.txt index 7259517375d..540ea6ce644 100644 --- a/zebra-consensus/src/checkpoint/main-checkpoints.txt +++ b/zebra-consensus/src/checkpoint/main-checkpoints.txt @@ -11210,3 +11210,53 @@ 2237898 0000000000d828b783a0b565084948017dd54667b470e18bf7fd808e98afc438 2238298 00000000001f208cadd174f7726b1bc958bf478ec3cffa5f093c757e17281a36 2238698 000000000113210e4cfe24701b23df168d63381008d30eb87d2c833554e58055 +2239098 00000000005662febe1341946f498f5d9d5dc6c39630fa750d5a6bb231b1b3be +2239498 0000000000fb27120130bb4c2721b2adeaa25bb9038606e3d93ba928fd8b3584 +2239898 0000000000645790ce398fd7cc2d51244dec038eeeef9222163d332fb7f0acdc +2240298 00000000000aa7b30793674e33dc2dce26e5cdcd1fd788c11c9ae69a49fbb111 +2240698 0000000000f18c1523d59120c350ae85afc1f0effb9d7ca68f36e60412262881 +2241098 00000000009899cefe84a57de16725a2394ddd3d9765322bbc863afdb834fa84 +2241498 00000000004bd9303ee01ccb844ecbcbc35b115bad101e9cb84cc53760e3dd25 +2241898 00000000000fcd10c7cb3a60f8fc461654e9b30d8d5b0b547e7d6a886985431a +2242298 000000000036012b82075cb3994fdbaa6c4e6c137a354d0e2f7beed9022532d6 +2242698 00000000018fcab0b410cf2f8578e7f28173c963707753f73dc3918d8ac33597 +2243098 00000000016a59104d11603f53aa968d7efcb98c2a8f7099137790aa586d007d +2243498 00000000002a4ca2ef0df65b639ecf1d695efa06d374e3c9e17400b3a899d4a8 +2243898 00000000018f5d41aadab6a95df0658bc43de8ab1f2321bdb0828d6ed90d175b +2244298 0000000001071cf163c54a45439692d66e413cdc56f267b2fbff50682552baf6 +2244698 0000000000fe501883b6751ba7a1e51ca5b1f2af5675b651a35c43ca5f1dc0ae +2245098 00000000013d99facdcad44f8ab2c184ec8ea4deed4126049ddbf6b8436ba966 +2245498 00000000007a81bb85f63d73d6245e1ad44c69018f0b7a5916229e5ff29396ec +2245898 00000000000daf5f830d8b912c49dd5c86e50fdb95cd678fdbc32812b910c72f +2246298 000000000081a003991eb2ef03669e00fdd020f9b1c257773d49565e89cfb929 +2246698 000000000157bc4eedef772ff51727ebdbe1a416cf5f122899fad97cdb80b5f2 +2247098 000000000065afd59544b99fd69aaf47b48ee0c4c46542d53bcf1d10eabd961b +2247498 000000000149a6d21161b70e2201026ab97c7b864bd6af2649b56b8a87aae66d +2247898 000000000143b94184bbff80663b71b155a412d1e4c6f705ec684064aef5532a +2248298 0000000000a440d2dfd1f3e02e85982f8885c66374cf7a408ae50b446b7a95f9 +2248698 0000000000b737791ab7a870038f2a6857faf9ac3880c3f8bd7a099c4efe86c0 +2249098 000000000003ba095b8fa156964270acce4695319400934d0427aa70574fc18c +2249498 00000000009af5342fda5276c7e8136010430fc7b88f12d0529053d0c1dc34a8 +2249898 0000000001521367d10ac5dfabc821b36d311cdd7f3e455535693cefa44baa40 +2250298 0000000001d0cc4d9cada586cbc6dbcee099381bf141cfbd9017d4d5ae494cce +2250698 0000000000b2255b80bb3e66a18e457e574aac3dbaf2d5217642985ed3d8928d +2251098 0000000001728f8f71b980897ab0f1bc6414e2a0bd1a01a9c85805b8a4246d67 +2251498 00000000009c64581a5dcb6f5daeb9fc939f3f82332c227b0270a29b4131ec8c +2251898 00000000009145fb53ba0c0a0aef0203348d84c4271c824919fe30351de36513 +2252298 0000000000e928e6a013d4d03cdffeab9d9e7ea5062234ec03b6ed03d35f51ed +2252698 000000000024ae8486c74f3e7eb2bfa02b50eeac23ac96cd0e36ffe9d8b0ce96 +2253098 000000000042c7ff48fcc7291cbc36a97930897216959a4baf77a5c3edd2b3da +2253498 00000000003f7c72b280fdf5a14d27f924d8b46d5cbd84b73966920897540311 +2253898 000000000086f805f8cd33c03bb66d2656216af0ed005b6a2fdd2ead709557a7 +2254298 0000000000e63424d7f007f6dccc724fa8aad1c328b4f28fd0c2e0f8774720a8 +2254698 000000000046527138e00a07325372fc078dd7306528029050c800bb30eee7b8 +2255098 0000000000d59a69903fe48f8cd10801d8a3dfcad643824856925cf97715f32a +2255498 00000000010e3dee658abf231630be0fc93cc333350560ac2ab7ce3d942f2c0d +2255898 0000000000aa37a5e6feb3549b6f866b5d99567cec4f5eb8be9fc3a60d195e99 +2256298 000000000161018956e2f22c64ebd1f40d5d5724dc43c0edda9de6200fd6021b +2256698 000000000017ff6d6cc047533708b7382aaac4f79373508fa25855f33ca3e138 +2257098 0000000000e025ca0a42f0649940216d86ae3634b91405557b2a17dc9bbf7e8c +2257498 000000000061e5e737670a3612041e6326a74bc6bb865b221ede2fe148ace070 +2257898 00000000008820c978833e535149174f965a6b3e4a6ac4b1ddc48345478ba64c +2258298 000000000100d9383f9c9ff554d473e8a276855beb6804b6b9a62f809b567a40 +2258698 0000000000a91531d88040a47c0f1b8f5b16ea1833aa97affaa04d5e7fc18aed diff --git a/zebra-consensus/src/checkpoint/test-checkpoints.txt b/zebra-consensus/src/checkpoint/test-checkpoints.txt index e161e22bb59..b46e6ca51a4 100644 --- a/zebra-consensus/src/checkpoint/test-checkpoints.txt +++ b/zebra-consensus/src/checkpoint/test-checkpoints.txt @@ -6306,3 +6306,62 @@ 2522000 0005f889589b8c25d4abe97edc6fca1f867a2df04903ca2d38d38a1d404a3c0d 2522400 001ff1664752da479f0b4657f8bc3e132da097fe5532e06183f68cf59959c967 2522800 000036ebe2e67a1c5db21fc028d2f5ea6651c61d9e03d259b51163a9bbb0cf1b +2523200 0028c4b53d0333e8c856eb723feb1d43a550ce4cdb49c01715798c44451b49a5 +2523600 000e5ea0858c53d9e579650272035d2b062c94b80ad8d42a4a54fec7db1c92cc +2524000 000ba1e0a3745d05714cc9d84c8c72ce40819b82a378899394b2a21a117cb928 +2524400 001177f2afbedaf47206bd6be1557a8b4b943095323953e5b567d89a7049cb47 +2524800 0087c080962b0aed55a34dcdaa88f17513b54f4e609fff399810a203659405d8 +2525200 00ae5fcf53d50e069e311fcce52728a360bf034e5a3a98117c4cfe7f1a3225f9 +2525600 00221359c0b24c843d636b08ffe26242580bad5624adedfb58616a4716ec1fc5 +2526000 001fbf2ccdde41f716066a2d6fe547036bba0b0e616bac244f54395b04369490 +2526400 00665e692722e54a0adb4e38c6b2d9d032ffe97e43f4be364199be06a2c7f598 +2526800 000d26a95d4021506be2b08b1b3cf580507bc30503bdd6f1217a0a537202418c +2527200 003d1aa9aa844c569a4889d2fb8fc294c8c6850686abfa07f12ed9d8940b6c86 +2527600 0016f1dbafe5a61726cd1376238752f684e756fed07916db675023f5bcfc6591 +2528000 001bed30a08703a5b1a98264bf48ce953e0733349fac1b223a83d30761c7a0e8 +2528400 00152b454e4c97de3cb76df03811bd2bb627b69240e472afc750e0527235355a +2528800 001f8d71cc39da83900ba7db716099fb9963a21ec1ce74eeddfbb4920858052a +2529200 001574302f3ef2968b97391a025c0c178b62f5381e8cedcc3e728a78657790bc +2529600 002dc58bb40d57724d4497c73b651189e6679fbfa57560ba75a84b178a8fa99c +2530000 000d90ebe86cd1b15080ad419d5a59a13035dfffaa9e3e0f6016e44faff164db +2530400 001220b459188e9ff99a230b1ff87a32ed39e4baabc5dd3f99ab0967a1982a0f +2530800 001b79e826bc9c24c19c25abdc963da520859ed67c1e4787cfea1e915ffab835 +2531200 0015b035801bb9846cc2554c97ac726d3738f3be59dc4ce7d49e020f98103bb8 +2531600 000815786b2a3aab5ce13a67be5d038e060de43804016b9a1f2bacc5c098694e +2532000 0001e47dde90fd6f2868652068170b727c1e422b311ae60cc770655728af6b12 +2532400 0018c05b120af179f4b9476f866b908049eb74f3fcaa0fc6b636d2dbc7049f01 +2532800 00397dc0c12ec82cf7074815e187b0840f40b0a028782f28dc40da689a103a20 +2533200 00892c1c2bfa29d94c15b666fc4f0db6d1e3f97e9cd63df656996ef5947ceab9 +2533600 000c0703db639039fade3a641832a587be391a0c98ed57f61f222f9750501e44 +2534000 000fafb4b3abb9db1414291b7ceb42fde471cb1d595042cdb770280a195f8667 +2534400 0037f3f98539e0c6a259cc66f90779c105b217fc7d9aa5251c458353751797d6 +2534800 000920c9b1170ee274a7cada6d58e25b076e9b3b4e615fee462729b04184e65a +2535200 0029dac81f58f49a814e68ab87abde862eb34bc06a2dbb6910e9523476ab775b +2535600 0027ea1f5a7b07cfd83d554b202d9796b0bb37cfc19ae118ed1f2362e24028d4 +2536000 00088288e1323f66e3f5b31cca66908d2ebbbb1660def0fafda2d31080cd05f6 +2536400 0003895374a5e5e65b30e281267c22cdd5663cdeed83199e5641e0be76ca1cfc +2536800 000169dd5e51b4abbe196e584765e97a2f72b1afbb8cd6117214d66fd04193ac +2537200 004331e57869225dd41d7d13efb16048c7098638262ff9e139c349fdf4219e1e +2537600 00045b97eced9319e929824f9bea56c571a77d3b104e6b3c44ab41812426e540 +2538000 0037bb8156d3ee43ff0dc54d9a169c47c7fbed2f12048e470fd7efbe40db6754 +2538400 002ad8f8d3845963bdcc10d40c63e31cb3b341c9f4538146889475e39ffd1ea9 +2538800 000983cfdebb96b6338d57603afd55d233fe16078743b21c9960ec66ffece45c +2539200 0015604f16dde84d9466c1ddb3ea7390c37bb7d070320f50ceff3927e84ab850 +2539600 0019335125c2ade7ad3ce3e7394bbb13951df7b9f873821efccc49a7e08e0bec +2540000 0010c1345d4412a8367aec519bee8d566053cab59109c333201ce35eefe9dd21 +2540400 0002a4795e1e927f7b5ab6f355737557613d5269c52e25e523691167930fb35f +2540800 000bd4153715bbe7ba1118d4314461850adc16ad2cb12a0e99fcce22b462f3bc +2541200 00028d6ab82bd6bfe3b4d351e33fc500342548f05e9d00a26f46e146103bb23a +2541600 000a0786992577c16735b8f4bd3aca629582e3a02b7d5686457c1196a73e9b03 +2542000 0013052546b09cba64ea3a4e119047d96c4cd7a6e043eb0f43f1cf1704585586 +2542400 001fbc9e2686653ae5e6b673cd438fd3fb88acbc0b01e6fc7d7738f3e86cb314 +2542800 0017f5fe146be4bb9eb00b91a1e3ad3cc80bd14abf262540b279cb10c291fc90 +2543200 001de3b190b8359667564d37ec81193c081ed66fb3380710bfd404edc901307d +2543600 000b26694e9241f10b71b95a118531cefa1d78a010e1077bb484aa1687d29e1b +2544000 0014ebfa07905683441b84289cee9ddd2f23f2f1fb23a02ffb4f4c937829e7a3 +2544400 000b8ad313960c5276e49ca99d3d799fd20486aa23c1e7c3fd29707b1d59db61 +2544800 003566e38a998f15fd07fbb8bdaec4e74947a1f932ad54dd76208925baae6e4a +2545200 0008c02621c639ccd6ec96ed8910a01b57cfecbdd853b58d774d21b07d98b21f +2545600 000922846ef68b656beee14815e999df2dd44625fdaa9fca703354db588d1b5a +2546000 0008416c201ea4c6694b57a7571c4a38b4bccbe07a445d36d301d2d4d286a361 +2546400 000d9091cc81528757991f79e116b4de846d76d4a04028358ba19a65e5acc480 From 050767025926e432f6fffe667fbddd2f0be63ef2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 20:13:38 +0000 Subject: [PATCH 6/6] build(deps): bump the log-time group with 1 update (#7748) Bumps the log-time group with 1 update: [tracing](https://github.com/tokio-rs/tracing). - [Release notes](https://github.com/tokio-rs/tracing/releases) - [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.37...tracing-0.1.39) --- updated-dependencies: - dependency-name: tracing dependency-type: direct:production update-type: version-update:semver-patch dependency-group: log-time ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 9 ++++----- tower-batch-control/Cargo.toml | 2 +- tower-fallback/Cargo.toml | 2 +- zebra-chain/Cargo.toml | 4 ++-- zebra-consensus/Cargo.toml | 2 +- zebra-network/Cargo.toml | 2 +- zebra-rpc/Cargo.toml | 2 +- zebra-state/Cargo.toml | 2 +- zebra-test/Cargo.toml | 2 +- zebrad/Cargo.toml | 2 +- 10 files changed, 14 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 17c4283671a..4c8629e1c82 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4633,11 +4633,10 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "ee2ef2af84856a50c1d430afce2fdded0a4ec7eda868db86409b4543df0797f9" dependencies = [ - "cfg-if 1.0.0", "log", "pin-project-lite", "tracing-attributes", @@ -4668,9 +4667,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", diff --git a/tower-batch-control/Cargo.toml b/tower-batch-control/Cargo.toml index 1856241d8c5..8cf59359144 100644 --- a/tower-batch-control/Cargo.toml +++ b/tower-batch-control/Cargo.toml @@ -29,7 +29,7 @@ rayon = "1.7.0" tokio = { version = "1.33.0", features = ["time", "sync", "tracing", "macros"] } tokio-util = "0.7.8" tower = { version = "0.4.13", features = ["util", "buffer"] } -tracing = "0.1.37" +tracing = "0.1.39" tracing-futures = "0.2.5" [dev-dependencies] diff --git a/tower-fallback/Cargo.toml b/tower-fallback/Cargo.toml index e4c8b2a001c..e9fa523c6b9 100644 --- a/tower-fallback/Cargo.toml +++ b/tower-fallback/Cargo.toml @@ -19,7 +19,7 @@ categories = ["algorithms", "asynchronous"] pin-project = "1.1.3" tower = "0.4.13" futures-core = "0.3.28" -tracing = "0.1.37" +tracing = "0.1.39" [dev-dependencies] tokio = { version = "1.33.0", features = ["full", "tracing", "test-util"] } diff --git a/zebra-chain/Cargo.toml b/zebra-chain/Cargo.toml index 5d8de1c8675..10831fd3858 100644 --- a/zebra-chain/Cargo.toml +++ b/zebra-chain/Cargo.toml @@ -92,7 +92,7 @@ humantime = "2.1.0" displaydoc = "0.2.4" static_assertions = "1.1.0" thiserror = "1.0.48" -tracing = "0.1.37" +tracing = "0.1.39" # Serialization hex = { version = "0.4.3", features = ["serde"] } @@ -138,7 +138,7 @@ color-eyre = "0.6.2" # Enable a feature that makes tinyvec compile much faster. tinyvec = { version = "1.6.0", features = ["rustc_1_55"] } spandoc = "0.2.2" -tracing = "0.1.37" +tracing = "0.1.39" # Make the optional testing dependencies required proptest = "1.3.1" diff --git a/zebra-consensus/Cargo.toml b/zebra-consensus/Cargo.toml index 4c2c167d817..dd96d7da561 100644 --- a/zebra-consensus/Cargo.toml +++ b/zebra-consensus/Cargo.toml @@ -55,7 +55,7 @@ metrics = "0.21.1" thiserror = "1.0.48" tokio = { version = "1.33.0", features = ["time", "sync", "tracing", "rt-multi-thread"] } tower = { version = "0.4.13", features = ["timeout", "util", "buffer"] } -tracing = "0.1.37" +tracing = "0.1.39" tracing-futures = "0.2.5" orchard = "0.5.0" diff --git a/zebra-network/Cargo.toml b/zebra-network/Cargo.toml index d1903789da1..faed08811c6 100644 --- a/zebra-network/Cargo.toml +++ b/zebra-network/Cargo.toml @@ -69,7 +69,7 @@ tower = { version = "0.4.13", features = ["retry", "discover", "load", "load-she metrics = "0.21.1" tracing-futures = "0.2.5" tracing-error = { version = "0.2.0", features = ["traced-error"] } -tracing = "0.1.37" +tracing = "0.1.39" # prod feature progress-bar howudoin = { version = "0.1.2", optional = true } diff --git a/zebra-rpc/Cargo.toml b/zebra-rpc/Cargo.toml index 95e48569d6f..617cb001eb2 100644 --- a/zebra-rpc/Cargo.toml +++ b/zebra-rpc/Cargo.toml @@ -57,7 +57,7 @@ indexmap = { version = "2.0.1", features = ["serde"] } tokio = { version = "1.33.0", features = ["time", "rt-multi-thread", "macros", "tracing"] } tower = "0.4.13" -tracing = "0.1.37" +tracing = "0.1.39" hex = { version = "0.4.3", features = ["serde"] } serde = { version = "1.0.188", features = ["serde_derive"] } diff --git a/zebra-state/Cargo.toml b/zebra-state/Cargo.toml index 95712071720..b7d6a6365be 100644 --- a/zebra-state/Cargo.toml +++ b/zebra-state/Cargo.toml @@ -66,7 +66,7 @@ thiserror = "1.0.48" rayon = "1.7.0" tokio = { version = "1.33.0", features = ["rt-multi-thread", "sync", "tracing"] } tower = { version = "0.4.13", features = ["buffer", "util"] } -tracing = "0.1.37" +tracing = "0.1.39" # elasticsearch specific dependencies. # Security: avoid default dependency on openssl diff --git a/zebra-test/Cargo.toml b/zebra-test/Cargo.toml index 3417e77263a..c3c7381e6ca 100644 --- a/zebra-test/Cargo.toml +++ b/zebra-test/Cargo.toml @@ -41,7 +41,7 @@ thiserror = "1.0.48" tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } tracing-error = "0.2.0" -tracing = "0.1.37" +tracing = "0.1.39" [dev-dependencies] tempfile = "3.8.0" diff --git a/zebrad/Cargo.toml b/zebrad/Cargo.toml index ff38f3f5b23..9f450d23843 100644 --- a/zebrad/Cargo.toml +++ b/zebrad/Cargo.toml @@ -179,7 +179,7 @@ tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } tracing-appender = "0.2.2" tracing-error = "0.2.0" tracing-futures = "0.2.5" -tracing = "0.1.37" +tracing = "0.1.39" metrics = "0.21.1"