In the previous article, we discussed the basics of blockchain – namely, the fundamental concepts of hashes, asymmetric cryptography, and digital signatures. Hopefully that helped to demystify the “blockchain,” a concept which has been around forever. Its mundane, lonely existence is like all the other useful, yet boring technologies that are largely known only to the ranks of self-proclaimed “geeks.” The difference here is that the explosive rise of Bitcoin pushed blockchain into the mainstream, where it entranced a fervent public captivated by the mystique of this fountain of fortune. Subsequently “blockchain” has come to stand for “killer technology that practically prints money.”

The irony of this is that the very thing that makes crypto currencies workable is actually its ingenious “mining” system. Blockchain just happens to be the concrete part of crypto currencies, while mining is difficult for the public to understand. Blockchain therefore somehow developed the magical touch that turns everything into gold. Attach the “blockchain” label to anything and people will be convinced they’re seeing a unicorn.

To understand the role blockchain plays in a crypto currency, and why “mining” is the real critical part, let’s summarize the essential characteristics of a crypto currency:

  1. It is a ledger of a continuous balance sheet, where all transactions of credit are recorded from a set starting point.
  2. Each participant in the ledger is represented by a public key, which is just a long series of digits. Anyone can generate their own key, which has no record associated to any individual, other than the fact he or she has the corresponding private key. Therefore it is completely anonymous.
  3. All transactions are represented by statements such as “A transfers X units of credit to B,” along with other supplementary information, after which the statements are signed by the private keys of the payers. A and B are the public keys for entity A and entity B.
  4. The amount of “money” a participant has is equal to all the credit transactions made to its public key, minus all the transactions from its public key, since the start point.
  5. Possession of the corresponding private key means ownership of the “money.”

The ledger here is the blockchain. It is simple, boring, and can be implemented by anyone who can use the crypto library. But the most important requirement is “decentralization” – no single entity or authority controls this ledger (the blockchain). The ledger is distributed to anyone who wants to participate in the currency. All one needs to do is generate a pair of keys that meets the protocol standard, and then they can add, delete, and change the ledger. However, only the copy that adheres to, and which has gone through the “mining” process, is trusted. The mining process is essentially a “voting” system by a significant number of people, also known as the miners, who perform verification of transactions and then digitally sign the records. These signatures lock the records in blocks.

The process is as follows:

  1. Based on the current verified and broadcasted ledger, transactions can be conducted. The transactions are then added to the ledger and broadcasted.
  2. Anyone who wants to participate in the mining process will take these transactions and group them into a block after they have verified the transactions are valid.
  3. One of the miners will then sign the block and seal it with its digital signature, and get a reward of credit as part of the protocol.
  4. Block-signing privileges are obtained through a competition among all participating miners. One must jump through a set of hoops, which requires a significant amount of work (and therefore, time). This is called “proof of work.” Essentially, the mining process is a number of people competing to get to the finish line first to earn that credit.

Work is undertaken to compute a magic hash for a block. The block can only be signed when the magic hash has been found. The ONLY way to get that magic hash is to use brute force through the combination of a “nonce.”

How it works

When a miner creates a record of the block, it groups together a set of transactions others broadcasted, which the miner verified. Within that record the miner also includes the signature of the block to “chain” the new block to. In addition, there is a standard variable (the nonce). The nonce can be set to any value, and then the hash can be computed for the record. In Bitcoin, the hash is 256 bits. But the acceptable ones for signing a block have to start with 60 some 0’s (not sure the exact number but it actually will be increased gradually to make it harder). That means the nonce must be changed half of 260 some times to have a near 100% certainty to get one of the magic nonces that will result in the magic hash. To get an idea what it takes to compute the hash, all the current combined computational power of all the miners (some may have massive parallel machines) takes about 10 minutes to find a magic hash (according to a quick search from the web). So this is a mini-lottery for all the participating miners.

If a miner hits the magic hash, it quickly encrypts that hash using its private key (digitally signing) and publishes it before countless other miners find theirs. Once the magic hash is published, others will have to abandon their effort and follow the record newly created by the “winning” miner and start work on new ones. Multiple versions of the blockchain can be broadcasted, but only the longest chain is trusted, resulting in miners quickly jumping onto that chain. Any transactions will be based on the chain with the most blocks (which, again, is the most recent one). For that one block signed and accepted by others, a coin reward is granted via the protocol to the miner’s public key.

In reviewing these steps and thinking through what is happening, the ingenuity of system becomes apparent. The profit motivates the miners to participate. They must do their job to verify the transactions. Any error voids the block, and therefore, the reward, so it’s in the miner’s interest to make sure the transactions are verified before putting in the work to compute the hash. While finding the magical hash takes monumental effort, verifying the records – even going all the way back to the beginning of the ledger – is infinitely simpler in comparison. Also, because the previous blocks are trusted, one only needs to go backward to find valid credit statements that can cover the transactions. Once that’s verified, there’s no need to go any further because whoever signed the blocks up to that point essentially guaranteed that the transactions are valid.

As you can see, the distributive nature of this scheme pretty much ensures no one can monopolize the signing of the blocks. It is one entity versus the rest of the world. Even if one had a hundred times the computational power of the others, there are probably tens of thousands of “others” out there. The next block can only start to be computed after the current new block is completed. Luck also has a lot to do with it because although probability says it takes on average “x” number of tries to find a magical hash, a miner with lousy computing power may luck out and get the winning combination at its first try.

Anyone attempting to forge the records has to create all those magic hashes and simultaneously be the longest chain as well. That’s nearly impossible, or to use the “technically correct” term, infeasible.

Now that we have discussed how a crypto currency works, and what role the blockchain plays, you can understand my puzzlement with the frenzy over “blockchain” technology. It is obvious that what makes cryptocurrency work is the mining system that provides the incentive and the mechanism that allows a decentralized ledger to be maintained in an anonymous, yet highly trusted manner. To put it bluntly, mining’s purpose is to create an obstacle in the racetrack to slow people down so no one can monopolize the verification process. While this scheme is perfect for cryptocurrency, it is almost useless for all other applications.

Nevertheless, as I said, blockchain is a boring but quite useful concept. While cryptocurrency depends on anonymity and decentralization, most other applications do not. In fact most enterprise applications are designed to have centralized control over trust.

At Cirrus Data we are about to present a new product that uses blockchain to provide immutable storage repositories, which allow centralized control over the trust of the veracity and integrity of the data once it is deposited to the repository. We call this a Crypto WORM – a true Write Once, Read Many storage that is guaranteed by a crypto blockchain. I will describe this new product in my next blog post.