Is there a documentation or API to access the primes mined for each block?
This was mentioned on the riecoin forum (
http://riecointalk.com/index.php/topic,155.0.html) from ysangkok:
https://github.com/ysangkok/riecoin-tools/blob/master/check_proof_of_work.pyIt needs python3, and also pyprimes (which I got from
https://pypi.python.org/pypi/pyprimes/0.1.1a)
I tried it on a sample block, and it seems to work well:
$ ./riecoind getblockhash 5458
665779e7e6be97c4887be0888aa04ef97d0c57aaad364afe86586f7eacb571c0
$ ./riecoind getblock 665779e7e6be97c4887be0888aa04ef97d0c57aaad364afe86586f7eacb571c0 |tee block.json
{
"hash" : "665779e7e6be97c4887be0888aa04ef97d0c57aaad364afe86586f7eacb571c0",
"confirmations" : 11141,
"size" : 2264,
"height" : 5458,
"version" : 2,
"merkleroot" : "684eb76b5ced5c9e184ac9d0ebb688c455f9d00c73e6864f2ee55d2c6063c3a3",
"tx" : [
"53d9bf77c86c677a2673beff6f6ad85ad61c51058ce49d55f03d72442a0c933b",
"c77933c4a29903f3fb4c7b8fc99983b3670fa46bb8c548ba7d344f103b2c5b93",
"fd78581e64f01f0275a2fdd1ee82b252c39ea3239ce85164d8672a1d198fcf61",
"602a181c2743e76905f235e70bb0f5c77641fa9d2d6886e8048e13d55ca0ccc3",
"9674d756173f88e79d52b8351c0387bbaa06f80513eb1a0dc09ce200f8719cfa",
"8bb0f825b4553d1cfcc73432c1f7254c95ad8c876f6fb67323528c9328b1d7a4",
"fea575298d03331784d22af9c9a9e3bab508efde3f4ac525cb8e12be78bad6a3",
"6aabba9439283f526a203a588cae8f8bc0bdbdce8cbd6f45a18b4f92e9931853",
"2779e3c69ddbbb321e382d8e4c7ac1c78d561e2c80dd47046ee7e7b63c8f3102",
"aaf5305f88a0b66cdb3fa8047be3db9a0619cc5e3b04302ce8ea1ccca90d8d79"
],
"time" : 1392664297,
"nOffset" : "000000000000000000000000000000000000000000000000000000002e1485c5",
"bits" : "02050700",
"difficulty" : 1287.00000000,
"previousblockhash" : "54a31d9a7dd3decad3558c696545813dc526930522da3ab1c66a2d79e022032e",
"nextblockhash" : "e990d45ed3959ca7408428bd69ce65bc1dbb5db3716a06f1aa69a008879a6997"
}
$ python3 check.py < block.json
reading from stdin...
n+16 = 1334656945670861685087189004279355096556643175386369847252222788981787336160029220812058251600868303459404188372030790420997603624833360477534340578333753347368751063432622277543577809254060824492331386102298235490362312463269849493893533583258387267212352852342907309838103907962292228307867594563278772213935053196416292968574021278522837777894144424317305654928159815068909900307662293
n+12 = 1334656945670861685087189004279355096556643175386369847252222788981787336160029220812058251600868303459404188372030790420997603624833360477534340578333753347368751063432622277543577809254060824492331386102298235490362312463269849493893533583258387267212352852342907309838103907962292228307867594563278772213935053196416292968574021278522837777894144424317305654928159815068909900307662289
n+10 = 1334656945670861685087189004279355096556643175386369847252222788981787336160029220812058251600868303459404188372030790420997603624833360477534340578333753347368751063432622277543577809254060824492331386102298235490362312463269849493893533583258387267212352852342907309838103907962292228307867594563278772213935053196416292968574021278522837777894144424317305654928159815068909900307662287
n+6 = 1334656945670861685087189004279355096556643175386369847252222788981787336160029220812058251600868303459404188372030790420997603624833360477534340578333753347368751063432622277543577809254060824492331386102298235490362312463269849493893533583258387267212352852342907309838103907962292228307867594563278772213935053196416292968574021278522837777894144424317305654928159815068909900307662283
n+4 = 1334656945670861685087189004279355096556643175386369847252222788981787336160029220812058251600868303459404188372030790420997603624833360477534340578333753347368751063432622277543577809254060824492331386102298235490362312463269849493893533583258387267212352852342907309838103907962292228307867594563278772213935053196416292968574021278522837777894144424317305654928159815068909900307662281
n+0 = 1334656945670861685087189004279355096556643175386369847252222788981787336160029220812058251600868303459404188372030790420997603624833360477534340578333753347368751063432622277543577809254060824492331386102298235490362312463269849493893533583258387267212352852342907309838103907962292228307867594563278772213935053196416292968574021278522837777894144424317305654928159815068909900307662277
An API call within the client itself would be nice though!