Author

Topic: How do you prove your work on a pool? (Read 201 times)

legendary
Activity: 3822
Merit: 2703
Evil beware: We have waffles!
April 19, 2021, 07:59:13 AM
#9
I had a question related to this
Consider you have a miner, It is quite clear that single miner power is less than a pool or set of miners that they combine their powers, In this case, the chances of winning a group are greater than if someone running a single miner, Am i right !?  Is it worth it nonetheless?
And about mining pool, all the rewards are divided equally among every miner
Of course it is worth it -- why else would would pools exist?? As for rewards, they are not divided equally -- they are divided according to your percentage of the pool hash rate.

Extremely simple example: If a pool size is 100TH and you are supplying 10THs of that then you get 10% of the rewards when a block is found. If you are supplying 1THs, your reward would be 1%.
member
Activity: 100
Merit: 30
Stay humble, be cool, make world better place.
April 19, 2021, 03:55:09 AM
#8
I had a question related to this
Consider you have a miner, It is quite clear that single miner power is less than a pool or set of miners that they combine their powers, In this case, the chances of winning a group are greater than if someone running a single miner, Am i right !?  Is it worth it nonetheless?

And about mining pool, all the riwards are divided equally among every minier
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
April 05, 2021, 07:21:31 PM
#7
It's actually mainly just a network issue, and the fact that even finding a 1 diff share is only a statistical expectation.

Back in the dark ages when ASICs didn't exist, all miners mined 1 difficulty shares.
Some miners still do this - others tell the miner hardware to only return higher difficulty shares.
There'd be, on average, one 1 difficulty share, per about 4300000000 hashes the miner does.

These 1 (or higher) difficulty shares are passed from the 'hardware' back to cgminer and then cgminer rechecks the share.
If it's not actually valid, that's called a hardware error.

If it is valid, cgminer then checks it's difficulty vs the stratum difficulty given it by the pool.
If the share's difficulty is greater or equal to the stratum difficulty, it sends the necessary share information back to the pool.
So, in the old days, when mining at 1 difficulty, a miner would send only 1/4300000000th of the work it did back to the pool.

The pool hashes the (single) share to check it's valid then 'rewards' the miner with the 'stratum difficulty'.
Again, back in the olden days when mining at 1 difficulty, the pool would 'reward' the miner with having done about 4300000000 hashes.

Now the main reason (as I stated) that we use a higher than 1 difficulty setting, is because e.g. a current 100TH/s miner would find, on average,
23283 one diff shares a second.
Trying to send that data to a pool of hundreds of thousands of miners would be rather impractical.
The pool should, of course, be able to hash millions of shares a second, so for the pool's hash check process, that wouldn't be problematic.
But, from a network situation it would be quite a problem Smiley
Also, of course, it would be completely nonsensical for the miner to wait and transfer shares in batches, since that wait process would, obviously, delay the pool knowing about any blocks found; a pool never wants blocks delayed, even fractions of a second.

Already a 1 difficulty share is a statistical expectation.
1 in about 4300000000 hashes done, will, on average, be a 1 difficulty share.
What my pool does, is set the miner difficulty to average around 18 shares per minute.
Thus, over an hour, the miner is expected to find around 1080 shares, which is a reasonable sample of shares to represent the work the miner is doing.
It does mean a higher variance than mining at 1 difficulty, but that variance is insignificant over many hours of shifts as how my pool works.
Aside, this is 'Proof of Work'.
legendary
Activity: 2394
Merit: 6581
be constructive or S.T.F.U
April 03, 2021, 10:47:32 PM
#6
I don't get how a pool knows the offered work of a user. (The total hashes he/she has searched upon)

The above explanations are really good, but I do understand if confusion still persists. I'll explain it in a different manner, the pool knows if your miner can solve 1*1 it could solve 2*2, so every hash your miner submits is a possible valid solution to the current block the pool is trying to mine.

Since the pool needs to verify that you are actually doing some work and sending valid shares, it needs to validate them, validating every single share will be a waste of resources, so the pool will use what is known as pool difficulty to eliminate all shares below a certain threshold, by doing this it ends up with a lot fewer shares to verify, since the pool has the template it can tell if you were actually working on it or not, of course, based on the results you submit.

When I was explaining this to one of my friends he said if the pool needs to verify all submitted shares it pays for why not mine its own bitcoin? this is because it's a lot easier to verify a hash than to hash it.

if the hash digest is AAAA and you need a hash that starts with one zero, say you will start the nonce from 0 up (isn't how it's really done) so you will need to go
AAAA0
AAAA1
AAAA2
AAAA3
........
........
........
AAAA9 > 08c0e097e4728f628845d6d11fa0ab133725482cbd9f577b9ce994390b273f64   > you can try it manually here > https://emn178.github.io/online-tools/sha256.html

You need 9 hashes to get a hash that starts with a zero, your pool knows the AAAA, so it's kind of like you just tell them "9" gets you a 0, that would be easily verified by the pool, and then they add 1 share to your account so they would pay you for it later.
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
April 03, 2021, 06:24:12 PM
#5
Or to simplify it, if you do already understand PoW:

A block means you found a hex value hash below the current network difficulty limit,
and that difficulty also has an inverted value that many prefer to look at that goes up as difficulty gets harder.

The current network Difficulty is "0x170c2a48"
=0x0000000000000000000c2a480000000000000000000000000000000000000000
It has the inverted network difficulty value: 23,137,439,666,472.1

i.e. if your miner hashes a share worth more than 23,137,439,666,472.1 then it's a block.

So e.g. for pool work, the pool says it wants all shares worth more than, say, 10,000
i.e. it's like looking for a much easier block - like back in 2010 Smiley
You don't get an actual block, but your share is assigned the value 10,000
(as per the 2nd link Biffa stated)
legendary
Activity: 3234
Merit: 1220
April 03, 2021, 09:21:51 AM
#4
When a pool finds a block, its just one miner that finds it, same as a solo miner.

The pool keeps track of the hashrate of each miner on the pool during the duration between the last block and the next, then uses the hashrate during those shifts to calculate the share of the block that will be allocated as a reward to all the miners regardless of whether they were the block finder or not. Also the reward is also only calculated for N number of shares on a PPLNS pool (Pay Per Last N Shares) usually worked out as a length of time that you have been mining before the block was found.

For some pools the N(umber) of shares works out to a very short time period because the pool is very big, on a small pool the N could work out to be a very long time unless the pool owner specifies that it is a fixed number of days.

I'm probably not explaining it very well Smiley

This explains how the pool measures the miners hashrate: https://kano.is/index.php?k=workdiff
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
April 03, 2021, 09:09:05 AM
#3
As I said, I know how PoW works and how one can broadcast his/her hash along with its preimage if the target is greater than the hash. The link you gave me explains solo-mining which works by simply brute forcing SHA256 hashes until you've found a valid hash. You aren't rewarded if you don't find such hash, no matter the total nonces you've tried. Everyone's free to go that way, but your chances of mining a block alone are small.

What I don't understand is how pool-mining works where you're not solo-mining. A pool gathers computational power from its users and if they successfully mine a block, each user is rewarded analogously with his/her offered work. I don't get how a pool knows the offered work of a user. (The total hashes he/she has searched upon)
legendary
Activity: 3234
Merit: 1220
April 03, 2021, 08:31:06 AM
#2
From: https://kano.is/index.php?k=mining

What does a Bitcoin miner actually do?

A Bitcoin miner creates a Bitcoin block header of 80 bytes, using the work it is given e.g. by a pool, and hashes it using the SHA256 hash algorithm.
Within those 80 byes, there is a 4 byte value called the nonce - that it cycles from 0 to approximately 4 billion and hashes it for each nonce value.
The SHA256 hash algorithm gives a pseudo-random result for each hash done.
If a hash results in a Difficulty value greater than or equal to the limit specified by the work it was given, it will return the information required to produce the same 80 byte block header it hashed.
A Difficulty value of 1 is expected to occur, on average, once every approximately 4 billion hashes attempted.
If the hash result has a Difficulty value greater than the Bitcoin network Difficulty, then that means the miner found a Bitcoin block!
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
April 03, 2021, 06:07:18 AM
#1
I know few things about mining, besides the theory of PoW. When you solo-mine, you're trying to find a hash that is below a certain target and you're proving it by providing its preimage, which is the message that has been hashed. But what are you proving when you're mining to a pool? How will the pool owner ensure that you've worked? What do you provide him as a proof?
Jump to: