A comparative analysis of Ethereum and Hyperledger: the road to mainstream adoption

Riccardo Biosas
BrikkApp
Published in
10 min readAug 19, 2019

In our introduction to the technicalities of the blockchain ecosystem, we pointed at two main types of implementation: public and private. On top of that, we also mentioned the concept of turing-completeness and how it’s related to the capability of the supported smart contracts to perform complex logics, from financial functions to automated adjudication processes.

The two main representatives to the categories of turing-complete public blockchains and turing-complete private and consortium blockchains that have stirred the most interest are ethereum and the hyperledger project.

Ethereum

Ethereum was first devised in the late 2013, and it was the first public blockchain to generalize its core protocol beyond the scope of cryptocurrency issuance. Unlike bitcoin, ethereum’s built-in currency, ether, is not primarily designed to be a digital currency for a new worldwide payment system, but as an internal commodity that fuels its DApp ecosystem.

source

DApps are decentralized applications, and in ethereum every DApp transaction is paid in ether. The main rationale behind this choice lies in the public nature of its network. Ethereum is pseudonymous and open to everyone, which exposes it to a huge attack surface. An anonymous malicious actor could clog the ethereum blockchain by sending numerous requests to the DApps on top of it or to do some other form of computation. Such a spam threat is prevented by making it so every computation that is performed on the network costs money. This would eventually result in our attacker desisting from broadcasting spam transactions because it would become too expensive on the long term.

As clever as this architectural choice is, this has not averted non-malicious network congestions in many instances due to ethereum’s currently limited transaction throughput. This bottleneck is forecasted to be addressed in the future, when new scalability solutions (both on-chain and through side-chains) will be implemented. Sharding, plasma and other sidechains are some of the proposed scaling solutions that are currently under heavy development. They’re, however, not a panacea, since they might pose either security or centralization risks to ethereum, and they’re far from being a well-tested technology.

Scalability won’t be the only focus of ethereum’s future upgrades. The protocol underlying both its economic incentives model and consensus mechanism will soon be revolutionized as well.

Ethereum currently implements a flavor of proof-of-work, but it will eventually switch to proof-of-stake in the future in order to be more energy-efficient.

In general, in proof-of-work the pool of validators, also called miners, is required to perform complex computations in a race to be the first to solve a cryptographic puzzle. The reward for winning such a computational race is monetary and ensures that the validators are provided with an economic incentive to participate in the consensus mechanism, which safeguards the consistency of the network. Proof-of-work, however, has proven to be extremely wasteful in terms of energy consumption.

In proof-of-stake the validators, usually called forgers, are also rewarded, but, rather than solving computationally demanding puzzles, they stake part of their tokens as a requirement to participate in the consensus protocol. The likelihood to be the recipient of a monetary reward is roughly proportional to how much tokens have been deposited in the stake.

An in-depth review of all the various flavors of consensus mechanisms is beyond the scope of our current article. Follow our account to be notified when we’ll proceed delving further into the nitty-gritty of consensus protocols, cryptoeconomics and mechanism design.

Hyperledger projects

The hyperledger project originated when the concept of blockchain started gaining traction among private tech-corporations. It’s not a single blockchain, but an umbrella of projects hosted by the linux foundation in partnership with different companies, which provide modular blockchain architectures and tools tailored for the specific needs of enterprise use-cases. In fact, the hyperledger projects are divided in frameworks, which are the actual blockchain platforms, and tools, which are instruments that aim to streamline the development process of the chosen hyperledger framework.

source

In our current article we’ll give a general introduction to the features of the hyperledger project and how it differs from ethereum and other public blockchains. Among the various hyperledger frameworks, the most mature from a development viewpoint is hyperledger fabric, which is one of the reasons why it’s the platform of choice here at BrikkApp.

In the future, we will endeavor in a much more in-depth analysis of fabric’s design and peculiarities and how it distinguishes itself from other hyperledger platforms such as sawtooth, indy and burrow.

The hyperledger ecosystem

Each hyperledger’s tool has a different purpose that varies from implementing different deployment models, facilitating the execution of smart contracts and benchmarking the performance of the network to adding new features such as interoperability with other blockchain frameworks.

The modularity ethos that characterizes the hyperledger project is extended even further: the hyperledger blockchain frameworks are usually partitioned into relatively independent components that can be replaced with alternative modules which serve the same purpose.

Consensus protocols in hyperledger

The chosen framework’s consensus protocol is one of the main customizable components. Each enterprise grade blockchain use-case comes with different trust relationships between its specific participants: the pluggable consensus approach is designed exactly to address the nuances of the spectrum of trust in the most tailored way possible. It’s therefore possible to implement both consensus protocols that are similar in nature to public-blockchains, also called pBFT — practical byzantine fault tolerance-, or quasi-centralized.

Practical byzantine fault-tolerance is designed to survive byzantine failures, but it doesn’t require economic incentives since all the identities of the network’s actors are known.

Byzantine failures are a particular class of failures in a distributed system, where a single node is an unreliable source of truth on the state of the network and may act in the pursuit of its own self-interest at the expense of the overall network’s consistency. On the other end of the spectrum of failure modes, we have non-malicious failures, where a failure is not caused by the intentional behavior of a node, but due to causes such as hardware crashes and network latency.

Quasi-centralized consensus is less secure and it’s mostly resilient against non-malicious failures. It is, however, much more efficient and provides better performance. In a quasi-centralized consensus a single entity, or a very restricted pool of actors, is responsible for ordering and broadcasting transactions whose validity is cryptographically checked by other nodes in the network — also called endorsers.

Channels in the network

