Bitcoin Forum
May 08, 2024, 08:28:19 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How do you prove your work on a pool?  (Read 187 times)
BlackHatCoiner (OP)
Legendary
*
Online Online

Activity: 1512
Merit: 7357


Farewell, Leo


View Profile
April 03, 2021, 11:07:18 AM
Merited by vapourminer (1)
 #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?

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
1715156899
Hero Member
*
Offline Offline

Posts: 1715156899

View Profile Personal Message (Offline)

Ignore
1715156899
Reply with quote  #2

1715156899
Report to moderator
The Bitcoin software, network, and concept is called "Bitcoin" with a capitalized "B". Bitcoin currency units are called "bitcoins" with a lowercase "b" -- this is often abbreviated BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715156899
Hero Member
*
Offline Offline

Posts: 1715156899

View Profile Personal Message (Offline)

Ignore
1715156899
Reply with quote  #2

1715156899
Report to moderator
Biffa
Legendary
*
Offline Offline

Activity: 3220
Merit: 1220



View Profile
April 03, 2021, 01:31:06 PM
 #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!

Mine @ pools that pay Tx fees & don't mine empty blocks :: kanopool :: ckpool ::
Should bitmain create LPM for all models?
:: Dalcore's Crypto Mining H/W Hosting Directory & Reputation ::
BlackHatCoiner (OP)
Legendary
*
Online Online

Activity: 1512
Merit: 7357


Farewell, Leo


View Profile
April 03, 2021, 02:09:05 PM
 #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)

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Biffa
Legendary
*
Offline Offline

Activity: 3220
Merit: 1220



View Profile
April 03, 2021, 02:21:51 PM
 #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

Mine @ pools that pay Tx fees & don't mine empty blocks :: kanopool :: ckpool ::
Should bitmain create LPM for all models?
:: Dalcore's Crypto Mining H/W Hosting Directory & Reputation ::
kano
Legendary
*
Offline Offline

Activity: 4494
Merit: 1808


Linux since 1997 RedHat 4


View Profile
April 03, 2021, 11:24:12 PM
Merited by mprep (3)
 #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)

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
mikeywith
Legendary
*
Offline Offline

Activity: 2226
Merit: 6367


be constructive or S.T.F.U


View Profile
April 04, 2021, 03:47:32 AM
Merited by BlackHatCoiner (1)
 #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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
kano
Legendary
*
Offline Offline

Activity: 4494
Merit: 1808


Linux since 1997 RedHat 4


View Profile
April 06, 2021, 12:21:31 AM
Merited by vapourminer (1), NotFuzzyWarm (1)
 #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'.

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
10_sjdovn_10
Member
**
Offline Offline

Activity: 100
Merit: 30

Stay humble, be cool, make world better place.


View Profile
April 19, 2021, 08: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
NotFuzzyWarm
Legendary
*
Offline Offline

Activity: 3626
Merit: 2535


Evil beware: We have waffles!


View Profile
April 19, 2021, 12:59:13 PM
 #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%.

- For bitcoin to succeed the community must police itself -    My info useful? Donations welcome! 1FuzzyWc2J8TMqeUQZ8yjE43Rwr7K3cxs9
 -Sole remaining active developer of cgminer, Kano's repo is here
-Support Sidehacks miner development. Donations to:   1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr
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!