How many addresses can be handled reliable in one wallet?

8

2

I am working on a project which may end up generating a few hundred (or even more) bitcoin addresses a day. From my understanding in theory there is no limit on the number of bitcoin addresses in a wallet, but i fear to run into scalability issues with bitcoind on the long run.

Will RAM or CPU usage increase significantly? Is there any known limit of the number of addresses?

Note: Probably 60-80% of these addresses will never receive any transaction. Don't know if this makes a difference.

TripleSpeeder

Posted 2012-10-02T10:14:05.513

Reputation: 510

Answers

4

There isn't a problem with storage but there is a problem with the computation time necessary when constructing spend transactions which involve a large number of inputs from your wallet.

This is a problem that is evidenced by those who run Martingale betting bots against SatoshiDICE for instance. After they get several thousand bitcoin addresses with transactions, their subsequent bet transactions that draw from those coins start to crawl.

A future release of the Bitcoin.org client will address this by switching from BDB to LevelDB. Additionally targeted for future release is "ultraprune" which will lessen the storage requirements as well.

In the meantime, InstaWallet is one service that was able to come up with a solution that mitigated the problem. They might be able to offer some suggestions.

Stephen Gornick

Posted 2012-10-02T10:14:05.513

Reputation: 26 118

3

From what I heard, Bitcoin uses a hash table for storing its addresses when checking new blocks and transactions for whether they are related to our wallet or not. This data structure should allow for fairly efficient data handling, meaning that it should scale fairly well with growing amount of addresses.

So, for any sane amount of addresses, Bitcoin should scale well. Generally, the size of the wallet.dat is small in comparison to how much RAM even a low-end machine has, so it shouldn't be much of an issue.

ThePiachu

Posted 2012-10-02T10:14:05.513

Reputation: 41 594