Microsoft in the News
Blockchain is one of those things that everyone has heard about, but few people understand. Sort of like E = mc2. And just like E = mc2, it is something that is going to change the world we live in. Will it affect you personally like cell phones or the internet? Probably not. Will it affect you indirectly like nuclear power and war? Almost certainly.
Business and governments are scurrying to find out if they need Blockchain for any aspect of their work. The worlds of government, banking, accounting, and finance are all frantically adopting Blockchain. New applications in other business worlds are constantly being explored. To accommodate this demand, Microsoft has introduced Blockchain as a Service (BaaS) on their Azure platform.
To get ahead of this curve, I am starting a blog series on Blockchain. Starting with the history, and then the basics to give you the background and foundation to stand on. I will wind my way through the development of Blockchain and finish with an introduction to Azure BaaS.
For those of you who are still interested in my series on Azure Data Catalog, I will be continuing to update you as that service evolves.
The Origin of Blockchain
The concept of Blockchain was invented by an enigmatic person (or perhaps group of people) known only by the pseudonym, Satoshi Nakamoto. His (their?) reason for creating Blockchain was so they could launch Bitcoin.
Up until then, digital currencies ran into the problem of double-spending. Because digital currencies are “digital”, they are easily duplicated or falsified. Before Blockchain, prevention of double-spending would fall to a centralized trusted third party. This third party was tasked with keeping track of everything and verifying whether a given coin had been spent or not. This was not a satisfactory solution since it had a single point of failure that affected both availability and trust.
Then came Blockchain. It promised a decentralized system that had no need for a trusted third party. All the timestamps representing the use or transfer of the digital currency Bitcoin were recorded in a public ledger called a Blockchain. “Mining” Bitcoin is the process of verifying a transaction and adding to the Blockchain public ledger, and results in the minor being paid in Bitcoin for having done the work. It requires the minor to enter a computational lottery where each hash they perform is like buying a single lottery ticket. The minor who generates a block to add to the chain is awarded 12.5 bitcoins plus any transaction fee for the transactions included in the block. This is how new coins are released. Bitcoin is mined by computers around the world that compete to be credited with completing the latest block in the Blockchain. When a block is created, a new hash of the block is placed at the end of the Blockchain.
One of the inputs for the latest hash is the hash from the previous block. A hacker trying to make a change anywhere along the chain would set off a cascade of changes all along the chain and everyone would instantly know that something was tampered with.
In more technical terms, mining is doing the work of finding nonce so that sha256(sha256(data+nonce)) < difficulty
- nonce is an integer number the miner chooses freely (this choosing of the nonce and checking if the condition (< difficulty) is met comprises the work
- data is a hash over the contents of the block (transactions) and the previous block’s hash
- sha256() is the SHA-256 cryptographic hashing function (wikpedia SHA-2 article)
- difficulty is a value that is adjusted consensually by the nodes of the bitcoin network to adjust for change in network computation power to have one block created every 10 minutes by the network
Finding the nonce is the proof that you put in the work and should be paid. It is impossible to find nonce without a trial and error approach.
As the Blockchain gets longer, more and more computer power is required to keep up with the computations. Miners today are no longer using their computer to do the mining. As the Blockchain grew, the miners had to grow their computing power along with it and now, massive datacenters are dedicated to the process. Because electricity makes up 90% or more of the cost of mining, these datacenters are located around the world wherever electricity is cheap. The world wide consumption of electricity used to maintain Bitcoin and Ethereum is more than that used by Iceland (population 340,000). This is a problem and Microsoft is addressing it.