Author

Topic: Total Fees (Read 1338 times)

legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
January 04, 2017, 01:17:28 PM
#13

Haha this was the work of midnightmagic who intentionally was trying to omit 1 satoshi from the blockchain forever in honor of satoshi and the fact that satoshi is missing. Then he messed up and lost the fees too.

In block 124724, I deliberately and specifically underpaid myself by 0.00000001 ฿, which is colloquially known as "1 Satoshi" after ฿'s creator and due to a lack of a good name for that amount of ฿ money.

To make absolutely sure that I was doing it on purpose, I set the reward value to 49.99999999, which meant that I inadvertently threw away the transaction fees which I could have allocated to myself.

I did it as a tribute to our missing Satoshi: we are missing Satoshi, and now the blockchain is missing 1 Satoshi too, for all time.

♯♯snipped♯♯

So, this is a provably missing amount of the fees+1 Satoshi from the blockchain, from block 124724, which appears to be 0.01 + 0.00000001 ฿.

I did this by creating an option in my heavily customized client (derived from the git fork of bitcoind) which allows me to arbitrarily suspend the normal block reward calculation and underpay myself. The code itself only checks to ensure that I haven't *overpaid* myself. It doesn't at all care that I've *underpaid* myself.

I view this as a freedom in the protocol, and not a drawback.

blockexplorer.com has a display bug for that block which has not been corrected yet.

copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
January 02, 2017, 05:26:21 PM
#12
@amaclin: your program fails for this block:
https://blockchain.info/block/0000000000004c78956f8643262f3622acf22486b120421f893c0553702ba7b5

If the remaining data is correct, the total fee is about 60688.8 BTC

Note that this also includes fee that was paid in error (e.g. swapping fee and value field) and later returned by the miner.

If you want a perfect result, youd have to catch these blocks somehow, because miners dont have to claim the full block reward. If you dont care about the satoshi missing (at least here) it would be enough to make sure you dont overflow.
full member
Activity: 380
Merit: 103
Developer and Consultant
January 02, 2017, 07:08:05 AM
#11
I do not need exact values.
I wonder what these digits can be used for.
This is just quick-and-dirty code example.

Use - Machine Learning, Narrow Ai.

Interesting solution, true, quick and dirty, but get you somewhere for the most part. i'm partial to my own solution, since i can extend it and make it rpc accessible.

Still, thanks, i can use this version and ask the kernel i am writing to locate the discrepancies and see what it's simulations decide is the best course of action.
legendary
Activity: 1260
Merit: 1019
January 02, 2017, 05:27:47 AM
#10
I do not need exact values.
I wonder what these digits can be used for.
This is just quick-and-dirty code example.
full member
Activity: 217
Merit: 259
January 02, 2017, 05:23:20 AM
#9
@amaclin: your program fails for this block:
https://blockchain.info/block/0000000000004c78956f8643262f3622acf22486b120421f893c0553702ba7b5

If the remaining data is correct, the total fee is about 60688.8 BTC

Note that this also includes fee that was paid in error (e.g. swapping fee and value field) and later returned by the miner.
legendary
Activity: 1260
Merit: 1019
January 02, 2017, 04:33:01 AM
#8
That seems a bit complicated, so i went the easier way. I modded the client to simply index
the fees, and moneysupply. So now i'm re-syncing.... Sad

Code:
    if ( tx.isCoinbase ( ) )
    {
      quint64 sum ( 0 );
      for ( int j ( tx.countOutputs ( ) ); --j >= 0; )
        sum += tx.getOutput ( j ).getAmount ( );
      if ( b.getHeight ( ) < 210000 )
        sum -= 5000000000ULL;
      else if ( b.getHeight ( ) < 420000 )
        sum -= 2500000000ULL;
      else
        sum -= 1250000000ULL;
      if ( !fees.isOpen ( ) )
        xassert ( fees.open ( QIODevice::Truncate | QIODevice::WriteOnly ) );
      fees.write ( QString ( "%1 %2\n" ).arg ( currentHeight ).arg ( Util::getAmount ( sum ) ).toLatin1 ( ) );
      return;
    }

last blocks:

Code:
446212 1.03858046
446213 0.74584604
446214 0.88441842
446215 1.03811188
446216 0.78413463
446217 0.73251029
446218 1.11043233
446219 0.70587050
446220 0.84482498
446221 1.02255383
446222 1.02058343
446223 0.77370661
446224 1.06227240
446225 0.85835690
446226 0.69812347
446227 0.78936092
446228 0.78254557
446229 0.91726035
446230 0.62124715
446231 0.95830498

the full results:
https://cloud.mail.ru/public/6bB5/7bi2LQqHe
full member
Activity: 380
Merit: 103
Developer and Consultant
January 02, 2017, 02:03:15 AM
#7

Strings like this are commands passed to bitcoin core, e.g. via bitcoin-cli. There may be typos.

Start with getblockhash ID for block numbers from 0 to getblockcount.
It will return you a hash for each block. Use getblock HASH to get the full block. The first transaction is the coinbase(?).
Use its transaction id to get the raw transaction with getrawtransaction TXID.
Decode the raw TX decoderawtransaction RAWTX.
Verify that vin has coinbase just to make sure its actually the correct one.
Look for all (its possible that there are more than one) value under vout und substract the current blockreward for that block.

Add it all up and you get your answer.

That seems a bit complicated, so i went the easier way. I modded the client to simply index the fees, and moneysupply. So now i'm re-syncing.... Sad
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
December 30, 2016, 04:20:05 AM
#6

Strings like this are commands passed to bitcoin core, e.g. via bitcoin-cli. There may be typos.

Start with getblockhash ID for block numbers from 0 to getblockcount.
It will return you a hash for each block. Use getblock HASH to get the full block. The first transaction is the coinbase(?).
Use its transaction id to get the raw transaction with getrawtransaction TXID.
Decode the raw TX decoderawtransaction RAWTX.
Verify that vin has coinbase just to make sure its actually the correct one.
Look for all (its possible that there are more than one) value under vout und substract the current blockreward for that block.

Add it all up and you get your answer.
sr. member
Activity: 353
Merit: 250
Zichain
December 30, 2016, 03:47:17 AM
#5

You mean the wallet Itself ? It wouldn't make sense If a wallet has this feature , the wallet can calculate your fees while trying to send bitcoins but showing you the transactions fees from the first transaction until now is not needed therefore its not implemented.
sr. member
Activity: 490
Merit: 250
December 30, 2016, 03:43:37 AM
#4
Hello

Is there a way to get the total amount of fees ever paid since the first transaction ever made on the chain?

Here you can see fees, Btc allows you to receive and send payment for a very low fee. There are no compulsory remuneration other than special cases like very low pay. It is recommended that you pay voluntarily as high as possible to get your transaction approved faster and grant the rights of the people who manage the Bitcoin system.

full member
Activity: 380
Merit: 103
Developer and Consultant
December 30, 2016, 03:38:47 AM
#3
member
Activity: 112
Merit: 10
female ;)
full member
Activity: 380
Merit: 103
Developer and Consultant
December 30, 2016, 03:16:56 AM
#1
Hello

Is there a way to get the total amount of fees ever paid since the first transaction ever made on the chain?
Jump to: