Bitcoin Forum
May 08, 2024, 09:17:15 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Account-feature stable?  (Read 858 times)
hardcode (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
April 10, 2015, 12:36:57 PM
 #1

Is the account feature in the bitcoind client stable to manage 1,000's of accounts for a wallet service or is it better to manage balances/transactions using it's own database?

1715203035
Hero Member
*
Offline Offline

Posts: 1715203035

View Profile Personal Message (Offline)

Ignore
1715203035
Reply with quote  #2

1715203035
Report to moderator
1715203035
Hero Member
*
Offline Offline

Posts: 1715203035

View Profile Personal Message (Offline)

Ignore
1715203035
Reply with quote  #2

1715203035
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
April 10, 2015, 01:38:53 PM
 #2

Use your own database.

The account feature in the Bitcoin Core wallet doesn't work the way most people seem to assume it works.
hardcode (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
April 10, 2015, 02:31:38 PM
 #3

Use your own database.

The account feature in the Bitcoin Core wallet doesn't work the way most people seem to assume it works.

I know how it works and found a way to make it work with my application, but my question is what would be better in terms of performance and stability. How do others do it when developing wallet functionality? I found a few code examples but seem to be using the account feature instead.

Are there any better alternatives to the bitcoin core wallet to do this?
Muhammed Zakir
Hero Member
*****
Offline Offline

Activity: 560
Merit: 506


I prefer Zakir over Muhammed when mentioning me!


View Profile WWW
April 10, 2015, 03:26:09 PM
 #4

I know how it works and found a way to make it work with my application, but my question is what would be better in terms of performance and stability. How do others do it when developing wallet functionality? I found a few code examples but seem to be using the account feature instead.

Are there any better alternatives to the bitcoin core wallet to do this?

AFAIK almost all people use Bitcoin core for these things including exchanges. I don't know of any other wallets which have or is good for RPC.

hardcode (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
April 10, 2015, 05:04:37 PM
 #5

I know how it works and found a way to make it work with my application, but my question is what would be better in terms of performance and stability. How do others do it when developing wallet functionality? I found a few code examples but seem to be using the account feature instead.

Are there any better alternatives to the bitcoin core wallet to do this?

AFAIK almost all people use Bitcoin core for these things including exchanges. I don't know of any other wallets which have or is good for RPC.
I was looking and couldn't find any others indeed. Would these exchanges use their own DB or rely on the accounting feature in the core client?
2112
Legendary
*
Offline Offline

Activity: 2128
Merit: 1068



View Profile
April 10, 2015, 05:34:07 PM
 #6

I know how it works and found a way to make it work with my application, but my question is what would be better in terms of performance and stability. How do others do it when developing wallet functionality? I found a few code examples but seem to be using the account feature instead.
Thus far any business that claimed to understand and utilize the built-in account functionality turned out to be either:

1) incompetent (they only thought they understand)
2) fraudulent (it was just a convenient scapegoat for a premeditated scam)
3) some combination of above

with the end result being the loss of the depositor's funds.

Please comment, critique, criticize or ridicule BIP 2112: https://bitcointalk.org/index.php?topic=54382.0
Long-term mining prognosis: https://bitcointalk.org/index.php?topic=91101.0
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
April 10, 2015, 05:44:33 PM
 #7

I know how it works and found a way to make it work with my application, but my question is what would be better in terms of performance and stability. How do others do it when developing wallet functionality? I found a few code examples but seem to be using the account feature instead.
Thus far any business that claimed to understand and utilize the built-in account functionality turned out to be either:

1) incompetent (they only thought they understand)
2) fraudulent (it was just a convenient scapegoat for a premeditated scam)
3) some combination of above

with the end result being the loss of the depositor's funds.

Exactly.

It is perhaps possible that hardcode is in the small percentage of developers that have taken the time to carefully understand exactly how the account feature works and how to use it properly.  However, it is FAR more likely that hardcode is just one of the vast majority of developers that have misunderstood how the account feature works and is likely to end up unpleasantly surprised if they choose not to create their own account system in their own database.
hardcode (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
April 10, 2015, 06:19:01 PM
 #8

I think this clears all my questions out, thank you everybody for giving me the advice!
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5194
Merit: 12976


View Profile
April 10, 2015, 08:33:52 PM
 #9

I like the accounts feature. It is probably slower than a real database (though I haven't benchmarked it), but it promotes good practices and it's very easy to use once you know how it works. However, it is designed mainly for the simple case of accepting payments, and that's probably all you should use it for. Don't use it as the basis of any sort of EWallet. Don't allow users to automatically withdraw BTC from your site if you're using accounts (unless you're a Bitcoin expert and you're super careful).

Bitcointalk.org uses accounts for the registration fee. Each user gets a unique account "forumuser_$UID" (so I'd be "forumuser_35"). I get their address with getaccountaddress forumuser_$user and check their balance with getbalance forumuser_$user $minconf. Bitcointalk.org's core Bitcoin handling code is just 82 lines, and it uses no libraries (JSON-RPC handling is 34 of these lines).

AFAIK accounts don't scale well enough for huge services to use them, but most sites should be fine. Keep in mind that you should not store much money on a live server, so you should sweep all money to an offline wallet frequently or do some sort of watch-only wallet setup. Also, you must backup wallet.dat at least as often as you backup your database, since it will contain the important user<->address database.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
April 10, 2015, 08:41:13 PM
 #10

I like the accounts feature. It is probably slower than a real database (though I haven't benchmarked it), but it promotes good practices and it's very easy to use once you know how it works. However, it is designed mainly for the simple case of accepting payments, and that's probably all you should use it for.

I don't have anything against the accounts feature.  It's certainly a nice feature when used correctly.

Don't use it as the basis of any sort of EWallet.

And yet so many developers (including the OP) attempt to use it for exactly this purpose.

Don't allow users to withdraw BTC from your site if you're using accounts (unless you're a Bitcoin expert and you're super careful).

Exactly.  If you don't know exactly how the accounts feature works, there is a tendency to make assumptions.  Those assumptions tend to lead to disaster.
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!