Tell me something I should know – Blockchain as a Service on Microsoft Azure


Guest blog by Cihat Cengiz Microsoft Student Partner at the University of Cambridge

cihat

“Hello world!” My name is Cihat Cengiz and I am a 27 years old PhD student at the University of Cambridge, Department of Engineering, Institute for Manufacturing. I am a tech geek, an early adopter and mainly interested in the area of any technological innovation. My research at the Centre for Technology Management focuses on bringing the Blockchain Technology into the innovation and intellectual property management process of enterprises.

Besides that, I am passionate about football, travelling and my virtual wallet with some Bitcoins and Ethers purchased at an early stage J$€J

You can find me here: https://www.linkedin.com/in/cihat-cengiz-8b4691118/

What is this about?

If you Bing “what is” on the date when I am writing this Blog, “Bing autosuggest API” suggests you the 8 most popular searches within the region of choice. For the USA, the UK and Germany, #1 is Bitcoin and #7 is Blockchain. This is just a quick overview of the hype of Blockchain and its associated cryptocurrencies like Bitcoin or Ether.

clip_image002

People do have questions about the fundamental technology behind the media-focussed and media-hyped Bitcoin with its marketable value rally from almost zero to hero: what is a Blockchain? How can I use it? What benefits do I have by using it? Is there one Blockchain? Am I going to be rich with Blockchain? Taking Albert Einstein’s quote “ If you cant explain it simply, you didn't understand it well enough” into consideration, this Blog aims to give a technical perspective to the Blockchain Technology and the role Microsoft’s Azure based Blockchain as a Service (BaaS) is playing.

We will use a simplified democratic election use case to show what Blockchain on Azure can offer to make the process more transparent, efficient and trustless.

What is Microsoft Azure?

Azure is Microsoft’s cloud computing platform, which allows the users to manage the whole lifecycle of an application from its scratch to its termination. IT professionals can build, test and deploy the application by using the comprehensive set of services Azure offers.

Following the company strategy of “mobile first, cloud first”, Microsoft offers Infrastructure as a Service (IaaS), Platform as a Service (PaaS) and Software as a Service (SaaS) on Azure and recently added the previously mentioned Blockchain as a Service (BaaS) as an opportunity for businesses to get in touch and rapidly check the feasibility of the Blockchain technology for their purposes (proof of concept (poc)).

What is a Blockchain?

Blockchain is a decentralized, electronic ledger. Transactions (in the Blockchain language, a transaction is treated as an exchange of information of any value rather than just financial transactions) are stored in the electronic ledger in blocks, which are secured cryptographically by using Secure Hash Algorithm (SHA) which takes an arbitrary length of information as an input and gives a fixed, unpredictable but unique to the input hash value back.

clip_image003

This simple example shows the power of the SHA. My vote for Mr. A created a digital fingerprint of the given input and any change of the input will change the hash value in an unpredictable way, giving another unique value for the changed input. SHA also works like a one-way street: If you know the input, you can easily get the output (the output is in the first instance random and unpredictable, but unique for the input forever) but it is almost impossible to calculate the input with a given output.

clip_image004

Exchange of information is secured in blocks (a block is simply a set of information) and joined together to the Blockchain with each block carrying the hash value of the previous block to guarantee that no change is done to the input. Except for the Genesis Block, which is block number 1 without prior hash value.

clip_image005

A copy of the Blockchain is replicated across the computers (nodes) within the Blockchain.

clip_image007

This solution gives the Blockchain its decentralized feature. There is no need to store the electronic ledger in one place and trust the party about its content. And because the blocks are secured by a hash value, any change of any block (change of information, change of nonce etc.) will end up in a chain of changed hash values, which causes an information and status asymmetry among all nodes of the distributed Blockchain.

clip_image008

Mining and Cryptocurrency

Blockchain is using the concept of mining to agree which block needs to join the Blockchain next. Transactions are consolidated in a block and giving the node a mathematical problem to solve. Each node is parallel trying to find the solution to a given problem and as a result to suggest the block to be the next in the Blockchain.

The mathematical problem is again using the SHA. Each “miner” is trying to find multiple zeros as beginning positions of the hash-value by trying out a 32-bit (4 bytes) number which solves the problem: Continuously changing the nonce to find (in that example) 4 zeros at the beginning of the hash. The first node, who finds the solutions proposes the block and it got sealed to the Blockchain inevitably.

clip_image010

clip_image012

Well to answer the previous question of Am I going to be rich with Blockchain? – the miner which solves the problem first gets coins and fees as rewards for their participation, validation and also as a compensation for the utilized computing power. Those coins are the well-known Bitcoin, Ether or Ripple just to name some. Even those coins worth more and more in recent time, it is very difficult for a single miner nowadays to get the nonce, which gives the desired hash value with the required difficulty. All Blockchains are designed in a way that the increase in the number of miners is increasing the difficulty of the mining process by requiring more zeros as beginning positions. So getting rich with mining is, for the well-known coins mentioned above, not possible nowadays ☹