Furthermore, the defined consensus protocol is not as overarching as in ethereum: hyperledger’s networks are further segmented into channels. A channel can be regarded as a partition of the network which is governed by a different rule-set defined by two other fundamental customizable components: the identity service and the policy service. The identity service not only defines the roles played by the various actors in the networks — whether they are validators, endorsers or peers-, but also establishes the memberships to the specific sub-channels. On the other hand, the rule-set that characterizes the aforementioned channels is defined in the blockchain framework’s policy service. One of the use-cases of the identity service and policy service modules is, for instance, the enforcement of private transactions among a subset of network participants.

The combination between all the different flavor of blockchain frameworks and the vast array of tools empower developers to create customized tech-stacks able to meet the most specific requirements of enterprise solutions.

The key differences between the hyperledger projects and ethereum

Over the course of the last few years, the word blockchain has been indelibly linked with the idea of cryptocurrency by an often lazy press coverage. As much as it is true that cryptocurrency issuance is just one of the numerous applications of blockchain as underlying technology stack, in the case of public blockchains the two concepts are deeply intertwined. As we’ve concluded in the ethereum chapter, public blockchains need economic incentives to ensure the security of their networks. Especially in turing-complete public blockchains, attackers can spam the network with never-ending loop-based computational requests that would halt the flow of transactions. These attacks are a form of the more commonly known DoS — denial of service. Economic incentives aren’t meant solely to make DoS financially infeasible , but also to incentivize desired behaviors in the users of the network, such as, in the case of proof-of-work blockchains, participating in the block generation process as honest miners. So, in a public blockchain, a digital currency is not only its main value proposition, but a vital component of its network governance and security as well.

In private blockchains, the security concerns are such that cryptoeconomic incentives are not as fundamental, if not superfluous.

On-chain assets

Therefore, the first noteworthy difference from ethereum is that the hyperledger project has decoupled the notion of distributed ledger from the asset that is built on top of it. Such a currency-agnostic approach allows to perform transactions within the network with no fees and more freedom to model any type of asset on top of the network.

Transaction confidentiality

Furthermore, as we’ve mentioned previously, hyperledger’s transactions can be confidential, whereas ethereum’s global state, which keeps track of the mapping between all its network’s addresses and respective account balances, is ubiquitously public. While a fully transparent transactions history enables everyone to verify the consistency of its log history and makes possible a trustless financial ecosystem, it doesn’t always sit well with regulatory frameworks and the specific transactional needs of consortiums of corporations. Hyperledger’s capability to compartmentalize the transaction flow into channels with ad-hoc policies and restricted membership allows a more fine-grained control over the underlying consensus protocol and it’s one of the pivotal features that makes it compliant with regulations such as GDPR.

Scalability

The channelization of the transaction flow makes it so not all nodes need to achieve consensus on the order of a transaction at the same time, but at first only that specific transaction’s involved parties will be required to reach an agreement. This segmentation of a hyperledger framework’s is paired with a permissioned mode of participation to the consensus process where nodes play different roles in the transaction life cycle and maintenance of network consistency. The specificities with which nodes partake in the consensus protocol depend also on the selected hyperledger framework. For instance, in hyperledger fabric these roles are divided in orderers, endorsers and peers. Peers are the recipients of ordered sets of transactions, which they then commit to the network. Endorsers check the cryptographic signatures of a transaction to verify that is consistent with the state of the ledger. Finally, orderers ensure that the same logical order is broadcasted to the peers. Such a permissioned and modular approach benefits the overall scalability of the network, which is the upper bound of transactions that can be processed in a given time-frame. This is different from ethereum, where the roles played by the nodes that partake in the consensus protocol are identical, at the expense of its transaction throughput.

Smart contracts and chaincode

At the beginning of the article, we’ve stated that both ethereum and hyperledger frameworks are turing complete. In hyperledger, smart contracts are called chaincode and, unlike ethereum’s smart contracts, don’t require fees to be executed. Chaincodes are developed with existing programming languages, whereas in ethereum smart contracts are developed with newly designed domain-specific languages such as solidity and vyper. In the case of hyperledger fabric, the most well-supported language for the development of chaincode is golang. The execution of smart contracts in ethereum is always processed by the ethereum virtual machine, a stack-based runtime environment that executes all the programs broadcasted in the network. Notably, in the hyperledger ecosystem, the framework hyperledger burrow provides a permissioned version of the ethereum virtual machine as one of its main components, so that interoperability with ethereum’s smart contracts is made possible. As for the rest of the hyperledger projects, the instantiation and deployment of chaincode depend on the specific components of that framework’s architectures, and they can be streamlined with hyperledger tools such as hyperledger composer and hyperledger transact.

Conclusion

In summary, ethereum appears to be the dominant platform for general-purpose applications that are meant to be deployed and used in public pseudonymous networks and, at the moment, can tolerate a relatively low transaction throughput. In the struggle for enterprise adoption, however, hyperledger is the clear winner, thanks to the flexibility and high-performance provided by its modular design philosophy which can satisfy the most nuanced application-specific requirements.

Nevertheless, what we can most likely expect from the future is that the distributed ledger landscape won’t be dominated by a single hegemonic platform, but it will be a rich and diversified ecosystem of different coexisting technology stacks. In this ecosystem, both hyperledger and ethereum are poised to be key players for distinct use-cases.

One of those use-cases will be innovating and democratizing the real estate market. At BrikkApp we’ve decided to leverage the hyperledger technology to boost the transparency of the property investment market and tokenize real estate assets. Follow our medium account to be kept up-to-date on our future platform developments and to read more technical insights on the blockchain ecosystem.

--

--

Riccardo Biosas
BrikkApp

Principal Security Engineer @Procore | Founder @AgorApp | prev. Protocol Engineer@LivepeerOrg & Fullstack/Lead Smart Contract Dev @Opium_Network