Bitcoin Forum
November 01, 2024, 08:15:37 PM *
News: Bitcoin Pumpkin Carving Contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Blockchain and shares  (Read 1221 times)
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 503



View Profile
January 23, 2013, 02:23:30 PM
Last edit: January 24, 2013, 08:45:30 AM by rupy
 #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?

BANKBOOK GWT Wallet & no-FIAT Billing API
jabetizo
Full Member
***
Offline Offline

Activity: 125
Merit: 101


View Profile WWW
January 23, 2013, 02:51:42 PM
 #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

rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 503



View Profile
January 23, 2013, 06: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?

BANKBOOK GWT Wallet & no-FIAT Billing API
Ploo
Full Member
***
Offline Offline

Activity: 125
Merit: 100


View Profile
January 23, 2013, 06: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.
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 503



View Profile
January 23, 2013, 06:36:40 PM
 #5

Yes, you still "getwork" from the client!?

BANKBOOK GWT Wallet & no-FIAT Billing API
etotheipi
Legendary
*
expert
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
January 24, 2013, 04:42:21 AM
 #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.

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 503



View Profile
January 24, 2013, 08: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?!?!?

BANKBOOK GWT Wallet & no-FIAT Billing API
caveden
Legendary
*
Offline Offline

Activity: 1106
Merit: 1004



View Profile
January 24, 2013, 09: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.
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 503



View Profile
January 24, 2013, 10: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?

BANKBOOK GWT Wallet & no-FIAT Billing API
caveden
Legendary
*
Offline Offline

Activity: 1106
Merit: 1004



View Profile
January 24, 2013, 12:48:27 PM
 #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.
Meni Rosenfeld
Donator
Legendary
*
expert
Offline Offline

Activity: 2058
Merit: 1054



View Profile WWW
January 24, 2013, 01:13:32 PM
 #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.

1EofoZNBhWQ3kxfKnvWkhtMns4AivZArhr   |   Who am I?   |   bitcoin-otc WoT
Bitcoil - Exchange bitcoins for ILS (thread)   |   Israel Bitcoin community homepage (thread)
Analysis of Bitcoin Pooled Mining Reward Systems (thread, summary)  |   PureMining - Infinite-term, deterministic mining bond
nibor
Sr. Member
****
Offline Offline

Activity: 438
Merit: 291


View Profile
January 24, 2013, 01:49:11 PM
 #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!
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 503



View Profile
January 24, 2013, 02:09:17 PM
 #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.

BANKBOOK GWT Wallet & no-FIAT Billing API
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!