Bitcoin Forum
May 17, 2024, 12:41:46 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Do you use "account" for multi user systems?  (Read 919 times)
bananas (OP)
Sr. Member
****
Offline Offline

Activity: 364
Merit: 257


View Profile
March 23, 2014, 10:30:49 PM
 #1

Do you use the "account" feature of bitcoin daemon to a multi user/wallet system? If so, tell me how it is going on.

I've been recommended to not do it. But i'm doing extensive tests and it showed no problems.
Foxpup
Legendary
*
Offline Offline

Activity: 4368
Merit: 3044


Vile Vixen and Miss Bitcointalk 2021-2023


View Profile
March 24, 2014, 01:52:59 AM
 #2

What are you trying to do? If by "multi-user system", you mean an operating system with multiple user accounts, then no. On a multi-user system, each user gets their own data directory with their own wallet.dat file. If you mean a system that runs as a single user but is accessed by multiple clients, such as an exchange or online wallet, then you need to define your terms better.

Will pretend to do unspeakable things (while actually eating a taco) for bitcoins: 1K6d1EviQKX3SVKjPYmJGyWBb1avbmCFM4
I am not on the scammers' paradise known as Telegram! Do not believe anyone claiming to be me off-forum without a signed message from the above address! Accept no excuses and make no exceptions!
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1025



View Profile
March 24, 2014, 04:17:24 AM
 #3

Any time the question is "Accounts?" the answer is no.

Not that accounts aren't usable, or useful.  Just that if you are asking questions about them, you don't know enough about them to use them safely.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
bananas (OP)
Sr. Member
****
Offline Offline

Activity: 364
Merit: 257


View Profile
March 24, 2014, 04:09:24 PM
 #4

Any time the question is "Accounts?" the answer is no.

Not that accounts aren't usable, or useful.  Just that if you are asking questions about them, you don't know enough about them to use them safely.

So how to use them safely? I always only get those vague warning like nobody knows...
bananas (OP)
Sr. Member
****
Offline Offline

Activity: 364
Merit: 257


View Profile
March 24, 2014, 04:14:14 PM
 #5

What are you trying to do? If by "multi-user system", you mean an operating system with multiple user accounts, then no. On a multi-user system, each user gets their own data directory with their own wallet.dat file. If you mean a system that runs as a single user but is accessed by multiple clients, such as an exchange or online wallet, then you need to define your terms better.

I mean like an exchange, an online service. where users who signed up can create an account and deposit and withdraw their btc funds at any time.
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1025



View Profile
March 24, 2014, 05:10:16 PM
 #6

Any time the question is "Accounts?" the answer is no.

Not that accounts aren't usable, or useful.  Just that if you are asking questions about them, you don't know enough about them to use them safely.

So how to use them safely? I always only get those vague warning like nobody knows...

The secret to account safety is understanding when they are updated, and which one is getting updated.

When a new transaction comes in, all accounts are checked to see if the destination address is tagged as an account member, if any are, that account is updated, if none are, the default account is updated.

When a new spend is created, the account explicitly mentioned in the command (which is usually the default account, is updated.

When a move command is executed, the two accounts explicitly mentioned are updated.

The first two big pits that people tend to run into are:

Tagging an address into an account does not update that account with transactions already known.

The coin selector doesn't know or care about accounts.  A spend tagged with account "B" does not necessarily use a transaction that had come in to "B" before.  A spend that redeems a transaction that had come in to account "B" does not update account "B", unless you explicitly mention account "B" in the command.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
fbueller
Sr. Member
****
Offline Offline

Activity: 412
Merit: 275


View Profile
March 25, 2014, 12:32:13 AM
 #7

The accounts system doesn't scale well, and if you begin to move funds between them you'll start to end up with negative balances, so its hard to rely on them.

I wrote a scraper for transactions being paid to addresses I generated from an electrum mpk. There are cleverer ways to set up a service that doesn't involve asking users to blindly send their btc to you.

Bitwasp Developer.
bananas (OP)
Sr. Member
****
Offline Offline

Activity: 364
Merit: 257


View Profile
March 25, 2014, 09:06:36 PM
 #8

Any time the question is "Accounts?" the answer is no.

Not that accounts aren't usable, or useful.  Just that if you are asking questions about them, you don't know enough about them to use them safely.

So how to use them safely? I always only get those vague warning like nobody knows...



The coin selector doesn't know or care about accounts.  A spend tagged with account "B" does not necessarily use a transaction that had come in to "B" before.  A spend that redeems a transaction that had come in to account "B" does not update account "B", unless you explicitly mention account "B" in the command.

I understand a spend does not consider accounts, but is not the account balance always updated as if the spend was from the specified account?

sendfrom    <fromaccount> <tobitcoinaddress> <amount> [minconf=1]

As far as the accounts balances are always correctly updated, it is not an issue to me where coins actually come from.

bananas (OP)
Sr. Member
****
Offline Offline

Activity: 364
Merit: 257


View Profile
March 25, 2014, 09:09:45 PM
 #9

The accounts system doesn't scale well, and if you begin to move funds between them you'll start to end up with negative balances, so its hard to rely on them.



How would i end up with negative balances? I  know it can get negative is the wallet(but not the account) has funds. But is not it just a matter of checking the account balance before doing any related transaction? like if $withdrawvalue > $accountbalance do not allow move/send.
Abdussamad
Legendary
*
Offline Offline

Activity: 3612
Merit: 1564



View Profile
March 25, 2014, 10:32:13 PM
 #10

The accounts system doesn't scale well, and if you begin to move funds between them you'll start to end up with negative balances, so its hard to rely on them.



How would i end up with negative balances? I  know it can get negative is the wallet(but not the account) has funds. But is not it just a matter of checking the account balance before doing any related transaction? like if $withdrawvalue > $accountbalance do not allow move/send.

If you have to do that in your application then why use bitcoind accounts at all? Make up your own accounts system.
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!