Bitcoin Forum

Other => Beginners & Help => Topic started by: Sarthak on April 15, 2015, 08:50:32 AM



Title: Some Mining Related Questions!
Post by: Sarthak on April 15, 2015, 08:50:32 AM
Hello everyone,
       Just curious about how mining really works! Read a lot about it on google but i really didnt understood much. So, here are some of my questions:

1) How does mining actually create coins?
2) From which address are the mined coins generated?
3) I heard some sort of mathematical problems should be solved. What kind of problem is that? Please ecplain this one.
4) How does the difficulty rise and drop? Who rises and drops it?
5) In the term 1 GH/s GH= gigahash... Why do we need hashes? Mining is related to bruteforcing? ???

Any help would be appreciated! Thanks!

PS: I am not a technical guy. Please try to make it simple ;D


Title: Re: Some Mining Related Questions!
Post by: Amph on April 15, 2015, 10:54:29 AM
1) when you solve a block you get a reward of 25 bitcoin for now(12.5 in the end of 2016), to do this(if i remember correctly) your machine must be the one that is closest to the nonce, that given every time
2) every block also contains a record of which Bitcoin address is entitled to receive the reward(from wiki)
3) here a link, too long to write here http://qz.com/154877/by-reading-this-page-you-are-mining-bitcoins/
4) the miners have the responsibility, of rising and dropping the diff, based on their revenue, which is based on the price of bitcoin
5) i'm not sure what you really mean here, but the algo can't be bruteforced, hash are the unit of measure of your machine(how powerful it is)


Title: Re: Some Mining Related Questions!
Post by: TheRealSteve on April 15, 2015, 12:47:47 PM
My attempt:
1) Mining 'creates' coins by solving a puzzle.  If the puzzle is solved, the miner broadcasts this to the network, and claims a certain amount of Bitcoin.  The network then checks if the miner really solved the puzzle, and if they agree with the solution and the amount of Bitcoin claimed, then the miner gets that amount of Bitcoin.  So the coins are 'created out of thin air', but because it's a consensus model - i.e. the majority of the Bitcoin network has to agree - a miner can't just claim 1,000,000 Bitcoin.

2) The coins are generated in a transaction - they aren't actually 'spent from' another address.  Addresses themselves are an abstraction for a list of transactions which can be spent if a particular other type of puzzle is solved.

3) For mining, the puzzle that needs to be solved is: given a hash function and a certain input+nonce, find the nonce that causes the value of the hash to be below a certain threshold.  Real world analogies (most of them involving toin cosses) are difficult, but a popular chemistry class example might work somewhat: phenolphthalein is used to demonstrate when a solution is more acidic than it is a base.  You have to add the base one droplet at a time (titration), and only when the acid has been neutralized does the solution become and remain pink.  This titration takes a long time.  But once you have done this, you can share the same solution with somebody else and simply tell them how many ml you added, and they can then quickly verify if you are correct by adding the same amount - the solution should turn pink, and then adding a droplet of the original solution again - the solution should turn clear.  The analogy is still flawed because for hashing, there's only the single hash operation required to verify the value.  If you never had this demonstration in chemistry (or didn't take chemistry), hit up youtube ;)

4) The difficulty adjusts every 2016 blocks based on the amount of time the last 2016 (well, 2015) blocks took to mine.  Ideally this should take exactly 2 weeks.  If the last 2016 blocks actually took 12 days, then the network is (1-(12/14))*100% ~= 14.3% fast, and the difficulty is adjusted to be ~-14.3% more difficult to solve, so that ideally the next 2016 blocks should take an exact 2 weeks again.  This is all done via the code and, once again, via consensus - so there's no single person, organization or company that changes the difficulty.

5) Yes, the mining method where the the hash of an input and a nonce are taken is very much like bruteforcing.  The outcome of the hashing function is unpredictable (or so we assume with regard to SHA-256), so a miner has to try a lot of nonces to find a combination of input+nonce that results in a desired hash value.


Title: Re: Some Mining Related Questions!
Post by: Sarthak on April 16, 2015, 04:19:20 AM
Thank you both for your answer but I am still confused on the answer number 2! Which address sends the reward to the miner? ???


Title: Re: Some Mining Related Questions!
Post by: josef2000 on April 16, 2015, 05:26:06 AM
Thank you both for your answer but I am still confused on the answer number 2! Which address sends the reward to the miner? ???
If you are solo mining, the coins come from no adress, they are generated if you find a block. If you are pool mining you will get the btc from the pool, the pool splits up the reward for the block - in this situation the pool generates coins and splits the reward up for every miner.


