From 42c802ff38e3b29ee4c8d3130763f35f28667ff5 Mon Sep 17 00:00:00 2001 From: zancas Date: Tue, 2 Apr 2024 13:33:48 -0600 Subject: [PATCH 1/3] make http unify as workspace dep --- zingo-testutils/Cargo.toml | 2 +- zingoconfig/Cargo.toml | 2 +- zingolib/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/zingo-testutils/Cargo.toml b/zingo-testutils/Cargo.toml index 770757c455..a7f90ae75e 100644 --- a/zingo-testutils/Cargo.toml +++ b/zingo-testutils/Cargo.toml @@ -25,7 +25,7 @@ incrementalmerkletree = { workspace = true } json = "0.12.4" log = "0.4.19" tokio = "1.28.2" -http = "0.2.4" +http.workspace = true tonic = { workspace = true, optional = true } tracing = "0.1.37" serde_json = "1.0.100" diff --git a/zingoconfig/Cargo.toml b/zingoconfig/Cargo.toml index 2f9b7e3284..7b57c93474 100644 --- a/zingoconfig/Cargo.toml +++ b/zingoconfig/Cargo.toml @@ -11,5 +11,5 @@ zcash_primitives = { workspace = true } log4rs = "1.1.1" log = "0.4.14" -http = "0.2.4" +http.workspace = true dirs = "5.0" diff --git a/zingolib/Cargo.toml b/zingolib/Cargo.toml index 395ca65e08..5db19377a9 100644 --- a/zingolib/Cargo.toml +++ b/zingolib/Cargo.toml @@ -39,7 +39,7 @@ zcash_proofs = { workspace = true } append-only-vec = { git = "https://github.com/zancas/append-only-vec.git", branch = "add_debug_impl" } log = "0.4.14" -http = "0.2.4" +http.workspace = true log4rs = "1.1.1" base64 = "0.13.0" bytes = "0.4" From f3cc5de3280a656836aeba575d6c9b70970d7ab9 Mon Sep 17 00:00:00 2001 From: zancas Date: Tue, 2 Apr 2024 13:48:20 -0600 Subject: [PATCH 2/3] update Cargo.lock --- Cargo.lock | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4104cfcd20..a56bd33175 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -189,7 +189,7 @@ dependencies = [ "bitflags 1.3.2", "bytes 1.6.0", "futures-util", - "http", + "http 0.2.12", "http-body", "hyper", "itoa", @@ -215,7 +215,7 @@ dependencies = [ "async-trait", "bytes 1.6.0", "futures-util", - "http", + "http 0.2.12", "http-body", "mime", "rustversion", @@ -655,7 +655,7 @@ dependencies = [ "env_logger", "futures-util", "hex 0.3.2", - "http", + "http 1.1.0", "http-body", "hyper", "itertools 0.10.5", @@ -1100,7 +1100,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.12", "indexmap 2.2.6", "slab", "tokio", @@ -1226,6 +1226,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes 1.6.0", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -1233,7 +1244,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes 1.6.0", - "http", + "http 0.2.12", "pin-project-lite", ] @@ -1272,7 +1283,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "httparse", "httpdate", @@ -1291,7 +1302,7 @@ version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" dependencies = [ - "http", + "http 0.2.12", "hyper", "log", "rustls 0.20.9", @@ -2408,7 +2419,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "hyper", "hyper-tls", @@ -3217,7 +3228,7 @@ dependencies = [ "base64 0.21.7", "bytes 1.6.0", "h2", - "http", + "http 0.2.12", "http-body", "hyper", "hyper-timeout", @@ -3280,7 +3291,7 @@ dependencies = [ "bytes 1.6.0", "futures-core", "futures-util", - "http", + "http 0.2.12", "http-body", "http-range-header", "pin-project-lite", @@ -4025,7 +4036,7 @@ version = "0.2.0" dependencies = [ "clap", "futures", - "http", + "http 1.1.0", "hyper-rustls", "json", "log", @@ -4065,7 +4076,7 @@ name = "zingo-testutils" version = "0.1.0" dependencies = [ "futures", - "http", + "http 1.1.0", "incrementalmerkletree", "json", "log", @@ -4098,7 +4109,7 @@ name = "zingoconfig" version = "0.1.0" dependencies = [ "dirs", - "http", + "http 1.1.0", "log", "log4rs", "zcash_address", @@ -4125,7 +4136,7 @@ dependencies = [ "futures", "group", "hex 0.3.2", - "http", + "http 1.1.0", "http-body", "hyper", "hyper-rustls", From 508e2900885139479af25296f3aa7a95263f74c4 Mon Sep 17 00:00:00 2001 From: zancas Date: Tue, 2 Apr 2024 18:22:33 -0600 Subject: [PATCH 3/3] remove direct dependence on bip0039, prefer zcash_primitives::zip339 instead --- Cargo.lock | 46 +++++++++---------------- darkside-tests/Cargo.toml | 1 - integration-tests/Cargo.toml | 1 - integration-tests/tests/integrations.rs | 2 +- zingolib/Cargo.toml | 1 - zingolib/src/wallet.rs | 2 +- zingolib/src/wallet/keys/unified.rs | 2 +- 7 files changed, 19 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a56bd33175..bdde85f127 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -189,7 +189,7 @@ dependencies = [ "bitflags 1.3.2", "bytes 1.6.0", "futures-util", - "http 0.2.12", + "http", "http-body", "hyper", "itoa", @@ -215,7 +215,7 @@ dependencies = [ "async-trait", "bytes 1.6.0", "futures-util", - "http 0.2.12", + "http", "http-body", "mime", "rustversion", @@ -651,11 +651,10 @@ name = "darkside-tests" version = "0.1.0" dependencies = [ "bech32", - "bip0039", "env_logger", "futures-util", "hex 0.3.2", - "http 1.1.0", + "http", "http-body", "hyper", "itertools 0.10.5", @@ -1100,7 +1099,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http 0.2.12", + "http", "indexmap 2.2.6", "slab", "tokio", @@ -1226,17 +1225,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes 1.6.0", - "fnv", - "itoa", -] - [[package]] name = "http-body" version = "0.4.6" @@ -1244,7 +1232,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes 1.6.0", - "http 0.2.12", + "http", "pin-project-lite", ] @@ -1283,7 +1271,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http 0.2.12", + "http", "http-body", "httparse", "httpdate", @@ -1302,7 +1290,7 @@ version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" dependencies = [ - "http 0.2.12", + "http", "hyper", "log", "rustls 0.20.9", @@ -1420,7 +1408,6 @@ dependencies = [ name = "integration-tests" version = "0.2.0" dependencies = [ - "bip0039", "hex 0.3.2", "itertools 0.10.5", "json", @@ -2419,7 +2406,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http 0.2.12", + "http", "http-body", "hyper", "hyper-tls", @@ -2950,9 +2937,9 @@ checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" [[package]] name = "strsim" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" @@ -3228,7 +3215,7 @@ dependencies = [ "base64 0.21.7", "bytes 1.6.0", "h2", - "http 0.2.12", + "http", "http-body", "hyper", "hyper-timeout", @@ -3291,7 +3278,7 @@ dependencies = [ "bytes 1.6.0", "futures-core", "futures-util", - "http 0.2.12", + "http", "http-body", "http-range-header", "pin-project-lite", @@ -4036,7 +4023,7 @@ version = "0.2.0" dependencies = [ "clap", "futures", - "http 1.1.0", + "http", "hyper-rustls", "json", "log", @@ -4076,7 +4063,7 @@ name = "zingo-testutils" version = "0.1.0" dependencies = [ "futures", - "http 1.1.0", + "http", "incrementalmerkletree", "json", "log", @@ -4109,7 +4096,7 @@ name = "zingoconfig" version = "0.1.0" dependencies = [ "dirs", - "http 1.1.0", + "http", "log", "log4rs", "zcash_address", @@ -4124,7 +4111,6 @@ dependencies = [ "base58", "base64 0.13.1", "bech32", - "bip0039", "bls12_381", "build_utils", "byteorder", @@ -4136,7 +4122,7 @@ dependencies = [ "futures", "group", "hex 0.3.2", - "http 1.1.0", + "http", "http-body", "hyper", "hyper-rustls", diff --git a/darkside-tests/Cargo.toml b/darkside-tests/Cargo.toml index 1189662e77..e2c1352e86 100644 --- a/darkside-tests/Cargo.toml +++ b/darkside-tests/Cargo.toml @@ -28,7 +28,6 @@ rand = "0.8.5" hex = "0.3" tracing-subscriber = "0.3.15" itertools = "0.10.5" -bip0039 = "0.10.1" tracing-test = { version = "0.2.4", features = ["no-env-filter"] } tracing = "0.1.37" tracing-log = "0.1.3" diff --git a/integration-tests/Cargo.toml b/integration-tests/Cargo.toml index f7eaec16b2..a8ea138fa1 100644 --- a/integration-tests/Cargo.toml +++ b/integration-tests/Cargo.toml @@ -20,5 +20,4 @@ json = "0.12.4" log = "0.4.17" hex = "0.3" itertools = "0.10.5" -bip0039 = "0.10.1" serde_json = "1.0.107" diff --git a/integration-tests/tests/integrations.rs b/integration-tests/tests/integrations.rs index a3ed9c46fb..cd1f72d81a 100644 --- a/integration-tests/tests/integrations.rs +++ b/integration-tests/tests/integrations.rs @@ -1,6 +1,5 @@ #![forbid(unsafe_code)] -use bip0039::Mnemonic; use json::JsonValue; use orchard::tree::MerkleHashOrchard; use shardtree::store::memory::MemoryShardStore; @@ -8,6 +7,7 @@ use shardtree::ShardTree; use std::{fs::File, path::Path, str::FromStr, time::Duration}; use zcash_address::unified::Fvk; use zcash_client_backend::encoding::encode_payment_address; +use zcash_primitives::zip339::Mnemonic; use zcash_primitives::{ consensus::{BlockHeight, Parameters}, memo::Memo, diff --git a/zingolib/Cargo.toml b/zingolib/Cargo.toml index 5db19377a9..246641c22d 100644 --- a/zingolib/Cargo.toml +++ b/zingolib/Cargo.toml @@ -63,7 +63,6 @@ ripemd160 = "0.9.1" sha2 = "0.9.5" base58 = "0.1.0" bech32 = "0.9.0" -bip0039 = "0.10.1" sodiumoxide = "0.2.5" byteorder = "1" pairing = "0.23" diff --git a/zingolib/src/wallet.rs b/zingolib/src/wallet.rs index 2880418762..b62c7b36d2 100644 --- a/zingolib/src/wallet.rs +++ b/zingolib/src/wallet.rs @@ -4,7 +4,6 @@ use crate::blaze::fetch_full_transaction::TransactionContext; use crate::wallet::data::{SpendableSaplingNote, TransactionRecord}; use crate::wallet::notes::ShieldedNoteInterface; -use bip0039::Mnemonic; use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt}; use futures::Future; use json::JsonValue; @@ -36,6 +35,7 @@ use zcash_primitives::sapling::SaplingIvk; use zcash_primitives::transaction::builder::Progress; use zcash_primitives::transaction::fees::fixed::FeeRule as FixedFeeRule; use zcash_primitives::transaction::{self, Transaction}; +use zcash_primitives::zip339::Mnemonic; use zcash_primitives::{ consensus::BlockHeight, legacy::Script, diff --git a/zingolib/src/wallet/keys/unified.rs b/zingolib/src/wallet/keys/unified.rs index d981b29e40..f02a44f86a 100644 --- a/zingolib/src/wallet/keys/unified.rs +++ b/zingolib/src/wallet/keys/unified.rs @@ -6,9 +6,9 @@ use std::{ }; use append_only_vec::AppendOnlyVec; -use bip0039::Mnemonic; use byteorder::{ReadBytesExt, WriteBytesExt}; use orchard::keys::Scope; +use zcash_primitives::zip339::Mnemonic; use secp256k1::SecretKey; use zcash_address::unified::{Container, Encoding, Fvk, Ufvk};