Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d66f467
chore: update lrz crates
dorianvp Aug 21, 2025
52ebf68
chore: bump tonic & fix issues
dorianvp Aug 23, 2025
2146469
chore(deps): bump lrz crates
dorianvp Aug 24, 2025
b6ef9b3
chore: partial fixes for the new APIs
dorianvp Aug 24, 2025
85113fd
chore(deps): use `Zatoshis` instead of plain `u64`
dorianvp Aug 25, 2025
c852e68
chore(deps): remaining `Zatoshis` usages
dorianvp Aug 25, 2025
de89c59
chore: add some TODOs
dorianvp Aug 25, 2025
a7eff43
Merge branch 'dev' into deps/update-lrz-crates
dorianvp Aug 26, 2025
7a71dd0
chore: stop using `ActivationHeights`
dorianvp Aug 30, 2025
a7fb8b3
chore: migrate to `ZingolibLocalNetwork`
dorianvp Aug 30, 2025
f023c3c
fix: use `anchor_heights` in spendable note selection
dorianvp Aug 31, 2025
9f932ed
chore: temporal hack around `ActivationHeights`
dorianvp Sep 1, 2025
5be52b1
fix: NU 6.1 working
dorianvp Sep 6, 2025
d16bd9d
fix: `test-elevation` requirement for compilation removed
dorianvp Sep 10, 2025
070d419
build(deps): bump `infra-services` to `91a1125`
dorianvp Sep 11, 2025
3319aba
Merge branch 'dev' into deps/update-lrz-crates
dorianvp Sep 11, 2025
30848c6
format: `cargo-fmt`
dorianvp Sep 11, 2025
6c1ffd6
format: run `clippy`
dorianvp Sep 11, 2025
b47e331
format: `cargo-fmt`
dorianvp Sep 11, 2025
d74620b
chore: remove unnecessary conversion
dorianvp Sep 11, 2025
9323859
chore: remove `ZatBalance` comment
dorianvp Sep 11, 2025
1e9f8c5
Merge branch 'dev' into deps/update-lrz-crates
dorianvp Sep 11, 2025
aca598e
build(docker): update `lwd` and `zcashd`
dorianvp Sep 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,571 changes: 866 additions & 705 deletions Cargo.lock

Large diffs are not rendered by default.

35 changes: 15 additions & 20 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,38 @@ members = [
"pepper-sync",
"zingo-testvectors",
"zingo-price",
"tower_service",
]
resolver = "2"

[workspace.dependencies]
bip0039 = { version = "0.12", features = [ "rand" ] }
bip0039 = { version = "0.12", features = ["rand"] }
bip32 = { version = "0.6.0-pre.1", default-features = false }

