Randomx network hashrate seems to be incorrect #383

Open
opened 3 months ago by duke · 1 comments
duke commented 3 months ago
Owner

It seems that the network hashrate for randomx is incorrect, based on how many miners are active on DRAGONX and their local hashrates. Since the full node is confused about the network hashrate, the Mining GUI in SDX reports a bad estimation of "time to mine a block". The bug is not in the SDX mining GUI, all it is doing is dividing two numbers, network hashrate and local hashrate.

Local hashrate seems to be reported correctly, which can be seen by changing the number of mining threads on a mining node and seeing how it changes.

It seems that the network hashrate for randomx is incorrect, based on how many miners are active on DRAGONX and their local hashrates. Since the full node is confused about the network hashrate, the Mining GUI in SDX reports a bad estimation of "time to mine a block". The bug is not in the SDX mining GUI, all it is doing is dividing two numbers, network hashrate and local hashrate. Local hashrate seems to be reported correctly, which can be seen by changing the number of mining threads on a mining node and seeing how it changes.
duke added the
bug
label 3 months ago
Poster
Owner

After a few layers of RPC wrappers the function GetNetworkHashPS() in src/rpc/mining.cpp is the function which calculates network hashrate (nethash).

Nethash is a function of two variables, the averaging window and a block height. By default the RPC getmininginfo uses an averaging window of 120 blocks.

The function finds the chain work of the two block heights (block height X and X-120) and then divides by the time difference of those two blocks.

After a few layers of RPC wrappers the function `GetNetworkHashPS()` in src/rpc/mining.cpp is the function which calculates network hashrate (nethash). Nethash is a function of two variables, the averaging window and a block height. By default the RPC `getmininginfo` uses an averaging window of 120 blocks. The function finds the chain work of the two block heights (block height X and X-120) and then divides by the time difference of those two blocks.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.