Combining transactions into blocks
Divide and conquer
Now that everyone keeps a list of all orders at The Blockchain Bar, how can our friends make sure to detect errors quickly and make it easy to correct them?
Carol detects an error in her list. She says: “Bob, my list is shorter than yours, there must be something wrong!”
Bob replies totally annoyed: “Oh no! Now we have to go back and compare all those pages. Isn’t there a better way?”
Alice smiles: “Easy! Let’s compare the list every time we reach the end of a page. Then potential errors can only be on that current page. If everything is correct, we’ll hand out all drinks ordered on that page.”
In blockchain systems, transactions are also grouped into “pages”, which are called “blocks”. From time to time, all computers compare their current block with each other, agree on the correct version and start a new one.
Do they really need to compare the pages line by line to detect an error? Find out in the following episodes …
Or maybe you first want to read more about block building below.
Transactions are managed with blocks
Our friends at Blockruption’s Blockchain Bar have a problem: The drinking list with orders is getting longer and longer. When there is a dispute about who had how many drinks or what is the correct version of the list, they have to compare hundreds or thousands of entries each time.
They also notice a further challenge: Things go wrong very often when people drink and order and record orders at the same time. Three tasks at the same time are just too much.
Therefore, the guests agree to set a ‘milestone’ from time to time, where they all come together and match their lists. When they suspect an error, they only have to discuss the orders back to the last waymark.
The Blockchain Bar Protocol defines that milestones are set every time the list of beer orders reaches the end of a page. Everyone will then compare that last page. If they agree with each other, then they will hand out all the drinks and start a new page.
In blockchain systems the pages are called blocks. And the blocks get ‘chained’ together with complex calculations. The entire writing pad of chained blocks is called the ‘blockchain’.
All computers on the network can be sure that the blocks that have already been ‘closed’ are correct. Only the block they are currently working on can be different from their peers’ current blocks.*
(* For the crypto nerds: We know, that in Bitcoin and other blockchain systems it can take a few blocks until a common truth is established among all parts of the network. We might get to that topic in another episode of Blockruption’s Blockchain Bar.)
In Bitcoin, a block holds between 1,000 and 3,000 transactions. The Bitcoin network creates a new block about every ten minutes.