These RPCs remove a private key from the wallet (turning it into a watch-only address), or forget a watch-only address and all transactions that were only tied to that wallet by that address.
Add deleteprivkey and forgetaddress RPC calls #8488
pull maaku wants to merge 7 commits into bitcoin:master from maaku:forgetaddress-1 changing 11 files +342 −0-
maaku commented at 6:33 PM on August 8, 2016: contributor
-
[BDB] Add method to compact a BDB database, reclaiming unused disk space. 79e8164545
-
[Wallet] Add methods for removing keys from the keystore & crypter. cd454dea8d
-
[Wallet] Add methods to remove key material from the wallet file. c49f093936
-
[RPC, Wallet] Add deleteprivkey RPC command, which removes key material, turning a wallet key into a watch-only address. dd53d19b4d
-
[Wallet] Add method for removing transactions from the wallet. 9d2dde542b
-
[Wallet] Add RPCs forgetaddress and purgewallet for removing watch-only scripts and associated transactions. cbaff62cf2
-
[Wallet] Delete a private key inside of forgetaddress, if necessary. 5062be18b4
-
gmaxwell commented at 6:36 PM on August 8, 2016: contributor
How is this supposed to interact with the BIP32 derandomized keys now used?
FWIW, prior testing when encryption was introduced showed that compact calls were not sufficient to get private data out of BDB files. :( This is why the encryption creates a new database file and forces a restart.
- MarcoFalke added the label Wallet on Aug 8, 2016
- MarcoFalke added the label RPC/REST/ZMQ on Aug 8, 2016
-
laanwj commented at 7:00 AM on August 10, 2016: member
There has been much discussion on this in the past:
- #1653 Ability to freeze / erase private keys
- #3314 Exposed / Compromised (must sweep) / Used / Imported (?) flags on addresses
- #8338 Ability to hide/delete receive addressess
- #5525 Add removeaddress RPC call (remove watch-only address)
- #8338 Allow removing/expiring or firewalling bitcoin addresses
First, I don't want to merge functionality that irrecoverably removes private keys. That's just too much of a foot-shooting gun, as well as is easy to use in the wrong way - people will use it to generate one-shot keys, by generating a key then removing it, but this can't provide any guarantee at all.
And with HD wallets it makes no sense anyhow.
'hiding' addresses or 'neutering' keys, however, is fine. So is forgetting watchonly keys.
-
fanquake commented at 1:25 PM on January 12, 2017: member
Closing due to inactivity.
- fanquake closed this on Jan 12, 2017
- MarcoFalke locked this on Sep 8, 2021