What is Parity Ethereum?
Blockchain requires all participants of the underlying peer-to-peer network to run an implementation of the blockchain’s node software. Such software usually includes: the required protocols to propagate messages and transactions through the network, an implementation of the blockchain’s virtual machine, a database component used to store the blockchain data, and some interfaces that allow external software to interact with the blockchain. An example of such software is Parity Ethereum.
Parity Ethereum is an open-source software solution that allows an individual to run a node on the public Ethereum network, or any other blockchain network that uses the Ethereum protocol. The software constitutes an alternative to the Geth Ethereum client. While both Geth and Parity Ethereum are well-maintained and active projects, Parity Ethereum has obtained a reputation for performance and flexibility. It also adds some interesting features for consortium blockchains and enterprise solutions.
In this article, we will look at the general design of the Parity Ethereum client and discuss the additional features provided.
Parity Ethereum: Design and Implementation
In contrast to Geth, which is implemented in the Go programming language, Parity Ethereum is written in Rust, a modern system programming language designed for high-performance and security. Basing the two most popular Ethereum client implementations on different technologies is a conscious choice, reducing the risk of compiler or library vulnerabilities impacting the whole ecosystem.
Parity Ethereum has been designed in a modular way, in order to provide a useful piece of software for a number of scenarios. As such, it is relatively easy to replace the consensus mechanism used and connect to different types of Ethereum-based blockchain networks. Authentication modules and optional privacy features are aimed at the enterprise market, in which permissioned consortium blockchains are common. It is relatively easy to launch such a private network using Parity nodes.
Like Geth, Parity Ethereum provides a number of synchronization modes that allows for the configuring of trade-offs between the amount of transaction history validated and stored locally, and synchronization speed and hardware requirements.
Alternative Consensus Mechanisms
Parity Ethereum allows the consensus mechanism to be substituted through a pluggable engine model, which allows for the connecting of consensus algorithms that comply with a certain interface specification. The default consensus engine implements the Ethash proof of work algorithm, which is used by miners on the public Ethereum network.
A number of alternative consensus engines provide solutions aimed at consortium blockchains, test networks or local development solutions. The Instant Seal engine is a simple protocol included for test purposes. It allows for creating a local development network in which transactions are confirmed instantly.
While Instant Seal should only be used for development purposes, a validator set engine allows for more resilient configurations aimed at consortium blockchains. In such a setup, pre-defined validator nodes take turns in creating blocks. The Aura consensus protocol makes use of this feature and implements a protocol, which was initially advertised as an efficient alternative to voting protocols, such as the PBFT protocol carried over from pre-blockchain distributed systems research.
This type of protocol reaches fast consensus in networks with a small number of participants but scales badly due to communication overheads. While Aura significantly improves the performance of consensus protocols by cutting out communication overhead, a recent security analysis by two European universities has found that it does not provide the same integrity guarantees in all scenarios. However, the protocol is still a good choice in a number of enterprise use cases.
As already mentioned, Parity Ethereum can be used in a consortium blockchain, in which only known nodes participate. To this end, Parity adds a relatively fine-grained permissioning system. The already mentioned validator sets are one aspect of permissioning. Additional configurations include which nodes may connect to the network and the type of transactions an account can submit.
Public blockchains provide transparency at the expense of privacy. For this reason, enterprise solutions often rely on particular implementations that provide additional privacy features. Parity Ethereum implements a number of such features, the first of which is called the secret store. This component consists of a key sharing scheme that allows for encrypting externally stored documents. Nodes can be configured to hold a portion of the decryption key. A configurable minimum number of key segments are required to decrypt the document, preventing any single node from having sole access. Access to the document can be configured on an account basis via a smart contract.
Another privacy feature can be found in the support for private transactions. Private transactions build on the secret store introduced above. A private smart contract can be interacted with by authorized parties, and authorized validators sign off the confidential transactions resulting in state changes of the private smart contract. The role of the secret store is to provide access to the key used for the private smart contract encryption.