Bitcoin Forum
April 27, 2024, 05:01:37 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3  All
  Print  
Author Topic: [PAID] Publish result of Days Destroyed calculation  (Read 11562 times)
Stephen Gornick (OP)
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
May 22, 2011, 01:25:42 AM
Last edit: October 20, 2012, 06:27:45 PM by Stephen Gornick
 #1

This is a bounty award to develop a script to compute the BitcoinDays Destroyed by the transactions in a block.

Description:
Scan all the transactions in the block chain and dump out a .csv file that shows BitcoinDays Destroyed calculation result per block.

Requirements:
  - Accesses block chain using bitcointools  (see the project's statistics.py as an example)
      http://github.com/gavinandresen/bitcointools
  - Developed in python and licensed MIT/X11
  - BitcoinDays Destroyed Calculation following ByteCoin's recommendation:
      http://forum.bitcoin.org/index.php?topic=6172.msg90789#msg90789
  - [edit: ] accept (optional) block number argument  to produce calculation result total for a single block.

The bounty so far is: 10 BTC

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


1714194097
Hero Member
*
Offline Offline

Posts: 1714194097

View Profile Personal Message (Offline)

Ignore
1714194097
Reply with quote  #2

1714194097
Report to moderator
1714194097
Hero Member
*
Offline Offline

Posts: 1714194097

View Profile Personal Message (Offline)

Ignore
1714194097
Reply with quote  #2

1714194097
Report to moderator
"With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714194097
Hero Member
*
Offline Offline

Posts: 1714194097

View Profile Personal Message (Offline)

Ignore
1714194097
Reply with quote  #2

1714194097
Report to moderator
1714194097
Hero Member
*
Offline Offline

Posts: 1714194097

View Profile Personal Message (Offline)

Ignore
1714194097
Reply with quote  #2

1714194097
Report to moderator
error
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500



View Profile
May 22, 2011, 01:38:06 AM
 #2

Do you just want a total for each block, or a calculation for each transaction in each block?

3KzNGwzRZ6SimWuFAgh4TnXzHpruHMZmV8
Stephen Gornick (OP)
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
May 22, 2011, 01:43:18 AM
 #3

Do you just want a total for each block, or a calculation for each transaction in each block?

The total BitcoinDays Destroyed for each block.

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


error
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500



View Profile
May 22, 2011, 01:44:33 AM
 #4

Do you just want a total for each block, or a calculation for each transaction in each block?

The total BitcoinDays Destroyed for each block.

Sounds fun, give me an hour or two. Been a while since I did any serious Python work. Smiley

3KzNGwzRZ6SimWuFAgh4TnXzHpruHMZmV8
FreeMoney
Legendary
*
Offline Offline

Activity: 1246
Merit: 1014


Strength in numbers


View Profile WWW
May 22, 2011, 02:10:18 AM
 #5

I'm in for 3BTC if it tracks BitcoinDays over time and updates with each block. Good for a month.

Play Bitcoin Poker at sealswithclubs.eu. We're active and open to everyone.
error
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500



View Profile
May 22, 2011, 02:24:20 AM
 #6

OK, maybe it'll take me more than an hour or two. Though after looking at this for a short while, I think it would be easier to add this to Block Explorer.

3KzNGwzRZ6SimWuFAgh4TnXzHpruHMZmV8
FreeMoney
Legendary
*
Offline Offline

Activity: 1246
Merit: 1014


Strength in numbers


View Profile WWW
May 22, 2011, 02:41:39 AM
 #7

OK, maybe it'll take me more than an hour or two. Though after looking at this for a short while, I think it would be easier to add this to Block Explorer.

Just make a new block explorer. Smiley

It's a really nice thing to have, would suck if it went down even for a little while. Good to have another.

Play Bitcoin Poker at sealswithclubs.eu. We're active and open to everyone.
error
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500



View Profile
May 22, 2011, 02:57:24 AM
Last edit: May 22, 2011, 03:44:57 AM by error
 #8

OK, maybe it'll take me more than an hour or two. Though after looking at this for a short while, I think it would be easier to add this to Block Explorer.

Just make a new block explorer. Smiley

It's a really nice thing to have, would suck if it went down even for a little while. Good to have another.

I've considered it; I think the existing one is a bit less friendly than it could be.

On another note, I found an Easter egg in the genesis block:

Code:
The Times 03/Jan/2009 Chancellor on brink of second bailout for banks

3KzNGwzRZ6SimWuFAgh4TnXzHpruHMZmV8
error
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500



View Profile
May 22, 2011, 03:58:25 AM
 #9

Bah, bitcointools needs a lot of cleanup, or I'll have to write a massive amount of duplicate code. Much of it was not designed for people to build on. Not my idea of fun.

3KzNGwzRZ6SimWuFAgh4TnXzHpruHMZmV8
unfinishe
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
May 22, 2011, 05:10:34 AM
 #10

I think I've got an idea on how to do this, but I'm rusty on my python, so please bear with me for a little while...

Check out the results from my Bitcoin Survey Project!
https://bitcointalk.org/index.php?topic=88927.0
error
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500



View Profile
May 22, 2011, 07:47:31 PM
 #11

OK, I think my code is complete and fully debugged, well, as well as that gets without others playing with it. Right now I'm running it over the whole block chain before I publish it (this will probably take a couple of hours).

3KzNGwzRZ6SimWuFAgh4TnXzHpruHMZmV8
error
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500



View Profile
May 22, 2011, 08:32:43 PM
Last edit: June 02, 2011, 12:42:48 AM by error
 #12

OK, it took more like 20 minutes to run through the whole block chain. Goes really fast through those tens of thousands of blocks with no transactions. Smiley

Instructions:

1. Download bitcoindays.py.

2. Drop it in the same directory as bitcointools.

3. Run it for a single block:
Code:
python bitcoindays.py --block=125635
Run it for a range of blocks (if either start or end are specified):
Code:
python bitcoindays.py --block-start=125000 --block-end=125999
Run it for the entire block chain:
Code:
python bitcoindays.py > bitcoindays.csv

When run on the entire block chain, it will show a progress indicator on screen.

The CSV contains two columns, the block height, and the accumulated bitcoindays for all the transactions in that block.

4. Send me lots of bitcoins.  Grin  183g7trsCxkug8C8zAxR6Ro3qnLnoDLFo7

# Copyright (c) 2011 Michael Hampton
# Copyright (c) 2010 Gavin Andresen
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

I'm in for 3BTC if it tracks BitcoinDays over time and updates with each block. Good for a month.

I don't think this is doable with bitcointools since it requires bitcoin to be offline. As I said before, this sort of thing should be added to Block Explorer or an equivalent. Or perhaps done via JSON-RPC to a running bitcoind.

3KzNGwzRZ6SimWuFAgh4TnXzHpruHMZmV8
unfinishe
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
May 23, 2011, 12:26:11 AM
 #13

Darn, darn, darn. I just managed to iron out the last snags in my code.  Cry

http://dl.dropbox.com/u/28441300/destroyed.py
http://dl.dropbox.com/u/28441300/deserialize_destroyed.py

Copy them into the bitcointools folder.

As far as I can tell, I'm getting more or less the same results (with little differences here and there for some reason). You can see my full output here: http://dl.dropbox.com/u/28441300/output.txt

Oh well. It was fun and enlightening anyway. (By the way, not to brag but mine is faster Grin)

Check out the results from my Bitcoin Survey Project!
https://bitcointalk.org/index.php?topic=88927.0
error
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500



View Profile
May 23, 2011, 12:44:36 AM
Last edit: May 23, 2011, 01:17:54 AM by error
 #14

You seem to have done some funny rounding-off. That's probably the source of the differences.

(And speed wasn't on the list of requirements Tongue )

And you don't seem to have implemented an option to process a single block?

EDIT: Your code was right (though the rounding is still confusing). Though in the process of checking it, I found a bug in MY code (and fixed it).

3KzNGwzRZ6SimWuFAgh4TnXzHpruHMZmV8
jerfelix
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250


View Profile
May 23, 2011, 02:23:01 AM
 #15

Let's see if I can interpret this.  The last ten blocks of output look something like this:


125384,342.04
125385,1626.24
125386,16030.47
125387,182937.81
125388,23690.77
125389,146.36
125390,4092.02
125391,7074.40
125392,41.07
125393,140665.75

Looking at the last block, Block #125393, there have been 50 x 125,393 == 6,269,650 Bitcoins mined since the beginning of time.  The first 50 coins mined have been in existence for roughly 125,393 x 10 minutes, while the most recent 50 are brand new.  Total BitCoin existence minutes are the 6,269,650 x the average, so 6,269,650 x 125,393 x 5 == 125,393^2 x 50 x 5 == 3.93E+12.  Since about 144 Blocks are created per day, this means that since the beginning of BitCoins, there have been 3.93E+12 / 144 == 2.73E+10 Total BitCoin Days ever.

And during block 125393, 1.4066575E+5 Bitcoin Days were destroyed, which is a whopping .000515%.
Cumulatively, there have been 594187738.6 BitCoin Days destroyed (adding up all of the 2nd figures on each line of this web page - http://dl.dropbox.com/u/28441300/output.txt ).  So cumulatively, 2.18% of the BitCoin Days have been destroyed.


I think that the most meaningful way to use these statistics is to look at the Percentage of Cumulative BitCoin Days Destroyed.  If my numbers are correct, we're at 2.18% Cumulative BitCoin Days Destroyed now (2.18% CBTCDD).  As less people hoard, that number will rise.  And this figure takes into account the new coins being mined.

This number has been on a fairly steady rise, from zero.
It's not exactly straight up, but generally, here's what I am seeing when I run the cumulative days destroyed calculations:


2/23 - 4/24/2010    0.6%
4/24  - 6/28/2010   0.7%  (flirted with 0.8% a few times and dropped back down)
6/28 - 7/28/2010    0.8%
7/28 - 7/30/2010    0.9%
7/30 - 8/1/2010      1.0%
8/1 - 8/2/2010        1.1%
8/2 - 8/9/2010        1.2%
8/9 - 9/19/2010      1.3%
9/19 - 12/12/2010   1.4%
12/12 - 12/30/2010 1.5% 
12/30 - 2/13/2011   1.7%  (skipped right over 1.6%!)
2/13 - 4/18/2011     1.8%
4/18 - 4/20/2011     1.9%
4/20 - 5/8/2011       2.0%
5/8 - 5/16/2011       2.1%
5/16 - present         2.2%


Hope this helps.

Hey guys, I'm trying to test some merchant software, and I am new to BitCoins and haven't gotten my first bits... and the faucet has been dry.  Can anyone shoot me a loan (or gift of .01, if these numbers were valuable)?    1BZbpx7wHAUcBgzAtH4KeogTmtgUrq5Nkk   Much appreciated!
Mike Hearn
Legendary
*
Offline Offline

Activity: 1526
Merit: 1128


View Profile
May 24, 2011, 11:09:33 AM
 #16

Coins sent.
jerfelix
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250


View Profile
May 24, 2011, 02:55:22 PM
 #17

Coins sent.
That was awesome, and very nice of you!!  Thanks!
luv2drnkbr
Hero Member
*****
Offline Offline

Activity: 793
Merit: 1016



View Profile
May 25, 2011, 11:39:34 AM
 #18

I'm vaguely understanding the "bitcoin days" concept as a measurement of overall market activity, but I'm still confused.  Could somebody explain this to me in a simple manner, as if I were a child, so that I can get a better conceptual understanding?  (I did read the post with the original idea in it, still don't understand.)  Thanks guys!!!

darbsllim
Sr. Member
****
Offline Offline

Activity: 297
Merit: 251


Founder, Filmmaker, Fun Guy


View Profile
May 25, 2011, 11:40:58 AM
 #19

This is a bounty award to develop a script to compute the BitcoinDays Destroyed by the transactions in a block.

Description:
Scan all the transactions in the block chain and dump out a .csv file that shows BitcoinDays Destroyed calculation result per block.

Requirements:
  - Accesses block chain using bitcointools  (see the project's statistics.py as an example)
      http://github.com/gavinandresen/bitcointools
  - Developed in python and licensed MIT/X11
  - BitcoinDays Destroyed Calculation following ByteCoin's recommendation:
      http://forum.bitcoin.org/index.php?topic=6172.msg90789#msg90789
  - [edit: ] accept (optional) block number argument  to produce calculation result total for a single block.

The bounty so far is: 10 BTC


For those of us who are not sure what BitcoinDays Destroy means... what is the value of knowing these numbers?

Brad Mills,
Investor - Former miner - Former Bitcoin Business Owner - Survivor of the Great Bitcoin Crashes of 2011 and 2012, the MtGox Heist of 2014 & the 2017 crypto bubble.
Bitrated user: bradmillscan.
jerfelix
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250


View Profile
May 25, 2011, 04:04:56 PM
 #20



For those of us who are not sure what BitcoinDays Destroy means... what is the value of knowing these numbers?

Basically, the system is currently creating about 6.3 Million Bitcoin days every day.  In layman's terms, that means that each day that goes by, the 6.3 Million bitcoins could have been hoarded for another day.   If a hoarder cashes in some of their "stash", then they "destroy" Bitcoin Days.  Destruction of BitCoin Days is a healthy thing.  It is a measure of circulation.

To date, there have been approximately 27.3 Billion Bitcoin days created.  And about 2.2% of those have been destroyed.  This figure has been rising steadily.  (See my post that I linked to, above).  Since this is RISING, this means that more and more bitcoins are being circulated - a very good thing for the future prospects of Bitcoins.

If you are a speculator, you'd be wise to keep an eye on that "cumulative Bitcoin Days Destroyed" figure.   If it begins going down, that means that less bitcoins are being circulated, and more are being hoarded.  That's the sign of a bubble forming.  (This may be hard to believe, but we're not in a bubble now - the cumulative bitcoin days destroyed is increasing, meaning there's more spending and less hoarding than there has been in the past!  This is a VERY good sign for the long-term viability of Bitcoins.)

If cumulative Bitcoin Days Destroyed begins to go down, that's an indication that people are "over-hoarding".
Pages: [1] 2 3  All
  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!