Consensus and Mining on the Blockchain

Sdílet
Vložit
  • čas přidán 29. 01. 2018
  • Consensus and Mining on the Blockchain - blockgeeks.com/
    What is consensus on the blockchain? Consensus basically means that all nodes in a decentralized network must come to an agreement on what is the truth. For bitcoin, all nodes must agree on the transaction history. In a centralized system, all the participants trust that the authority will behave honestly and share the truth with the rest of the members. Since only the trusted party has the power to modify the data, it is straightforward to achieve consensus. Everyone simply accepts and believes what the central authority says. For example, you simply trust your bank will put the correct balance for your account whenever you send and receive money. However, in a decentralized network, there is no central authority and each node does not trust any other nodes. The challenge is how can all the nodes agree on what is the correct state of the shared data? In other words, how can they all achieve consensus with mutual distrust? In computer science, this is known as the Byzantine Generals’ problem, which was originally presented in 1982.
    The Byzantine Generals’ problem is a description of consensus problems in computer networks. More specifically, how can distributed computer systems handle malfunctioning parts that give conflicting information to different parts of the system? This problem is abstractly described as a group of generals of the Byzantine army camped with their troops surrounding an enemy city. The generals must agree upon a common battle plan and they can only communicate with each other using messengers. However, one or more of the generals may be traitors who will try to confuse the others. The problem is to find an algorithm that ensures the loyal generals will all reach an agreement on the battle plan regardless of what the traitors do.
    In the case of bitcoin, each general could be thought of as a node in the network and all the honest nodes must agree on what is the true history of transactions. A malicious node can send conflicting transactions to different parts of the network. For example, Bob is a traitor and he sends a transaction stating he sent 10 bitcoins to Alice to one part of the network while sending another transaction stating he sent 10 bitcoins to Carroll to other parts of the network. Let’s assume that Bob only has 10 bitcoins in total, so he is trying to double spend his bitcoins. So what algorithm can be used in the bitcoin network to ensure all the honest nodes recognize Bob sent 10 bitcoins to Alice but reject that he sent 10 bitcoins to Carroll?
    Bitcoin uses the proof-of-work (PoW) algorithm to ensure all the honest nodes reach a consensus on the true history of transactions. The PoW algorithm concept was first developed in the early 90s to prevent email spamming. It required computers that want to send an email to do some computation work which took some time to complete before sending out the email. This reduced the amount of spam an email server could get in a given period of time. In bitcoin, PoW is used to govern the mechanics of how a new block is added to the blockchain. In the previous lesson, we learned that blockchain is append-only and once a block is added, it cannot be modified. Therefore, we need to ensure that all the honest nodes in the system will add the exact same block to their local copy of the blockchain to achieve consensus.
    So how does PoW achieve this? First, let’s imagine that all the nodes in the network are allowed to create a new block at anytime instantly. If this were the case, the network would get flooded with too many new blocks, and no one would be able to agree on which of the new blocks should be added to the blockchain.
    However, in reality, in order for a node to create a new block and broadcast that to the other nodes, it must do some computation work. The computation work is quite intensive and for bitcoin it takes roughly 10 minutes on average for any node to complete. Once a node completes this work, it broadcasts the block to other nodes who verify it. Therefore, all the nodes in the network that want to create a new block must race against each other to be the first one to complete this computation and broadcast their block. This way all the other honest nodes will receive the new block and verify that the proof of work was valid and the transactions inside the block are also correct and then add the block to their local copy of the blockchain.
    To read more, visit us at blockgeeks.com/

Komentáře • 25

  • @RN-uo2vo
    @RN-uo2vo Před 5 lety

    Excellent video

  • @freedomfight1933
    @freedomfight1933 Před rokem

    Great video

  • @codefreak3836
    @codefreak3836 Před 5 lety +3

    How do they actually verify if a new block contains the truth? Can't anyone perform intensive computation and add a malicious block?

    • @Supremax67
      @Supremax67 Před 5 lety

      Unfortunately they could. This is where aBFT protocol shine best. At this time, I only know of 1 project that offers that level of security.

    • @deb62615
      @deb62615 Před 4 lety

      I don't understand that either.. have you found the answer in the meanwhile?

  • @prafullkumar6536
    @prafullkumar6536 Před 6 lety +1

    can I get the slides please.

  • @pperez1224
    @pperez1224 Před 5 lety +1

    still not clear on how miners do know each other and maintain this information correct? And how a the system can garantee the number of miner is significant so that they can mutually agree to be come evil?

  • @apoorvahiremath7115
    @apoorvahiremath7115 Před 3 lety

    Concept explained very nicely.. thanks

  • @PopularTower
    @PopularTower Před 6 lety

    Thank you for the great explanation

    • @BlockGeeks
      @BlockGeeks  Před 6 lety

      Thank you for watching! Happy you enjoyed it.

    • @Supremax67
      @Supremax67 Před 5 lety

      @@BlockGeeks -- Cover next asynchronous Byzantine Fault Tolerant networks?

  • @deepthiramana
    @deepthiramana Před 4 lety

    Awesome explanation!!

    • @sergioescalona62
      @sergioescalona62 Před 4 lety

      Excellent Video! Excuse me for the intrusion, I would love your opinion. Have you heard about - Vaneath Crypto Cabotage (probably on Google)? It is an awesome one off product for making a fortune with this simple stock trading trick without the normal expense. Ive heard some unbelievable things about it and my buddy at last got excellent results with it.

  • @barfgreenrulz
    @barfgreenrulz Před 5 lety

    Do different miners approve the same transactions?

    • @dontysk
      @dontysk Před 2 měsíci

      As far as I understood, two different minners could validate different transactions, but the resulting block should be approved for the rest of the minners (or validators).

  • @revicondriz1246
    @revicondriz1246 Před 2 lety

    This the only video that I truly understand what is prof of work means

  • @MegaHithot
    @MegaHithot Před 5 lety

    Joe Lubin does not manage consensys well, hurting the little guy you can read in Verge

  • @ahb9days
    @ahb9days Před 5 lety

    You're audio is awful. Its cutting in and out.

  • @pratiksonawane1076
    @pratiksonawane1076 Před 2 lety

    Great video