🚀 Investors Wanted! 📈

Join us in our journey to innovate blockchain technologies. Let's shape the future together.

Learn More Contact Us
logo
10 November 2023

How To Set Up A Ethereum Node

Chaingateway
Chaingateway
page.title
Chaingateway
Chaingateway

Ethereum nodes are computers that participate in the Ethereum blockchain network to verify, store, and create blocks. To do this, they rely on software called the client that lets users interact with the blockchain via the JSON-RPC API. Users can parse and verify the blockchain while being able to read or write smart contracts.

Requirements

Hardware requirements vary by client. However, they are not that high, as the node only needs to remain synced. Before you install a client, please ensure you have the right resources to run it. The minimum requirements are:

  • CPU with 2+ cores
  • 8 GB RAM
  • 2TB SSD
  • 10+ MBit/s bandwidth

Recommended Requirements:

  • Fast CPU with 4+ cores
  • 16 GB+ RAM
  • Fast SSD with 2+TB
  • 25+ MBit/s bandwidth

All clients support all three main operating systems, which are Linux, MacOS, and Windows.

Running a Node – Local or Cloud

You can run an Ethereum node on a local computer or a cloud server like Cryptonodes.io, Alchemy, Blockdaemon, or QuickNode. However, to ensure censorship resistance, users should run their nodes on local hardware. Plug and Play The simplest solution for a local node is a plug-and-play box. These pre-configured machines offer a simple node experience. You buy one, connect it, and run it. The boxes feature an intuitive guide and a dashboard to monitor and control the software. Two options you can try are:

  • DappNode
  • Avado

Ethereum on a Single-Board Computer

You can run an Ethereum node on a single-board computer, such as an ARM architecture like Raspberry Pi. If you wish to do this, you can find easy-to-run images of multiple execution and consensus clients for Raspberry Pi and other ARM boards on Ethereum on ARM. However, these boards have limited performance.

Setting up the Node

The client setup can be done via automated launchers or manually by setting up the software yourself. Using a launcher is recommended for less advanced users. For advanced users, the setup guide is easy to follow.

Setup Guide

Some of the best launchers out there that have automated the client setup process are:

  • DappNode It does not come with a machine from the vendor. Instead, the software, node launcher, and control center can be used on any hardware.
  • eth-docker This is an automated setup using Docker for easy and secure staking. Users need a basic terminal and Docker know-how. It is best suited to advanced users.
  • Stereum This is a launcher to install clients on a remote server using an SSH connection with a GUI setup guide, control center, and many more features.
  • NiceNode It is a launcher with a simple user experience to run a node. To use it, pick your client and start it up in a few clicks.
  • Sedge This is an automated node setup tool that will generate a Docker configuration using the CLI wizard and is written in Go by Nethermind.

Manual Clients Setup

You have the option to download, verify, and configure the client software yourself. A manual setup offers more versatility. To run the node, you will need to run a pair of consensus and execution clients. Some clients have a light client and sync without requiring any software. However, full trustless verification needs both implementations.

The Client Software

The first step is to download your preferred execution client and consensus client software. You can download an executable application or an installation package that suits your architecture and OS. Ensure you verify the signatures and checksums of the packages you download. Some clients come with repositories or Docker images for easy installation and updates. All clients are open-source, which means you can build them from the source. While this is more complex, it may be required. The instructions for each client are provided in the documentation for the client lists link above. Execution clients

  • Besu
  • Erigon (Does not offer a pre-built binary; it has to be compiled)
  • Geth
  • Nethermind

The client diversity is an issue on the execution layer. Consequently, readers should consider running a minority execution client. Consensus clients

  • Lighthouse
  • Lodestar (Does not come with a pre-built binary, only a Docker image or build one from source)
  • Nimbus
  • Prysm
  • Teku

Client diversity y is crucial for consensus nodes that run validators. If all validators are running a single client implementation, it places the network’s security at risk. It is therefore recommended to pick a minority client.

Verifying Software

When you download software from the internet, you should verify its integrity. It is one of the potential attack vectors when operating an Ethereum node. When you download a pre-built binary, ensure you trust it and take the risk that an attacker could swap the executable for a malicious program. Developers will sign their binaries with a PGP key to allow users to cryptographically verify they are running the correct software. To do this, obtain the public key from the developer in the client release pages or the documentation. You can then use a simple PGP implementation such as GnuPG to verify them. You can also use the hash and cryptographic fingerprint of the software and check that it matches the one given by the developers. It is easier than PGP, and some clients come with just this option. All you need to do is run the hash function on the software and compare it with the one from the release page.

Client Setup

Once you install, download, or compile the client software, you can run it. It means that it has to be executed in the right configuration. There are numerous configuration options offered by clients, which enable various features. Sync modes are one of the most important features which can affect client performance and data usage. They represent the various methods of downloading and validating blockchain data. You must decide what network and sync mode you will use before starting a node. The things that you will consider are the disk space and sync time needed. If the default sync mode of the client does not suit your needs, pick another one based on cost, security level, and available data. You also have the option to set up pruning of old data. Pruning removes outdated data, such as state trie nodes, which are unreachable from recent blocks. Starting The Execution Client Before you start up the client software, perform a last check to ensure everything is ready. This includes checking disk space, memory, and CPU state, OS is updated, System time and data, and that your router and firewall accept connections on listening ports. To ensure everything is okay, run the client on the testnet first. Running An Execution Client Below is an example of a basic configuration to start an execution client. Running Geth The example starts Geth on the mainnet, stores data at /data/ethereum, enables JSON RPC, and defines the allowed namespaces. Additionally, it enables authentication for connecting consensus clients, which requires a path to jwtsecret, and the option defining which connections are allowed. In this example, only from localhost. 1 geth –mainnet
2 –datadir “/data/ethereum”
3 –http –authrpc.addr localhost
4 –authrpc.vhosts=”localhost”
5 –authrpc.port 8551 6 –authrpc.jwtsecret=/path/to/jwtsecret

You can learn more about running Geth with a consensus client here. The execution client will start its core functions, pick endpoints, and begin searching for peers. Once it discovers peers, it will start syncing. The execution client will then wait for a connection from the consensus client. The current blockchain data will be available when the client has synced to the current state. Starting The Consensus Client A consensus client has to be started with the correct port configuration to establish a local RPC connection to the execution client. It has to be run with the exposed execution client port as a configuration argument. It also needs the path to the execution client’s jwt-secret to authenticate the RPC connection between them. Each consensus client has a configuration flag that takes the jwt token file path as an argument. It must be consistent with the jwtsecret path provided to the execution client. When running a validator node, ensure that you add a configuration flag that specifies the Ethereum address of the fee recipient. The address is where ether rewards are sent. Running A Consensus Client An example of a consensus client is Lodestar. To run it, install the Lodestar software by compiling it or download the Docker image. You can find an advanced setup guide here. 1 lodestar beacon
2 –rootDir=”/data/ethereum”
3 –network=mainnet
4 –eth1.enabled=true
5 –execution.urls=”http://127.0.0.1:8551”
6 –jwt-secret=”/path/to/jwtsecret”

When the consensus client connects to the execution client to read the deposit contract and identify validators, it will also connect to other Beacon Node peers. It will then start syncing consensus slots from the genesis block. Once it reaches the current block, the Beacon API will become usable for your validators.

Adding Validators

The consensus client is the Beacon Node for validators to connect. Each consensus client has its own validator software, which is described in its documentation. Running a validator allows for sol staking, which is the most impactful and trustless means of supporting Ethereum. However, one has to deposit 32 ETH. To run a validator on your node with a lesser amount, you can use a decentralized pool with permissionless node operators such as Rocket Pool.

Operating A Node

You should monitor your node often to ensure it runs correctly. Sometimes, it needs maintenance. While it does not need to be online all the time, it should be online as much as possible to ensure it is synced up to the network.

Updating Clients

Client software needs to be kept up-to-date to ensure it has all the security patches, features, and EIPs. This is especially important before a hard fork. Before a major network update, a blog is published to inform the community. You can subscribe to these announcements to receive an email when a node needs to be updated.

Chaingateway.io Offers a Simple Solution

Setting up and maintaining a node is a lot of work, and very complex. However, you can get direct access to the blockchain without all the hassle via chaingateway.io.

Summary

There are different types of Ethereum nodes, which include light nodes, full nodes, and archive nodes. Each has varying requirements. Running a node makes you an important participant in the global decentralized network and contributes to its security and decentralization.