Bitcoin Forum
May 09, 2024, 12:23:22 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Anyone understand bitcoin-core "accounts" language?  (Read 501 times)
d4n13 (OP)
Full Member
***
Offline Offline

Activity: 210
Merit: 101


“Create Your Decentralized Life”


View Profile
July 15, 2015, 05:11:09 AM
 #1

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?

1715257402
Hero Member
*
Offline Offline

Posts: 1715257402

View Profile Personal Message (Offline)

Ignore
1715257402
Reply with quote  #2

1715257402
Report to moderator
1715257402
Hero Member
*
Offline Offline

Posts: 1715257402

View Profile Personal Message (Offline)

Ignore
1715257402
Reply with quote  #2

1715257402
Report to moderator
1715257402
Hero Member
*
Offline Offline

Posts: 1715257402

View Profile Personal Message (Offline)

Ignore
1715257402
Reply with quote  #2

1715257402
Report to moderator
Transactions must be included in a block to be properly completed. When you send a transaction, it is broadcast to miners. Miners can then optionally include it in their next blocks. Miners will be more inclined to include your transaction if it has a higher transaction fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715257402
Hero Member
*
Offline Offline

Posts: 1715257402

View Profile Personal Message (Offline)

Ignore
1715257402
Reply with quote  #2

1715257402
Report to moderator
spartacusrex
Hero Member
*****
Offline Offline

Activity: 718
Merit: 545



View Profile
July 15, 2015, 09:53:53 AM
 #2

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.

Life is Code.
runpaint
Sr. Member
****
Offline Offline

Activity: 518
Merit: 250



View Profile
July 15, 2015, 10:09:22 AM
 #3

Quote
'..Each account is associated with zero or more receiving addresses,

This is one of Bitcoin's most brilliant innovations

GoldenCryptoCommod.com
d4n13 (OP)
Full Member
***
Offline Offline

Activity: 210
Merit: 101


“Create Your Decentralized Life”


View Profile
July 15, 2015, 03:16:11 PM
 #4

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...

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!