Hello welcome back to the course on the blog today we're talking about distributed peer to peer networks.
All right.
So previously we've already talked about the cryptography.
Check that one off.
We've checked off immutable litter previously as well.
And now we're moving on to distributed P2P networks.
So let's have a look.
We left off last time when we discussed the example of property Leger's the traditional approach versus
the block chain approach and how the blotching can add more protection and make the whole léger immutable.
Make it very difficult for somebody to change previous records in the laser and therefore make it more
reliable.
However the question here is OK well if I'm trying to attack this later if I'm trying to make some change.
Yes indeed preassumed Previously it was just about ripping out a page or making like a change in a database
or Excel document which was very simplistic compared to the blotching approach but nevertheless even
in the block chain approach if this block chain is maintained just by this government authority then
what prevents me from going in and if I have enough time then actually changing this blog and then changing
this blogging business and this.
After all if we're talking about a property that might be worth a couple of hundred thousand dollars
it might be worth while for somebody to actually put in the effort to change the blog here.
Replace their your name with their name and then the hash will be updated and then they will change
this hash and this and this and this and this and so on.
So what prevents them from doing it or on the other hand.
What what also happens if for example there is some system error.
And so for example this blog is not maliciously changed but just through some somebodies input error
or something else you we're going to put in a new blog at the end Blotz by accident.
They went into this ledger and they just actually changed the value in this block and indeed the cryptographically
will be broken.
I will see that there is a problem but we'll never be able to restore the previous date.
Right.
It's even though we can see that there's a problem.
How will we restore the data.
So those kind of to equate those are two questions.
On one hand somebody can come in and actually spend the time to change all the blocks in the system
to forge the ledger even though it takes some time but might be worth it for them.
On the other hand this something might happen in the middle of the chain just accidentally some data
might be lost because then it is just like a block chain is an open ledger if anybody can just go in
there and see the file just like it like an Excel spreadsheet or databases that it's links like this
so it's harder to change or will see if there's a change.
But at the same time it's not that it is right protected.
You can go in and change this and if that accidently somehow happens then how do we restore that data
from the original data set.
So this is the problem is that a distributed peer to peer networks.
So.
So let's have a look.
So in a distributed PDB system we've got lots of computers and they're all interconnected.
Ideally the more they're connected the better.
But of course you can't we can't possibly connected to be connected to everybody at the same time in
some like further computers away are going to be connected a bit less to each other and so on.
But through the network everybody is interconnected.
And so in this scenario once we do have the block chain how like how does this affect the plot and how
can we use this.
How is this used in Blodgett's.
Well the blotching is actually copied across all of those computer.
So let's think about our example the properties instead of just keeping it on one system.
In that government computer it's actually copied across thousands and thousands of computers here we
only have six computers in our example but it can be actually thousands of computers or even millions
of computers just laptops of people or computers personal computers.
Like literally it could be on your computer or it could be on my computer.
That exact government ledger of all the transactions.
And of course it wouldn't have names in it.
Everything would be connected through cryptographic keys and say things like that which we'll talk more
about in the coming months of course so you can't get to the actual names of the people without knowing
that it will be just through their identifiers.
But nevertheless all of this information about all the transactions on everybody's computer and anybody
can on their own computer change this information if they like or you know just not change if they don't
want to just just keep the chain updating being updated on their computer.
So that's what happens so that that's how the Blash is distribute.
I know it sounds pretty pretty crazy that like a laser of property transactions would be distributed
across peers like just you and me just normal people.
But nevertheless let's have a look.
Let's go.
Go with this example.
So once in your block is added.
What happens is that information is communicated throughout the network and that block is added further
and further throughout the network until all of the computers have this block.
And that might take some time especially in large pro-capitalist boxes.
So in this case is the house that we purchased so we can see it's now copied onto all of the networks.
And then what happens is let's say some time passes as an obvious example three months or a few years
and more transactions are added to the block.
And a similar amount and now the problem is.
So somebody tries to hack our entry or or there's like an error that has been made to the entry Well
let go of the hacking example because both of them will have the same solution.
So somebody comes along and tries to maliciously attack our entry and take away our house.
And so we're going to present this with a black square once they've successfully changed the entry.
This is what it looks like but at the same time as soon as they do that we know that the cryptographic
links between the blocks will cause a problem for them because now all of these blocks after that walk
are all of the sudden invalid and they need to go through all of them.
And as we discussed maybe it is worthwhile for them to go through all of them and actually change the
hashes in those blocks recalculate the hash of each book one at a time and rerecord them and put the
new information.
So they might go ahead and do it and they're successful and they've changed this block.
So in the previous example before we had distributed peer to peer networks that would have been the
end they would have succeeded they would have succeeded and it would have taken away that million dollar
or a hundred thousand dollar property.
But in distributing peer to peer networks what happens is they are all sink top very constantly.
The network is constantly checking.
That's how this system is designed.
The block she calls the checking their peers to see if their blogs match up.
And so instantly these peers would see that there's a problem that's there.
BLOCK change doesn't match up to this block and they would signal to the blotching on that computer
saying hey look just like a computer or so against the other a look at your blog Sze seems wrong compared
to us and that's a shame on the rise of the blockade which was hacked.
You will notice that it is in the minority that the majority of auctions are all that are in consensus.
They have the same Barshay which is different to the one it has.
And that means it will understand that it's been hacked and what will happen automatically is that these
values.
Now where are we these values will see that these values are different and these values will be copied
over.
So just very quickly all these values will be copied over and the block chain will be just restored
to its original value.
So what happens in this case is as you can as you can see the hacker cannot just attack one computer
and just attack one block change and change change the values there.
The hacker will have to attack all of the block chains and at the same time.
So by attacking this one even even if it takes them like that they would have to do that operation very
quickly in a matter of you know few seconds or maximum or a couple of minutes depending on the blocking
structure.
Once they do that it gets replaced.
Right.
But so even if they see if they're taking a while to do it it will all get fixed even before they get
to the end.
But now to successfully attack they actually have to attack Well not all of the piers they have to take
more than 50 percent of the computers at the same time in order to replace them so successfully replace
the chain.
So if there are attacks we've got six computers that have to check for if they take one two three for
these computers at the same time and replace these blogs to recalculate this blog and then recalculate
the hash for this block and that and then replace it in all of these computers at the same time then
then that could take over the network.
That's the only way you can break into a block chain.
And so the more you have computers the more Piers you have an abortion the harder it is if you have
ten thousand computers you would have to hack into 5000 computers 5000 in one computers at the same
time and do it within a couple of minutes and probably a couple of you know less than a minute or depending
on the blushing.
Yes.
Couple of minutes maximum and that's practically impossible.
That's where the additional security comes from.
And that also illustrates the point that it doesn't really matter that this blockade is sitting on my
computer.
So this might be me blush saying I could do it as long as I can't get any personal details from the
action of the people there is long as they were presented by their identifiers rather than their names
and addresses and things like that as long as that sounds were presented then it doesn't matter because
even if I computer if I tried to accidentally or maliciously change something on this blotching then
the seminar will happen.
It will just auto update itself and I'll have the new file and that's it.
And I'd like my hands are tied.
No one person can do anything.
And so that's how we bring trust into a trust Listen wire.
And so and then they like if we don't know each other.
Anybody in these in this chain we don't trust each other but because we have the majority this majority
consensus situation because of that we can trust each other the technology set up the technology design
brings trust into this trust trustfulness framework and allows us to transact each other.
That's the beauty of pure distributed peer to peer networks in watching and that's as you can see that
adds an extra level of security.
So we had hash cryptography that's that was one level security.
Now we've got that peer to peer networks and other level of security.
And as we will see in the consensus protocol and other things there's more and more layers of security
that make location's so powerful.
So yeah there we go.
Everything's good.
Watching is back to normal.
All right so I hope you enjoyed today's tutorial.
And today we've got some additional reading.
Very interesting article by Vitaly terrine the founder of therian.
So we'll learn more about Retallack in module 3 of course.
But for now here's a good intro to get acquainted with him.
The article is called the meaning of decentralization and you may have heard some debate around the
difference between decentralization and distribute decentralized systems and distributed systems.
And so Vitalii really puts it all to rest.
He shows his understanding of different three levels of centralization.
Decentralization so logical externalization political decentralization architectural decentralization.
Very interesting read.
I highly recommend checking it out and also will help you combat any kind of debates you might have
of someone when they're saying no this is our distributer.
This is decentralise or no this is not the centralizes is distributed and this will give you some additional
overview of what's going on there.
All right and on that note we're going to wrap up.
I'll see you next step.
And until then enjoy fluxions.
