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
  1. maaku commented at 6:33 PM on August 8, 2016: contributor

    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.

  2. [BDB] Add method to compact a BDB database, reclaiming unused disk space. 79e8164545
  3. [Wallet] Add methods for removing keys from the keystore & crypter. cd454dea8d
  4. [Wallet] Add methods to remove key material from the wallet file. c49f093936
  5. [RPC, Wallet] Add deleteprivkey RPC command, which removes key material, turning a wallet key into a watch-only address. dd53d19b4d
  6. [Wallet] Add method for removing transactions from the wallet. 9d2dde542b
  7. [Wallet] Add RPCs forgetaddress and purgewallet for removing watch-only scripts and associated transactions. cbaff62cf2
  8. [Wallet] Delete a private key inside of forgetaddress, if necessary. 5062be18b4
  9. 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.

  10. MarcoFalke added the label Wallet on Aug 8, 2016
  11. MarcoFalke added the label RPC/REST/ZMQ on Aug 8, 2016
  12. 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.

  13. fanquake commented at 1:25 PM on January 12, 2017: member

    Closing due to inactivity.

  14. fanquake closed this on Jan 12, 2017

  15. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me