# Nethermind Sedge 

By [GLCstaked](https://paragraph.com/@glcstaked) · 2022-11-21

---

Set up an Ethereum /Gnosischain validator in under 30mins
---------------------------------------------------------

[![]({{DOMAIN}}/editor/youtube/play.png)](https://www.youtube.com/watch?v=Msis38R4Kko)

**What is Sedge**: A one-click setup tool for PoS network/chain validators for [**Ethereum**](https://ethereum.org/en/) and [**Gnosischain**](https://www.gnosis.io/), Sedge takes care of the entire on-premise full node setup based on the chosen client, using generated docker-compose scripts based on the desired configuration.

You of course, still need to sync chain data which can take a while, but the whole set-up process is minutes as sedge will automate much of the configuration that goes into a validator setup. Simply download Sedge select client for Execution layer node and consensus layer node, it will configure the setup including checking and installing dependencies on your system.

Sedge is developed by Nethermind client team

[

Nethermind | Blockchain Research & Software Engineering
-------------------------------------------------------

tools & products tools & products Developer tools Our work touches every part of the Ethereum and Starknet ecosystem, from our full nodes to cryptography research and application-layer protocol development. ethereum contributions The Nethermind project was bootstrapped in 2017 and received an Ethereum Foundation grant in 2018 to deliver the full-client implementation.

https://www.nethermind.io

![](https://storage.googleapis.com/papyrus_images/34d683d29aea491a191a91eb37b3ca97bdc5c0c07ef144e425f856ad8dd4c280.jpg)

](https://nethermind.io/)

Sedge is a tool that focuses on ease of use and, as such, lowers the entry barrier for non-technical users. If you are interested in being a solo-validator for Ethereum or Gnosischain but have little technical experience then this tool may be for you.

Sedge, will not run or maintain the validator for you, with sedge you are a solo-staker, you should be comfortable with the responsibilities involved

**To Run a Validator**

To run a validator for Ethereum or Gnosischain there are two main Nodes, an **Execution Layer client** is required this is typically referred to as a full node, it stores the state of the blockchain and connects to other full nodes. This is needed to interact with the chain.

**Consensus Layer Client** (or Beacon Node) uses beacon node client software to coordinate Ethereum/Gnosischain proof-of-stake consensus.

**Validator Client**, This is special piece of software that manages validator keys and duties such as producing new blocks and voting on others' proposed blocks. Validator clients connect to the Ethereum network through beacon nodes, which depend on execution nodes.

There are a number of different client implementations for these node types (you can find many [here](https://launchpad.ethereum.org/en/checklist)) To setup a Validator, these clients have to be configured correctly the process of which varies client to client. Sedge will handle the configuration of these node types for you.

Hardware
--------

You should run your validator on a dedicated server/device. Would recommend installing Linux [Ubuntu 20.04LTS](https://releases.ubuntu.com/focal/), find out how to boot to a new device here

[https://ubuntu.com/tutorials/create-a-usb-stick-on-windows#1-overview](https://ubuntu.com/tutorials/create-a-usb-stick-on-windows#1-overview)

**Specs:** You don’t need a $5k PC setup, both Ethereum and gnosischain were designed to be run on consumer hardware. I picked up a $300 PC tower, came with 16GB ram & intel i5 4Core CPU. No graphics card, whatever integrated graphics is fine, this is one thing we don’t care about at all.

**Internet:** You need Ethernet Connection (Wifi is no good). Internet should be at least 100 Mb/s download. But keep in mind you don’t need a data centre to run a validator on these networks, a little bit of downtime will not effect rewards/profitability badly.

Storage: the most important component, hard-disk is no go, its simply too slow, you won’t be able to keep in sync. Get a quality SSD (preferably NVMe SSD) but a higher grade SATA SSD is fine.

1\. Install Sedge
-----------------

Find the latest release of Sedge from here

[

GitHub - NethermindEth/sedge: A one-click setup tool for PoS network/chain validators and nodes.
------------------------------------------------------------------------------------------------

A one-click setup tool for PoS network/chain validators and nodes. - NethermindEth/sedge

https://github.com

![](https://storage.googleapis.com/papyrus_images/a1c1d36c412459af8a148362f0c94dc10522d364ccc38eb04625f861bd360d02.png)

](https://github.com/NethermindEth/sedge)

Look for Releases find the **latest version**, under assets (as were using ubuntu) the file we want is for `linux-amd64.` At time of writing this was 0.4.0 but **the latest version should be used if available.**

![You can copy the link to use in the command below](https://storage.googleapis.com/papyrus_images/41b40fe3f1a6f5b4277378dd47b622b20c0445d82158beedfcf23408fc28a722.png)

You can copy the link to use in the command below

Open the Terminal in Ubuntu, and download the Sedge binary with the following. This will download v0.5.0 release which is merge ready.

    wget https://github.com/NethermindEth/sedge/releases/download/v0.5.0/sedge-v0.5.0-linux-amd64 -O sedge 
    

Make Executable

    chmod +x sedge
    

Add to Path

    sudo cp sedge /usr/local/bin/sedge
    

Run this to confirm installation

    sedge --help
    

![This is what you should see if installed successfully ](https://storage.googleapis.com/papyrus_images/5682bf47ba6ceb546db05242fec7d44a3905e284606d665ea58d919b371637ab.png)

This is what you should see if installed successfully

2\. Initialize Sedge
--------------------

To start Sedge and start your Execution Node and Beacon Node with Validator Node

This will default to **Ethereum** Mainnet and will select **random clients** for you

If we wanted to run a validator on **Gnosischain** we can select the network as follows, can display compatible networks with `sedge networks`

    sedge cli --network gnosis
    

If we want to select our clients we can do so like this, for example lighthouse for our consensus layer, and nethermind for our execution layer

    sedge cli --network gnosis -c lighthouse -e nethermind
    

As this is a fresh Ubuntu Install and you have likely not installed any dependencies Sedge will check this for you and suggest an install

![Press Enter to install these Dependencies](https://storage.googleapis.com/papyrus_images/7908fd2d1db94c2e3fbf4050d8468b32c86856b833bf0299beb3d30cc2df48a5.png)

Press Enter to install these Dependencies

Sedge will now generate docker-compose scripts to configure your nodes, the JWT secret is configured for you (this is required to allow communication between the EL and CL clients) and a working directory is created in `/docker-compose-scripts` here you can find the `docker-compose.yml` file that is created for you.

![Enter Y to accept the configuration and start ](https://storage.googleapis.com/papyrus_images/10ea44e69af65b6c715d820f18097cb63cfa203c00eb6da240f34bd8b82d6f21.png)

Enter Y to accept the configuration and start

After accepting, press enter to start the containers, this will pull the docker images of the selected clients, and start syncing

![](https://storage.googleapis.com/papyrus_images/781bbe62b2d927cf0a4553aa41a81c36139fc32918d1b8e18e1b694d9be47ee1.png)

**Wait to Sync, At this point we need to wait for our Execution and consensus clients to fully sync, the validator node will not start until this happens.**

Its best to get the next step done while waiting, which only takes a minute, after that you can come back to the service after 12-24hrs to check.

3\. Generate Keys
-----------------

To Generate Keys for Ethereum

    sedge keys 
    

otherwise we would need to specify the network, example for Gnosischain

    sedge keys --network gnosis
    

You will be asked to enter a passphrase, this is for our decrypt key, that will be stored on a `password.txt` file

Next you will be presented with your **seed phrase**

**THIS MUST BE BACKED UP, DO NOT SHARE, DO NOT STORE DIGITALLY**

![Save the Seed somewhere safe, press enter to continue](https://storage.googleapis.com/papyrus_images/572d81431d1f3a6fda59dda816c3a7ed666e3151d36571e48f5309ae39bfa7b8.png)

Save the Seed somewhere safe, press enter to continue

Once confirmed you will be asked to enter the number of validators, enter the number you wish to run (provided you have the tokens to back it for the deposit later)

![](https://storage.googleapis.com/papyrus_images/6f18c08bade1e9fa23cef0e1ec0980c7f9759015c5b87362a1d3b25e61d8afe0.png)

You can now find in `/docker-compose-scripts/keystore` your Validator keystores in `validator_keys`, `deposit_data.json` which is needed for the deposit, and your `password.txt`

![](https://storage.googleapis.com/papyrus_images/9fd77601d183d40a641c4f24a4ff675d3392f7c7392b691ede5a337da1a3ff28.png)

4\. Start the Validator
-----------------------

After Syncing on the Beacon Node and Execution Client have finished you will be prompted to start the validator node

![Press y and enter to continue ](https://storage.googleapis.com/papyrus_images/ce5f893ed6322e244084cf069e1d8a06409c99dfc30e49b5e0003a2d43c49bef.png)

Press y and enter to continue

This will import your keystores, which should have been generated in Step 3, and start the validator service.

![](https://storage.googleapis.com/papyrus_images/343a04e7c6a53e14bf09dd19f88038bbb0098608e488d5ba31ebf1334dbce4a6.png)

To Check the Validator service logs, go into our working directory

    cd docker-compose-scripts
    sudo docker-compose logs -f validator
    

![Logs should look like this](https://storage.googleapis.com/papyrus_images/9727082bbe3f3b0095c6a983321f91c84947c66dacb353430a401044c386f4b8.png)

Logs should look like this

Logs should read ‘awaiting activation’ this means the validator keys are detected and the validator service is connected to a working synced beacon node which is connected to a working synced execution node.

NOTE: this depends on the client type, in some clients it will display something like ‘unable to get validator ….. status’ which means its not active on the beacon chain, however you can find at the beginning of the logs an indication on the validators being dectected by the client.

To activate you must make the deposit

5\. Deposit
-----------

You need to grab the `deposit_data.json` file in `/docker-compose-scripts/keystore` folder and head to the deposit UI

**For Ethereum**

Confirm both URL and Contract address from the [official docs](https://launchpad.ethereum.org/).

Contract Address: [0x00000000219ab540356cBB839Cbe05303d7705Fa](https://etherscan.io/address/0x00000000219ab540356cBB839Cbe05303d7705Fa)

**For Gnosischain**

[

Gnosis Beacon Chain Deposit
---------------------------

Gnosis Beacon Chain Deposit

https://deposit.gnosischain.com



](https://deposit.gnosischain.com/)

Confirm both URL and Contract address from the [official docs](https://docs.gnosischain.com/).

Contract Address: [0x0B98057eA310F4d31F2a452B414647007d1645d9](https://blockscout.com/xdai/mainnet/address/0x0B98057eA310F4d31F2a452B414647007d1645d9)

Additional Information
----------------------

Running containers / services

    sudo docker ps -a
    

Checking logs for specific container

    sudo docker logs -f <container-name>
    

Sedge Logs

Nethermind Sedge Documentation

[

Introduction | Sedge documentation
----------------------------------

Sedge is a one-click setup tool for PoS network/chain validators and nodes written entirely in the Go programming language. Sedge takes care of the entire on-premise full node setup based on the chosen client, using generated docker-compose scripts based on the desired configuration.

https://docs.sedge.nethermind.io



](https://docs.sedge.nethermind.io/docs/intro)

Updating Sedge Image versions
-----------------------------

If you used an old version of Sedge, it may have set older docker images when setup, you can manually update these images with this procedure. For example updating the Execution client to a newer release.

Example updating to: Nethermind v1.14.7

**Stop Sedge Containers**

    cd docker-compose-scripts
    sudo docker compose down
    

**Edit .env file**

    nano .env
    

this opens the file where environment variables are defined, this is a hidden file within the docker-compose-scripts directory. We need to edit the docker image versions here.

`EC_IMAGE_VERSION` - this is the execution layer docker image `CC_IMAGE_VERSION` - this is the consensus layer docker image `VL_IMAGE_VERSION` - this is the validator node docker image, usually the same as your consensus layer

![To write changes ctrl+O, then to close ctrl+X](https://storage.googleapis.com/papyrus_images/48d64f0a190ac00db492ddabfc2297cad3d23a6ab9de2631c900f607d501eaed.png)

To write changes ctrl+O, then to close ctrl+X

**Restart Containers**

    sudo docker compose up -d executon
    sudo docker compose up -d consensus
    sudo docker compose up -d validator
    

If successful, when starting the client you have updated the image for it should pull the new image on start on like so

![](https://storage.googleapis.com/papyrus_images/d02f24d9c48e2c8a78dc8df3d3b0d2f3aaa8670b8eae63743043d79ad4d4fab6.png)

Open Ports/Port Forwarding
--------------------------

If you have trouble connecting to peers, you can try opening the p2p ports which are

Execution: `30303 tcp/udp`

Consensus: `9000 tcp/udp`

Open with UFW on Ubuntu device

    sudo ufw allow 30303
    sudo ufw allow 9000
    sudo ufw enable
    
    sudo ufw status 
    

NOTE: if you are running on a VPS, be careful not to lock yourself out and enable ssh also `sudo ufw allow ssh`

**Port forwarding**

if running locally, this can be done by logging into your router, usually `192.168.0.1` on any browser while connected, you will need your admin log in details to get access (usually found on the router). The process will be different depending on your provider and you should consult the manual for more info.

Importing Existing Keystores with Sedge
---------------------------------------

should you wish to not generate new keys, and use existing keys. example: from an old setup that you want to migrate to using sedge.

Do not follow step 3, instead place your own keystores (your existing keystores) in the following folder

**Place Keystores in**

`./docker-compose-scripts/keystore/validator_keys/`

**Place Decrypt key in**

`./docker-compose-scripts/keystore/`

your decrypt key (which you created when generating these keystores) in a file called `password.txt` in the folder.

**Run Validator Service**

Once EL and CL have finished syncing you may be prompted to run the validator service, like so

if your keystores are in the correct folder with password.txt, Press y to confirm.

**Troubleshooting problems**

if you ran this and there was an issue with the import, you would have to close your containers for validator and validator-import and check the files are in the correct place, password is correct.

close containers

    cd docker-compose-scripts
    sudo docker stop validator-client && sudo docker rm validator-client
    sudo docker stop validator-import && sudo docker rm validator-import
    

if you were not prompted to run the validator service from the terminal, but your EL and CL have finished syncing, the validator import and validator service can be run manually

**Run Validator Manually**

    cd docker-compose-scripts
    sudo docker compose up -d validator-import
    

    sudo docker compose up -d validator
    

Adding more validators - gnosischain
------------------------------------

Should you wish to add more validators the process is as follows, high level steps create more keystores with the deposit-generator tool, import these new keystores to our validator client and make the deposit for the new validators.

_This is for Gnosischain, but similar steps can be taken for Ethereum build using the respective key generators for Ethereum network._

### 1\. Create New Keystores

Download the Key Generator

    cd
    sudo docker pull ghcr.io/gnosischain/validator-data-generator:latest
    

    mkdir /home/$USER/gnosis/keystore
    

**Run the generator to create new keystore/s**

This will restore from existing mnemonic seed phrase (where your keystores are derived from), place the amount of new Validators you wish to create for <# of val>, your ETH address in place of And the is the starting index of the seed, for example is you created/&imported 10 existing validators already the starting index is 10. This will derive keystores from this point instead of creating the same keystores again. sudo docker run -it --rm -v /home/$USER/gnosis/keystore:/keystore \\ ghcr.io/gnosischain/validator-data-generator:latest existing-mnemonic \\ --num\_validators=<# of Val> --validator\_start\_index=<START\_NUM> --chain=gnosis \\ --folder=/keystore --eth1\_withdrawal\_address=<ETH-withdrawal-address> Your password will need to be the same as the password in `keystore_password.txt` within sedge working folder, or the additional validators will not work with the validators already imported with sedge. this will now generate your keystore/s (validators keys) and place them in the directory `/gnosis/keystore/validator_keys` along with `deposit_data.json` 2. Import new keystores to validator **Stop the Validator client** cd docker-compose-scripts sudo docker stop validator-client && sudo docker rm validator-client Place keystores in the keystore directory sudo cp home/$USER/gnosis/keystore/validator\_keys/\* home/$USER/docker-compose-scripts/ keystore/validator\_keys/ this can also be done manually or if the directories are different then change accordingly, the \* will copy the contents and not the folder itself. this should now place your keystores in the working `keystore` folder along with your existing validator keystores. **Import new keystores to Validator client.** cd docker-compose-scripts sudo docker compose up -d validator-import You should see x number of keystores found, but only your new keystores imported remove the validator import container sudo docker stop validator-import-client && sudo docker rm validator-import-client **Restart validator** sudo docker compose up -d validator You should see validator client logs indicating that some validators are awaiting activation. 3. Make Deposit Now use the `deposit_data.json` for the new keystores from the folder `home/$USER/gnosis/keystore/` To make the deposit the same way the deposit was made for the existing keystores in Step 5.

---

*Originally published on [GLCstaked](https://paragraph.com/@glcstaked/nethermind-sedge)*
