From 36366cfc4ab1439cef83939722a63c8106b0a447 Mon Sep 17 00:00:00 2001 From: Dimitris Apostolou Date: Fri, 8 Mar 2024 22:42:47 +0200 Subject: [PATCH 01/44] Fix RUSTSEC-2024-0019 (cherry picked from commit cd99cd426456adefab53d5230075ca345998b4f4) --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 33e8796663..5178834f92 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1686,9 +1686,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi", From 30d0b67c1e472c1a628f3451ef13a690e8a812c3 Mon Sep 17 00:00:00 2001 From: zancas Date: Mon, 11 Mar 2024 13:25:43 -0600 Subject: [PATCH 02/44] set to latest stable --- rust-toolchain.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 76958aec02..1eb4605782 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.75.0" +channel = "1.76.0" components = [ "clippy", "rustfmt" ] From 6dd88f043c4fff875cf0f5545a16b714b160f504 Mon Sep 17 00:00:00 2001 From: Oscar Pepper Date: Fri, 15 Mar 2024 12:54:44 +0000 Subject: [PATCH 03/44] remove fakemainnet --- zingoconfig/src/lib.rs | 13 +++++-------- zingolib/src/commands.rs | 1 - zingolib/src/lightclient.rs | 6 +++--- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/zingoconfig/src/lib.rs b/zingoconfig/src/lib.rs index b7b82abbc3..1229a4783a 100644 --- a/zingoconfig/src/lib.rs +++ b/zingoconfig/src/lib.rs @@ -287,7 +287,6 @@ impl ZingoConfig { ChainType::Testnet => zcash_data_location.push("testnet3"), ChainType::Regtest(_) => zcash_data_location.push("regtest"), ChainType::Mainnet => {} - ChainType::FakeMainnet => zcash_data_location.push("fakemainnet"), }; } @@ -430,7 +429,7 @@ impl ZingoConfig { #[deprecated(since = "0.1.0", note = "prefix not known to be used")] pub fn base58_secretkey_prefix(&self) -> [u8; 1] { match self.chain { - ChainType::Testnet | ChainType::Regtest(_) | ChainType::FakeMainnet => [0xEF], + ChainType::Testnet | ChainType::Regtest(_) => [0xEF], ChainType::Mainnet => [0x80], } } @@ -440,24 +439,24 @@ pub enum ChainType { Testnet, Regtest(RegtestNetwork), Mainnet, - FakeMainnet, } impl ChainType { + #[deprecated(since = "0.1.0", note = "prefix not known to be used")] pub fn hrp_orchard_spending_key(&self) -> &str { match self { ChainType::Testnet => "secret-orchard-sk-test", ChainType::Regtest(_) => "secret-orchard-sk-regtest", ChainType::Mainnet => "secret-orchard-sk-main", - ChainType::FakeMainnet => "secret-orchard-sk-main", } } + + #[deprecated(since = "0.1.0", note = "prefix not known to be used")] pub fn hrp_unified_full_viewing_key(&self) -> &str { match self { ChainType::Testnet => "uviewtest", ChainType::Regtest(_) => "uviewregtest", ChainType::Mainnet => "uview", - ChainType::FakeMainnet => "uview", } } } @@ -469,7 +468,6 @@ impl std::fmt::Display for ChainType { Testnet => "test", Regtest(_) => "regtest", Mainnet => "main", - FakeMainnet => "fakemainnet", }; write!(f, "{name}") } @@ -479,7 +477,7 @@ impl Parameters for ChainType { fn network_type(&self) -> NetworkType { use ChainType::*; match self { - Mainnet | FakeMainnet => NetworkType::Main, + Mainnet => NetworkType::Main, Testnet => NetworkType::Test, Regtest(_) => NetworkType::Regtest, } @@ -491,7 +489,6 @@ impl Parameters for ChainType { Mainnet => MAIN_NETWORK.activation_height(nu), Testnet => TEST_NETWORK.activation_height(nu), Regtest(regtest_network) => regtest_network.activation_height(nu), - FakeMainnet => Some(BlockHeight::from_u32(1)), } } } diff --git a/zingolib/src/commands.rs b/zingolib/src/commands.rs index 35982cf759..c8dde7bbce 100644 --- a/zingolib/src/commands.rs +++ b/zingolib/src/commands.rs @@ -192,7 +192,6 @@ impl Command for ParseAddressCommand { zingoconfig::ChainType::Mainnet => "main", zingoconfig::ChainType::Testnet => "test", zingoconfig::ChainType::Regtest(_) => "regtest", - zingoconfig::ChainType::FakeMainnet => unreachable!(), }; match recipient_address { diff --git a/zingolib/src/lightclient.rs b/zingolib/src/lightclient.rs index f183ab0ef8..856a53e39f 100644 --- a/zingolib/src/lightclient.rs +++ b/zingolib/src/lightclient.rs @@ -2243,11 +2243,10 @@ async fn get_recent_median_price_from_gemini() -> Result { } #[cfg(test)] -#[cfg(feature = "test-features")] mod tests { use tokio::runtime::Runtime; use zingo_testvectors::seeds::CHIMNEY_BETTER_SEED; - use zingoconfig::{ChainType, ZingoConfig}; + use zingoconfig::{ChainType, RegtestNetwork, ZingoConfig}; use crate::{lightclient::LightClient, wallet::WalletBase}; @@ -2260,7 +2259,8 @@ mod tests { .expect("This path is available."); let wallet_name = data_dir.join("zingo-wallet.dat"); - let config = ZingoConfig::build(ChainType::FakeMainnet) + let regtest_network = RegtestNetwork::all_upgrades_active(); + let config = ZingoConfig::build(ChainType::Regtest(regtest_network)) .set_wallet_dir(data_dir) .create(); let lc = LightClient::create_from_wallet_base( From d1a8a0889cc7ca02e26ea9e690b6e9c66137eb3c Mon Sep 17 00:00:00 2001 From: Oscar Pepper Date: Fri, 22 Mar 2024 14:56:15 +0000 Subject: [PATCH 04/44] fixed failing test --- zingolib/src/lightclient.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zingolib/src/lightclient.rs b/zingolib/src/lightclient.rs index 856a53e39f..b02fc5ae89 100644 --- a/zingolib/src/lightclient.rs +++ b/zingolib/src/lightclient.rs @@ -2295,12 +2295,12 @@ mod tests { Runtime::new().unwrap().block_on(async move { let addresses = lc.do_addresses().await; assert_eq!( - "zs1q6xk3q783t5k92kjqt2rkuuww8pdw2euzy5rk6jytw97enx8fhpazdv3th4xe7vsk6e9sfpawfg" + "zregtestsapling1etnl5s47cqves0g5hk2dx5824rme4xv4aeauwzp4d6ys3qxykt5sw5rnaqh9syxry8vgxr7x3x4" .to_string(), addresses[0]["receivers"]["sapling"] ); assert_eq!( - "t1eQ63fwkQ4n4Eo5uCrPGaAV8FWB2tmx7ui", + "tmYd5GP6JxUxTUcz98NLPumEotvaMPaXytz".to_string(), addresses[0]["receivers"]["transparent"] ); }); From fe15c2914c4ce0c1e8d8737136123bdd13a9d7e0 Mon Sep 17 00:00:00 2001 From: Oscar Pepper Date: Fri, 22 Mar 2024 15:44:58 +0000 Subject: [PATCH 05/44] remove unused TransactionIndex --- zingolib/src/wallet/data.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/zingolib/src/wallet/data.rs b/zingolib/src/wallet/data.rs index 647644f46f..db87fdc419 100644 --- a/zingolib/src/wallet/data.rs +++ b/zingolib/src/wallet/data.rs @@ -697,8 +697,6 @@ pub mod summaries { } } } - - pub struct TransactionIndex(HashMap); } pub use crate::wallet::transaction_record::TransactionRecord; From 08f18646df25990833abe966787b536f543ad112 Mon Sep 17 00:00:00 2001 From: Oscar Pepper Date: Fri, 22 Mar 2024 16:10:31 +0000 Subject: [PATCH 06/44] remove unused import --- zingolib/src/wallet/data.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/zingolib/src/wallet/data.rs b/zingolib/src/wallet/data.rs index db87fdc419..eccb0ad48d 100644 --- a/zingolib/src/wallet/data.rs +++ b/zingolib/src/wallet/data.rs @@ -573,8 +573,6 @@ pub mod finsight { } } pub mod summaries { - use std::collections::HashMap; - use json::{object, JsonValue}; use zcash_primitives::transaction::TxId; From f08e3b7ea38210288c38d0d7f4aeb038f6fd9fd9 Mon Sep 17 00:00:00 2001 From: zancas Date: Fri, 22 Mar 2024 11:24:43 -0600 Subject: [PATCH 07/44] update toolchain to rust 1.77 --- rust-toolchain.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 1eb4605782..0314e2f5e4 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.76.0" +channel = "1.77.0" components = [ "clippy", "rustfmt" ] From 8d92a2a7a9c862f4d79f2154d1a575a16adb2113 Mon Sep 17 00:00:00 2001 From: zancas Date: Fri, 22 Mar 2024 11:25:34 -0600 Subject: [PATCH 08/44] run cargo update --- Cargo.lock | 102 ++++++++++++++++++++++++++--------------------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f1e2b65856..499afbf7b9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -40,9 +40,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -158,18 +158,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -225,9 +225,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "95d8e92cac0961e91dbd517496b00f7e9b92363dbe6d42c3198268323798860c" dependencies = [ "addr2line", "cc", @@ -326,9 +326,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bitvec" @@ -397,9 +397,9 @@ dependencies = [ [[package]] name = "bs58" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" dependencies = [ "sha2 0.10.8", "tinyvec", @@ -507,9 +507,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.2" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b230ab84b0ffdf890d5a10abdbc8b83ae1c4918275daea1ab8801f71536b2651" +checksum = "949626d00e063efc93b6dca932419ceb5432f99769911c0b995f7e884c778813" dependencies = [ "clap_builder", ] @@ -556,7 +556,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f76990911f2267d837d9d0ad060aa63aaad170af40904b29461734c339030d4d" dependencies = [ "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1025,7 +1025,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1099,9 +1099,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" dependencies = [ "bytes 1.5.0", "fnv", @@ -1541,7 +1541,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "libc", "redox_syscall", ] @@ -1838,7 +1838,7 @@ version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cfg-if", "foreign-types", "libc", @@ -1855,7 +1855,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2022,7 +2022,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2082,7 +2082,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" dependencies = [ "proc-macro2", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2102,7 +2102,7 @@ checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.4.2", + "bitflags 2.5.0", "lazy_static", "num-traits", "rand 0.8.5", @@ -2141,7 +2141,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.52", + "syn 2.0.53", "tempfile", "which", ] @@ -2156,7 +2156,7 @@ dependencies = [ "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2401,9 +2401,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.26" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78bf93c4af7a8bb7d879d51cebe797356ff10ae8516ace542b5182d9dcac10b2" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64 0.21.7", "bytes 1.5.0", @@ -2509,7 +2509,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.52", + "syn 2.0.53", "walkdir", ] @@ -2540,11 +2540,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys", @@ -2802,7 +2802,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2830,9 +2830,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.32" +version = "0.9.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd075d994154d4a774f95b51fb96bdc2832b0ea48425c92546073816cda1f2f" +checksum = "a0623d197252096520c6f2a5e1171ee436e5af99a5d7caa2891e55e61950e6d9" dependencies = [ "indexmap 2.2.5", "itoa", @@ -2880,7 +2880,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbf20c7a2747d9083092e3a3eeb9a7ed75577ae364896bebbc5e0bdcd4e97735" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "either", "incrementalmerkletree", "tracing", @@ -2922,9 +2922,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" @@ -2997,9 +2997,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" dependencies = [ "proc-macro2", "quote", @@ -3087,7 +3087,7 @@ checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3181,7 +3181,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3282,7 +3282,7 @@ dependencies = [ "proc-macro2", "prost-build", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3355,7 +3355,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3524,9 +3524,9 @@ dependencies = [ [[package]] name = "unsafe-libyaml" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" [[package]] name = "untrusted" @@ -3630,7 +3630,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", "wasm-bindgen-shared", ] @@ -3664,7 +3664,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4127,7 +4127,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -4308,9 +4308,9 @@ dependencies = [ [[package]] name = "zip32" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d724a63be4dfb50b7f3617e542984e22e4b4a5b8ca5de91f55613152885e6b22" +checksum = "4226d0aee9c9407c27064dfeec9d7b281c917de3374e1e5a2e2cfad9e09de19e" dependencies = [ "blake2b_simd", "memuse", From 9ba11d91c5cbf0e1fa136bc1e9923bb8a3ce98c1 Mon Sep 17 00:00:00 2001 From: zancas Date: Fri, 22 Mar 2024 11:54:29 -0600 Subject: [PATCH 09/44] maybe someday this will be used, probably not valuable to rip it out now --- zingocli/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/zingocli/src/lib.rs b/zingocli/src/lib.rs index 662be73eba..af88ca940d 100644 --- a/zingocli/src/lib.rs +++ b/zingocli/src/lib.rs @@ -263,6 +263,7 @@ fn short_circuit_on_help(params: Vec) { std::process::exit(0x0100); } use std::string::String; +#[allow(dead_code)] #[derive(Debug)] enum TemplateFillError { BirthdaylessSeed(String), From f531151c5d6040aa3cc76a5f60dd034d0916f0ae Mon Sep 17 00:00:00 2001 From: zancas Date: Fri, 22 Mar 2024 18:07:28 -0600 Subject: [PATCH 10/44] add donation address to zingoconfig --- zingoconfig/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/zingoconfig/src/lib.rs b/zingoconfig/src/lib.rs index 1229a4783a..1457c24763 100644 --- a/zingoconfig/src/lib.rs +++ b/zingoconfig/src/lib.rs @@ -23,6 +23,7 @@ use zcash_primitives::consensus::{ TEST_NETWORK, }; +pub const DEVELOPER_DONATION_ADDRESS: &str = "u1w47nzy4z5g9zvm4h2s4ztpl8vrdmlclqz5sz02742zs5j3tz232u4safvv9kplg7g06wpk5fx0k0rx3r9gg4qk6nkg4c0ey57l0dyxtatqf8403xat7vyge7mmen7zwjcgvryg22khtg3327s6mqqkxnpwlnrt27kxhwg37qys2kpn2d2jl2zkk44l7j7hq9az82594u3qaescr3c9v"; pub const DEFAULT_LIGHTWALLETD_SERVER: &str = "https://mainnet.lightwalletd.com:9067"; pub const MAX_REORG: usize = 100; pub const DEFAULT_WALLET_NAME: &str = "zingo-wallet.dat"; From 5fcb9b9ca4a14606f0abf1af3927db6672120822 Mon Sep 17 00:00:00 2001 From: zancas Date: Fri, 29 Mar 2024 18:12:55 -0600 Subject: [PATCH 11/44] when I remove these two flakes all the tests on dev pass, as required --- integration-tests/tests/integrations.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/integration-tests/tests/integrations.rs b/integration-tests/tests/integrations.rs index 4762333579..78bbe67d4f 100644 --- a/integration-tests/tests/integrations.rs +++ b/integration-tests/tests/integrations.rs @@ -3560,6 +3560,7 @@ mod slow { load_wallet_from_data_and_assert(data, 0, 3).await; } + #[ignore = "flakey test"] #[tokio::test] async fn load_wallet_from_v26_2_dat_file() { // We test that the LightWallet can be read from v26 .dat file @@ -3580,6 +3581,7 @@ mod slow { load_wallet_from_data_and_assert(data, 10177826, 1).await; } + #[ignore = "flakey test"] #[tokio::test] async fn load_wallet_from_v28_dat_file() { // We test that the LightWallet can be read from v28 .dat file From 4ffdd1c7d4fb030483d66bb500a6e33409bae2a3 Mon Sep 17 00:00:00 2001 From: Oscar Pepper Date: Fri, 29 Mar 2024 12:44:39 +0000 Subject: [PATCH 12/44] added zingocli data to gitignore and corrected mine to address (cherry picked from commit b4b23173a42ce34c5bb5c941393c1db3d804839d) --- .gitignore | 1 + zingo-testutils/regtest/conf/zcash.conf | 2 +- zingocli/regtest/conf/zcash.conf | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1a8c6d4396..68655b7b53 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ docker-ci/lightwalletd target wallets/* zingocli/regtest/logs/ +zingocli/regtest/data/ zingocli/regtest/zingo-wallet.dat zingocli/target zingocli/tests/data/basic_zcashd.conf diff --git a/zingo-testutils/regtest/conf/zcash.conf b/zingo-testutils/regtest/conf/zcash.conf index 57902ebfc8..463d73aa0d 100644 --- a/zingo-testutils/regtest/conf/zcash.conf +++ b/zingo-testutils/regtest/conf/zcash.conf @@ -16,4 +16,4 @@ rpcport=18232 rpcallowip=127.0.0.1 minetolocalwallet=0 -mineraddress=zregtestsapling1fp58yvw40ytns3qrcc4p58ga9xunqglf5al6tl49fdlq3yrc2wk99dwrnxmhcyw5nlsqqa680rq +mineraddress=zregtestsapling1fmq2ufux3gm0v8qf7x585wj56le4wjfsqsj27zprjghntrerntggg507hxh2ydcdkn7sx8kya7p diff --git a/zingocli/regtest/conf/zcash.conf b/zingocli/regtest/conf/zcash.conf index 57902ebfc8..463d73aa0d 100644 --- a/zingocli/regtest/conf/zcash.conf +++ b/zingocli/regtest/conf/zcash.conf @@ -16,4 +16,4 @@ rpcport=18232 rpcallowip=127.0.0.1 minetolocalwallet=0 -mineraddress=zregtestsapling1fp58yvw40ytns3qrcc4p58ga9xunqglf5al6tl49fdlq3yrc2wk99dwrnxmhcyw5nlsqqa680rq +mineraddress=zregtestsapling1fmq2ufux3gm0v8qf7x585wj56le4wjfsqsj27zprjghntrerntggg507hxh2ydcdkn7sx8kya7p From 337c3a6f86b115f35080b9fcc173acbe7b22f5e6 Mon Sep 17 00:00:00 2001 From: zancas Date: Fri, 29 Mar 2024 21:23:36 -0600 Subject: [PATCH 13/44] unify zcash.conf source of truth for regtests and zingocli regtest mode --- .gitignore | 1 + zingo-testutils/src/regtest.rs | 12 +++++++++++- zingocli/regtest/conf/zcash.conf | 19 ------------------- 3 files changed, 12 insertions(+), 20 deletions(-) delete mode 100644 zingocli/regtest/conf/zcash.conf diff --git a/.gitignore b/.gitignore index 68655b7b53..086a4ad1a2 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ cobertura.xml docker-ci/lightwalletd target wallets/* +zingocli/regtest/conf/zcash.conf zingocli/regtest/logs/ zingocli/regtest/data/ zingocli/regtest/zingo-wallet.dat diff --git a/zingo-testutils/src/regtest.rs b/zingo-testutils/src/regtest.rs index 784c7cb540..4acc5934dd 100644 --- a/zingo-testutils/src/regtest.rs +++ b/zingo-testutils/src/regtest.rs @@ -175,11 +175,22 @@ pub fn launch_lightwalletd( } lightwalletd_child } +fn write_zcash_conf(location: &PathBuf) { + // This is the only data we need to supply *to* the zcashd, the other files are created by zcashd and lightwalletd + use std::io::Write; + let conf_bytes: &'static [u8] = include_bytes!("../regtest/conf/zcash.conf"); + File::create(location) + .unwrap() + .write_all(conf_bytes) + .unwrap(); +} impl RegtestManager { pub fn new(rootpathname: PathBuf) -> Self { let regtest_dir = rootpathname; let confs_dir = regtest_dir.join("conf"); + let zcashd_config = confs_dir.join("zcash.conf"); std::fs::create_dir_all(&confs_dir).expect("Couldn't create dir."); + write_zcash_conf(&zcashd_config); let bin_dir = super::paths::get_bin_dir(); std::fs::create_dir_all(&bin_dir).expect("Couldn't create dir."); let cli_bin = bin_dir.join("zcash-cli"); @@ -190,7 +201,6 @@ impl RegtestManager { let zcashd_logs_dir = logs_dir.join("zcashd"); std::fs::create_dir_all(&zcashd_logs_dir).expect("Couldn't create dir."); let zcashd_stdout_log = zcashd_logs_dir.join("stdout.log"); - let zcashd_config = confs_dir.join("zcash.conf"); let lightwalletd_config = confs_dir.join("lightwalletd.yml"); let lightwalletd_logs_dir = logs_dir.join("lightwalletd"); std::fs::create_dir_all(&lightwalletd_logs_dir).expect("Couldn't create dir."); diff --git a/zingocli/regtest/conf/zcash.conf b/zingocli/regtest/conf/zcash.conf deleted file mode 100644 index 463d73aa0d..0000000000 --- a/zingocli/regtest/conf/zcash.conf +++ /dev/null @@ -1,19 +0,0 @@ -## Default zingolib zcash.conf for regtest mode ## -regtest=1 -nuparams=5ba81b19:1 # Overwinter -nuparams=76b809bb:1 # Sapling -nuparams=2bb40e60:1 # Blossom -nuparams=f5b9230b:1 # Heartwood -nuparams=e9ff75a6:1 # Canopy -nuparams=c2d6d0b4:1 # NU5 - -txindex=1 -insightexplorer=1 -experimentalfeatures=1 -rpcuser=xxxxxx -rpcpassword=xxxxxx -rpcport=18232 -rpcallowip=127.0.0.1 - -minetolocalwallet=0 -mineraddress=zregtestsapling1fmq2ufux3gm0v8qf7x585wj56le4wjfsqsj27zprjghntrerntggg507hxh2ydcdkn7sx8kya7p From cd4617731001be31ab20fa1c61d1514c3b207e36 Mon Sep 17 00:00:00 2001 From: zancas Date: Fri, 29 Mar 2024 21:44:22 -0600 Subject: [PATCH 14/44] allow bugfixes in the toolchain --- rust-toolchain.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 0314e2f5e4..290ebb3a83 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.77.0" +channel = "1.77" components = [ "clippy", "rustfmt" ] From 18303dbac6c8213b0030e7b54e71650177d273e5 Mon Sep 17 00:00:00 2001 From: zancas Date: Fri, 29 Mar 2024 21:58:15 -0600 Subject: [PATCH 15/44] clean up .gitignore --- .gitignore | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 086a4ad1a2..b6fc1f06ba 100644 --- a/.gitignore +++ b/.gitignore @@ -8,10 +8,7 @@ cobertura.xml docker-ci/lightwalletd target wallets/* -zingocli/regtest/conf/zcash.conf -zingocli/regtest/logs/ -zingocli/regtest/data/ -zingocli/regtest/zingo-wallet.dat +zingocli/regtest/ zingocli/target zingocli/tests/data/basic_zcashd.conf zingocli/tests/data/externalwallet_coinbaseaddress.conf From 6e42fe3a90ad96492ecf0ee1f69c45642f069a39 Mon Sep 17 00:00:00 2001 From: zancas Date: Sat, 30 Mar 2024 20:44:25 -0600 Subject: [PATCH 16/44] code cherry picked from spend_kit: 7c0f68940 (cherry picked from commit 65cb3649a6c6de99d92c51bca6dec38ddb80e93b) --- zingo-status/src/confirmation_status.rs | 40 ++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/zingo-status/src/confirmation_status.rs b/zingo-status/src/confirmation_status.rs index 01e50863a1..8ea02e16d1 100644 --- a/zingo-status/src/confirmation_status.rs +++ b/zingo-status/src/confirmation_status.rs @@ -99,6 +99,44 @@ impl ConfirmationStatus { _ => false, } } + /// To return true, the status must be confirmed earlier than specified height. + /// # Examples + /// + /// ``` + /// use zingo_status::confirmation_status::ConfirmationStatus; + /// use zcash_primitives::consensus::BlockHeight; + /// + /// let status = ConfirmationStatus::Confirmed(10.into()); + /// assert_eq!(status.is_confirmed_before(&8.into()), false); + /// + /// let status = ConfirmationStatus::Confirmed(10.into()); + /// assert_eq!(status.is_confirmed_before(&10.into()), false); + /// + /// let status = ConfirmationStatus::Confirmed(10.into()); + /// assert_eq!(status.is_confirmed_before(&12.into()), true); + /// ``` + pub fn is_confirmed_before(&self, comparison_height: &BlockHeight) -> bool { + match self { + Self::Confirmed(self_height) => self_height <= comparison_height, + _ => false, + } + } + /// To return true, the status must have broadcast at or later than specified height. + /// # Examples + /// + /// ``` + /// use zingo_status::confirmation_status::ConfirmationStatus; + /// use zcash_primitives::consensus::BlockHeight; + /// + /// let status = ConfirmationStatus::Confirmed(10.into()); + /// assert_eq!(status.is_broadcast_after_or_at(&8.into()), false); + /// + /// let status = ConfirmationStatus::Broadcast(10.into()); + /// assert_eq!(status.is_broadcast_after_or_at(&10.into()), true); + /// + /// let status = ConfirmationStatus::Broadcast(10.into()); + /// assert_eq!(status.is_broadcast_after_or_at(&12.into()), false); + /// ``` pub fn is_broadcast_after_or_at(&self, comparison_height: &BlockHeight) -> bool { match self { Self::Broadcast(self_height) => self_height >= comparison_height, @@ -165,7 +203,7 @@ impl ConfirmationStatus { _ => None, } } - // this function and the placeholder is not a preferred pattern. please use match whenever possible. + /// this function and the placeholder is not a preferred pattern. please use match whenever possible. /// # Examples /// /// ``` From 819b2fb6cabe02880820e8fcc65b4d1c730d2f32 Mon Sep 17 00:00:00 2001 From: zancas Date: Sat, 30 Mar 2024 20:59:14 -0600 Subject: [PATCH 17/44] fix bug, replace wet code with DRY composition (cherry picked from commit 349371544ca3a2c744d94d709d9c448f17da9392) --- zingo-status/src/confirmation_status.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zingo-status/src/confirmation_status.rs b/zingo-status/src/confirmation_status.rs index 8ea02e16d1..c6601e1108 100644 --- a/zingo-status/src/confirmation_status.rs +++ b/zingo-status/src/confirmation_status.rs @@ -95,7 +95,9 @@ impl ConfirmationStatus { /// ``` pub fn is_confirmed_before_or_at(&self, comparison_height: &BlockHeight) -> bool { match self { - Self::Confirmed(self_height) => self_height <= comparison_height, + Self::Confirmed(self_height) => { + self.is_confirmed_before(comparison_height) || self_height == comparison_height + } _ => false, } } @@ -117,7 +119,7 @@ impl ConfirmationStatus { /// ``` pub fn is_confirmed_before(&self, comparison_height: &BlockHeight) -> bool { match self { - Self::Confirmed(self_height) => self_height <= comparison_height, + Self::Confirmed(self_height) => self_height < comparison_height, _ => false, } } From a8dd7cbff25b2d3d4139c0e36df6e03be471565c Mon Sep 17 00:00:00 2001 From: zancas Date: Sat, 30 Mar 2024 21:55:46 -0600 Subject: [PATCH 18/44] add complementary is_[confirmed|broadcast] assertions, tighten boundary conditions, remove obsolete comment --- zingo-status/src/confirmation_status.rs | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/zingo-status/src/confirmation_status.rs b/zingo-status/src/confirmation_status.rs index c6601e1108..4e8727e221 100644 --- a/zingo-status/src/confirmation_status.rs +++ b/zingo-status/src/confirmation_status.rs @@ -32,9 +32,11 @@ impl ConfirmationStatus { /// /// let status = ConfirmationStatus::Broadcast(10.into()); /// assert_eq!(status.is_broadcast(), true); + /// assert_eq!(status.is_confirmed(), false); /// /// let status = ConfirmationStatus::Confirmed(10.into()); /// assert_eq!(status.is_broadcast(), false); + /// assert_eq!(status.is_confirmed(), true); /// ``` pub fn is_broadcast(&self) -> bool { matches!(self, Self::Broadcast(_)) @@ -48,9 +50,11 @@ impl ConfirmationStatus { /// /// let status = ConfirmationStatus::Broadcast(10.into()); /// assert_eq!(status.is_confirmed(), false); + /// assert_eq!(status.is_broadcast(), true); /// /// let status = ConfirmationStatus::Confirmed(10.into()); /// assert_eq!(status.is_confirmed(), true); + /// assert_eq!(status.is_broadcast(), false); /// ``` pub fn is_confirmed(&self) -> bool { matches!(self, Self::Confirmed(_)) @@ -63,13 +67,13 @@ impl ConfirmationStatus { /// use zcash_primitives::consensus::BlockHeight; /// /// let status = ConfirmationStatus::Confirmed(10.into()); - /// assert_eq!(status.is_confirmed_after_or_at(&8.into()), true); + /// assert_eq!(status.is_confirmed_after_or_at(&9.into()), true); /// /// let status = ConfirmationStatus::Broadcast(10.into()); /// assert_eq!(status.is_confirmed_after_or_at(&10.into()), false); /// /// let status = ConfirmationStatus::Confirmed(10.into()); - /// assert_eq!(status.is_confirmed_after_or_at(&12.into()), false); + /// assert_eq!(status.is_confirmed_after_or_at(&11.into()), false); /// ``` pub fn is_confirmed_after_or_at(&self, comparison_height: &BlockHeight) -> bool { match self { @@ -85,13 +89,13 @@ impl ConfirmationStatus { /// use zcash_primitives::consensus::BlockHeight; /// /// let status = ConfirmationStatus::Confirmed(10.into()); - /// assert_eq!(status.is_confirmed_before_or_at(&8.into()), false); + /// assert_eq!(status.is_confirmed_before_or_at(&9.into()), false); /// /// let status = ConfirmationStatus::Broadcast(10.into()); /// assert_eq!(status.is_confirmed_before_or_at(&10.into()), false); /// /// let status = ConfirmationStatus::Confirmed(10.into()); - /// assert_eq!(status.is_confirmed_before_or_at(&12.into()), true); + /// assert_eq!(status.is_confirmed_before_or_at(&11.into()), true); /// ``` pub fn is_confirmed_before_or_at(&self, comparison_height: &BlockHeight) -> bool { match self { @@ -109,13 +113,13 @@ impl ConfirmationStatus { /// use zcash_primitives::consensus::BlockHeight; /// /// let status = ConfirmationStatus::Confirmed(10.into()); - /// assert_eq!(status.is_confirmed_before(&8.into()), false); + /// assert_eq!(status.is_confirmed_before(&9.into()), false); /// /// let status = ConfirmationStatus::Confirmed(10.into()); /// assert_eq!(status.is_confirmed_before(&10.into()), false); /// /// let status = ConfirmationStatus::Confirmed(10.into()); - /// assert_eq!(status.is_confirmed_before(&12.into()), true); + /// assert_eq!(status.is_confirmed_before(&11.into()), true); /// ``` pub fn is_confirmed_before(&self, comparison_height: &BlockHeight) -> bool { match self { @@ -131,13 +135,13 @@ impl ConfirmationStatus { /// use zcash_primitives::consensus::BlockHeight; /// /// let status = ConfirmationStatus::Confirmed(10.into()); - /// assert_eq!(status.is_broadcast_after_or_at(&8.into()), false); + /// assert_eq!(status.is_broadcast_after_or_at(&9.into()), false); /// /// let status = ConfirmationStatus::Broadcast(10.into()); /// assert_eq!(status.is_broadcast_after_or_at(&10.into()), true); /// /// let status = ConfirmationStatus::Broadcast(10.into()); - /// assert_eq!(status.is_broadcast_after_or_at(&12.into()), false); + /// assert_eq!(status.is_broadcast_after_or_at(&11.into()), false); /// ``` pub fn is_broadcast_after_or_at(&self, comparison_height: &BlockHeight) -> bool { match self { @@ -153,10 +157,10 @@ impl ConfirmationStatus { /// use zcash_primitives::consensus::BlockHeight; /// /// let status = ConfirmationStatus::Confirmed(16.into()); - /// assert_eq!(status.is_broadcast_before(&14.into()), false); + /// assert_eq!(status.is_broadcast_before(&15.into()), false); /// /// let status = ConfirmationStatus::Broadcast(12.into()); - /// assert_eq!(status.is_broadcast_before(&14.into()), true); + /// assert_eq!(status.is_broadcast_before(&13.into()), true); /// /// let status = ConfirmationStatus::Broadcast(14.into()); /// assert_eq!(status.is_broadcast_before(&14.into()), false); @@ -205,7 +209,6 @@ impl ConfirmationStatus { _ => None, } } - /// this function and the placeholder is not a preferred pattern. please use match whenever possible. /// # Examples /// /// ``` From 548d0efa540616c7394cb3844135d4d0686fc053 Mon Sep 17 00:00:00 2001 From: zancas Date: Sat, 30 Mar 2024 22:09:04 -0600 Subject: [PATCH 19/44] trigger doctests (and other internal tests picked up by cargo test) in zingo*/src directories --- .github/workflows/ci.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5009a09db4..ab873bf2d8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,6 +20,16 @@ jobs: - name: Reject trailing whitespace run: ./utils/trailing-whitespace.sh reject + run-doc-tests: + name: ensure doc tests are run, (and any other tests implied) + runs-on: ubuntu-22.04 + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Run doc tests + run: | + cd zingo-status/src && cargo test test: uses: ./.github/workflows/test.yaml with: From b65cc1ff49ccaa293b2dc0b8c5a1da6d7b52e9bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 00:29:56 +0000 Subject: [PATCH 20/44] Bump tracing-log from 0.1.4 to 0.2.0 Bumps [tracing-log](https://github.com/tokio-rs/tracing) from 0.1.4 to 0.2.0. - [Release notes](https://github.com/tokio-rs/tracing/releases) - [Commits](https://github.com/tokio-rs/tracing/compare/tracing-log-0.1.4...tracing-log-0.2.0) --- updated-dependencies: - dependency-name: tracing-log dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 15 ++------------- darkside-tests/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 499afbf7b9..0d1433a9cf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -673,7 +673,7 @@ dependencies = [ "tonic-build", "tower", "tracing", - "tracing-log 0.1.4", + "tracing-log", "tracing-subscriber", "tracing-test", "zcash_address", @@ -3368,17 +3368,6 @@ dependencies = [ "valuable", ] -[[package]] -name = "tracing-log" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - [[package]] name = "tracing-log" version = "0.2.0" @@ -3405,7 +3394,7 @@ dependencies = [ "thread_local", "tracing", "tracing-core", - "tracing-log 0.2.0", + "tracing-log", ] [[package]] diff --git a/darkside-tests/Cargo.toml b/darkside-tests/Cargo.toml index 07423d663f..e0c2e6296c 100644 --- a/darkside-tests/Cargo.toml +++ b/darkside-tests/Cargo.toml @@ -30,7 +30,7 @@ tracing-subscriber = "0.3.15" itertools = "0.10.5" tracing-test = { version = "0.2.4", features = ["no-env-filter"] } tracing = "0.1.37" -tracing-log = "0.1.3" +tracing-log = "0.2.0" futures-util = "0.3.28" orchard = { workspace = true } zcash_address = { workspace = true } From 5852a23c54c1a88fa73a142b69ca138f1cec0eae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 00:30:58 +0000 Subject: [PATCH 21/44] Bump env_logger from 0.10.2 to 0.11.3 Bumps [env_logger](https://github.com/rust-cli/env_logger) from 0.10.2 to 0.11.3. - [Release notes](https://github.com/rust-cli/env_logger/releases) - [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-cli/env_logger/compare/v0.10.2...v0.11.3) --- updated-dependencies: - dependency-name: env_logger dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 40 +++++++++++++++------------------------ darkside-tests/Cargo.toml | 2 +- 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 499afbf7b9..746e26c0ac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -823,17 +823,27 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" +[[package]] +name = "env_filter" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +dependencies = [ + "log", + "regex", +] + [[package]] name = "env_logger" -version = "0.10.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" dependencies = [ + "anstream", + "anstyle", + "env_filter", "humantime", - "is-terminal", "log", - "regex", - "termcolor", ] [[package]] @@ -1441,17 +1451,6 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" -[[package]] -name = "is-terminal" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "itertools" version = "0.10.5" @@ -3061,15 +3060,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - [[package]] name = "thiserror" version = "1.0.58" diff --git a/darkside-tests/Cargo.toml b/darkside-tests/Cargo.toml index 07423d663f..72827205b4 100644 --- a/darkside-tests/Cargo.toml +++ b/darkside-tests/Cargo.toml @@ -23,7 +23,7 @@ hex = { workspace = true } zcash_primitives = { workspace = true } tempdir = { workspace = true } portpicker = { workspace = true } -env_logger = "0.10.0" +env_logger = "0.11.3" bech32 = "0.9.0" rand = "0.8.5" tracing-subscriber = "0.3.15" From 40847867ee37ba8002b0497a36f45db7034c3949 Mon Sep 17 00:00:00 2001 From: zancas Date: Fri, 22 Mar 2024 18:07:28 -0600 Subject: [PATCH 22/44] add donation address to zingoconfig --- zingoconfig/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/zingoconfig/src/lib.rs b/zingoconfig/src/lib.rs index e67f62543a..8bbb309dfc 100644 --- a/zingoconfig/src/lib.rs +++ b/zingoconfig/src/lib.rs @@ -23,6 +23,7 @@ use zcash_primitives::{ constants, }; +pub const DEVELOPER_DONATION_ADDRESS: &str = "u1w47nzy4z5g9zvm4h2s4ztpl8vrdmlclqz5sz02742zs5j3tz232u4safvv9kplg7g06wpk5fx0k0rx3r9gg4qk6nkg4c0ey57l0dyxtatqf8403xat7vyge7mmen7zwjcgvryg22khtg3327s6mqqkxnpwlnrt27kxhwg37qys2kpn2d2jl2zkk44l7j7hq9az82594u3qaescr3c9v"; pub const DEFAULT_LIGHTWALLETD_SERVER: &str = "https://mainnet.lightwalletd.com:9067"; pub const MAX_REORG: usize = 100; pub const DEFAULT_WALLET_NAME: &str = "zingo-wallet.dat"; From 3d551025807372e59d33e2b016d2e92e34abbe4e Mon Sep 17 00:00:00 2001 From: Oscar Pepper Date: Mon, 1 Apr 2024 17:05:54 +0100 Subject: [PATCH 23/44] Run only doc tests and for the whole workspace --- .github/workflows/ci.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ab873bf2d8..73f2f667c7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,15 +21,17 @@ jobs: run: ./utils/trailing-whitespace.sh reject run-doc-tests: - name: ensure doc tests are run, (and any other tests implied) + name: Run doc tests runs-on: ubuntu-22.04 + env: + RUSTFLAGS: -D warnings steps: - name: Checkout repository uses: actions/checkout@v3 - name: Run doc tests - run: | - cd zingo-status/src && cargo test + run: cargo test --doc + test: uses: ./.github/workflows/test.yaml with: From b3cd8d9fbc42cc96afe8ec1a50fe83749e1976ee Mon Sep 17 00:00:00 2001 From: Oscar Pepper Date: Mon, 1 Apr 2024 17:15:06 +0100 Subject: [PATCH 24/44] Removed unused struct --- zingolib/src/wallet/data.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/zingolib/src/wallet/data.rs b/zingolib/src/wallet/data.rs index be572e5b07..7907d25ad6 100644 --- a/zingolib/src/wallet/data.rs +++ b/zingolib/src/wallet/data.rs @@ -577,8 +577,6 @@ pub mod finsight { } } pub mod summaries { - use std::collections::HashMap; - use json::{object, JsonValue}; use zcash_primitives::transaction::TxId; @@ -701,8 +699,6 @@ pub mod summaries { } } } - - pub struct TransactionIndex(HashMap); } pub use crate::wallet::transaction_record::TransactionRecord; From e27aa7765dd5eb15a9f6320bd5c661436e33277b Mon Sep 17 00:00:00 2001 From: Oscar Pepper Date: Mon, 1 Apr 2024 18:23:04 +0100 Subject: [PATCH 25/44] Better error handling for zingocli --- zingocli/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zingocli/src/lib.rs b/zingocli/src/lib.rs index 662be73eba..34b8d8f8af 100644 --- a/zingocli/src/lib.rs +++ b/zingocli/src/lib.rs @@ -523,6 +523,8 @@ pub fn run_cli() { if let Err(e) = LightClient::init_logging() { eprintln!("Could not initialize logging: {e}") }; - let cli_config = ConfigTemplate::fill(build_clap_app()).unwrap(); - dispatch_command_or_start_interactive(&cli_config); + match ConfigTemplate::fill(build_clap_app()) { + Ok(cli_config) => dispatch_command_or_start_interactive(&cli_config), + Err(e) => eprintln!("Error filling config template: {e:?}"), + } } From e8821e0fd6269edae9960d9bb63c0898c7d78f28 Mon Sep 17 00:00:00 2001 From: Oscar Pepper Date: Mon, 1 Apr 2024 18:27:56 +0100 Subject: [PATCH 26/44] Add protoc, toolchain and cache --- .github/workflows/ci.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 73f2f667c7..f81488325b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -29,6 +29,16 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + + - name: Install protoc + run: sudo apt-get install protobuf-compiler + + - name: Cargo cache + uses: Swatinem/rust-cache@v2 + - name: Run doc tests run: cargo test --doc From a1a68e789e8d648958f407f709f586d9db2cc8aa Mon Sep 17 00:00:00 2001 From: Oscar Pepper Date: Mon, 1 Apr 2024 18:47:27 +0100 Subject: [PATCH 27/44] Fixed toolchain in CI --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1b97090fea..2d15e553f2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -22,7 +22,7 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - toolchain: stable + toolchain: 1.76.0 - name: Install nextest uses: taiki-e/install-action@nextest From 984f48bf068b22c763d426a0c980ac005fb3db89 Mon Sep 17 00:00:00 2001 From: Oscar Pepper Date: Mon, 1 Apr 2024 20:31:29 +0100 Subject: [PATCH 28/44] add stable to CI push list --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5009a09db4..c3c298e566 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,7 +3,7 @@ name: CI on: pull_request: push: - branches: [main, dev] + branches: [stable, dev] workflow_dispatch: jobs: From e8a14e52f2727c79f3d279a07890e1f6fc37db94 Mon Sep 17 00:00:00 2001 From: zancas Date: Mon, 1 Apr 2024 13:13:59 -0600 Subject: [PATCH 29/44] set toolchains to stable --- .github/workflows/test.yaml | 2 +- Cargo.lock | 564 ++++++++++++++++++------------------ docker/Dockerfile | 2 +- rust-toolchain.toml | 2 +- zingocli/src/lib.rs | 6 +- 5 files changed, 287 insertions(+), 289 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2d15e553f2..1b97090fea 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -22,7 +22,7 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - toolchain: 1.76.0 + toolchain: stable - name: Install nextest uses: taiki-e/install-action@nextest diff --git a/Cargo.lock b/Cargo.lock index 5178834f92..af51639aca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,9 +29,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", @@ -40,9 +40,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -64,9 +64,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.7" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd2405b3ac1faab2990b74d728624cd9fd115651fcecc7c2d8daf01376275ba" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" dependencies = [ "anstyle", "anstyle-parse", @@ -78,9 +78,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" @@ -112,9 +112,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "append-only-vec" @@ -123,9 +123,9 @@ source = "git+https://github.com/zancas/append-only-vec.git?branch=add_debug_imp [[package]] name = "arc-swap" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[package]] name = "arrayref" @@ -158,25 +158,25 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "axum" @@ -187,7 +187,7 @@ dependencies = [ "async-trait", "axum-core", "bitflags 1.3.2", - "bytes 1.5.0", + "bytes 1.6.0", "futures-util", "http", "http-body", @@ -213,7 +213,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" dependencies = [ "async-trait", - "bytes 1.5.0", + "bytes 1.6.0", "futures-util", "http", "http-body", @@ -225,9 +225,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", @@ -326,9 +326,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bitvec" @@ -397,9 +397,9 @@ dependencies = [ [[package]] name = "bs58" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" dependencies = [ "sha2 0.10.8", "tinyvec", @@ -411,9 +411,9 @@ version = "0.1.0" [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "byteorder" @@ -433,9 +433,9 @@ dependencies = [ [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "cbc" @@ -448,12 +448,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.83" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" [[package]] name = "cfg-if" @@ -487,16 +484,14 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" dependencies = [ "android-tzdata", "iana-time-zone", - "js-sys", "num-traits", - "wasm-bindgen", - "windows-targets 0.48.5", + "windows-targets 0.52.4", ] [[package]] @@ -512,18 +507,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.17" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80932e03c33999b9235edb8655bc9df3204adc9887c2f95b50cb1deb9fd54253" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.4.17" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c0db58c659eef1c73e444d298c27322a1b52f6927d2ad470c0c0f96fa7b8fa" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstream", "anstyle", @@ -533,9 +528,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "clipboard-win" @@ -561,7 +556,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f76990911f2267d837d9d0ad060aa63aaad170af40904b29461734c339030d4d" dependencies = [ "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -603,9 +598,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.11" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" +checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" dependencies = [ "crossbeam-utils", ] @@ -800,9 +795,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "encoding_rs" @@ -821,9 +816,9 @@ checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" [[package]] name = "env_logger" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -877,9 +872,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" [[package]] name = "fd-lock" @@ -1021,7 +1016,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -1095,17 +1090,17 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.23" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b553656127a00601c8ae5590fcfdc118e4083a7924b6cf4ffc1ea4b99dc429d7" +checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "fnv", "futures-core", "futures-sink", "futures-util", "http", - "indexmap 2.1.0", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -1185,9 +1180,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" @@ -1221,11 +1216,11 @@ dependencies = [ [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "fnv", "itoa", ] @@ -1236,7 +1231,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "http", "pin-project-lite", ] @@ -1271,7 +1266,7 @@ version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "futures-channel", "futures-core", "futures-util", @@ -1322,7 +1317,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "hyper", "native-tls", "tokio", @@ -1331,9 +1326,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.59" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1364,12 +1359,14 @@ dependencies = [ [[package]] name = "incrementalmerkletree" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "361c467824d4d9d4f284be4b2608800839419dccc4d4608f28345237fe354623" +checksum = "eb1872810fb725b06b8c153dde9e86f3ec26747b9b60096da7a869883b549cbe" dependencies = [ "either", "proptest", + "rand 0.8.5", + "rand_core 0.6.4", ] [[package]] @@ -1384,9 +1381,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -1394,9 +1391,9 @@ dependencies = [ [[package]] name = "indoc" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "inout" @@ -1445,12 +1442,12 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ "hermit-abi", - "rustix", + "libc", "windows-sys 0.52.0", ] @@ -1474,15 +1471,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -1527,9 +1524,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.152" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libm" @@ -1539,13 +1536,12 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "libc", - "redox_syscall", ] [[package]] @@ -1560,17 +1556,11 @@ dependencies = [ "walkdir", ] -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" @@ -1584,9 +1574,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" dependencies = [ "serde", ] @@ -1599,9 +1589,9 @@ checksum = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7" [[package]] name = "log4rs" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d36ca1786d9e79b8193a68d480a0907b612f109537115c6ff655a3a1967533fd" +checksum = "0816135ae15bd0391cf284eab37e6e3ee0a6ee63d2ceeb659862bd8d0a984ca6" dependencies = [ "anyhow", "arc-swap", @@ -1612,7 +1602,9 @@ dependencies = [ "libc", "log", "log-mdc", + "once_cell", "parking_lot", + "rand 0.8.5", "serde", "serde-value", "serde_json", @@ -1650,9 +1642,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "memuse" @@ -1677,9 +1669,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] @@ -1776,21 +1768,26 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", "libm", @@ -1823,17 +1820,17 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.62" +version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cde4d2d9200ad5909f8dac647e29482e07c3a35de8a13fce7c9c7747ad9f671" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "cfg-if", "foreign-types", "libc", @@ -1850,7 +1847,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -1861,9 +1858,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.98" +version = "0.9.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1665caf8ab2dc9aef43d1c0023bd904633a6a05cb30b0ad59bec2ae986e57a7" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" dependencies = [ "cc", "libc", @@ -1995,34 +1992,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.1.0", + "indexmap 2.2.6", ] [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -2032,9 +2029,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "poly1305" @@ -2070,19 +2067,19 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7" dependencies = [ "proc-macro2", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "proc-macro2" -version = "1.0.76" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -2095,13 +2092,13 @@ checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.4.1", + "bitflags 2.5.0", "lazy_static", "num-traits", "rand 0.8.5", "rand_chacha", "rand_xorshift", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", "rusty-fork", "tempfile", "unarray", @@ -2113,7 +2110,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "prost-derive", ] @@ -2123,7 +2120,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "heck", "itertools 0.11.0", "log", @@ -2134,7 +2131,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.48", + "syn 2.0.57", "tempfile", "which", ] @@ -2149,7 +2146,7 @@ dependencies = [ "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -2261,9 +2258,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -2271,9 +2268,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -2330,9 +2327,9 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ "getrandom", "libredox", @@ -2341,14 +2338,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.3", - "regex-syntax 0.8.2", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", ] [[package]] @@ -2362,13 +2359,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -2379,9 +2376,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "remove_dir_all" @@ -2394,12 +2391,12 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.23" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64 0.21.7", - "bytes 1.5.0", + "bytes 1.6.0", "encoding_rs", "futures-core", "futures-util", @@ -2416,9 +2413,11 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", "system-configuration", "tokio", "tokio-native-tls", @@ -2447,16 +2446,17 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", "getrandom", "libc", "spin 0.9.8", "untrusted 0.9.0", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2499,7 +2499,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.48", + "syn 2.0.57", "walkdir", ] @@ -2530,11 +2530,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.30" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys", @@ -2560,7 +2560,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", - "ring 0.17.7", + "ring 0.17.8", "rustls-webpki", "sct", ] @@ -2592,7 +2592,7 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "untrusted 0.9.0", ] @@ -2639,9 +2639,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "same-file" @@ -2673,7 +2673,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "untrusted 0.9.0", ] @@ -2706,9 +2706,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -2719,9 +2719,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" dependencies = [ "core-foundation-sys", "libc", @@ -2729,15 +2729,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" [[package]] name = "serde" -version = "1.0.195" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] @@ -2754,20 +2754,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.195" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] name = "serde_json" -version = "1.0.111" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" +checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" dependencies = [ "itoa", "ryu", @@ -2788,14 +2788,15 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.8.26" +version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 1.9.3", + "indexmap 2.2.6", + "itoa", "ryu", "serde", - "yaml-rust", + "unsafe-libyaml", ] [[package]] @@ -2837,7 +2838,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c19f96dde3a8693874f7e7c53d95616569b4009379a903789efbd448f4ea9cc7" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.5.0", "either", "incrementalmerkletree", "tracing", @@ -2879,18 +2880,18 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.12.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2931,9 +2932,9 @@ checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] name = "subtle" @@ -2954,9 +2955,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "11a6ae1e52eb25aab8f3fb9fca13be982a373b8f1157ca14b897a825ba4a2d35" dependencies = [ "proc-macro2", "quote", @@ -3008,13 +3009,12 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.9.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", "rustix", "windows-sys 0.52.0", ] @@ -3030,22 +3030,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.56" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.56" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -3060,9 +3060,9 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", @@ -3070,11 +3070,12 @@ dependencies = [ [[package]] name = "time" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", + "num-conv", "powerfmt", "serde", "time-core", @@ -3103,12 +3104,12 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.35.1" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", - "bytes 1.5.0", + "bytes 1.6.0", "libc", "mio", "num_cpus", @@ -3138,7 +3139,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -3174,9 +3175,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", "pin-project-lite", @@ -3189,7 +3190,7 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "futures-core", "futures-sink", "pin-project-lite", @@ -3207,7 +3208,7 @@ dependencies = [ "async-trait", "axum", "base64 0.21.7", - "bytes 1.5.0", + "bytes 1.6.0", "h2", "http", "http-body", @@ -3226,7 +3227,7 @@ dependencies = [ "tower-layer", "tower-service", "tracing", - "webpki-roots 0.25.3", + "webpki-roots 0.25.4", ] [[package]] @@ -3239,7 +3240,7 @@ dependencies = [ "proc-macro2", "prost-build", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -3269,7 +3270,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aba3f3efabf7fb41fae8534fc20a817013dd1c12cb45441efb6c82e6556b4cd8" dependencies = [ "bitflags 1.3.2", - "bytes 1.5.0", + "bytes 1.6.0", "futures-core", "futures-util", "http", @@ -3312,7 +3313,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -3429,9 +3430,9 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -3441,18 +3442,18 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" @@ -3479,6 +3480,12 @@ dependencies = [ "destructure_traitobject", ] +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + [[package]] name = "untrusted" version = "0.7.1" @@ -3537,9 +3544,9 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -3562,9 +3569,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3572,24 +3579,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.40" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -3599,9 +3606,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3609,28 +3616,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -3652,7 +3659,7 @@ version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "untrusted 0.9.0", ] @@ -3667,9 +3674,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.3" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "which" @@ -3720,7 +3727,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] @@ -3738,7 +3745,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] @@ -3758,17 +3765,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", ] [[package]] @@ -3779,9 +3786,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" [[package]] name = "windows_aarch64_msvc" @@ -3791,9 +3798,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" [[package]] name = "windows_i686_gnu" @@ -3803,9 +3810,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" [[package]] name = "windows_i686_msvc" @@ -3815,9 +3822,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" [[package]] name = "windows_x86_64_gnu" @@ -3827,9 +3834,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" [[package]] name = "windows_x86_64_gnullvm" @@ -3839,9 +3846,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" [[package]] name = "windows_x86_64_msvc" @@ -3851,9 +3858,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" [[package]] name = "winreg" @@ -3880,15 +3887,6 @@ version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] - [[package]] name = "zcash_address" version = "0.3.0" @@ -4030,7 +4028,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.57", ] [[package]] @@ -4157,7 +4155,7 @@ dependencies = [ "prost", "rand 0.8.5", "reqwest", - "ring 0.17.7", + "ring 0.17.8", "ripemd160", "rust-embed", "rustls-pemfile", diff --git a/docker/Dockerfile b/docker/Dockerfile index c47488aa2d..3eb15323a3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -8,7 +8,7 @@ RUN apt install -y build-essential mingw-w64 gcc-aarch64-linux-gnu gcc-arm-linux RUN curl https://sh.rustup.rs -sSf | bash -s -- --default-toolchain none -y ENV PATH="/root/.cargo/bin:${PATH}" -RUN rustup toolchain install 1.69.0 +RUN rustup toolchain install stable RUN rustup target add x86_64-pc-windows-gnu RUN rustup target add aarch64-unknown-linux-gnu diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 1eb4605782..2b9b1f1767 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.76.0" +channel = "stable" components = [ "clippy", "rustfmt" ] diff --git a/zingocli/src/lib.rs b/zingocli/src/lib.rs index 34b8d8f8af..bfad01993e 100644 --- a/zingocli/src/lib.rs +++ b/zingocli/src/lib.rs @@ -263,6 +263,7 @@ fn short_circuit_on_help(params: Vec) { std::process::exit(0x0100); } use std::string::String; +#[allow(dead_code)] #[derive(Debug)] enum TemplateFillError { BirthdaylessSeed(String), @@ -313,8 +314,7 @@ impl ConfigTemplate { ); return Err(TemplateFillError::BirthdaylessSeed( "This should be the block height where the wallet was created.\ -If you don't remember the block height, you can pass '--birthday 0'\ -to scan from the start of the blockchain." +If you don't remember the block height, you can pass '--birthday 0' to scan from the start of the blockchain." .to_string(), )); } @@ -525,6 +525,6 @@ pub fn run_cli() { }; match ConfigTemplate::fill(build_clap_app()) { Ok(cli_config) => dispatch_command_or_start_interactive(&cli_config), - Err(e) => eprintln!("Error filling config template: {e:?}"), + Err(e) => eprintln!("Error filling config template: {:#?}", e), } } From a0e63921c205bc3a49589f9068dfefbbca4f9160 Mon Sep 17 00:00:00 2001 From: zancas Date: Mon, 1 Apr 2024 16:58:06 -0600 Subject: [PATCH 30/44] return String for template fill errors --- zingo-testutils/src/regtest.rs | 5 +++++ zingocli/src/lib.rs | 38 +++++++++------------------------- 2 files changed, 15 insertions(+), 28 deletions(-) diff --git a/zingo-testutils/src/regtest.rs b/zingo-testutils/src/regtest.rs index 7eed5a5874..c423a2fb41 100644 --- a/zingo-testutils/src/regtest.rs +++ b/zingo-testutils/src/regtest.rs @@ -75,6 +75,11 @@ pub enum LaunchChildProcessError { stderr: String, }, } +impl From for String { + fn from(underlyingerror: LaunchChildProcessError) -> Self { + format!("LaunchChildProcessError from {:?}", underlyingerror) + } +} pub fn launch_lightwalletd( logsdir: PathBuf, confsdir: PathBuf, diff --git a/zingocli/src/lib.rs b/zingocli/src/lib.rs index bfad01993e..a6ce508da4 100644 --- a/zingocli/src/lib.rs +++ b/zingocli/src/lib.rs @@ -262,23 +262,7 @@ fn short_circuit_on_help(params: Vec) { } std::process::exit(0x0100); } -use std::string::String; -#[allow(dead_code)] -#[derive(Debug)] -enum TemplateFillError { - BirthdaylessSeed(String), - InvalidBirthday(String), - MalformedServerURL(String), - ChildLaunchError(regtest::LaunchChildProcessError), - InvalidChain(String), - RegtestAndChainSpecified(String), -} -impl From for TemplateFillError { - fn from(underlyingerror: regtest::LaunchChildProcessError) -> Self { - Self::ChildLaunchError(underlyingerror) - } -} /// This type manages setup of the zingo-cli utility among its responsibilities: /// * parse arguments with standard clap: /// * behave correctly as a function of each parameter that may have been passed @@ -288,7 +272,7 @@ impl From for TemplateFillError { /// is specified, then the system should execute only logic necessary to support that command, /// in other words "help" the ShortCircuitCommand _MUST_ not launch either zcashd or lightwalletd impl ConfigTemplate { - fn fill(matches: clap::ArgMatches) -> Result { + fn fill(matches: clap::ArgMatches) -> Result { let is_regtest = matches.get_flag("regtest"); // Begin short_circuit section let params = if let Some(vals) = matches.get_many::("extra_args") { vals.cloned().collect() @@ -312,25 +296,23 @@ impl ConfigTemplate { eprintln!( "Please specify the wallet birthday (eg. '--birthday 600000') to restore a wallet. (If you want to load the entire blockchain instead, you can use birthday 0. /this would require extensive time and computational resources)" ); - return Err(TemplateFillError::BirthdaylessSeed( + return Err( "This should be the block height where the wallet was created.\ If you don't remember the block height, you can pass '--birthday 0' to scan from the start of the blockchain." .to_string(), - )); + ); } let from = from.map(|seed| seed.to_string()); if matches.contains_id("chain") && is_regtest { - return Err(TemplateFillError::RegtestAndChainSpecified( - "regtest mode incompatible with custom chain selection".to_string(), - )); + return Err("regtest mode incompatible with custom chain selection".to_string()); } let birthday = match maybe_birthday.unwrap_or("0".to_string()).parse::() { Ok(b) => b, Err(e) => { - return Err(TemplateFillError::InvalidBirthday(format!( + return Err(format!( "Couldn't parse birthday. This should be a block number. Error={}", e - ))); + )); } }; @@ -364,7 +346,7 @@ If you don't remember the block height, you can pass '--birthday 0' to scan from "mainnet" => ChainType::Mainnet, "testnet" => ChainType::Testnet, "regtest" => ChainType::Regtest(zingoconfig::RegtestNetwork::all_upgrades_active()), - _ => return Err(TemplateFillError::InvalidChain(chain.clone())), + _ => return Err(chain.clone()), } } else if is_regtest { ChainType::Regtest(zingoconfig::RegtestNetwork::all_upgrades_active()) @@ -374,9 +356,9 @@ If you don't remember the block height, you can pass '--birthday 0' to scan from // Test to make sure the server has all of scheme, host and port if server.scheme_str().is_none() || server.host().is_none() || server.port().is_none() { - return Err(TemplateFillError::MalformedServerURL(format!( + return Err(format!( "Please provide the --server parameter as [scheme]://[host]:[port].\nYou provided: {}", - server ))); + server )); } let sync = !matches.get_flag("nosync"); @@ -525,6 +507,6 @@ pub fn run_cli() { }; match ConfigTemplate::fill(build_clap_app()) { Ok(cli_config) => dispatch_command_or_start_interactive(&cli_config), - Err(e) => eprintln!("Error filling config template: {:#?}", e), + Err(e) => eprintln!("Error filling config template: {:?}", e), } } From 18b9d39197ae804a12e8e143015ff47bed4ff767 Mon Sep 17 00:00:00 2001 From: zancas Date: Tue, 2 Apr 2024 06:27:46 -0600 Subject: [PATCH 31/44] temporary revert --- rust-toolchain.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 290ebb3a83..0314e2f5e4 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.77" +channel = "1.77.0" components = [ "clippy", "rustfmt" ] From 78aebb5730f14722c4a81da3163249f9d6760d20 Mon Sep 17 00:00:00 2001 From: zancas Date: Tue, 2 Apr 2024 11:55:11 -0600 Subject: [PATCH 32/44] update dirs per dependabot recommendation --- zingoconfig/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zingoconfig/Cargo.toml b/zingoconfig/Cargo.toml index 3a6b477aba..2f9b7e3284 100644 --- a/zingoconfig/Cargo.toml +++ b/zingoconfig/Cargo.toml @@ -12,4 +12,4 @@ zcash_primitives = { workspace = true } log4rs = "1.1.1" log = "0.4.14" http = "0.2.4" -dirs = "3.0.2" +dirs = "5.0" From 7b38a8e4e53fa2afcf715e0b432c2bf9d7f118fc Mon Sep 17 00:00:00 2001 From: zancas Date: Tue, 2 Apr 2024 11:56:20 -0600 Subject: [PATCH 33/44] update Cargo.lock with new dirs --- Cargo.lock | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index af51639aca..5a72e244eb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -745,9 +745,9 @@ dependencies = [ [[package]] name = "dirs" -version = "3.0.2" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ "dirs-sys", ] @@ -764,13 +764,14 @@ dependencies = [ [[package]] name = "dirs-sys" -version = "0.3.7" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", + "option-ext", "redox_users", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -1868,6 +1869,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "orchard" version = "0.6.0" From 663ed5037267f1995640b8dad7bec9b3f494c69e Mon Sep 17 00:00:00 2001 From: zancas Date: Tue, 2 Apr 2024 12:05:12 -0600 Subject: [PATCH 34/44] unify webpki dependency --- Cargo.toml | 1 + zingocli/Cargo.toml | 2 +- zingolib/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c2ab4f63a1..f0a3111278 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,6 +37,7 @@ http-body = "0.4.4" tonic = {version = "0.10.0", features = ["tls", "tls-roots", "tls-webpki-roots"]} prost = "0.12.0" tower = { version = "0.4" } +webpki-roots = "0.21.0" [profile.release] debug = false diff --git a/zingocli/Cargo.toml b/zingocli/Cargo.toml index 7b75562e5d..1e88f546b5 100644 --- a/zingocli/Cargo.toml +++ b/zingocli/Cargo.toml @@ -20,5 +20,5 @@ hyper-rustls = { version = "0.23", features = ["http2"] } tokio = { version = "1.24.2", features = ["full"] } tokio-stream = "0.1.6" tokio-rustls = "0.23.3" -webpki-roots = "0.21.0" +webpki-roots.workspace = true json = "0.12.4" diff --git a/zingolib/Cargo.toml b/zingolib/Cargo.toml index 0ea350547b..395ca65e08 100644 --- a/zingolib/Cargo.toml +++ b/zingolib/Cargo.toml @@ -56,7 +56,7 @@ futures = { workspace = true } hex = "0.3" ring = "0.17.0" json = "0.12.4" -webpki-roots = "0.21.0" +webpki-roots.workspace = true lazy_static = "1.4.0" secp256k1 = "=0.26.0" ripemd160 = "0.9.1" From ba00e2faf3f2e8c67317ee75ddad50629e250694 Mon Sep 17 00:00:00 2001 From: zancas Date: Tue, 2 Apr 2024 12:48:17 -0600 Subject: [PATCH 35/44] update Cargo.lock --- Cargo.lock | 192 +++++++++++++++++++++++++++-------------------------- 1 file changed, 97 insertions(+), 95 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 799def5f15..f368f83da6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -123,9 +123,9 @@ source = "git+https://github.com/zancas/append-only-vec.git?branch=add_debug_imp [[package]] name = "arc-swap" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b3d0060af21e8d11a926981cc00c6c1541aa91dd64b9f881985c3da1094425f" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[package]] name = "arrayref" @@ -158,25 +158,25 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] name = "async-trait" -version = "0.1.78" +version = "0.1.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" +checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "axum" @@ -187,7 +187,7 @@ dependencies = [ "async-trait", "axum-core", "bitflags 1.3.2", - "bytes 1.5.0", + "bytes 1.6.0", "futures-util", "http", "http-body", @@ -213,7 +213,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" dependencies = [ "async-trait", - "bytes 1.5.0", + "bytes 1.6.0", "futures-util", "http", "http-body", @@ -225,9 +225,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.70" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95d8e92cac0961e91dbd517496b00f7e9b92363dbe6d42c3198268323798860c" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", @@ -433,9 +433,9 @@ dependencies = [ [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "cbc" @@ -484,9 +484,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.35" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" +checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" dependencies = [ "android-tzdata", "iana-time-zone", @@ -507,9 +507,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.3" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "949626d00e063efc93b6dca932419ceb5432f99769911c0b995f7e884c778813" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" dependencies = [ "clap_builder", ] @@ -556,7 +556,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f76990911f2267d837d9d0ad060aa63aaad170af40904b29461734c339030d4d" dependencies = [ "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -892,9 +892,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" [[package]] name = "fd-lock" @@ -1036,7 +1036,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -1114,13 +1114,13 @@ version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "fnv", "futures-core", "futures-sink", "futures-util", "http", - "indexmap 2.2.5", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -1234,7 +1234,7 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "fnv", "itoa", ] @@ -1245,7 +1245,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "http", "pin-project-lite", ] @@ -1280,7 +1280,7 @@ version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "futures-channel", "futures-core", "futures-util", @@ -1331,7 +1331,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "hyper", "native-tls", "tokio", @@ -1373,12 +1373,14 @@ dependencies = [ [[package]] name = "incrementalmerkletree" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "361c467824d4d9d4f284be4b2608800839419dccc4d4608f28345237fe354623" +checksum = "eb1872810fb725b06b8c153dde9e86f3ec26747b9b60096da7a869883b549cbe" dependencies = [ "either", "proptest", + "rand 0.8.5", + "rand_core 0.6.4", ] [[package]] @@ -1393,9 +1395,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.5" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -1403,9 +1405,9 @@ dependencies = [ [[package]] name = "indoc" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "inout" @@ -1472,9 +1474,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" @@ -1537,13 +1539,12 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.5.0", "libc", - "redox_syscall", ] [[package]] @@ -1650,9 +1651,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "memuse" @@ -1855,7 +1856,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -1866,9 +1867,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.101" +version = "0.9.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" dependencies = [ "cc", "libc", @@ -2008,7 +2009,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.2.5", + "indexmap 2.2.6", ] [[package]] @@ -2028,14 +2029,14 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -2083,12 +2084,12 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7" dependencies = [ "proc-macro2", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -2114,7 +2115,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha", "rand_xorshift", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", "rusty-fork", "tempfile", "unarray", @@ -2126,7 +2127,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "prost-derive", ] @@ -2136,7 +2137,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "heck", "itertools 0.11.0", "log", @@ -2147,7 +2148,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.53", + "syn 2.0.57", "tempfile", "which", ] @@ -2162,7 +2163,7 @@ dependencies = [ "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -2274,9 +2275,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -2343,9 +2344,9 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ "getrandom", "libredox", @@ -2354,14 +2355,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", "regex-automata 0.4.6", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -2381,7 +2382,7 @@ checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -2392,9 +2393,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "remove_dir_all" @@ -2412,7 +2413,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64 0.21.7", - "bytes 1.5.0", + "bytes 1.6.0", "encoding_rs", "futures-core", "futures-util", @@ -2515,7 +2516,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.53", + "syn 2.0.57", "walkdir", ] @@ -2670,9 +2671,9 @@ dependencies = [ [[package]] name = "sapling-crypto" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0db258736b34dfc6bec50fab2afb94c1845d90370b38309ebf9bb166cc951251" +checksum = "02f4270033afcb0c74c5c7d59c73cfd1040367f67f224fe7ed9a919ae618f1b7" dependencies = [ "aes", "bellman", @@ -2754,9 +2755,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -2767,9 +2768,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" dependencies = [ "core-foundation-sys", "libc", @@ -2808,14 +2809,14 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] name = "serde_json" -version = "1.0.114" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" dependencies = [ "itoa", "ryu", @@ -2836,11 +2837,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.33" +version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0623d197252096520c6f2a5e1171ee436e5af99a5d7caa2891e55e61950e6d9" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.2.6", "itoa", "ryu", "serde", @@ -3003,9 +3004,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.53" +version = "2.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" +checksum = "11a6ae1e52eb25aab8f3fb9fca13be982a373b8f1157ca14b897a825ba4a2d35" dependencies = [ "proc-macro2", "quote", @@ -3084,7 +3085,7 @@ checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -3143,12 +3144,12 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", - "bytes 1.5.0", + "bytes 1.6.0", "libc", "mio", "num_cpus", @@ -3178,7 +3179,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -3229,7 +3230,7 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ - "bytes 1.5.0", + "bytes 1.6.0", "futures-core", "futures-sink", "pin-project-lite", @@ -3247,7 +3248,7 @@ dependencies = [ "async-trait", "axum", "base64 0.21.7", - "bytes 1.5.0", + "bytes 1.6.0", "h2", "http", "http-body", @@ -3279,7 +3280,7 @@ dependencies = [ "proc-macro2", "prost-build", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -3309,7 +3310,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aba3f3efabf7fb41fae8534fc20a817013dd1c12cb45441efb6c82e6556b4cd8" dependencies = [ "bitflags 1.3.2", - "bytes 1.5.0", + "bytes 1.6.0", "futures-core", "futures-util", "http", @@ -3352,7 +3353,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -3616,7 +3617,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", "wasm-bindgen-shared", ] @@ -3650,7 +3651,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4113,7 +4114,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -4279,6 +4280,7 @@ dependencies = [ "tower-http", "tracing", "tracing-subscriber", + "webpki-roots 0.21.1", "zcash_address", "zcash_client_backend", "zcash_encoding", From d12dc4ce8cf0ff6ac649c9aaec3e8a9b91995dae Mon Sep 17 00:00:00 2001 From: zancas Date: Tue, 2 Apr 2024 19:28:29 -0600 Subject: [PATCH 36/44] update to zip339 from stable --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- zingo-testutils/Cargo.toml | 2 +- zingoconfig/Cargo.toml | 8 ++++---- zingolib/Cargo.toml | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f368f83da6..b6cf134e6d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2981,9 +2981,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" @@ -4133,7 +4133,7 @@ dependencies = [ "tokio", "tokio-rustls 0.23.4", "tokio-stream", - "webpki-roots 0.21.1", + "webpki-roots 0.25.4", "zingo-testutils", "zingoconfig", "zingolib", @@ -4280,7 +4280,7 @@ dependencies = [ "tower-http", "tracing", "tracing-subscriber", - "webpki-roots 0.21.1", + "webpki-roots 0.25.4", "zcash_address", "zcash_client_backend", "zcash_encoding", diff --git a/Cargo.toml b/Cargo.toml index f2a2cfc5af..2410e5f13d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,7 +44,7 @@ prost = "0.12.0" tower = { version = "0.4" } hex = "0.4" tokio-rustls = "0.23" -webpki-roots = "0.21.0" +webpki-roots = "0.25" [profile.release] debug = false diff --git a/zingo-testutils/Cargo.toml b/zingo-testutils/Cargo.toml index b6e6c02e9c..ace85b0d6d 100644 --- a/zingo-testutils/Cargo.toml +++ b/zingo-testutils/Cargo.toml @@ -26,7 +26,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 9a201123fc..67fa61c5db 100644 --- a/zingoconfig/Cargo.toml +++ b/zingoconfig/Cargo.toml @@ -6,11 +6,11 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -zcash_address = { workspace = true } -zcash_primitives = { workspace = true } +zcash_address.workspace = true +zcash_primitives.workspace = true +tempdir.workspace = true +http.workspace = true log4rs = "1.1.1" log = "0.4.14" -http = "0.2.4" -tempdir.workspace = true dirs = "5.0" diff --git a/zingolib/Cargo.toml b/zingolib/Cargo.toml index 2b80b6b5bc..080cfdeda9 100644 --- a/zingolib/Cargo.toml +++ b/zingolib/Cargo.toml @@ -41,7 +41,7 @@ hyper-rustls = { 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 0cf777c1afba9cc83b20e1b8a1692f4afb692058 Mon Sep 17 00:00:00 2001 From: zancas Date: Tue, 2 Apr 2024 20:25:18 -0600 Subject: [PATCH 37/44] fix missed conflict markers --- zingo-status/src/confirmation_status.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/zingo-status/src/confirmation_status.rs b/zingo-status/src/confirmation_status.rs index 799f0d1a2d..4e8727e221 100644 --- a/zingo-status/src/confirmation_status.rs +++ b/zingo-status/src/confirmation_status.rs @@ -209,12 +209,6 @@ impl ConfirmationStatus { _ => None, } } -<<<<<<< HEAD - /// this function and the placeholder is not a preferred pattern. please use match whenever possible. -||||||| merged common ancestors - // this function and the placeholder is not a preferred pattern. please use match whenever possible. -======= ->>>>>>> update_bip_to_zip /// # Examples /// /// ``` From 450c9f5e329c5fa5120d5575a15803bece5a734e Mon Sep 17 00:00:00 2001 From: zancas Date: Tue, 2 Apr 2024 21:31:39 -0600 Subject: [PATCH 38/44] make send be a default feature-gated feature, and add doc-comments --- zingolib/Cargo.toml | 3 ++- zingolib/src/lightclient.rs | 1 + zingolib/src/lightclient/send.rs | 9 +++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/zingolib/Cargo.toml b/zingolib/Cargo.toml index 20a7b1c26f..b971585be8 100644 --- a/zingolib/Cargo.toml +++ b/zingolib/Cargo.toml @@ -11,9 +11,10 @@ deprecations = ["lightclient-deprecated"] test = ["lightclient-deprecated", "test-features"] lightclient-deprecated = [] test-features = ["zingo-testvectors"] -default = ["embed_params"] +default = ["embed_params", "send"] embed_params = [] darkside_tests = [] +send = [] [dependencies] zingoconfig = { path = "../zingoconfig" } diff --git a/zingolib/src/lightclient.rs b/zingolib/src/lightclient.rs index ba3da8649f..41164b1d9e 100644 --- a/zingolib/src/lightclient.rs +++ b/zingolib/src/lightclient.rs @@ -67,6 +67,7 @@ pub struct LightClient { pub mod describe; pub mod disk; +#[cfg(feature = "send")] pub mod send; pub mod sync; diff --git a/zingolib/src/lightclient/send.rs b/zingolib/src/lightclient/send.rs index da038177e1..31c320646c 100644 --- a/zingolib/src/lightclient/send.rs +++ b/zingolib/src/lightclient/send.rs @@ -1,3 +1,12 @@ +//! The sequence of steps necessary to send a zingo transaction are as follows: +//! +//! (1) create a proposed transaction +//! +//! (2) request that Thor bless the proposal with a thunderbolt +//! +//! (3) tie the proposal to a European swallow +//! +//! (4) slap the swallow on the ass and yell: Hee-aw! use crate::{ error::ZingoLibError, wallet::{ From bdc5eb60b9b354621588096aafe8de9718485354 Mon Sep 17 00:00:00 2001 From: zancas Date: Tue, 2 Apr 2024 22:07:37 -0600 Subject: [PATCH 39/44] hack to get u64 for MARGINAL_FEE, but use correct SSOT, and be concise --- zingoconfig/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zingoconfig/src/lib.rs b/zingoconfig/src/lib.rs index 1457c24763..51052b2b1f 100644 --- a/zingoconfig/src/lib.rs +++ b/zingoconfig/src/lib.rs @@ -37,6 +37,9 @@ pub const GAP_RULE_UNUSED_ADDRESSES: usize = 0; #[cfg(not(any(target_os = "ios", target_os = "android")))] pub const GAP_RULE_UNUSED_ADDRESSES: usize = 5; +pub fn MARGINAL_AS_U64() -> u64 { + zcash_primitives::transaction::fees::zip317::MARGINAL_FEE.into_u64() +} pub fn load_clientconfig( lightwallet_uri: http::Uri, data_dir: Option, From 90df703bdcb4ee18b6e8a40de720c076bd6c5d2e Mon Sep 17 00:00:00 2001 From: zancas Date: Tue, 2 Apr 2024 22:10:11 -0600 Subject: [PATCH 40/44] fix fn name --- zingoconfig/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zingoconfig/src/lib.rs b/zingoconfig/src/lib.rs index 51052b2b1f..e27b300e6e 100644 --- a/zingoconfig/src/lib.rs +++ b/zingoconfig/src/lib.rs @@ -37,7 +37,7 @@ pub const GAP_RULE_UNUSED_ADDRESSES: usize = 0; #[cfg(not(any(target_os = "ios", target_os = "android")))] pub const GAP_RULE_UNUSED_ADDRESSES: usize = 5; -pub fn MARGINAL_AS_U64() -> u64 { +pub fn margin_fee() -> u64 { zcash_primitives::transaction::fees::zip317::MARGINAL_FEE.into_u64() } pub fn load_clientconfig( From 3a6fd74c70c9e940c40f8d9d85c70cae0b48ba18 Mon Sep 17 00:00:00 2001 From: zancas Date: Tue, 2 Apr 2024 22:15:38 -0600 Subject: [PATCH 41/44] remove duplicate definitions of MARGINAL_FEE --- zingolib/src/lightclient.rs | 2 -- zingolib/src/lightclient/describe.rs | 17 ++++++++--------- zingolib/src/lightclient/disk.rs | 2 -- zingolib/src/lightclient/send.rs | 2 -- zingolib/src/lightclient/sync.rs | 2 -- 5 files changed, 8 insertions(+), 17 deletions(-) diff --git a/zingolib/src/lightclient.rs b/zingolib/src/lightclient.rs index 41164b1d9e..4470900262 100644 --- a/zingolib/src/lightclient.rs +++ b/zingolib/src/lightclient.rs @@ -24,8 +24,6 @@ use zingoconfig::ZingoConfig; static LOG_INIT: std::sync::Once = std::sync::Once::new(); -const MARGINAL_FEE: u64 = 5_000; // From ZIP-317 - #[derive(Clone, Debug, Default)] pub struct WalletStatus { pub is_syncing: bool, diff --git a/zingolib/src/lightclient/describe.rs b/zingolib/src/lightclient/describe.rs index f1199c29a3..2c3d6a02d0 100644 --- a/zingolib/src/lightclient/describe.rs +++ b/zingolib/src/lightclient/describe.rs @@ -18,6 +18,7 @@ use serde::Serialize; use std::collections::HashMap; use tokio::runtime::Runtime; use zcash_address::ZcashAddress; +use zingoconfig::margin_fee; use zcash_client_backend::encoding::encode_payment_address; use zcash_primitives::{ @@ -30,8 +31,6 @@ use super::LightClient; static LOG_INIT: std::sync::Once = std::sync::Once::new(); -const MARGINAL_FEE: u64 = 5_000; // From ZIP-317 - #[derive(Clone, Debug, PartialEq, Serialize)] pub struct AccountBackupInfo { #[serde(rename = "seed")] @@ -201,7 +200,7 @@ impl LightClient { change += value; change_note_count += 1; } else if incoming { - if value > MARGINAL_FEE { + if value > margin_fee() { useful_value += value; inbound_note_count_nodust += 1; } else { @@ -219,7 +218,7 @@ impl LightClient { change += value; change_note_count += 1; } else if incoming { - if value > MARGINAL_FEE { + if value > margin_fee() { useful_value += value; inbound_note_count_nodust += 1; } else { @@ -234,7 +233,7 @@ impl LightClient { .for_each(|n| { // UTXOs are never 'change', as change would have been shielded. if incoming { - if n.value > MARGINAL_FEE { + if n.value > margin_fee() { utxo_value += n.value; inbound_utxo_count_nodust += 1; } else { @@ -244,15 +243,15 @@ impl LightClient { }); // The fee field only tracks mature income and change. - balances.minimum_fees += change_note_count * MARGINAL_FEE; + balances.minimum_fees += change_note_count * margin_fee(); if mature { - balances.minimum_fees += inbound_note_count_nodust * MARGINAL_FEE; + balances.minimum_fees += inbound_note_count_nodust * margin_fee(); } // If auto-shielding, UTXOs are considered immature and do not fall into any of the buckets that // the fee balance covers. if !auto_shielding { - balances.minimum_fees += inbound_utxo_count_nodust * MARGINAL_FEE; + balances.minimum_fees += inbound_utxo_count_nodust * margin_fee(); } if auto_shielding { @@ -286,7 +285,7 @@ impl LightClient { // Add the minimum fee for the receiving note, // but only if there exists notes to spend in the buckets that are covered by the minimum_fee. if balances.minimum_fees > 0 { - balances.minimum_fees += MARGINAL_FEE; // The receiving note. + balances.minimum_fees += margin_fee(); // The receiving note. } Ok(balances) diff --git a/zingolib/src/lightclient/disk.rs b/zingolib/src/lightclient/disk.rs index 331601b00f..6db55bae31 100644 --- a/zingolib/src/lightclient/disk.rs +++ b/zingolib/src/lightclient/disk.rs @@ -23,8 +23,6 @@ use super::LightClient; static LOG_INIT: std::sync::Once = std::sync::Once::new(); -const MARGINAL_FEE: u64 = 5_000; // From ZIP-317 - pub(super) struct ZingoSaveBuffer { pub buffer: Arc>>, } diff --git a/zingolib/src/lightclient/send.rs b/zingolib/src/lightclient/send.rs index 31c320646c..300e0c08c8 100644 --- a/zingolib/src/lightclient/send.rs +++ b/zingolib/src/lightclient/send.rs @@ -30,8 +30,6 @@ use super::LightClient; static LOG_INIT: std::sync::Once = std::sync::Once::new(); -const MARGINAL_FEE: u64 = 5_000; // From ZIP-317 - #[derive(Debug, Clone)] pub struct LightWalletSendProgress { pub progress: SendProgress, diff --git a/zingolib/src/lightclient/sync.rs b/zingolib/src/lightclient/sync.rs index c2c93ee459..98358c76eb 100644 --- a/zingolib/src/lightclient/sync.rs +++ b/zingolib/src/lightclient/sync.rs @@ -35,8 +35,6 @@ use super::LightClient; static LOG_INIT: std::sync::Once = std::sync::Once::new(); -const MARGINAL_FEE: u64 = 5_000; // From ZIP-317 - #[derive(Clone, Debug, Default)] pub struct SyncResult { pub success: bool, From fed8b5f2f1dce5251844cbb96814ff43cdbcbd3a Mon Sep 17 00:00:00 2001 From: zancas Date: Wed, 3 Apr 2024 08:58:20 -0600 Subject: [PATCH 42/44] fix trailing whitespace --- zingolib/src/error.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zingolib/src/error.rs b/zingolib/src/error.rs index 4edf688dcc..1154ccbd0a 100644 --- a/zingolib/src/error.rs +++ b/zingolib/src/error.rs @@ -100,7 +100,7 @@ impl std::fmt::Display for ZingoLibError { MissingOutputIndex(txid) => format!( "{txid} is missing output_index for note, cannot mark change" ), - + ViewkeyCantSpend => "viewkey cannot spend".to_string(), RequestConstruction(err) => format!( "transaction request {}", @@ -116,7 +116,7 @@ impl std::fmt::Display for ZingoLibError { string, ), CalculatedTransactionEncode(string) => format!( - "encoding newly created transaction {}", + "encoding newly created transaction {}", string, ), CalculatedTransactionDecode(string) => format!( From a6b633bebb2917d5de83224a6b671808de089b68 Mon Sep 17 00:00:00 2001 From: zancas Date: Wed, 3 Apr 2024 09:14:21 -0600 Subject: [PATCH 43/44] lint fixes --- zingolib/src/wallet/record_book/trait_inputsource.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/zingolib/src/wallet/record_book/trait_inputsource.rs b/zingolib/src/wallet/record_book/trait_inputsource.rs index f9dc0a2600..8bac5272cb 100644 --- a/zingolib/src/wallet/record_book/trait_inputsource.rs +++ b/zingolib/src/wallet/record_book/trait_inputsource.rs @@ -1,13 +1,9 @@ -use std::{collections::BTreeMap}; - - +use std::collections::BTreeMap; use zcash_client_backend::{data_api::InputSource, ShieldedProtocol}; use zcash_primitives::{transaction::components::amount::NonNegativeAmount, zip32::AccountId}; -use crate::{ - error::{ZingoLibError, ZingoLibResult}, -}; +use crate::error::{ZingoLibError, ZingoLibResult}; use super::{NoteRecordIdentifier, RefRecordBook}; From d9fe4c71876a48d4394483f6631a61abc57d8693 Mon Sep 17 00:00:00 2001 From: zancas Date: Wed, 3 Apr 2024 09:28:02 -0600 Subject: [PATCH 44/44] apply more lints --- zingolib/src/wallet/record_book.rs | 25 ++++++++----------- .../src/wallet/spend_kit/trait_inputsource.rs | 7 +----- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/zingolib/src/wallet/record_book.rs b/zingolib/src/wallet/record_book.rs index ec0f113768..c3696bc642 100644 --- a/zingolib/src/wallet/record_book.rs +++ b/zingolib/src/wallet/record_book.rs @@ -1,11 +1,9 @@ -use std::{collections::HashMap}; +use std::collections::HashMap; use orchard::note_encryption::OrchardDomain; use sapling_crypto::note_encryption::SaplingDomain; use zcash_client_backend::ShieldedProtocol; -use zcash_primitives::transaction::{TxId}; - - +use zcash_primitives::transaction::TxId; use super::transaction_record::TransactionRecord; @@ -69,17 +67,14 @@ impl<'a> RefRecordBook<'a> { >, > { let transaction = self.remote_transactions.get(¬e_record_reference.txid); - transaction - .and_then(|transaction_record| match note_record_reference.shielded_protocol { - zcash_client_backend::ShieldedProtocol::Sapling => { - transaction_record - .get_received_note::(note_record_reference.index) - } - zcash_client_backend::ShieldedProtocol::Orchard => { - transaction_record - .get_received_note::(note_record_reference.index) - } - }) + transaction.and_then( + |transaction_record| match note_record_reference.shielded_protocol { + zcash_client_backend::ShieldedProtocol::Sapling => transaction_record + .get_received_note::(note_record_reference.index), + zcash_client_backend::ShieldedProtocol::Orchard => transaction_record + .get_received_note::(note_record_reference.index), + }, + ) } } diff --git a/zingolib/src/wallet/spend_kit/trait_inputsource.rs b/zingolib/src/wallet/spend_kit/trait_inputsource.rs index 5711ce4d38..e2177f43f5 100644 --- a/zingolib/src/wallet/spend_kit/trait_inputsource.rs +++ b/zingolib/src/wallet/spend_kit/trait_inputsource.rs @@ -1,9 +1,4 @@ - - - - -use zcash_client_backend::{data_api::InputSource}; - +use zcash_client_backend::data_api::InputSource; use crate::{error::ZingoLibError, wallet::record_book::NoteRecordIdentifier};