June 09, 2021

How to run a Hyperledger Besu node

Overview

As the Ethereum network continues to grow, the need for an enterprise-ready Ethereum client arises. Hyperledger Besu is an enterprise-friendly Ethereum client that can implement both public and private permissioned networks. This guide will cover the requirements to run Hyperledger Besu and explain how to run Hyperledger Besu.

What is an Ethereum client?

An Ethereum client is an implementation of Ethereum’s technical specifications for a specific use case and in a particular programming language. Ethereum clients can be different from each other in several ways; still, they all have the same set of fundamental features. Each is capable of joining the peer-to-peer Ethereum blockchain, synchronizing a local copy of the blockchain, broadcasting a transaction over the blockchain network, and creating and managing accounts. Users interact with the blockchain through client interfaces, and code libraries JSON API does the same. 

The following are the most popular and Widely used Ethereum clients.

  • Geth - Go implementation.
  • OpenEthereum - Rust implementation.
  • Nethermind - C#, .NET implementation.
  • Besu - Java implementation.
  • Trinity - Python implementation.

What is Hyperledger Besu?

Hyperledger Besu is an Ethereum client which is built for enterprise use. Besu is a Java-open-source-based client created under Apache 2.0 license. Just like other clients, Besu is compliant with Ethereum Yellow Paper. It can run on the Ethereum mainnet or a private permissioned network. It also has support for testnets such as Rinkeby, Ropsten, and Görli. Besu includes several consensus algorithms including PoW, PoA, and has comprehensive permissioning schemes explicitly designed for consortium environment uses. As it is implemented in Java, it has a robust codebase. Besu helps enterprises make secure and high transaction processing applications on a private network. 

Following are some notable features of Hyperledger Besu:
  • Storage: It uses RocksDB key-value database to store chain data locally.
  • Monitoring: Node and Network performance monitoring.
  • 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.
  • EVM (Ethereum Virtual Machine)

Hardware & Software requirements

System requirements for Besu differ on the type of network we are willing to sync to.

The first and foremost requirement is Disk space, Fast synchronization, which has pruning enabled, requires 750GB of disk space, and full synchronization, which has pruning disabled by default, requires approximately 3TB of disk space.

VM (Virtual Machine) requirements:
If you set up a virtual machine using a VM manager such as VirtualBox, the following are the recommended attributes to create VM.

  • Memory Size: 4096 MB (recommended)
  • Virtual hard disk at least 10 GB (20 GB recommended)
  • Virtual hard disk file type: VDI (if you need to share it with other apps, use VHD)

Java JDK: Besu requires Java 11+ installed on the system.

Note: For Windows, Besu is currently only supported on 64-bit versions of windows and requires the 64-bit version of JDK/JRE. 

Running Besu node

The first step here would be to Install the Besu client on your system.

To Install Besu on:

macOS: Using Homebrew.

sh 
$ brew tap hyperledger/besu

sh 
$ brew install hyperledger/besu/besu

Note: macOS High Sierra 10.13 or later versions required.

Linux/Windows: Download the latest binary release and run the binary after unpacking the binary.

The binary is located in 

sh 
$besu-<release>/bin/besu

You can check if it’s installed correctly by checking the version. 

sh 
$ besu --version

You can start your mainnet node by simply typing 

$ besu

The node will start syncing the blockchain and it may take a while depending on the internet connection.

You can specify a network type by using --network flag

For example, if you want to run a ropsten node

$ besu --network=ropsten

--network=dev for local blockchain like ganache

Note: The state of the blockchain will be saved in the same directory where you ran besu, so when you switch network it will overwrite the previous state, you can run besu in different directory for a different network.

Additional flag configuration

Here are some helpful flags you can run your Besu node with, based on the requirement.

  • To see other flags and some useful commands:

$ besu --help

  • To run the node with JSON RPC HTTP service enabled:

$ besu --rpc-http-enabled

  • To run the node with JSON RPC WebSocket service enabled:

$ besu --rpc-ws-enabled

  • To enable mining on the node (set FALSE by default):

$ besu --miner-enabled

  • To specify number of blocks to be considered for eth_gasPrice (default is set to 100):

$ besu --api-gas-price-blocks

  • To enable legacy Eth/64 fork id (default is set to false):

$ besu --compatibility-eth64-forkid-enabled

  • To start GraphQL HTTP service:

$ besu --graphql-http-enabled

  • To set Logging verbosity level  (Logging verbosity levels: OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE, ALL):

$ besu --logging=<LOG VERBOSITY LEVEL>

  • To set the minimum gas price in Wei for a transaction to be included in the block:

$ besu --min-gas-price=<minTransactionGasPrice>

  • To enable pruning that removes the old state (default is false):

$ besu --pruning-enabled

  • To set the sync mode as FAST or FULL (default is FAST if a --network  is supplied and privacy is enabled. FULL otherwise):

$ besu  --sync-mode=<MODE>

  • To set the maximum number of pending transaction hashes that will be kept in the transaction pool (default is set to 4096):

$ besu   --tx-pool-hashes-max-size=<INTEGER>

  • To specify a maximum number of pending transactions that will be kept in the transaction pool:

$ besu  --tx-pool-max-size=<INTEGER>

Conclusion

Congratulations on launching your very own Hyperledger Besu node! You can refer to Hyperledger Besu’s official documentation for further details.

Subscribe to our newsletter for more articles and guides on Ethereum. If you have any feedback, feel free to reach out to us via Twitter, or on our Discord community server, featuring some of the coolest developers you'll ever meet :) 
Ready to try QuickNode? Start your 7-day free trial

Related articles 7

Jun 9, 2021 How to install and run a Prysm Beacon node

Even if you're a newbie, rookie, or a pro in Ethereum it really excites all of us to see these developments in Ethereum. Whether it's all the hard forks like Istanbul, Atlantis, etc. or the development of Ethereum 2.0 - there is a lot to keep up with.In this...

Continue reading
Jun 9, 2021 How to run Expedition Block Explorer

In this article, we will talk about how to install and run the Expedition Ethereum Block explorer. While playing with the Ethereum blockchain network one might need to look up transactions, tokens, addresses, or prices. To accomplish these...

Continue reading
Jun 9, 2021 How to install and run a Geth node

Ethereum nodes are computers participating in Ethereum blockchain network. These nodes are actual computers running software that verifies, stores, and sometimes creates blocks. The actual software is called a "client," and it allows us to interact with the blockchain...

Continue reading
Jun 9, 2021 How to run Nethermind node

To run an Ethereum node without any problems, it is essential to choose a good node client. Nethermind is one of the oldest and most trusted Ethereum node clients. In this guide, let’s see how we can launch a Nethermind node.

Continue reading
Jul 3, 2021 How to Run a Binance Smart Chain Node

Binance Smart Chain, BSC for short, is a blockchain that seeks to provide both an alternative and extension to the Ethereum Blockchain. It has done this through several clever implementations that took place during the building of the platform. This guide will walk you...

Continue reading
Jun 9, 2021 How to run a OpenEthereum (ex-parity client) Node

Ethereum nodes are computers participating in Ethereum blockchain network, these nodes are actual computers running software that verifies, stores, and sometimes creates blocks. The actual software is called a "client" and it allows us to interact with the blockchain...

Continue reading
Jun 9, 2021 Ethereum full node vs archive node

If the Ethereum network is to be seen as a globally distributed computer, then nodes provide computational power and resources to this computer. In this guide, we’ll understand more about Ethereum full nodes and archive nodes then explore the difference between...

Continue reading