Bitcoin Forum
May 09, 2024, 05:32:59 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Is bitcoind reliable when depending on it for web services?  (Read 2144 times)
davout
Legendary
*
Offline Offline

Activity: 1372
Merit: 1007


1davout


View Profile WWW
May 17, 2013, 11:56:14 AM
 #21

Accounts does not scale if implemented naively.

A combination of local cache and subscription can however scale as i described before. BTW this is the logic of the wallet too, just tightly coupled in the satoshi implementation

Please proceed to getting a clue.
The accounts feature does not scale in bitcoind, once you pass a few 10k accounts it starts slowing everything down.
These problems instantly go away as soon as you start doing the accounting externally.

1715275979
Hero Member
*
Offline Offline

Posts: 1715275979

View Profile Personal Message (Offline)

Ignore
1715275979
Reply with quote  #2

1715275979
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Terk
Hero Member
*****
Offline Offline

Activity: 616
Merit: 522



View Profile
May 17, 2013, 11:58:42 AM
 #22

Please proceed to getting a clue.
The accounts feature does not scale in bitcoind, once you pass a few 10k accounts it starts slowing everything down.
These problems instantly go away as soon as you start doing the accounting externally.

This is something I've been wondering recently. So if you expect to manage dozens thousands addresses, then it's better not to use bitcoind wallet at all, manage everything on your own (on the level of unspent outputs which your software choses to build rawtransaction) and operate on rawtransactions? Use bitcoind only as block reader and then for pushing tx?

CoinBomb
Full Member
***
Offline Offline

Activity: 179
Merit: 100



View Profile WWW
June 04, 2013, 08:16:52 PM
 #23

I cant work out a decent way to handle a high number of users with bitcoind - the problem im having is seeing what new transactions have come in.

listtransactions appears to be severely flawed - you have to walk backwards though the list (how do I avoid missing something if it can be re-organised at any time?).

List unspent is wallet wide, and it would only work if the entire transaction is cleared from the wallet after it comes in (i'm assuming change addresses would show up here after a transaction)

having one account for the entire site, with 24 hour throwaway deposit addresses could work (they'd only be polled waiting for incoming transactions for 24 hours) - but its not ideal for the user.

walletnotify might work. but its not supported by litecoind (yet?)

how does everyone else do it?

Promote our site for no risk BTC / LTC profit! 1% gross profit, LTC/BTC payments weekly. Click through for more details.
NielDLR
Member
**
Offline Offline

Activity: 95
Merit: 10



View Profile WWW
June 05, 2013, 12:33:48 AM
 #24

I cant work out a decent way to handle a high number of users with bitcoind - the problem im having is seeing what new transactions have come in.

listtransactions appears to be severely flawed - you have to walk backwards though the list (how do I avoid missing something if it can be re-organised at any time?).

List unspent is wallet wide, and it would only work if the entire transaction is cleared from the wallet after it comes in (i'm assuming change addresses would show up here after a transaction)

having one account for the entire site, with 24 hour throwaway deposit addresses could work (they'd only be polled waiting for incoming transactions for 24 hours) - but its not ideal for the user.

walletnotify might work. but its not supported by litecoind (yet?)

how does everyone else do it?

Busy doing development on a Bitcoin service at the moment. Although we haven't launched yet (soon!), we've tested the system and everything seems to working quite well so far. (Not sure on scalability of course).

You have to use the listsinceblock command. This makes getting new transactions much clearer. The ones that come in, you're sure will be recent transactions you have not seen before. Then you sort the list via the 'timereceived' parameter. Depending on how you handle transactions, but once a new transaction is confirmed, you save the blockhash. Now when you poll for new transactions, you have a place to start from.

You'll probably have to create a replica of the wallet transactions in another DB for persistency (if the server goes down etc).

I hope this helps a bit more, it's hard to give exact advice if I'm not exactly sure what you need. However, I would definitely recommend looking into the listsinceblock command to get your transactions, rather than listtransactions.

The Cypherfunks - A decentralized band and cryptocurrency. The first cryptocollective.
davout
Legendary
*
Offline Offline

Activity: 1372
Merit: 1007


1davout


View Profile WWW
June 05, 2013, 06:35:12 AM
 #25

Polling = fail

Pages: « 1 [2]  All
  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!