kopia lustrzana https://github.com/bugout-dev/moonstream
Lighthouse eth node service
rodzic
548a89331e
commit
b24bdb0f6b
|
@ -24,8 +24,9 @@ SCRIPT_DIR="$(realpath $(dirname $0))"
|
||||||
# Node status server service file
|
# Node status server service file
|
||||||
NODE_STATUS_SERVER_SERVICE_FILE="node-status.service"
|
NODE_STATUS_SERVER_SERVICE_FILE="node-status.service"
|
||||||
|
|
||||||
# Ethereum geth service file
|
# Ethereum service files
|
||||||
ETHEREUM_GETH_SERVICE_FILE="geth.service"
|
ETHEREUM_GETH_SERVICE_FILE="geth.service"
|
||||||
|
ETHEREUM_LIGHTHOUSE_BEACON_SERVICE_FILE="lighthousebeacon.service"
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
@ -74,3 +75,12 @@ cp "${SCRIPT_DIR}/${ETHEREUM_GETH_SERVICE_FILE}" "/etc/systemd/system/${ETHEREUM
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl disable "${ETHEREUM_GETH_SERVICE_FILE}"
|
systemctl disable "${ETHEREUM_GETH_SERVICE_FILE}"
|
||||||
echo -e "${PREFIX_WARN} Geth service updated, but not restarted!"
|
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!"
|
||||||
|
|
|
@ -6,15 +6,9 @@ After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5s
|
RestartSec=10s
|
||||||
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
ExecStart=/usr/bin/geth --syncmode snap --cache 4096 \
|
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
|
||||||
--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 "*"
|
|
||||||
Type=simple
|
Type=simple
|
||||||
User=ubuntu
|
User=ubuntu
|
||||||
ExecStop=/bin/kill -s SIGINT -$MAINPID
|
ExecStop=/bin/kill -s SIGINT -$MAINPID
|
||||||
|
|
|
@ -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
|
Ładowanie…
Reference in New Issue