JOC'ye Düğüm Bağlama
Bu doküman, kullanıcı ortamında bir Geth düğümünün nasıl oluşturulacağı ve Japan Open Chain Mainnet ve Testnet'e nasıl bağlanılacağına dair adımları içerir. RPC Endpoints kullanarak dApps bağlantısı kurmak isteyenler burayı inceleyebilir.
- Mainnet
- Testnet
JOC Mainnet'e Düğüm Bağlama
Bağlantı süreci aşağıdaki gibidir:
- 1. Gerekli Paketlerin Kurulumu
- 2. Veri Dizinlerinin Oluşturulması
- 3. Yapıland ırma Dosyalarının İndirilmesi
- 4. İstemcilerin Kurulumu
- 5. JWT Secret Oluşturma
- 6. Geth'in Başlatılması (init)
- 7. Geth'i Çalıştırma
- 8. Lighthouse'u Çalıştırma
- 9. Doğrulama
1. Gerekli Paketlerin Kurulumu
# Ubuntu / Debian
sudo apt-get update
sudo apt-get install -y curl openssl
# Amazon Linux 2023 / RHEL tabanlı
sudo dnf install -y curl openssl
2. Veri Dizinlerinin Oluşturulması
sudo mkdir -p /data/ethereum
sudo mkdir -p /data/ethereum/consensus/config
3. Yapılandırma Dosyalarının İndirilmesi
Aşağıdaki dosyaları indirin ve doğru konumlara kopyalayın:
| Dosya | Bağlantı |
|---|---|
genesis.json | Görüntüle |
config.yaml | Görüntüle |
genesis.ssz | İndir |
deposit_contract.txt | Görüntüle |
deposit_contract_block.txt | Görüntüle |
# genesis.json -> /data/ethereum/genesis.json
# config.yaml -> /data/ethereum/consensus/config/config.yaml
# genesis.ssz -> /data/ethereum/consensus/config/genesis.ssz
# deposit_contract_block.txt -> /data/ethereum/consensus/config/deposit_contract_block.txt
4. İstemcilerin Kurulumu
Geth (Yürütme İstemcisi, v1.13.5 ile doğrulandı):
https://geth.ethereum.org/docs/getting-started/installing-geth
Şu anda Geth v1.14.0 veya sonrası desteklenmemektedir.
Lighthouse (Konsensüs İstemcisi, v7.0.1 ile doğrulandı):
https://lighthouse-book.sigmaprime.io/installation.html
5. JWT Secret Oluşturma
JWT secret, Geth ve Lighthouse arasındaki dahili iletişimin kimlik doğrulamasını sağlar. Yalnızca bir kez oluşturulur:
openssl rand -hex 32 | tr -d "\n" > /data/ethereum/jwtsecret
chmod 644 /data/ethereum/jwtsecret
6. Geth'in Başlatılması (init)
geth init \
--datadir=/data/ethereum \
/data/ethereum/genesis.json
Bu komut yalnızca bir kez çalıştırılır.
7. Geth'i Çalıştırma
Güncel BootNode listesi enodes.yaml adresinden alınır.
geth --datadir=/data/ethereum \
--networkid=81 \
--http \
--authrpc.vhosts="*" \
--authrpc.addr=127.0.0.1 \
--authrpc.jwtsecret=/data/ethereum/jwtsecret \
--bootnodes="$BOOTNODES"
8. Lighthouse'u Çalıştırma
Güncel Boot ENR listesi bootstrap_nodes.yaml adresinden alınır.
lighthouse beacon_node \
--datadir=/data/ethereum/consensus \
--http \
--execution-endpoint=http://127.0.0.1:8551 \
--execution-jwt=/data/ethereum/jwtsecret \
--testnet-dir=/data/ethereum/consensus/config \
--boot-nodes="$BOOT_ENRS"
9. Doğrulama
Geth senkronizasyon durumunu kontrol edin:
curl -s -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}'
# false → senkronizasyon tamamlandı
# object → senkronizasyon sürüyor, currentBlock / highestBlock gösterilir
Lighthouse senkronizasyon durumunu kontrol edin:
curl -s http://localhost:5052/eth/v1/node/peer_count
"Looking for peers" mesajı devam ederse, bağlantının sağlanmadığını gösterir. bootnode/ENR değerlerini ve güvenlik duvarı ayarlarınızı kontrol edin (Geth için 30303 TCP+UDP portları, Lighthouse için 9000 TCP+UDP portu).
Keşif Aracı
JOC Testnet'e Düğüm Bağlama
Bağlantı süreci aşağıdaki gibidir:
- 1. Gerekli Paketlerin Kurulumu
- 2. Veri Dizinlerinin Oluşturulması
- 3. Yapılandırma Dosyalarının İndirilmesi
- 4. İstemcilerin Kurulumu
- 5. JWT Secret Oluşturma
- 6. Geth'in Başlatılması (init)
- 7. Geth'i Çalıştırma
- 8. Lighthouse'u Çalıştırma
- 9. Doğrulama
1. Gerekli Paketlerin Kurulumu
# Ubuntu / Debian
sudo apt-get update
sudo apt-get install -y curl openssl
# Amazon Linux 2023 / RHEL tabanlı
sudo dnf install -y curl openssl
2. Veri Dizinlerinin Oluşturulması
sudo mkdir -p /data/ethereum
sudo mkdir -p /data/ethereum/consensus/config
3. Yapılandırma Dosyalarının İndirilmesi
Aşağıdaki dosyaları indirin ve doğru konumlara kopyalayın:
| Dosya | Bağlantı |
|---|---|
genesis.json | Görüntüle |
config.yaml | Görüntüle |
genesis.ssz | İndir |
deposit_contract.txt | Görüntüle |
deposit_contract_block.txt | Görüntüle |
# genesis.json -> /data/ethereum/genesis.json
# config.yaml -> /data/ethereum/consensus/config/config.yaml
# genesis.ssz -> /data/ethereum/consensus/config/genesis.ssz
# deposit_contract_block.txt -> /data/ethereum/consensus/config/deposit_contract_block.txt
4. İstemcilerin Kurulumu
Geth (Yürütme İstemcisi, v1.13.5 ile doğrulandı):
https://geth.ethereum.org/docs/getting-started/installing-geth
Lighthouse (Konsensüs İstemcisi, v7.0.1 ile doğrulandı):
https://lighthouse-book.sigmaprime.io/installation.html
5. JWT Secret Oluşturma
JWT secret, Geth ve Lighthouse arasındaki dahili iletişimin kimlik doğrulamasını sağlar. Yalnızca bir kez oluşturulur:
openssl rand -hex 32 | tr -d "\n" > /data/ethereum/jwtsecret
chmod 644 /data/ethereum/jwtsecret
6. Geth'in Başlatılması (init)
geth init \
--datadir=/data/ethereum \
/data/ethereum/genesis.json
Bu komut yalnızca bir kez çalıştırılır.
7. Geth'i Çalıştırma
Güncel BootNode listesi enodes.yaml adresinden alınır.
geth --datadir=/data/ethereum \
--networkid=361257328 \
--http \
--authrpc.vhosts="*" \
--authrpc.addr=127.0.0.1 \
--authrpc.jwtsecret=/data/ethereum/jwtsecret \
--bootnodes="$BOOTNODES"
8. Lighthouse'u Çalıştırma
Güncel Boot ENR listesi bootstrap_nodes.yaml adresinden alınır.
lighthouse beacon_node \
--datadir=/data/ethereum/consensus \
--http \
--execution-endpoint=http://127.0.0.1:8551 \
--execution-jwt=/data/ethereum/jwtsecret \
--testnet-dir=/data/ethereum/consensus/config \
--boot-nodes="$BOOT_ENRS"
9. Doğrulama
Geth senkronizasyon durumunu kontrol edin:
curl -s -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}'
# false → senkronizasyon tamamlandı
# object → senkronizasyon sürüyor, currentBlock / highestBlock gösterilir
Lighthouse senkronizasyon durumunu kontrol edin:
curl -s http://localhost:5052/eth/v1/node/peer_count
"Looking for peers" mesajı devam ederse, bağlantının sağlanmadığını gösterir. bootnode/ENR değerlerini ve güvenlik duvarı ayarlarınızı kontrol edin (Geth için 30303 TCP+UDP portları, Lighthouse için 9000 TCP+UDP portu).