Title: Re: Some Mining Related Questions!
Post by: Sarthak on April 16, 2015, 05:45:39 AM
Thank you both for your answer but I am still confused on the answer number 2! Which address sends the reward to the miner? ???
If you are solo mining, the coins come from no adress, they are generated if you find a block. If you are pool mining you will get the btc from the pool, the pool splits up the reward for the block - in this situation the pool generates coins and splits the reward up for every miner.

I got clear about the pool mining! Hmm.. Lets make it clear about the solo mining! You have a address where the coins were generated from solo mining? ;D
If you could provide one It would be easy to understand ;D
Well, Thanks for the answer! :)


Title: Re: Some Mining Related Questions!
Post by: Amph on April 16, 2015, 07:42:17 AM
Thank you both for your answer but I am still confused on the answer number 2! Which address sends the reward to the miner? ???
If you are solo mining, the coins come from no adress, they are generated if you find a block. If you are pool mining you will get the btc from the pool, the pool splits up the reward for the block - in this situation the pool generates coins and splits the reward up for every miner.

I got clear about the pool mining! Hmm.. Lets make it clear about the solo mining! You have a address where the coins were generated from solo mining? ;D
If you could provide one It would be easy to understand ;D
Well, Thanks for the answer! :)

maybe i wasn't clear enough, but i responded to this question above, point two

here form wiki

"Because there is a reward of brand new bitcoins for solving each block, every block also contains a record of which Bitcoin addresses or scripts are entitled to receive the reward. This record is known as a generation transaction, or a coinbase transaction, and is always the first transaction appearing in every block. The number of Bitcoins generated per block starts at 50 and is halved every 210,000 blocks (about four years)."


Title: Re: Some Mining Related Questions!
Post by: TheRealSteve on April 18, 2015, 01:36:20 AM
Just to clarify (again), that is only the destination address (technically, script hash thinger) - the generated Bitcoins don't come from pre-existing transactions.  I.e. there isn't a wallet out there with several million Bitcoin that the generated Bitcoins are sent from.  Re-read my post for details and if it's still unclear, I can give it another shot ;)


Title: Re: Some Mining Related Questions!
Post by: notlist3d on April 18, 2015, 03:21:05 AM
Thank you both for your answer but I am still confused on the answer number 2! Which address sends the reward to the miner? ???
If you are solo mining, the coins come from no adress, they are generated if you find a block. If you are pool mining you will get the btc from the pool, the pool splits up the reward for the block - in this situation the pool generates coins and splits the reward up for every miner.

I got clear about the pool mining! Hmm.. Lets make it clear about the solo mining! You have a address where the coins were generated from solo mining? ;D
If you could provide one It would be easy to understand ;D
Well, Thanks for the answer! :)

You can understand solo mining.  But if you are looking at BTC solo mining is considered "lotto mining" in most cases.    Some asic makers or big operations have enough hash to make their own pool yes.

But as far as hobby miners/normal people.  You will not be able to solo mine successfully since such a small number of overall hash you have.


Title: Re: Some Mining Related Questions!
Post by: odolvlobo on April 18, 2015, 08:10:49 PM
1) How does mining actually create coins?
2) From which address are the mined coins generated?
3) I heard some sort of mathematical problems should be solved. What kind of problem is that? Please ecplain this one.
4) How does the difficulty rise and drop? Who rises and drops it?
5) In the term 1 GH/s GH= gigahash... Why do we need hashes? Mining is related to bruteforcing? ???

1&2) There is a special transaction in each block called the "coinbase" transaction. This transaction creates new bitcoins and sends them to an address belonging to the miner (or the pool). The miner (or the pool) creates this transaction and adds it to a block before hashing it.

3) The problem that is solved is this: Given a block of transactions, find a number such that the double SHA-256 hash of a summary of the transactions along with the number results in a value that is less than the target. The target is determined by the difficulty.

4) The difficulty (and thus the target) is recomputed every 2016 blocks. The new difficulty is derived by a simple formula based on the old difficulty and the average rate at which the last 2016 blocks have been added. If the average time for a block was less than 10 minutes, then the difficulty is increased. If the average time was more than 10 minutes, then the difficulty is decreased. Each miner computes the difficulty (and the target) for themself, and since every miner uses the same values, they get the same results. Cheaters are rejected.

5) Yes. By design, the only known way to find a number that solves the problem is brute force guessing.