“The future of IT will be many private enterprise blockchains, many private consortium blockchains, and some public blockchains, like Ethereum.”
These are the words of Joseph Lubin, the co-founder of Ethereum and CEO of Consensys. This prominent blockchain development company which released the software likes of Metamask, Truffle, and Infura, all of which were an enormous addition to the development stack of blockchain programmers worldwide.
Recently we could also saw a tweetstorm coming from Joe, which gives a fascinating perspective on the state of Blockchains in the industry:
#Blockchain is more than a market. It’s a movement.
— Joseph Lubin (@ethereumJoseph) December 1, 2018
We do seem like @ethereumJoseph fanboys, but the man sure knows his domain. With the above intro, we set the tone for our write-up. We will try to cover the Ethereum space, private networks, scaling solutions, and how blockchain can be used throughout various industries and businesses.
What this series of articles will talk about is the application of blockchain technology in enterprise use. In this first part, we want to give a broader overview of the concepts that we will be using throughout our series so that you can easily relate to certain parts that we will be talking, or implementing.
Following that, we will introduce our custom implementation of a hybrid blockchain proof of concept that helps us navigate the landscape and test out various tools in the space. The concrete series is in 4 parts:
- PART I – Exploring Ethereum Blockchain for Enterprise use
- PART II – Setting up a private Ethereum Network
- PART III – Cross-bridging to the Ethereum Main Net
- PART IV – Using the Main Net for Tamper-proof transactions
We all already know what this famous word stands for—an open, decentralized, and censorship-resistant database capable of processing transactions without a central authority. First elevated by Bitcoin and then Ethereum, it has entered many domains, most notably the finance industry.
However, the technology is applicable in many other places, but some challenges deter it from reaching real-world adoption. One of those is scalability.
Scalability is a known challenge for engineers within the reigns of blockchain technology. To give you a particular perspective on that, currently, the Bitcoin Blockchain can process up to 7 transactions per second (tps) while Ethereum can do double of that, an impressive 15 tps.
As you can see, that’s not quite a lot. But then VISA comes in and says, yeah, guys, all that is sweet, but what happens on an average day when there are 3 or 4 THOUSAND of transactions (payments) in a given second and someone has to support/process that volume. Here is where current blockchain implementations start to struggle. VISA also claimes they can process up to 20000 transactions per second.
We say Ethereum is not scalable because it’s simply not technically possible for Ethereum MainNet to process 40k transactions per second. And that’s important because VISA claims they do it, so we can conclude that there is a need for it if Ethereum wants to become generally adopted as VISA already is.
The reason why it is so challenging to solve scalability lies in the decentralized nature of blockchains and their mechanisms through which the network achieves validation of transactions. Those are consensus protocols and in the next section, we dive a bit more into the constructs behind those.
Consensus protocols are exactly what it says. Mechanisms that are in charge of reaching a consensus in a given system. In the blockchain world, three main “algorithms” are used to reach a consensus in a decentralized system. Those are Proof of Work, Proof of Stake, and Proof of Authority. We will talk a little about each of them as they are the necessary building blocks in blockchain architecture.
The basic implication is that a party that verifies blocks and transactions has to give something in return to confirm transactions. In Proof of Work, that’s electricity. In Proof of Stake, that’s money. In Proof of Authority, that’s an implicit trust that is the backbone of the network.
Proof of Work
Bitcoin Whitepaper by Satoshi Nakamoto. The Proof of Work consensus algorithm is the original mechanism that was proposed in 2008. The core of this algorithm is to use expensive computational resources to solve complex cryptographic hashes, which are difficult and time-consuming to produce but easy for others to verify.
In blockchains that use the PoW system, the validators are the so-called miners that take a bunch of transactions, add them in a block, and solve this mathematical puzzle. The first validator that solves it is rewarded and incentivized with monetary value to continue “mining”, securing the network as it adds every new block.
Currently, PoW is the most used algorithm globally (due to Bitcoin popularity). It’s estimated that it uses enough electricity to power all households in Ireland. Although it has some drawbacks and speed is one of the major ones, it is considered the safest and most robust consensus algorithm for global public blockchains.
We have written more in-depth about PoW, so head over to our dedicated article about Proof of Work if you are interested in learning more.
Proof of Stake
Proof of Stake consensus mechanism is a type that requires the nodes/validators to stake a portion of their tokens so they could be included in the validator network and being selected to validate blocks of transactions. If they are acting in good faith, they are rewarded for processing the transactions. If they are not, they are penalized, and their stake is automatically taken back by the network.
The PoS algorithm is by several magnitudes faster in regards to PoW but it also has specific drawbacks like long-range attacks. We won’t go into the details but if you are interested in more depth about this topic, feel free to check a great breakdown by Abhishek Sharma, “Nothing’s at Stake”.
Proof of Authority
Proof of Authority is an algorithm used within a given blockchain network that does not rely on computational power and solving hashes like Proof of Work. Still, the blocks are instead validated and approved by authority nodes known as validators. All that validators are doing is basically running software that allows them to put the transactions into blocks.
The validators guarantee their trustworthiness and credibility with their identity, so it is in a way similar to the Proof of Stake algorithm. However, instead of the stake in the form of some monetary value, the stake is the identity and credibility of the validator.
While it has the fastest processing time, it does that at the expense of decentralization. You need to be on the list of approved block validators, while in Proof of work blockchain, in theory, anyone can just start mining.
However, this consensus algorithm makes more sense for private networks, and it is something on which we will base our series of blog posts.
Private network vs. Public network
To understand private (or in some case permissioned) blockchains, we first need to set a clear distinction between public ones. And the difference is that in a public blockchain, everyone can participate in any activity as it is open-source, and there is no central authority in charge. Examples of such blockchains are Bitcoin, Ethereum, Litecoin, Waves, and many others.
A private network is the complete opposite of the public one. It’s a network (blockchain) where not everyone can participate. A private network is usually owned by a certain entity and is governed by rules and permissions as to who can join the network. This goes against the case for decentralization and censorship resistance.
However, it does make them much faster and cheaper than the public ones. So, if you are willing to sacrifice decentralization for other features like traceability, transparency and immutability, they make a compelling piece of technology for domains like business enterprises.
You can also see a very cool representation of the space and how different consensus mechanisms reflect certain features on the below image. An in-depth dive into distinctions can be found in this superb article by Lukas Kolisko.
There is an intersection of all these concepts in the Ethereum scaling proposal named Ethereum Plasma, written by Vitalik Buterin and Joseph Poon. Ethereum Plasma gives an exciting approach to the burning issue of scaling Ethereum, as we spoke a bit above.
Plasma is a mechanism for conducting off-chain transactions while relying on the underlying Ethereum blockchain to ground its security.
Imagine numerous private chains or side-chains are working simultaneously under one root chain: the Ethereum Main-Net. Those side-chains handle their own transactions, business logic, and economic activity. But, if there is some dispute, it can be “elevated” to the main chain for evaluation. This system would function as a supreme court jurisdiction where the Ethereum root chain would have the final say.
Can we try to emulate this?
The main takeaway is the following… The Main Ethereum blockchain has to be “off-loaded” to achieve bigger bandwidth and scaling possibility. This could be done by introducing side-chains. We asked ourselves, what if we would literally try “hacking” this concept with the tools that we have at hand and in the same process learn more in-depth about private chains, consensus algorithms and feasibility of use cases that we will talk later on. And that’s what we did…
This concrete implementation is inspired by Ethereum plasma improvement, which is not yet operational and brings a scalable solution to the Ethereum blockchain. A system of off-chains operates as a separate entity within the Ethereum ecosystem but uses the main net for dispute resolution in a proposed proof of fraud consensus.
Vividly it is explained as a system where the main net is the “Supreme Court”, and any conflicts or frauds can be taken from the off-chain to the main net for resolution.
We will try to build the concepts of the Ethereum Plasma improvement from scratch. We will make a private network, add business logic and facilitate a bridge to Mainnet as this will act as our single source of truth. For the sake of easier reference in the future, we have called our little project – Bonanza.
One of the main problems that Ethereum currently faces is the question of scale. Since scaling is a very general blockchain problem, as we explained above, we will focus on creating a blockchain solution that uses a private blockchain. We are not trying to invent hot water. We are simply trying to use existing technologies in the Ethereum space to fit our needs.
Private blockchains offer a quick solution to scalability. If there are fewer nodes and transactions on the network – the smaller the stress on the given network. We are sacrificing decentralization for more speed in this case.
With that in mind, to provide an even quicker solution to the biggest bottleneck – consensus algorithms, we will use Proof of Authority for our private blockchains.
If we build a private blockchain with Ethereum, we can still write DApps in the same way we already do on the Mainnet. But the end-users will get a little better/faster/cheaper user experience (and they won’t need real Ether).
The most exciting part of the solution is the bridge between the private network and Mainnet. We will talk about some different ways to solve that problem and offer code examples.
How we are going to store the result of our whole process on Ethereum Mainnet is a problem of smaller scope. The only important thing is that we store minimum needed information that is required to support the use case we are solving.
One simple use case we are trying to achieve is creating a blockchain-based game that runs on a private network, but NFT tokens that represent items (or whatever value) in the game can be traded on Ethereum Mainnet.
This concludes our “small” intro into what we will be doing throughout the series, so stay tuned for PART II as we dive deep into setting up our basis of Bonanza, and that is a Proof of Authority Private Ethereum Blockchain.