Git Product home page Git Product logo

ethereum-staking-guides's Introduction

Ethereum Staking Guides

Introduction

Welcome!

If you would like to become a solo staker, the gold standard for staking on the Ethereum network, then these guides are for you!

Required is a machine running Ubuntu (20.04 LTS) with a modern CPU, 16GB RAM (32GB is better) and a good quality 2TB SSD (4TB is better).

Start with one of the Testnet Staking Guides to practice or go straight to one of the Mainnet Staking Guides below.

If you're not sure which client to use, go with the one that has the lowest share. See here: https://clientdiversity.org. The guides below are named after the major Consensus Clients so you'll have to choose that one first. Each guide then contains instructions for installing an Execution Client which is required for staking as well. Again, it is recommended that you choose the one with the lowest share.

Finally, be aware that there is a queue to start validating on the mainnet. See here: https://validator-queue-monitoring.vercel.app.

Somer Esat


Mainnet Staking Guides

Use these guides for staking on the Ethereum mainnet.

Guide Change Log (dd-mm-yy)
Lighthouse
14-04-24 - Added table of contents.
12-11-23 - Updated Nethermind service config to speficy new binary name.
12-11-23 - Fixed various broken links and updated all clients to latest version.
20-05-23 - Added link to validator queue.
09-04-23 - Updated all clients to latest version.
09-04-23 - Added --db.engine pebble flag for Geth.
09-04-23 - Added instructions for --eth1_withdrawal_address for new and existing mnemonic.
21-03-23 - Updated Lighthouse release to 3.5.1.
21-03-23 - Updated Requirements to 16GB RAM minimum.
21-03-23 - Updated Besu release to 23.1.1.
21-03-23 - Updated JAVA_OPTS=-Xmx3g to -Xmx5g on Besu client config.
10-02-23 - Removed incorrectly placed = sign in flag description. See here for details.
See Change Log Archive.
Lodestar
12-11-23 - Updated Nethermind service config to speficy new binary name.
12-11-23 - Fixed various broken links and updated all clients to latest version.
20-05-23 - Added link to validator queue.
09-04-23 - Updated all clients to latest version.
09-04-23 - Added --db.engine pebble flag for Geth.
09-04-23 - Added instructions for --eth1_withdrawal_address for new and existing mnemonic.
04-04-23 - Updated NodeJS version to 18.15 (LTS). Added --check-files flag to yarn install.
21-03-23 - Updated Requirements to 16GB RAM minimum.
21-03-23 - Updated Besu release to 23.1.1.
21-03-23 - Updated JAVA_OPTS=-Xmx3g to -Xmx5g on Besu client config.
See Change Log Archive.
Prysm
12-11-23 - Updated Nethermind service config to speficy new binary name.
12-11-23 - Fixed various broken links and updated all clients to latest version.
20-05-23 - Added link to validator queue.
09-04-23 - Updated all clients to latest version.
09-04-23 - Added --db.engine pebble flag for Geth.
09-04-23 - Added instructions for --eth1_withdrawal_address for new and existing mnemonic.
21-03-23 - Updated Requirements to 16GB RAM minimum.
21-03-23 - Updated Besu release to 23.1.1.
21-03-23 - Updated JAVA_OPTS=-Xmx3g to -Xmx5g on Besu client config.
See Change Log Archive.
Nimbus
12-11-23 - Updated Nethermind service config to speficy new binary name.
12-11-23 - Fixed various broken links and updated all clients to latest version.
20-05-23 - Added link to validator queue.
09-04-23 - Updated all clients to latest version.
09-04-23 - Added --db.engine pebble flag for Geth.
09-04-23 - Added instructions for --eth1_withdrawal_address for new and existing mnemonic.
21-03-23 - Updated Requirements to 16GB RAM minimum.
21-03-23 - Updated Besu release to 23.1.1.
21-03-23 - Updated JAVA_OPTS=-Xmx3g to -Xmx5g on Besu client config.
See Change Log Archive.
Teku
12-11-23 - Updated Nethermind service config to speficy new binary name.
12-11-23 - Fixed various broken links and updated all clients to latest version.
18-07-23 - Updated Teku client prerequisite to Java 17 for install and update.
20-05-23 - Added link to validator queue.
09-04-23 - Updated all clients to latest version.
09-04-23 - Added --db.engine pebble flag for Geth.
09-04-23 - Added instructions for --eth1_withdrawal_address for new and existing mnemonic.
21-03-23 - Updated Requirements to 16GB RAM minimum.
21-03-23 - Updated Besu release to 23.1.1.
21-03-23 - Updated JAVA_OPTS=-Xmx3g to -Xmx5g on Besu client config.
20-03-23 - Updated JAVA_OPTS=-Xmx3g to -Xmx5g on Teku client config at request of Teku Team.
See Change Log Archive.

