How do I compute the coinbase in for a stratum pool?
How do I compute the coinbase in for a stratum pool?
Loading saved threads...
WoooHaaaa · External communityPost link
External question — Bitcoin Stack Exchange
Author: WoooHaaaa
Original post: https://bitcoin.stackexchange.com/questions/101999
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
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? for
extranonce2
, 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?
Quote
Report
Antoine Poinsot · External communityPost link
External answer — Bitcoin Stack Exchange
Author: Antoine Poinsot
Original post: https://bitcoin.stackexchange.com/a/130679
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
In the Stratum (v1) protocol, the coinbase transaction is constructed by catenating the fields
coinb1
,
Extranonce1
,
Extranonce2
and
coinb2
.
Not all these fields are present in a single message.
coinb1
and
coinb2
are parameters of the
mining.notify
notification.
Extranonce1
is part of the result to the the
mining.subscribe
request.
Extranonce2
is provided by the client as a parameter to the
mining.submit
method (it must respect the size specified by the
Extranonce2_size
field in the result to the
mining.subscribe
request).
More information about the Stratum (v1) protocol is compiled in
this Bitcointalk thread
by Con Kolivas.
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External question — Bitcoin Stack Exchange Author: WoooHaaaa Source score (net votes, not local likes): 4 Original post: https://bitcoin.stackexchange.com/questions/101999 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. 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? for extranonce2 , 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?
Checking account access…