The Building Blocks of Blockchain

Image for post
Image for post

If you asked me what the definition of blockchain is a month ago you probably would’ve gotten an answer like this:

“Are you talking about a chain of blocks, or am I missing the point here…?”

Although my definition may sound ridiculous, it is.
It’s the dumbest thing ever. (And maybe slightly true, it matters how much credit you’re willing to give me)

But I guess we all have to start somewhere and over these past few weeks I’ve learned more about how chains of blocks work than I ever hoped to. So, sit back, relax and let’s learn about some blocks!

The most important part of a blockchain is that it creates an uninterrupted connection between two users attempting to accomplish a transaction. It’s a direct, straight path. No third-party people. No extra fees. Just stuff. Moving between people. Like when you and your friend exchange money, but you don’t need to know who the other person is in real life. And that’s just the gist of it, there’s a lot more that goes into what really makes blockchain technology work.

One of the key parts of blockchain is that it’s a bunch of blocks. In a chain.

Image for post
Image for post
This is an artistic interpretation of what blockchain “looks like” (I told you I was kinda right)

Each of these blocks contains information; it’s an account of any transaction involving value. Well, what does that encompass? Transactions of money, goods, or work could all use blockchain technology. Even votes can be counted using it. It’s pretty cool stuff.

But rather than just having information, the block also includes two other things: a hash, and the hash of the previous block in the chain. No, I’m not talking about “a dish of cooked meat cut into small pieces and cooked again, usually with potatoes”. I’m talking about a long string of numbers, letters and god knows what else. Anticlimactic, I know, but it is what it is.

A hash is unique to each block, acting as a sort of fingerprint. However, since it is calculated when the block is first created, the hash will change if the data in the block was tampered with. This makes hashes important for detecting whether or not a block has changed.

Image for post
Image for post
An updated image of blockchain; based on new info!

However, the block also contains the hash of its previous block, making it a “chain” rather than just a line of blocks. Due to this, a tampered block would end up making all of the corresponding blocks in the chain invalid; their hashes won’t match and it’ll end up as a huge mess. And this is a great security system…. for the 1900s. Nowadays there are powerful computers which can recalculate hashes for all the other blocks in the chain, making the block valid again. To mitigate this, there’s something called proof-of-work.

If you’re a math nerd like me, you’re probably wondering what the heck proofs are doing in blockchain. Well, proof-of-work is a mechanism which slows down the creation of new blocks; it’s a problem which needs to be solved in order to create a new block. This means that if you tamper with one block, you would need to recalculate the proof-of-work of all the following blocks. And even if one proof-of-work only takes 5 mins, it would eventually add up to a ton of time dedicated to solving them.

But that’s not all. Blockchain stays secure in one more way; being distributed. Rather than one entity managing the chain, it uses a peer-to-peer network that anyone is allowed to join. Once you join the blockchain cult, you receive a copy of the entire blockchain and can check the chain to make sure that everything is in order.

Image for post
Image for post
Example of what a Peer-to-Peer network looks like vs. a centralized one (from

So let’s see what would happen if a new block is added and you’re already a part of the cult:

  1. Everyone on the blockchain receives a copy of the new block
  2. Each person checks the block to ensure that it is a valid block that hasn’t been changed
  3. If everything is fine, they add the block to their blockchain

In order to successfully tamper with a blockchain, you would need to change all the blocks in the chain, redo the proof of work for them and own more than 50% of the peer-to-peer network. So you could say it’s pretty darn safe.

To give an example of how blockchain is applied in the real world, I wanted to talk a bit about Ethereum. No, I’m not talking about bitcoin cause I’m sure you’ve already heard all about it (and if not a quick google search should do it for you) but rather I’m talking about a 2nd generation blockchain. I know, fancy.

Ethereum is a public distributed blockchain network, like everything I explained before, but rather on focusing on the transferring of goods it helps run the code of any decentralized application. It’s basically like the foundation of any sort of application of blockchain. This means that anyone could go on it and create a decentralized app, whether it’s financial services, computing, gambling, or games — the possibilities are endless. It also relies a ton on the usage of smart contracts. What are smart contracts you say? Well, I’m glad you asked.

Image for post
Image for post
A cool diagram about smart contracts if you’re too lazy to read my paragraph

A smart contract is almost exactly as it sounds like (I’m noticing a common trend in the tech world…); it describes a computer code which can facilitate the exchange of anything of value. This contract is like a computer program; executing only when specific conditions are met. And it’s extremely secure and fast since it’s made on the blockchain.

So blockchain is a cool technology, with tons of potential applications, but it’s not all sunshine and rainbows. Blockchain has so much to improve, many times the technology can be slow, risky and complex, meaning that it doesn’t really solve the problems it claims to. However, continuous work on this technology means that the next time you transfer funds, it might just be through blockchain!

If you enjoyed this article, please give it some claps so I know you liked it! You can also follow me on LinkedIn to see what I’m up to :)

A 14-year-old Canadian student who is super passionate about exponential technology!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store