Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ethereum-staking-testnet.md

alexanderjsingleton's Ethereum 2.0 Staking Guide for Goerli Test-Net with Prysm and Digital Ocean

Introduction

After searching for legit ethereum staking-guides, the best proved to be EatTheBlock's demonstration via YouTube. Although I attempted several times, I think I finally set-up a test validator as of today (12/22/2020); I'll post his tutorial within a blog-post I plan to release within the next few weeks- for now, enjoy this gist and my corresponding sreencast via YouTube!

Create Directory for prysm

  1. mkdir prysm && cd prysm within a dedicated subdirectory (eg: '/home/alexanderjsingleton/shinebox').

  2. Download prysm and executables by running the following curl command curl https://raw.githubusercontent.com/prysmaticlabs/prysm/master/prysm.sh --output prysm.sh && chmod +x prysm.sh

Configure Beaconchain Parameters with Alchemy

  1. Beaconchain params for goerli test-net ./prysm.sh beacon-chain --http-web3provider=<YOUR_ETH1_NODE_ENDPOINT> --pyrmont

  2. Configure params for beacon-chain on pyrmont using Alchemy api ./prysm.sh beacon-chain --http- ./prysm.sh beacon-chain --http-web3provider=https://eth-goerli.alchemyapi.io/v2/2YaRXLve-aMlRYD2dCSqxrMJEL4f09lY --pyrmont

Please note that I didn't have any success using the infura params listed below as demonstrated within EatTheBlock's demo; therefore, I recommend using the alternative, Alchemy API, denoted above:

./prysm.sh beacon-chain --http-web3provider=https://mainnet.infura.io/v3/258f80d63c314791bdf20abe244bd348 --pyrmont

Download Ethereum 2.0 CLI and Generate Deposit Keys

  1. Download the CLI to staging-area (eg home/alexanderjsingleton/shinebox): https://github.com/ethereum/eth2.0-deposit-cli/releases/

  2. Generate deposit-keys by running ./deposit new-mnemonic --num_validators 1 --chain pyrmont

  3. Note wallet password: (eg: boncheer)

  4. Note mnemonic keys on-file- also create a paper back-up

best fade reunion skull improve later antenna catalog discover script illegal lemon expose release memory fork pelican token pipe first area fuel gaze park

Connect metamask wallet

If you don't know how to set-up a metamask wallet, check out my blog-post or watch this dude's YouTube video; it is also covered extensively within the official pyrmont launchpad docs.

Import the Validator Keys

  1. Import the validator keys by running the following example command

./prysm.sh validator accounts import --keys-dir=$HOME/eth2.0-deposit-cli/validator_keys --pyrmont

For example

./prysm.sh validator accounts import --keys-dir=../eth2deposit-cli-ed5a6d3-linux-amd64/validator_keys --pyrmont

  1. Activate Beaconchain

Run the following command (via Alchemy API) ./prysm.sh beacon-chain --http-web3provider=https://eth-goerli.alchemyapi.io/v2/2YaRXLve-aMlRYD2dCSqxrMJEL4f09lY --pyrmont

Ensure Validator Node is Running

  1. In a separate terminal window, activate the beaconchain by running ./prysm.sh beacon-chain --http-web3provider=https://eth-goerli.alchemyapi.io/v2/2YaRXLve-aMlRYD2dCSqxrMJEL4f09lY --pyrmont
  2. Run the validator node by running the executable within the prysm directory ./prysm.sh validator --pyrmont

Keeping Prysm Updated

According to the official prysm ETH2 docs, all it takes to upgrade to the latest release is to stop your beacon node and validator with ctrl+c (wait for the process to close down gracefully, do not spam ctrl+c). Then, restart it with the same command you used to start the process. The script will automatically downloaded our latest release for you; eg for Goerli test-net ./prysm.sh validator --pyrmont.

How to Exit a Contract

Review the following docs over at Prysm Labs- please note that premature withdrawals are subject to penalty.

In order to fully exit a node, you only need the beacon-chain running in order to exit a specified contract- so basically, terminate the validator node and run the following command:

  1. ./prysm.sh validator accounts voluntary-exit-please note you do not need to append --pyrmont in order to exit the contract.
  2. Next you will be prompted to select the specified contract for exit- simply hit the down-arrow until a three-word passphrase corresponds to an account.
  3. Upon prompt, enter your wallet password.
  4. Next type 'Y' when asked to exit.
  5. Lastly, you will be prompted with the following request: "If you still want to continue with the voluntary exit, please input a phrase found at the end of the page from the above URL:" Simply enter Exit my validator.

Conclusion

Verify success by checking the corresponding beaconchain URL given after initiatinf the transaction (eg: https://pyrmont.beaconcha.in/validator/0x8bb7f1e1d3715d35d0fd997660c1efdaa18f9e8512d153342f360e555288cc37545164f58780d9a8fa3b2686782e4246#deposits)- happy staking!

If you plan to shut down your terminal-sessions logged into the Digital Ocean, you will need to configure your droplet with the necessary parameters- please visit Digital Ocean docs; however, I recommend buying a cheap laptop and running your Eth 2.0 validator node as you would by running a Bitcoin node- as of this post, you will only need a computer with 100 GB of memory and 8 GB of RAM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.