项目作者: gregbkr

项目描述 :
Deploy Ethereum 2.0 staking node with Lighthouse and Prysm client on AWS cloud (+ another secure test setup on raspberry pi 4)
高级语言: HCL
项目地址: git://github.com/gregbkr/eth2-staking.git
创建时间: 2020-10-16T14:07:12Z
项目社区:https://github.com/gregbkr/eth2-staking

开源协议:

下载


Eth2 Staking

Info

RocketPool: https://docs.rocketpool.net/guides/node/native.html#creating-service-accounts
CoinCashew: https://www.coincashew.com/coins/overview-eth/guide-or-how-to-setup-a-validator-on-eth2-testnet-prater

Install

  1. cd terraform
  2. terraform init
  3. terraform plan
  4. terraform apply

Post install steps

Log in to system via AWS console>instance>connect>Session manager>connect
Give a password to user rc and store it securely

  1. sudo -i
  2. sudo passwd rc

Then connect via classic ssh terminal

  1. ssh rc@eslastic_ip

Check that cloud-init is finished

  1. tail /var/log/cloud-init-output.log -n1000 -f

Give perm to validator system user to restart the validator

  1. sudo nano /etc/sudoers
  2. # Cmnd alias specification
  3. Cmnd_Alias RP_CMDS = /usr/bin/systemctl restart lh-validator
  4. # User privilege specification
  5. root ALL=(ALL:ALL) ALL
  6. validator ALL=(ALL) NOPASSWD: RP_CMDS

Start services

  1. sudo systemctl daemon-reload
  2. sudo systemctl enable geth lh-beacon lh-validator
  3. sudo systemctl start geth lh-beacon

Checks

Security Hardening

  • Cut firewall ssh port 22

Maintenance

GETH

Update Geth manually (https://geth.ethereum.org/downloads/)

  1. cd /tmp
  2. wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.10.16-20356e57.tar.gz
  3. tar xzf geth-linux-amd64-1.10.16-20356e57.tar.gz
  4. cp geth-linux-amd64-1.10.16-20356e57/geth /srv/geth

See logs:

  1. /srv/geth/log.sh

Lighthouse

Update LightHouse manually (https://github.com/sigp/lighthouse/releases/)

See logs:

  1. /srv/lighthouse/log.sh

Security

https://www.coincashew.com/coins/overview-eth/guide-or-how-to-setup-a-validator-on-eth2-mainnet/part-i-installation/guide-or-security-best-practices-for-a-eth2-validator-beaconchain-node