Bitcoin Forum
December 15, 2024, 10:39:37 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Does the Bitcoin ledger balance?  (Read 887 times)
BianTcoin (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
May 20, 2017, 03:13:05 PM
 #1

I am sure there is a quick answer, do the totals in the bitcoin ledger balance to the coins issued?
Are the payments and the receipts balanced in each block?
iluvpie60
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500


View Profile
May 20, 2017, 04:49:45 PM
 #2

This does not exist. There is not something that "balances".

I suggest that you read through some of the FAQ and watch youtube videos detailing what bitcoin is.
BianTcoin (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
May 20, 2017, 05:36:51 PM
 #3

This does not exist. There is not something that "balances".

I suggest that you read through some of the FAQ and watch youtube videos detailing what bitcoin is.
Thanks, I did read the FAQs and could not find this.
Shouldn't this be part of checking the integrity of the ledger?
DannyHamilton
Legendary
*
Offline Offline

Activity: 3514
Merit: 4895



View Profile
May 20, 2017, 06:05:49 PM
 #4

I am sure there is a quick answer, do the totals in the bitcoin ledger balance to the coins issued?

"coins" don't actually exist.  That's just an abstraction that we humans use to make it easier to talk about the exchange of control over value.

Are the payments and the receipts balanced in each block?

Transactions consist of inputs (which provide value to the transaction) and outputs (which assign control over value).

The sum of the value of all the outputs is not allowed to exceed the sum of the value of all the inputs.  If it does, it is an invalid transaction and will be rejected by all miners and all nodes on the network.  If the sum of the value of all the outputs is LESS than the sum of the value of all the inputs, then the excess value is available for the miner (or mining pool) to pay to themselves as a transaction fee.

Every block has 1 special transaction that is allowed to break those rules.  This is often called the "coinbase" transaction or the "generation" transaction.  The block is allowed (and required) to have exactly 1 of these transactions.  This transaction has NO inputs.  The sum of the outputs of this transaction is not allowed to exceed the current block subsidy (which is how new value is added to the blockchain) plus the sum of all the transaction fees of all the transactions included in the block.  If this transaction tries to include more value in its outputs than it is allowed to, then the block will be rejected by ALL miners and ALL nodes on the system.

In this way, it is impossible for there to be more bitcoins than the protocol allows.

However, the blockchain does not "BALANCE".  While there are restrictions that prevent excess outputs to be created, there are no restrictions that prevent a miner or mining pool from paying themselves too little value in the outputs of their "generation" transaction.  While it would be pretty dumb for a miner to intentionally pay himself less than he is allowed to, this has accidentally happened more than once in the history of bitcoin.  When this happens, the excess value that was provided to the block, but which was not claimed by the miner simply ceases to exist.  There is no way to re-create it, and no way to get it back.  The value is effectively destroyed.  Therefore, there will never be 21,000,000 bitcoins.


BianTcoin (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
May 21, 2017, 09:56:47 AM
 #5



Quote
"coins" don't actually exist.  That's just an abstraction that we humans use to make it easier to talk about the exchange of control over value.
This is the same as most currency, which doesn't exist, there is not enough minted currency to cover bank balances 

Quote
Transactions consist of inputs (which provide value to the transaction) and outputs (which assign control over value).

The sum of the value of all the outputs is not allowed to exceed the sum of the value of all the inputs.  If it does, it is an invalid transaction and will be rejected by all miners and all nodes on the network.  If the sum of the value of all the outputs is LESS than the sum of the value of all the inputs, then the excess value is available for the miner (or mining pool) to pay to themselves as a transaction fee.

Every block has 1 special transaction that is allowed to break those rules.  This is often called the "coinbase" transaction or the "generation" transaction.  The block is allowed (and required) to have exactly 1 of these transactions.  This transaction has NO inputs.  The sum of the outputs of this transaction is not allowed to exceed the current block subsidy (which is how new value is added to the blockchain) plus the sum of all the transaction fees of all the transactions included in the block.  If this transaction tries to include more value in its outputs than it is allowed to, then the block will be rejected by ALL miners and ALL nodes on the system.

In this way, it is impossible for there to be more bitcoins than the protocol allows.

However, the blockchain does not "BALANCE".  While there are restrictions that prevent excess outputs to be created, there are no restrictions that prevent a miner or mining pool from paying themselves too little value in the outputs of their "generation" transaction.  While it would be pretty dumb for a miner to intentionally pay himself less than he is allowed to, this has accidentally happened more than once in the history of bitcoin.  When this happens, the excess value that was provided to the block, but which was not claimed by the miner simply ceases to exist.  There is no way to re-create it, and no way to get it back.  The value is effectively destroyed.  Therefore, there will never be 21,000,000 bitcoins.

Thanks for the detailed explanation so each block created currently increases the ledger by a maximum of 12.5BTC.
Shouldn't there be a mechanism to reclaim the accidental loss in a block chain and have that available for miners?
Has anyone tried to total the number of BTC in ledger?

Nagadota
Hero Member
*****
Offline Offline

Activity: 574
Merit: 500


ClaimWithMe - the most paying faucet of all times!


View Profile WWW
May 21, 2017, 10:17:52 AM
 #6

Thanks for the detailed explanation so each block created currently increases the ledger by a maximum of 12.5BTC.
Shouldn't there be a mechanism to reclaim the accidental loss in a block chain and have that available for miners?
Has anyone tried to total the number of BTC in ledger?
Blockchain.info has tried, along with some other sites.

However, many coins are lost as well.  There's a thread which attempts to count all of the known lost coins - last time I checked there was around 130,000 on there.  However, the actual number is likely to be much more, since Bitcoins were practically worth nothing when it first started.

Fortunately, lost coins are sort of limited by the market, since losing coins lowers the supply, thus pushing up the price and making each person own less coins to lose in the long run (and/or making them more careful with their coins).

7788bitcoin
Legendary
*
Offline Offline

Activity: 2282
Merit: 1023


View Profile
May 21, 2017, 10:18:01 AM
 #7

I am sure there is a quick answer, do the totals in the bitcoin ledger balance to the coins issued?
Are the payments and the receipts balanced in each block?

Quick answers to your doubts:

1.) The total amount is always tally;
2.) No bitcoin is lost between transactions; and
3.) No counterfeit bitcoin exist.

