Bitcoin Forum
May 23, 2024, 07:21:02 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: how the difficulty is calculated shares found?  (Read 364 times)
Ksin (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
August 31, 2018, 11:22:38 AM
 #1

Hi.
How the difficulty is calculated shares found? Ethereum.

 Huh Huh Huh
0ethereum0
Newbie
*
Offline Offline

Activity: 70
Merit: 0


View Profile
August 31, 2018, 11:31:41 AM
 #2

Dif is calculated by the number of miners and the hashing power is that what you mean ?
You dont give a lott of information
Ksin (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
August 31, 2018, 11:47:08 AM
 #3

Dif is calculated by the number of miners and the hashing power is that what you mean ?
You dont give a lott of information


No. I did not mean it.
Look, example:

there is a miner (program), when she finds the shares, informs (shows) what was the complexity of the found shares (example DIFF: 5.429G or DIFF: 38.582G or 4.430G more...)
So, how can this be understood, how is it determined / is calculated?  Whether it is possible to understand having input data which to me inform parameters  eth_getWork and eth_submitWork?
Vann
Hero Member
*****
Offline Offline

Activity: 1036
Merit: 606



View Profile
August 31, 2018, 12:55:08 PM
 #4

Most ETH pools use a fixed share difficulty to prevent overloading the stratum servers with too many requests. e.g. Ethermine uses 4000MH and Nanopool uses 10000MH. Which means on Ethermine your miner should find roughly 2.5x more shares for the same hashrate and timeframe than on Nanopool. But since the weight of shares on Ethermine are worth 2.5x less than the shares on Nanopool, the amount of ETH you receive is the same, based on your contribution to the round.
Ksin (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
August 31, 2018, 02:03:24 PM
 #5

Most ETH pools use a fixed share difficulty to prevent overloading the stratum servers with too many requests. e.g. Ethermine uses 4000MH and Nanopool uses 10000MH. Which means on Ethermine your miner should find roughly 2.5x more shares for the same hashrate and timeframe than on Nanopool. But since the weight of shares on Ethermine are worth 2.5x less than the shares on Nanopool, the amount of ETH you receive is the same, based on your contribution to the round.

You did not understand my question - what you wrote to me is not at all interesting to me. I asked about the other !!!  Undecided 
Read my second post, there in detail I described an example that I want to find out. Senks.

Unfortunately few people know the answer to my question, since there are few specialists in this field   Roll Eyes
Zorg33
Jr. Member
*
Offline Offline

Activity: 144
Merit: 2


View Profile
August 31, 2018, 02:26:59 PM
 #6

I think the problem is the lack of knowledge of the principals of pool mining.
It would be quiet long to describe everything here.
First you have to know what a hash function does, then it will make sense.

difficulty: simply said it's equivalent of the number of the leading zero values in the hash result. More zeros mean higher difficulty, because the set of valid values is decreasing with more zeros (like a shrinking target when shooting)

share: a solution proposal for the current block (nounce is the key here, DYOR)

worker difficulty: the difficulty limit of your pool worker, if you find a share with a difficulty higher than that, it's sent to the pool.

network difficulty: the difficulty calculated from the hashrate of the entire network.

share difficulty: the actual difficulty of the found share. Only a share with a difficulty higher than the network diff is accepted as a valid block candidate.


So for you question (whats your share diff) the answer is that share diff is calculated straight from the leading zeros of your found hash.
The miner program only shows shares that has difficulty higher than you current worker diff.
If you are mining in a pool that's using dynamic worker diff you can see a lot of shares in the first few minutes while the pool is adjusting your worker diff according to your hashrate.
Ksin (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
August 31, 2018, 04:20:39 PM
 #7

I think the problem is the lack of knowledge of the principals of pool mining.
It would be quiet long to describe everything here.
First you have to know what a hash function does, then it will make sense.

difficulty: simply said it's equivalent of the number of the leading zero values in the hash result. More zeros mean higher difficulty, because the set of valid values is decreasing with more zeros (like a shrinking target when shooting)

share: a solution proposal for the current block (nounce is the key here, DYOR)

worker difficulty: the difficulty limit of your pool worker, if you find a share with a difficulty higher than that, it's sent to the pool.

network difficulty: the difficulty calculated from the hashrate of the entire network.

share difficulty: the actual difficulty of the found share. Only a share with a difficulty higher than the network diff is accepted as a valid block candidate.


So for you question (whats your share diff) the answer is that share diff is calculated straight from the leading zeros of your found hash.
The miner program only shows shares that has difficulty higher than you current worker diff.
If you are mining in a pool that's using dynamic worker diff you can see a lot of shares in the first few minutes while the pool is adjusting your worker diff according to your hashrate.


Thanks for the answer, but ....

See:
There is a miner's log that writes to me:

ETH: - SHARE FOUND - (GPU 1) (DIFF: 17.799G)

I want to understand how the shares are calculated difficulty these 17.799G
I understand that I need to look at the parameters that are passed in  eth_getWork and eth_submitWork  - or how?
Ksin (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
August 31, 2018, 10:26:54 PM
 #8

There are not those who know?
Ksin (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
September 01, 2018, 11:35:56 AM
 #9

Please, show me an example
Zorg33
Jr. Member
*
Offline Offline

Activity: 144
Merit: 2


View Profile
September 01, 2018, 07:51:02 PM
Last edit: September 01, 2018, 08:08:04 PM by Zorg33
 #10

Yes, if i understand correctly, Lets say the block needs X zeros to be solved and you be rewarded, for simplicity sake lets call this difficulty to solve a block is 100, so if your share has a difficult of 100 or bigger then you solve the block, your share having bigger than 100 difficulty also solves the block but you get no extra benefit. If you mine a share at 10 difficulty or 50 difficult it also does nothing as it doesnt solve a block, however since a pool is trying to pay for work done so luck (but you dont care about this). So lets say a pool set your difficulty to 10, this means shares with difficulty of 10 are counted as 1 share (worth 10 points), even if you manage to get a 100 or even 1000 difficulty share the pool will not give you more than 10 points. If your difficulty set by pool is 20 then shares mined under that will be deleted and every time you have a share with a difficulty bigger than 20 you get credit for 20 points exactly. Understood?

The pool measures your hashrate by the number of your submitted valid shares that has difficulty greater than your worker diff multiplied by your worker diff.

Your Work = (Number of your valid shares) * (Worker diff)

It does not matter at all how much is your found share's diff above your worker diff regarding your payment.
So if you have worker diff at 10, nobody cares if your share diff is 15 or 50. It only count as one share.
Of course if it's above the network diff then you solved a block, but you won't get a bonus for that from the pool, because the reward is split according to only the (number of your shares) * (worker diff).


Ksin:

The exact answer for your question is that difficulty is measured in hashes.

In your example 17.799G diff means that finding a share with that many leading zeros takes 17.799 x 10^12 hashes in average.

https://ethereum.stackexchange.com/questions/29784/what-is-the-unit-for-measuring-difficulty
Ksin (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
September 02, 2018, 07:12:21 PM
 #11

Yes, if i understand correctly, Lets say the block needs X zeros to be solved and you be rewarded, for simplicity sake lets call this difficulty to solve a block is 100, so if your share has a difficult of 100 or bigger then you solve the block, your share having bigger than 100 difficulty also solves the block but you get no extra benefit. If you mine a share at 10 difficulty or 50 difficult it also does nothing as it doesnt solve a block, however since a pool is trying to pay for work done so luck (but you dont care about this). So lets say a pool set your difficulty to 10, this means shares with difficulty of 10 are counted as 1 share (worth 10 points), even if you manage to get a 100 or even 1000 difficulty share the pool will not give you more than 10 points. If your difficulty set by pool is 20 then shares mined under that will be deleted and every time you have a share with a difficulty bigger than 20 you get credit for 20 points exactly. Understood?

The pool measures your hashrate by the number of your submitted valid shares that has difficulty greater than your worker diff multiplied by your worker diff.

Your Work = (Number of your valid shares) * (Worker diff)

It does not matter at all how much is your found share's diff above your worker diff regarding your payment.
So if you have worker diff at 10, nobody cares if your share diff is 15 or 50. It only count as one share.
Of course if it's above the network diff then you solved a block, but you won't get a bonus for that from the pool, because the reward is split according to only the (number of your shares) * (worker diff).


Ksin:

The exact answer for your question is that difficulty is measured in hashes.

In your example 17.799G diff means that finding a share with that many leading zeros takes 17.799 x 10^12 hashes in average.

https://ethereum.stackexchange.com/questions/29784/what-is-the-unit-for-measuring-difficulty


Thanks but I was talking about the miners logs. As there to understand.
Ksin (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
September 03, 2018, 06:52:42 AM
 #12

To me on an example of a logs miner??

We look at the log from the miner:

there is data (example):

"eth_getWork"
"result":
["0x5e5cd5e148bf731617c05cc69f4a990223b642f1d9c545f837b0427ae451166c",
"0x185bb34ccb2fa3c9cf41cb20429e92c96102573d3c8ed27d820dba10b5e2b962",
"0x0112e0be826d694b2e62d01511f12a6061fbaec8bc02357593e70e52ba"]}

eth_submitWork","params":
["0x90cafd1401466c81",
"0x5e5cd5e148bf731617c05cc69f4a990223b642f1d9c545f837b0427ae451166c",
"0x6080c976b37988aff954eab92f284afcfc40f84be17ebb5cc3af39b03fad1c58"]}

put share nonce 90cafd1401466c81
SHARE FOUND - (GPU 2) (DIFF: 6.278G)


how is it calculated: (DIFF: 6.278G)  Huh Huh Huh
Ksin (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
September 03, 2018, 11:31:25 AM
 #13

Well, in the example above, someone can explain how to calculate?
Zorg33
Jr. Member
*
Offline Offline

Activity: 144
Merit: 2


View Profile
September 03, 2018, 12:54:32 PM
Last edit: September 03, 2018, 01:14:39 PM by Zorg33
 #14

I don't know the getwork protocol, but I looked at the Wiki (https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_submitwork)

It says that 3rd return parameter of eth_getWork is the target calculated by the required difficulty so the hash of your found share must be equal or lower than that, that is for sure.

The 3rd param of eth_submitWork is the "mix digest" that is your hash value. But there is something wrong with your example, because
0x6080c976b37988aff954eab92f284afcfc40f84be17ebb5cc3af39b03fad1c58
is bigger than
0x0112e0be826d694b2e62d01511f12a6061fbaec8bc02357593e70e52ba

where it should be lower.

So according to the Wiki the formula is

target =  2^256 / difficulty.

So that means

the difficulty of your share = 2^256 / your mix digest

that is 2^256 / 0x6080c976b37988aff954eab92f284afcfc40f84be17ebb5cc3af39b03fad1c58

Here's a very explanatory diagram how ethash works:
https://www.vijaypradeep.com/blog/2017-04-28-ethereums-memory-hardness-explained/
Ksin (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
September 04, 2018, 09:26:42 AM
 #15

Or I'm doing it wrong or I do not know what.
I get = 1

Can the formula be wrong?

p.s. the log is correct.  Who can help? Huh Huh
Zorg33
Jr. Member
*
Offline Offline

Activity: 144
Merit: 2


View Profile
September 04, 2018, 12:50:13 PM
 #16

It's certainly not 1 as the two numbers are different.

It is 2.a71b9f575904a, that is ~2.1 in decimal. But that diff is too low.

There must be some other conversion for the mix digest that I missed.
Maybe others could help.

Your target worker diff is
FFFFFFFFFFFFFFFFFFFF ÷ 0112e0be826d694b2e62 = ee.6b27fffffff8

that is ~238.6, it couldbe a valid worker diff.

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!