Skip to content

Instantly share code, notes, and snippets.

@BunHouth
Last active April 21, 2021 06:45
Show Gist options
  • Save BunHouth/4be0907fcaf1d6aa806f0f30c91bdf8b to your computer and use it in GitHub Desktop.
Save BunHouth/4be0907fcaf1d6aa806f0f30c91bdf8b to your computer and use it in GitHub Desktop.

Change key pair permission after download

chmod 600 keypair_name.pem

Creating a swap memory

Change count base on your main RAM size

sudo apt-get -y update
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=4096
sudo /sbin/mkswap /var/swap.1
sudo /sbin/swapon /var/swap.1

then add this line of code in to your /etc/fstab:

 echo "/var/swap.1 swap swap defaults 0 0" >> /etc/fstab 

check swipe size

sudo swapon --show
wget -c https://golang.org/dl/go1.16.3.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local
echo export PATH=$PATH:/usr/local/go/bin>> ~/.profile
source ~/.profile
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install ethereum

Install Go Ethereum

go get -d github.com/ethereum/go-ethereum
go install github.com/ethereum/go-ethereum/cmd/geth@latest
geth --goerli

After it running just quick service. This just testing to make sure it running

geth --goerli

After it running just quick service. This just testing to make sure it running

mkdir prysm && cd prysm
curl https://raw.githubusercontent.com/prysmaticlabs/prysm/master/prysm.sh --output prysm.sh && chmod +x prysm.sh

sync ETH node can take some time

geth --datadir="$HOME/Mainnet" --http

sync ETH node using background process

mkdir eth_service && cd eth_service
touch geth_eth.service

Add Content To geth_eth.service

[Unit]
Description=Ethereum go client

[Service]
Type=simple
ExecStart=/usr/bin/geth --datadir="$HOME/Mainnet" --http
StandardOutput=append:/home/ubuntu/.ethereum/geth.log
StandardError=append:/home/ubuntu/.ethereum/geth.error.log

[Install]
WantedBy=default.target

Enable service

systemctl --user enable ~/eth_service/geth_eth.service
systemctl --user start geth_eth.service

Check Service Status

systemctl --user status geth_eth.service

You should wait for your node to sync

then connect to your eth1 node with:

cd ~/prysm
./prysm.sh beacon-chain --http-web3provider=$HOME/Mainnet/geth.ipc

this can take time and must keep it running

User Background Service to connect with node

cd ~/eth_service
touch prysm_beacon.service

Add Content To prysm_beacon.service

[Unit]
Description=Prysm beacon chain

[Service]
Type=simple
WorkingDirectory=/home/ubuntu/prysm
ExecStart=/bin/bash /home/ubuntu/prysm/prysm.sh beacon-chain --http-web3provider=$HOME/Mainnet/geth.ipc --pyrmont
StandardOutput=append:/home/ubuntu/.ethereum/prysm_beacon.log
StandardError=append:/home/ubuntu/.ethereum/prysm_beacon.error.log

[Install]
WantedBy=default.target

Enable service

systemctl --user enable ~/eth_service/prysm_beacon.service
systemctl --user start prysm_beacon.service

Download Link Please check document for more usage

cd ~/Downloads
./deposit new-mnemonic --num_validators 1 --chain prater

__please change $HOME/eth2.0-deposit-cli/validator_keys base on your keystore path

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

please keep this running 24/7

cd ~/prysm
./prysm.sh validator --pyrmont
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment