sebastianst / GenesisZ

Mine the Genesis Block for your Zcashy altcoin
Other
25 stars 27 forks source link

How to reproduce zcash testnet? #9

Closed TheTrunk closed 6 years ago

TheTrunk commented 6 years ago

Dear all, Sorry in advance as it is a rather a question than an issue but I'm sure it might help others too...

I am trying to mine the zcash testnet genesis block using GenesisZ. I can reproduce the mainnet running for example this command (as it is more explanatory) :

./genesis.py -c mainnet -t 1477641360 -Z Zcash0b9c4eef8b7cc417ee5001e3500984b6fea35683a7cac141a043c42064835d34 -p 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f -b 0x1f07ffff -v -s "/home/tessie/silentarmy/sa-solver -n 200 -k 9 --use 0 --nonces 5 -i" -n 1255

But I am struggeling with testnet...

./genesis.py -c testnet -t 1477648033 -Z Zcash0b9c4eef8b7cc417ee5001e3500984b6fea35683a7cac141a043c42064835d34 -p 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f -b 0x2007ffff -v -s "/home/tessie/silentarmy/sa-solver -n 200 -k 9 --use 0 --nonces 100 -i" -n 5

It gives a different solution which is working. Thank you.

sebastianst commented 6 years ago

There are always several solutions. Your command is looking for 100 nonces, starting with 5, so your solution will be between 5 and 104. What's the nonce used in zcash's testnet?

TheTrunk commented 6 years ago

This is the nonce of zcash testnet: 0x0000000000000000000000000000000000000000000000000000000000000006 It is in the range. It eventually finds a solution pretty quickly although with a different nonce but when I update the chainparams and paste the solution/hash/merkleroot etc. I obtained I got an error with Assertion consensus.hashGenesisBlock failed.

TheTrunk commented 6 years ago

Solved. ./genesis.py -c testnet -t 1477648033 -Z Zcash0b9c4eef8b7cc417ee5001e3500984b6fea35683a7cac141a043c42064835d34 -p 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f -v -b 0x2007ffff -E 0x1f07ffff -s '/home/tessie/silentarmy/sa-solver -n 200 -k 9 --use 0 --nonces 100 -i'

sebastianst commented 6 years ago

Thanks for sharing the solution! I see that the extra-nonce, set via -E, was missing. I'll add it to the readme soon.

sebastianst commented 6 years ago

Added a testnet example to README. Note that you don't need to set -Z or -p