You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何解决prysm.sh beacon-chain同步进度卡在99%的问题?

以太坊合并后Geth停止运行,Beacon节点同步卡在99%的处理方案

问题场景

以太坊合并(The Merge)后Geth停止运行,尝试通过Prysm Beacon链节点修复时,同步进度卡在99%。执行的启动命令:

prysm.sh beacon-chain --execution-endpoint=http://localhost:8551 --datadir=/disk1/prysm/.eth2

相关日志

[2022-09-20 13:05:11]  INFO initial-sync: Processing block batch of size 63 starting from  0x35967a9b... 4700032/4737924 - estimated time remaining 22m9s blocksPerSecond=28.5 peers=47 
[2022-09-20 13:05:11]  WARN initial-sync: Skip processing batched blocks error=beacon node doesn't have a parent in db with root: 0x97b0b7b53582569689c52dbee87990ea2d7a94b17ee823e704c99d07e81b5376 (in processBatchedBlocks, slot=4700032) 
[2022-09-20 13:05:11]  INFO initial-sync: Processing block batch of size 63 starting from  0x063c579d... 4700096/4737924 - estimated time remaining 19m55s blocksPerSecond=31.6 peers=47 
[2022-09-20 13:05:11]  WARN initial-sync: Skip processing batched blocks error=beacon node doesn't have a parent in db with root: 0x91593f4ce1da4260a4475807af54ada66481b2e5529859fbcdd636c59966ac5d (in processBatchedBlocks, slot=4700096) 
[2022-09-20 13:05:11]  INFO initial-sync: Processing block batch of size 62 starting from  0xe5a59df5... 4700160/4737924 - estimated time remaining 18m6s blocksPerSecond=34.8 peers=47 
[2022-09-20 13:05:11]  WARN initial-sync: Skip processing batched blocks error=beacon node doesn't have a parent in db with root: 0x099ce628bdb98cd34673e06f779a695a9fa903472f95f778a823c4b271296669 (in processBatchedBlocks, slot=4700160) 
[2022-09-20 13:05:11]  INFO initial-sync: Processing block batch of size 64 starting from  0xf0b0a565... 4700224/4737924 - estimated time remaining 16m33s blocksPerSecond=38.0 peers=47 
[2022-09-20 13:05:11]  WARN initial-sync: Skip processing batched blocks error=beacon node doesn't have a parent in db with root: 0x6a644e5ce7eb9063ac0334eb070469ffe1babef71b42fc295a0098410c8509ff (in processBatchedBlocks, slot=4700224) 
[2022-09-20 13:05:11]  INFO initial-sync: Processing block batch of size 64 starting from  0x4aef416e... 4700288/4737924 - estimated time remaining 15m14s blocksPerSecond=41.1 peers=47 
[2022-09-20 13:05:11]  WARN initial-sync: Skip processing batched blocks error=beacon node doesn't have a parent in db with root: 0xa165b5186776ed6adbeffbe7f9861a25cfe9e9a79b79fbf63c44f0f3f0fd2433 (in processBatchedBlocks, slot=4700288) 
[2022-09-20 13:05:11]  INFO initial-sync: Processing block batch of size 64 starting from  0xe2ad65e3... 4700352/4737924 - estimated time remaining 14m7s blocksPerSecond=44.4 peers=47 
[2022-09-20 13:05:11]  WARN initial-sync: Skip processing batched blocks error=beacon node doesn't have a parent in db with root: 0x0d5b8ab2983591a9dd27b6b6b99540f75de7a6b7f88dfe6dd83ac5e8316b0d79 (in processBatchedBlocks, slot=4700352) 
[2022-09-20 13:05:11]  INFO initial-sync: Processing block batch of size 63 starting from  0xe08fde61... 4700416/4737924 - estimated time remaining 13m9s blocksPerSecond=47.5 peers=47 
[2022-09-20 13:05:11]  WARN initial-sync: Skip processing batched blocks error=beacon node doesn't have a parent in db with root: 0xb493b115a9e7dadff196d1fd9092c477b3503a148983a6cd37111a00ba526862 (in processBatchedBlocks, slot=4700416)

问题分析

日志中重复出现的WARN信息明确指向核心问题:Beacon节点本地数据库中缺少待处理区块的父节点数据,导致批量区块处理被跳过,同步无法正常推进到100%。这种情况通常是合并过程中节点数据同步中断、数据库损坏,或者执行层(Geth)与共识层(Prysm)数据不一致导致的。

处理步骤

  • 验证执行层节点状态:确保Geth已完成合并后的全量同步并正常运行,检查http://localhost:8551端点的连通性:
    curl http://localhost:8551/eth/v1/node/health
    
    返回{"status":"OK"}则说明端点正常。
  • 重置共识层同步数据:删除Prysm本地损坏的Beacon链数据(注意备份验证密钥等关键数据),重新启动同步:
    rm -rf /disk1/prysm/.eth2/beaconchaindata
    prysm.sh beacon-chain --execution-endpoint=http://localhost:8551 --datadir=/disk1/prysm/.eth2
    
  • 优化节点连接:当前日志显示Peers数为47,可尝试重启Beacon节点获取更多可靠同步节点,确保节点能从不同Peer获取完整的区块数据。
  • 核对合并配置:确认Geth启动时已启用--authrpc.port=8551,且Prysm的--execution-endpoint参数准确指向Geth的Auth RPC端点,避免跨层通信异常。
  • 等待同步策略切换:Prysm在同步后期会从批量同步切换为逐块同步,此时进度可能暂时停滞,可等待30分钟以上观察是否自动恢复。

内容的提问来源于stack exchange,提问作者dongfeng012

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.18 23:50:44