Bitcoin Forum
May 06, 2024, 07:38:01 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: A new address for each transaction ?  (Read 1198 times)
MrKain (OP)
Newbie
*
Offline Offline

Activity: 24
Merit: 0



View Profile
June 16, 2013, 12:07:17 AM
 #1


 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..


1714981081
Hero Member
*
Offline Offline

Posts: 1714981081

View Profile Personal Message (Offline)

Ignore
1714981081
Reply with quote  #2

1714981081
Report to moderator
1714981081
Hero Member
*
Offline Offline

Posts: 1714981081

View Profile Personal Message (Offline)

Ignore
1714981081
Reply with quote  #2

1714981081
Report to moderator
1714981081
Hero Member
*
Offline Offline

Posts: 1714981081

View Profile Personal Message (Offline)

Ignore
1714981081
Reply with quote  #2

1714981081
Report to moderator
The forum was founded in 2009 by Satoshi and Sirius. It replaced a SourceForge forum.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714981081
Hero Member
*
Offline Offline

Posts: 1714981081

View Profile Personal Message (Offline)

Ignore
1714981081
Reply with quote  #2

1714981081
Report to moderator
SwiftHF
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
June 16, 2013, 12:48:10 AM
 #2

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 Offline

Activity: 2058
Merit: 1431



View Profile
June 16, 2013, 02:28:38 AM
 #3

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 is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
niko
Hero Member
*****
Offline Offline

Activity: 756
Merit: 501


There is more to Bitcoin than bitcoins.


View Profile
June 16, 2013, 02:45:22 AM
 #4

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
Full Member
***
Offline Offline

Activity: 231
Merit: 100


View Profile
June 16, 2013, 03:41:57 AM
 #5

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
Full Member
***
Offline Offline

Activity: 144
Merit: 100



View Profile
June 16, 2013, 05:48:28 AM
 #6

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 Offline

Activity: 4298
Merit: 3214



View Profile
June 16, 2013, 05:58:17 AM
 #7

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 Offline

Activity: 1400
Merit: 1005



View Profile
June 16, 2013, 06:00:56 AM
 #8

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 Offline

Activity: 2618
Merit: 1006


View Profile
June 16, 2013, 07:33:49 AM
 #9

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.

https://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1862
Merit: 1011

Reverse engineer from time to time


View Profile
June 16, 2013, 07:47:43 AM
 #10

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
Hero Member
*****
Offline Offline

Activity: 836
Merit: 1021


bits of proof


View Profile WWW
June 16, 2013, 07:21:02 PM
 #11

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 Offline

Activity: 1176
Merit: 1233


May Bitcoin be touched by his Noodly Appendage


View Profile
June 17, 2013, 12:33:04 PM
 #12

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 Offline

Activity: 2618
Merit: 1006


View Profile
June 17, 2013, 01:49:24 PM
 #13

I guess he/she is talking about bitcoin-qt taking long to load up with >200k private keys, not pywallet.

https://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1233


May Bitcoin be touched by his Noodly Appendage


View Profile
June 17, 2013, 01:53:20 PM
 #14

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 Offline

Activity: 3388
Merit: 4616



View Profile
June 20, 2013, 07:39:32 PM
 #15

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.
Pages: [1]
  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!