The Blog post assumes the reader already has some knowledge on cryptocurrencies (the assets on Blockchain) and Blockchain (the Technology)
If you consider an asset that doesn’t have any physical manifestation such as a coin/currency note that can be tangibly owned by someone. There should be some verifiability of the asset owned by someone and a verifiable mechanism of transfer of the asset. This can be achieved with the Public-Key Cryptography based signatures in which participants have a public key, private key pair such that any information hashed using the private key can be easily verified with just the public key of the user. The electronic asset will basically be a chain of transactions with each transaction containing a hash (a known hash) of the previous mechanism and the public key of the receiver and signed by the sender (the public key hashed with the private key). This way the sender can verify the validity of the transaction chain if the public keys of all the participants are known.
Source: Bitcoin Whitepaper
This can be extended to each transaction being a block with multiple transactions and the transactions can also have a wide number of denominations (which can even be continuous values) and the participants can use whatever transaction they received that aren’t spent yet (called the UTXOs).
Double Spending Problem
But even in this case, this fails to solve the double spending problem as the sender still has the chain with all the valid signatures and can just send it to another person. So there should be a central authority which employs an escrow kind of mechanism and decides on the order of transactions.
A Decentralized Network
Now to maintain a digital currency without a central authority we can employ some game theory and incentivize the participants to be good actors on the network. And the trust is placed on the version of the ledger (transaction chains) that the participants in the node agree upon. Also since we can’t expect participation of 100% of the wide number of nodes to be active or to be reliable to reach consensus and hence we should also ensure a Byzantine-Fault-Tolerant Network.
Consensus and Proof of Work
Both Ethereum and Bitcoin uses a Proof of Work algorithm. Each participant of the node should require doing some work that performs a task whose computational difficulty can also dynamically adjusted to reach a specific average time spent for doing the work which is finding a nonce to the hash of the previous block and the current block such that the resulting hash has particular number of zeroes in the beginning, in the case of Bitcoin and Ethreum. And the work done is be easily verifiable. When the block is broadcast to all the nodes in the network, each node verifies it and adds it to the chain and starts working on the next block with the hash of this block. Hence by Probability Theory, the probability of the bad actor cracking an invalid block before the majority of good actors acting on a valid block is very small as long as the good actors have more than 50% computational power.
Byzantine Fault Tolerance
Now all the participants of the network should be able to reach consensus on the valid chain of blocks through a Peer Network with each node for a participant which might not be possible due to bad actors or simply faulty nodes. A Byzantine Fault is the loss of a network due to a Byzantine Fault (different nodes in the network receive different truths or a down node) in the network that requires Consensus) is called a Byzantine Failure. In case of Bitcoin and Ethereum, the network’s consensus goes with the valid longest chain possible and hence all good nodes in the network work on the longest chain. Any new node entering the network just downloads the longest valid chain it receives.
This is where mining comes in. Whenever a block is accepted in the longest chain the node is incentivized using some amount of the digital currency which can be considered as transaction fees. Public Blockchains uses Game Theory to argue that the incentive of being an honest node and getting the currency through mining in the network is higher than gathering the CPU power to defraud the system which would, in fact, invalidate his own wealth. This is, of course, probabilistic but with a pretty good probability.
These are the aspects of the bitcoin in its current state. But of course, alternative incentivizing and consensus mechanisms are being worked upon. The spirit of decentralization has generated interest in blockchains. Ethereum took the blockchain further to use the mining computation to also execute code and able to write smart contracts that can be used to create decentralized Applications (dApps) on Ethereum.
Blockchains are visioned to replace banks and traditional internet-based payment services. Ripple uses blockchain to replace traditional bank gateway servers which basically puts FIAT on the blockchain. But here the blockchain is not entirely decentralized. Different level of trust is placed on different nodes in the network and the gateways are compliant and trusted. This gets us to Private Blockchains.
Such systems have been a primary focus of interest from financial institutions, and have in part led to a backlash from those who see such developments as either compromising the whole point of decentralization or being a desperate act of dinosaurish middlemen trying to stay relevant. If using the blockchain will help an institution or not can be seen from the adoption in the coming days.
Across a business network, Distributed Ledgers can provide a unified protocol to manage the identity of network participants. It can enable trust between two different departments or two different businesses and fasten compliance checks. And blockchains are being researched upon constantly and with improvements in that it improves the supply chain in a business network. And blockchain is also encouraging global protocols across the industry like Ripple connecting different payment networks. This could simply be done using the internet, but blockchain increase trust to form such collaborations through immutability and faster compliance and provenance.
Distributed Ledgers – Hyperledger Fabric
Some aspects of the blockchain prove to be useful in the bookkeeping of the organization and maintain immutable systematic ledgers which are decentralized among permissioned entities. And the policies used in private blockchain has its own challenges while aspects like incentivizing and block time are eliminated. Hyperledger Fabric is one of the prominent projects applying blockchain to implement Distributed Ledgers. Some of its architectural components explain the advantages of private blockchains.
In a public blockchain, the consenesus is reached on the longest chain. transactions can be considered valid and final only after 4 to 5 blocks after the transaction block which is not practical for a business. A permissioned blockchain maintains the properties of immutability without proof of work, as any transaction to be added goes through endorsement and verification before being added and this is verified using the digital signatures of the endorsers.
The integrity of the distributed ledger can be verified by the blockchain Merkle tree and using the policies in place and public keys of the participants to verify the signatures on all the transactions.
There has been research on Byzantine Fault Tolerant systems with networks with arbitrarily faulty nodes with replicated data. Algorithms like Kafka, PBFT, and SBFT are used which are faster than proof of work. And the identity of the nodes is important in this case, as different nodes participate in the consensus processes in different ways like some endorser nodes which executes the smart contracts. And the endorsement policy specifies the validity of the transactions
Instead of longest chain and first block to be cracked police which can make finality time consuming, centralized Ordering services are used. And again they can be distributed within ordering service nodes and implement distributed BFT protocols.
And again implementing a distributed ledger in business requires the use of a proven set of protocols for endorsing, consensus and ordering and checking the verifiability of the ledger for it to benefit from the advantages of a blockchain.
Though everyone excited about blockchain is excited about the complete privacy and the decentralized approach. Private blockchains can seem to be missing the whole point, but it borrows from the proven aspects of the blockchain like settlement finality, immutability, and verifiability to be applied in various settings.