This video belongs to the openHPI course Blockchain - Sicherheit auch ohne Trust Center. Do you want to see more?
An error occurred while loading the video player, or it takes a long time to initialize. You can try clearing your browser cache. Please try again later and contact the helpdesk if the problem persists.
Scroll to current position
- 00:00We looked at each other, how these blocks are formed in the Bitcoin system
- 00:04and want to take a look at us now, how the blockchain comes out of it, the block chain is formed.
- 00:11We had seen that the transactions are stored in blocks, archived in blocks.
- 00:18It is ensured that via a link the individual transactions are linked to each other, so money can't be spent before it's earned.
- 00:31Then we have these linked timestamps and the Merkle tree for these things, there's a starting block, the genesis block, which then gives validity to the entire chain.
- 00:46So if you have to manipulate something somewhere, you have to go back to that genesis block.
- 00:54And then the participants, who are all in each other's throats. have informed about all transactions, then created new blocks - we discussed this in the last video -
- 01:05and attached to the existing chain and then distributed accordingly in the network.
- 01:12So we got the genesis block, Alice built the first block, who of course has this hash value from this first block shrink-wrapped.
- 01:24Alice also built the third block, which is welded to the second block, so where you can't change anything in the second block, it would stand out in the third block.
- 01:36Then Bob created a block, so it is possible in the chain and in the network that each participant takes a lot of transactions and builds a block out of them.
- 01:48There's an interest in doing that.
- 01:51We've seen the transaction fees are going to be credited to whoever built this block.
- 01:59The transaction fee and also the block generation fee are calculated in this way.
- 02:06Now, if these are the participants, we have many participants on the net, and there's a competition, to form such blocks, then of course the following can happen:
- 02:17Then it can happen that two participants have set off, have welded the transactions into blocks
- 02:24and then the block generated by each of them then attached to the chain.
- 02:30That is, if this is our blockchain, it can happen, that now both Alice and Bob have formed the fourth block and now both of them independently attach this block.
- 02:44Now, of course, the question is with such forking, which block is being taken now,
- 02:50because we have the blockchain and not a block tree.
- 02:54We need this efficiency in verification, so there's got to be a decision for either one.
- 03:00And there's the principle that the longest chain wins.
- 03:05So first of all the two blocks remain, of course it is checked whether the blocks are in order,
- 03:12so whether there wasn't a cash-issuing transaction that led to the issuance of cash, before a transaction has led to revenue, so these payment mechanisms are all right.
- 03:26And now, in the meantime, further transactions have taken place in the system, and Charles is the first to form a new block, which is attached to this block of Alice.
- 03:41He's been working on this block, then he's got the transactions, that have taken place here in the meantime,
- 03:49that do not contain Alice in this block and built in, built this block.
- 03:56And now the principle that the longest chain wins is called here:
- 04:01Even if somebody had continued building for Bob, after a certain amount of time, which you need in such a distributed system, until information also reaches all participants,
- 04:12After a while, Alice's Block decides who's the one that is recognized as the block in the block chain.
- 04:20Alice gets the reward, Alice collects the transaction fees. of all transactions in this block
- 04:28and that's our blockchain.
- 04:30So, with these competition mechanisms, where then decides, How do the other participants go on, which blocks do they work with? who will be the winner at the end or the one who installed the block here.
- 04:48Maybe just to clarify that:
- 04:50In the blocks, the order of transactions can be quite different in these blocks.
- 04:56The number of transactions can also vary, but it is important that the semantic order is correct.
- 05:04These block manufacturers must pay attention to this, that money isn't spent before it's taken.
- 05:10And a transaction now that someone is actually owner of money, in the system, will of course only be recognised once these blocks have been recognised,
- 05:22because that is seen as the truth, what is contained in the blockchain.
- 05:27That is, before not a transaction in such a block, is contained in a recognized block,
- 05:36the participants will not accept money, which only reached a participant via transactions in this block.
- 05:46This means that the majority of the participants win, because it's a free system,
- 05:52they are able to continue to build where they want, for whatever reason.
- 05:59If now the longest chain wins, that is of course information, that is known, a con man can come and say, now let's do a Sybil attack.
- 06:11You remember that was the attack simply by multiplying identity.
- 06:16And to protect herself from it, we had already seen in the first week, that resource testing methods help,
- 06:26i.e. of proving whether there really is enough computing power, i.e. computing power on a scale that a real participant has at his disposal, and that these pretended identities typically don't have.
- 06:43So this resource testing here in the Nakamoto consensus, this is done through Proof of Work, and Proof of Work, the resource of computing power was chosen and tested.
- 07:00So here's this competition, these blocks continue to grow, and you see, Bob is now just trying to fake the longest chain,
- 07:11by just hanging his block there modified over and over again.
- 07:20That is, before such recognition takes place, the Miner, that creates the block,
- 07:30that he did a decent piece of work, so more than just this block to weld this transaction together, that he has accomplished a great task - I'll show you which task that is -
- 07:43to see with it, this is really a real participant and they're not quickly assembled fakes.
- 07:51This proof of work therefore has several functions, the central function is to prevent the Sybil attack.
- 07:59A second function is to ensure that in this system a little time comes, so make sure,
- 08:08that the creation of the blocks is also a certain expenditure of time and there's a lot of work involved and it's not that likely, that there's so much forks going on,
- 08:22because many participants are in a particular situation to build the block.
- 08:29So also to help this blockchain make the decision, which block is attached to the chain, to make sure of that.
- 08:39And then, of course, the unchangeability of the chain should also be guaranteed, it's just not possible to manipulate blocks in this chain.
- 08:49So to make this clear again, perhaps:
- 08:54We had said yes, in this block must first of all times a header must be described in which this block version, and all that stuff like that,
- 09:03but also there a certain value, a Nonce.
- 09:08A value, it is not by chance that this value here, this hash value of this nonce, starts with many zeros,
- 09:16a proof that there is a certain arithmetic problem solved, a very, very difficult arithmetic problem.
- 09:23And in this header, the evidence is put, this arithmetic problem was solved by the block creator.
- 09:31We see and this Proof of Work for the formation of the blockchain.
- 09:37We said this task, this complex arithmetic problem is there to prevent Sybil attacks.
- 09:43What's the matter with you?
- 09:44To solve this task, to form such a block, attackers must have very expensive hardware, with great computing power, and great computing power costs a lot of energy.
- 09:56By the way, that's for blockchain technology at all. is a problem in this form.
- 10:03On the one hand, you want the task to be as big as possible, to the fraud, the abandonment, as hard as possible,
- 10:09to make the scam as difficult as possible, but on the other hand must then pay with a lot of energy.
- 10:16We had said the second task of this complex task, that we want to see in the next movie is, that the formation of blocks is somewhat distorted in time.
- 10:28So it's very costly to put a task there, which is very elaborate in its solution,
- 10:36which is what's done here at the Nakamoto Consensus, is a brute force solution, otherwise you don't know how to solve it.
- 10:43They have random runtimes, so that the simultaneous solving of of this complex, difficult task.
- 10:50- and the solution is needed to form the block, because that's an entry in the header - that's very elaborate.
- 10:56And finally, the immutability, the subsequent immutability of the blocks.
- 11:02An attacker might have the idea if the last block wins, then as long as there's a fork left, the blocks that come after this fork.
- 11:18And that's why he might come up with the idea, I cheat in these blocks and make a big transaction, that brings me a lot of bitcoins.
- 11:28But that would mean that, actually. all subsequent blocks must be recalculated.
- 11:33And because that always presupposes this proof of work, so to solve this difficult arithmetic problem, to form the block itself
- 11:42and the transactions to each other, it's not that expensive.
- 11:46This loosening of the block is complex. and proof that I've solved this task. with the corresponding Nonce entry in the header.
- 11:55So this proof of work makes it almost impossible, that since several consecutive blocks are recalculated in such a situation of forking.
- 12:08So in that sense, perhaps, that's this ingenious approach by Nakamoto, to bring security into this distributed system through this proof of work,
- 12:22and as much security as is necessary in a currency system like this, the Bitcoin system.
- 12:30And that gives big rashes and a lot of imagination and also great speculation,
- 12:37but the system has proven its ability, many people are proud owners of Bitcoin
- 12:46and today they can count on you to turn them, too, that they can exchange them for real money.
To enable the transcript, please select a language in the video player settings menu.