Pages:
Author

Topic: Best client for importing multiple private keys? (Read 8398 times)

legendary
Activity: 1022
Merit: 1008
Delusional crypto obsessionist
November 11, 2015, 08:16:24 AM
#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?
hero member
Activity: 525
Merit: 531
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.
legendary
Activity: 1022
Merit: 1008
Delusional crypto obsessionist
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.
member
Activity: 60
Merit: 10
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.
sr. member
Activity: 458
Merit: 250
From nothing to nothing
Looking for changing addresses to a website in bulk, spent lot of time to figure out. I would have visited this section often.
sr. member
Activity: 467
Merit: 267
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.
hero member
Activity: 1022
Merit: 500
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.
full member
Activity: 217
Merit: 259
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.
legendary
Activity: 2226
Merit: 1052
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 !!!
hero member
Activity: 868
Merit: 1000
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
full member
Activity: 217
Merit: 259
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.
hero member
Activity: 602
Merit: 501
did anyone finally figure out a way to do this in bulk without triggering rescan ?

say for 250 addresses
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
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.
newbie
Activity: 25
Merit: 0
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?
hero member
Activity: 708
Merit: 502
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!
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
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.
hero member
Activity: 708
Merit: 502
create & execute .bat file with lines like

Code:
"C:\Program Files\Bitcoin\daemon\bitcoind.exe" importprivkey L4mP3joYEhSv1ofdsWbz8xEmqCmYK9vGyi8mJmWWbh79Xx2NsS1M addr-1DfyaDvr-1 false
"C:\Program Files\Bitcoin\daemon\bitcoind.exe" importprivkey Ky2EGjWLhfKv1sWnPcuN4SHF2iALj6SfK7hoLWKx5T4zMqXg7aT9 addr-1DfyaDvr-2 false
"C:\Program Files\Bitcoin\daemon\bitcoind.exe" importprivkey KzrZ4DULdVWFqpF48pdJicFJfX5dqrhxBkqDnT4HRkCswdFy3Eo4 addr-1DfyaDvr-3 false
"C:\Program Files\Bitcoin\daemon\bitcoind.exe" importprivkey L2ELWXewr1PQnMwFDpfobHFqspyM6g1noM4uzkCMgoSZTSf3sQJF addr-1DfyaDvr-4 false
...


each string will trigger whole blockchain rescan

is there a way to import in bulk?
like:
"C:\Program Files\Bitcoin\daemon\bitcoind.exe" importprivkey key1 key2 key3

to trigger just 1 rescan to save time?

Thank you guys if anybody knows answer!
legendary
Activity: 1260
Merit: 1019
create & execute .bat file with lines like

Code:
"C:\Program Files\Bitcoin\daemon\bitcoind.exe" importprivkey L4mP3joYEhSv1ofdsWbz8xEmqCmYK9vGyi8mJmWWbh79Xx2NsS1M addr-1DfyaDvr-1 false
"C:\Program Files\Bitcoin\daemon\bitcoind.exe" importprivkey Ky2EGjWLhfKv1sWnPcuN4SHF2iALj6SfK7hoLWKx5T4zMqXg7aT9 addr-1DfyaDvr-2 false
"C:\Program Files\Bitcoin\daemon\bitcoind.exe" importprivkey KzrZ4DULdVWFqpF48pdJicFJfX5dqrhxBkqDnT4HRkCswdFy3Eo4 addr-1DfyaDvr-3 false
"C:\Program Files\Bitcoin\daemon\bitcoind.exe" importprivkey L2ELWXewr1PQnMwFDpfobHFqspyM6g1noM4uzkCMgoSZTSf3sQJF addr-1DfyaDvr-4 false
...
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
Yes, that's the idea. But I need to import 5000~10000 keys. I don't want to be doing that one by one.
legendary
Activity: 1260
Merit: 1019
Sorry for the necro-bump, but is there a way to bulk import a few thousand keys into an encrypted wallet.dat (Bitcoin Core wallet, version 0.9.3)?

What I'm trying to do:

1. brand new wallet.dat (I call it empty.dat)
2. encrypt it with crazy long password
3. import keys using bitcoin-cli / bitcoind

However, I need to import a few thousand keys.

Why not to
1. create new wallet.dat on offline computer even with no blockchain
2. import keys using bitcoin-cli / bitcoind
3. encrypt it with crazy long password
4. move wallet.dat to server

Pages:
Jump to: