forked from UfukNode/geth-prysm-node-setup
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathscript.sh
More file actions
121 lines (111 loc) · 4.17 KB
/
script.sh
File metadata and controls
121 lines (111 loc) · 4.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#!/bin/bash
ORANGE='\033[0;33m'
GREEN='\033[1;32m'
CYAN='\033[0;36m'
RESET='\033[0m'
clear
echo -e "${CYAN}"
echo "██ ██ ███████ ██ ██ ██ ██"
echo "██ ██ ██ ██ ██ ██ ██ "
echo "██ ██ █████ ██ ██ █████ "
echo "██ ██ ██ ██ ██ ██ ██ "
echo "████████ ██ ███████ ██ ██"
echo -e "${RESET}"
echo -e "${GREEN}Script başlatılıyor: Ufuk tarafından hazırlanmıştır.${RESET}"
sleep 2
echo -e "${GREEN}1. Gerekli paketler kuruluyor...${RESET}"
sudo apt-get update && sudo apt-get upgrade -y
sudo apt install curl iptables build-essential git wget lz4 jq make gcc nano automake autoconf tmux htop nvme-cli libgbm1 pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip -y
echo -e "${GREEN}2. Docker kuruluyor...${RESET}"
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove -y $pkg; done
sudo apt-get install ca-certificates curl gnupg -y
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /tmp/docker.gpg && sudo mv -f /tmp/docker.gpg /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
sudo systemctl enable docker
sudo systemctl restart docker
echo -e "${GREEN}3. Dizinler oluşturuluyor...${RESET}"
mkdir -p /root/ethereum/execution
mkdir -p /root/ethereum/consensus
echo -e "${GREEN}4. JWT secret oluşturuluyor...${RESET}"
openssl rand -hex 32 > /root/ethereum/jwt.hex
echo -e "${GREEN}5. docker-compose.yml yazılıyor...${RESET}"
cat <<EOF > /root/ethereum/docker-compose.yml
version: "3.9"
services:
geth:
image: ethereum/client-go:stable
container_name: geth
restart: unless-stopped
ports:
- 30303:30303
- 30303:30303/udp
- 8545:8545
- 8546:8546
- 8551:8551
volumes:
- /root/ethereum/execution:/data
- /root/ethereum/jwt.hex:/data/jwt.hex
command:
- --sepolia
- --http
- --http.api=eth,net,web3
- --http.addr=0.0.0.0
- --authrpc.addr=0.0.0.0
- --authrpc.vhosts=*
- --authrpc.jwtsecret=/data/jwt.hex
- --authrpc.port=8551
- --syncmode=snap
- --datadir=/data
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
prysm:
image: gcr.io/prysmaticlabs/prysm/beacon-chain
container_name: prysm
restart: unless-stopped
volumes:
- /root/ethereum/consensus:/data
- /root/ethereum/jwt.hex:/data/jwt.hex
depends_on:
- geth
ports:
- 4000:4000
- 3500:3500
command:
- --sepolia
- --accept-terms-of-use
- --datadir=/data
- --disable-monitoring
- --rpc-host=0.0.0.0
- --execution-endpoint=http://geth:8551
- --jwt-secret=/data/jwt.hex
- --rpc-port=4000
- --grpc-gateway-corsdomain=*
- --grpc-gateway-host=0.0.0.0
- --grpc-gateway-port=3500
- --min-sync-peers=7
- --checkpoint-sync-url=https://checkpoint-sync.sepolia.ethpandaops.io
- --genesis-beacon-api-url=https://checkpoint-sync.sepolia.ethpandaops.io
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
EOF
echo -e "${GREEN}6. Node başlatılıyor...${RESET}"
cd /root/ethereum
docker compose up -d
echo -e "${GREEN}"
echo "✔ Node'lar şu anda senkronize olmaya başladı."
echo "⏳ Senkronizasyon birkaç saat sürebilir. Lütfen bu sürede node'ları durdurmayın."
echo ""
echo "🔗Adımları Takip Edin: https://github.com/UfukNode/ufuk-geth-prysm-installer"
echo ""
echo "⚠️ Aztec Sequencer başlatmadan önce hem Geth hem de Prysm node'larının TAM senkronize olduğundan emin olun."
echo -e "${RESET}"