Hardware Requirements for a Full Node

    Before we get started, you should ensure you have a computer with sufficient resources to run an Ethereum full node. You will need at least 300 GB of disk space to store a full copy of the Ethereum blockchain. If you also want to run a full node on the Ethereum testnet, you will need at least an additional 45 GB. Downloading 345 GB of blockchain data can take a long time, so it’s recommended that you work on a fast internet connection.

    Syncing the Ethereum blockchain is very input/output (I/O) intensive. It is best to have a solid-state drive (SSD). If you have a mechanical hard disk drive (HDD), you will need at least 8 GB of RAM to use as cache. Otherwise, you may discover that your system is too slow to keep up and sync fully.

    Minimum requirements:

    • CPU with 2+ cores

    • At least 300 GB free storage space

    • 4 GB RAM minimum with an SSD, 8 GB+ if you have an HDD

    • 8 MBit/sec download internet service

    These are the minimum requirements to sync a full (but pruned) copy of an Ethereum-based blockchain.

    At the time of writing the Parity codebase is lighter on resources, so if you’re running with limited hardware you’ll likely see better results using Parity.

    If you want to sync in a reasonable amount of time and store all the development tools, libraries, clients, and blockchains we discuss in this book, you will want a more capable computer.

    Recommended specifications:

    • Fast CPU with 4+ cores

    • 16 GB+ RAM

    • Fast SSD with at least 500 GB free space

    • 25+ MBit/sec download internet service

    It’s difficult to predict how fast a blockchain’s size will increase and when more disk space will be required, so it’s recommended to check the blockchain’s latest size before you start syncing.

    These links provide up-to-date estimates of the blockchain size:

    Software Requirements for Building and Running a Client (Node)

    This section covers Parity and Geth client software. It also assumes you are using a Unix-like command-line environment. The examples show the commands and output as they appear on an Ubuntu GNU/Linux operating system running the bash shell (command-line execution environment).

    Typically every blockchain will have its own version of Geth, while Parity provides support for multiple Ethereum-based blockchains (Ethereum, Ethereum Classic, Ellaism, Expanse, Musicoin) with the same client download.

    Tip

    In many of the examples in this chapter, we will be using the operating system’s command-line interface (also known as a “shell”), accessed via a “terminal” application. The shell will display a prompt; you type a command, and the shell responds with some text and a new prompt for your next command. The prompt may look different on your system, but in the following examples, it is denoted by a $ symbol. In the examples, when you see text after a $ symbol, don’t type the $ symbol but type the command immediately following it (shown in bold), then press Enter to execute the command. In the examples, the lines below each command are the operating system’s responses to that command. When you see the next $ prefix, you’ll know it’s a new command and you should repeat the process.

    Before we get started, you may need to install some software. If you’ve never done any software development on the computer you are currently using, you will probably need to install some basic tools. For the examples that follow, you will need to install git, the source-code management system; golang, the Go programming language and standard libraries; and Rust, a systems programming language.

    Git can be installed by following the instructions at https://git-scm.com.

    Go can be installed by following the instructions at , or https://github.com/golang/go/wiki/Ubuntu if you are using Ubuntu.

    Rust can be installed by following the instructions at .

    Note

    Parity requires Rust version 1.27 or greater.

    Parity also requires some software libraries, such as OpenSSL and libudev. To install these on a Ubuntu or Debian GNU/Linux compatible system, use the following command:

    For other operating systems, use the package manager of your OS or follow the Wiki instructions to install the required libraries.

    Now that you have git, golang, Rust, and the necessary libraries installed, let’s get to work!

    Parity

    Parity is an implementation of a full-node Ethereum client and DApp browser. It was written “from the ground up” in Rust, a systems programming language, with the aim of building a modular, secure, and scalable Ethereum client. Parity is developed by Parity Tech, a UK company, and is released under the GPLv3 free software license.

    To install Parity, you can use the Rust package manager cargo or download the source code from GitHub. The package manager also downloads the source code, so there’s not much difference between the two options. In the next section, we will show you how to download and compile Parity yourself.

    Installing Parity

    The offers instructions for building Parity in different environments and containers. We’ll show you how to build Parity from source. This assumes you have already installed Rust using rustup (see Software Requirements for Building and Running a Client (Node)).

    First, get the source code from GitHub:

      Then change to the parity directory and use cargo to build the executable:

      1. $ cd parity
      2. $ cargo install --path .

      Try and run parity to see if it is installed, by invoking the —version option:

      1. $ parity --version
      2. Parity Ethereum Client.
      3. version Parity-Ethereum/v2.7.0-unstable-b69a33b3a-20200124/x86_64-unknown-linux-gnu/rustc1.40.0
      4. Copyright 2015-2020 Parity Technologies (UK) Ltd.
      5. License GPLv3+: GNU GPL version 3 or later .
      6. This is free software: you are free to change and redistribute it.
      7. There is NO WARRANTY, to the extent permitted by law.
      8. By Wood/Paronyan/Kotewicz/Drwięga/Volf/Greeff
      9. Habermeier/Czaban/Gotchac/Redman/Nikolsky
      10. Schoedon/Tang/Adolfsson/Silva/Palm/Hirsz et al.
      11. $

      Great! Now that Parity is installed, you can sync the blockchain and get started with some basic command-line options.

      Go-Ethereum (Geth)

      Geth is the Go language implementation that is actively developed by the Ethereum Foundation, so is considered the “official” implementation of the Ethereum client. Typically, every Ethereum-based blockchain will have its own Geth implementation. If you’re running Geth, then you’ll want to make sure you grab the correct version for your blockchain using one of the following repository links:

      Note

      You can also skip these instructions and install a precompiled binary for your platform of choice. The precompiled releases are much easier to install and can be found in the “releases” section of any of the repositories listed here. However, you may learn more by downloading and compiling the software yourself.

      Cloning the repository

      The first step is to clone the Git repository, to get a copy of the source code.

      To make a local clone of your chosen repository, use the git command as follows, in your home directory or under any directory you use for development:

      1. $ git clone <Repository Link>

      You should see a progress report as the repository is copied to your local system:

      Great! Now that you have a local copy of Geth, you can compile an executable for your platform.

      Building Geth from source code

      To build Geth, change to the directory where the source code was downloaded and use the make command:

      1. $ cd go-ethereum
      2. $ make geth

      If all goes well, you will see the Go compiler building each component until it produces the geth executable:

      1. build/env.sh go run build/ci.go install ./cmd/geth
      2. >>> /usr/local/go/bin/go install -ldflags -X main.gitCommit=58a1e13e6dd7f52a1d...
      3. github.com/ethereum/go-ethereum/common/math
      4. github.com/ethereum/go-ethereum/crypto/sha3
      5. github.com/ethereum/go-ethereum/rlp
      6. github.com/ethereum/go-ethereum/crypto/secp256k1
      7. github.com/ethereum/go-ethereum/common
      8. [...]
      9. github.com/ethereum/go-ethereum/cmd/utils
      10. github.com/ethereum/go-ethereum/cmd/geth
      11. Done building.
      12. $

      Let’s make sure geth works without actually starting it running:

      Your geth version command may show slightly different information, but you should see a version report much like the one seen here.

      The next sections explains the challenge with the initial synchronization of Ethereum’s blockchain.