Database - modulix/pool-prime.net GitHub Wiki
Database
Why couchDB ? Why not.
Some nice links :
- http://couchdb.pool-prime.net/xpm (global stats)
- http://couchdb.pool-prime.net/xpm/c270d681bacc11dfc3b112090d84f92e9da13ba8b363a2e9bfd9d1af7d569e06 (any block/trans by hash)
- http://couchdb.pool-prime.net/xpm/_design/block/_view/by_height?limit=1&descending=true&include_docs=true (last block, works also with 'trans' in place of 'block')
- http://couchdb.pool-prime.net/xpm/_design/block/_view/by_height?key=123456&include_docs=true
- http://couchdb.pool-prime.net/xpm/_design/trans/_view/by_height?key=123456&include_docs=true (any block/trans by block heigt)
- http://couchdb.pool-prime.net/xpm/_design/xpm/_view/by_date?startkey=[2014,0]&endkey=[2015,1]&group=true&group_level=2 (infos by month for 2014 year)
- http://couchdb.pool-prime.net/xpm/_design/xpm/_view/by_date?group=true&group_level=2 (all by month)
Data are the same as given by primecoind server (getblock & decoderawtransaction), copy is done by xpm2couchdb.py script. As soon as a new Primecoin block is created, couchDB is updated via a simple bash script (cf. bin/xpm2couchdb.sh).