From 508e2900885139479af25296f3aa7a95263f74c4 Mon Sep 17 00:00:00 2001 From: zancas Date: Tue, 2 Apr 2024 18:22:33 -0600 Subject: [PATCH] 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 a56bd3317..bdde85f12 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 1189662e7..e2c1352e8 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 f7eaec16b..a8ea138fa 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 a3ed9c46f..cd1f72d81 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 5db19377a..246641c22 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 288041876..b62c7b36d 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 d981b29e4..f02a44f86 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};