That's a great graph! How/where were you able to generate it?
Just a 5-minutes PERL script and excel Most time takes getting info via RPC, near 30 minutes for getting all info (perl just sends messages to console and parses results). Now I'm creating such graph for difficulty, it'll be ready in ~10 minutes - you'll see amazing growth during last blocks
Pretty cool! I didn't realize this was possible to generate "after the fact" purely from blockchain data. Nice to learn something Can you give any tips as to which RPC calls were used or any available perl or other language script I can learn from? I can see the list of RPC calls at https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list but not sure which I would use to get generation rate or difficulty data from the past. Thanks for sharing these graphs at any rate!
you should run getblockindex (number of block), you'll get block hash. After it you should execute getblock (hash) and receive full info about block, after it you can parse it and do whatever you want
small script to get csv in format BLOCK_NUMBER,DIFFICULTY , you can run it on any linux system with datacoind up and running
use strict;
my $hash;
my $diff;
my $block_num;
open MYFILE, ">result_diff.csv";
$temp = `datacoind getmininginfo | grep blocks`;
$temp =~ /blocks" : (\d+)/;
$block_num = $1;
for (my $i=0; $i < $block_num; $i++)
{
$hash = `datacoind getblockhash $i`;
my $temp = `datacoind getblock $hash `;
$temp =~ /difficulty" : ([0-9\.]+)/;
$diff = $1;
print MYFILE "$i,$diff\n";
}
close MYFILE;