Post
Topic
Board Announcements (Altcoins)
Re: [ANN][ANC] Anoncoin (anoncoin.net) | Privacy-centric currency | I2P darknet
by
Cryptoslave
on 31/05/2016, 22:49:33 UTC
Running the latest wallet synced to the same block as https://prohashing.com/explorer/Anoncoin but my wallet is reporting 0.00000135 difficulty?

Since I update to v0.9.6.11-eaf7af2 I am seeing the same thing for all the blocks.

getmininginfo
{
"blocks" : 538434,
"currentblocksize" : 0,
"currentblocktx" : 0,
"difficulty" : 0.00000135,
"errors" : "This is a HARDFORK build for block 555555",
"genproclimit" : -1,
"networkhashps" : 3302921396,
"pooledtx" : 1,
"chain" : "main",
"generate" : false
}

Hi,

Yes that is right. The difficulty displayed is a difficulty number between 0 and 1, relative to the minimum difficulty equal to 1, which becomes more difficult the smaller it is.

Code:
00:28:14

help getdifficulty


00:28:14

getdifficulty

Returns the proof-of-work required difficulty now at the tip of the block chain.

Result:
n.nnn (numeric) The minimum difficulty is defined as 1 and this result is linear relative to that value.
Smaller values indicate harder, larger an easier difficulty and all blocks will have a value < 1.

Examples:
> anoncoin-cli getdifficulty
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getdifficulty", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9376/

You can see it changing from block to block too, obviously.

Code:
00:09:03

getchaintips


00:09:04

[
{
"height" : 538504,
"hash" : "0000000000d929ff1592eb4adecb1d1e9d733510a3e984c995be35108903ab7e",
"shad" : "b0201d1fe8e462f6a6ed56090d9974435357bc14d79149065b623a3eba12a266",
"branchlen" : 0,
"status" : "active"
}
]


00:09:06

getdifficulty


00:09:06

0.00000135



00:17:59

getdifficulty


00:17:59

0.00000139


If you run cgminer against anoncoin you will see the difficulty moving in the reverse way, in this case the higher it is the more difficult it is. Cgminer made his own interpretation of the block difficulty, which did not change between the wallet version.

Code:
Connected to 127.0.0.1 diff 11.8M without LP as user Cryptoslave
Block: b381edee13ef64ef...  Diff:11.8M Started: [00:13:58]  Best share: 13

 [2016-06-01 00:22:53] Network diff set to 11.5M
 [2016-06-01 00:22:53] New block detected on network
 [2016-06-01 00:23:21] Network diff set to 11.8M
 [2016-06-01 00:23:21] New block detected on network

The old wallet displayed the difficulty as a number which was a multiple of the minimum difficulty. That is why you cannot directly tell what difficulty relates to the old wallet difficulty for the user, as they are displayed differently, but the difficulty algorithms (Kimoto Gravity Well v2 and GroundRod Retarget PID) understand the difficulty very well, as the proof-of-work required difficulty algorithm did not change between KGW v1 and KGW v2. But after block 555555 with the change of the difficulty algorithm to GroundRod PID, the way the proof-of-work required is calculated will change and this is the reason why this is an hardfork.
In truth the PID Difficulty is a number of 256 bits such as 0x00000000010a2d19999999999999999999999999999999999999999999999999, and the PID use this number as it is, but the displayed number by getdifficulty was simplified as shown above.