Skip to content

Commit

Permalink
Merge branch 'main' into db-forward-compat
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jun 6, 2023
2 parents e90b718 + 0c2107a commit 050a08b
Show file tree
Hide file tree
Showing 13 changed files with 73 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-crates-individually.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ jobs:
- uses: r7kamura/[email protected]

- 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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/continous-integration-os.patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/continous-integration-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -94,10 +95,10 @@ jobs:
- uses: r7kamura/[email protected]

- 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
Expand Down Expand Up @@ -230,10 +231,10 @@ jobs:
- uses: r7kamura/[email protected]

- 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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -118,10 +118,10 @@ jobs:
- uses: r7kamura/[email protected]

- 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
Expand Down Expand Up @@ -157,10 +157,10 @@ jobs:
- uses: r7kamura/[email protected]

- 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
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion zebra-chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion zebra-consensus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion zebra-network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
2 changes: 1 addition & 1 deletion zebra-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion zebra-state/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions zebrad/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 }
Expand Down
52 changes: 44 additions & 8 deletions zebrad/tests/acceptance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()?;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -832,23 +850,41 @@ 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
.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;
}

// 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;
}

Expand Down

0 comments on commit 050a08b

Please sign in to comment.