Blockchain Technology – Everything you need to know about Blockchain and Bitcoin

Aug 24, 2017
Blockchain Technology – Everything you need to know about Blockchain and Bitcoin
Add to Bookmark Email this Post 248    0

Blockchain Technology is the latest buzz in the industry today. It came into existence with the introduction of Bitcoin’s whitepaper in October 2008. Blockchain is the implementation of the digital cryptocurrency Bitcoin. Through this blog, I will introduce you to the Blockchain technology and we will explore the various concepts that make it a game changer in the industry today. Get ready to fall in love with Blockchain!

What Is Blockchain | What Is Bitcoin | Blockchain Technology 

The following topics will be covered in this blog:

  1. What is Blockchain Technology?
  2. Bitcoin Blockchain Transaction
  3. Blockchain Concepts
  4. Hyperledger
  5. Ethereum
  6. Smart Contracts
  7. Demo – Deploying a Smart Contract in Ethereum
  8. Applications of Blockchain

What is Blockchain Technology?

Blockchain in a nutshell, is a public distributed database of encrypted records. At the very concept, Blockchain is something similar to a Linked List. It is like an accounts book that banks used to maintain before computers were used in banking. It was introduced with the Bitcoin system in 2008. Bitcoin stores all its transactions onto a public database called as Blockchain.

Blockchain - Blockchain Technology - EdurekaFigure: Blockchain Technology – Adding blocks to a Blockchain

As we can see from the above GIF, new blocks are being added to the Blockchain at one end. This is very similar to how a linked-list (singly linked list) operates in theory. Each block contains a set of transactions (currently about 1500, refer Bitcoin Blockchain) and it will be added to the blockchain roughly about every 10 minutes.

So, the first implementation of Blockchain was the Bitcoin Blockchain. Through the features of Bitcoin, we will understand what Blockchain exactly is and how it can be expanded to various other industries apart from cryptocurrency trading and finance.

GET STARTED WITH BLOCKCHAIN

Bitcoin Blockchain Transaction

Let us look at a simple Bitcoin transaction to understand how Blockchain exactly works. You can refer to our Blockchain Tutorial blog for an in-depth understanding of Bitcoin and Blockchain concepts before moving ahead.

Bitcoin is a type of currency that allows people to buy goods and services and exchange money without involving banks, credit card or other third parties.

Simple Bitcoin Transaction

Let us take a Bitcoin transaction where James wants to transfer 500 BTC to Kevin. The transaction is a part of the new block that will be validated by miners Lisa and Robert.

Bitcoin Transaction - Blockchain Technology - EdurekaFigure: Blockchain Technology – Bitcoin transaction

Once this transaction is broadcast to the Bitcoin Blockchain network, there are special nodes/users called Miners who validate this transaction and add them to the Blockchain permanently. This process is what we call as Bitcoin Mining. Here, miners Lisa and Robert begin verifying the transaction and start a race to solve a complex mathematical puzzle called Proof Of Work.

Suppose Lisa here solves it first, she adds the block containing our transaction to the Blockchain. Thus James and Kevin get a verification message that the transaction is completed. As a reward for Lisa’s computational effort, she is rewarded through Bitcoins that are newly created (hence the term mining). The current reward for each block is 12.5 Bitcoins.

Blockchain Concepts

Every Blockchain has the following components:

  1. Peer to Peer Network: All users on the Blockchain are peers who maintain their own ledger. This network of users is called as a peer-to-peer network and the entire Blockchain is controlled by these peers.
  2. Cryptography and Encryption:

    Everything stored on the Blockchain is encrypted. This way, everyone is able to see all the transactions but at the same time no one will know which of those accounts belongs to you. Isn’t this exactly what we expect a banking system to be?

  3. Proof of Work

    Proof of Work is a very important concept in Blockchain. Proof of Work is a concept invented in Bitcoin Blockchain where in the miners (special users of Bitcoin) will validate transactions by solving a complex mathematical puzzle called Proof of Work. Miners club together a set of unverified Bitcoin transactions (around 250) into one block, compute its hash and then begin a race to find a specific set of characters called Nonce. Only people with huge computational computing power and electricity are able to solve this Proof of Work in the order of 10 minutes.

  4. Blockchain Program:

    A Blockchain program is used to create and implement rules in the Blockchain. Blockchains can be used to perform multiple programs. An example of a program is to store ID cards of all citizens for authentication during elections. Different Blockchains can have different programs in them.

Read more about these concepts in detail in our Blockchain Tutorial blog.

Now let us look at a few of the popular technologies that revolve around Blockchain. The Hyperledger and Ethereum are making waves in the Blockchain domain. 

Hyperledger

Hyperledger is something like a hub for Open Industrial Blockchain development. It is an open source collaborative effort to advance cross-industry blockchain technologies. The Linux Foundation is responsible for the creation of the Hyperledger Project. It was initially contributed by Digital Asset and IBM, as a result of the first hackathon.

Hyperledger - Blockchain Technology - Edureka

Hyperledger is a global collaboration including leaders in finance, banking, internet of things, supply chains, manufacturing and technology. Hyperledger Fabric allows components, such as consensus and membership services, to be plug-and-play. Hyperledger Fabric leverages container technology to host smart contracts called “chaincode” that comprise the application logic of the system.

Features of Hyperledger

The Hyperledger has these four important features:

  1. Permissioned Network

    Hyperledger provides collectively defined membership and access rights within a business network.

  2. Confidential Transactions

    The Hyperledger gives businesses the flexibility and security to make transactions visible to select parties with the correct encryption keys.

  3. No Cryptocurrency

    There is no need for mining and expensive computations to assure transactions.

  4. Programmable

    We can leverage the embedded logic in smart contracts to automate business processes across the Hyperledger network.

LEARN BLOCKCHAIN FROM EXPERTS

Ethereum

Ethereum is an open-source, public, Blockchain-based distributed computing platform. Ethereum features smart contract (scripting) functionality which facilitates online contractual agreements. Ethereum runs smart contracts: applications that run exactly as programmed without any possibility of downtime, censorship, fraud or third party interference. 

Ethereum - Blockchain Technology - EdurekaFigure: Blockchain Technology – Smart contracts in Ethereum

These apps run on a custom built blockchain, an enormously powerful shared global infrastructure that can move value around and represent the ownership of property. This enables developers to create markets, store registries of debts or promises, move funds in accordance with instructions given long in the past (like a will or a futures contract) and many other things that have not been invented yet, all without a middle man or counter-party risk.

The following can be implemented using Ethereum:

  1. Currency Issuance
  2. Decentralized Autonomous Organizations (DAO)
  3. Smart Contracts
  4. Smart Property

We have thus seen the power of Ethereum to really widen the scope of Blockchains beyond Finance and Banking industries. Learn more about Blockchain, the Hyperledger, Ethereum, Smart Contracts & Solidity through our Edureka Blockchain Certification Training.

Smart Contracts

Smart contracts are used to create rules in the Blockchain program. They are written in Solidity language for most Blockchains. In this format, contracts could be converted to computer code, stored and replicated on the system and supervised by the network of computers that run the blockchain. This would also result in ledger feedback such as transferring money and receiving the product or service. We will understand more about Smart Contracts through a practical demo in Ethereum.

Demo – Deploying a Smart Contract in Ethereum

Let me now show you how to deploy a smart contract in Ethereum’s Go-Ethereum client. So let us first look at our Cryptocurrency Smart Contract in Solidity language.

contract MyToken {
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;

/* Initializes contract with initial supply tokens to the creator of the contract */
function MyToken(
uint256 initialSupply
) {
balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens
}

/* Send coins */
function transfer(address _to, uint256 _value) {
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
require(balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows
balanceOf[msg.sender] -= _value; // Subtract from the sender
balanceOf[_to] += _value; // Add the same to the recipient
}
}

To deploy smart contracts, we will follow the following steps.

  1. We will install Node JS.
  2. Clone Ether Block Explorer from GitHub.
  3. Compile the Ether Block Explorer code.
  4. Run testrpc.sh on Port 8545.
  5. Start Ether Block Explorer in the explorer directory by running npm start.
  6. Create the smart contract on Remix IDE.
  7. View the new blocks added to the Blockchain on Ether Block Explorer.

Here are the steps in detail.

Step 1: Install Node & Angular from Node JS website at https://nodejs.org/en/download

Step 2: Clone Ether Block Explorer (EBE) from GitHub  from https://github.com/etherparty/explorer

Step 3: Compile the EBE code on your Linux machine.

Step 4: Run ./testrpc.sh on Port 8545.

Figure: Blockchain Technology – Running Testrpc.sh on port 8545

Step 5: Change the directory to explorer and run npm start.

Starting Smart Contracts - Blockchain Technology - EdurekaFigure: Blockchain Technology – Starting npm for the Ether Block Explorer

Step 6: Run Remix IDE to deploy the smart contract.

Deploying Smart Contract - Blockchain Technology - EdurekaFigure: Blockchain Technology – Deploying a smart contract on Remix IDE

Step 7: We can view the new blocks that are added to the Blockchain. These blocks contain our Smart Contracts that we have deployed.

Ether Block Explorer - Blockchain Technology - EdurekaFigure: Blockchain Technology – Ether Block Explorer

We have thus shown the power of Ethereum and Smart Contracts in Blockchain. 

Applications of Blockchain

Blockchain and Bitcoin have become a buzz these days. Let us look at a few of the real-life applications of Blockchain before understanding what it actually does.

These are some of the popular companies using Blockchain:

Followmyvote - Blockchain Technology - Edureka Followmyvote is the world’s first open-source online voting solution based on blockchain & helps in voter identification & online voting.
ShoCard stores your identity onto Blockchain for easy verification. Can be used for Governmental schemes and bank verification. Shocard - Blockchain Technology - Edureka
Arcade City - Blockchain Technology - Edureka Aracade City is a true decentralized ride-sharing service often called ‘Uber killer’. Works on real time car pooling technique based on Blockchain.
Everledger provides an immutable blockchain ledger for diamond identification and transaction verification. Everledger - Blockchain Technology - Edureka
Brooklyn Microgrid - Blockchain Technology - Edureka Brooklyn Microgrid allows local residents to buy and sell the energy on blockchain they produce from rooftop solar power installations.
Bitshares provides a high-performance decentralized trading platform on blockchain. Bitshares - Blockchain Technology - Edureka

Figure: Blockchain Technology – Companies using Blockchain

So this concludes our Blockchain Technology blog. I hope you enjoyed reading this blog and found it informative.

GET CERTIFIED IN BLOCKCHAIN

Got a question for us? Please mention it in the comments section and we will get back to you at the earliest.

Blockchain will do to Technology what the Internet did to Communication

If you wish to learn about Blockchain and master the concepts of Cryptography, Blockchain Networks, Smart Contracts, Ethereum and the Hyperledger, check out our interactive, live-online Edureka Blockchain Certification Training here, that comes with 24*7 support to guide you throughout your learning period.

About Sandeep Dayananda (8 Posts)

Sandeep Dayananda is a Research Analyst at Edureka. He has expertise in Big Data technologies like Hadoop & Spark, DevOps and Business Intelligence tools. He is passionate in bringing out creative solutions to existing business problems.


Share on
Comments
0 Comments

24 X 7 Customer Support X

  • us flag 1-800-275-9730 (Toll Free)
  • india flag +91 88808 62004