Before getting to the process of running a Nethermind node, let’s understand about three sync modes that Nethermind offers.
Fast sync
Fast sync is the default and most popular sync mode for Nethermind; after the fast sync is completed, you’ll be able to query your node for basic calls like getBalance. Fast sync will download the latest state of blockchain, headers, and optionally bodies and receipts.
Beam sync
Beam sync is just like fast sync, but with beam sync, you can start querying the blockchain within a few minutes of the client’s start. However, this mode is not suggested without having full knowledge about it. You can learn more about Beam sync
here.
Note: Though this is not recommended as a lot of devs had not had a good success rate.
Archive sync
Archive sync is the slowest and most load-consuming sync, but this sync will get the blockchain’s historical data and state right from the genesis block. It may take several weeks for Archive sync to complete for Mainnet, depending on IO’s speed.
Now let’s see the operating system based Nethermind installation process.
Linux
$ wget https://github.com/NethermindEth/nethermind/releases/download/1.10.72/nethermind-linux-amd64-1.10.72-e63bcb9-20210524.zip
$ wget https://github.com/NethermindEth/nethermind/releases/download/1.10.72/nethermind-linux-amd64-1.10.72-e63bcb9-20210524.zip
$ wget https://github.com/NethermindEth/nethermind/releases/download/1.10.72/nethermind-linux-amd64-1.10.72-e63bcb9-20210524.zip
Then download the dependencies.
$ sudo apt-get update && sudo apt-get install libsnappy-dev libc6-dev libc6 unzip -y
$ sudo apt-get update && sudo apt-get install libsnappy-dev libc6-dev libc6 unzip -y
$ sudo apt-get update && sudo apt-get install libsnappy-dev libc6-dev libc6 unzip -y
Now unpack the package in the new folder nethermind.
$ unzip nethermind-linux-amd64-1.10.72-e63bcb9-20210524.zip -d nethermind
$ unzip nethermind-linux-amd64-1.10.72-e63bcb9-20210524.zip -d nethermind
$ unzip nethermind-linux-amd64-1.10.72-e63bcb9-20210524.zip -d nethermind
Note: The name of the package and GitHub link may differ based on the package version.
Now go to the nethermind folder.
$ cd nethermind
$ cd nethermind
Run ./Nethermind.Launcher and select the Ethereum node from the options.
$ ./Nethermind.Launcher
$ ./Nethermind.Launcher
Now select the network you want your node to run on (Ropsten in this example).
Select the type of sync (Archive in this example).
Now it will prompt if you want JSON RPC supported or not type Y if you want to.
After selecting yes, you can also set custom JSON RPC IP
It will now ask for Ethstats registration, you can skip this, or if you want to register for this, you can enter the necessary information.
Now the node will start syncing, and it should look something like this.
macOS
Now install dependencies for mac using
Homebrew.
$ brew install gmp snappy lz4 zstd
$ brew install gmp snappy lz4 zstd
$ brew install gmp snappy lz4 zstd
Unzip the downloaded package and run `Nethermind.Launcher`. Then, you can follow the same configuration steps as we saw for Linux.
Windows
Unzip the package and run `Nethermind.Launcher.exe`; further configuration steps are the same as we saw in Linux.
You can learn more about supported JSON RPC modules
here.
Now, let’s see how we can run our node with a custom configuration. For that, run the node with ./Nethermind.Runner for Linux/macOS and Nethermind.Runner for Windows.
- To get a list of all configuration options
.
$ ./Nethermind.Runner --help
$ ./Nethermind.Runner --help
$ ./Nethermind.Runner --help
- To store all the data node processes in a custom directory.
$ ./Nethermind.Runner --datadir <path>
$ ./Nethermind.Runner --datadir <path>
$ ./Nethermind.Runner --datadir <path>
- To configure the path of Nethermind’s database folder.
$ ./Nethermind.Runner --baseDbPath <path>
$ ./Nethermind.Runner --baseDbPath <path>
$ ./Nethermind.Runner --baseDbPath <path>
- To change the log level, available option: DEBUG, TRACE, INFO, WARN, ERROR.
$ ./Nethermind.Runner --log <option>
$ ./Nethermind.Runner --log <option>
$ ./Nethermind.Runner --log <option>
- To change the source directory of config files.
$ ./Nethermind.Runner --configsDirectory <path>
$ ./Nethermind.Runner --configsDirectory <path>
$ ./Nethermind.Runner --configsDirectory <path>
- To determine which configuration file to use.
$ ./Nethermind.Runner --config <filename>
$ ./Nethermind.Runner --config <filename>
$ ./Nethermind.Runner --config <filename>