Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2,548 changes: 1,630 additions & 918 deletions Cargo.lock

Large diffs are not rendered by default.

33 changes: 16 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,34 @@ members = [
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",
] }
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 @@ -71,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 @@ -92,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 @@ -107,7 +105,8 @@ 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", branch = "dev" }
zingo-infra-services = { path = "../../infrastructure/services" }

# Workspace
testvectors = { package = "zingo-testvectors", path = "zingo-testvectors" }
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
17 changes: 10 additions & 7 deletions darkside-tests/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ pub mod scenarios {
darkside_types::{RawTransaction, TreeState},
};
use testvectors::seeds::HOSPITAL_MUSEUM_SEED;
use zingolib::lightclient::LightClient;
use zingolib::testutils::scenarios::ClientBuilder;
use zingolib::{lightclient::LightClient, testutils::ZingolibLocalNetwork};

pub struct DarksideEnvironment {
lightwalletd: Lightwalletd,
Expand All @@ -345,12 +345,12 @@ pub mod scenarios {
let (lightwalletd, darkside_connector) = init_darksidewalletd(set_port).await.unwrap();
let client_builder =
ClientBuilder::new(darkside_connector.0.clone(), tempfile::tempdir().unwrap());
let activation_heights = ActivationHeights::default();
let activation_heights = ZingolibLocalNetwork::default();
DarksideEnvironment {
lightwalletd,
darkside_connector,
client_builder,
activation_heights,
activation_heights: activation_heights.into(),
faucet: None,
lightclients: vec![],
staged_blockheight: BlockHeight::from(1),
Expand Down Expand Up @@ -381,7 +381,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 +406,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::{testutils::ZingolibLocalNetwork, wallet::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,14 +9,14 @@ 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;
// use zingo_status::confirmation_status::ConfirmationStatus;
use zingolib::get_base_address_macro;
// use zingolib::testutils::chain_generics::conduct_chain::ConductChain as _;
// use zingolib::testutils::chain_generics::with_assertions::to_clients_proposal;
use zingolib::testutils::ZingolibLocalNetwork;
use zingolib::testutils::lightclient::from_inputs;
use zingolib::testutils::scenarios::ClientBuilder;
use zingolib::testutils::scenarios::LIGHTWALLETD_BIN;
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
Loading