配置ETH 2.0 同步节点 Nethermind & Prysm

ETH 2.0 节点分为执行客户端共识客户端验证软件,同步数据节点无论是快照同步还是完整存档,都需要同步启动执行客户端共识客户端

  1. 安装配置执行客户端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
  1. 安装配置共识客户端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
  1. 验证检查点正确性

在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/

posted @ 2022-11-08 15:59  至尊王者  阅读(785)  评论(0编辑  收藏  举报