Bitcoin Forum
November 10, 2024, 09:32:06 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Best client for importing multiple private keys?  (Read 8398 times)
Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
October 28, 2014, 02:41:22 AM
 #21

each string will trigger whole blockchain rescan

That's what the "false" at the end of each line is for. No rescan.

I'm going to try this, the last time didn't work because I'm using an encrypted wallet.

micax1
Hero Member
*****
Offline Offline

Activity: 708
Merit: 502


View Profile
October 28, 2014, 08:32:20 PM
 #22

each string will trigger whole blockchain rescan

That's what the "false" at the end of each line is for. No rescan.

I'm going to try this, the last time didn't work because I'm using an encrypted wallet.

it worked for unencrypted.
Thank you!
rrock
Newbie
*
Offline Offline

Activity: 25
Merit: 0


View Profile
October 31, 2014, 05:56:31 AM
 #23

Yes, that's the idea. But I need to import 5000~10000 keys. I don't want to be doing that one by one.

what?so many keys?   may i ask why u need them?
Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
October 31, 2014, 11:17:36 AM
 #24

Yes, that's the idea. But I need to import 5000~10000 keys. I don't want to be doing that one by one.

what?so many keys?   may i ask why u need them?

For a new website that will probably have a few thousand users (with deposit addresses) and of course change addresses.

bitcreditscc
Hero Member
*****
Offline Offline

Activity: 602
Merit: 501



View Profile
January 29, 2015, 11:36:42 PM
 #25

did anyone finally figure out a way to do this in bulk without triggering rescan ?

say for 250 addresses

johoe
Full Member
***
Offline Offline

Activity: 217
Merit: 259


View Profile
January 30, 2015, 01:26:24 AM
 #26

did anyone finally figure out a way to do this in bulk without triggering rescan ?

say for 250 addresses

As amaclin and Dabs on this thread already said, you need to add a third parameter false to importprivkey

Code:
bitcoin-cli importprivkey privatekey-1 somelabel false
bitcoin-cli importprivkey privatekey-2 somelabel false

Works fine even for 2000 addresses.  However, the next rescan will take some time, especially if there were many transactions.

Donations to 1CF62UFWXiKqFUmgQMUby9DpEW5LXjypU3
chaosknight
Hero Member
*****
Offline Offline

Activity: 868
Merit: 1000



View Profile
January 31, 2015, 09:29:12 AM
 #27

As amaclin and Dabs on this thread already said, you need to add a third parameter false to importprivkey

Code:
bitcoin-cli importprivkey privatekey-1 somelabel false
bitcoin-cli importprivkey privatekey-2 somelabel false

Works fine even for 2000 addresses.  However, the next rescan will take some time, especially if there were many transactions.
how much rescan time we can expect for 1000 private keys imported to wallet with parameter false to importprivkey command
newIndia
Legendary
*
Offline Offline

Activity: 2226
Merit: 1052


View Profile
January 31, 2015, 09:39:42 AM
 #28

did anyone finally figure out a way to do this in bulk without triggering rescan ?

say for 250 addresses

As amaclin and Dabs on this thread already said, you need to add a third parameter false to importprivkey

Code:
bitcoin-cli importprivkey privatekey-1 somelabel false
bitcoin-cli importprivkey privatekey-2 somelabel false

Works fine even for 2000 addresses.  However, the next rescan will take some time, especially if there were many transactions.

So, anything available in those addresses will be sent ? How do I send partial amount ? Moreover, is not there any parameter to mention the mining fee ? Tx without mining fee may take a long to confirm !!!

johoe
Full Member
***
Offline Offline

Activity: 217
Merit: 259


View Profile
January 31, 2015, 09:44:05 AM
 #29

As amaclin and Dabs on this thread already said, you need to add a third parameter false to importprivkey

Code:
bitcoin-cli importprivkey privatekey-1 somelabel false
bitcoin-cli importprivkey privatekey-2 somelabel false

Works fine even for 2000 addresses.  However, the next rescan will take some time, especially if there were many transactions.
how much rescan time we can expect for 1000 private keys imported to wallet with parameter false to importprivkey command


The import takes about a minute, but there is no rescan triggered.  