The only "way" to destroy circulating bitcoin is by sending them to the unspent-able so-called BitcoinEater addresses which were generated without private keys.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3514
Merit: 4895



View Profile
May 21, 2017, 01:50:44 PM
 #8

Thanks for the detailed explanation so each block created currently increases the ledger by a maximum of 12.5BTC.

Correct.

Shouldn't there be a mechanism to reclaim the accidental loss in a block chain and have that available for miners?

Why?

Has anyone tried to total the number of BTC in ledger?

Any time you start up a new instance of Bitcoin Core, it begins with the very first block and processes EVERY transaction. As it does so, it keeps a running list of all the unspent outputs. This is called the Unspent Transaction Output list, and is typically abbreviated to UTXO. This means that every copy of Bitcoin Core on the network verifies that the rules haven't been broken and has a total available.  You can see this total with the command:
Code:
gettxoutsetinfo

In addition to the value that was removed from the ledger which I mentioned in my earlier post, there is also a special type of output (OP_RETURN) that is defined as "unspendable".  Often users will create an OP_RETURN output with a value of 0 bitcoins which then allows them to store some data in that output (and therefore permanently store data in the bitcoin ledger).  Occasionally someone has either accidentally or intentionally sent a value greater than 0 bitcoins to one of these outputs. Because this output is defined as unspendable, Bitcoin Core can treat any such output as "gone from the ledger" and can subtract it from its UTXO.  This significantly reduces the load on the Bitcoin Core instance since it doesn't need to permanently keep all these data-storing unspendable outputs in its UTXO.  When you run gettxoutsetinfo the information it includes reflects an absence of these OP_RETURN outputs in addition to the value that was lost due to mining errors.

