How do Mempools work?

Hadelin de Ponteves
A free video tutorial from Hadelin de Ponteves
AI Entrepreneur
4.5 instructor rating • 75 courses • 1,020,546 students

Learn more from the full course

Blockchain A-Z™: Learn How To Build Your First Blockchain

Harness the power of the most disruptive technology since the internet through real life examples! Master Blockchain Now

14:38:58 of on-demand video • Updated July 2020

  • Why this is important
  • Understand the theory behind Blockchain
  • Create a Blockchain
  • Understand the theory behind Cryptocurrency's
  • Understand the theory behind Cryptocurrency Transactions
  • Create their own currency
  • Understand the theory behind Smart Contracts
  • Create their own Smart Contracts
English [Auto] Hello and welcome back to the course and blog check. And today we'll find out how meme pools work. Now we really touched on temples a little bit before when we were talking about how miners pick their transactions. Well today we'll see how meme pools function in this distributed peer to peer system. All right so let's get started here. We've got a network of participants of the network so-called nodes. Their computers will be called nodes because they're not actually minors. They're just people who want to transact on the network send each other bitcoins or any other cryptocurrency that this network is based around. And what we're going to now do is we're going to replace a couple of minors just to add some variety on network to see that this actually works regardless of the configuration of our network. And as we've seen before there is a meme pool attached to each one of these participants and the crucial thing here is that the men pool there is a meme pool for each participant whether it's a node or a minor. And that means that there isn't just like one meme pools shared between everybody because as I recall this is a peer distributed peer to peer network. That's the whole concept of blocking so there is nothing Central about it including the temple. The Temple has to be individual to every single participant. And the other thing here is that the meme pool as we recall is not the blockade itself. It's a staging area for transactions. So blogs for instance on the Bitcoin block chain blocks are added at a certain regularity in the bitcoin chain there added once every 10 minutes. And yet we can transact with each other more frequently. We don't have to wait and transact once every 10 minutes we like I could send money to somebody today and they could send money to me like a few seconds later. And so on at any point in time. So the pool is like a staging area where these transactions go before they're added to a block. So now let's have an example let's look at example let's say Susan over here wants to send some money to somebody. It doesn't matter who we're going to talk about more about transactions and wallets and so on later on. But for now let's just say she wants to do a transaction. And what happens then. Well she got the oxygen's action and that transaction gets added to her name to her meme pool. Then that gets broadcasted or relayed across the network. And that means it gets relayed to the closest nodes including minors which is going to use the word downloads for here from here. And so then that transaction gets added to their members. Now again there's lots and lots of checks that are conducted by every single node to make sure that it's a valid transaction that everything adds up. It's not it's not something vague that the signatures are valid and so on. And we'll talk more about that further down the course. And then they relayed further down the network and that transaction gets added to every single meme pool in the network. Then what happens. Well then let's say Mary over here also wants to do a transaction and Mary does her transaction that transaction gets relayed through the network as well to every single note like that OK. And then let's say one of the miners wants to do a transaction. Usually they just mine but they can also do transactions. Why not. So the minor of the transaction. And then again gets relayed gets relayed it's relayed that are in network and so on. And in an old fashion the meme pool gets more and more and more transactions added to it. We only have six here. But typically a meme pool can fill up like six throughout the day to 8000 more and more than 9000 10000 transactions can be sitting there at any given point in time. And then when a bloke comes along as we discussed before a blog can contain about 2000 transactions more or less a block is limited by one and one megabyte but a block can contain a thousand transactions approximately depending on the size of the transactions. Well and let's have a look at how that works what happens when a block comes along. How does the block. Well we know that the miners are not just sitting there idly. The miners are actually mining these blocks so there is a block chain right now as of up until that point in time. And the miners are churning away the mining their blogs and then all of a sudden one of them finds the next bloke Well they sold the cryptogram cryptographic hash puzzle and the next bloke they're allowed to add the next block. So how is this how does this work well from the tutorial about how minors secretary's actions. We know that while they were mining the block in the process they had already selected the transactions that are in that block so they have a block configuration that they're mining and so even before they have success in mind the block they know what transactions are going to be in that block based on their selection criteria. And so now since that block has indeed been mined it's time to take these transactions out of the pool so these transactions get removed from that pool and they are because they're already in the block and then that block gets relayed across the network gets added to these guys and then those same transactions get removed from their meme pools. As long as the block pass passes the checks then that's the way it happens. So then it gets out of the way here. Transactions get removed and gets added to all the networks and these directions get removed from their pools for every single load. And so there we go and then that block you know is now part of the network and then the network just continues on from there. And they you the same thing same process happens again and again. So there you go that's how the memos work. So now what we're going to do is we're going to show you some additional reading and then we'll jump to look at some stats on black chain info. All right so the additional reading for today is an interesting article. I liked it. It's an in-depth guide into how the ampoules work. It's an medium. As usual the link will be in the notes for the course and this guide is how many pools work from the perspective of not a minor but of a node of a normal just normal participant who's not a minor. And that's why I like this approach because what we've been seeing so far is mostly like from perspective of minors and not much you see from presidium knows whereas here they explain it from a perspective of just a normal participant and how the member can feel Lobb what the size limits are with. There are certain fee thresholds that kick in after a certain point in time and so on. So quite an interesting read. And now let's have a look at some stats. All right. So here we've got a lot of info by the way. This is this is the additional reading here. It's not that long just a short article. Yeah so that's right. What I want to show you today. OK. Here we go. If you need to get these just go to blog share the info and then go to the charts. This one and what I wanted to have a look at is we'll look at Temple size transaction counts and growth. Yeah we're good this year. All right. So full size. There you go. This is in what is in bytes. And you can see how the size varies and this is. So this is throughout the day so there's one day 23 24 25 26. I guess it depends on the day and so on. Like it it goes down like once the transactions are out of there then. So it's building up as much as I should go on. Go in there. I guess like because Bloxham mine every 10 minutes. So it's not a question of supply of blocks it's a question of demand of transaction that depends on my thinking is like when people wake up you can see kind of like his period of periodic when people wake up probably in the U.S. and when they're transacting and when mauritians actions up here and they're available to be distributed into blocks and they start piling up. Let's have a look at. So that was from bite's number of bytes This is from number of transactions similar pattern a kind of you can see again see a bit of up and down. You can we can do a higher. That's a couple of days like 30 days. Now is he more global or like the long term trends. This this is going to be a year an hour loading interesting things. Remember that when the price of bitcoin was very high there were lots of transactions. People were like running around buying Bitcoins very very fast. There's a lot of demand so that's why it was not getting down to zero. There's a transaction called and this is my full side of growth size growth. So this is the speed at which it's growing not not very not very varied. This chart here is kind of like more or less consistent. Another interesting one which I really like which I wanted to show you is if you go to data and you go to stats and sort of charts and then you go to unconfirmed transactions. So those are the transactions that are in the meme pool that they're called unconfirmed transactions. And this is just amazing. I love watching this. You can see how they're being added like these are people transacting with each other and as soon as they transact these get added. So here you can see the total number of unconfirmed transactions and also illustrated over there for us. And that should really show about the map. It's very dynamic. But nevertheless we've got some information here. Transactions per second hand. Yes so that's how they're being. So there's a thousand. As soon as a block is mind this will go down to like gets reduced significantly by about 2000 transactions or so because those protections will go into a bar. And so you know how they say there's only this like three things you can watch for a fire water and then they add something. Well I'm going to add the growth of under-current from transactions or the growth of the temple for bitcoin. It's very mesmerizing. I highly recommend checking it out so if you go here just watch it. OK so there we go. That's us for today. Hope you enjoyed today's tutorial and now we have a clearer picture on how polls work and how that gets relayed throughout the network. And I look forward to seeing you back here next time. Until then enjoy.