Blockchain for newbies, What and why

Written by Ezzat Fahmy for the New York State University

What is Blockchain?

 When we talk about blockchain, probably the first thing comes to mind is Bitcoin, so I find it important to emphasize the fact that Blockchain is not bitcoin. The latter is simply an implementation of the first and the first is an enabler for the latter. Bitcoin is a digital coin, digital money. So, with that cleared, we can define and speak about Blockchain conceptually.

 Blockchain is a technology, an enterprise –enabling technology. It allows for the moving and transferring of assets (money, coins, data or anything) securely, transparently and anonymously from one individual or organization to another individual or organization without having to go through mediators. *(there are caveats to this, which we will put in footnotes).

The open source PT-BSC (Blockchain Security Controls) defines a Blockchain as “a peer-to-peer network which timestamps records by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work”. 

Originally Blockchain technology emerged to solve one main problem in the financial industry and has since spilled over to other industries to solve other problems. Blockchain’s original problem that it was trying to solve, was the transference of money between individuals without using or having to go through a bank.

Currently, to transfer money from one individual to another, one must transact through a bank. A bank, hence, acts a 3rd-trusted-party or mediator between individuals – it receives a transfer request from an individual then identifies the individuals, eventually allowing the transfer of money from one Individual’s account to another individual’s account, for a fixed a fee and approx. 2 to 4 days time.

Blockchain takes the mediator out of the picture, and gives banks no role to play in the process of transferring money from one individual to another. Blockchain enables an individual to directly have a relationship and communicate with another individual seamlessly (without going through a mediator) and immediately transfer the money directly to him/her with no waiting-time and for far less fees.

 Blockchain enables even more complicated relationships between more than 2 individuals or organizations. In that case it is called a network, where many individuals or organizations decide to form or be part of a group, where a common interest or goal is shared, such as being in the same industry or having the same goal of transferring a currency of money.

 Now that these individuals or organizations are members of the network, they make use of the direct and seamless peer – to - peer communication between each other and make use of the direct and immediate asset (or money) transfer that the network enables. So, for them to keep benefiting from this network, it is very important for them to preserve and protect the network.

 Everything happening by any member in this blockchain network is a transaction. If an individual or organization joins or asks to join the network, it is a transaction. When a member requests to transfer money or asset another memeber, it is another separate transaction. When another member accepts the transfer request, it is another transaction. When the money transfer takes place and the money moves from one member’s account to another member’s account it is another transaction.

 Blockchain enables an endless number of transactions to take place between the members of the blockchain network. Each transaction is recorded in a collective data-ledger. Think of a classic unamendable data ledger, where every single transaction is recorded in detail and in the order of its occurrence.

 Each transaction is recorded in an unamendable block in the data-ledger and each block is chained to the block that contains a record of the transaction that occurred right before it (called a hash), which together form a chain of blocks. So now that blockchain records or stores all transactions in data-ledger, anytime a member wants to trace back a transaction, he or she can look it up in the data-ledger.

 What are the main building blocks of Blockchain?

  •  Members: individuals or organizations with a common interest or goal or share the same industry or market and can trust each other.
  •  Network: the members form a network together and define the rules of that network. They can identify each other if needed or members can also be unidentifiable if that’s the rule of the network.

There are different types of networks. Public network and private networks. A public network simply is a kind of network where all the one-to-one transactions are viewable to all other members, while a private network limits the viewability of the transactions details to only those members who participated in the specific transaction which brings confidentiality to the transactions occurring in the network.

There are also permissioned and non-permissioned networks. A non-permissioned one is a network where any anyone can become a member without having to seek pass specific identification requests or have permission to join the network. A permission network in the other hand doesn’t allow members to join the network with having been identified, accepted and permissioned first.

  • Asset: an asset is anything that has value, that members will exchange between one another in the network. An asset can be money, coins, digital coins, data, pictures, money value of real-estate or pretty much anything.
  •  Data-ledger: an immutable, unamendable and append-only data-records stores all transactions that occur in the network.

This data-ledger is distributed among the members of the network. Security of the data-records is achieved by having an exact replication of the data-records distributed among members, which makes it impossible for one member to amend his version of the data-records without having the other members agree.

