diff --git a/.github/workflows/build-crates-individually.yml b/.github/workflows/build-crates-individually.yml index 756a37b088a..1546a361c65 100644 --- a/.github/workflows/build-crates-individually.yml +++ b/.github/workflows/build-crates-individually.yml @@ -112,10 +112,10 @@ jobs: - uses: r7kamura/rust-problem-matchers@v1.3.0 - name: Install last version of Protoc - uses: arduino/setup-protoc@v1.3.0 + uses: arduino/setup-protoc@v2.0.0 with: # TODO: increase to latest version after https://github.com/arduino/setup-protoc/issues/33 is fixed - version: '3.20.1' + version: '23.x' repo-token: ${{ secrets.GITHUB_TOKEN }} # Setup Rust with stable toolchain and minimal profile diff --git a/.github/workflows/continous-integration-os.patch.yml b/.github/workflows/continous-integration-os.patch.yml index 2f5eea44f98..b79ab949975 100644 --- a/.github/workflows/continous-integration-os.patch.yml +++ b/.github/workflows/continous-integration-os.patch.yml @@ -22,7 +22,8 @@ jobs: strategy: matrix: # TODO: Windows was removed for now, see https://github.com/ZcashFoundation/zebra/issues/3801 - os: [ubuntu-latest, macos-latest] + # TODO: macOS tests were removed for now, see https://github.com/ZcashFoundation/zebra/issues/6824 + os: [ubuntu-latest] rust: [stable, beta] features: ["", " --features getblocktemplate-rpcs"] exclude: diff --git a/.github/workflows/continous-integration-os.yml b/.github/workflows/continous-integration-os.yml index c6749d23e86..8b0c04c45f3 100644 --- a/.github/workflows/continous-integration-os.yml +++ b/.github/workflows/continous-integration-os.yml @@ -69,7 +69,8 @@ jobs: fail-fast: false matrix: # TODO: Windows was removed for now, see https://github.com/ZcashFoundation/zebra/issues/3801 - os: [ubuntu-latest, macos-latest] + # TODO: macOS tests were removed for now, see https://github.com/ZcashFoundation/zebra/issues/6824 + os: [ubuntu-latest] rust: [stable, beta] features: ["", " --features getblocktemplate-rpcs"] exclude: @@ -94,10 +95,10 @@ jobs: - uses: r7kamura/rust-problem-matchers@v1.3.0 - name: Install last version of Protoc - uses: arduino/setup-protoc@v1.3.0 + uses: arduino/setup-protoc@v2.0.0 with: # TODO: increase to latest version after https://github.com/arduino/setup-protoc/issues/33 is fixed - version: '3.20.1' + version: '23.x' repo-token: ${{ secrets.GITHUB_TOKEN }} # Setup Rust with ${{ matrix.rust }} toolchain and minimal profile @@ -230,10 +231,10 @@ jobs: - uses: r7kamura/rust-problem-matchers@v1.3.0 - name: Install last version of Protoc - uses: arduino/setup-protoc@v1.3.0 + uses: arduino/setup-protoc@v2.0.0 with: # TODO: increase to latest version after https://github.com/arduino/setup-protoc/issues/33 is fixed - version: '3.20.1' + version: '23.x' repo-token: ${{ secrets.GITHUB_TOKEN }} # Setup Rust with stable toolchain and minimal profile diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e889e7711cd..acf07c8a2ba 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -45,10 +45,10 @@ jobs: persist-credentials: false - name: Install last version of Protoc - uses: arduino/setup-protoc@v1.3.0 + uses: arduino/setup-protoc@v2.0.0 with: # TODO: increase to latest version after https://github.com/arduino/setup-protoc/issues/33 is fixed - version: '3.20.1' + version: '23.x' repo-token: ${{ secrets.GITHUB_TOKEN }} # Setup Rust with beta toolchain and default profile (to include rust-docs) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8ff00d25ca8..c2c04a157a6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -67,10 +67,10 @@ jobs: persist-credentials: false - name: Install last version of Protoc - uses: arduino/setup-protoc@v1.3.0 + uses: arduino/setup-protoc@v2.0.0 with: # TODO: increase to latest version after https://github.com/arduino/setup-protoc/issues/33 is fixed - version: '3.20.1' + version: '23.x' repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Check workflow permissions @@ -118,10 +118,10 @@ jobs: - uses: r7kamura/rust-problem-matchers@v1.3.0 - name: Install last version of Protoc - uses: arduino/setup-protoc@v1.3.0 + uses: arduino/setup-protoc@v2.0.0 with: # TODO: increase to latest version after https://github.com/arduino/setup-protoc/issues/33 is fixed - version: '3.20.1' + version: '23.x' repo-token: ${{ secrets.GITHUB_TOKEN }} # Setup Rust with stable toolchain and default profile @@ -157,10 +157,10 @@ jobs: - uses: r7kamura/rust-problem-matchers@v1.3.0 - name: Install last version of Protoc - uses: arduino/setup-protoc@v1.3.0 + uses: arduino/setup-protoc@v2.0.0 with: # TODO: increase to latest version after https://github.com/arduino/setup-protoc/issues/33 is fixed - version: '3.20.1' + version: '23.x' repo-token: ${{ secrets.GITHUB_TOKEN }} # Setup Rust with stable toolchain and default profile diff --git a/Cargo.lock b/Cargo.lock index 5d46590d18b..278bdfe68ac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -653,9 +653,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.25" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdbc37d37da9e5bce8173f3a41b71d9bf3c674deebbaceacd0ebdabde76efb03" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" dependencies = [ "android-tzdata", "iana-time-zone", @@ -2078,9 +2078,9 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.17.4" +version = "0.17.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db45317f37ef454e6519b6c3ed7d377e5f23346f0823f86e65ca36912d1d0ef8" +checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057" dependencies = [ "console", "instant", diff --git a/zebra-chain/Cargo.toml b/zebra-chain/Cargo.toml index b20c49a0786..4a004651e80 100644 --- a/zebra-chain/Cargo.toml +++ b/zebra-chain/Cargo.toml @@ -69,7 +69,7 @@ zcash_note_encryption = "0.3.0" zcash_primitives = { version = "0.11.0", features = ["transparent-inputs"] } # Time -chrono = { version = "0.4.25", default-features = false, features = ["clock", "std", "serde"] } +chrono = { version = "0.4.26", default-features = false, features = ["clock", "std", "serde"] } humantime = "2.1.0" # Error Handling & Formatting diff --git a/zebra-consensus/Cargo.toml b/zebra-consensus/Cargo.toml index 5eb6f37cdd8..deab9ce8b1a 100644 --- a/zebra-consensus/Cargo.toml +++ b/zebra-consensus/Cargo.toml @@ -34,7 +34,7 @@ jubjub = "0.10.0" rand = { version = "0.8.5", package = "rand" } rayon = "1.7.0" -chrono = { version = "0.4.25", default-features = false, features = ["clock", "std"] } +chrono = { version = "0.4.26", default-features = false, features = ["clock", "std"] } displaydoc = "0.2.4" lazy_static = "1.4.0" once_cell = "1.17.2" diff --git a/zebra-network/Cargo.toml b/zebra-network/Cargo.toml index 6a24808d612..2b3e5b2c88c 100644 --- a/zebra-network/Cargo.toml +++ b/zebra-network/Cargo.toml @@ -26,7 +26,7 @@ proptest-impl = ["proptest", "proptest-derive", "zebra-chain/proptest-impl"] bitflags = "2.2.1" byteorder = "1.4.3" bytes = "1.4.0" -chrono = { version = "0.4.25", default-features = false, features = ["clock", "std"] } +chrono = { version = "0.4.26", default-features = false, features = ["clock", "std"] } hex = "0.4.3" humantime-serde = "1.1.1" indexmap = { version = "1.9.3", features = ["serde"] } diff --git a/zebra-rpc/Cargo.toml b/zebra-rpc/Cargo.toml index c2c7181e860..ddcbd0da7bc 100644 --- a/zebra-rpc/Cargo.toml +++ b/zebra-rpc/Cargo.toml @@ -32,7 +32,7 @@ proptest-impl = [ ] [dependencies] -chrono = { version = "0.4.25", default-features = false, features = ["clock", "std"] } +chrono = { version = "0.4.26", default-features = false, features = ["clock", "std"] } futures = "0.3.28" # lightwalletd sends JSON-RPC requests over HTTP 1.1 diff --git a/zebra-state/Cargo.toml b/zebra-state/Cargo.toml index 4f0a7ddd51f..8d7d030e198 100644 --- a/zebra-state/Cargo.toml +++ b/zebra-state/Cargo.toml @@ -34,7 +34,7 @@ elasticsearch = [ [dependencies] bincode = "1.3.3" -chrono = { version = "0.4.25", default-features = false, features = ["clock", "std"] } +chrono = { version = "0.4.26", default-features = false, features = ["clock", "std"] } dirs = "5.0.1" futures = "0.3.28" hex = "0.4.3" diff --git a/zebrad/Cargo.toml b/zebrad/Cargo.toml index fa0ea3f5a69..45f27275eec 100644 --- a/zebrad/Cargo.toml +++ b/zebrad/Cargo.toml @@ -117,7 +117,7 @@ zebra-state = { path = "../zebra-state" } abscissa_core = "0.5" gumdrop = { version = "0.7", features = ["default_expr"]} -chrono = { version = "0.4.25", default-features = false, features = ["clock", "std"] } +chrono = { version = "0.4.26", default-features = false, features = ["clock", "std"] } humantime-serde = "1.1.1" indexmap = "1.9.3" lazy_static = "1.4.0" @@ -175,7 +175,7 @@ log = "0.4.18" # prod feature progress-bar howudoin = { version = "0.1.2", features = ["term-line"], optional = true } -indicatif = { version = "0.17.4", optional = true } +indicatif = { version = "0.17.5", optional = true } # test feature proptest-impl proptest = { version = "1.2.0", optional = true } diff --git a/zebrad/tests/acceptance.rs b/zebrad/tests/acceptance.rs index c8fac004d45..c53f5c4b22b 100644 --- a/zebrad/tests/acceptance.rs +++ b/zebrad/tests/acceptance.rs @@ -572,8 +572,8 @@ fn config_tests() -> Result<()> { // Check that we have a current version of the config stored last_config_is_stored()?; - // Check that Zebra stored configuration works - stored_configs_works()?; + // Check that Zebra's previous configurations still work + stored_configs_work()?; // Runs `zebrad` serially to avoid potential port conflicts app_no_args()?; @@ -702,13 +702,31 @@ fn last_config_is_stored() -> Result<()> { .to_string(); // Loop all the stored configs + // + // TODO: use the same filename list code in last_config_is_stored() and stored_configs_work() for config_file in configs_dir() .read_dir() .expect("read_dir call failed") .flatten() { + let config_file_path = config_file.path(); + let config_file_name = config_file_path + .file_name() + .expect("config files must have a file name") + .to_string_lossy(); + + if config_file_name.as_ref().starts_with('.') || config_file_name.as_ref().starts_with('#') + { + // Skip editor files and other invalid config paths + tracing::info!( + ?config_file_path, + "skipping hidden/temporary config file path" + ); + continue; + } + // Read stored config - let stored_content = fs::read_to_string(config_file_full_path(config_file.path())) + let stored_content = fs::read_to_string(config_file_full_path(config_file_path)) .expect("Should have been able to read the file") .trim() .to_string(); @@ -832,7 +850,7 @@ fn invalid_generated_config() -> Result<()> { /// Test all versions of `zebrad.toml` we have stored can be parsed by the latest `zebrad`. #[tracing::instrument] -fn stored_configs_works() -> Result<()> { +fn stored_configs_work() -> Result<()> { let old_configs_dir = configs_dir(); for config_file in old_configs_dir @@ -840,15 +858,33 @@ fn stored_configs_works() -> Result<()> { .expect("read_dir call failed") .flatten() { + let config_file_path = config_file.path(); + let config_file_name = config_file_path + .file_name() + .expect("config files must have a file name") + .to_string_lossy(); + + if config_file_name.as_ref().starts_with('.') || config_file_name.as_ref().starts_with('#') + { + // Skip editor files and other invalid config paths + tracing::info!( + ?config_file_path, + "skipping hidden/temporary config file path" + ); + continue; + } + // ignore files starting with getblocktemplate prefix // if we were not built with the getblocktemplate-rpcs feature. #[cfg(not(feature = "getblocktemplate-rpcs"))] - if config_file - .file_name() - .into_string() - .expect("all files names should be string convertible") + if config_file_name + .as_ref() .starts_with(GET_BLOCK_TEMPLATE_CONFIG_PREFIX) { + tracing::info!( + ?config_file_path, + "skipping getblocktemplate-rpcs config file path" + ); continue; }