Bitcoin Forum
May 07, 2024, 08:04:38 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: how do you calculate the difficulty of a share submitted by a stratum worker?  (Read 1084 times)
mdude77 (OP)
Legendary
*
Offline Offline

Activity: 1540
Merit: 1001



View Profile
October 08, 2014, 01:26:51 AM
 #1

I'm missing something fundamental.  The work submitted from a worker has 3 pieces of information that are related to the share:

- extranonce2
- ntime
- nonce

Somehow the pool can quickly take those values and the other known values that the pool provided the worker, and determine if it's a valid share and if it meets the required difficulty.  Can someone explain to me how that's done, or point me to some code that shows it? 

I assume this process is extremely simple otherwise the overhead on the pool would be too much.

Thanks.

M

I mine at Kano's Pool because it pays the best and is completely transparent!  Come join me!
1715069078
Hero Member
*
Offline Offline

Posts: 1715069078

View Profile Personal Message (Offline)

Ignore
1715069078
Reply with quote  #2

1715069078
Report to moderator
"With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715069078
Hero Member
*
Offline Offline

Posts: 1715069078

View Profile Personal Message (Offline)

Ignore
1715069078
Reply with quote  #2

1715069078
Report to moderator
1715069078
Hero Member
*
Offline Offline

Posts: 1715069078

View Profile Personal Message (Offline)

Ignore
1715069078
Reply with quote  #2

1715069078
Report to moderator
kano
Legendary
*
Offline Offline

Activity: 4494
Merit: 1808


Linux since 1997 RedHat 4


View Profile
October 09, 2014, 12:57:22 PM
 #2

'quickly' - well that's subjective Smiley
The pool has to hash the coinbase transaction that they make up part of, hash the side of the merkle tree to get the merkle root, hash the block header that includes the merkle root, then you have a block hash which of course has a resultant difficulty.

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
mdude77 (OP)
Legendary
*
Offline Offline

Activity: 1540
Merit: 1001



View Profile
October 09, 2014, 11:48:28 PM
 #3

'quickly' - well that's subjective Smiley
The pool has to hash the coinbase transaction that they make up part of, hash the side of the merkle tree to get the merkle root, hash the block header that includes the merkle root, then you have a block hash which of course has a resultant difficulty.

Thank you, ck explained it to me.  What I didn't realize was the pool has to the full calculation as well ... the difference is it only has to verify the share is legit.  The miner's job is the find the legit share.

M

I mine at Kano's Pool because it pays the best and is completely transparent!  Come join me!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!