Testnet Staking Guides

Use these guides to practice setting up your staking setup on the Etheruem Goerli testnet.

Change log generally mirrors the mainnet guides.

DO NOT USE FOR MAINNET

Guide Change Log (dd-mm-yy)
Lighthouse
15-04-23 - Added EthStaker Goerli bot instructions for staking-deposit-cli.
06-08-22 - Published.
Lodestar
15-04-23 - Added EthStaker Goerli bot instructions for staking-deposit-cli.
06-08-22 - Published.
Prysm
30-04-23 - Fixed incorrect flag in Prysm Beacon config. See here for details.
15-04-23 - Added EthStaker Goerli bot instructions for staking-deposit-cli.
06-08-22 - Published.
Nimbus
15-04-23 - Added EthStaker Goerli bot instructions for staking-deposit-cli.
06-08-22 - Published.
Teku
18-07-23 - Updated Teku client prerequisite to Java 17 for install and update.
15-04-23 - Added EthStaker Goerli bot instructions for staking-deposit-cli.
06-08-22 - Published.

Update Withdrawal Credentials Guide

Stakers may use this guide to update withdrawal credentials on their validator(s) from 0x00 to 0x01.

Guide Change Log (dd-mm-yy)
Guide to Configuring
Withdrawal Credentials
on Ethereum

14-04-24 - Added table of contents.
12-11-23 - Fixed various broken links.
16-04-23 - Fix typo & add extra warning prior to Submit & Broadcast.
13-04-23 - Various updates to improve readability.
12-04-23 - Added example Beaconcha.in submit success message.
11-04-23 - Published.

Donations Appreciated

Somer.eth (0x32B74B90407309F6637245292cd90347DE658A37)


ethereum-staking-guides's People

Contributors

someresat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ethereum-staking-guides's Issues

Adding new validator keys to an existing Prysm node.

Description

Adding new validator keys to a Prysm validator with existing keys may not be straight-forward for some, so wanted to share what I learned during my experience importing them. The items below apply to anyone who closely followed the Prysm staking guide by Somer Esat.

Issue Overview

  • In order to support a new deposit(s), the associated keys must be imported to the validator wallet directory which is located at /var/lib/prysm/validator.
  • Because the user prysmvalidator owns the wallet directory, only it or root is able to successfully run the command needed to import new keys (it will fail due to lack of write permissions for other users).
  • Because this user was created with /bin/false set, we cannot switch user to prysmvalidator to access the shell and run the import command.

Resolution

  • One resolution here is to recursively (temporarily) change ownership of the the /var/lib/prysm/validator directory to be owned by your current user with the command sudo chown -R ryan:ryan /var/lib/prysm/validator (replacing ryan:ryan with your username).
  • Next, run the import command cd /usr/local/bin then validator accounts import --keys-dir=/path/to/keystores where /path/to/keystores is the filepath to the directory containing all of (or just your new) keys.
  • Go through the prompts and make sure you use the EXACT SAME wallet password as you did before.
  • Import should succeed.
  • Change ownership of wallet directory back to prysmvalidator user with sudo chown -R prysmvalidator:prysmvalidator /var/lib/prysm/validator
  • Verify successful import with cd /usr/local/bin then sudo validator accounts list --wallet-dir=/var/lib/prysm/validator
  • Restart your validator process with sudo systemctl restart prysmvalidator.

Additional

  • If you experience the following error when running the import command, you will need to change the permissions on the keystore file using the command in the next step
    Fatal account: Could not import accounts: could not write accounts: file already exist without proper 0600
    • Command to change permissions sudo chmod 660 /var/lib/prysm/validator/direct/accounts/all-accounts.keystore.json
  • You can perform all of these steps without stopping your validator. But you must restart your validator in order for it to read the new values in your wallet file.
  • To confirm your new keys were picked up by the process, check the validator logs and ensure that you see a message along the lines of Waiting for deposit to be observed by beacon node.

