I read that sometimes a pool will report a "Low difficulty share" error if the solution indeed did not match the specified difficulty but it could also be reported if someone had already found a nonce that hashed the block and you were too late submitting yours. So for example, my pool sent me


I then submitted


to which I got the response

{"id":"c018e089ab7e70a54232623d","jsonrpc":"2.0","error":{"code":-1,"message":"Low difficulty share"}}

I'm pretty bad with the calculations. How can I tell if my share (based on the information I've provided here) indeed didn't match the difficulty target or is it possible that someone else already submitted a nonce that hashed the block?

1 Answer 1


You can find the difficulty of a submitted hash (which is just a big endian hex encoded string) by dividing the base difficulty (2^256-1) by your hash.

As such, nodejs-pool (the most common pool software), checks your submitted hash difficulty as follows:

let hashArray = hash.toByteArray().reverse();
let hashNum = bignum.fromBuffer(new Buffer(hashArray));
let hashDiff = baseDiff.div(hashNum);

if (hashDiff.ge(blockTemplate.difficulty)) {
    // valid here against block, so mined a block
} else if (hashDiff.lt(job.difficulty)) {
    // invalid here (this is where you are failing the test)
} else {
    // valid, record share

Using your supplied hash and target (which is also BE encoded hex string) you would yield:

job.difficulty = 4294967
hashDiff = 472

Hence it is of low difficulty (thus an invalid, low difficulty, share).

  • Hey a quick clarification on the base difficulty -- you listed it as (2^256-1), which would be "FFFFFFFFFFFFFFFF" in hex, is that right? The code you listed defines the base difficulty as "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" , which seems substantially greater.
    – Dave
    Commented Jun 6, 2018 at 16:26
    – jtgrassie
    Commented Jun 6, 2018 at 16:33
  • 2^256-1 is 32 bytes (64 characters) which is what is used in the code. Your calculation of 2^256-1 is incorrect.
    – jtgrassie
    Commented Jun 6, 2018 at 18:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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