Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions distros/raspberry_pi/config-consensus.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,17 @@ bnm=false
# Execution endpoint address
exec_url=http://eop-exec.local:8551

# Ethereum network: mainnet/holesky/sepolia
eth_network=mainnet

[geth]
geth_port=30303

[nimbus]
nimbus_port=9000
# Ethereum network: mainnet/holesky/sepolia
nimbus_network=mainnet

[lighthouse]
lighthouse_port=9000
# Ethereum network: mainnet/holesky/sepolia
lighthouse_network=mainnet

# End of Web3 Pi config

Expand Down
7 changes: 3 additions & 4 deletions distros/raspberry_pi/config-exec.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,17 @@ bnm=false
# Execution endpoint address
exec_url=http://localhost:8551

# Ethereum network: mainnet/holesky/sepolia
eth_network=mainnet

[geth]
geth_port=30303

[nimbus]
nimbus_port=9000
# Ethereum network: mainnet/holesky/sepolia
nimbus_network=mainnet

[lighthouse]
lighthouse_port=9000
# Ethereum network: mainnet/holesky/sepolia
lighthouse_network=mainnet

# End of Web3 Pi config

Expand Down
7 changes: 3 additions & 4 deletions distros/raspberry_pi/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,17 @@ bnm=true
# Execution endpoint address
exec_url=http://localhost:8551

# Ethereum network: mainnet/holesky/sepolia
eth_network=mainnet

[geth]
geth_port=30303

[nimbus]
nimbus_port=9000
# Ethereum network: mainnet/holesky/sepolia
nimbus_network=mainnet

[lighthouse]
lighthouse_port=9000
# Ethereum network: mainnet/holesky/sepolia
lighthouse_network=mainnet

# End of Web3 Pi config

Expand Down
8 changes: 7 additions & 1 deletion distros/raspberry_pi/geth/geth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ set_status() {
echolog " "
}

echolog "Geth run script (geth.sh)"

geth_port="$(config_get geth_port)";
eth_network="$(config_get eth_network)";

# Checking internet connection
echolog "Checking internet connection"
Expand All @@ -67,9 +70,12 @@ while [ $? -ne 0 ]; do
ping -c 1 $pingServerAdr > /dev/null 2>&1
done

echolog "$(date): Connected - ${pingServerAdr}"
echolog "geth_port = ${geth_port}"
echolog "eth_network = ${eth_network}"

echolog "$(date): Connected - ${pingServerAdr}"
echolog "geth_port = ${geth_port}"

echolog "Run Geth"
geth --authrpc.port 8551 --authrpc.addr 0.0.0.0 --authrpc.vhosts '*' --discovery.port ${geth_port} --port ${geth_port} --authrpc.jwtsecret /home/ethereum/clients/secrets/jwt.hex --datadir /mnt/storage/.ethereum --ws --ws.port 8546 --ws.addr 0.0.0.0 --ws.origins '*' --http --http.port 8545 --http.addr 0.0.0.0 --http.vhosts '*' --http.corsdomain '*' --state.scheme=path
geth --${eth_network} --authrpc.port 8551 --authrpc.addr 0.0.0.0 --authrpc.vhosts '*' --discovery.port ${geth_port} --port ${geth_port} --authrpc.jwtsecret /home/ethereum/clients/secrets/jwt.hex --datadir /mnt/storage/.ethereum --ws --ws.port 8546 --ws.addr 0.0.0.0 --ws.origins '*' --http --http.port 8545 --http.addr 0.0.0.0 --http.vhosts '*' --http.corsdomain '*' --http.api eth,net,web3 --state.scheme=path
7 changes: 4 additions & 3 deletions distros/raspberry_pi/lighthouse/lighthouse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ set_status() {
echolog " "
}

echolog "Lighthouse run script (lighthouse.sh)"

lighthouse_port="$(config_get lighthouse_port)";
lighthouse_network="$(config_get lighthouse_network)";
eth_network="$(config_get eth_network)";
exec_url="$(config_get exec_url)";


Expand All @@ -77,8 +78,8 @@ source /opt/web3pi/Ethereum-On-Raspberry-Pi/distros/raspberry_pi/scripts/ping_se
echolog "$(date): Connected - ${pingServerAdr}"
echolog "exec_url = ${exec_url}"
echolog "lighthouse_port = ${lighthouse_port}"
echolog "lighthouse_network = ${lighthouse_network}"
echolog "eth_network = ${eth_network}"
echolog "best_server = ${best_server} ($best_ping ms)"