I just ran that command as I was writing this post and it currently returns:
Code:
{
  "height": 467441,
  "bestblock": "000000000000000001240b0fadf761adb7841d1d63c09b1c013f5a63a78a4aa2",
  "transactions": 20895539,
  "txouts": 51045935,
  "bytes_serialized": 2034254597,
  "hash_serialized": "df02557657af6ccca7d75affced3dc0da12ee8c53b9058413be6ddb9fa0adf47",
  "total_amount": 16342861.10771819
}

You can see here that there are currently 51,045,935 transaction outputs, and that the sum of the values of those outputs is 16,342,861.10771819 BTC

Considering:
  • We are currently at block height 467441
  • The first 210,000 blocks had a subsidy of 50 BTC
  • The next 210,000 blocks had a subsidy of 25 BTC
  • The remaining 47,441 blocks had a subsidy of 12.5 BTC

The total bitcoin value of all outputs (if OP_RETURN wasn't subtracted and miners didn't fail to pay themselves their maximum allowable reward) should be:
(210,000 X 50) + (210,000 X 25) + (47,441 X 12.5) = 16,343,012.5

This theoretical total minus the actual total (where OP_RETURN outputs are subtracted) is:
16,343,012.5 - 16,342,861.10771819 = 151.39228181

OP_RETURN is intended to be used when intentionally creating an unspendable output, but there are other outputs that are provably unspendable. Bitcoin Core keeps these other provably unspendable outputs in its UTXO. There have been several efforts to analyze the ledger and find ALL provably unspendable outputs.  Here's an analysis that was completed in July 2014:

https://bitcointalk.org/index.php?topic=675321.0
- snip -
Code:
Category       NumOutputs    AmountLost
-----------------------------------------
BugOpFalse            23   2,609.36304319
BugP2Pool            182       0.60280235
BugInvalidOpcode      14       0.04520008
BugInvalidPubKey  17,112       0.00242288
BugParseError          1       0.00040000
ZeroValue *        3,080       0.00000000
MissingFromUTXO **   ---     135.20897146
-----------------------------------------
Total             20,412   2,745.22283996 BTC
- snip -

At that time there were only 135.20897146 BTC that were missing from the UTXO.  So, it looks like an additional 16.18331035 BTC have been assigned to OP_RETURN outputs since then.

However, many coins are lost as well.  There's a thread which attempts to count all of the known lost coins - last time I checked there was around 130,000 on there.  However, the actual number is likely to be much more, since Bitcoins were practically worth nothing when it first started.

Those are still in the ledger.  They haven't vanished, they are just unspendable until the original owner finds their private key. It can't be proven that the private key isn't available. The total bitcoin value that has vanished from the blockchain ledger is less than 200.

Fortunately, lost coins are sort of limited by the market, since losing coins lowers the supply, thus pushing up the price and making each person own less coins to lose in the long run (and/or making them more careful with their coins).

This thread is not about unspendable bitcoin value.  This thread is about whether the blockchain balances and how that is enforced.

1.) The total amount is always tally;

Please read a thread before you post in it.  It has already been explained that this is NOT TRUE.

2.) No bitcoin is lost between transactions; and

Please read a thread before you post in it.  It has already been explained that this is NOT TRUE.

3.) No counterfeit bitcoin exist.

Please read a thread before you post in it.   It has already been explained that "bitcoins" don't exist.  Obviously no counterfeit bitcoin exist, you can't create a counterfeit of something that doesn't even exist. Regardless, this thread is about the ledger and whether it balances, not the existence of "counterfeit bitcoins".

The only "way" to destroy circulating bitcoin is by sending them to the unspent-able so-called BitcoinEater addresses which were generated without private keys.

Please read a thread before you post in it.  It has already been explained that this is NOT TRUE.
BianTcoin (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
May 21, 2017, 02:06:46 PM
 #9

Danny
You are truly legendary and have shown
Quote
This theoretical total minus the actual total (where OP_RETURN outputs are subtracted) is:
16,343,012.5 - 16,342,861.10771819 = 151.39228181
Plus you can show what happened to those 151 coins.
I was curious about this as it wasn't widely reported.


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!