Author

Topic: Anyone understand bitcoin-core "accounts" language? (Read 536 times)

full member
Activity: 210
Merit: 104
“Create Your Decentralized Life”
https://en.bitcoin.it/wiki/Accounts_explained

A little bit of copy and paste :
Crap... I was looking at the developer reference trying to understand RPC... I stopped looking at the wiki... should have checked...
sr. member
Activity: 518
Merit: 250
Quote
'..Each account is associated with zero or more receiving addresses,

This is one of Bitcoin's most brilliant innovations
hero member
Activity: 718
Merit: 545
It's certainly not what I would describe as completely intuitive..

https://en.bitcoin.it/wiki/Accounts_explained

A little bit of copy and paste :

'..When you receive bitcoins, they are always assigned to one of your accounts, and you can change which account is credited based on which bitcoin address receives the coins, just like you tell a bank teller which account to credit when you deposit cash in your bank. However, sending bitcoins is like withdrawing cash from the bank; the coins that are sent out and debited from an account are almost always not the same coins that were deposited into that account...'

'..Each account is associated with zero or more receiving addresses, and every receiving address is associated with exactly one account. Coins sent to a receiving address in the wallet are credited to the associated account..'

'..The sendfrom method sends coins and debits the specified account. It does **not** change Bitcoin's algorithm for selecting which coins in the wallet are sent-- you should think of the coins in the wallet as being mixed together when they are received..'

And finally..

'..'sendtoaddress' always succeeds if there are sufficient funds in the
   server's wallet.  For example, if your wallet account balances were 100 BTC in account
   'foo' and 0 BTC in the default account, then the balances after sendtoaddress
   1PC9aZC4hNX2rmmrt7uHTfYAS3hRbph4UN 10.00 would be 100 in account 'foo' and -10.00 in
   the default account (and the overall server balance would go from 100 to 90 BTC).  On
   the other hand, using 'sendfrom' to send from the default account with a zero balance
   will fail with message "Account has insufficient funds"...'


Even though an account balance can be negative the overall balance of a complete wallet, cannot be negative.

There really isn't a concept of 'accounts' and 'addresses' at the heart of bitcoin. It's all about TXN outputs and scripts, that can be 'spent' (split into other outputs with scripts) by providing a valid script input. (Notice no mention of accounts and addresses etc..)

This may be where the confusion arises.
full member
Activity: 210
Merit: 104
“Create Your Decentralized Life”
I've been trying to study the RPC and there are times where "accounts" is used and others where "address" is used.  There is also a command called "move" which moves balances from one account to another.  My accounts have a negative balance (neat trick).

So can someone explain what an account is?

How are accounts and change addresses correlated?

How do I get a negative balance in an account?

How do I merge accounts?
Jump to: