Lighthouse eth node service

pull/671/head
kompotkot 2022-09-19 11:30:02 +00:00
rodzic 548a89331e
commit b24bdb0f6b
3 zmienionych plików z 32 dodań i 9 usunięć

Wyświetl plik

@ -24,8 +24,9 @@ SCRIPT_DIR="$(realpath $(dirname $0))"
# Node status server service file
NODE_STATUS_SERVER_SERVICE_FILE="node-status.service"
# Ethereum geth service file
# Ethereum service files
ETHEREUM_GETH_SERVICE_FILE="geth.service"
ETHEREUM_LIGHTHOUSE_BEACON_SERVICE_FILE="lighthousebeacon.service"
set -eu
@ -74,3 +75,12 @@ cp "${SCRIPT_DIR}/${ETHEREUM_GETH_SERVICE_FILE}" "/etc/systemd/system/${ETHEREUM
systemctl daemon-reload
systemctl disable "${ETHEREUM_GETH_SERVICE_FILE}"
echo -e "${PREFIX_WARN} Geth service updated, but not restarted!"
echo
echo
echo -e "${PREFIX_INFO} Replacing existing Ethereum Lighthouse service definition with ${ETHEREUM_LIGHTHOUSE_BEACON_SERVICE_FILE}"
chmod 644 "${SCRIPT_DIR}/${ETHEREUM_LIGHTHOUSE_BEACON_SERVICE_FILE}"
cp "${SCRIPT_DIR}/${ETHEREUM_LIGHTHOUSE_BEACON_SERVICE_FILE}" "/etc/systemd/system/${ETHEREUM_LIGHTHOUSE_BEACON_SERVICE_FILE}"
systemctl daemon-reload
systemctl disable "${ETHEREUM_LIGHTHOUSE_BEACON_SERVICE_FILE}"
echo -e "${PREFIX_WARN} Lighouse service updated, but not restarted!"

Wyświetl plik

@ -6,15 +6,9 @@ After=network.target
[Service]
Restart=on-failure
RestartSec=5s
RestartSec=10s
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
ExecStart=/usr/bin/geth --syncmode snap --cache 4096 \
--datadir /mnt/disks/nodes/ethereum \
--txpool.globalslots 153600 --txpool.globalqueue 3072 \
--http --http.api eth,web3,txpool \
--http.addr "${AWS_LOCAL_IPV4}" \
--http.port 8545 \
--http.vhosts "*"
ExecStart=/usr/bin/geth --syncmode snap --cache 4096 --datadir /mnt/disks/nodes/ethereum --txpool.globalslots 153600 --txpool.globalqueue 3072 --http --http.api eth,web3,txpool --http.addr "${AWS_LOCAL_IPV4}" --http.port 8545 --http.vhosts "*" --authrpc.jwtsecret /home/ubuntu/moonstream-secrets/jwt.hex
Type=simple
User=ubuntu
ExecStop=/bin/kill -s SIGINT -$MAINPID

Wyświetl plik

@ -0,0 +1,19 @@
[Unit]
Description=Ethereum node Lighthouse client
StartLimitIntervalSec=500
StartLimitBurst=5
After=network.target
[Service]
Restart=on-failure
RestartSec=10s
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
ExecStart=/home/ubuntu/lighthouse --network mainnet beacon_node --http --execution-endpoint http://localhost:8551 --execution-jwt /home/ubuntu/moonstream-secrets/jwt.hex --datadir /mnt/disks/nodes/ethereum/.lighthouse
Type=simple
User=ubuntu
ExecStop=/bin/kill -s SIGINT -$MAINPID
TimeoutStopSec=180
SyslogIdentifier=lighthouse
[Install]
WantedBy=multi-user.target