Pages:
Author

Topic: [Poll] Accounts in bitcoind (Read 3204 times)

legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
August 23, 2012, 09:42:05 AM
#32
No, the main reason isn't anonymity the reason is so transferring bitcoins between accounts using 'move' doesn't require a blockchain transaction.

Aha - this is beginning to make some more sense - is there an explanation of how the mechanics of the "move" command actually works documented somewhere (other than in the code)?
sr. member
Activity: 462
Merit: 250
I heart thebaron
August 23, 2012, 09:20:24 AM
#31
I still don't understand why the official client is smart enough to allow me to use the address book feature and CUSTOM LABEL incoming and outgoing addresses, but the API is too useless to use a common call to retrieve that same information from sends/receives in a dynamic transaction array.

Oh well....I made THAT thread ages ago and people thought I was retarded for suggesting such a thing.

Unfortunately I am not a coder, but listtransactions()-->LABEL sure would be a nice (although semi-redundant for 'accounts' ) addition....
legendary
Activity: 1652
Merit: 2301
Chief Scientist
August 23, 2012, 09:11:26 AM
#30
... the implementation could have easily been written to use a previously "labelled" address as the only input address for a "sendfrom" without changing the purpose at all. I assume the reason it wasn't done this way was to keep the pseudo-anonymity as strong as possible (which is something completely unlike the way any normal accounting works).

No, the main reason isn't anonymity the reason is so transferring bitcoins between accounts using 'move' doesn't require a blockchain transaction.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
August 23, 2012, 02:42:40 AM
#29
The purpose of "accounts" is to automatically adjust balances when there is a block chain reorganization.

I read through the links you gave (and thanks for the interesting reading) but still don't see how anything written there describes that the purpose of "accounts" is to automatically adjust balances due to a block chain reorg (it seems to me that reorgs are just something that has to be handled in order for it to give meaningful results with listtransactions).

AFAICT the purpose of "accounts" is to be able to divide tx's into separately labelled groups (much the same as in normal accounting with a GL) and thus to be able to get balances for each group (i.e. a "group" is an "account").

Perhaps if you replace the word "purpose" with "implementation" that might be closer, however, the implementation could have easily been written to use a previously "labelled" address as the only input address for a "sendfrom" without changing the purpose at all. I assume the reason it wasn't done this way was to keep the pseudo-anonymity as strong as possible (which is something completely unlike the way any normal accounting works).
 
NRF
sr. member
Activity: 279
Merit: 250
August 18, 2012, 07:51:54 PM
#28
And by nobody I mean that it doesn't matter wheter you run you accounts according to the rules of:

I agree, my calling it a ledger was a total stretch.  My point was that it is not an accounting system and "accounts" in the context of bitcoind is a bit confusing (at least for me, and others it seams judging from posts in this thread).

Don't really know what to call them and "Labels for transactions to track and prevent orphaned transactions showing up in bitcoind listtransactions being taken literal" is kind of a mouth full.  Grin

In the end I suppose "accounts" is as good a term as any, but it does tend to lead to confusion.
legendary
Activity: 2128
Merit: 1073
August 18, 2012, 07:31:50 PM
#27
as I see it its probably best described as a ledger.
Nobody will allow you to keep the ledger that silently wipes out the transactions and changes the timestamps on them. This is what bitcoin{d,-qt} does.

And by nobody I mean that it doesn't matter wheter you run you accounts according to the rules of:

1) Uncle Sam who lives in Washington,DC and charges 28% APY for overdue negative balances.

2) Uncle Vinnie who lives over the bodega and charges 1 finger per month for overdue negative balances.

It is relatively easy to actually keep the real ledger with modified bitcoin{d,-qt}. You need to override the db->put() BDB call to recognize writes to the wallet.dat and store the actual log of calls in some secondary database before calling the original C virtual function. This log will have proper timestamps (not the approximate to 2 hours and even possibly out of order timestamps) and will have a actual log of monies appearing and disappearing during the orphan/reorganization events.
NRF
sr. member
Activity: 279
Merit: 250
August 18, 2012, 04:41:17 PM
#26
didn't see so much contradictions in the same post until now. How isn't bitcoin an accounting software when it has to account for all the unspent inputs available to it?

