I received a mining job with target = f3220000
.
My XMRig miner logged the following statement:
new job from ... diff 480045 algo rx/0 height 2027084
I want to find answers to the following questions:
How to get a decimal value of difficulty (
480045
) by a hexadecimal value of a given target in hex (f3220000
) ?How to get a hexadecimal value of target (
f3220000
) by a decimal value of a given difficulty (480045
)?
My research led to the following formula:
target = targetmax / diff
when targetmax = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
I also found the something in the source of some pools here and here. They have a different logic and I can’t understand it anyway.