3.4 Distributed Blockchain - Video Tutorials & Practice Problems
Video duration:
4m
Play a video:
Now that we've talked about the cryptographic hashes we use the cryptographic hashes to build a block and then we build a chain of blocks or a blockchain. We've talked about those elements. Lets talk about now a distributed blockchain. To do so, I'm gonna put together the different elements we've seen. We looked at a blockchain. And we talked about all the blocks on a blockchain are actually chronologically ordered. And they're linked together using cryptographic hashes. But in this video what I wanna talk to you about now is the fact that this is just Peer A. We have a Peer B. And we have a Peer C. And what this really implies is that this is a network. And each one of this is a peer on that network. And if you'll notice all the peers have an identical copy of the blockchain. That is the blockchain that we put together and which we sealed by using these cryptographic hashes is exactly the same. So this is Peer C that is the third specific in this case node. This node has a blockchain that has a hash that ends on EA67C. If I go to Peer B which is gonna be the second one I will have exactly the same cryptographic hash. Let's take it back all the way to Peer A which is gonna be the first node. Now notice, all of these are all the same exact blockchain and they all have the same cryptographic hash. But here is we are having a distributed block is such an important innovation and why its so essential. If you actually have a centralized database say for example a bank and you hack that bank you basically tamper with all the records. But when you have distributed network that actually has an identical copy of this blockchain, if you hack any of these specific nodes you still have the other copies. So lets go ahead and hack Peer B. And I'm not endorsing or encouraging you to hack anybody but just so you see what happens. Lets assume that I go to Peer B and lets say that this Peer B is actually a malicious miner that wants to actually tamper and wants to modify a specific transaction. In this specific case lets say that this miner actually wanted to make a change and just added an extra transaction. So lets say transaction 5. Notice that that miner has broken the blockchain basically he no longer have valid blocks. In order for this miner to be able to make this a valid blockchain, the miner can go ahead and remine the specific block. And as we said, they will have to then see the miner has to wait until this block is valid note it takes time. You can't mine block four yet. You need to finish block three until you have a cryptographic hash that is valid. And then you have to mine block four. That is, its a sequential process and you can't go to the next step until you finish mining this block. Now that you have a valid block. This specific block. Actually notice one thing that bis interesting. This cryptographic hash has five leading zeroes. So you see, it is even lower than the four leading zeroes but its still a valid block. Why? Because it has to be below a required difficulty level. So in this specific case what you're seeing here is that this specific hash is lower than the target level we were talking about and its a valid block. But we still have an odd valid block right? Cause this specific blockchain still is broken so lets remine block number five and see what happens. So I'm gonna mine block number five. And I'm gonna go ahead and create this as a valid block. Now what you gonna see here is that we gonna have now a perfectly valid blockchain. And that blockchain has all the leading cryptographic hashes and it has the leading zeroes in all of them but it is different from the rest of the network. Cause Peer A their version of the blockchain has a cryptographic hash that ends in EA67C and Peer C also has an EA67C. So you see the majority of the network has a cryptographic hash or a version of the blockchain that's different from what this specific Peer has. So this version of the blockchain will be rejected by the rest of the network. That is the network will not accept this as a valid blockchain even though these cryptographic make sense. Because it does not match what the truth is across the rest of the network.