Blockchain 101

So what is this “Blockchain”?

There are two things. A block and a chain. At a very high level, it is just a chain of blocks. Since it’s inside computers, we can rule out the physical stuff. Here digital information is divided into blocks and linked together. For example consider the following blocks, each represent a country. Each of them contains the city names of the respective country. 

Example 1

Wait, there is something more. Each of these blocks has something called a hash. A hash is a set of characters (eg. “1hi515AHA5H” ). Hash is derived from the information contained in the block. The block of U.S.A has cities New York, Los Angeles, and Chicago. So the hash would be something like “NYLAC” Technically that’s not the case, but you get the idea). 

Example 2

Every successive block will contain the previous block’s hash. This is what binds them together (The force). If someone tampers the first block to add the city Boston. The new hash becomes “NYLACB”. However, the succeeding block of India has already stored the hash as “NYLAC”. This mismatch will break the chain. So the purpose of hash is to make sure no one tampers it.

What if someone changes the contents of a block and update the hash of successive blocks? This is possible but there is one thing I didn’t tell you. The data of the blockchain doesn’t lie in one computer. It is replicated in the computers of every user in the network. If you join a blockchain network, your computer will download these blocks. If someone tampers his version, the network will consider what majority say is correct. 

One more thing, in a Blockchain network, not only data but the program is also replicated. Computers collectively execute the program. Most internet apps are centralised. Consider Facebook, its data and program lies on its servers. Your computer requests information from Facebook’s server on a need to know basis. In case of blockchain, there is no central thing. It relies on its user’s computer to host its program. Yes, this means if every computer in the blockchain network switches off, it’s dead.

Public Blockchains 

Public Blockchain

Does this mean Blockchain is formed by a group of people who keeps their computers running for goodwill? What is the use of these tamper-proof blocks?

Blockchain networks have one or more functionalities. Bitcoin is a digital currency and a payment system. Its tamper-proof blocks hold ledger of all transactions. The people who sacrifice their computers are called miners. They get rewarded in bitcoins .

Ethereum has an additional functionality. It can host your code. Developing a blockchain from scratch and building your own community would be very difficult (Remember people has to sacrifice their computers for you?) . Ethereum takes care of the heavy lifting. You need to pay a fee depending on the computational costs.

Blockchain apps don’t have to be just payments systems or cryptocurrencies. It could be anything, like a social network, a learning platform like LiveEDU, etc.

Private Blockchains 

Private Blockchain

Bitcoin, Ethereum, etc are examples of the public blockchain. Anyone can be a part of it. What if we want to make a private blockchain network? Why would someone need a private blockchain for? Have a look at these stories. 

Mark and Sara

Mark hasn’t paid his rent for five months. When Sara questions he promise to pay later. She is helpless. She can’t afford a lawyer. Courts take eight months to almost a year to enforce action. The only option is to persuade Mark. 

Joe’s business

Joe is a businessman. He does business with different corporates on a frequent basis. A few months ago he signed a contract with a retailer. Though the conditions of the contract were met. The retailer refused to pay. These people take advantage of the legal system and persuade Joe to settle for less pay. Joe had such experiences before. In some cases, he went to court. The time and money he spent there cost him his profits. 

How do we help Sara and Joe? 

The point is computer programs execute such instructions consistently. It did when you clicked on this article, scrolled down, etc . In order to help Sara, we need to convert the agreements of the contract into code. 

Have we solved this problem elsewhere? In Sara’s case, we need to make Mark pay the rent every month. A time-based trigger. Your calendar app uses such trigger to give you notifications of predefined events. In Joe’s case, once terms of the agreement is met the party needs to pay. It’s a condition based trigger. Consider the last time you purchased an ebook from Amazon. Amazon will only deliver it once the payment is confirmed.

Pseudo code of the smart contract between Sara and Mark

If today’s date is 30th and rent is not paid, then Transfer $500 from Mark’s account to Sara’s account

But where do we deploy this code? It should be deployed on computers of all parties involved. Sara’s and Mark’s bank will be part of a private Blockchain network. Joe and Sara will sign a coded contract(a.k.a smart contract). Then it’s deployed on the network. Both Mark’s and Sara’s bank will have a copy. On 30th of every month when the clock ticks 12.00. The agreed amount gets transferred from Mark’s account to Sara’s account. Joe started using smart contracts to enforce his clients to pay the agreed amount. 

Sara is happy because she doesn’t have to trust Mark’s consent to transfer rent. Joe’s glad because he doesn’t have to go to a court for justice. Instead, he can spend those efforts to grow his business.

Private blockchain will be restricted to the parties involved in the business. Joe won’t be a part of the Sara’s and Mark’s Blockchain network.

Original Article

3 Popular Types Of Blockchains You Need To Know

It took me a while to understand Blockchain. Now there are multiple types? Huh? For now, there are three types of Blockchain, since it is an emerging field I can’t assure you a number.

Permissionless Blockchain

This one, you already know. Bitcoin, Ethereum are examples of this kind of Blockchain. In this type of Blockchain, we don’t have an authority sanctioning a transaction. Let us consider Bitcoin. It is a shared ledger. If I send you 5 Bitcoins, I shout to the people in the network.

“Guys, look I am giving away 5 Bitcoins to this guy”.

Show off, isn’t it? The people in the Bitcoin network hears my message and starts the process of validating the transaction. The person who validates the transaction is not a chosen one. We can’t predict who gets a say. The point is no single person has the power to validate transactions. Permissionless Blockchain can be used when you want your system be truly democratic. Anyone can create smart contracts, transfer money or contribute data. Here users are likely to remain anonymous. Yes, you can protect sensitive information in a Permissionless Blockchain.

“Luke wants to build an app where anyone can voice their opinion about political parties. He wants to protect the privacy of the contributors.”

In Luke’s situation, we can use a Permissionless Blockchain. Anyone anywhere would be able to contribute their opinions on the app. No authority can remove their opinions, it will be permanently recorded.

Permissionless

Public Permissioned Blockchain

Here we have chosen people who sanction a transaction. It could be an authority, senior employee, government, institution or anyone assigned. The data can be viewed by the public (Sensitive information can be protected).

“Elisha wants to bring transparency to Tuna fish supply chain. She wants people to know where the fish was caught, processed, packaged, etc”

Here when you buy the fish, you can scan the code and track its journey from the point it was caught. You are only allowed to view the data. You don’t have permission to write anything. The fisher man’s IOT device is allowed to write data when the fish is caught. The food processor who processes the fish is allowed to write data and so on. It doesn’t make sense for the public to write data into it. Here the data written like any Blockchain is permanently recorded.

Public Permissioned

Private Permissioned Blockchain

This is similar to Public Permissioned Blockchain expect for one thing. The data is not available for public view.

“Sara’s business involves two other small businesses and an accounting firm. They involve in regular transactions with each other.”

In Sara’s situation, her transaction with other businesses is private information. It shouldn’t be available for public view. The data, however, is permanently recorded. Here when they transact with each other, they don’t have to maintain a separate ledger. Every transaction will be tallied instantaneously.

I hope you got an idea of the types of Blockchain. Selecting the appropriate Blockchain is a must, you will save money and time. In some cases, you don’t even need a blockchain. I have prepared a questionnaire here to help you decide if you need a Blockchain. In the coming days we can expect more innovations in Blockchain.

Copyright 2018 Atlantis Rising Technologies, LLC. All Rights Reserved.