Bitcoin Forum

Other => Beginners & Help => Topic started by: timharvey on January 02, 2014, 05:37:01 PM



Title: what is the actual bitcoin algorithm
Post by: timharvey on January 02, 2014, 05:37:01 PM
Can you help in answering the following questions:-
1. What is the actual algorithm?
2. I'm told a coin is mined every ten minutes, how is this controlled since the number of people mining varies during each day?
3.Why / how does the algorithm become more difficult with time?
4. If new coins are being mined or discovered, I take it not all 21 million currently exist?
5.If 21 million don't exist at present how can we be sure they actually exist and who knows what they are?
6. Why can't it go beyond 21 million, surely there is another solution to the 21 millionth blockchain?
Thanks
Tim


Title: Re: what is the actual bitcoin algorithm
Post by: Andi on January 02, 2014, 06:44:13 PM
This Video will explain everything http://www.youtube.com/watch?v=Lx9zgZCMqXE (http://www.youtube.com/watch?v=Lx9zgZCMqXE)


Title: Re: what is the actual bitcoin algorithm
Post by: gweedo on January 02, 2014, 06:56:32 PM
1) Which algorithm bitcoin uses a couple?

2) Exactly that isn't exact science but that is what it is suppose to be happening, sometimes it takes a little longer or sometimes more blocks are produced in a short period of time.

3) https://en.bitcoin.it/wiki/Difficulty

4) We are currently a little more than half way.

5) Cause the code and nodes all have to agree to change that.

6) Cause the code and nodes all agree not to allow more than 21 million.


Title: Re: what is the actual bitcoin algorithm
Post by: Scorpius on January 02, 2014, 07:51:56 PM
Can you help in answering the following questions:-
1. What is the actual algorithm?
2. I'm told a coin is mined every ten minutes, how is this controlled since the number of people mining varies during each day?
3.Why / how does the algorithm become more difficult with time?
4. If new coins are being mined or discovered, I take it not all 21 million currently exist?
5.If 21 million don't exist at present how can we be sure they actually exist and who knows what they are?
6. Why can't it go beyond 21 million, surely there is another solution to the 21 millionth blockchain?
Thanks
Tim
1.- I think it's SHA256 applied twice to the block header.  The block header is constructed concatenating a lot of stuff like the previous block hash, the current time, the nonce of course, the hash of the merkle root of transactions.  I said I think because I have studied more scrypt currencies that sha256 currencies.  The hash must be lower than a target; let's say the hash has to start with an specified number of zeroes.

2.- The difficulty changes every x blocks or something (that is the hash has to have more zeroes at the left to be correct).  If blocks have been mined in less than 10 minutes in average the difficulty will rise.

3.- The "target" changes: the hash have to have more zeroes to the left.  Example.  Let's say difficulty is 0.00048.  The target is 000007fff8000000000000000000000000000000000000000000000000000000.  A mined block looked like this:
Code:
[2014-01-02 15:15:03] DEBUG: hash <= target
Hash:   000001132dbd8678607c314bb4340351b9641551822ebfc77dfccb62cf7ce575
Target: 000007fff8000000000000000000000000000000000000000000000000000000

The current target is 0000000000000003071f00000000000000000000000000000000000000000000 so good luck finding a hash that starts with 15 zeroes in less than 10 minutes!!!!

4.- They don't.

5.- The code of the bitcoin daemon of the whole world avoids that.

6.- Why bother? The last coins will be discover in the year 2140.


Title: Re: what is the actual bitcoin algorithm
Post by: odolvlobo on January 02, 2014, 08:02:12 PM
Can you help in answering the following questions:-
1. What is the actual algorithm?
2. I'm told a coin is mined every ten minutes, how is this controlled since the number of people mining varies during each day?
3.Why / how does the algorithm become more difficult with time?
4. If new coins are being mined or discovered, I take it not all 21 million currently exist?
5.If 21 million don't exist at present how can we be sure they actually exist and who knows what they are?
6. Why can't it go beyond 21 million, surely there is another solution to the 21 millionth blockchain?

First and most importantly, mining is the process of validating transactions and adding them to the blockchain.

1. The explanation of mining as "running complicated algorithms to solve a puzzle" is just wrong. It really works more like a lottery. Part of mining involves repeatedly guessing a number that must meet a certain criteria. When a miner guesses a number that meets the criteria, they are allowed to add the transactions to the block chain and receive the block reward and fees.

2 & 3. A block is added every ten minutes on average. The difficulty of the criteria is adjusted every 2016 blocks (approximately every two weeks) to maintain that average. If the actual time during the previous 2016 blocks averaged less than 10 minutes, then the difficulty is increased. If the actual time averaged more than 10 minutes, then the difficulty is lowered. Since all the miners are guessing at the same time, the amount of time to guess a good number depends on the number of miners and their total "hash rate".

4. The meaning of "exist" can be ambiguous. For example, you could say that 21 million exist, but only 12 million have been made available so far.

5 & 6. The bitcoin protocol is set up so that fewer and fewer bitcoins are created as time goes on. Eventually, the block reward goes to 0 around the time that there are 21 million bitcoins in circulation.


Title: Re: what is the actual bitcoin algorithm
Post by: pdaddy on January 03, 2014, 05:27:54 AM
I really enjoyed this (http://www.youtube.com/watch?v=mrlgw5KpkXM) video about bitcoins and can recommend viewing it.


Title: Re: what is the actual bitcoin algorithm
Post by: timewave0 on January 03, 2014, 05:42:17 AM
You'll want to understand the concepts of hash algorithms and asymmetric cryptography before attempting to understand bitcoin. The video might explain these things, but I haven't watched it. These are useful concepts anyway, if you're interested in how a computer can validate your password without storing it, for example. Or how your computer knows it's communicating with your bank instead of a hacker recording everything and relaying requests and responses to/from the bank (referred to in the security community as a man-in-the-middle attack). Or how the bank is able to send you data that only you can read, and vice-versa.


Title: Re: what is the actual bitcoin algorithm
Post by: limewall on January 03, 2014, 07:20:40 AM
This Video will explain everything http://www.youtube.com/watch?v=Lx9zgZCMqXE (http://www.youtube.com/watch?v=Lx9zgZCMqXE)

This video is quite amazing and clear.

I feel very secure in the way Bitcoins work, we just need more stability in the price.