Learn Blockchains by Building One

<p>You&rsquo;re here because, like me, you&rsquo;re psyched about the rise of Cryptocurrencies. And you want to know how Blockchains work&mdash;the fundamental technology behind them.</p> <p>But understanding Blockchains isn&rsquo;t easy&mdash;or at least wasn&rsquo;t for me. I trudged through dense videos, followed porous tutorials, and dealt with the amplified frustration of too few examples.</p> <p>I like learning by doing. It forces me to deal with the subject matter at a code level, which gets it sticking. If you do the same, at the end of this guide you&rsquo;ll have a functioning Blockchain with a solid grasp of how they work.</p> <h1>Before you get started&hellip;</h1> <p>Remember that a blockchain is an&nbsp;<em>immutable, sequential&nbsp;</em>chain of records called Blocks. They can contain transactions, files or any data you like, really. But the important thing is that they&rsquo;re&nbsp;<em>chained</em>&nbsp;together using&nbsp;<em>hashes</em>.</p> <p>If you aren&rsquo;t sure what a hash is,&nbsp;<a href="https://learncryptography.com/hash-functions/what-are-hash-functions" rel="noopener ugc nofollow" target="_blank">here&rsquo;s an explanation</a>.</p> <p><strong><em>Who is this guide aimed at?</em></strong>&nbsp;You should be comfy reading and writing some basic Python, as well as have some understanding of how HTTP requests work, since we&rsquo;ll be talking to our Blockchain over HTTP.</p> <p><strong><em>What do I need?</em>&nbsp;</strong>Make sure that&nbsp;<a href="https://www.python.org/downloads/" rel="noopener ugc nofollow" target="_blank">Python 3.6</a>+ (along with&nbsp;<code>pip</code>) is installed. You&rsquo;ll also need to install Flask and the wonderful Requests library:</p> <pre> pip install Flask==0.12.2 requests==2.18.4 </pre> <p>Oh, you&rsquo;ll also need an HTTP Client, like&nbsp;<a href="https://www.getpostman.com/" rel="noopener ugc nofollow" target="_blank">Postman</a>&nbsp;or cURL. But anything will do.</p> <p><strong><em>Where&rsquo;s the final code?&nbsp;</em></strong>The source code is&nbsp;<a href="https://github.com/dvf/blockchain" rel="noopener ugc nofollow" target="_blank">available here</a>.</p> <p><a href="https://medium.com/@vanflymen/learn-blockchains-by-building-one-117428612f46"><strong>Read More</strong></a></p>