MrKain (OP)
Newbie
Offline
Activity: 24
Merit: 0
|
|
June 16, 2013, 12:07:17 AM |
|
I've finally accepted that creating a new address for each transaction is kind of a good idea.. Am I correct in thinking - that for each customer that comes to my shop I generate/give to them a unique bitcoin address , so that I know that if the address in question receives money , then it's surely from the person I gave the address to..
This is fine, - but that could end being hundreds or even thousands of addresses being generated everyday..
I understand that generating a new address is not a big deal, but the housekeeping of my bitcoin server becomes an issue..
How can I delete addresses from the database when I am done with them ( for example, once an address receives coins, I make a note of it in my mysql for example, and 'move' the coins to one central internal bitcoin address).
If I have thousands of addresses/accounts , anytime I do a listaccounts or getbalance I'm going to get a really long list..
So , that's my query - can I delete bitcoin addresses and/or accounts from bitcoind to keep everything running smooth..
|
|
|
|
SwiftHF
Newbie
Offline
Activity: 24
Merit: 0
|
|
June 16, 2013, 12:48:10 AM |
|
Keeping in mind that each address has essentially it's own balance, you would need to transfer the balance to one central address before deleting it. To delete them, you could probably design a script based from pywallet, it wouldn't be hard.
|
|
|
|
grue
Legendary
Offline
Activity: 2058
Merit: 1452
|
|
June 16, 2013, 02:28:38 AM |
|
pywallet can delete addresses from your wallet. But you don't need to clean your wallet at all. Bitcoin will run fine even with tens of thousands of addresses. Also, instead of polling for transactions, consider using "walletnotify" to get instant notification of transactions.
|
|
|
|
niko
|
|
June 16, 2013, 02:45:22 AM |
|
I would never delete private keys from a wallet, unless I backed them up first. There is no good reason to destroy a key, and there are good reasons to keep them.
|
They're there, in their room. Your mining rig is on fire, yet you're very calm.
|
|
|
redtwitz
|
|
June 16, 2013, 03:41:57 AM |
|
There is no good reason to destroy a key, and there are good reasons to keep them.
Exactly. Imagine a user sending his payment from several different wallets (e.g., a hot and a cold one) and your script already purged the address after the first incoming transaction...
|
|
|
|
RagnarDanneskjold
|
|
June 16, 2013, 05:48:28 AM |
|
I believe there is possibly a solution for what you describe using HD wallets. Not sure what or how. https://en.bitcoin.it/wiki/BIP_0032
|
git | | ID'Bitcoin is the progress toward a society of privacy. The savage’s whole existence is public, ruled by the laws of his tribe. Bitcoin is the process of setting man free from men'
|
|
|
odolvlobo
Legendary
Offline
Activity: 4494
Merit: 3403
|
|
June 16, 2013, 05:58:17 AM |
|
Instead, could you reuse addresses from a large pool to limit the total number?
|
Join an anti-signature campaign: Click ignore on the members of signature campaigns. PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
|
|
|
SgtSpike
Legendary
Offline
Activity: 1400
Merit: 1005
|
|
June 16, 2013, 06:00:56 AM |
|
For what it's worth, I did begin to run in to some significant slowdowns when I hit 75,000-100,000 addresses in a single wallet. There IS a practical limit to the number of addresses that can/should be kept.
Bitpay, for example, reuses their addresses. I don't know how large a pool of addresses they keep, but I've noticed that payments I have made through bitpay are sent to addresses that have previously received coins already.
|
|
|
|
Sukrim
Legendary
Offline
Activity: 2618
Merit: 1007
|
|
June 16, 2013, 07:33:49 AM |
|
I personally would use BIP32 keys and keep the last X (depending on the business) last used keys in the wallet, the rest can be purged and regenerated on demand anyways.
MtGox claims to have several million private keys (most probably in cold storage) afair.
|
|
|
|
Remember remember the 5th of November
Legendary
Offline
Activity: 1862
Merit: 1011
Reverse engineer from time to time
|
|
June 16, 2013, 07:47:43 AM |
|
pywallet can delete addresses from your wallet. But you don't need to clean your wallet at all. Bitcoin will run fine even with tens of thousands of addresses. Also, instead of polling for transactions, consider using "walletnotify" to get instant notification of transactions.
It will indeed run fine, but it will take waay more time to load up. I am talking from experience, with a 200k address wallet.
|
BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
|
|
|
grau
|
|
June 16, 2013, 07:21:02 PM |
|
HD (Hierarchical Deterministic) key generation as designed in https://en.bitcoin.it/wiki/BIP_0032 will solve this for good as you may use a large number of addresses but only need to back up the master key.
|
|
|
|
jackjack
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
June 17, 2013, 12:33:04 PM |
|
pywallet can delete addresses from your wallet. But you don't need to clean your wallet at all. Bitcoin will run fine even with tens of thousands of addresses. Also, instead of polling for transactions, consider using "walletnotify" to get instant notification of transactions.
It will indeed run fine, but it will take waay more time to load up. I am talking from experience, with a 200k address wallet. If you think something in pywallet can be improved, you can post in its thread, that's the point of it For example someone reported a similar problem (time-consuming transaction deletions) https://bitcointalk.org/index.php?topic=34028.msg2206558#msg2206558 and it was fixed
|
Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2 Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
|
|
|
Sukrim
Legendary
Offline
Activity: 2618
Merit: 1007
|
|
June 17, 2013, 01:49:24 PM |
|
I guess he/she is talking about bitcoin-qt taking long to load up with >200k private keys, not pywallet.
|
|
|
|
jackjack
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
June 17, 2013, 01:53:20 PM |
|
I guess he/she is talking about bitcoin-qt taking long to load up with >200k private keys, not pywallet.
Oh, indeed it looks like I misunderstood, sorry... Post deleted Now that I'm here, if pywallet be some help here just tell me
|
Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2 Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
|
|
|
DannyHamilton
Legendary
Offline
Activity: 3486
Merit: 4831
|
|
June 20, 2013, 07:39:32 PM |
|
I'd be tempted to use a new temporary wallet each day.
At the end of the day, you empty the entire balance of the temporary wallet by sending it all to some other wallet where you consolidate your funds. Then you change the name of the temporary wallet.dat to yyyymmdd.dat and archive it off somewhere safe. You start the new day with a brand new wallet.dat.
If you ever need to, you can still retrieve private keys from the archived off wallets, but you have no need to clutter up your daily wallet with addresses that you don't intend to ever use again.
|
|
|
|
|