Tuesday, April 1, 2025
HomeBitcoinhash - Learn how to use JSON miner/pool exchanges to make blockheader

hash – Learn how to use JSON miner/pool exchanges to make blockheader

This query has been requested many instances, however not one of the solutions I’ve discovered describe a reproduceable algorithm that I can use to truly create a legitimate block header that hashes to an affordable hash worth. In reality, all makes an attempt produce hashes that each begin and finish with a nonzero hex digit. I’m utilizing JSON information from an S19 Bitmain Antminer linked to a mining pool. The shares aren’t solely being submitted, however accepted as proven within the JSON trade. Moreover, the net interface to the pool agrees with the outcomes. The one conclusion from that’s that these exchanges MUST lead to a legitimate acceptable hash which I can not reproduce.

There are various points – the endian-ness of the information, whether or not the merkle root needs to be calculated utilizing a binary tree, or linearly. I’ve heard it’s completely different for a share than it’s for mining an precise block. Do I take advantage of the “sixth” area, the “extranonce3” or ignore it?

I have been fortunate sufficient to discover a share that was submitted with comparatively few entries within the merkel department:

[
“070369f3b9e71bd07eba58ecee5f7769f5882a137dba7ace7aa315e546d2a355”,
“17df59c62159f5092d8eb3c67242111ce2278c60c534a100ed59dee5af251f9b”,
“e61529af81428a67d0a2a0e25d5b244ebfb67249704126526990d3284fc12a61”,
“2f783fd110ec6920f9f974a6ffe2af347906835fa590adfc9854bca1135a9f6e”,
“104233a89763f6a3d2df844d028bda3e60bfa300a0527edce1728ae208513381”,
“c4975154acf6646147041945c72792e0df34db75dfacbc3af78e3f6f903d77f1”,
“8fd8b923680fad7fd3cd87cce33261ebeeaa7ac50526e5d621cf72643cfc2c44”,
“f0ac98ac08f29c37bad7ee3506d584a39ff1856766770bfb008268600502b8d5”,
“2a74468e8ee8b02328b15097301c20f283290812007796a96ac2f30d4dc027ca”
]

now I THINK these are all at the moment displaying in big-endian, however how can we even inform?

Listed below are the opposite parameters that may be deduced from the miner/pool trade:

prevhash:”b672ef88428684ba8f9afd4f79dc17a7250204520001df9a0000000000000000″

coinbase1:”01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff5a030c8a0d1d506f7765726564206279204c75786f72205465636868007105e1f5bcd6fabe6d6d8f91c003e19a377112ca3b0e19f15a5cc26ba53d696e6bd482a0693a90b79be91000000000000000000080cf”

coinbase2:”ffffffff05220200000000000017a914bf73ad4cf3a107812bad3deb310611bee49a3c7987c17cb7120000000017a914056adde53ebc396a1b3b678bb0d3a5c116ff430c870000000000000000266a24aa21a9eddddbc02a37f33c0fb04b32af121bd6892e481307b36f224f2aae103d44584fbb00000000000000002f6a2d434f524501a21cbd3caa4fe89bccd1d716c92ce4533e4d4733f459cc4ca322d298304ff163b2a360d756c5db8400000000000000002b6a2952534b424c4f434b3abfe8db1d3e3c680c9a9bf1623eb701ca3279a6a025f9d9f8e563fb12006fda0200000000″

and the remaining:

model=’20000000′;
nbits=”17028bb1″;
ntime=”67c28154″;
nonce=”16384721″;
extranonce1=’00’;
extranonce2=’ec100000000000′;
extranonce2_size=”07″;

and the mysterious sixth area from mining.submit:

extranonce3??=’09b66000′;

I’ve efficiently been capable of take related bits and items from an precise mined block and calculate the hash of the coinbase, hash out the merkel root (utilizing binary tree hash) and produce a legitimate blockheader. I do know I’m doing this proper, as a result of after I take the ultimate 80 byte consequence and double sha256 it, I get the very same hash that exists for the block in blockchain explorer. BUT that is with a mined block from the blockchain.

I’ve tried this with the information given above from the miner/pool trade, and I can not give you a good hash. I already know that the primary merkle entry is backwards and I’ve to reverse endian it to seek out the block it corresponds to within the blockchain. The opposite entries are intermediate hashes that aren’t related to a block, so I am unable to confirm them, however I assume if I’ve to flip the primary, then I’ve to flip all of them. DO I embody or exclude the sixth area when I attempt to make the coinbase? Who is aware of?

As for the merkel tree, I’ve tried the identical binary tree hash that I take advantage of with an actual mined block, however I’ve tried the linear technique as effectively. The one a part of the 80 byte header that’s in query is the merkel root.

So, I say all that to ask, is there anybody who is aware of exactly how to do that and get a hash that’s correct? Possibly a crytpo mining engineer that truly works with these low degree particulars? I’ve spent three weeks, happening 4, exploring the web and I can not discover a full labored instance end-to-end displaying precisely how to do that.
-gt-

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments