Blockchain/Bitcoin for beginners 6: blocks and mining, content and creation of bitcoin blocks



In this video we introduce the basic concepts behind how new blocks are created in the Bitcoin blockchain. We start by taking another look at the blockchain.info …

45 Comments

  1. OMG, so painful to watch!!!  Spit it out already and stop stammering for half the video.  Appreciate the content but my God man…. get to the point. The video could have easily been 10m instead of nearly 50m..

    * Never mentioned how transactions propagate through the network of nodes; push or pull, REST or RPC over HTTP, etc…
    * Never mentioned what a node does when a block has been solved that includes transactions that the node currently has in ITS block.

  2. Eureka!!!! Thank you for making these videos and for the explanations in detail… it has cleared up several questions that were roaming around in my head as I read about this topic, and I definitely had a few”ohhhhhh” moments..

    Great job explaining it so those of us new”ish” to the topic so we can understand better.. I appreciate you and your time.. Great job…

  3. Question goes to Matt. 🙂 lets say miner is successful hacking next block HASH using (Hash of transaction pool + previous block hash + time stamp + random number) = New Hash. now miner is informing every one system about new hash he/she has found. Everyone validate if its correct or not? My question is that, do all nodes in network has to validate hash before it gets added to block or certain percentage of nodes are needed in order to validate hash??

  4. I don't see the reasoning in having to validate the entire block chain all the way back to the Genesis block. This is considerably wasteful in resources and scales poorly. The solution to this would be to validate only back to the previous block. If every node in the network has the exact same previous block, then you have a consensus.There is no reason to have to continue validating back to the Genesis block because all those previous blocks have already been validated and a consensus was given by the nodes. I'm pretty sure that those computers doing the mining never bother to validate any previous blocks since it already has cached and validated all the previous blocks. Wasting time validating all the blocks back to the Genesis block just repeats what is already known and would waste valuable time getting the new block pushed out onto the network for consensus.

  5. Question: is there a possibility that a transaction gets confirmed twice or even more, because this transaction is selected by different miners into their transaction batches to be validated, or can a specific transaction only be selected by one miner for his or her transaction batch.

  6. I appreaciate the talk, I think i could re-iterate that first 9 minutes in about 3 minutes of clear phlegmatic phrases. i.e. This is the number of the block, They are sequential and incremental, These are the previous ones, This is the number of payments in every block.. That would have summarized the first 7 minutes of the talk? it means that i am teasing infos out of an overactive fast ad-lib. thanks though.

  7. Hey Matt, I have two doubts here:
    – As your iphone is also running as a node, does it download the complete blockchain to keep a copy ? If yes, it will consume lot of memory. How does small devices cope up with this ?
    – Also, in systems like proof of existence, what does a minor validate in a transaction? As there is no history like cash flow in those kind of transactions.

  8. Hi Matt, good work. Trying to catch up and your videos and playlist saves me ploughing through semi connected topics. What I missed sofar is the incentive for non miners to keep a full node. Just having a service running on top of it? I tried to set up a full ethereum node once… Took forever and aborted it.

  9. Hi.
    2 questions:
    1. Who validates a block? A random group of nodes?
    2. What happens in 2 or more miners find a valid hash at the same time? Do both the blocks get added to the chain, or 1 is selected and the rest discarded? If it's the latter, who decides which one to select?

    Thank you for this series. So much better than the other videos which claim to teach you Blockchain in 5 minutes.

  10. When a miner finds a solution, will it's transaction pool be sent along the network in order for all the nodes to verify it? Since transaction pools are different from each other..

  11. Hi Matt, you mentioned that transactions and published block will be validated by each node of network. Can you please explin that validation method with some examples ? May be with same coffee example ? I mean you had lets say only 5 bucks. and purchased coffee of worth 6. How each node validates this ? How fast they derive info that I have sufficient balance to spend ?

  12. ciao Matt,

    first of all big congratulations for your series! simply excellent! I'm learning blockchain through your videos. You could explain kids and they would understand, I can put money [or bitcoins :)] on this. I have just a question on this video:

    – is it theoretically possible to have the same transaction in two blocks for racing conditions? say we have a general pool from TX1 to TX10. If I understood correctly each miner is able to manipulate the transactions to be selected and the nonce to have the right number of front zeros. Miner1 [M1] gathers TX1-TX3-TX6-TX7-TX8-TX9 and presents a solution which is "unconfirmed". In the same moment M2 which relies on a similar pool comes out with another "unconfirmed" solution which includes TX1-TX2-TX4-TX5-TX8-TX10. At this point there are two unconfirmed blocks in the air [whose calculations can be assumed correct] that in case of approval from the other nodes would duplicate TX1 and TX8 across the network. In a situation like this what is going to happen?

    Greetings from Australia,
    Antonino

  13. Hi matt, what happens if a miner creates a fake transaction and add it to the block, he then do the block creation process and succeeds it . After that he broadcast this block to all other nodes. From my understanding no node is guaranteed to know about every transaction, So then how will one node can detect that the miner added a fake transaction in the block just received, and invalidate the block?

  14. great all around video.. im gonna go an look at more of your videos .. .. i wanna mine for bitcoins any advise .. would love to chat or Skype with you to pick your brain ..

  15. Hello Matt , here are few questions

    – How a miner will know the difficulty level while hashing if it changes according to the no of Miners in the network ? Means last block has a difficulty level of 17 but as you have explained for about 2000 block the difficulty level change so while mining for a new block how do I know as Miner what is the difficulty level ? also is difficulty level is measured using zeros or any other number of letter as well ?

    – When a Hash of block is found, that's kind of closure of the block rather than the start of the block. Means the block shown on the top of blockchaininfo.com is the block which is completed and in the background the next block processing underway ? When I first saw the top block I thought, that the block under Progress.

  16. Hi Matt, I'm a huge admirer of cryptography videos. You make confusing concepts easy to understand. I have been casually following your blockchain videos up to this point and it is very interesting to say the least. Some videos get very long but your effort is much appreciated. Sometimes I would watch for hours without realizing the time. But aside from the interesting and academic nature of this topic how else would this information be useful for somebody like a network engineer? Or who is the targeted audience for these videos?

  17. Hello Matt, had a query on the nounce concept. the nounce is a number which will create x number of leading zeros before the hash of the block. but do we have a fix limit of transaction to create that hash what if one of the miner is creating a hash on 200 transaction where as the other miner is creating a hash on 201, other on 210 transaction. in this case the hash created for these three miners will be correct but whos block will be considered as a right one?

    consider the following example,

    txn1, txn 2, txn 3 …… txn 10 – > all these transactions are incoming (not confirmed)

    miner 1 – picks up the group of transactions until txn 3 and produces a nounce + hash of current block -> 000000abaubfabf
    miner 2 – picks up the group of txn's until txn 9 and produces a nounce + hash of current block -> 000000zvzdfdgag
    miner 3 – picks up the group of txn's until txn 10 and produces a nounce + hash of current block -> 000000etuiurtiuituiwt

    all these are valid as the hash calculated would be correct as per the input. so which one would be considered in this case?
    also if miner1's block is put on the blockchain, will that mean that txn 4 onwards would be still in the pool? and have to be mined?

    ***Or do the miners wait until 10mins to collect all the unconfirmed trns and then carry out the hashing?

  18. Hi Matt. I just subscribed. Great INFO. I'll watch all the vids, but id like to understand the hashing and why and how minor hash the nounce. Why
    is it so hard to come up with that number and why once they get it it is so relevant? Why that number? Thank You . My apology if this is a weird question, but I really want to understand the concept. Thanks

  19. If there are too many leading zeros then it would increase probability of finding the same hash before. If that happens then what does it do?

  20. Hi Matt. I just finished watching this series but I'm still left wondering how the first bitcoin was created and how the first transaction was made if the recipient had no bitcoin to give as change. Also, if miners are paid from owners of existing bitcoins from fees which are a portion of the transaction but how did this initialise in the first few transactions then how did the first miner get to mine coins if there were no coins to mine from transactions? I know you showed the genesis block and hopefully I didn't miss something in that episode in relation to the points , but can you explain this please?

  21. Thanks for the tutorial! I have a question, if the miners pick and choose the transactions, wouldn't it create a situation where some transactions are left out of sync with respect to the block's timestamp? For example, will it lead to a transaction having an older timestamp being excluded by the block next in the chain and included within a block some time later in the chain. Can you please clarify?

  22. I have gone through a few videos and have seen that you have covered mining including block creation, and the consensus protocol fairly well. Could you please clarify what a transaction validation in this UTXO world would specifically involve – what data is included as part of each transaction in the body of a block (is it just Unspent outputs and public address or something more), how that data is used to validate that bitcoin being transferred in that transaction is not being double spent, or is owned by that public address (especially if public addresses aren't being recycled). Apologies if this is already contained in a video, in which case it would be great if you could advise where to look.

  23. where is the local pool of transactions is stored? on hard drive or ram? also not mining nodes do not have local pool of unconfirmed transactions, right?

  24. Is it possible that an unconfirmed transaction will be left out or can be ignored by all the miners inorder to solve the puzzle for a particular block or is it queued up for the next block?

  25. Can two blocks have a similar hash value…. if yes, then how are block hashes(headers) are linked with all the transactions? If no, then after a certain amount of transactions (which would be huge but still), there would be a possibility to create a hash similar to older block header. How is this dealt with?

  26. Hi – I have a few questions – excuse me if you answer them in later videos, but I thought I'd ask now because I've watched this far and I'm still not sure:

    1. Since a hash has only 256 bits and therefore can't be unique to every input, what are the chances that for a particular hash, for all the inputs that could possibly generate that hash, more than one input is /not/ gobbledegook? E.g. the hash you generate from the Alice in Wonderland text – what are the chances the same hash could've been generated from another input that also makes sense? Could you talk me through the numbers? Are there any implications of that on blockchains?

    2. A general computing question – how are errors in data transmission (like from cosmic rays or whatever, I dunno!) made so rare that they never affect the blockchain? Or if they do, how are they distinguished from malicious attempts to alter something?

    3. What value is created by bitcoin miners? It's not like a carpenter making a piece of furniture, you know what I mean? OK, so the transactions need to be put into blocks – but what if there was a fixed time period, say exactly every 10 min a new block is created – then there wouldn't need to be a competition, any hash could be used – and if it has to be decentralised, then couldn't any node be selected at random every 10 min to package up the next block? I'm not saying my way would be better (it clearly isn't, otherwise they'd be doing it already), I'm just trying to probe why the system is set up the way it is. All I can think of is it's like F1 racing, utterly pointless on its own, but drives innovation that trickles into normal vehicle products. Is there some security-related reason? Otherwise, that's an awful lot of computing power going into solving an otherwise useless puzzle – I must've misunderstood something!

    4. What reasons do bitcoin miners have for excluding certain transactions from a block? I imagine the ideal for them would be to package up blocks as fast as possible, so as few transactions as possible per block, but since they're competing to do that, wouldn't it make sense to include as many transactions as you can, just to stop even the tiny amount of transaction fees going to your competitors? Is it possible for a transaction to be excluded from blocks repeatedly? What's to stop the computer geeks of the world from ganging up and stopping your transaction from ever being confirmed ever?!

    5. Do the principles of the anarchists who created bitcoin not stretch to concern about wealth inequality? As you said, very few people have access to the kind of computing power needed for bitcoin mining – that means the wealth must get super-concentrated to only a few people. I mean, what even is their vision? Will bitcoins replace normal money? Will salaries be paid in crypto-currency? Will mining have to stop once 21 million bitcoins have been created? Why 21 million? (Reading off bitcoinvision.net)

    Thanks so much – loving your videos so far – lots of technical detail but still understandable to a n00b. Please take it as a compliment that they've got me asking questions!

Leave a Reply

Your email address will not be published.


*


9 + 1 =