Monday, December 23, 2024

mining swimming pools – Drawback with Calculating Proof of Work (PoW) Outcome

I am trying to calculate the Proof of Work (PoW) consequence from the next actual communication between a miner and a pool:

MINER:  b'{"id":1,"technique":"mining.subscribe","params":["NiceHash/1.0.0"]}n'
POOL:   b'{"error":null,"id":1,"consequence":[[["mining.notify","00005b451"],["mining.set_difficulty","00005b452"]],"00005b45",8]}n'
MINER:  b'{"id":2,"technique":"mining.authorize","params":["andrei.worker",""]}n'
POOL:   b'{"error":null,"id":2,"consequence":true}n{"id":null,"technique":"mining.set_difficulty","params":[524288]}n'
POOL:   b'{"id":null,"technique":"mining.notify","params":["202898","4ea8f400356422a1a193c0ab9bd5b5f998f2e7560002026b0000000000000000","01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff5603e5870c194d696e656420627920416e74506f6f6c20ce015d02ac8f5571fabe6d6dc332e1cdef2292450aba974620c3df12d14af5f79c12628376e38bf47a3272dd1000000000000000","ffffffff045e7d36340000000017a9144b09d828dfc8baaba5d04ee77397e04b1050cc73870000000000000000266a24aa21a9ede1c04d8fcc3154a2ca7afba52cddd1c4305fb0ee357e69bf543ae0ef94a8056c00000000000000002f6a2d434f524501a37cf4faa0758b26dca666f3e36d42fa15cc01065997be5a09d05bb9bac27ec60419d0b373f32b2000000000000000002b6a2952534b424c4f434b3a1c59c66bebd4b2bb725fbd30dc9385e42c496e44fc597216cbeed124005a09dd00000000",["a9820dd91e103c45f251b185badaccabd27afd527362492305bf222761871a64","2aa15df2796085fe280a7c8b4320d6c987c7601961dcd3cd273da8ac3ff72f70","1bcfc4e48c4f2afc824cd3802f09943cf9188bd33bf10ef3625ea18386cb8917","254bf735031a47e650b0a870ce613f95258fbe76006e591cc217f706a61da2b1","10b6c1aa6e5f1d5c4050d9f4d2b1766745a93fa1b637016fdf8f54f74c3aa006","779079c6f49dd65f1fc54975700d3f1c0bbb74ef946cd5695595c7a7960a3fab","b967fee5300b254e89f7a4a4add33e8c7b70fefe3bed4a028c42cac82bf8689d","923e5a0bee85aeb146462a0f403338cd5796faabb80dd2e912388a5a6188d2b8","9b36c027eae29d4abbf4ee10b5cf347d7ff4d5f1147392fa3ff646ab43e45588","6bbedd77ef275962a558cdde02c137b4b889ac2ef19b68ff4f2fcb1a15578901","1290d6c11d8e1191dcec5fc6653e76232a518973572b0bb65c8273e7af20cecf","3e3d23813f2b4ecf383e0fd14115524ff2c7d34c32e7b55504c452cc9747faa0"],"20000000","17042e95","657b9148",false]}n'
MINER:  b'{"id":3,"technique":"mining.submit","params":["andrei.worker","202898","fc1f62c8cd3ae900","657b9148","9ffad771"]}n'
POOL:   b'{"error":null,"id":3,"consequence":true}n'

I am struggling to get the right PoW consequence for the share submission.

This is what I’ve accomplished thus far:

  1. Calculate the Coinbase Transaction:
    Concatenating coinb1, extra_nonce1, extra_nonce2, and coinb2:

01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff5603e5870c194d696e656420627920416e74506f6f6c20ce015d02ac8f5571fabe6d6dc332e1cdef2292450aba974620c3df12d14af5f79c12628376e38bf47a3272dd1000000000000000 + 00005b45 + fc1f62c8cd3ae900 + ffffffff045e7d36340000000017a9144b09d828dfc8baaba5d04ee77397e04b1050cc73870000000000000000266a24aa21a9ede1c04d8fcc3154a2ca7afba52cddd1c4305fb0ee357e69bf543ae0ef94a8056c00000000000000002f6a2d434f524501a37cf4faa0758b26dca666f3e36d42fa15cc01065997be5a09d05bb9bac27ec60419d0b373f32b2000000000000000002b6a2952534b424c4f434b3a1c59c66bebd4b2bb725fbd30dc9385e42c496e44fc597216cbeed124005a09dd00000000

  1. Calculate Coinbase ID (sha256d): 3ac2f875ead34134a9a5d5310e6fa0cf24698f346a23e5a0f3756c4247bd975a

  2. Assemble Merkle Route:
    Utilizing the coinbase transaction and sha256d with merkle branches: 36f8d17aaf51a19d72f75ea2e96c4895f063ecf87bb34afa019dbc49746e022c

  3. Assemble Header:
    Concatenating model, prev_hash, merkle_root, ntime, nbits, and nonce:
    00000020 + 4ea8f400356422a1a193c0ab9bd5b5f998f2e7560002026b0000000000000000 + 36f8d17aaf51a19d72f75ea2e96c4895f063ecf87bb34afa019dbc49746e022c + 48917b65 + 952e0417 + 71d7fa9f

  4. Remaining SHA-256d of the Header:
    93b1d19253e332538fc73b62f06f480ab45e5fb85e4a5481b531895f00b5b643

The anticipated consequence ought to be a hash with main zeros, however I am not getting it.

Can somebody assist me determine the place I is likely to be going flawed in my calculations?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles