Learn Blockchains by Building One
<p>You’re here because, like me, you’re psyched about the rise of Cryptocurrencies. And you want to know how Blockchains work—the fundamental technology behind them.</p>
<p>But understanding Blockchains isn’t easy—or at least wasn’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’ll have a functioning Blockchain with a solid grasp of how they work.</p>
<h1>Before you get started…</h1>
<p>Remember that a blockchain is an <em>immutable, sequential </em>chain of records called Blocks. They can contain transactions, files or any data you like, really. But the important thing is that they’re <em>chained</em> together using <em>hashes</em>.</p>
<p>If you aren’t sure what a hash is, <a href="https://learncryptography.com/hash-functions/what-are-hash-functions" rel="noopener ugc nofollow" target="_blank">here’s an explanation</a>.</p>
<p><strong><em>Who is this guide aimed at?</em></strong> You should be comfy reading and writing some basic Python, as well as have some understanding of how HTTP requests work, since we’ll be talking to our Blockchain over HTTP.</p>
<p><strong><em>What do I need?</em> </strong>Make sure that <a href="https://www.python.org/downloads/" rel="noopener ugc nofollow" target="_blank">Python 3.6</a>+ (along with <code>pip</code>) is installed. You’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’ll also need an HTTP Client, like <a href="https://www.getpostman.com/" rel="noopener ugc nofollow" target="_blank">Postman</a> or cURL. But anything will do.</p>
<p><strong><em>Where’s the final code? </em></strong>The source code is <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>