But Microsoft’s Azure Blockchain as a Service (BaaS) solution decreased the barrier of getting into the Blockchain technology by taking care of all the above-mentioned steps.

Creating an Ethereum based Blockchain network takes less than 10 minutes and gives businesses, start-ups and early adopters the chance to proof the concept in a rapid way and to introduce new business models.

What is Blockchain as a Service on Azure (BaaS)

Well, in a simple way, Microsoft’s Blockchain as a Service is all the features mentioned above: The creation of the Blockchain network with multiple nodes, the hashing, the mining, the consensus among the nodes, the distribution of the replicated ledger to all nodes and even more. Microsoft shift on Azure created opportunities to connect several services on the Azure Platform with each other. Blockchain-Data analytics, Blockchain-AI are just few example of combining Microsoft SaaS with BaaS.

Aligned with that strategy, Microsoft’s BaaS is an Ethereum based network, which allows to develop and deploy codes with smart contracts on the Ethereum Blockchain using virtual machines as nodes.

Ethereum Blockchain

Ethereum was build to tackle complex and challenging issues using the distributed network. It is a free and open source next generation Blockchain, which allows to develop and deploy codes using smart contracts on virtual machines.

Smart contracts are one of the fundamental differences of the Ethereum Blockchain to the Bitcoin Blockchain. Whereas the Bitcoin Blockchain was build to offer an alternative currency, Ethereum was build to tackle industry issues using the Blockchain technology. Smart contracts are written codes (in the Ethereum based language solidity) which trigger events to execute the code. The code is public and participants are anonym.

clip_image014

(The first description of a smart contract was described using the analogy of a simple vending machine (node) with a simple “if” statement as the code to execute and the money received as the triggered event).

But smart contracts are capable of executing more complex codes. Microsoft’s Bletchley project aims to build an Enterprise Consortium Blockchain Ecosystem which uses most of the services and architectures of Microsoft to leverage the Blockchain technology.

clip_image016

Distributed applications or programs can be stored on the Blockchain to be used from every node in various architectures and innovative ways to replicate or even generate business models on the Blockchain.

Node to node transaction Node to smart contract transaction

clip_image017 clip_image018

Node to smart contract to node transaction Multiple node to smart contract to node transaction

clip_image020 clip_image021

Microsoft’s Ethereum based Blockchain on Azure is setting up all the above-displayed players needed to develop smart contracts which can run on the Blockchain.

(See exercise 1 steps 1-8 to create the Blockchain https://github.com/MSFTImagine/computerscience/tree/master/Workshop/Azure%20Services)

For a Blockchain with 2 consortium members with 1 node each, Azure deploys all relevant resources within 10 minutes. It includes 3 virtual machines separated in miners (mn0 and mn1) and a transaction no (tx0), it creates the interconnections and groups and provides storage spaces and accounts.

clip_image023

This ready to use Blockchain network needs to be connected to an e-wallet via the Ethereum-RPC-Endpoint. Remote procedure calls give the wallet program the right to connect to the network and perform the tasks needed.

Summary – what we have learned

The Blockchain technology is a fundamental technology behind the hyped cryptocurrencies. It is capable of changing existing business models, create innovative businesses and support applications based on Blockchain.

In this Blog, we discovered the technological features supporting the Blockchain technology like Hashing, Mining, Consensus and distribution of systems.

We also took a closer look at Microsoft’s Blockchain as a Service on Azure. It is an easy and quick way to create and deploy a Blockchain and test if the Blockchain technology is capable of making the current business more transparent.

The next step to this blog could be a step-by-step guide how to deploy a Blockchain for a special use case including a smart contract programming and deploying.

References

https://azure.microsoft.com/en-us/solutions/Blockchain/

https://coinsutra.com/smart-contracts/

https://www.ethereum.org/dao

https://github.com/MSFTImagine/computerscience/blob/master/Workshop/19.%20Blockchain%20on%20Azure/Blockchain%20on%20Azure%20HOL.md

https://github.com/Azure/azure-quickstart-templates/tree/master/ethereum-consortium-Blockchain-network

https://github.com/Azure/azure-Blockchain-projects/blob/master/bletchley/EnterpriseSmartContracts.md

https://medium.com/@mvmurthy/full-stack-hello-world-voting-ethereum-dapp-tutorial-part-1-40d2d0d807c2

https://www.movable-type.co.uk/scripts/sha256.html

https://techcommunity.microsoft.com/t5/Microsoft-Ignite-Content-2017/Exploring-Blockchain-business-use-cases-and-how-Microsoft-Azure/m-p/99082

https://venturebeat.com/2016/10/22/Blockchain-tech-could-fight-voter-fraud-and-these-countries-are-testing-it/

http://www.xorbin.com/tools/sha256-hash-calculator

Comments (0)

Skip to main content