Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Andrew Vorobyov on March 02, 2012, 11:48:29 AM



Title: How serious is this?
Post by: Andrew Vorobyov on March 02, 2012, 11:48:29 AM
http://www.reddit.com/r/Bitcoin/comments/qdhnq/now_im_confused_negative_transaction_fees/c3wvet2


Title: Re: How serious is this?
Post by: koin on March 02, 2012, 12:01:58 PM
not appearing in http://blockexplorer.com


Title: Re: How serious is this?
Post by: Meni Rosenfeld on March 02, 2012, 12:11:33 PM
More than 50 minted.
http://blockchain.info/tx-index/2879072/74bf1e46e22a4a8ee3d566dbbba5f58848ec5e71aee661900e3cabe1f6506a8e
No, that's normal, tx fees are included in the coinbase transaction.

Negative Transaction Fees.
http://blockchain.info/block/0000000000000765555944646925edf0449cb6d33c7d8ecf335b01aec1d94ace
This is probably a bug in blockchain.info.


Title: Re: How serious is this?
Post by: deepceleron on March 02, 2012, 12:16:43 PM
The negative amount is the transaction fees earned by the miner for generating the block.

A Bitcoin transaction is made of input amounts and output amounts. To pay a transaction fee to get your transaction included in a block in a timely fashion, your Bitcoin client crafts a transaction with a larger input than output. the extra money that doesn't come out of transactions is the fee. The miner gets to keep the transaction fees of all transactions they include in a block.

The previous posters are misinterpreting the information shown about the transaction where the miner gets paid 50BTC reward + fees earned. The input is 50BTC, but the output is 50BTC plus the fees earned, so the block explorers show a negative amount when calculating the "fee" for that transaction.


Title: Re: How serious is this?
Post by: Meni Rosenfeld on March 02, 2012, 12:21:29 PM
The negative amount is the transaction fees earned by the miner for generating the block.

A Bitcoin transaction is made of input amounts and output amounts. To pay a transaction fee to get your transaction included in a block in a timely fashion, your Bitcoin client crafts a transaction with a larger input than output. the extra money that doesn't come out of transactions is the fee. The miner gets to keep the transaction fees of all transactions they include in a block.

The previous posters are misinterpreting the information shown about the transaction where the miner gets paid 50BTC reward + fees earned. The input is 50BTC, but the output is 50BTC plus the fees earned, so the block explorers show a negative amount when calculating the "fee" for that transaction.
No, this isn't what this is, there really are serious display errors in blockchain.info. Neither blockexplorer nor blockchain.info have a habit of displaying tx fees paid to the miner as "negative tx fees". http://blockchain.info/block/0000000000000765555944646925edf0449cb6d33c7d8ecf335b01aec1d94ace is a summary of block 168425 which claims that the total transaction fees paid is negative, which is impossible. And if you look at the transactions in the block, many are displayed as having no input.

I wonder what kind of bug caused this, things are pretty messed up.


Title: Re: How serious is this?
Post by: deepceleron on March 02, 2012, 12:44:45 PM
It looks like that particular block is messed up in their database, the input addresses weren't decoded properly.

Here's the particular answer to why there is a wacky "balance" in that block which the site computes into a negative fee.
http://blockchain.info/tx-index/242753/faf8a4240f6989fc94bc2602147102189af4e50e08ea0d5b36462201af114a24

Compare to blockexplorer which thinks it's fine:
http://blockexplorer.com/tx/faf8a4240f6989fc94bc2602147102189af4e50e08ea0d5b36462201af114a24


Title: Re: How serious is this?
Post by: piuk on March 02, 2012, 02:34:14 PM
There was a problem with mysqld crashing (http://bugs.mysql.com/bug.php?id=64278) when I reimported the blockchain last week. In my attempt to debug it I ran a query which shouldn't have been run which messed up some inputs. Rather than start again I decided to leave it and instead write a blockchain verifying program to check and repair the consistency of all inputs and outputs.

However there was all a problem with the verifying program as it would only commit changes for the first error it found. Me being lazy i was only checking the first error, looking up the tx and then assuming the rest would be repaired also. This issue has been fixed now and the verifying program should have repaired everything properly.

TL:DR

Should be fine now.