Skip to content

[RPC] Evaluate getnetworkhashps algorithms #877

@CaveSpectre11

Description

@CaveSpectre11

(block(tip)->chainwork minus block(y)->chainwork) / *block(tip)->timestamp minus block(y)->timestamp)

This formula is wrong.

https://en.bitcoin.it/wiki/Difficulty#What_network_hash_rate_results_in_a_given_difficulty.3F

https://bitcoin.stackexchange.com/questions/1770/how-can-i-measure-the-total-hashing-power-of-the-bitcoin-network/1774#1774

Network hashrate calculated using formula: H ~= h / t , where t is time that took to find X number of blocks and h is approximate number of hashes it should have taken to solve X number of blocks, h = X * (D * 2**256 / (0xffff * 2**208))

It's not supposed to be chainwork, it's supposed to be something like
number of blocks * (difficulty * 2^256/difficulty offset)

So unless these values somehow reduce to chainwork, I think the formula in use is wrong.

Originally posted by @Rock-N-Troll in #340 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions