With the emergence of enterprise blockchain, an increasing number of businesses are moving towards the adoption of blockchain for mitigating the problems associated with supply chain, finance, asset tracking and many more. With this increasing interest in business blockchain, one must understand that blockchain isn’t a magical hammer that alone can be harnessed to fix every problem. Blockchain needs the support of other technologies like traditional databases, client-side applications, etc. to provide complete enterprise blockchain-based solutions that are viable in terms of scalability, flexibility and portability. For example, in a supply chain management system, only one or two use cases are aided with blockchain, and the rest of the application is built on other technologies even including traditional databases. That is, in fact, the beauty of enterprise blockchain. Enterprise blockchain solutions sometimes move away from the concept of decentralization but exploit the other features of blockchain in addressing business problems. So one of the major challenges associated with the adoption of blockchain in enterprises is the integration of all these business components together. If you are a blockchain developer you must be aware of the fact that Integrating a blockchain application with the current applications like SaaS, Salesforce, Office, etc isn’t a trivial task and requires added effort. So that’s where Microsoft’s Azure Blockchain creates its space. Microsoft proposes Azure Blockchain to solve the problems associated with the integration of business components and making the overall process seamless and efficient. Microsoft Azure provides built-in infrastructure, tools and services for building a viable, robust, scalable and efficient business solution employing blockchain technology. As now you have got a basic overview of enterprise blockchain, let’s dig down further and explore the tools we have available in Azure Blockchain for building efficient blockchain applications.
Azure Blockchain Service:
Azure blockchain service allows the deployment of the network on Azure with the control of infrastructure management and nodes management on consortium network. Businesses can choose from a variety of popular networks including Ethereum Proof-of-Authority, Corda and Quorum. It also provides the flexibility to introduce your own consortium network into the Azure marketplace on your varying business needs. Azure blockchain services simplify the network management part of the solution, thus facilitating developers to focus directly on the application building part.
Azure Blockchain WorkBench
Allows for building applications on a wide variety of blockchain networks in less time and cost by providing pre-built integrations to cloud services, authenticated APIs for REST requests and identity management by linking your identities with Azure Active Directory.
Azure Blockchain Tokens
Allows you to integrate token in your blockchain solution with the pre-built token templates designed by considering the needs of common blockchain solutions. Businesses can also customize the token templates based on their own varying needs. Azure Blockchain Tokens is currently in preview stage.
As now you have got a general idea of what Azure Blockchain is, are you ready to actually see things in action by playing with Azure Portal? Let’s start.
- Azure Account: You can get a free Azure Account with $200 credit for 30 days if you don’t have an Azure account already.
- Metamask : If you don’t have Metamask wallet configured already, you can follow the steps in this article to configure and setup your Metamask wallet with fake test ethers.
Once you log in to your Azure Portal you’ll see the following Dashboard:
Before starting with Azure Blockchain services, create a resource group in Azure. Azure Resource groups allow you to store your related logical collections at one place for effective management. You will be using this resource group later in this tutorial. Move to Resource Groups -> Add and choose your Azure subscription, resource group name and your nearest region. After providing all these details click on “Review+Create” to set-up your resource.
Now as you have created your resource group let’s explore the blockchain services provided by Azure.
What We are Going To Do
In this part of Azure Blockchain tutorial, we are going to set up a blockchain network on Azure Blockchain first. In Azure Blockchain we can choose from a variety of consortium networks including Quorum, Corda etc. For this tutorial, we are going to set-up a multi-node peer-to-peer private Ethereum blockchain with proof-of-authority(PoA).
What is Ethereum Proof-of-Authority(PoA) Consortium
In 2017, Ethereum co-founder Gavid Wood coined the idea of Ethereum proof-of-authority(PoA) designed for private blockchain networks in contrast to proof-of-stake(PoS) or proof-of-work(PoW) that were designed for public blockchain networks. In Ethereum proof of authority on Azure, multiple members will be running Ethereum proof-of-authority on their own with a group of their own validator nodes. Validator nodes will be acting as a miner and possess unique Ethereum addresses. Any transaction in a network will be verified if 50% of the validator nodes belonging to different members of the network reach consensus regarding any transaction. For the purpose of fairness in the network. No consortium member can choose the number of validator nodes than the previous consortium member. For example, if the previous consortium member deploys 3 validators, then each subsequent consortium member can only deploy up to 3 consortium members.
Deploying Ethereum Proof-of-Authority on Azure WorkFlow
We assume that there are 3 consortium members.
- Each member generates their Ethereum Account using Metamask
- Member ‘A’ deploys the Ethereum PoA on Azure using his Ethereum public address.
- ‘A’ shares the deployed consortium URL with member ‘B’ and ‘C’.
- Member ‘B’ and ‘C’ deploys Ethereum PoA using their own Ethereum public address and consortium URL provided by member ‘A’.
- ‘A’ votes member ‘B’ as an admin.
- Member ‘A’ and member ‘B’ both votes in for member ‘C’.
As you have understood the theoretical concept behind Ethereum Proof-of-Authority now, we will further move towards deploying the footprint for member A on the network.
In Azure Portal go to Create a resource → Blockchain → Ethereum Proof-of-Authority Consortium. After that, we are going to specify the input configurations for Ethereum PoA deployment step by step.
Step 1: Basics
Choose the following properties in the Basics Tab.
- As we are creating a new network for now, so keep the “Create New” Option that is set by default. This will be changed in the case of member 2 when he will be joining the existing consortium network that we are currently deploying.
- Provide your email address. You’ll receive an email notification when your deployment will be completed.
- Choose the name of the deployed VM.
- The method to authenticate the VM. Choose “Password” i.e set as default.
- Set the password for the deployed VM.
- Confirm your password.
- Choose your subscription.
- Select the resource group from the list that we had created earlier.
- Choose your location
Step 2: Deployment Regions
- Select the no of regions in which you want to deploy your consortium network. For this tutorial, I am just choosing 1 deployment region. You can choose more for high availability.
- Choose the region same as the region of your “Resource Group”
Step 3: Network Size and Performance
- Choose the number of your validator nodes. You can choose 2 or more than 2 validator nodes for your network belonging to different geographical regions
- Choose the machine specs for these validator nodes.
Step 4: Ethereum Settings
- Choose your consortium member ID between 0-255. This member ID is unique for every consortium member. I am choosing the consortium member ID 1.
- Network ID is the ID of your consortium network and is also unique to the network.
- Admin Ethereum Address is where you will add your Ethereum address from Metamask. Open your Metmask extension and copy the Ethereum address of your account.
Step 5: Monitoring
- If you want to collect logs from your network and check the network health enable the monitoring option that is set by default.
- Create a new location to deploy the monitor instance
Step 6: Summary
Verify and review your deployment summary and confirm
Step 7: Buy
After that, you are going to buy the Ethereum Proof of Authority template from the Azure marketplace and deploying the network instance with above-set parameters. Your deployment will take a few minutes to succeed so be patient.
Once your deployment is successful, you will receive an email notification. After that, let’s explore the output parameters of our deployment network that will be used for managing, growing and building on top of the network.
Locate your Deployment Output:
In your Azure Portal move to the “Resource Groups” and choose the resource group that you had used for Ethereum PoA deployment. In my case, the name of the resource group is “Filza”.
Move to that resource group and view your deployments.
After that, click on the 14 succeeded deployments and from all the deployments you see, go to “Microsoft-azure-blockchain,azu..”
Now go to Outputs and here you can see different fields. Two fields that are useful for you now are the “consortium data URL” and “admin site”
Consortium Data URL: You can share this URL with other consortium members so they can join your network
Admin Site: When you copy this URL and open it in a new Tab. You will be directed to a dashboard called “Governance Dashboard”. When you open this URL, a notification will pop up to connect your Ethereum Proof-of-Authority network with Metamask. Once you connect it, you can view your administrator’s panel and option to nominate.
Every consortium deployment comes with a set of pre-deployed smart contracts and web application to manage the admin and validator nodes. Admin can introduce their validator nodes in the network and the overall network is maintained by the 50% consensus of all the involved validator nodes managed by pre-deployed smart contracts.
Growing your Consortium: Member’s B Deployment Footprint
- Share your consortium Data URL and your chosen number of validators with member B that you intend to invite to the network..
- Member B will deploy the same Ethereum PoA network by choosing the option of “existing network” in Basics Tab and pasting the provided consortium URL in Ethereum Settings Tab.
- Current admins can vote for this member B’s request in Governance Dashboard. If member B receives 50% of the admin votes, he will become the part of the network, otherwise, his request will be declined
That’s all to conclude Part 1 of Azure Blockchain. In the next part of this series, we will further explore about leveraging this deployed network for building blockchain applications.
Xord can help you build Blockchain projects and give you free Blockchain consultation, connect with us and get started now!