{"id":2834,"date":"2024-10-22T10:30:23","date_gmt":"2024-10-22T10:30:23","guid":{"rendered":"https:\/\/apex-aiexperts.com\/?p=2834"},"modified":"2024-10-22T10:30:23","modified_gmt":"2024-10-22T10:30:23","slug":"what-is-a-mempool","status":"publish","type":"post","link":"https:\/\/apex-aiexperts.com\/es\/what-is-a-mempool\/","title":{"rendered":"\u00bfQu\u00e9 es una mempool?"},"content":{"rendered":"<p class=\"wp-block-paragraph\">Bitcoin answers the question, \u201c<strong>Which transaction to keep?<\/strong>\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The way Bitcoin answers this question is brilliant.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s how\u2026<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Every node on the Bitcoin network shares information about new transactions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Transactions made on the Bitcoin network are NOT directly added to the blockchain. They are first collected and stored in what\u2019s called the\u201d<strong>memory poo<\/strong>l\u201d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">EVERY computer running the Bitcoin program creates a&nbsp;<strong>temporary storage area for transactions<\/strong>&nbsp;called the \u201c<strong>memory pool<\/strong>\u201d. Also known as \u201c<strong>mempool<\/strong>\u201d for short.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Each Bitcoin node has its own mempool, where it stores the queue of transactions that it has checked and considers&nbsp;<strong>valid<\/strong>.<img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/bpcdn.co\/images\/2022\/02\/18124523\/bitcoin-mining-mempool.png\" srcset=\"https:\/\/bpcdn.co\/images\/2022\/02\/18124523\/bitcoin-mining-mempool.png 960w, https:\/\/bpcdn.co\/images\/2022\/02\/18124523\/bitcoin-mining-mempool-768x432.png 768w, https:\/\/bpcdn.co\/images\/2022\/02\/18124523\/bitcoin-mining-mempool-360x203.png 360w, https:\/\/bpcdn.co\/images\/2022\/02\/18124523\/bitcoin-mining-mempool-780x439.png 780w\" alt=\"Bitcoin Node's Memory Pool\" width=\"960\" height=\"540\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Broadly speaking, a mempool is an&nbsp;<strong>organized queue where transactions are stored and sorted before being added to a newly created block<\/strong>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The memory pool holds \u201c<strong>fresh<\/strong>\u201d or unconfirmed transactions (stored as individual transactions).<\/li>\n\n\n\n<li>The blockchain holds \u201c<strong>archived<\/strong>\u201d or confirmed transactions\u00a0 (packaged in \u201cblocks\u201d).<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">All bitcoin transactions are simply \u201cunconfirmed\u201d transactions and only exist in the mempool before they\u2019re \u201cconfirmed\u201d and added to the blockchain.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the Bitcoin network, all full nodes have a memory pool.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/bpcdn.co\/images\/2022\/02\/18125038\/bitcoin-mining-mempool-all-nodes-1.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/bpcdn.co\/images\/2022\/02\/18125038\/bitcoin-mining-mempool-all-nodes-1.png\" alt=\"All Bitcoin nodes have a memory pool\" class=\"wp-image-219415\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s say you initiate a transaction on this side of the network (<strong>purple<\/strong>&nbsp;transaction).<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/bpcdn.co\/images\/2022\/02\/18125304\/bitcoin-mining-mempool-purple-transaction-1.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/bpcdn.co\/images\/2022\/02\/18125304\/bitcoin-mining-mempool-purple-transaction-1.png\" alt=\"\" class=\"wp-image-219417\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And then go over here, and use the&nbsp;<strong>same bitcoin<\/strong>&nbsp;and insert the&nbsp;<strong>red<\/strong>&nbsp;transaction in this computer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you notice, these two transactions are&nbsp;<strong>NOT written directly to the file<\/strong>. Both transactions are simply stored in the&nbsp;<strong>memory pool<\/strong>&nbsp;of each computer first.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/bpcdn.co\/images\/2022\/02\/18125549\/bitcoin-mining-mempool-stores-both-transactions.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/bpcdn.co\/images\/2022\/02\/18125549\/bitcoin-mining-mempool-stores-both-transactions.png\" alt=\"Both transactions are stored in memory pool\" class=\"wp-image-219418\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">So both transactions will propagate across the network.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This computer will REJECT the&nbsp;<strong>red<\/strong>&nbsp;transaction because they\u2019ve already received the&nbsp;<strong>purple<\/strong>&nbsp;one.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/bpcdn.co\/images\/2022\/02\/18131442\/bitcoin-mining-node-rejects-transaction-from-mempool.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/bpcdn.co\/images\/2022\/02\/18131442\/bitcoin-mining-node-rejects-transaction-from-mempool.png\" alt=\"Transaction is rejected from mempool\" class=\"wp-image-219424\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">So now BOTH transactions are on the network.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But they are NOT written to the file yet, so&nbsp;<strong>the file still hasn\u2019t been updated<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/bpcdn.co\/images\/2022\/02\/18131800\/bitcoin-mining-transactions-in-mempool.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/bpcdn.co\/images\/2022\/02\/18131800\/bitcoin-mining-transactions-in-mempool.png\" alt=\"Both transactions are waiting in mempool\" class=\"wp-image-219425\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">What will happen then is all of these computers will work and try to&nbsp;<strong>get their transactions from their memory pool onto the file<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">They will compete to be the first ones to get their memory pool transactions added to the top of the file.<a href=\"https:\/\/bpcdn.co\/images\/2022\/02\/18132141\/bitcoin-mining-none-competes.png\" rel=\"noreferrer noopener\" target=\"_blank\"><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s say this computer (in yellow) is the first one to be able to do it.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/bpcdn.co\/images\/2022\/02\/18132648\/bitcoin-mining-none-is-first.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/bpcdn.co\/images\/2022\/02\/18132648\/bitcoin-mining-none-is-first.png\" alt=\"Bitcoin node first to add transaction to blockchain\" class=\"wp-image-219427\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">It&nbsp;<strong>adds its transaction from the memory pool into the file<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/bpcdn.co\/images\/2022\/02\/18133113\/bitcoin-mining-none-adds-to-blockchain.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/bpcdn.co\/images\/2022\/02\/18133113\/bitcoin-mining-none-adds-to-blockchain.png\" alt=\"Bitcoin nodes adds transaction to blockchain\" class=\"wp-image-219428\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And when it\u2019s done that\u2026.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It will&nbsp;<strong>pass their updated copy of the file<\/strong>&nbsp;to everyone else they are connected to\u2026.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/bpcdn.co\/images\/2022\/02\/18133326\/bitcoin-mining-node-shares-blockchain-copy.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/bpcdn.co\/images\/2022\/02\/18133326\/bitcoin-mining-node-shares-blockchain-copy.png\" alt=\"Bitcoin node shares blockchain copy\" class=\"wp-image-219429\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And they will&nbsp;<strong>update their copies<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the illustration below, this node here receives the updated file that contains the&nbsp;<strong>purple<\/strong>&nbsp;transaction spending the same bitcoin.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/bpcdn.co\/images\/2022\/02\/18133914\/bitcoin-mining-node-kicks-out-conflicting-transaction.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/bpcdn.co\/images\/2022\/02\/18133914\/bitcoin-mining-node-kicks-out-conflicting-transaction.png\" alt=\"Bitcoin node kicks out conflicting transaction\" class=\"wp-image-219432\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">What happens to the conflicting&nbsp;<strong>red<\/strong>&nbsp;transaction in its memory pool?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Since the same bitcoin has already been spent in the&nbsp;<strong>purple<\/strong>&nbsp;transaction, it will kick out the red transaction from their memory pool!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This node will then pass on the updated file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And the other node(s) will do the same thing\u2026it will kick out any conflicting transactions in its memory pool.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/bpcdn.co\/images\/2022\/02\/18134101\/bitcoin-mining-node-kicks-out-conflicting-transaction-again.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/bpcdn.co\/images\/2022\/02\/18134101\/bitcoin-mining-node-kicks-out-conflicting-transaction-again.png\" alt=\"All Bitcoin nodes kick out conflicting transaction\" class=\"wp-image-219433\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">All computers now have the updated file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So that\u2019s how you solve the problem of having two conflicting transactions on the network.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You literally just have a \u201cwaiting area\u201d (mempool) for pending transactions and&nbsp;<strong>nodes compete and try to add their transactions to the file<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this example, the&nbsp;<strong>purple<\/strong>&nbsp;dude would receive the bitcoin\u2026<img decoding=\"async\" src=\"https:\/\/bpcdn.co\/images\/2022\/02\/18134849\/successful-bitcoin-transaction.png\" srcset=\"https:\/\/bpcdn.co\/images\/2022\/02\/18134849\/successful-bitcoin-transaction.png 960w, https:\/\/bpcdn.co\/images\/2022\/02\/18134849\/successful-bitcoin-transaction-768x432.png 768w, https:\/\/bpcdn.co\/images\/2022\/02\/18134849\/successful-bitcoin-transaction-360x203.png 360w, https:\/\/bpcdn.co\/images\/2022\/02\/18134849\/successful-bitcoin-transaction-780x439.png 780w\" alt=\"Bitcoin transaction is successful\" width=\"960\" height=\"540\">&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But when yo shady self tries to spend the same bitcoin with the&nbsp;<strong>red<\/strong>&nbsp;dude, it\u2019s not going to work.<img decoding=\"async\" src=\"https:\/\/bpcdn.co\/images\/2022\/02\/18135050\/failed-bitcoin-transaction.png\" srcset=\"https:\/\/bpcdn.co\/images\/2022\/02\/18135050\/failed-bitcoin-transaction.png 960w, https:\/\/bpcdn.co\/images\/2022\/02\/18135050\/failed-bitcoin-transaction-768x432.png 768w, https:\/\/bpcdn.co\/images\/2022\/02\/18135050\/failed-bitcoin-transaction-360x203.png 360w, https:\/\/bpcdn.co\/images\/2022\/02\/18135050\/failed-bitcoin-transaction-780x439.png 780w\" alt=\"Bitcoin transaction fails\" width=\"960\" height=\"540\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This process of nodes competing to try and get their transactions from their memory pool onto the file (\u201cthe blockchain\u201d) is called&nbsp;<strong>MINING<\/strong>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Bitcoin answers the question, \u201cWhich transaction to keep?\u201d The way Bitcoin answers this question is brilliant. Here\u2019s how\u2026 Every node on the Bitcoin network shares information about new transactions. Transactions made on the Bitcoin network are NOT directly added to the blockchain. They are first collected and stored in what\u2019s called the\u201dmemory pool\u201d. EVERY computer [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,12],"tags":[],"class_list":["post-2834","post","type-post","status-publish","format-standard","hentry","category-beginners-guide-to-bitcoin-mining","category-learn-crypto"],"_links":{"self":[{"href":"https:\/\/apex-aiexperts.com\/es\/wp-json\/wp\/v2\/posts\/2834","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/apex-aiexperts.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/apex-aiexperts.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/apex-aiexperts.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/apex-aiexperts.com\/es\/wp-json\/wp\/v2\/comments?post=2834"}],"version-history":[{"count":1,"href":"https:\/\/apex-aiexperts.com\/es\/wp-json\/wp\/v2\/posts\/2834\/revisions"}],"predecessor-version":[{"id":2835,"href":"https:\/\/apex-aiexperts.com\/es\/wp-json\/wp\/v2\/posts\/2834\/revisions\/2835"}],"wp:attachment":[{"href":"https:\/\/apex-aiexperts.com\/es\/wp-json\/wp\/v2\/media?parent=2834"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/apex-aiexperts.com\/es\/wp-json\/wp\/v2\/categories?post=2834"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/apex-aiexperts.com\/es\/wp-json\/wp\/v2\/tags?post=2834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}