ETH 2.0 節點分爲執行客戶端
、共識客戶端
、驗證軟件
,同步數據節點無論是快照同步
還是完整存檔
,都需要同步啓動執行客戶端
和共識客戶端
。
- 安裝配置執行客戶端
Nethermind
sudo apt-get update && sudo apt-get install libsnappy-dev libc6-dev libc6 unzip
wget https://github.com/NethermindEth/nethermind/releases/download/1.14.5/nethermind-linux-amd64-1.14.5-380bf9c-20221029.zip
unzip nethermind-linux-amd64-1.14.5-380bf9c-20221029.zip -d nethermind
添加下面配置到nethermind/configs/mainnet.cfg
"JsonRpc": {
"Enabled": true,
"Timeout": 20000,
"Host": "127.0.0.1",
"Port": 8545,
"EnabledModules": ["Eth", "Subscribe", "Trace", "TxPool", "Web3", "Personal", "Proof", "Net", "Parity", "Health"],
"EnginePort": 8551,
"EngineHost": "127.0.0.1",
"JwtSecretFile": "keystore/jwt-secret"
},
啓動Nethermind
cd nethermind
./Nethermind.Launcher
# 選擇具體配置,或者
./Nethermind.Runner --config mainnet
- 安裝配置共識客戶端
Prysm
mkdir prysm && cd prysm
curl https://raw.githubusercontent.com/prysmaticlabs/prysm/master/prysm.sh --output prysm.sh && chmod +x prysm.sh
./prysm.sh beacon-chain --datadir ./data --execution-endpoint=http://localhost:8551 --jwt-secret=~/nethermind/keystore/jwt-secret --checkpoint-sync-url=https://beaconstate.ethstaker.cc
--genesis-beacon-api-url=https://beaconstate.ethstaker.cc
# 如果要做驗證者,需要添加參數 --suggested-fee-recipient=0x01234567722E6b0000012BFEBf6177F1D2e9758D9
- 驗證檢查點正確性
在https://beaconstate.ethstaker.cc/上確認slot編號對應的State root. 如果一致,表明所使用的檢查點是正確的。
curl -s http://127.0.0.1:3500/eth/v1/beacon/headers/finalized | jq .'data.header.message'
執行客戶端 {#execution-clients}
https://github.com/hyperledger/besu/releases
https://geth.ethereum.org/downloads/
https://downloads.nethermind.io/
共識客戶端 {#consensus-clients}
https://github.com/sigp/lighthouse/releases/latest
https://github.com/status-im/nimbus-eth2/releases/latest
https://github.com/prysmaticlabs/prysm/releases/latest
可信檢查點列表
https://eth-clients.github.io/checkpoint-sync-endpoints/