Post
Topic
Board Announcements (Altcoins)
Re: [ANN][CLAM] CLAMs, Proof-Of-Chain, Proof-Of-Working-Stake
by
dave23
on 29/08/2015, 02:12:40 UTC
I like these charts and interesting datasets , is there a way to produce them myself?


I use the clamd daemon to get the stats about the moneysupply. Every block has a record of the totals when that block was accepted into the chain.

I use a script like this to dump the data into a file (where cc is an alias for 'clamd'):

Code:
b=$(cc getblockcount)
b1=$(($(head -1 ~/Documents/clam/getblock.dat | awk '{print $1}')+1))

echo "dumping blocks $b1 to $b" 1>&2

while ((b >= b1))
do
    echo $(cc getblock $(cc getblockhash $b) | grep -e height -e supply -e time -e difficulty | awk '{print $3}' | tr -d ,)
    ((b -= 1))
    if ((b % 100 == 0))
    then
        echo $b 1>&2
    fi
done

It fetches details for the blocks which were staked since I last ran it, so I don't have to repeat work I already did on old blocks.

Does that help?

I have never done it before, but I am confident that I can figure it out from those instructions. Thank you very much!