Last active
July 6, 2022 16:03
-
-
Save yoyoismee/ebdcd1899d274c869385ec86126b06c9 to your computer and use it in GitHub Desktop.
set up geth lighthouse validatorKey validator for kiln test net
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "hey you know that run a script with out reading is a bad idea right? | |
script by yoyoismee.eth | |
modified from remyroy, ethstaker" | |
read test | |
echo "eh! did you read that. are you sure that you wanna run this? have you read?!?" | |
read test | |
echo "If I'm a hacker you'll be rekt by now you know that right?" | |
read test | |
# general | |
sudo apt -y update | |
sudo apt -y upgrade | |
sudo apt -y install software-properties-common wget curl ccze | |
# GETH | |
sudo add-apt-repository -y ppa:ethereum/ethereum | |
sudo apt -y install geth | |
sudo useradd --no-create-home --shell /bin/false goeth | |
sudo mkdir -p /var/lib/goethereum | |
sudo chown -R goeth:goeth /var/lib/goethereum | |
sudo echo "[Unit] | |
Description=Go Ethereum Client - Geth (Kiln) | |
After=network.target | |
Wants=network.target | |
[Service] | |
User=goeth | |
Group=goeth | |
Type=simple | |
Restart=always | |
RestartSec=5 | |
TimeoutStopSec=180 | |
ExecStart=geth \ | |
--kiln \ | |
--http \ | |
--datadir /var/lib/goethereum \ | |
--metrics \ | |
--metrics.expensive \ | |
--pprof \ | |
--http.api="engine,eth,web3,net,debug" \ | |
--http.corsdomain "*" \ | |
--http.addr "0.0.0.0" \ | |
--authrpc.jwtsecret=/var/lib/goethereum/jwtsecret \ | |
--bootnodes "enode://c354db99124f0faf677ff0e75c3cbbd568b2febc186af664e0c51ac435609badedc67a18a63adb64dacc1780a28dcefebfc29b83fd1a3f4aa3c0eb161364cf94@164.92.130.5:30303" | |
[Install] | |
WantedBy=default.target | |
" >> /etc/systemd/system/geth.service | |
sudo systemctl daemon-reload | |
sudo systemctl start geth.service | |
# sudo systemctl status geth.service | |
sudo nano /etc/systemd/system/geth.service | |
# lighthouse | |
cd ~ | |
wget https://github.com/sigp/lighthouse/releases/download/v2.3.0-rc.0/lighthouse-v2.3.0-rc.0-x86_64-unknown-linux-gnu.tar.gz | |
tar xvf lighthouse-v2.3.0-rc.0-x86_64-unknown-linux-gnu.tar.gz | |
rm lighthouse-v2.3.0-rc.0-x86_64-unknown-linux-gnu.tar.gz | |
sudo cp ~/lighthouse /usr/local/bin | |
rm ~/lighthouse | |
sudo useradd --no-create-home --shell /bin/false lighthousebeacon | |
sudo mkdir -p /var/lib/lighthouse | |
sudo chown -R lighthousebeacon:lighthousebeacon /var/lib/lighthouse | |
sudo echo "[Unit] | |
Description=Lighthouse Ethereum Client Beacon Node (Kiln) | |
Wants=network-online.target | |
After=network-online.target | |
[Service] | |
Type=simple | |
User=lighthousebeacon | |
Group=lighthousebeacon | |
Restart=always | |
RestartSec=5 | |
ExecStart=/usr/local/bin/lighthouse bn \ | |
--network kiln \ | |
--datadir /var/lib/lighthouse \ | |
--staking \ | |
--http-allow-sync-stalled \ | |
--merge \ | |
--execution-endpoints http://127.0.0.1:8551 \ | |
--metrics \ | |
--validator-monitor-auto \ | |
--jwt-secrets="/var/lib/goethereum/jwtsecret" \ | |
--boot-nodes="enr:-Iq4QMCTfIMXnow27baRUb35Q8iiFHSIDBJh6hQM5Axohhf4b6Kr_cOCu0htQ5WvVqKvFgY28893DHAg8gnBAXsAVqmGAX53x8JggmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk" | |
[Install] | |
WantedBy=multi-user.target | |
" >> /etc/systemd/system/lighthousebeacon.service | |
sudo chmod +r /var/lib/goethereum/jwtsecret | |
sudo systemctl daemon-reload | |
sudo systemctl start lighthousebeacon.service | |
# sudo systemctl status lighthousebeacon.service | |
sudo systemctl enable lighthousebeacon.service | |
# validator | |
cd ~ | |
wget https://github.com/ethereum/staking-deposit-cli/releases/download/v2.2.0/staking_deposit-cli-9ab0b05-linux-amd64.tar.gz | |
tar xvf staking_deposit-cli-9ab0b05-linux-amd64.tar.gz | |
cd staking_deposit-cli-9ab0b05-linux-amd64/ | |
./deposit new-mnemonic --num_validators 1 --chain kiln | |
ls -d $PWD/validator_keys/* | |
sudo useradd --no-create-home --shell /bin/false lighthousevalidator | |
sudo mkdir -p /var/lib/lighthouse/validators | |
sudo chown -R lighthousevalidator:lighthousevalidator /var/lib/lighthouse/validators | |
sudo chmod 700 /var/lib/lighthouse/validators | |
sudo /usr/local/bin/lighthouse account validator import \ | |
--directory ~/staking_deposit-cli-9ab0b05-linux-amd64/validator_keys/ \ | |
--datadir /var/lib/lighthouse \ | |
--network kiln | |
sudo chown -R lighthousevalidator:lighthousevalidator /var/lib/lighthouse/validators | |
sudo echo " | |
[Unit] | |
Description=Lighthouse Ethereum Client Validator Client (Kiln) | |
Wants=network-online.target | |
After=network-online.target | |
[Service] | |
User=lighthousevalidator | |
Group=lighthousevalidator | |
Type=simple | |
Restart=always | |
RestartSec=5 | |
ExecStart=/usr/local/bin/lighthouse vc \ | |
--network kiln \ | |
--datadir /var/lib/lighthouse \ | |
--graffiti EthStaker \ | |
--metrics \ | |
--suggested-fee-recipient 0x6647a7858a0B3846AbD5511e7b797Fc0a0c63a4b | |
[Install] | |
WantedBy=multi-user.target" >> /etc/systemd/system/lighthousevalidator.service | |
sudo systemctl daemon-reload | |
sudo systemctl start lighthousevalidator.service | |
sudo systemctl status lighthousevalidator.service | |
sudo systemctl enable lighthousevalidator.service | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ez