{"id":1435,"date":"2020-01-20T00:00:00","date_gmt":"2020-01-20T08:00:00","guid":{"rendered":"https:\/\/www.opennode.com\/blog\/?page_id=1435"},"modified":"2020-01-17T11:24:52","modified_gmt":"2020-01-17T19:24:52","slug":"merkle-tree","status":"publish","type":"page","link":"https:\/\/blog.opennode.com\/blog\/glossary\/merkle-tree\/","title":{"rendered":"Merkle Tree"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>\n<h1 class=\"wp-block-heading\">Merkle Tree<\/h1>\n\n\n\n<p>Merkle trees are <a href=\"https:\/\/www.opennode.com\/blog\/glossary\/hash\">hash<\/a>-based data structures that make it easier to process large amounts of data. For Bitcoin, Merkle trees are an efficient way to protect transaction data that is less demanding on resources but still heavily <a href=\"https:\/\/www.opennode.com\/blog\/glossary\/encryption\">encrypted<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How do they work?<\/h2>\n\n\n\n<p>As transactions are added to the <a href=\"https:\/\/www.opennode.com\/blog\/glossary\/block\">block<\/a>, each one is hashed. But in the interest of efficiency, the Bitcoin software will concatenate pairs of transactions into one combined hash. Then, these two combined hashes will be hashed and concatenated again, over and over again until they finally gain one single hash that represents the entire block, the <a href=\"https:\/\/www.opennode.com\/blog\/glossary\/merkle-root\">Merkle root<\/a>.\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/4mp2Z_jPoQRIsED8nyBr-Sqf3oMHbM3ElUk2YY2zLr1JvPOv7k45nZM9f1CRJahvH6PucZNh2D48CM1iZUYb1SBiJ1hbFjVSWUWpqfvj7ZnPFDZGtIcVtXbt9sTRnVjKdVSaBuxL\" alt=\"\" width=\"800\" height=\"509\"\/><\/figure>\n\n\n\n<p>Blocks can have hundreds of transactions per block, but let\u2019s look at a simple 4 transaction block above. Transactions L1, L2, L3, and L4 all receive a hash, Hash 0-0, Hash 0-1, Hash 1-0, and Hash 1-1 respectively. Then, the Bitcoin software concatenates Hash 0-0 and Hash 0-1 to make Hash 0 &#8211; a hash of the two transactions &#8211; and Hash 1-0 and Hash 1-1 to make Hash 1. Now there are only two hashes left, Hash 0 and Hash 1, which concatenate into the Top Hash &#8211; the Merkle Root &#8211; which represents all the transactions in the block with one relational hash.<\/p>\n\n\n\n<p>The bottom parts of the Merkle Tree, the individual transactions, are often referred to as \u201cleaves\u201d and the intermediate hashes, \u201cbranches.\u201d<\/p>\n\n\n\n<p>Note: If there are an uneven amount of hashes in the block, then the Bitcoin software will create two hashes for the odd numbered transaction so that the Merkle tree can continue.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Links<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><em>Merkle Tree<\/em> &#8211; <a href=\"https:\/\/www.investopedia.com\/terms\/m\/merkle-tree.asp\">Investopedia<\/a><\/li><li><em>Merkle Tree <\/em>&#8211; <a href=\"https:\/\/brilliant.org\/wiki\/merkle-tree\/\">Brilliant<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>Merkle Tree Merkle trees are hash-based data structures that make it easier to process large amounts of data. For Bitcoin, Merkle trees are an efficient way to protect transaction data that is less demanding on resources but still heavily encrypted. How do they work? As transactions are added to the block, each one is hashed.  &#8230;<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":172,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-notitle.php","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-1435","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Merkle Tree - OpenNode Blog<\/title>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Merkle Tree - OpenNode Blog\" \/>\n<meta property=\"og:description\" content=\"Reading Time:  2 minutesMerkle Tree Merkle trees are hash-based data structures that make it easier to process large amounts of data. For Bitcoin, Merkle trees are an efficient way to protect transaction data that is less demanding on resources but still heavily encrypted. How do they work? As transactions are added to the block, each one is hashed. ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.opennode.com\/blog\/glossary\/merkle-tree\/\" \/>\n<meta property=\"og:site_name\" content=\"OpenNode Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/OpenNodeco\/\" \/>\n<meta property=\"og:image\" content=\"https:\/\/lh3.googleusercontent.com\/4mp2Z_jPoQRIsED8nyBr-Sqf3oMHbM3ElUk2YY2zLr1JvPOv7k45nZM9f1CRJahvH6PucZNh2D48CM1iZUYb1SBiJ1hbFjVSWUWpqfvj7ZnPFDZGtIcVtXbt9sTRnVjKdVSaBuxL\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@opennode\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.opennode.com\\\/blog\\\/glossary\\\/merkle-tree\\\/\",\"url\":\"https:\\\/\\\/blog.opennode.com\\\/blog\\\/glossary\\\/merkle-tree\\\/\",\"name\":\"Merkle Tree - OpenNode Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.opennode.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blog.opennode.com\\\/blog\\\/glossary\\\/merkle-tree\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.opennode.com\\\/blog\\\/glossary\\\/merkle-tree\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/lh3.googleusercontent.com\\\/4mp2Z_jPoQRIsED8nyBr-Sqf3oMHbM3ElUk2YY2zLr1JvPOv7k45nZM9f1CRJahvH6PucZNh2D48CM1iZUYb1SBiJ1hbFjVSWUWpqfvj7ZnPFDZGtIcVtXbt9sTRnVjKdVSaBuxL\",\"datePublished\":\"2020-01-20T08:00:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.opennode.com\\\/blog\\\/glossary\\\/merkle-tree\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blog.opennode.com\\\/blog\\\/glossary\\\/merkle-tree\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blog.opennode.com\\\/blog\\\/glossary\\\/merkle-tree\\\/#primaryimage\",\"url\":\"https:\\\/\\\/lh3.googleusercontent.com\\\/4mp2Z_jPoQRIsED8nyBr-Sqf3oMHbM3ElUk2YY2zLr1JvPOv7k45nZM9f1CRJahvH6PucZNh2D48CM1iZUYb1SBiJ1hbFjVSWUWpqfvj7ZnPFDZGtIcVtXbt9sTRnVjKdVSaBuxL\",\"contentUrl\":\"https:\\\/\\\/lh3.googleusercontent.com\\\/4mp2Z_jPoQRIsED8nyBr-Sqf3oMHbM3ElUk2YY2zLr1JvPOv7k45nZM9f1CRJahvH6PucZNh2D48CM1iZUYb1SBiJ1hbFjVSWUWpqfvj7ZnPFDZGtIcVtXbt9sTRnVjKdVSaBuxL\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.opennode.com\\\/blog\\\/glossary\\\/merkle-tree\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Main\",\"item\":\"https:\\\/\\\/blog.opennode.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Bitcoin Glossary\",\"item\":\"https:\\\/\\\/blog.opennode.com\\\/blog\\\/glossary\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Merkle Tree\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blog.opennode.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/blog.opennode.com\\\/blog\\\/\",\"name\":\"OpenNode Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/blog.opennode.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blog.opennode.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/blog.opennode.com\\\/blog\\\/#organization\",\"name\":\"OpenNode\",\"url\":\"https:\\\/\\\/blog.opennode.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blog.opennode.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.opennode.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/Logomark-1.png\",\"contentUrl\":\"https:\\\/\\\/www.opennode.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/Logomark-1.png\",\"width\":1920,\"height\":1920,\"caption\":\"OpenNode\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.opennode.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/OpenNodeco\\\/\",\"https:\\\/\\\/x.com\\\/opennode\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Merkle Tree - OpenNode Blog","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"Merkle Tree - OpenNode Blog","og_description":"Reading Time:  2 minutesMerkle Tree Merkle trees are hash-based data structures that make it easier to process large amounts of data. For Bitcoin, Merkle trees are an efficient way to protect transaction data that is less demanding on resources but still heavily encrypted. How do they work? As transactions are added to the block, each one is hashed. ...","og_url":"https:\/\/blog.opennode.com\/blog\/glossary\/merkle-tree\/","og_site_name":"OpenNode Blog","article_publisher":"https:\/\/www.facebook.com\/OpenNodeco\/","og_image":[{"url":"https:\/\/lh3.googleusercontent.com\/4mp2Z_jPoQRIsED8nyBr-Sqf3oMHbM3ElUk2YY2zLr1JvPOv7k45nZM9f1CRJahvH6PucZNh2D48CM1iZUYb1SBiJ1hbFjVSWUWpqfvj7ZnPFDZGtIcVtXbt9sTRnVjKdVSaBuxL","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_site":"@opennode","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.opennode.com\/blog\/glossary\/merkle-tree\/","url":"https:\/\/blog.opennode.com\/blog\/glossary\/merkle-tree\/","name":"Merkle Tree - OpenNode Blog","isPartOf":{"@id":"https:\/\/blog.opennode.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.opennode.com\/blog\/glossary\/merkle-tree\/#primaryimage"},"image":{"@id":"https:\/\/blog.opennode.com\/blog\/glossary\/merkle-tree\/#primaryimage"},"thumbnailUrl":"https:\/\/lh3.googleusercontent.com\/4mp2Z_jPoQRIsED8nyBr-Sqf3oMHbM3ElUk2YY2zLr1JvPOv7k45nZM9f1CRJahvH6PucZNh2D48CM1iZUYb1SBiJ1hbFjVSWUWpqfvj7ZnPFDZGtIcVtXbt9sTRnVjKdVSaBuxL","datePublished":"2020-01-20T08:00:00+00:00","breadcrumb":{"@id":"https:\/\/blog.opennode.com\/blog\/glossary\/merkle-tree\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.opennode.com\/blog\/glossary\/merkle-tree\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.opennode.com\/blog\/glossary\/merkle-tree\/#primaryimage","url":"https:\/\/lh3.googleusercontent.com\/4mp2Z_jPoQRIsED8nyBr-Sqf3oMHbM3ElUk2YY2zLr1JvPOv7k45nZM9f1CRJahvH6PucZNh2D48CM1iZUYb1SBiJ1hbFjVSWUWpqfvj7ZnPFDZGtIcVtXbt9sTRnVjKdVSaBuxL","contentUrl":"https:\/\/lh3.googleusercontent.com\/4mp2Z_jPoQRIsED8nyBr-Sqf3oMHbM3ElUk2YY2zLr1JvPOv7k45nZM9f1CRJahvH6PucZNh2D48CM1iZUYb1SBiJ1hbFjVSWUWpqfvj7ZnPFDZGtIcVtXbt9sTRnVjKdVSaBuxL"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.opennode.com\/blog\/glossary\/merkle-tree\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Main","item":"https:\/\/blog.opennode.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Bitcoin Glossary","item":"https:\/\/blog.opennode.com\/blog\/glossary\/"},{"@type":"ListItem","position":3,"name":"Merkle Tree"}]},{"@type":"WebSite","@id":"https:\/\/blog.opennode.com\/blog\/#website","url":"https:\/\/blog.opennode.com\/blog\/","name":"OpenNode Blog","description":"","publisher":{"@id":"https:\/\/blog.opennode.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.opennode.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/blog.opennode.com\/blog\/#organization","name":"OpenNode","url":"https:\/\/blog.opennode.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.opennode.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.opennode.com\/blog\/wp-content\/uploads\/2019\/04\/Logomark-1.png","contentUrl":"https:\/\/www.opennode.com\/blog\/wp-content\/uploads\/2019\/04\/Logomark-1.png","width":1920,"height":1920,"caption":"OpenNode"},"image":{"@id":"https:\/\/blog.opennode.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/OpenNodeco\/","https:\/\/x.com\/opennode"]}]}},"_links":{"self":[{"href":"https:\/\/blog.opennode.com\/blog\/wp-json\/wp\/v2\/pages\/1435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.opennode.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blog.opennode.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blog.opennode.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.opennode.com\/blog\/wp-json\/wp\/v2\/comments?post=1435"}],"version-history":[{"count":4,"href":"https:\/\/blog.opennode.com\/blog\/wp-json\/wp\/v2\/pages\/1435\/revisions"}],"predecessor-version":[{"id":1441,"href":"https:\/\/blog.opennode.com\/blog\/wp-json\/wp\/v2\/pages\/1435\/revisions\/1441"}],"up":[{"embeddable":true,"href":"https:\/\/blog.opennode.com\/blog\/wp-json\/wp\/v2\/pages\/172"}],"wp:attachment":[{"href":"https:\/\/blog.opennode.com\/blog\/wp-json\/wp\/v2\/media?parent=1435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.opennode.com\/blog\/wp-json\/wp\/v2\/categories?post=1435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.opennode.com\/blog\/wp-json\/wp\/v2\/tags?post=1435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}