Home / Forums / Cryptocurrency / Bitcoin / Mining For Newbies

Mining For Newbies

This topic contains 3 replies, has 4 voices, and was last updated by  Vebel 2 months, 3 weeks ago.

  • Author
    Posts
  • #9022

    Cuvukay
    Participant

    So I’m trying to explain the process of mining Bitcoins to my friend, but unfortunately she’s too lazy to research and watch the videos I’ve sent her on how mining actually works. She understands the idea of decentralized digital currency and all the pros that go along with it and how they’re used in exchanges, but she doesn’t understand the mining aspect of it. I don’t mine that hard, so I’ll admit I don’t even know a LOT about it… but I can’t seem to explain to her in general terms what mining Bitcoins is.

    Can someone help me out and explain how to tell my friend what mining is?! BTW: She does understand the concept of blocks.

    #9023

    Shamim Ahmed
    Participant

    Mining attempts to make blocks of transactions permanent in the sense that they can’t be changed after the fact. The idea behind it is that there is a bit of space available in a block for arbitrary data. You now try to find this arbitrary data in such a way that the complete contents of this block solve a certain puzzle. This puzzle can only be solved by bruteforcing it by trying many different values for this arbitrary data. Once the right value is found, the miner broadcasts it to the network and then it is easy to check by others that the solution is correct. However, if the contents of a block change, for example because a transaction is altered, added or removed, the puzzle is changed and a solution has to be computed again.

    What is the purpose then? This system prevents people from tampering with blocks that have been found. If I want to change a transaction in a previous block, I need to solve the puzzle again for the changed block contents. And all the while the network works against me to produce new blocks. So it is almost impossible to change the contents of a block after the fact. And the “deeper” the block is (that is, the more blocks that have been mined after the one I try to change), the more blocks I have to rework, since each block has a hash to the previous block in it, creating a chain of blocks.

    Mining secures the network. You could see a miner as a merger between a bank security guard and an accountant. As a reward for this effort, the miner receives a reward for 25 BTC plus any fees contained in the transactions in the mined block.

    #9024

    doju
    Participant

    Mining is like a lottery.

    Every miner creates as many tickets (hashes) as fast as possible. About every 10 minutes there is a winner that gets a reward (currently 25 BTC). The winner may choose which transactions are executed and gets the transaction fees of those transactions.

    I would start very simple and go from there answering her questions.

    Minig pool = lottery syndicate

    (Lottery is much closer to the truth than mining. There is no progress or hard puzzle to solve. It is stupidly trying hash after hash after hash.)

    #9025

    Vebel
    Participant

    Try this,

    The latest transactions are put in a list/group called a block.
    All previous transactions were also put in blocks and this makes a chain of blocks. But each new block needs information from the previous blocks because its ID is actually the cryptographic hash of a previous one. The cryptographic hash used is called SHA256 and hashing is a bit like a compressed tweet unique to a text of characters of any length. When you hash a text of any length with SHA256 you get a number of 256 bits, that is, 256 zeros and ones.
    So the ID of each block, that is, the sha256 of previous one, will be a number with 256 bits.
    One important propriety of a cryptographic hash is that a small change to the input text of characters makes a complete change to the output in a way that you cannot relate these results to guess the origin of them and so this result uniquely identifies that text length of characters without giving you any hints of what made it actually give that output.
    Anyway, all these blocks make a linked list because each block has as its id the hash of the previous one that as also as ID the hash of its previous one, and so on, till the genesis block.
    So new blocks get stacked on previous ones and because the ID of a block has to be the same as the cryptographic hash of the one before it, you cannot make a new block that can be added to the chain without it having in it all the history of the chain.
    Pretty much like with our DNA. It has all the history of life on Earth in it. In the same way, the ID of a block has also all the history of blocks in it.
    Mining is to find a block of the latest validated transactions with an arbitrary imaginary transaction called the “nonce” added at the end.
    This imaginary transaction added at the end is a complete fiction and is not a real transaction. It is just a random gibberish added so that it will make the hash of the block different every time you change it.
    So in mining computers are always changing this imaginary transaction to see if the cryptographic hash of the block with it added to the list of real transactions that comprises the block will give a hash result starting with the number of zeros actually required by the puzzle challenge at present level of difficulty.
    The difficulty level is how many zeros are at the start of this 256 bits hashing result. The more zeros that are required at the left the harder the puzzle gets because the computers need to find by trial and error a match that is much more unlikely and so will probably need to try much more hashing the block with a different imaginary transaction – called the nonce, as was said – to see if it will give a result with the required number of leading zeros.
    An added zero required makes it twice as much harder and so the difficulty rises exponentially with the number of zeros required following: two to the power of n, where n is the number of zeros.
    This makes sure all transactions in the chain are valid and mutually consistent and makes it possible to achieve consensus and agree on the current block as for the new block to be agreed on it must have a comparable value regarding how much valuable it is in terms of being computationally expensive. As the latest block has in it a kind of DNA that accounts for the whole history of the chain of blocks it is astronomically computationally expensive and all extra spurious work of the puzzle/difficulty/nonce will be making the following blocks with even more expensiveness added to it.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.