Bitcoin Forum
May 07, 2024, 05:47:26 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Re: Managing multiple (100s-1000s) wallets with Bitcoin Core on: May 29, 2022, 10:40:46 AM
Any help is appreciated.  Grin

Just another idea/direction: for only getting the balance of an address, maybe using a local block explorer (maybe also with its own DB), connected to the same Bitcoin Core daemon, would be more useful?

Thanks for the reply. Yes I have thought of this but I couldn't find any blockchain explorer for Bitcoin Core... How would I create one by myself? Copy the whole blockchain to a database and how would I update/modify it with each transaction/change in the blockchain
2  Bitcoin / Development & Technical Discussion / Re: Managing multiple (100s-1000s) wallets with Bitcoin Core on: May 29, 2022, 10:13:58 AM
You don't want vanilla Bitcoin Core then. You have to mod it.

For such small things as reading the balance, you should read the wallet file directly using a BDB 4.8 C++ driver and do such calculations as summining the amounts in each address on your own.

In fact you should avoid loading wallets all together for your use-case, as it's not scalable.


Thanks for the reply. So how could I calculate the balance out of a wallet.dat file without having to search the addresses in a blockchain. I'm not trying to rely on a public API and the bitcoin core doesn't have a blockchain "explorer" as far as I know. So would I have to create a blockchain explorer first by storing the whole blockchain to a database? Are there any public projects that could give me an idea how its meant to be done...
3  Bitcoin / Development & Technical Discussion / Managing multiple (100s-1000s) wallets with Bitcoin Core on: May 28, 2022, 05:27:43 PM
Hello, I am creating an API that will connect to Bitcoin Core running on a server. The API would manage multiple wallets for a lot of users (up to 1000s)... Now I'm wondering how could I implement this to work as fast as possible. Is it possible to for example "getbalance" ("http://USER:PASS@localhost:8332/wallet/WALLETNAME") of a specific wallet without having it loaded? Because each loaded wallet takes about 10MB in memory.. And having 1000s of them loaded at the same time would take up a lot of ram and I am not sure how much stress it causes on the CPU for example, if anyone has any knowledge about this. Would it make sense for each API call to first load the wallet, execute the command and then unload the wallet? That would probably affect the performance. Any help is appreciated.  Grin
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!