Author

Topic: [$] Need developer. Add Bitcoin Core RPC command [deleteaddress] (Read 743 times)

newbie
Activity: 6
Merit: 0
I've found a developer, thanx to all.
newbie
Activity: 6
Merit: 0
Hmmmm interesting, but you may find that when deleting a pair, it's probably going to be like adding a watch address and it's going to have to rescan the blockchain (assuming).  Why not just delete the wallet file if you don't care about the tx's or pub/priv keys?  It would probably be faster.
We don't need delete a whole wallet, just "old" addresses. And we can't stop service and restart wallet, all should be done with rpc command.
legendary
Activity: 1512
Merit: 1057
SpacePirate.io
Hmmmm interesting, but you may find that when deleting a pair, it's probably going to be like adding a watch address and it's going to have to rescan the blockchain (assuming).  Why not just delete the wallet file if you don't care about the tx's or pub/priv keys?  It would probably be faster.
newbie
Activity: 6
Merit: 0
Actually we don't need exactly byte-to-byte size as origin, but the size should not significantly increase if we add 1000 wallets (with transactions), then delete 1000 wallets, then repeat all above 1000 times.
legendary
Activity: 2940
Merit: 1333
- we use deleteaddress command, wallet.dat returns to it's initial size, 'validateaddress ismine' returns false.

This seems like an odd requirement.

Do you really care that the starting and ending wallet.dat sizes be exactly the same? If so, why so? I doubt you're going to get this requirement met.
legendary
Activity: 1890
Merit: 1089
Ian Knowles - CIYAM Lead Developer
I would guess that you are going to need to "overwrite" the key (with some rubbish) in order to effectively "delete it" (as actual deleting can be problematic with any OS).

Another idea might be to change it to a "watch only" address (although I haven't looked at the wallet structure in detail so I'm not sure whether that would work).

Assuming that the wallet is encrypted then the unencrypted key should not remain in memory (unless you've instructed Bitcoin to unlock) but to be safe you'd probably want to restart bitcoind after the wallet modification is performed.
legendary
Activity: 1512
Merit: 1057
SpacePirate.io
staff
Activity: 3458
Merit: 6793
Just writing some code
I think I can do this. I'll have to check the source code to see if this is within my ability. However, if I do this for you, I will want to use an escrow since this is a large amount of money that is being handled here.

Edit: I've sent you a PM
member
Activity: 114
Merit: 12
It might be a good idea to see what problem you are trying to solve. It's quite dangerous to have a command that nukes private keys from your wallet, because that is how people shoot their feet off.
newbie
Activity: 6
Merit: 0
Hi all,
I need to modify bitcoind source in order to add a new rpc command: deleteaddress

The command should delete all keys, txs, accounts and other address-related data from wallet.dat as well as from memory without restart or rescan.
I've tried
Code:
Erase(std::make_pair(std::string("keymeta"), vchPubKey));
Erase(std::make_pair(std::string("key"), vchPubKey));
Erase(std::make_pair(std::string("ckey"), vchPubKey));
Erase(std::make_pair(std::string("wkey"), vchPubKey));
and DelAddressBook procedure, but it doesn't delete all info from file, and doesn't delete from memory. And doesn't delete transactions info from wallet.dat. Well, after restart validateaddress "ismine" shows negative status, but wallet.dat has the same size and still contains pub keys info related to deleted addresses (if you check with a hex editor).

I pay 3 BTC for this work. Escrow if you like.

How it should work (testing):
- to the clean just created wallet we add new private key using importprivkey, which already has several transactions.
- after rescan wallet.dat is increased, added keys and tx info.
- we use deleteaddress command, wallet.dat returns to it's initial size, 'validateaddress ismine' returns false.

It should work in both encrypted and unencrypted wallets.

Please tell me if you can write this addition, your terms etc.
Thank you.
Jump to: