Cointime

Download App
iOS & Android

How To Configure Ethereum Node?

Validated Project

In a previous blog, we discussed the concept of nodes in the blockchain. In this blog, I will guide you through configuring an Ethereum node.

Ethereum Node

A node in Ethereum consists of two components: execution client and consensus client.

The execution client (Execution Engine, previously called Eth1 client) listens to new transactions broadcasted in the network, executes them in EVM, and holds the latest state and database of all Ethereum data. Geth, Nethermind, Hyperledger Besu and Erigon are currently available execution clients.

The consensus client (Beacon Node / CL client, previously called Eth2 client) implements the proof-of-stake consensus algorithm, which enables the network to achieve agreement based on validated data from the execution client. Lighthouse, Lodestar, Nimbus, Prysm and Teku are some of the available consensus clients.

Prior to the merge Ethereum nodes consisted of only the execution layer which took care of Proof of Work consensus also. The merge finalized the transition of consensus from proof of work(PoW) to proof of stake(PoS). The PoS consensus-related tasks were managed by the consensus client, and deprecated the PoW functionality in the execution client.

In this short tutorial, I will demonstrate how to configure an Ethereum client in Ubuntu 20.04.4. We will use Hyperledger Besu as the execution client and Lighthouse as the consensus client. You may use any combination of execution and consensus clients.

Installation

Java Installation

Since besu is based on Java, ensure you have Java installed. If not, update and install Java using the below commands.

sudo apt update
sudo apt install openjdk-17-jdk

Ensure that Java has been installed successfully by doing a version check.

java --version

Besu Installation

Download the latest version of binaries from https://github.com/hyperledger/besu/releases. Here I am using Hyperledger Besu 23.1.2.

wget https://hyperledger.jfrog.io/hyperledger/besu-binaries/besu/23.1.2/besu-23.1.2.zip

The above command will download the compressed folder. Once the download is complete, unzip the contents into a new folder named besu.

If you do not have unzip command, install using apt install unzip

unzip besu-23.1.2.zip -d besu

Switch to the besu folder and list the files to confirm the installation.

cd besu
ls

Switch to the besu subfolder and confirm the besu version using the command.

./bin/besu --version

To change the command from ./bin/besu to besu, we should provide the full path of besu’s bin directory in the environment file. First, use the below command to display the full path of besu (present working directory) and copy it.

pwd

Next, open the environment file using the command

sudo nano /etc/environment

and append the copied path(including the bin folder) at the end of the current data.

Note: Editing the environment variable can also be done by the command:

echo ‘export PATH=$PATH:/root/besu-23.1.2/bin’ >> ~/.bashrc

Now restart the system.

Can’t wait till your system restarts? Just give the command

source /etc/environment in the terminal, it will refresh the system environment only for the open terminal.

Confirm the changes are complete by checking the version.

Install Lighthouse

Download the latest version from this link, extract the contents, or use the commands below.

wget https://github.com/sigp/lighthouse/releases/download/v4.0.1/lighthouse-v4.0.1-x86_64-unknown-linux-gnu.tar.gz
tar -xvf lighthouse-v4.0.1-x86_64-unknown-linux-gnu.tar.gz 

To change the command from ./lighthouse to lighthouse, edit the environment file as described previously.

JWT Token Generation

The execution and consensus clients authenticate each other using a 32-byte hexadecimal value called JSON Web Token (JWT secret). Before configuring the clients, let’s create the token.

You may also create it using any generator like seanwasere generator. Some clients have an inbuilt facility for token generation. You can also create a random number yourself.

I am using OpenSSL, a toolkit for cryptographic functions, to generate the token. It will be available by default in most Linux versions. If you do not have OpenSSL, please check this link for installation guidelines: https://www.openssl.org/source/.

openssl rand -hex 32 | tr -d "\n" > jwtsecret.hex

The secret code will be available in the file jwtsecret.hex.

Starting the execution client

To start the execution client, we need to specify some configuration attributes. For this, create a config.toml and copy the below content.

network="MAINNET"
data-path="./data"
rpc-http-enabled=true
rpc-http-host="0.0.0.0"
rpc-http-cors-origins=["*"]
rpc-ws-enabled=true
rpc-ws-host="0.0.0.0"
host-allowlist=["*"]
engine-host-allowlist=["*"]
engine-rpc-enabled=true
engine-jwt-secret="./jwtsecret.hex"

The configuration specifies the path to store synced data, enables HTTP and web socket communications from external sources and allows engine API services (intercommunication between execution and consensus layers).

Use the below command to start besu.

Make sure that you are in the folder containing config.toml.

besu --Xlauncher

From the terminal information, note the Engine port (8551). Next, we can configure the consensus client to connect with this execution client.

Starting the consensus client

Open a new terminal in the same location and use the below command.

lighthouse bn 
  --network mainnet 
  --execution-endpoint http://localhost:8551 
  --execution-jwt ./jwtsecret.hex 
  --checkpoint-sync-url https://sync-mainnet.beaconcha.in/  
  --disable-deposit-contract-sync 
  --http 
  --purge-db

It will instruct the lighthouse to try to connect with the present execution client, running at port number 8551. The checkpoint sync endpoints are available here. You may use any endpoints for syncing. The deposit contract syncing is disabled since we are not participating in staking. If the consensus client is stopped and restarted, there can be some errors with checkpoint syncing; the purge-db flag is used to deal with this situation.

According to the network, the time taken for syncing will be different. You can use the testnets goerli or sepolia, where the sync times are shorter. To switch to test networks, update the network parameter and checkpoint-sync-endpoints.

Within a short time, Besu and Lighthouse can connect. The clients will try to sync with the other peers in the network. The updates will be visible in the terminal.

Output Terminal of Besu
Output Terminal of Teku

Can you identify the sync mode which we are using? Running a full node can be heavy since the hardware/software requirements to manage it effectively can only be met with effort.

There are various methods to interact with the running node. Application Programming Interfaces (APIs) define methods to query a node. This will be covered in the next blog. Stay tuned.

References

[1] https://lighthouse-book.sigmaprime.io/intro.html

[2] https://besu.hyperledger.org/en/stable/

[3] https://ethereum.org/en/developers/docs/nodes-and-clients/#why-should-i-run-an-ethereum-node

(By Sumi Maria Abraham, Research & Development Engineer, Kerala Blockchain Academy)

Read more: https://kbaiiitmk.medium.com/how-to-configure-ethereum-node-152436897536

Comments

All Comments

Recommended for you

  • American Bitcoin's Bitcoin reserves have increased by approximately 623 BTC in the past 7 days, bringing its current holdings to 4941 BTC.

    Emmett Gallic, a blockchain analyst who previously disclosed and analyzed the "1011 insider whale," posted on the X platform revealing updated data on the Bitcoin reserves of American Bitcoin, a crypto mining company supported by the Trump family. In the past seven days, they increased their holdings by about 623 BTC, of which approximately 80 BTC came from mining income and 542 BTC from strategic acquisitions in the open market. Currently, their total Bitcoin holdings have risen to 4,941 BTC, with a current market value of about 450 million USD.

  • The US spot Ethereum ETF saw a net outflow of $19.4 million yesterday.

    according to TraderT monitoring, the US spot Ethereum ETF had a net outflow of 19.4 million USD yesterday.

  • Listed companies, governments, ETFs, and exchanges collectively hold 5.94 million Bitcoins, representing 29.8% of the circulating supply.

    Glassnode analyzed the holdings of major types of Bitcoin holders as follows: Listed companies: about 1.07 million bitcoins, government agencies: about 620,000 bitcoins, US spot ETFs: about 1.31 million bitcoins, exchanges: about 2.94 million bitcoins. These institutions collectively hold about 5.94 million bitcoins, accounting for approximately 29.8% of the circulating supply, highlighting the trend of liquidity increasingly concentrating in institutions and custodians.

  • The Bank of Japan is reportedly planning further interest rate hikes; some officials believe the neutral interest rate will be higher than 1%.

    according to insiders, Bank of Japan officials believe that before the current rate hike cycle ends, interest rates are likely to rise above 0.75%, indicating that there may be more rate hikes after next week's increase. These insiders said that officials believe that even if rates rise to 0.75%, the Bank of Japan has not yet reached the neutral interest rate level. Some officials already consider 1% to still be below the neutral interest rate level. Insiders stated that even if the Bank of Japan updates its neutral rate estimates based on the latest data, it currently does not believe that this range will significantly narrow. Currently, the Bank of Japan's estimate for the nominal neutral interest rate range is about 1% to 2.5%. Insiders said that Bank of Japan officials also believe there may be errors in the upper and lower limits of this range itself. (Golden Ten)

  • OKX: Platform users can earn up to 4.10% annualized return by holding USDG.

    According to the official announcement, from 00:00 on December 11, 2025 to 00:00 on January 11, 2026 (UTC+8), users holding USDG in their OKX funding, trading, and lending accounts can automatically earn an annualized yield of up to 4.10% provided by the OKX platform, with the ability to withdraw or use it at any time, allowing both trading and wealth management simultaneously. Users can check their earnings anytime through the OKX APP (version 6.136.10 and above) - Assets - by clicking on USDG. Moving forward, the platform will continue to expand the application of USDG in more trading and wealth management scenarios.

  • The Federal Reserve will begin its Reserve Management Purchase (RMP) program today, purchasing $40 billion in Treasury bonds per month.

     according to the Federal Reserve Open Market Committee's decision on December 10, the Federal Reserve will start implementing the Reserve Management Purchase (RMP) program from December 12, purchasing a total of $40 billion in short-term Treasury securities in the secondary market.

  • Bitcoin treasury company Strategy's daily transaction volume has now surpassed that of payment giant Visa.

    according to market sources: the daily trading volume of Bitcoin treasury company Strategy (MSTR) has now surpassed the payment giant Visa.

  • The US spot Bitcoin ETF saw a net outflow of $78.35 million yesterday.

    according to Trader T's monitoring, the US spot Bitcoin ETF had a net outflow of $78.35 million yesterday.

  • JPMorgan Chase issues Galaxy short-term bonds on Solana network

     JPMorgan arranged and created, distributed, and settled a short-term bond on the Solana blockchain for Galaxy Digital Holdings LP, as part of efforts to enhance financial market efficiency using underlying cryptocurrency technology.

  • HSBC expects the Federal Reserve to refrain from cutting interest rates for the next two years.

    HSBC Securities predicts the Federal Reserve will maintain interest rates stable at the 3.5%-3.75% range set on Wednesday for the next two years. Previously, Federal Reserve policymakers lowered rates by 25 basis points with a split vote. The institution's U.S. economist Ryan Wang pointed out in a report on December 10 that Federal Reserve Chairman Jerome Powell was "open to the question of whether and when to further cut rates at next year's FOMC press conference." "We believe the FOMC will keep the federal funds rate target range unchanged at 3.50%-3.75% throughout 2026 and 2027, but as the economy evolves, as in the past, it is always necessary to pay close attention to the significant two-way risks facing this outlook."