If you need the accurate balance, you have to rescan manually afterwards (it may be enough to import a private key with third parameter true, but I'm not sure).  With my 2000 weak keys (some of them had a lot of transactions) it took a full day to rescan the wallet.  My wallet.dat is about 500 MB.  If your keys are fresh and haven't occured on the blockchain, there is no need to rescan.

So, anything available in those addresses will be sent ? How do I send partial amount ? Moreover, is not there any parameter to mention the mining fee ? Tx without mining fee may take a long to confirm !!!

No, the commands send no transactions, they just put the private/public key into the wallet.  The rescan will just search for transactions and recompute the balance.  I don't think that bitcoind has support for sweeping an address.  You can of course just ask for the balance and then send that amount the usual way to a new address, e.g. using bitcoin-qt.

Donations to 1CF62UFWXiKqFUmgQMUby9DpEW5LXjypU3
picolo
Hero Member
*****
Offline Offline

Activity: 1022
Merit: 500



View Profile
January 31, 2015, 12:01:34 PM
 #30

I am looking to automate a process of importing a private key to a client, send a certain amount from the client then delete the private key before moving on to the next private key.

Currently I am figuring I can set up a fresh wallet.dat, import a private key and send the BTC, then overwrite the wallet.dat with a copy of the fresh wallet.dat.

There should be a better way.

Blockchain works fine.
hhanh00
Sr. Member
****
Offline Offline

Activity: 467
Merit: 267


View Profile
January 31, 2015, 01:40:06 PM
 #31

If you are only interested in balances, you can scan the utxo set and that only takes a minute but I don't know if it's possible with bitcoin core.

brituspol
Sr. Member
****
Offline Offline

Activity: 458
Merit: 250

From nothing to nothing


View Profile
February 01, 2015, 09:28:14 PM
 #32

Looking for changing addresses to a website in bulk, spent lot of time to figure out. I would have visited this section often.
Crypto9er
Member
**
Offline Offline

Activity: 60
Merit: 10


View Profile
February 01, 2015, 11:06:48 PM
 #33

I tried Bitcoin Armory to import multiple priv. keys (few thousands). It was fast. It took about 15 mins for all the process. and the rescan was very quick.
findftp
Legendary
*
Offline Offline

Activity: 1022
Merit: 1008

Delusional crypto obsessionist


View Profile
November 11, 2015, 12:54:37 AM
 #34

I tried Bitcoin Armory to import multiple priv. keys (few thousands). It was fast. It took about 15 mins for all the process. and the rescan was very quick.

Well, I'm trying the same with 900 private keys, but it takes more than 1,5 hour total already.
elbandi
Hero Member
*****
Offline Offline

Activity: 525
Merit: 531


View Profile
November 11, 2015, 01:14:45 PM
 #35

I tried Bitcoin Armory to import multiple priv. keys (few thousands). It was fast. It took about 15 mins for all the process. and the rescan was very quick.

Well, I'm trying the same with 900 private keys, but it takes more than 1,5 hour total already.

Code:
importprivkey "5yourveryveryveryverylongprivatekeystring" "my-new-key1" false
importprivkey "5yourveryveryveryverylongprivatekeystring" "my-new-key2" false
importprivkey "5yourveryveryveryverylongprivatekeystring" "my-new-key3" true
The last true triggers the rescan, other false are skip that. So you scan once for balance at the end.
findftp
Legendary
*
Offline Offline

Activity: 1022
Merit: 1008

Delusional crypto obsessionist


View Profile
November 11, 2015, 01:16:24 PM
 #36

I tried Bitcoin Armory to import multiple priv. keys (few thousands). It was fast. It took about 15 mins for all the process. and the rescan was very quick.

Well, I'm trying the same with 900 private keys, but it takes more than 1,5 hour total already.

Code:
importprivkey "5yourveryveryveryverylongprivatekeystring" "my-new-key1" false
importprivkey "5yourveryveryveryverylongprivatekeystring" "my-new-key2" false
importprivkey "5yourveryveryveryverylongprivatekeystring" "my-new-key3" true
The last true triggers the rescan, other false are skip that. So you scan once for balance at the end.


I assume this is a bitcoind implementation?
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!