> In your [lighthouse guide](https://someresat.medium.com/guide-to-staking-on-ethereum-ubuntu-lighthouse-773f5d982e03), you write the following when explaining the additional flags of the beacon node service:

In your lighthouse guide, you write the following when explaining the additional flags of the beacon node service:

--execution-endpoint=http://127.0.0.1:8551 The address of the Execution Client. Should be the same for all Execution Clients detailed in this guide.

I was wondering, is the = correct here? In the main config file, you don't use it.

[Unit]
Description=Lighthouse Consensus Client BN (Mainnet)
Wants=network-online.target
After=network-online.target[Service]
User=lighthousebeacon
Group=lighthousebeacon
Type=simple
Restart=always
RestartSec=5
ExecStart=/usr/local/bin/lighthouse bn \
  --network mainnet \
  --datadir /var/lib/lighthouse \
  --http \
  --execution-endpoint http://127.0.0.1:8551 \
  --execution-jwt /var/lib/jwtsecret/jwt.hex \
  --checkpoint-sync-url CheckpointSyncURL[Install]
WantedBy=multi-user.target

Great catch, thank you!

I have updated both the mainnet and testnet guides to remove the '=' from the flags description section. The config is correct.

Originally posted by @Obinna26 in #8 (comment)

Consider removing `=` in Lighthouse flag.

In your lighthouse guide, you write the following when explaining the additional flags of the beacon node service:

--execution-endpoint=http://127.0.0.1:8551 The address of the Execution Client. Should be the same for all Execution Clients detailed in this guide.

I was wondering, is the = correct here? In the main config file, you don't use it.

[Unit]
Description=Lighthouse Consensus Client BN (Mainnet)
Wants=network-online.target
After=network-online.target[Service]
User=lighthousebeacon
Group=lighthousebeacon
Type=simple
Restart=always
RestartSec=5
ExecStart=/usr/local/bin/lighthouse bn \
  --network mainnet \
  --datadir /var/lib/lighthouse \
  --http \
  --execution-endpoint http://127.0.0.1:8551 \
  --execution-jwt /var/lib/jwtsecret/jwt.hex \
  --checkpoint-sync-url CheckpointSyncURL[Install]
WantedBy=multi-user.target

Pyrmount depreciated? Test net advice or recommendations?

Hello, I'd just like to ask a question. I am looking for a guide for staking on the test net. I noticed that you have said that the Pyrmount guides have been depreciated. I was planning on using these guides to practice staking but now I am not sure. Do you have any advice or recommendations for a staking guide using a test net? I'd like to practice. Thanks!

P.S. I suppose that I am particularly referring to Ubuntu/Lighthouse guide's new note that was updated and committed here.

Nimbus Documentation for connected peers out of sync

The current documentation for checking connected peers says to run the following command..

image

However, for Nimbus, we don't open the http connection and this actually should be geth attach ws://127.0.0.1:8546 -- notice that the ws:// instead of http:// and then 8546 instead of 8545

Links to Alternative Monitoring Sites

Hi and thanks for the great guides,

I propose to include links to alternative monitoring sites, such as https://www.rated.network/ or https://ethstakers.club. This change would encourage users to transition to these alternative platforms whenever one site encounters issues. Recent issues with incorrectly labeled missed attestations on beaconcha.in have highlighted the importance of diversifying the monitoring approach.

Consider adding a timeout to the Geth systemd configurations

Hey @SomerEsat, I have found your guides very helpful!

An issue I have run into with Geth is that the proposed systemd configuration file uses the default timeout when shutting down. Since Geth sometimes can take quite a while to write its state to disk, this can lead to bad shutdowns (as systemd simply kills Geth after the default timeout) that corrupt Geth's state. This can often take hours or days to fix (I have for example recently seen it have to go back in history and start redownloading the state from over 1 week and 4 days ago).

Therefore, I think it might be helpful to add the TimeoutStopSec=600 variable in the Geth systemd configuration (i.e. a timeout of 10 minutes) so that Geth should almost certainly have enough time to write to disk before it is killed (as eluded to here for example: ethereum/go-ethereum#24416).

Thanks again for all you do for the space!

Besu needs --rpc-http-enabled flag

Hi,

We are running a Besu+Teku node and Teku doesn't communicate with Besu unless --rpc-http-enabled flag is added to the configuration (it notices that EL is online but they cannot talk to each other).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.