Each transaction added to the data-records is cloned to the other copies of the data-ledger owned by other members. Data-record and at the end all the data-records owned by the different members are compared. 

Data-Ledger is immutable and unamendable. It is append-only or write-only, where new entries get appended onto the end of the data-ledger. This also means members cannot amend what’s already recorded in the data-ledger. If a change is required, then it is appended as a new record in the data-ledger.

  • Transaction: a transaction is an execution of any type of action by members in the network. Each transaction is stored or recorded in a block in the data-ledger and each block is chained to the block which stores or records the transaction that occurred right before it. However, for a transaction to be executed and recorded in a block in the data-ledger, a consensus or an agreement between the network members must take place first. Members can decide to reject a transaction.
  •  Consensus: is the constitution that governs the network. It is the rules and method in which members of the network can come to a collective agreement on the transactions occurring in the network and on the new transactions added to the data-ledger.

Consensus is a mechanism used to drive agreements between members of what transaction to be executed and go into the data-ledger and in what order should transactions be executed in case of multiple transactions come simultaneously.

  • Smart contracts: are business rules and conditions that if met, a transaction can be executed automatically.

For example, whenever a member requests to transfer money to another member, all members will have check that that first member has sufficient funds in his account before executing the transaction. Alternatively, members can write a smart contract which is a computer program that contains a business rule or condition that checks if an individual has enough fund in his account in order to execute the money-transfer transaction.

Next time an individual request to transfer money, a smart-contract will automatically self-execute to check a business rule is met, which is the individual has sufficient funds in his account.

Characteristics and Principles of Blockchain

  • Decentralization vs Centralization:

This brings us back to the point above about consensus. We must talk about consensus when we talk about decentralization, as the first achieves the last.

Why is consensus important and a core building block of Blockchain?

order to answer this question, I have to talk about banks. In the past when an individual requested to transfer money from a bank to another individual, the bank had to solely and dictatorlike decide to either execute the transaction or reject it. The bank also decided the fees to execute the transaction, and even the time it will take to execute the transaction.

Moreover, the bank was the only owner of the data-ledger which records all the individual’s transactions. This concept is called centralization, where there is a single entity that owns, controls and governs the individual’s records of transactions. So, there is only one single copy of an individual’s records, one single truth, which is the bank’s truth.

To explain the concept of centralization even more, let me give an example from a different industry. Your Facebook account stores your data on a single place (computer server or data-center) owned by one single entity called Facebook, and you communicate this data with your Facebook friends through a Facebook, which makes Facebook the owner, controller and governor of your data. It is the center of your communications with your friends as well - while all the communication has to go through Facebook, all communications are stored on Facebook servers.

Blockchain technology demolishes this concept of centralization, as it takes control from the single entity and gives it equally to the members of the network. Blockchain distributes the records of the transactions among the members and decentralizes the ownership of it. And whenever a decision needs to be taken to execute a transaction, it has to be a collective decision by members of the network and not by a single entity, no data-ledger is owned or controlled or covered by a single entity.

The concept of decentralization is about democracy and collective decisions and agreements. This concept of decentralization is achieved by consensus mechanisms which allows members to collectively control the network and the data-ledger by coming to a collective agreement on transactions.

Decentralization is different from distributed. Decentralization means that no one single entity owns control alone.

  • Peer-to-peer communication

Blockchain network is decentralized, which means communication between members doesn’t go through a cartelized place but rather is direct communication between one another.

 

  • Trust: Trustless vs Trusted Blockchain network

In Public network like it is trustless, where members don’t need to trust each other, which means that the identity of the members doesn’t have to be known to join the network or to request to execute a transaction or to agree on (or verify) a transaction. In the other hand a trusted network is where the identity of the nodes are known by networks certificate authority.

  • Permission: Permissioned vs Permissionless Blockchain Network

Can anyone join the network, or a permission is needed in order for a memeber to join the network (in that case the network is called Consortium governed by policies). Every member needs to have an identity and thier permissions are determined by the policy of the consortium.

  • Fees to execute transactions

It is called gas. Gas is a measure of the computational power needed to execute a transaction. Gas cost is (gas * gas price). The gas price is dynamic. It is determined by the member that executes the transaction and appends the transaction to the data-ledger after it is agreed among members (after a consensus among members is reached).

  • Blocks

Block is a record of transaction. So, for every new transaction, a new block is created. Blocks can not be removed or amended.

Blocks are linked or chained to each other (or also called hashed to each other) to form a chain of blocks. Each block includes a cryptographic hash of the prior block in the chain, which in itself is chained (hashed) to the previous block, all the way back to the original first block which is also called “genesis block”. 

  • Block time

That is the average time it takes for a blockchain network to create new. Some blockchain networks create a new block every five seconds. So a shorter block time means faster transactions.

  • Consensus Mechanisms

Consensus is the collective agreement by members of the network on the single true state of the network, and is used for all transactions take place in that network. 

Since transactions will change the single-true state of the network, appending new records in the network’s data-ledger, an agreement is needed to verify and execute a transaction.

If a collective agreement by members of the network is not reached, then the transaction will not be executed in the network.

When a member in the network requests a transaction, which requires change in the state of the network, The transaction is sent to members of the network, which then verifies transaction and appends the data-ledger.

The process of agreeing and verifying a transaction uses different mechanisms to prove and validate the correctness of the transaction and thereby add the new block to the chain.

There are different types of mechanisms or different styles where members can come to an agreement on verifying and executing a transaction.


  1. Proof-of-Work (PoW)

A proof of network is a consensus mechanism, also called mining, designed originally for public networks. When a transaction is initiated, members (also called miners) get to work on solving a cryptographic puzzle, which allows them to verify the transaction, execute it, and then append it in a new block to the data-ledger. The puzzle they solve is difficult and requires substantial computational power. One block is produced every 10 minutes, the first member (miner) to solve the puzzle receives incentive (I.e. Bitcoins) plus a small transaction fee called gas.

In order for members to be miners they must have a very high computational power (mining supercomputers) to mine and validate a transaction (add new block to the chain).

This consensus mechanism was the first and most popular mechanism. It’s also highly scalable, but members (miners) do a lot of work to verify and execute a transaction, meaning they consume a lot of power which requires substantially powerful and costly computers such as super computers.


This consensus mechanism has a risk of vulnerability with 51% attack probability, where bad miners could capture 51% of a network’s computing power, gain “dominance “and manipulate the blockchain to their advantage.



  1. Proof-of-Stake (PoS) 

A proof of stake is a consensus mechanism, also called forging or validating, designed to verify and execute transactions. However, unlike PoW, instead of buying mining supercomputers to verify and execute a transaction, members buy cryptocurrency to use it as stake to buy the opportunity to verify and execute a transaction and then append it to the data-ledger.


Members that hold a lot of coins on the network means they invested in the network, which means they have interest in the network, and are trusted. Therefore, they are given the right to verify and execute transactions.


To become a validator or (forger), members will be picked based on the amount of stake (cryptocurrencies / coins) they own in their e-wallet and for how long they own it (similar to a security deposit), to ensure the loyalty of the validators/forgers. Then they will be selected to validate or forge transactions and will get a transaction forging fee.


Members’ stake means they deposited some money into the network, and in some sense use it as a collateral to vouch for verifying and executing transactions. In PoW a network is valid because lots of computational power and heavy work is behind it, while in PoS the network is valid because of the highest collateral.

This mechanism is the most common alternative to PoW. It provides faster processing of transactions and it is also more efficient than PoW since is requires less computer hardware and computational power which consumes less energy.

 

However, the disadvantages of this mechanism is that there’s no guarantee that individual members will be selected as validators/forgers to verify and execute transactions. Since, members must have invested in high stake of coins in the network to be selected.

Vulnerability is also a risk in this this type of consensus mechanisms, since members are selected only based on only how enough money they invest in the network, as opposed to PoW where they need to invest money, time, expertise, hardware, electricity, etc. So, the rich get richer: Only the richest stakeholders are permitted to have control of consensus in the blockchain network.

 

 

  1. Delegated Proof-of-Stake (DPoS)

Delegate of proof of stake is another consensus mechanism where coins holders use their coins balances to elect and vote for delegates, called witnesses. These witnesses have the opportunity to verify and executed new transactions and append them to blocks in the data-ledger in the blockchain. 


