From 0961725d7555e523de39c7a0e754c466e36efccb Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 22 Feb 2022 09:46:43 -0500 Subject: [PATCH] Do not log zaddrs or txids to reduce metadata leakage on disk --- README.md | 3 +++ lib/build.rs | 4 +++- lib/src/commands.rs | 2 ++ lib/src/grpcconnector.rs | 2 ++ lib/src/lib.rs | 2 ++ lib/src/lightclient.rs | 4 +++- lib/src/lightwallet.rs | 8 +++++--- 7 files changed, 20 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1a59986..353c8d2 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,9 @@ Here are some CLI arguments you can pass to `silentdragonlite-cli`. Please run ` For support or other questions, join us on [Telegram](https://hush.is/telegram), or tweet at [@MyHushTeam](https://twitter.com/MyHushTeam), or toot at our [Mastodon](https://fosstodon.org/@myhushteam) or join [Telegram Support](https://hush.is/telegram_support) or [file an issue](https://git.hush.is/hush/silentdragonlite-cli/issues). +## Copyright + +Copyright The Hush Developers 2019-2022 ## License diff --git a/lib/build.rs b/lib/build.rs index 99b9591..7ebc37e 100644 --- a/lib/build.rs +++ b/lib/build.rs @@ -1,3 +1,5 @@ +// Copyright The Hush Developers 2019-2022 +// Released under the GPLv3 fn main() -> Result<(), Box> { tonic_build::configure() .build_server(false) @@ -8,4 +10,4 @@ fn main() -> Result<(), Box> { println!("cargo:rerun-if-changed=proto/service.proto"); Ok(()) } - \ No newline at end of file + diff --git a/lib/src/commands.rs b/lib/src/commands.rs index 271ec4a..30178ee 100644 --- a/lib/src/commands.rs +++ b/lib/src/commands.rs @@ -1,3 +1,5 @@ +// Copyright The Hush Developers 2019-2022 +// Released under the GPLv3 use std::collections::HashMap; use json::{object}; diff --git a/lib/src/grpcconnector.rs b/lib/src/grpcconnector.rs index 2492be3..94056e7 100644 --- a/lib/src/grpcconnector.rs +++ b/lib/src/grpcconnector.rs @@ -1,3 +1,5 @@ +// Copyright The Hush Developers 2019-2022 +// Released under the GPLv3 use log::{error}; use std::sync::Arc; use zcash_primitives::transaction::{TxId}; diff --git a/lib/src/lib.rs b/lib/src/lib.rs index 99a6f36..96b76ea 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -1,3 +1,5 @@ +// Copyright The Hush Developers 2019-2022 +// Released under the GPLv3 #[macro_use] extern crate rust_embed; diff --git a/lib/src/lightclient.rs b/lib/src/lightclient.rs index dd6f362..2bfc436 100644 --- a/lib/src/lightclient.rs +++ b/lib/src/lightclient.rs @@ -1,3 +1,5 @@ +// Copyright The Hush Developers 2019-2022 +// Released under the GPLv3 use crate::lightwallet::LightWallet; use std::sync::{Arc, RwLock, Mutex, mpsc::channel}; @@ -1473,7 +1475,7 @@ impl LightClient { let no_cert = self.config.no_cert_verification; pool.execute(move || { - info!("Fetching full Tx: {}", txid); + //info!("Fetching full Tx: {}", txid); match fetch_full_tx(&server_uri, txid, no_cert) { Ok(tx_bytes) => { diff --git a/lib/src/lightwallet.rs b/lib/src/lightwallet.rs index 9c66639..aa6792c 100644 --- a/lib/src/lightwallet.rs +++ b/lib/src/lightwallet.rs @@ -1,3 +1,5 @@ +// Copyright The Hush Developers 2019-2022 +// Released under the GPLv3 use std::time::{SystemTime, Duration}; use std::io::{self, Read, Write}; use std::cmp; @@ -1399,7 +1401,7 @@ impl LightWallet { }; if memo.to_utf8().is_some() { - info!("A sapling note was sent to wallet in {} that had a memo", tx.txid()); + // info!("A sapling note was sent to wallet in {} that had a memo", tx.txid()); // Do it in a short scope because of the write lock. let mut txs = self.txs.write().unwrap(); @@ -1911,7 +1913,7 @@ impl LightWallet { // Mark notes as spent. let mut total_shielded_value_spent: u64 = 0; - info!("Txid {} belongs to wallet", tx.txid); + //info!("Txid {} belongs to wallet", tx.txid); for spend in &tx.shielded_spends { let txid = nfs @@ -1949,7 +1951,7 @@ impl LightWallet { let new_note = SaplingNoteData::new(&self.zkeys.read().unwrap()[output.account].extfvk, output); match LightWallet::note_address(self.config.hrp_sapling_address(), &new_note) { Some(a) => { - info!("Received sapling output to {}", a); + // info!("Received sapling output to {}", a); self.ensure_hd_zaddresses(&a); }, None => {}