Bitcoind is not accounting software, at least not in the traditional sense of what accounting software is (give me the command for an aged debtors).  As has been explained by others the "account" system is designed to address a very real problem that can occur during a block-chain reorganisation.  ( Good explanation here https://bitcointalksearch.org/topic/m.28228 )

Once again bitcoind is NOT an accounting program, as I see it its probably best described as a ledger.
legendary
Activity: 924
Merit: 1004
Firstbits: 1pirata
August 18, 2012, 02:49:51 PM
#25
I have (unsuccessfully) tried to use them, but I am terribly comfortable with them.

I think the concept of accounts is probably better left to accounting software and don't really fit into the scope of what the bitcoind should be doing.  Bitcoind is not (and does/should pretend to be) an accounting program.

If it were up to me the developers should just cut them out and concentrate on more important things, perhaps extending the [comment] [comment-to] system to work with incoming transactions.

^lol, didn't see so much contradictions in the same post until now. How isn't bitcoin an accounting software when it has to account for all the unspent inputs available to it?

Accounts work as ribuck said, for individual user accounting and they provide allot of features when used correctly. Like taking the burden of accounting of your main database and maintaining correct user balances, in case of chain reorgs. You can even have a complete website or app failure and no backups of the main database, but the coins are kept intact in every user's account with only one backup of wallet.dat.

I don't have the time to write a complete documentation, but I can assure you bitcoin accounts are useful and whoever tells you the opposite hasn't got a clue what are used for.

Sorry for the rant, I just turned my back for a moment lol

@weex learn how to "move" coins between accounts and you will see how easy the accounting gets, with no database overhead and it just works. Start using queues in case you want to have your app work smoothly and prevent accounts going negative if it isn't desired. That's all, now keep developing your app, bitcoin is all set-up.
legendary
Activity: 1904
Merit: 1002
August 18, 2012, 02:20:18 PM
#24
I would have preferred a low level interface with an optional high level interface.  As it stands the full low level interface isn't exposed, and the high level interface isn't suitable for all applications.


I strongly agree. I want something where I can specify addresses as inputs.

Bitcoind is ment for coders and admins, and so should expose the most base level interfaces. When I first started with bitcoin development the lack of these features was annoying.

When 0.7 comes out we'll have https://en.bitcoin.it/wiki/Raw_Transactions
hero member
Activity: 533
Merit: 501
August 18, 2012, 02:16:01 PM
#23
I would have preferred a low level interface with an optional high level interface.  As it stands the full low level interface isn't exposed, and the high level interface isn't suitable for all applications.


I strongly agree. I want something where I can specify addresses as inputs.

Bitcoind is ment for coders and admins, and so should expose the most base level interfaces. When I first started with bitcoin development the lack of these features was annoying.
donator
Activity: 826
Merit: 1060
August 18, 2012, 02:09:07 PM
#22
The purpose of "accounts" is to automatically adjust balances when there is a block chain reorganization.

Interesting - hadn't heard of this explanation before

In that case you would benefit from reading some of Satoshi's old posts about "accounts". You could start with these:

The problems with "listtransactions" that are addressed by "accounts":
https://bitcointalksearch.org/topic/m.28228

Jeff Garzik's counterpoint to the above post:
https://bitcointalksearch.org/topic/m.28247

Satoshi's simple pseudocode showing how to use the "accounts" feature:
https://bitcointalksearch.org/topic/m.28947
newbie
Activity: 29
Merit: 0
August 18, 2012, 11:49:31 AM
#21
I would have preferred a low level interface with an optional high level interface.  As it stands the full low level interface isn't exposed, and the high level interface isn't suitable for all applications.
legendary
Activity: 1904
Merit: 1002
August 18, 2012, 10:47:02 AM
#20
The purpose of "accounts" is to automatically adjust balances when there is a block chain reorganization.

Interesting - hadn't heard of this explanation before - has a block chain reorg occurred since the API commands were introduced?


Frequently two blocks are announced in a very short timeframe and part of the network works on extending each.  Last one occurred on August 15th.
http://blockexplorer.com/q/reorglog
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
August 18, 2012, 04:57:10 AM
#19
The purpose of "accounts" is to automatically adjust balances when there is a block chain reorganization.

Interesting - hadn't heard of this explanation before - has a block chain reorg occurred since the API commands were introduced?
donator
Activity: 826
Merit: 1060
August 18, 2012, 04:52:38 AM
#18
The purpose of "accounts" is to automatically adjust balances when there is a block chain reorganization.

Suppose you run a business selling widgets, and Fred sends you 10 bitcoins to buy a widget. If you have associated a receiving address with "Fred's account", that account will show a balance of 10 BTC.

Later, there is a block chain reorganization, and on the new block chain there is no longer a payment from Fred. In that case, the balance of "Fred's account" will show zero. If more blocks are successfully built onto the original chain, the block chain may be reorganized again, and the balance of "Fred's account" will again show 10BTC.

For many businesses, this is exactly what they want. If the business has an ongoing relationship with the customer, they know at all times how many coins they have received from that customer.

On the other hand, it's rather impractical, particularly for businesses with irreversable transactions or with lots of one-off transactions.

In practice, most businesses prefer to wait for (say) 6 confirmations of receiving the payment. The business then credits "Fred's account" (on their database, not in their Bitcoin client) with 10BTC, which the business regards as irrevocable. The widget is shipped to the customer at that point. If, later, there is a block chain reorganization, the widget business carries the loss on their books (although naturally if they know who the customer is they will try to recover the payment).

In normal circumstances, 6 confirmations is sufficient that a block chain reorganization is very unlikely to occur after that point. However, it's possible. When the overflow bug was affected, there was a block chain split that wasn't resolved until each user updated their Bitcoin software. For many users, this took longer than 6 confirmations (people gotta sleep, etc) so many people were running for a while on a faulty block chain that was destined to become orphaned.

(And yes, the ability to let an account balance go negative is a feature, not a bug.)
hero member
Activity: 501
Merit: 500
August 18, 2012, 04:15:43 AM
#17
I hate the feature and have not yet found any use for them; they confuse the user for no gain. If they implemented even a very rudimentary way to do manual coin control I'd use them.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
August 18, 2012, 04:08:27 AM
#16
Brings me to the question though, is a "website user account" system really in the scope of what bitcoind should be doing?

A good point - personally I think it was probably not such a great idea to have added the commands in the first place (although I can understand why they would have been requested) - the raw transaction commands are definitely something I see as being more useful.
NRF
sr. member
Activity: 279
Merit: 250
August 18, 2012, 04:03:36 AM
#15
Ah, yeah, that makes more sense I suppose, and it explains why they did not work like I thought they would.

Brings me to the question though, is a "website user account" system really in the scope of what bitcoind should be doing?
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
August 18, 2012, 03:57:56 AM
#14
Actually they are nothing like accounting accounts which is exactly why I (and I assume some others) was confused by them in the first place.

The idea of a Bitcoin "account" is to help support a "website user account" rather than anything to do with a general ledger in accounting.
NRF
sr. member
Activity: 279
Merit: 250
August 18, 2012, 03:54:51 AM
#13
I have (unsuccessfully) tried to use them, but I am terribly comfortable with them.

I think the concept of accounts is probably better left to accounting software and don't really fit into the scope of what the bitcoind should be doing.  Bitcoind is not (and does/should pretend to be) an accounting program.

If it were up to me the developers should just cut them out and concentrate on more important things, perhaps extending the [comment] [comment-to] system to work with incoming transactions.
Pages:
Jump to: