Blockchain as a Service (BaaS – Azure) : Part 2

This blog article is written post the introductory article on Blockchain. It is recommended you read the introduction before continuing ๐Ÿ˜Š

In this article you will learn about the

  1. The evolution of Blockchain
  2. What are smart contracts
  3. What are nodes in blockchain and what are the types
  4. At what stage is the technology at present

Blockchain when applied to use case scenarios addresses satisfactorily a substantial latent pain that exists across industries. Blockchain or more accurately a distributed ledger allows organizations to work together in highly competitive markets. Existing inter-company transactions carry enormous costs in process, procedure and cross-checking of records to come to settlement on what could turn out to be a trivial exercise using blockchain technology. Blockchain could streamline the way business operates, the same way the web did, giving birth to a new collaborative economy.

The evolution of Blockchain

The below diagrams depict the evolution of Blockchain.

evolution2

evolution

Blockchain 1.0

Blockchain 1.0 is a simple ledger, which records any kind of transactions in sequence. It represents the state of the network at any given moment. Although it was intended to record, financial transactions, the you could encrypt any kind of transactions by putting it on the Blockchain. This could mean photographs, agreements etc. Bitcoins Blockchain is often referred to as Blockchain 1.0. Bitcoin, Hyperledger, Unspent Transaction Output-based protocols (UTXO) platforms fall into Blockchain 1.0.

The below diagram indicates that Blockchain is a simple distributed ledger that records all transactions. Its state being duplicated across all users in the network.

bc1

Blockchain 2.0: Smart Contracts

When distributed ledgers (Blockchain 1.0) has an additional level of logic on top โ€“it is known as the smart contract. The code exists alongside the data in the database. The smart contract is Blockchain 2.0 or Ethereum.

Smart contracts operate like tokenized programs. They have public keys and they have code and can โ€˜doโ€™ things like a stored procedure in a RDMS (Relational Database Management System) would.

Smart Contracts guarantee a specific set of outcomes based on the code on which it is written. There is no room for confusion or need for litigation. A smart contract is writing a piece of code into the blockchain. And this code would get executed or move to the next step if and only if the requirements in the code is met and accurately fulfilled. This can be compared to a Domino effect, where a set of specific actions are required for each block to fall.

A smart contract is an account that is controlled by code, rather than an account that is controlled by a user. If there is a typo on the code that governs the smart contract hosted in the Blockchain, editing the smart contract would not be possible. Instead a brand new smart contract with the right code would need to be created.

Smart Contracts are written using the solidity programming language. Decentralized apps are created using one or more smart contracts. Smart contracts are programs that run exactly as programmed without any possibility of downtime, censorship, fraud or third-party interface. In Ethereum, smart contracts can be written using several programming languages m including solidity, LLL and Serpent. Solidity is the most popular of those languages. Ethereum has an internal currency called ether, to deploy smart contracts or to call their methods we need ether. Both user accounts and smart contracts can hold ether.

Ethereum uses blockchain data structure and proof-of-word consensus protocol. A method of smart contract can be invoked via a transaction or via another method

smartcontracts

Types of nodes

There are two kinds of nodes in the network, regular nodes and miners. Regular nodes are the ones that just have a copy of the blockchain, whereas miners build the blockchain by mining blocks.

Blockchain 3.0: Project Bletchley

In Project Bletchley, Azure provides the fabric for blockchain, serving as the cloud platform where distributed applications are built and delivered. Azure supports a variety of Blockchain protocols including the below: –

  1. Unspent Transaction Output-based protocols (UTXO) like Hyperledger
  2. Smart Contracts based protocols like Ethereum

The two new concepts that are introduced with Project Bletchley are Blockchain Middleware and Cryptlets.

Blockchain Middleware

This is used to define the section that takes care of the core services that the Blockchain technology will run on. This includes: –

  • Identity and Operations Management
  • Data and Intelligent services like analytics and machine learning

This piece ensures security and immutability of the platform on which Blockchain runs.

Cryptlets

Cryptlets is the building block in Project Bletchley that enables secure interoperation and communication between Microsoft Azure, the middleware mentioned in the above section and customer technologies. Cryptlets function when additional information is needed to execute a transaction or contract based on a date or time and providing market data. They then become a critical component of the sophisticated Blockchain systems enabling all technology to work together in highly secure and scalable way. It is the answer to security within the Blockchain

cryptlets

In the next article lets talk about decentralized apps. If you would like clear information about a concept in Blockchain, comment below!

Blockchain as a Service (BaaS- Azure) Introduction

Just to save you some time โ€“ read the article if you would like answers to the below questions ๐Ÿ˜Š

  • What is Blockchain?
  • What is Blockchain a solution to?
  • Different types of Blockchain
  • Why is Blockchain secure?
  • How does blocks get built in a โ€˜Block-chainโ€™?

 

Happy reading!

What is Blockchain

In physical terms โ€“ Blockchain is essentially a network of computers. Each computer in the network accepts, confirms and stores transactions in a synchronized chain of confirmed transaction blocks. Each block applies cryptographic proofs and hashes โ€“ thus making the blocks / transactions in the blockchain / network immutable.

Pic1

What is Blockchain a solution to?

ย Blockchain allows for all parties involved to agree on the current state of something of value without any possibilities for dispute.

Blockchain caters to the above need perfectly because: –

  1. It is immutable โ€“ Transactions; remain on the blockchain; it is not possible to reverse a transaction
  2. Every node on the blockchain holds all the transaction entries โ€“ it is based on the concept of decentralized ledger
  3. It eliminates the need for a third-party and is completely secure.

Pic2

Example: –

  1. How many owners does a specific house have?

In the present world we would need to believe the middle-man who sells us the house considering that:-

  1. The data could be tampered with
  2. Owners may not necessarily be honest about their ownership

Blockchain not just eliminates the need for having to blindly trust a third party but it also creates a database that is secure, immutable and can be trusted.

Different types of Blockchain

Pic3

Public

  • All the participants are anonymous
  • Reads and writes by all participants
  • Consensys by proof of work (Mining)

Private

  • All the participants are from one organization
  • Write permissions are centralized
  • Reads maybe public / restricted
  • Multiple algorithms for Consensys

Consortium / Federated

  • Known participants from multiple organizations
  • Writes require Consensys of n participants
  • Reads maybe public or restricted
  • Multiple algorithms for consensys

Another classification of Blockchain is permission less and permissioned ledger

Pic4

When users can join the blockchain without permission, it is called permission less ledger. Anonymous parties can read or write into the blockchain. Examples include Bitcoin and Ethereum.

Permissioned ledger can be written into or read only by pre-approved parties.

Why is Blockchain secure?

The answer to this is that data is hashed.

Hashing is defined as creating a fixed length, random string of data known as a digest, that uniquely represents a data set of arbitrary data length. This mean to creating a unique identifier for that set of data. The source data can be any length at all and the hash, the fixed (usually 256 bits long) โ€˜hashโ€™ is always the same length and is always the same value and that value is always unique.

Most importantly these functions are one-way meaning that if you have the digest there is no way to calculate the original source data.

Pic5

Composite objects โ€“ Hashing objects

Pic6

The hashing capability can be used to create composite hashes that uniquely identifies a composite object. For example, in the diagram below the composite objects of a mobile phone could have individual hash values such as screen, memory, disk etc., disk etc.

When we hash those components together we get a new digest that uniquely represents that mobile phone. This becomes even more useful if we can determine if one digest forms part of composite digest.

How does blocks get built in a Block-chain?

The very first block in a block chain is called the Genesis block. It holds the identifier and the configuration information used by the network. It contains the first hash.

Mining refers to the computational activity on each block of the block-chain. It is the process of adding transaction records to the blockchain.

To create a new blockchain network, we need the first block. Itโ€™s called the genesis block and it holds identifier and configuration information used by the network. But importantly, it holds the first hash, as previously mentioned.

This genesis block is also required by any new nodes that need to join the network. They must be provided the genesis block so that they understand the configuration for the network, but also so that they have the first hash and can participate in mining.

So this is at time 0, when I start the network, at this point nodes can accept transactions. These transactions could be the creation of accounts, the movement of ether, the creation of a smart contract, any transaction that could change the state of the blockchain.

Then, at the time configured for the network, in this example 12 seconds. The network mines the next block. This block is a hash calculated by combining hashes of the transactions executed between the last block and now, plus the hash from the previous block and a nonce (if that is what the consensus algorithm requires.

The block is accepted by the network and so we have the first two links in our chain, block 0, no transactions and block 1, with 2 transactions and a unique hash that is based on those transactions and, importantly, the previous blocks hash.

And so, this continues, every 12 seconds in this case, whether there are transactions or not, a block will be generated.

Pic7

In the next article lets learn about Smart contracts and a few more concepts ๐Ÿ˜Š

Blog at WordPress.com.

Up ↑