Author

Topic: Blockchain and shares (Read 1222 times)

hero member
Activity: 725
Merit: 503
January 24, 2013, 09:09:17 AM
#13
@Meni: Thx, you gave me the last puzzle piece!

@nibor: I think thats wrong, your solominer will still request work and submit shares with the getwork api to/from the client.
sr. member
Activity: 438
Merit: 291
January 24, 2013, 08:49:11 AM
#12
So last thing I don't get about bitcoin: Why do the miners have to send shares all the time and not only shares that solves the block? Cant the local mining software judge if a share has solved a block?

If you are solo mining there is no such thing as a share.

You just do a getwork every so often (to ensure there is not a new block in the chain that you need to take account of) and also to include more and more transactions in the block you are trying to solve.

If you find a nonce that gives the block you are searching for a low enough hash you just send that to the bitcoin network and collect your 25BTC.


With pooled mining the pool operator gives you a block (header) to solve that pays them the 25BTC. You then look for a nonce that gives the block a hash less than "difficulty 1". This is about 3,000,000 times easier to find than finding a real block.
Everytime you find one of these you send it to the pool operator as proof that you are trying. they will then pay you about 25/3,000,000BTC for each share (if PPS pool).
Every "share" that is submitted to them they check to see if by chance the hash is so small it is actually also a valid block. If so they will transmit over the network and earn themselves 25BTC. And so cover their costs.

Benefit for you is that you get a constant flow of BTC rather than solo mining where even with 800Mhash/sec you would only expect to find 2 blocks a year and if unlucky might not find one for 3 years!
donator
Activity: 2058
Merit: 1054
January 24, 2013, 08:13:32 AM
#11
Miners find hashes, which are 256-bit numbers (from 0 to 115792089237316195423570985008687907853269984665640564039457584007913129639935).
For a hash to be valid, it needs to be lower than the target.

The "maximum target" is 0x00000000FFFF0000000000000000000000000000000000000000000000000000 in hexadecimal, or 26959535291011309493156476344723991336010898738574164086137773096960. This corresponds to difficulty 1. The chance for a hash to be lower than the max target is roughly 1 / 4295032833.

If the difficulty is D then the target is max target / D. For a hash to become a valid block it needs to be lower than the target, the chance for that is 1 / (4295032833 * D).

Traditionally, shares have been hashes lower than the max target (difficulty 1). Every hash would have a chance of 1 / 4295032833 to become a share, and a share would have a chance of 1/D to become a block. These days, to reduce overhead, shares of arbitrary difficulty d are used, so a hash has 1 / (4295032833 * d) chance to be a difficulty-d share, and a share has a chance of (d/D) to be a block.
legendary
Activity: 1106
Merit: 1004
January 24, 2013, 07:48:27 AM
#10
Yes, AFAIK there's a difficulty that when hit will trigger a share submission. This difficulty can be as low as 1 and then increase gradually if the pool verifies that a particular miner is sending shares too frequently.
hero member
Activity: 725
Merit: 503
January 24, 2013, 05:51:11 AM
#9
but when does a share merit to be sent to the network? are there 2 difficulties: 1 for share to be sent, 2 share wins block?

EDIT: Btw it has to be binary, either send OR don't send share... AND either share sent did not unlock block OR share won block...

Basically: What decides if a share should be sent to the bitcoin swarm, there will always be getworks, but what changes is if they result in a share or not. If this is the difficulty, then what decides if a share "wins" a block?
legendary
Activity: 1106
Merit: 1004
January 24, 2013, 04:14:13 AM
#8
It's not binary like that, "valid" or "invalid".
The difficulty is a target. You can have a share far away or quite close from that target, without necessarily hitting it. It's by measuring how close you get that the pool has an idea of how much processing power you're dedicating.
hero member
Activity: 725
Merit: 503
January 24, 2013, 03:44:27 AM
#7
Yes, but what is the cryptographic information in a "invalid" share? How does the client verify a "invalid" share versus a "valid" (block unlocking) share?!?!?
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
January 23, 2013, 11:42:21 PM
#6
Even if it doesn't solve a block, it's still proof that you did work in an attempt to solve the block.  If you have X GH/s, you will produce Y shares per minute.  If you have 2X GH/s, you will produce 2Y shares per minute (on average).   By seeing how many shares you produce per minute, the pool software can estimate the total computation power you are contributing to the pool.  If they don't submit shares, then the pool only gets one message per block, from the one miner that found the block -- thye have no idea how much work the other miners did.
hero member
Activity: 725
Merit: 503
January 23, 2013, 01:36:40 PM
#5
Yes, you still "getwork" from the client!?
full member
Activity: 125
Merit: 100
January 23, 2013, 01:33:47 PM
#4
but shares are submitted even when mining against the satoshi client no? and what is a share that doesn't solve a block?

If you're mining on your own there's no one to send shares to because there's no pool operator to cheat out of money.
hero member
Activity: 725
Merit: 503
January 23, 2013, 01:20:15 PM
#3
but shares are submitted even when mining against the satoshi client no? and what is a share that doesn't solve a block?
full member
Activity: 125
Merit: 101
January 23, 2013, 09:51:42 AM
#2
i'm assuming you are talking about pooled mining, where the pool rewards the miners based on the amount of shares they submitted.

if the amount of shares that were solved by a miner was not verified by the pool, it would be easy to cheat the system with malicious software that would report a fake amount of shares
hero member
Activity: 725
Merit: 503
January 23, 2013, 09:23:30 AM
#1
So last thing I don't get about bitcoin: Why do the miners have to send shares all the time and not only shares that solves the block? Cant the local mining software judge if a share has solved a block?
Jump to: