Browse Source

Do not log zaddrs or txids to reduce metadata leakage on disk

duke
Duke Leto 2 years ago
parent
commit
0961725d75
  1. 3
      README.md
  2. 4
      lib/build.rs
  3. 2
      lib/src/commands.rs
  4. 2
      lib/src/grpcconnector.rs
  5. 2
      lib/src/lib.rs
  6. 4
      lib/src/lightclient.rs
  7. 8
      lib/src/lightwallet.rs

3
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

4
lib/build.rs

@ -1,3 +1,5 @@
// Copyright The Hush Developers 2019-2022
// Released under the GPLv3
fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::configure()
.build_server(false)
@ -8,4 +10,4 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("cargo:rerun-if-changed=proto/service.proto");
Ok(())
}

2
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};

2
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};

2
lib/src/lib.rs

@ -1,3 +1,5 @@
// Copyright The Hush Developers 2019-2022
// Released under the GPLv3
#[macro_use]
extern crate rust_embed;

4
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) => {

8
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 => {}

Loading…
Cancel
Save