Bitcoin Forum

Other => Beginners & Help => Topic started by: ctoon6 on July 04, 2011, 12:33:33 AM



Title: how are blocks made and irc
Post by: ctoon6 on July 04, 2011, 12:33:33 AM
I understand what the block chain is, and how transactions are made.

but what is "hashing" exactly and who decides what hash is correct and gets to make the block and put it in the chain. who decides the difficultly and how are blocks made more "difficult" to generate. I understand this process takes place every x number of blocks generated, but how is it carried out.

and another question is, what exactly does the irc server do, isn't this a central point of failure depending on what it does?

Will the client accept blocks that do not include transaction fees, where it would normally force the user to include one.

sorry, i searched the wiki and found no answer to these questions without too much technical mumbo jumbo. thanks.  :)


Title: Re: how are blocks made and irc
Post by: FreeMoney on July 04, 2011, 01:08:45 AM
A hash function takes any arbitrary chuck of data and returns a fixed size chunk. It's a one way function, you can't get the original data from the output. For bitcoin mining you hash transaction data + the hash of the previous block + a nonce. You hash over and over iterating the nonce each time until the output is lower than the current target. It is easy for others to verify and then they add your valid block to their chain.

IRC is just used for hearing about other nodes, it isn't vital it's convenient.


Title: Re: how are blocks made and irc
Post by: ctoon6 on July 04, 2011, 01:15:10 AM
thanks for your response

what i understand is that you are hashing data in the previous block and a number your making up to find a certain output. what is the current target and how is it determined? how does that fit with how things get more difficult?


Title: Re: how are blocks made and irc
Post by: Bth8 on July 04, 2011, 02:39:47 AM
For a block to be accepted as valid, its hash must be of a lower value than the current target. As a result, the lower the target's value, the harder it is to produce a valid block, as there's no way to know what will lower the value of the hash of a block without generating a hash. Essentially, you're attempting to brute force a low enough hash. Every 2016 blocks, the client looks at the rate at which blocks are being generated and adjusts the target accordingly such that it should take about 10 minutes for the network to generate 1 block. This ensures that even if someone did pull together an amazing amount of hardware, they couldn't generate an obscene amount of coins, keeping it from the rest of us (not for long, anyway). There's no central authority on difficulty, each client generates it individually. As each client has an identical block chain, however, each client comes up with the same target.


Title: Re: how are blocks made and irc
Post by: ctoon6 on July 04, 2011, 02:53:19 AM
just to make sure i understand completely, we are looking for a hash that is lower than what the client accepts as the proper difficulty. difficulty is increased by lowering the accepted hash.

this works because a hash can not be arithmetically computed backwards(at least currently), and we can easily verify that it is correct simply by "plugging" in the nonce that the miner said worked.

if that's correct then i think i got the whole bitcoin thing figured out.


Title: Re: how are blocks made and irc
Post by: JoelKatz on July 04, 2011, 04:09:28 AM
just to make sure i understand completely, we are looking for a hash that is lower than what the client accepts as the proper difficulty. difficulty is increased by lowering the accepted hash.

this works because a hash can not be arithmetically computed backwards(at least currently), and we can easily verify that it is correct simply by "plugging" in the nonce that the miner said worked.

if that's correct then i think i got the whole bitcoin thing figured out.
You got it. What prevents a miner from mining a block that doesn't follow the rules is that all the other miners and clients will ignore it, and if they don't get their block in the public chain, the fact that they mined it doesn't mean anything.