I searched around Google and didn't get a correct answer, some one says I should use:
hashed_coinbase_ = coinbase1 + extranonce + extranonce2 + coinbase2;
And some other pages says:
hashed_coinbase_ = coinbase1 + extranonce2 + coinbase2;
Which one is correct?
If the first one is correct, is the
coinbase1
,coinbase2
,extranonce
are all hex represent values that I received from the stratum server? forextranonce2
, should I also use its hex and concat all these hex strings together, and the hash it to get the hashed_coinbase?Seems all received hex values are big-endian, should I change them into little-endian before computing the coinbase?
Is there any existing test case (values) that I can test my algorithm to make sure everything works fine?