Bitcoin Forum

Other => Beginners & Help => Topic started by: raresaturn on June 30, 2011, 04:02:23 AM



Title: mining process query
Post by: raresaturn on June 30, 2011, 04:02:23 AM
So each time your computer tries a hash that fails, is there a list kept of failed attempts? Otherwise you could be re-trying ones that you know have already failed.


Title: Re: mining process query
Post by: BitcoinBabe on June 30, 2011, 04:06:55 AM
So each time your computer tries a hash that fails, is there a list kept of failed attempts? Otherwise you could be re-trying ones that you know have already failed.

You don't do the brain work work youself, your computer/cpu/gpu does.


Title: Re: mining process query
Post by: BitcoinBabe on June 30, 2011, 04:12:05 AM
Visit a mining pool to see how it works.

http://www.bitcoinplus.com/generate?for=2675969


Title: Re: mining process query
Post by: raresaturn on June 30, 2011, 04:15:40 AM
So each time your computer tries a hash that fails, is there a list kept of failed attempts? Otherwise you could be re-trying ones that you know have already failed.

You don't do the brain work work youself, your computer/cpu/gpu does.

Yes i realise this...but the question was: does the computer keep trying solutions that have already failed, or does it keep a list of failures and only try untried solutions?


Title: Re: mining process query
Post by: MelMan2002 on June 30, 2011, 04:24:42 AM
I don't see a point to keeping track of failed attempts - the likelihood of a repeat is very very small.


Title: Re: mining process query
Post by: raresaturn on June 30, 2011, 04:27:43 AM
I don't see a point to keeping track of failed attempts - the likelihood of a repeat is very very small.

If each attempt is truly random then the likelyhood of a repeat rises with each failed attempt.  There could be room for optimisation here...


Title: Re: mining process query
Post by: BitcoinBabe on June 30, 2011, 04:31:35 AM
I don't see a point to keeping track of failed attempts - the likelihood of a repeat is very very small.