Members ‘vote’ for ‘witnesses’, which are the ones they trust to verify and execute transactions. Consequentially the top witnesses who have collected the most votes, earn the right to verify and execute transactions which means they are the ones to append new blocks to the data-ledger in the blockchain network. Votes are weighed according to the size of each voter’s stake.


The advantage of this mechanism is that it is that members will elect only those delegates who give them the most rewards and not just select the rich ones.


This is also a real-time voting system, where any malicious action by a witness can be immediately detected by the voters, who can oust (kick out) the offending delegate.


However, there is no system without disadvantages. The biggest disadvantage of this mechanism is that power is concentrated in the hands of few. They could organize into cartels, and it is easier to organize an attack, because fewer member are in charge of verifying and executing transactions.



  1. Practical Byzantine Fault Tolerance (PBFT)

Practical Byzantine Fault Tolerance is an optimization to the Byzantine army defense mechanism called the “Byzantine Generals Problem”. The Practical Byzantine Fault Tolerance was introduced by Miguel Castro and Barbara Liskov in an academic paper in the 90s.


It is an analogy to the “Byzantine Generals Problem,” whereby the “Byzantine Generals Problem” is compared to blockchain network consensus. Imagine that several divisions of the Byzantine army are camped outside an enemy city, each division commanded by its own general. The generals can communicate with one another only by messenger. After observing the enemy, they must decide upon a common plan of action. And they will be succeeded only when all generals and their divisions act together. So, either all divisions attack or all divisions retreat. If only few of the army divisions attack, they will all be defeated.

This mechanism enables all nodes to reach consensus together and survive failures and fights malicious attacks while reaching consensus even if one of the nodes is false, the network fails, node Hardware or software components breaks or crashes, or if some nodes in the network is faulty ad sending wrong messages.



This consensus mechanism is more than agreeing upon the verification and execution of transactions. But it is a full-circle verification of the correctness of transactions through the entire transaction flow from requesting, to ordering, to validating and to finalizing and committing a transaction.

This process breaks down the mining, validating or forging of transaction into stages (proposing, endorsing, ordering, validating and committing).

To enable such consensus mechanism, members play different roles. Some members acts as clients, they receive transactions requests. Other members play a role of endorsers, where they check the transactions if they meet network conditions. They agree upon the proposed transaction, and consensus is reached among endorsers.

Once endorsers reach consensus, they forward the transaction request to another level of members called orderers, who actually again reach another consensus among each to approve the transaction. Once orderers approve a transaction, they forward it to another type of members called committers that execute the transactions and append the data-ledger by creating a new block in it.


Blockchain technology platforms and protocols

Blockchain platform is an eco-system of different technologies, that solves a specific problem, or introduces a new value. There are currently multiple blockchain eco-systems that have already been implemented for different purposes. Bitcoin is one of the blockchain implementations that was mainly implemented to solve money transfer between individuals. Bitcoin-Blockchain’s asset is cryptocurrency (digital money coin) called Bitcoin.

Bitcoin was the first Blockchain technology platform and was introduced in a white paper that interestingly didn’t use the term Blockchain in it. The white paper was talking about only about Peer-to-peer electronic cash where “the network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of- work”. The paper is “Bitcoin: A Peer-to-Peer Electronic Cash System” by Satoshi Nakamoto in 2008. In the following years, crypto currencies have grown undeniably.


More blockchain platforms have emerged since then, such as Ethereum, which introduced the idea of smart-contract. This was proposed in late 2013 by Vitalik Buterin, a cryptocurrency researcher and programmer. Development was funded by an online crowdsale that took place between July and August 2014. The system went live on 30 July 2015, with 72 million coins "premined". This accounts for about 70 percent of the total circulating supply in 2018.

In 2016, as a result of the exploitation of a flaw in The DAO project's smart contract software, and subsequent theft of $50 million worth of Ether, Ethereum was split into two separate blockchains – the new separate version became Ethereum (ETH) with the theft reversed,[5] and the original continued as Ethereum Classic (ETC).

要查看或添加评论,请登录

Ezzat Fahmy的更多文章

  • Why Telco business transformation fails?

    Why Telco business transformation fails?

    Companies nowadays understand that if they embrace technology, to substantially transform the way they operate in their…

社区洞察

其他会员也浏览了