echolog "Run Lighthouse beacon node"
lighthouse bn --network ${lighthouse_network} --execution-endpoint ${exec_url} --execution-jwt /home/ethereum/clients/secrets/jwt.hex --checkpoint-sync-url ${best_server} --datadir /mnt/storage/.lighthouse --disable-deposit-contract-sync --http --http-address 0.0.0.0 --http-port 5052 --port ${lighthouse_port}
lighthouse bn --network ${eth_network} --execution-endpoint ${exec_url} --execution-jwt /home/ethereum/clients/secrets/jwt.hex --checkpoint-sync-url ${best_server} --datadir /mnt/storage/.lighthouse --disable-deposit-contract-sync --http --http-address 0.0.0.0 --http-port 5052 --port ${lighthouse_port}
14 changes: 8 additions & 6 deletions distros/raspberry_pi/nimbus/nimbus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ calculate_average_ping() {
echo "$avg_ping"
}

echolog "Nimbus run script (nimbus.sh)"

nimbus_port="$(config_get nimbus_port)";
exec_url="$(config_get exec_url)";
nimbus_network="$(config_get nimbus_network)";
eth_network="$(config_get eth_network)";

# Checking internet connection
echolog "Checking internet connection"
Expand All @@ -79,16 +81,16 @@ done


# Directory for Nimbus
nimbus_dir="/mnt/storage/.nimbus/data/shared_${nimbus_network}_0"
nimbus_dir="/mnt/storage/.nimbus/data/shared_${eth_network}_0"

echolog "$(date): Connected - ${pingServerAdr}"
echolog "exec_url = ${exec_url}"
echolog "nimbus_port = ${nimbus_port}"
echolog "nimbus_network = ${nimbus_network}"
echolog "eth_network = ${eth_network}"
echolog "nimbus_dir = ${nimbus_dir}"

# File with the list of servers
SERVERS_FILE="/opt/web3pi/Ethereum-On-Raspberry-Pi/distros/raspberry_pi/scripts/servers_list_${nimbus_network}.txt"
SERVERS_FILE="/opt/web3pi/Ethereum-On-Raspberry-Pi/distros/raspberry_pi/scripts/servers_list_${eth_network}.txt"

if [ -f "${SERVERS_FILE}" ]; then
echolog "SERVERS_FILE = ${SERVERS_FILE}"
Expand All @@ -110,7 +112,7 @@ while read -r server; do
echolog "Average ping = $avg_ping ms"

# Run the Nimbus beacon node command and display output in real time
output=$(nimbus_beacon_node trustedNodeSync --network=${nimbus_network} --data-dir="$nimbus_dir" --trusted-node-url="$server" --backfill=false 2>&1)
output=$(nimbus_beacon_node trustedNodeSync --network=${eth_network} --data-dir="$nimbus_dir" --trusted-node-url="$server" --backfill=false 2>&1)
# output=$(nimbus_beacon_node trustedNodeSync --network=mainnet --data-dir="$nimbus_dir" --trusted-node-url="$server" --backfill=false 2>&1 | tee /dev/tty)

# Searching for a line containing 'horizon' and extracting the value.
Expand All @@ -134,7 +136,7 @@ done < "$SERVERS_FILE"
# If the trustedNodeSync was successful
if [ "$success" = true ]; then
echolog "Run Nimbus beacon node"
nimbus_beacon_node --non-interactive --tcp-port=${nimbus_port} --udp-port=${nimbus_port} --el=${exec_url} --network=${nimbus_network} --data-dir=${nimbus_dir} --jwt-secret=/home/ethereum/clients/secrets/jwt.hex --rest=true --rest-port=5052 --rest-address=0.0.0.0 --rest-allow-origin='*' --enr-auto-update
nimbus_beacon_node --non-interactive --tcp-port=${nimbus_port} --udp-port=${nimbus_port} --el=${exec_url} --network=${eth_network} --data-dir=${nimbus_dir} --jwt-secret=/home/ethereum/clients/secrets/jwt.hex --rest=true --rest-port=5052 --rest-address=0.0.0.0 --rest-allow-origin='*' --enr-auto-update
else
# If no server was successful
echolog "All servers failed to complete the trustedNodeSync."
Expand Down
2 changes: 1 addition & 1 deletion distros/raspberry_pi/rc.local
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Web3 Pi - rc.local
#

BRANCH="main"
BRANCH="v0.7.4"

# Function: echolog
# Description: Logs messages with a timestamp prefix. If no arguments are provided,
Expand Down