Hyperledger Besu, formerly known as Pantheon, is the latest project to join the hyperledger bandwagon and is the first project submitted on hyperledger that can operate on a public blockchain. Besu is a representation of the growing interest of enterprises to build public and permissioned network use cases for their applications. Hyperledger Besu has been positioned as a platform that enables open development and deployment. The design and architecture decisions of Hyperledger Besu have been aimed at modularity and clean interfaces.
What is Hyperledger Besu?
Hyperledger Besu is a Java-based open-source Ethereum client created under the Apache 2.0 license. It can be run both on the Ethereum public network or on private permissioned networks and test networks such as Rinkeby, Gorli, and Ropsten. Besu helps develop enterprise applications that require secure, high-transaction processing in a private network. The enterprise features supported by Besu are permissioning and privacy.
Hyperledger Besu is also an Ethereum client. An ethereum client refers to a node that verifies a blockchain and its smart contracts and everything else related to a blockchain. In other words, it is a software that implements the Ethereum protocol. So, what does an Ethereum client contain?
- Storage for persisting data related to transaction execution.
- APIs for application developers for interacting with the blockchain.
- An execution environment used for processing transactions in the Ethereum blockchain.
- Peer-to-peer networking to communicate with other Ethereum nodes to synchronize state.
What Hyperledger Besu Supports?
Besu supports Ethereum functionalities such as smart contract and DApp development, deployment, and operational use cases. The tools that enable these activities are Remix, Truffle, and web3j. The Ethereum client implements standard JSON-RPC APIs. This simplifies integration with ecosystem tooling. Besu includes a command-line interface and HTTP and Web socket-based APIs for running, monitoring, and maintaining nodes on an Ethereum blockchain.
Besu does not support key management owing to security issues. Instead, for managing private keys, you can use any Ethereum-compatible wallet or EthSigner. EthSigner provides access to the key store and signs transactions using tools like Microsoft Azure and Hashicorp Vault. Besu supports account permissioning and smart-contract-and-local-configuration-based node. Private transactions are also made available in the client through zero-knowledge methods.
So, what can you do with Besu?
The API of Hyperledger Besu supports typical Ethereum functionalities such as:
- Smart contract development.
- Ether mining.
- Decentralized application (DApp) development.
Features of Hyperledger Besu
Besu implements the Enterprise Ethereum Alliance (EEA) specification. This specification was established for creating common interfaces among Ethereum’s various open and closed source projects. This will ensure that users don’t have vendor lock-in and will also help create common interfaces for teams building applications. Besu makes sure that its enterprise features are in alignment with the EEA client specification.
The Notable Features of Hyperledger Besu are:
- Ethereum Virtual Machine (EVM)- It is the Turing complete virtual machine that enables deployment and execution of smart contracts through transactions within an Ethereum blockchain.
- Consensus protocols- Besu implements several consensus algorithms that are involved in block validation, transaction validation, and block production. The consensus algorithms of Besu are Proof-of-Authority and Proof-of-work.
- Storage- Hyperledger Besu uses a RocksDB key-value database for persisting chain data locally.
- Monitoring- Node and network performance can be monitored using Besu. Node performance is monitored through Prometheus or debug_metrics JSON-RPC API method. Network performance is monitored using Alethio tools like EthStats Network Monitor and Block Explorer.
- Privacy- Privacy in Besu refers to the ability to keep transactions between the involved parties safe and private. The private transaction manager of Besu implements privacy and does not allow other parties to access the transaction content, sending party, and the list of participating parties.
- Permissioning- Besu is a permissioned network that allows only specific nodes and accounts to participate by enabling account permissioning and/or node permissioning on the network.
Hyperledger Besu Architecture
Let us now discuss some of the significant elements of a hyperledger besu architecture.
1. Storage- In a storage setup, the data is divided into a few sub-categories, such as:
- Blockchain- This is comprised of ‘block headers’ that form the chain of data that is used to verify the blockchain state cryptographically. Block bodies contain the list of ordered transactions that are included in each block. Transaction receipts contain metadata related to transaction execution, and this includes transaction logs.
- World state- Every block header references a world state through a stateRoot hash. World state refers to a mapping from addresses to accounts. An Ether balance is maintained by externally owned accounts. Smart contract accounts additionally contain executable code and storage.
2. P2P networking- Besu implements Ethereum’s devp2p network protocols for inter-client communication and a sub-protocol for IBFT2:
- Discovery- A UDP-based protocol to find users on the network.
- RLPx- A TCP-based protocol that is used for communication between peers through sub-protocols. They are the ETH sub-protocol (Ethereum Wire Protocol) that is used to synchronize the blockchain state across the network and propagate new transactions and the IBF sub-protocol that is used by IBFT2 consensus protocol to facilitate consensus decisions.
3. User-facing APIs- Besu provides mainnet Ethereum and EEA JSON-RPC APIs over HTTP and WebSocket protocols and the GraphQL API.
- HTTP JSON-RPC service
- WebSocket JSON-RPC Service
Hyperledger Besu Consensus Protocols
Hyperledger Besu makes use of many Proof of Authority (PoA) consensus protocols. These are used when participants are known to each other, and there is a high level of trust between them, for example, in a permissioned consortium network. The types of PoA algorithms implemented by Hyperledger Besu are:
- Clique- This is used by the Rinkeby Testnet and can be used for private networks. In a Clique network, blocks and transactions are validated by approved accounts. These accounts are called signers. Signers will take turns to create the next block. The existing signers propose and vote to add or remove signers. Clique is more fault-tolerant than IBFT 2.0. Clique does not have immediate finality. Implementations using clique must be aware of chain reorganizations and the forks that occur. The properties that are specific to clique are:
- Blockperiodseconds- Block time in seconds.
- epochLength- Number of blocks following which the votes must be reset.
- extraData- Initial signers are specified after the 32 bytes that are reserved for vanity data.
- IBFT 2.0- This can be used for private networks. Here, blocks and transactions are validated by approved accounts called validators. Validators will take turns to create the next block, and a super-majority (greater than 66%) of validators are required to sign the block before it is inserted into the chain. Existing validators will propose and vote to remove or add validators. A majority vote (more than 50%) is needed to add or remove a validator. IBFT 2.0 needs four validators to be Byzantine Fault Tolerant.
- Proof-of-Work (Ethash)- This consensus protocol is used to carry out mining activities on mainnet Ethereum. A private network provides a configurable network that can be used for testing. Blocks can be created quickly by configuring low difficulty and enabling mining. The private network of hyperledger besu helps you test multi-block and multi-user scenarios before moving to one of the public testnets.
The Great Minds Behind Hyperledger Besu
Hyperledger Besu was launched in the year 2018 as Pantheon and the team that has made this possible is PegaSys, the protocol engineering team at ConsenSys. It is the primary contributor and maintainer of the codebase at the core of Hyperledger Besu. This Ethereum client was built with the aim of minimizing barriers to entry for enterprises and maintaining and scaling mainnet. They have now developed an activity community by using and building on the codebase. The PegaSys team is thrilled to work with the Hyperledger community, and they aim to continue their efforts towards strengthening the Hyperledger Besu platform.
To get instant news and updates about hyperledger certifications and in general, about other blockchain certifications, check out Blockchain Council.