The Capital
Published in

The Capital

Blockchain — Part 3: Private Networks

By James Lee on ALTCOIN MAGAZINE

In this 3rd series of blockchain, we will look at private network, which provides a structure for facilitating real business applications.

Why we need private network:

As I have explained in my intro to blockchain article, bitcoin works on public networks. It means anyone can join the network, and get access to all the transactions. It’s designed this way to be transparent and achieve distributed computing. However, to solve real business problems, it’s not practical in several regards:

  1. Lack of privacy
  2. Transaction inefficiency
  3. Every node on the network need to have large storage

The solution is private network, or permissioned network. These networks require permission to join. Below, we will look at how private networks have resolved the issues mentioned above, and also look at the basic constructs in a typical private network. I will use Hyperledger Fabrics as an example, but the similar concepts apply to other private networks as well. Hyperledger Fabrics is currently the most widely used private network.

Privacy:

A business blockchain will need to have all participants in the industry on the network for it to be effective. But can you imagine a world where every company knows all its competitors and suppliers’ cost and price. If I were selling cookies, and I know Sally, who supplies cookie dough, really well. If she wants to give me a special price, then all her customers would find out, and probably not be very happy. Total transparency or the lack of privacy obviously does not work in a business setting. Hence all private networks have a feature to send a private message, only parties involved in the transaction will have access to the data. In Hyperledger, it’s called channels. In the example above, Sally and I would create our own channel for the special price deal. No one else on the network would know about the transactions (except validators, but more on that later).

In addition to private messages, private networks usually have access control service, called MSP (membership service provider). MSP serves to check companies, approve entrance, and maintain membership status, and roles in the network.

Transaction inefficiency:

The problem:

In my previous article (intro to blockchain)xxx, we know that PoW is CPU intensive, and takes roughly 10 minutes to commit a block to the blockchain. Specifically, the problems with PoW are:

  1. CPU intensive, wastes too much electricity
  2. Too slow
  3. Requires all the nodes to have a copy of all the data

For PoW, it has shown that the amount of electricity used to run miners is enough to power some of the nations in the world. It’s very wasteful.

As for speed, bitcoin can only process 4.6 transactions per second compared to 1700 transactions per second on average for Visa. This is too slow.

In addition to PoW, public networks require every node to have a copy of all the transactions for validation. The amount of data can be quite large as the network pick up momentum. I think someone can debate between having a say in validation v.s. efficiency. Since private networks are designed for practical business use, efficiency prevails here.

Solution:

So, instead of PoW, there is a proposal for Proof of Stake.

  1. Instead of every miner compete to run complicated math problems, the validation is performed by randomly selected node or nodes, called validator.
  2. Each validator deposit money to the network for 2 purposes: 1. to guard against validating a fraudulent transaction. 2. more deposits give the validator higher probability to be selected

So basically, no more complicated math puzzle and only one or selected nodes validate. This reduces the electricity waste, slow transaction problem, and mass data maintenance problem. Note that I didn’t go into too much on proof of stake because the private networks can have many variations of PoS. In addition, since this is still kind of work in progress, and most of the private networks are modular by nature, it’s also possible the PoS swapped with other algorithms. What’s important is to know is the basic concepts of PoS, and how they have resolved the efficiency issues in PoW while still maintaining trust in transactions. In Hyperledger Fabrics, the validators are part of the job of peers (nodes have different roles). Also, a company’s validators are not randomly selected.

In addition, private networks would have the following characteristics

  1. Modular,
  2. Different roles,
  3. Current state

Modular

Most of the private network has a modular design, making replacing certain components easy, and businesses can easily plug in different functionality for different industry needs. Algorithm for identity, consensus (ordering), and encryption are examples that can be switched and plugged into the network.

Different roles

Most of the private network will have nodes divided into different roles for efficiency. In Hyperledger Fabrics, there are peer and orderer nodes. Peer nodes are for batching, verification and transaction processing. Orderer nodes are for ordering of transactions before added to the blockchain and logging of transactions. Peers execute smart contracts and process transactions, orderers do not. Every authorized transaction that arrives at an orderer is mechanically packaged in a block — the orderer makes no judgment as to the content of a transaction. The different role types allow for concurrency and speed up the network.

Current state

Because private networks are designed for business use, instead of having the node figure out the most current state of the network, the private networks typically have a mechanism that keeps the most current state in the ledger. Hence, a typical private network ledger would have 2 sub-ledgers, the transaction history, and the current state. The current state is derived from the transaction history. Again, this is done for efficiency. In Hyperledger Fabrics, it’s called transaction log and world state, the current state

Conclusion

In this article, we outlined the problem with public blockchain network and PoW. We also talked about private networks and some common characteristics of a private network. I have stayed at a high level because I think one should have an overview first before going into details. Thank you.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store