Issue Details

Number
24607
Title
wallet getbalance is slow with 3K addresses and 3M transactions
Description
**getbalance almost blocks bitcoin deamon on first call** <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --> I think that's a pretty common use case (and the recommended practice) for bitcoin businesses: to generate a new bitcoin address any time your customer wants to deposit something. After a while wallet has thousands of addresses and millions of transactions. After bitcoind starts, getbalance needs to be called (in case of bitcoin-qt it done in background). Service gets stuck as it takes a lot of time (im my case 11 hours) to calculate and cache the balance. **It would be good to cache the wallet balance in order to speed up spin-up time** I have made wallet in testnet with 3K watch only addresses (with lot of transactions) In total it has ~3M transactions **Caching would help a lot** Speed-up can bee achieved by storing m_amounts next to transaction data in the wallet DB. **Any other ideas, recommendations are more than welcome**
URL
https://github.com/bitcoin/bitcoin/issue/24607
Closed by
Back to List