zip32 = "0.2.0"
orchard = "0.11.0"
sapling-crypto = "0.5.0"
incrementalmerkletree = "0.8.2"
shardtree = "0.6.1"
zcash_address = "0.7.0"
zcash_client_backend = { version = "0.18.1", features = [
zcash_address = { git = "https://github.com/zcash/librustzcash", rev = "d387aed7e04e881dbe30c6ff8b26a96c834c094b" }
zcash_client_backend = { git = "https://github.com/zcash/librustzcash", rev = "d387aed7e04e881dbe30c6ff8b26a96c834c094b", features = [
"lightwalletd-tonic",
"orchard",
"transparent-inputs",
"tor",
] }
lightwallet-protocol = { git = "https://github.com/zingolabs/lightwallet-protocol-rust.git", branch = "main" }
zcash_encoding = "0.3.0"
zcash_keys = { version = "0.8.0", features = [
zcash_encoding = { git = "https://github.com/zcash/librustzcash", rev = "d387aed7e04e881dbe30c6ff8b26a96c834c094b" }
zcash_keys = { git = "https://github.com/zcash/librustzcash", rev = "d387aed7e04e881dbe30c6ff8b26a96c834c094b", features = [
"transparent-inputs",
"sapling",
"orchard",
] }
zcash_note_encryption = "0.4.1"
zcash_primitives = "0.22.1"
zcash_proofs = "0.22.0"
zcash_protocol = "=0.5.1"
zcash_transparent = "0.2.3"
zcash_primitives = { git = "https://github.com/zcash/librustzcash", rev = "d387aed7e04e881dbe30c6ff8b26a96c834c094b" }
zcash_proofs = { git = "https://github.com/zcash/librustzcash", rev = "d387aed7e04e881dbe30c6ff8b26a96c834c094b" }
zcash_protocol = { git = "https://github.com/zcash/librustzcash", rev = "d387aed7e04e881dbe30c6ff8b26a96c834c094b", features = [
"local-consensus",
] }
zcash_transparent = { git = "https://github.com/zcash/librustzcash", rev = "d387aed7e04e881dbe30c6ff8b26a96c834c094b" }

append-only-vec = "0.1.7"
bech32 = "0.11.0"
Expand Down Expand Up @@ -73,7 +73,7 @@ log4rs = "1"
memuse = "0.2"
nonempty = "0.11.0"
portpicker = "0.1"
proptest = "1"
proptest = "1.6.0"
prost = "0.13"
rand = "0.8"
reqwest = { version = "0.12.15", default-features = false }
Expand All @@ -94,12 +94,8 @@ tempfile = "3"
thiserror = "2"
tokio = "1"
tokio-rustls = "0.26"
tonic = { version = "0.12", features = [
"tls",
"tls-roots",
"tls-webpki-roots",
] }
tonic-build = "0.12"
tonic = { version = "0.13", features = ["tls-webpki-roots"] }
tonic-build = "0.13"
tower = { version = "0.5" }
tracing = "0.1"
tracing-subscriber = "0.3"
Expand All @@ -109,7 +105,7 @@ crossbeam-channel = "0.5"
rayon = "1"

# Zingolabs
zingo-infra-services = { git = "https://github.com/zingolabs/infrastructure.git", branch = "dev" }
zingo-infra-services = { git = "https://github.com/zingolabs/infrastructure.git", rev = "91a1125a328edbbe459c16acb18b2f7e22008b28" }

# Workspace
testvectors = { package = "zingo-testvectors", path = "zingo-testvectors" }
Expand All @@ -119,7 +115,6 @@ zingo-price = { path = "zingo-price" }
zingo-status = { path = "zingo-status" }
pepper-sync = { path = "pepper-sync" }
zingolib = { path = "zingolib" }
tower_service = { path = "tower_service" }
webpki-roots = "0.25"

[profile.test]
Expand Down
4 changes: 2 additions & 2 deletions darkside-tests/src/chain_generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub(crate) mod conduct_chain {
.await;
let config = self
.client_builder
.make_unique_data_dir_and_load_config(self.activation_heights);
.make_unique_data_dir_and_load_config(self.activation_heights.into());
let mut lightclient = LightClient::create_from_wallet(
LightWallet::new(
config.chain,
Expand All @@ -100,7 +100,7 @@ pub(crate) mod conduct_chain {

fn zingo_config(&mut self) -> zingolib::config::ZingoConfig {
self.client_builder
.make_unique_data_dir_and_load_config(self.activation_heights)
.make_unique_data_dir_and_load_config(self.activation_heights.into())
}

async fn bump_chain(&mut self) {
Expand Down
2 changes: 1 addition & 1 deletion darkside-tests/src/darkside_connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl DarksideConnector {
let uri = uri.clone();
let svc = tower::ServiceBuilder::new()
//Here, we take all the pieces of our uri, and add in the path from the Requests's uri
.map_request(move |mut req: http::Request<tonic::body::BoxBody>| {
.map_request(move |mut req: http::Request<tonic::body::Body>| {
let uri = Uri::builder()
.scheme(uri.scheme().unwrap().clone())
.authority(uri.authority().unwrap().clone())
Expand Down
16 changes: 10 additions & 6 deletions darkside-tests/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use zcash_primitives::{merkle_tree::read_commitment_tree, transaction::Transacti
use zingo_infra_services::{
indexer::{Indexer, Lightwalletd, LightwalletdConfig},
network::localhost_uri,
utils::ExecutableLocation,
};

use super::{
Expand All @@ -28,7 +29,7 @@ use crate::{
};
use zingolib::testutils::paths::get_cargo_manifest_dir;

const LIGHTWALLETD_BIN: Option<PathBuf> = None;
const LIGHTWALLETD_BIN: Option<ExecutableLocation> = None;

pub async fn prepare_darksidewalletd(
uri: http::Uri,
Expand Down Expand Up @@ -213,7 +214,7 @@ pub async fn init_darksidewalletd(
set_port: Option<portpicker::Port>,
) -> Result<(Lightwalletd, DarksideConnector), String> {
let lightwalletd = Lightwalletd::launch(LightwalletdConfig {
lightwalletd_bin: LIGHTWALLETD_BIN,
lightwalletd_bin: LIGHTWALLETD_BIN.unwrap(), // TODO: What should we do if there's no binary?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes coming from the new ExecutableLocation type. What should we do if there's no binary?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use an "expect" with a message stating that these "Full Stack" tests require an indexer_bin.

listen_port: set_port,
zcashd_conf: PathBuf::new(),
darkside: true,
Expand Down Expand Up @@ -381,7 +382,7 @@ pub mod scenarios {
testvectors::seeds::DARKSIDE_SEED.to_string(),
0,
true,
self.activation_heights,
self.activation_heights.into(),
));

let faucet_funding_transaction = match funded_pool {
Expand All @@ -406,9 +407,12 @@ pub mod scenarios {
seed: String,
birthday: u64,
) -> &mut DarksideEnvironment {
let lightclient =
self.client_builder
.build_client(seed, birthday, true, self.activation_heights);
let lightclient = self.client_builder.build_client(
seed,
birthday,
true,
self.activation_heights.into(),
);
self.lightclients.push(lightclient);
self
}
Expand Down
16 changes: 8 additions & 8 deletions darkside-tests/tests/advanced_reorg_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ use tokio::time::sleep;
use zcash_primitives::consensus::BlockHeight;
use zingo_infra_services::{
indexer::{Indexer, Lightwalletd, LightwalletdConfig},
network::{ActivationHeights, localhost_uri},
network::localhost_uri,
};
use zingolib::wallet::summary::data::ValueTransferKind;
use zingolib::wallet::{network::ZingolibLocalNetwork, summary::data::ValueTransferKind};
use zingolib::{testutils::scenarios::LIGHTWALLETD_BIN, wallet::summary::data::SentValueTransfer};
use zingolib::{
testutils::{
Expand Down Expand Up @@ -51,7 +51,7 @@ async fn reorg_changes_incoming_tx_height() {
ADVANCED_REORG_TESTS_USER_WALLET.to_string(),
202,
true,
ActivationHeights::default(),
ZingolibLocalNetwork::default(),
);

light_client.sync_and_await().await.unwrap();
Expand Down Expand Up @@ -215,7 +215,7 @@ async fn reorg_changes_incoming_tx_index() {
ADVANCED_REORG_TESTS_USER_WALLET.to_string(),
202,
true,
ActivationHeights::default(),
ZingolibLocalNetwork::default(),
);

light_client.sync_and_await().await.unwrap();
Expand Down Expand Up @@ -379,7 +379,7 @@ async fn reorg_expires_incoming_tx() {
ADVANCED_REORG_TESTS_USER_WALLET.to_string(),
202,
true,
ActivationHeights::default(),
ZingolibLocalNetwork::default(),
);

light_client.sync_and_await().await.unwrap();
Expand Down Expand Up @@ -565,7 +565,7 @@ async fn reorg_changes_outgoing_tx_height() {
ADVANCED_REORG_TESTS_USER_WALLET.to_string(),
202,
true,
ActivationHeights::default(),
ZingolibLocalNetwork::default(),
);

light_client.sync_and_await().await.unwrap();
Expand Down Expand Up @@ -826,7 +826,7 @@ async fn reorg_expires_outgoing_tx_height() {
ADVANCED_REORG_TESTS_USER_WALLET.to_string(),
202,
true,
ActivationHeights::default(),
ZingolibLocalNetwork::default(),
);

let expected_initial_balance = AccountBalance {
Expand Down Expand Up @@ -1032,7 +1032,7 @@ async fn reorg_changes_outgoing_tx_index() {
ADVANCED_REORG_TESTS_USER_WALLET.to_string(),
202,
true,
ActivationHeights::default(),
ZingolibLocalNetwork::default(),
);

light_client.sync_and_await().await.unwrap();
Expand Down
8 changes: 4 additions & 4 deletions darkside-tests/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use testvectors::seeds::DARKSIDE_SEED;
use zingo_infra_services::indexer::Indexer;
use zingo_infra_services::indexer::Lightwalletd;
use zingo_infra_services::indexer::LightwalletdConfig;
use zingo_infra_services::network::ActivationHeights;
use zingo_infra_services::network::localhost_uri;
// use zcash_client_backend::PoolType::Shielded;
// use zcash_client_backend::ShieldedProtocol::Orchard;
Expand All @@ -21,6 +20,7 @@ use zingolib::testutils::lightclient::from_inputs;
use zingolib::testutils::scenarios::ClientBuilder;
use zingolib::testutils::scenarios::LIGHTWALLETD_BIN;
use zingolib::wallet::balance::AccountBalance;
use zingolib::wallet::network::ZingolibLocalNetwork;

#[ignore = "darkside bug, invalid block hash length in tree states"]
#[tokio::test]
Expand All @@ -37,7 +37,7 @@ async fn simple_sync() {
prepare_darksidewalletd(server_id.clone(), true)
.await
.unwrap();
let activation_heights = ActivationHeights::default();
let activation_heights = ZingolibLocalNetwork::default();
let wallet_dir = TempDir::new().unwrap();
let mut light_client = ClientBuilder::new(server_id, wallet_dir).build_client(
DARKSIDE_SEED.to_string(),
Expand Down Expand Up @@ -87,7 +87,7 @@ async fn reorg_receipt_sync_generic() {
.await
.unwrap();

let activation_heights = ActivationHeights::default();
let activation_heights = ZingolibLocalNetwork::default();
let wallet_dir = TempDir::new().unwrap();
let mut light_client = ClientBuilder::new(server_id.clone(), wallet_dir).build_client(
DARKSIDE_SEED.to_string(),
Expand Down Expand Up @@ -155,7 +155,7 @@ async fn sent_transaction_reorged_into_mempool() {

let wallet_dir = TempDir::new().unwrap();
let mut client_manager = ClientBuilder::new(server_id.clone(), wallet_dir);
let activation_heights = ActivationHeights::default();
let activation_heights = ZingolibLocalNetwork::default();
let mut light_client =
client_manager.build_client(DARKSIDE_SEED.to_string(), 0, true, activation_heights);
let mut recipient = client_manager.build_client(
Expand Down
3 changes: 1 addition & 2 deletions docker-ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:bookworm-slim AS builder
FROM debian:trixie-slim AS builder

WORKDIR /usr/src

Expand All @@ -21,7 +21,6 @@ RUN apt update \
curl \
bsdmainutils \
automake \
libtinfo5 \
golang \
ca-certificates \
&& update-ca-certificates
Expand Down
Loading
Loading