Well, from my experience, as a pooled miner, you don't actually see any lists of failures or successes. And why would you want to, as you're not the one putting in the brain power? As I keep generating payouts, I know that my computer (and other's using my Bitcoin Bonus code) is helping towards the solving of a block.

Not sure how it works for solo miners, although I can't see why they'd need to know either. We're talking millions of hashes per second. Who'd want to be looking through such a list, and why?


Title: Re: mining process query
Post by: raresaturn on June 30, 2011, 04:40:33 AM
I don't see a point to keeping track of failed attempts - the likelihood of a repeat is very very small.

Well, from my experience, as a pooled miner, you don't actually see any lists of failures or successes. And why would you want to, as you're not the one putting in the brain power? As I keep generating payouts, I know that my computer (and other's using my Bitcoin Bonus code) is helping towards the solving of a block.

Not sure how it works for solo miners, although I can't see why they'd need to know either. We're talking millions of hashes per second. Who'd want to be looking through such a list, and why?


ARRRRRRRRGH!!!!!   The COMPUTER would be checking the list, not you!!!   :P


Title: Re: mining process query
Post by: Alan Lupton on June 30, 2011, 04:47:48 AM
I gave up on mining a while ago..

why is that? I just began today  ;)


Title: Re: mining process query
Post by: BitcoinBabe on June 30, 2011, 05:19:14 AM
I don't see a point to keeping track of failed attempts - the likelihood of a repeat is very very small.

Well, from my experience, as a pooled miner, you don't actually see any lists of failures or successes. And why would you want to, as you're not the one putting in the brain power? As I keep generating payouts, I know that my computer (and other's using my Bitcoin Bonus code) is helping towards the solving of a block.

Not sure how it works for solo miners, although I can't see why they'd need to know either. We're talking millions of hashes per second. Who'd want to be looking through such a list, and why?


ARRRRRRRRGH!!!!!   The COMPUTER would be checking the list, not you!!!   :P

LOL.

Hmm... OK, I guess you're trying to figure out how to make the work less difficult for your mortgage idea...?

:P


Title: Re: mining process query
Post by: raresaturn on June 30, 2011, 05:25:01 AM
I don't see a point to keeping track of failed attempts - the likelihood of a repeat is very very small.

Well, from my experience, as a pooled miner, you don't actually see any lists of failures or successes. And why would you want to, as you're not the one putting in the brain power? As I keep generating payouts, I know that my computer (and other's using my Bitcoin Bonus code) is helping towards the solving of a block.

Not sure how it works for solo miners, although I can't see why they'd need to know either. We're talking millions of hashes per second. Who'd want to be looking through such a list, and why?


ARRRRRRRRGH!!!!!   The COMPUTER would be checking the list, not you!!!   :P

LOL.

Hmm... OK, I guess you're trying to figure out how to make the work less difficult for your mortgage idea...?

:P

heh that's one application... ;)


Title: Re: mining process query
Post by: nonameo on June 30, 2011, 05:29:17 AM
Okay, I will try to explain stale shares to the best of my ability.

Currently everyone mining is trying to solve a block(the system is set up to average 1 block every 10 minutes)

However, let's say you were working on a block, but before you could finish your work the block was solved! what happens to what you were working on?

it's stale :P (really though, I think stale is a more catchall for "we didn't take this share because it doesn't work for the current block")


ahhh okay I think I have a better analogy :P

let's say you're at a slot machine. each time you put a quarter in the machine accepts it and you pull the lever and try to win(not guaranteed, but your quarter was recognized as a real quarter). But let's say you put a quarter in and the machine doesn't like it - it spits it back out at you! it thinks you gave it a penny, or maybe a canadian quarter :P your coin was stale.


Title: Re: mining process query
Post by: raresaturn on June 30, 2011, 07:04:26 AM
Okay, I will try to explain stale shares to the best of my ability.

Currently everyone mining is trying to solve a block(the system is set up to average 1 block every 10 minutes)




Is everyone trying to solve the same block?


Title: Re: mining process query
Post by: nonameo on June 30, 2011, 07:27:07 AM
Okay, I will try to explain stale shares to the best of my ability.

Currently everyone mining is trying to solve a block(the system is set up to average 1 block every 10 minutes)




Is everyone trying to solve the same block?

That is my understanding.


Title: Re: mining process query
Post by: kinlo on June 30, 2011, 11:16:28 AM
Everyone is trying to generate a block on top of the last one.  So yes everybody is trying to mine the same block, but with different contents.

When you mine you define the contents.  And the contents consist out of the current transactions, but also the generation of new coins: new coins are generated to your own bitcoin address, or the address of a pool.

But solomining is useless unless you have a lot of miningpower.  Consider joining a pool!


Title: Re: mining process query
Post by: compro01 on June 30, 2011, 03:11:09 PM
Okay, I will try to explain stale shares to the best of my ability.

Currently everyone mining is trying to solve a block(the system is set up to average 1 block every 10 minutes)




Is everyone trying to solve the same block?

depends on your definition of "the same block".

they're all trying to find a block which meets the requirements of the next block (has the hash of the previous block in its header and has a hash less than or equal to the target), but you're not running the same numbers during that attempting, namely different subsidy payout address (transaction 0 of a block) and different sets of transactions (or even no transactions at all except the generation subsidy, though this is rather assholeish unless there are no unconfirmed transactions waiting).

in a pool, everyone is working on the same set of data, which is given out by the pool server.  from the perspective of the network, a pool is just a single really big miner.


Title: Re: mining process query
Post by: raresaturn on June 30, 2011, 09:42:41 PM

they're all trying to find a block which meets the requirements of the next block (has the hash of the previous block in its header and has a hash less than or equal to the target)

This is what I find confusing...why can't you just use a hash of 1, which would surely be less than the requirement.  Doesn't sound difficult...


Title: Re: mining process query
Post by: compro01 on June 30, 2011, 10:05:43 PM

they're all trying to find a block which meets the requirements of the next block (has the hash of the previous block in its header and has a hash less than or equal to the target)

This is what I find confusing...why can't you just use a hash of 1, which would surely be less than the requirement.  Doesn't sound difficult...

you need the block such as the hash result of that block is less than the target.  you can't just arbitrarily pick the hash.

You take the block header, run it through SHA-256 twice, and check whether that hash output is less than the target.  if not, you increment the nonce value (which completely changes the hash value, due to the avalanche effect) and try again, over and over, until someone finds a valid block, then you start it all over again with a new set of transactions, etc.


Title: Re: mining process query
Post by: raresaturn on July 01, 2011, 01:45:59 AM


You take the block header, run it through SHA-256 twice, and check whether that hash output is less than the target.  if not, you increment the nonce value (which completely changes the hash value, due to the avalanche effect) and try again, over and over, until someone finds a valid block, then you start it all over again with a new set of transactions, etc.

Ok, so instead of increasing the nonce to randomly genrate a new hash value, is it possible to set your miner to just increment (or decrement) the hash value by one each time and go through them sequentially , thus eliminating re-tries?  It seem to me that that current way of doing it is a bit like playing Battleship without the white pegs.


Title: Re: mining process query
Post by: nonameo on July 01, 2011, 02:47:11 AM
No you can't do that... but by using a new nonce you pretty much ensure that you won't get the same hash again.


Title: Re: mining process query
Post by: raresaturn on July 01, 2011, 03:04:23 AM
No you can't do that... but by using a new nonce you pretty much ensure that you won't get the same hash again.

Why can't you? Is it because it's against the rules?  Not supported by current software?  Or simply not feasible?

thanks.


Title: Re: mining process query
Post by: compro01 on July 01, 2011, 10:23:21 PM


You take the block header, run it through SHA-256 twice, and check whether that hash output is less than the target.  if not, you increment the nonce value (which completely changes the hash value, due to the avalanche effect) and try again, over and over, until someone finds a valid block, then you start it all over again with a new set of transactions, etc.

Ok, so instead of increasing the nonce to randomly genrate a new hash value, is it possible to set your miner to just increment (or decrement) the hash value by one each time and go through them sequentially , thus eliminating re-tries?  It seem to me that that current way of doing it is a bit like playing Battleship without the white pegs.

you appear to be misunderstanding the process.  incrementing the hash is nonsensical, as it is not an input value, it is the result.  mining is working to find the input (the block header) that results in a hash which is less than the target.

you can't just change the output arbitrarily, as the input needs to match with it, and hashing is a one-way function (you can hash something, but it's (practically) impossible to take a hash and determine the input value that resulted in it.).


Title: Re: mining process query
Post by: raresaturn on July 01, 2011, 10:39:14 PM


You take the block header, run it through SHA-256 twice, and check whether that hash output is less than the target.  if not, you increment the nonce value (which completely changes the hash value, due to the avalanche effect) and try again, over and over, until someone finds a valid block, then you start it all over again with a new set of transactions, etc.

Ok, so instead of increasing the nonce to randomly genrate a new hash value, is it possible to set your miner to just increment (or decrement) the hash value by one each time and go through them sequentially , thus eliminating re-tries?  It seem to me that that current way of doing it is a bit like playing Battleship without the white pegs.

you appear to be misunderstanding the process.  incrementing the hash is nonsensical, as it is not an input value, it is the result.  mining is working to find the input (the block header) that results in a hash which is less than the target.

you can't just change the output arbitrarily, as the input needs to match with it, and hashing is a one-way function (you can hash something, but it's (practically) impossible to take a hash and determine the input value that resulted in it.).

ok thanks that's a bit clearer.