Author

Topic: Difficulty vs target on testnet (Read 558 times)

legendary
Activity: 2053
Merit: 1356
aka tonikt
May 18, 2014, 04:05:26 AM
#4
from what I saw people are mining testnet blocks with timestamps in a future, probably to hit the 20+min => diff1 threshold.

no matter what the time is, they mine a new block with timestamp 20 min bigger from the previous block and they get diff1 guaranteed.
all they need to do is to mine a block with a current time once for awhile and then they get a space for another sprint.
hero member
Activity: 531
Merit: 505
May 18, 2014, 03:01:51 AM
#3
I checked the code and it seems to calculate target correctly (lowering it based on time) when using getwork or getblocktemplate.

I suspect the real problem is that once the 20 minutes since last block passes, the opportunity window to submit DIFF=1.0 share is very short, someone else wins INSTANTLY and the testnet flips back to high difficulty.
legendary
Activity: 2053
Merit: 1356
aka tonikt
May 17, 2014, 04:38:15 PM
#2
the difficulty is calculated in a different way for testnet3.
there is at lest one special case when it falls back to 1. and on top of that there is also some special bug that may kick in each 2016 blocks that nobody seems to understand or even give a shit about Smiley
i'm not surprised that there is at least one more on rpc calls.

there is some old topic on this forum where gavin explained how he planted the rules there. or at least what was the plan.
but better look into the code - it's probably easier to find there and also more meaningful.
people do mine on testnet, so we at least know that it somehow works.
hero member
Activity: 531
Merit: 505
May 17, 2014, 02:05:54 PM
#1
I'm trying to test mine solo some testnet bitcoins, using external miner (USB Erupter). The difficulty is pretty high - 28.6K as of now. Moreover, I found a discrepancy between target in getwork RPC call and difficulty in e.g. getmininginfo RPC call.

I know that when there is no block in 20 minutes on testnet, the difficulty should lower temporarily to 1.0. However, the target remains high (now "target" : "0000000000000000000000000000000000000000000000001d4b020000000000"). This causes problems when using external miner as it does not report difficulty 1 shares, but wait for share satisfying target.

Is this a bug in bitcoind or did I miss something?
Jump to: