Bitcoin Forum

Bitcoin => Project Development => Topic started by: makemedoit on January 31, 2015, 12:40:56 PM



Title: [1 BTC bounty] Remove address from Bitcoin Core wallet
Post by: makemedoit on January 31, 2015, 12:40:56 PM
I need from command line (linux) be able to remove specified address and the private key from a bitcoin core wallet.dat
The same needed to add private key to a wallet.dat from command line, do not want bitcoin-cli importprivkey with it triggets a rescan of the blockchain time consume.

example:

shutmyduck remove <address> justanotherduckwallet.dat
shutmyduck add <privkey> duckwallet.dat

if this is already possible with pywallet just show me exactly how to do it and i will pay you.


Title: Re: [1 BTC bounty] Remove address from Bitcoin Core wallet
Post by: unamis76 on January 31, 2015, 12:48:07 PM
At least removing is possible with pywallet... There's a specific part for removing keys there :)

edit: http://www.devtome.com/doku.php?id=pywallet#delete_addresses_from_your_wallet


Title: Re: [1 BTC bounty] Remove address from Bitcoin Core wallet
Post by: makemedoit on January 31, 2015, 12:51:33 PM
At least removing is possible with pywallet... There's a specific part for removing keys there :)

edit: http://www.devtome.com/doku.php?id=pywallet#delete_addresses_from_your_wallet

Thank you, but this does not seem to be available from command line?


Title: Re: [1 BTC bounty] Remove address from Bitcoin Core wallet
Post by: icanscript on January 31, 2015, 12:56:29 PM
I need from command line (linux) be able to remove specified address and the private key from a bitcoin core wallet.dat
The same needed to add private key to a wallet.dat from command line, do not want bitcoin-cli importprivkey with it triggets a rescan of the blockchain time consume.

example:

shutmyduck remove <address> justanotherduckwallet.dat
shutmyduck add <privkey> duckwallet.dat

if this is already possible with pywallet just show me exactly how to do it and i will pay you.


I believe adding will have to rescan the blocks otherwise it wont know how many funds are in the address I think.


Title: Re: [1 BTC bounty] Remove address from Bitcoin Core wallet
Post by: unamis76 on January 31, 2015, 12:58:52 PM
I need from command line (linux) be able to remove specified address and the private key from a bitcoin core wallet.dat
The same needed to add private key to a wallet.dat from command line, do not want bitcoin-cli importprivkey with it triggets a rescan of the blockchain time consume.

example:

shutmyduck remove <address> justanotherduckwallet.dat
shutmyduck add <privkey> duckwallet.dat

if this is already possible with pywallet just show me exactly how to do it and i will pay you.


I believe adding will have to rescan the blocks otherwise it wont know how many funds are in the address I think.

Yes, it will rescan it to check for transactions anyway

As for command line options, there's only --importprivkey ou --importhex, noone for removing keys AFAIK :)


Title: Re: [1 BTC bounty] Remove address from Bitcoin Core wallet
Post by: makemedoit on January 31, 2015, 01:04:25 PM
I believe adding will have to rescan the blocks otherwise it wont know how many funds are in the address I think.


Not a good idea to add 10000 addresses using importprivkey when each import triggers a full rescan.
At least with pywallet i could add the addresses and then bitcoin core could rescan when i start it, but not for each import, it would take a week.

Is there anyway to add a private key without trigging the rescan? What if i know that the address has not been used before and i dont care about stupid rescan?


Title: Re: [1 BTC bounty] Remove address from Bitcoin Core wallet
Post by: elbandi on January 31, 2015, 04:28:58 PM
Not a good idea to add 10000 addresses using importprivkey when each import triggers a full rescan.
At least with pywallet i could add the addresses and then bitcoin core could rescan when i start it, but not for each import, it would take a week.
No.
Code:
importprivkey 5gfasgfsgfd name1 false
importprivkey 5jhdhgfhghf name2 false
importprivkey 5gfgdssdgfd name3 false
importprivkey 5gtsgggggdg name4 false
importprivkey 5fgdgfdgfgf name5 true
the last true triggers the scan. the other disable it. the rescan will scan for all keys.


Title: Re: [1 BTC bounty] Remove address from Bitcoin Core wallet
Post by: S4VV4S on January 31, 2015, 05:19:22 PM
Escrow the 1BTC and you are bound to find a solution....

It is not that hard  ;)

Escrow first please  ;D


Title: Re: [1 BTC bounty] Remove address from Bitcoin Core wallet
Post by: unamis76 on January 31, 2015, 05:28:28 PM
Not a good idea to add 10000 addresses using importprivkey when each import triggers a full rescan.
At least with pywallet i could add the addresses and then bitcoin core could rescan when i start it, but not for each import, it would take a week.
No.
Code:
importprivkey 5gfasgfsgfd name1 false
importprivkey 5jhdhgfhghf name2 false
importprivkey 5gfgdssdgfd name3 false
importprivkey 5gtsgggggdg name4 false
importprivkey 5fgdgfdgfgf name5 true
the last true triggers the scan. the other disable it. the rescan will scan for all keys.


Yep, just found about that and came here to post this :) Very useful, wasn't aware of this option!


Title: Re: [1 BTC bounty] Remove address from Bitcoin Core wallet
Post by: icanscript on January 31, 2015, 07:30:56 PM
Not a good idea to add 10000 addresses using importprivkey when each import triggers a full rescan.
At least with pywallet i could add the addresses and then bitcoin core could rescan when i start it, but not for each import, it would take a week.
No.
Code:
importprivkey 5gfasgfsgfd name1 false
importprivkey 5jhdhgfhghf name2 false
importprivkey 5gfgdssdgfd name3 false
importprivkey 5gtsgggggdg name4 false
importprivkey 5fgdgfdgfgf name5 true
the last true triggers the scan. the other disable it. the rescan will scan for all keys.


Yep, just found about that and came here to post this :) Very useful, wasn't aware of this option!

Nice Solution


Title: Re: [1 BTC bounty] Remove address from Bitcoin Core wallet
Post by: brituspol on February 01, 2015, 09:48:57 PM
Use false to all addresses except the last with true.


Title: Re: [1 BTC bounty] Remove address from Bitcoin Core wallet
Post by: makemedoit on February 03, 2015, 09:23:18 PM
Alright, thanks for the importprivkey solution, that was stupid of me to not find myself... Should i give 0.5 BTC for that solution or what is the deal here as it was 1 of 2 questions?

What about the removeprivkey ? anyone have a solution for that?

In a PM i got this https://bitcoin.stackexchange.com/questions/3654/what-is-the-best-way-to-recover-from-an-accidental-double-spend/3657#3657
I dont know how to compile bitcoin core with "pull #220" and if its compatible with 0.9.4...