Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: gigabytecoin on March 08, 2011, 09:43:05 AM



Title: Basic Bitcoin Generation Techniques???
Post by: gigabytecoin on March 08, 2011, 09:43:05 AM
Can somebody please explain the basics as to how bitcoins are generated?

What are the very minimum requirements for generating bitcoins in any programming language?

I assume it goes something like...

1. Download block of hashed information to crack from the network (where exactly?)
2. Repeat mathematical process on your machine until you crack it (what process?)
3. Submit for verfication (to where?)
4. Rinse and repeat?

Any information (or links to previous threads a noob might not know of?) you can provide would be greatly appreciated!


Title: Re: Basic Bitcoin Generation Techniques???
Post by: elFarto on March 08, 2011, 09:51:51 AM
From my understanding, it goes something like this:

1.The client creates a new block, containing the previous block's hash, the current outstanding transactions, and a nonce (among other things).
2. The client calculates the hash for this new block:
    a) If it's less than the difficulty it publishes that block to all it's peers.
    b) If it's above the difficulty it increments the nonce and tries again.

Verification is done by all the peers. They will only accept a block if it has the correct hash.
All the existing blocks are downloaded from the peers.

Regards
elFarto


Title: Re: Basic Bitcoin Generation Techniques???
Post by: gigabytecoin on March 08, 2011, 10:20:37 AM
Thanks for the quick response elFarto!

How exactly would I know the previous block's hash? Is it posted somewhere once it is found? And which "block" are we talking about? The lottery (+50BTC) block? Or any block in particular?


Title: Re: Basic Bitcoin Generation Techniques???
Post by: Pieter Wuille on March 08, 2011, 10:23:15 AM
You should read https://en.bitcoin.it/wiki/Block_hashing_algorithm and https://en.bitcoin.it/wiki/Block_chain. The blocks in the block chain indeed have two functions: 1) ordering transactions and 2) generating new bitcoins.