In traditional centralized systems, all the communication is governed through a central party or database involved. This dependence on a central single authority comes with a lot of cons, especially when the involved parties don’t trust each other. In this scenario, blockchain helps to get rid of centralization by introducing Distributed Ledger Technology (DLT). In contrast to centralized systems, in DLT every participant of the network possesses an individual copy of the database known as a ledger. All the data of the network will be stored in each individual ledger rather on one centralized database. Ledger can only be updated with the consensus among involved parties in network and can’t be removed without the knowledge of whole network. The following figure shows the difference between centralized and distributed ledger technology.
Figure 1: https://www.researchgate.net/figure/Centralized-systems-with-intermediaries-versus-decentralized-blockchain-systems_fig2_323491592
This power of blockchain, makes blockchain not just confined to financial applications like bitcoin but harnesses its power to find solutions to a variety of enterprise problems. That’s where the hype about enterprise blockchain comes from. Let’s understand what is enterprise blockchain first.
What Is Enterprise Blockchain and How Can Azure Blockchain help?
The idea of enterprise blockchain is to use blockchain to solve the problems of businesses. Now when you have to use blockchain in businesses you have to consider so many other additional factors like integration of blockchain with client side applications or SaaS. If you have some experience with blockchain development, you must be aware of the fact that it’s not easy to handle and fit these pieces together. That’s where Azure Blockchain plays its part. Azure Blockchain helps you in leveraging this process by providing you with a variety of solutions fitting enterprise needs with configuration done in clicks. So let’s take a quick look at the options available for enterprises in Azure Blockchain,
- Ledger Infrastructure
Azure Blockchain supports nearly every popular ledger technology including Ethereum, Hyperledger, Corda, etc. that you can use in your solution in a few clicks. In this article we will specifically learn to deploy Ethereum Proof-of-Authority Consortium. Moreover, Azure Blockchain also provides you the flexibility to introduce your own ledger in the marketplace that I think is a lot more helpful to satisfy different business needs.
- Azure Blockchain Workbench
Azure Blockchain Workbench has a very sophisticated underlying architecture that helps you in integrating your blockckchain apps with consortium networks efficiently. One of the interesting features of Azure Blockchain Workbench is identity generation through Azure Active Directory. In blockchain, identities are represented by long addresses and it’s non-trivial to remember and manage these addresses and to identify that which address belong to whom. Azure Blockchain Workbench solves this problem by linking blockchain addresses with Azure Active Directory identities, thus fascilitating the enterprises to use name-friendly identities linked with their hashed blockchain addresses.
- Azure Blockchain Service
Once you deploy a blockchain consortium network of your choice, it’s still a hassle to maintain the network, managing upgrades, installing security patches and more. That’s where Azure Blockchain Service helps you by maintaining your underlying blockchain network by running a fully managed blockchain node for you.
Setting Up a multi-node private Ethereum Blockchain with Proof of Authority on Azure
So let’s get into the fun part and get your hands dirty with Azure Blockchain. Before going into the setup details of Azure Portal, let’s first understand how Ethereum Proof of Authority Consortium works in Azure.
The most known consensus algorithm that is used in Bitcoin too is Proof-of-Work (poW) that uses miner resources in the form of electricity to validate a transaction in systems. This particular consensus algorithm doesn’t serve the purpose fully in enterprise blockchain based solutions because of certain limitations. In 2017, Ethereum co-founder Gavin Wood proposed the idea of Proof-of-Authority (PoA) that is more suitable for private blockchains. Proof-of-Authority is a reputation based consensus algorithm that is maintained by the group of validator nodes. Verifications in network are done by the combined consent of these validator nodes. This makes the network scalable and enables enterprises to maintain their privacy while using the power of blockchain at the same time. Lets setup a private Ethereum Proof-of-Authority consortium in Azure now.
Pre-Requisites
- Azure Account
- Metamask Wallet
After you are done with that login to your Azure Portal and Navigate to create a resource -> Blockchain and select Ethereum Proof-of-Authority Consortium.
Basics
We are going to setup our required properties under the Basics tab now.
- As we are creating a new consortium network right now, we will select create new option.
- Select your email address that will receive a notification of deployment details when it will be finished.
- Chose the username for deployed VM.
- Select the method to authenticate the VM.
- Select your password.
- Select your chosen subscription.
- Select your resource group in which to deploy the consortium network.
- Finally chose the location.
Sample deployment is shown below,
Deployment Regions
- Chose the number of regions in which you are going to deploy your consortium. As it’s a test demo I am going to choose only one resource. You can choose 2 to 3 regions for high availability.
- Select the region of your choice.
Sample Deployment
Network Size and Performance
- Chose the number of validator nodes. Each Consortium member can facilitate two or more validator nodes in network across five regions. Each validator node has unique Ethereum Identity and can communicate with other validator nodes to reach consensus in the network. To provide fairness in network, each consortium member cannot have more no of endorser nodes than the first consortium member.
- Choose the machine specifics for these validator nodes.
Sample Deployment
Ethereum Settings
- Consortium Member id is unique to each consortium member. The value can be between 0-255.
- Network id of the Ethereum Consortium Network being deployed. Network id is also unique to each network.
- Open Metamask extension and copy your account public address in “Admin Ethereum Address”
Sample Deployment
Monitoring
- Enabling Monitoring allows monitor to collect logs from your network and check the network health.
- Location where you want to deploy the Log Monitor Instance.
Sample Deployment
Verify the summary and finally finish your deployment. The deployment will take 10-15 minutes.
Post Deployment
Successful Deployment will give you the following output that you can either check in your email or from Resource Group->Deployments-> PostDeploymentNotification->Inputs
Copy the admin site URL and open it in new tab. This will provide you with “Governance Dashboard” that you can easily use to manage your ethereum network, adding your validator nodes and voting for other consortium members.
Governance Dashboard
To connect your governance dashboard to Metamask, chose Custom RPC in metamask and add your consortium RPC URL there. This will connect your Governance Dashboard to your Ethereum Account as a Consortium Member possessing two validator nodes.
Adding another Consortium Member in your Network
You can scale your network by adding another consortium member, by the following steps,
- Share your Consortium Data URL and number of validator nodes with the consortium member.
- The invited consortium member will create the solution on Azure Portal choosing the existing network option and providing the Consortium Data URL in Ethereum Settings Tab.
- Current Admins can vote for the request of this new consortium member. If it receives 50% of the admin votes, then it will become part of the network. In the same way, if 50% of admin votes go against removing any consortium member, it will be removed from the network.
That’s all for Part 1. In the next part, we will learn about building Blockchain Application on top of this created private consortium using Azure Blockchain Workbench. Happy Chaining!