Dynamic generation of zaddrs not stored in wallet

These zaddrs can be created via:

    z_getnewaddress donotremember

and return a zaddr like normal usage, but without storing it's extended
spending key in wallet.dat. This will be utilized by Sietch to generate
dynamic zdust for every shielded transaction, preventing attacks related
to having chain-wide fixed pools of zdust.
This commit is contained in:
Duke Leto
2020-01-07 09:26:49 -05:00
parent b175a2df60
commit c58fef0d01
4 changed files with 22 additions and 14 deletions

View File

@@ -1,6 +1,6 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Copyright (c) 2019 The Hush developers
// Copyright (c) 2019-2020 The Hush developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -1093,7 +1093,8 @@ public:
* Sapling ZKeys
*/
//! Generates new Sapling key
libzcash::SaplingPaymentAddress GenerateNewSaplingZKey();
// Sietch uses addToWallet=false
libzcash::SaplingPaymentAddress GenerateNewSaplingZKey(bool addToWallet=true);
//! Adds Sapling spending key to the store, and saves it to disk
bool AddSaplingZKey(
const libzcash::SaplingExtendedSpendingKey &key,