From 93a51fce4665efad7decd4d22dc07083a7f84e02 Mon Sep 17 00:00:00 2001 From: dorianvp Date: Wed, 3 Jun 2026 13:16:58 +0200 Subject: [PATCH 1/4] chore: bump `zcash_protocol` to 0.9 --- Cargo.lock | 31 ++++++++++++++++++++++--------- zcash_local_net/Cargo.toml | 2 +- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5121fb4..5f55639 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3272,7 +3272,7 @@ dependencies = [ "tokio", "zcash_keys", "zcash_local_net", - "zcash_protocol", + "zcash_protocol 0.8.0", "zcash_transparent", "zebra-node-services", "zebra-rpc", @@ -5142,7 +5142,7 @@ dependencies = [ "corez", "f4jumble", "zcash_encoding", - "zcash_protocol", + "zcash_protocol 0.8.0", ] [[package]] @@ -5190,7 +5190,7 @@ dependencies = [ "tracing", "zcash_address", "zcash_encoding", - "zcash_protocol", + "zcash_protocol 0.8.0", "zcash_transparent", "zip32", ] @@ -5209,7 +5209,7 @@ dependencies = [ "tokio", "tracing", "tracing-subscriber", - "zcash_protocol", + "zcash_protocol 0.9.0", "zebra-chain", "zebra-node-services", "zebra-rpc", @@ -5256,7 +5256,7 @@ dependencies = [ "sha2 0.10.9", "zcash_encoding", "zcash_note_encryption", - "zcash_protocol", + "zcash_protocol 0.8.0", "zcash_script", "zcash_transparent", ] @@ -5297,6 +5297,19 @@ dependencies = [ "zcash_encoding", ] +[[package]] +name = "zcash_protocol" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bec496a0bd62dae98c4b26f51c5dab112d0c5350bbc2ccfdfd05bb3454f714d" +dependencies = [ + "corez", + "document-features", + "hex", + "memuse", + "zcash_encoding", +] + [[package]] name = "zcash_script" version = "0.4.4" @@ -5342,7 +5355,7 @@ dependencies = [ "subtle", "zcash_address", "zcash_encoding", - "zcash_protocol", + "zcash_protocol 0.8.0", "zcash_script", "zcash_spec", "zip32", @@ -5407,7 +5420,7 @@ dependencies = [ "zcash_history", "zcash_note_encryption", "zcash_primitives", - "zcash_protocol", + "zcash_protocol 0.8.0", "zcash_script", "zcash_transparent", ] @@ -5444,7 +5457,7 @@ dependencies = [ "tracing", "tracing-futures", "zcash_proofs", - "zcash_protocol", + "zcash_protocol 0.8.0", "zebra-chain", "zebra-node-services", "zebra-script", @@ -5548,7 +5561,7 @@ dependencies = [ "zcash_address", "zcash_keys", "zcash_primitives", - "zcash_protocol", + "zcash_protocol 0.8.0", "zcash_script", "zcash_transparent", "zebra-chain", diff --git a/zcash_local_net/Cargo.toml b/zcash_local_net/Cargo.toml index 1363523..a3e737f 100644 --- a/zcash_local_net/Cargo.toml +++ b/zcash_local_net/Cargo.toml @@ -18,7 +18,7 @@ zingo_common_components = { workspace = true } zingo_test_vectors = { workspace = true } # zcash -zcash_protocol = { version = "0.8", features = ["local-consensus"] } +zcash_protocol = { version = "0.9", features = ["local-consensus"] } # zebra zebra-node-services = { workspace = true } From 622c352253ae2ecdfdd0ede81395eed52750dd97 Mon Sep 17 00:00:00 2001 From: dorianvp Date: Wed, 3 Jun 2026 18:22:45 +0200 Subject: [PATCH 2/4] fix: format & public-types --- zcash_local_net/Cargo.toml | 1 + zcash_local_net/src/utils/executable_finder.rs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/zcash_local_net/Cargo.toml b/zcash_local_net/Cargo.toml index a3e737f..f68273f 100644 --- a/zcash_local_net/Cargo.toml +++ b/zcash_local_net/Cargo.toml @@ -50,4 +50,5 @@ allowed_external_types = [ "zingo_common_components::protocol::ActivationHeights", "zingo_common_components::protocol::NetworkType", "zebra_node_services::rpc_client::RpcRequestClient", + "reqwest::error::Error", ] diff --git a/zcash_local_net/src/utils/executable_finder.rs b/zcash_local_net/src/utils/executable_finder.rs index ebf1358..242832f 100644 --- a/zcash_local_net/src/utils/executable_finder.rs +++ b/zcash_local_net/src/utils/executable_finder.rs @@ -31,7 +31,9 @@ fn pick_path(executable_name: &str, trace_location: bool) -> Option { Some(path) } else { if trace_location { - tracing::info!("Could not find {executable_name} at {path:?} set by {environment_variable_path} environment variable."); + tracing::info!( + "Could not find {executable_name} at {path:?} set by {environment_variable_path} environment variable." + ); } None } From 15be2d3de8aff441cb680ba6be35ff6cdc76b97b Mon Sep 17 00:00:00 2001 From: dorianvp Date: Wed, 3 Jun 2026 18:49:04 +0200 Subject: [PATCH 3/4] feat: add mine-to-orchard --- zcash_local_net/src/validator/zebrad.rs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/zcash_local_net/src/validator/zebrad.rs b/zcash_local_net/src/validator/zebrad.rs index 5106a43..0283c99 100644 --- a/zcash_local_net/src/validator/zebrad.rs +++ b/zcash_local_net/src/validator/zebrad.rs @@ -15,7 +15,9 @@ use crate::{ }; use zcash_protocol::PoolType; use zingo_common_components::protocol::{ActivationHeights, NetworkType}; -use zingo_test_vectors::ZEBRAD_DEFAULT_MINER; +use zingo_test_vectors::{ + REG_O_ADDR_FROM_ABANDONART, REG_T_ADDR_FROM_ABANDONART, ZEBRAD_DEFAULT_MINER, +}; use std::{ net::{IpAddr, Ipv4Addr, SocketAddr}, @@ -138,11 +140,14 @@ impl ValidatorConfig for ZebradConfig { activation_heights: ActivationHeights, chain_cache: Option, ) { - assert_eq!( - mine_to_pool, - PoolType::Transparent, - "Zebra can only mine to transparent using this test infrastructure currently, but tried to set to {mine_to_pool}" - ); + self.miner_address = match mine_to_pool { + PoolType::ORCHARD => REG_O_ADDR_FROM_ABANDONART, + PoolType::Transparent => REG_T_ADDR_FROM_ABANDONART, + PoolType::SAPLING => { + panic!("zebrad does not support mining to a Sapling address; use ORCHARD or Transparent") + } + } + .to_string(); self.network_type = NetworkType::Regtest(activation_heights); self.chain_cache = chain_cache; } From 1ac4b0145d36c1e90ef3ab4ad2f54670af80692a Mon Sep 17 00:00:00 2001 From: dorianvp Date: Wed, 3 Jun 2026 19:54:29 +0200 Subject: [PATCH 4/4] fix: docs --- zcash_local_net/src/validator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zcash_local_net/src/validator.rs b/zcash_local_net/src/validator.rs index b839532..0eef02c 100644 --- a/zcash_local_net/src/validator.rs +++ b/zcash_local_net/src/validator.rs @@ -331,7 +331,7 @@ pub trait Validator: Process + Send + Sync + std::fmt:: /// Polls the chain until it reaches `target_height`. Default impl /// polls [`Self::get_chain_height`] every /// [`Self::CHAIN_POLL_INTERVAL`] via the shared - /// [`crate::poll::poll_until`] primitive, panicking after + /// `poll_until` primitive, panicking after /// [`Self::CHAIN_POLL_TIMEOUT`] elapses. Concrete validators should /// not override this method — only the constants. fn poll_chain_height(