0

I have been playing around cloning Peercoin client. I have found the genesis block for main net, but now I'm trying to mine the block 1 with difficulty set on 1. I connected 4 machines all doing about 5Mh/s. Is it even plausible to find the block? Block retarget is on each block so I guess if I manage to find one difficulty will lower and I will be able to mine easier.

Thanks for any hints.

closed as off-topic by Pieter Wuille, chytrik, Andrew Chow Aug 17 at 3:54

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about cryptocurrencies or projects that are not Bitcoin, and are not applicable to Bitcoin, are off-topic. For more information, see this meta-discussion." – Pieter Wuille, chytrik, Andrew Chow
If this question can be reworded to fit the rules in the help center, please edit the question.

0

First of all, I would double check that the difficulty target is really 1, if you're recalculating on every block, how does it handle the first block?

Update: The initial difficulty for peercoin is actually 256, but the calculations below can be tweaked to see it results in 55.5 hours at 5MH/s.

Time to solve a block

Here is a resource that might help: Generation Calculator. The calculation is:

  1. Get the current target. Target for difficulty 1 (Bitcoin) is:

    00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff

  2. Divide by 115792089237316195423570985008687907853269984665640564039457584007913129639935, which is the maximum value of a 256-bit number. You now have the probability of a single hash solving a block.

    currentTarget / max256 = 2.33E-10

  3. Take the reciprocal of the probability to get the average number of hashes to solve a block.

    1/2.33E10 = 4.3E9

  4. Divide the average number of hashes by your hash/s (not khash/s) to get the average number of seconds required to solve a block.

    4.3E9 / 5E6 = 860 seconds or 14.3 minutes

  • Thank you. Difficulty 1 is the difficulty the peercoin daemon is showing me, on testnet it was showing 0.14 and I was managing to find blocks fine in probably 5 minutes each. How can I double check the difficulty target more than just watching getinfo from network? And thank you for the answer. – Bloodir Wiredancer Nov 9 '18 at 20:33
  • The source code is where I'd check first, but I'm assuming the initial difficulty is the same for peercoin, this was more of a generic answer. – JBaczuk Nov 9 '18 at 20:40
  • static CBigNum bnProofOfWorkLimit(~uint256(0) >> 32); static CBigNum bnInitialHashTarget(~uint256(0) >> 40); – Bloodir Wiredancer Nov 9 '18 at 20:43
  • The initial target is not a difficulty of 1, in that case, it is 256, which changes the calcs above to currentTarget / max256 = 9E-13, 1 / 9E-13 = 1E12, and 1(1E12 / 5E6) / 3600 = 55.5 hours. – JBaczuk Nov 9 '18 at 21:12
  • Ah ok. Thats a bit too long, but thanks a lot for your explanation. One more thing. Can you explain me how did you get the diff 256 from the above code? Thanks – Bloodir Wiredancer Nov 9 '18 at 21:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.