I restored my miner node with 9/15 snapshot which Phala official provided.
But when I’m syncing pherry, I met many errors that I can’t start mining,
finally I fixed them.
here’s what I’ve done:
- Extract and place extracted files to correct place as official FAQ described
- Delete
chains/khala/db
folder, this part is corrupted that can’t be used, you have to re-sync it -
cd ~ && wget https://github.com/paritytech/polkadot/releases/download/v0.9.9-1/polkadot && chmod +x polkadot
download Parity’s Polkadot - MAKE SURE YOU HAVE STOPPED
khala-node
andpherry
,pruntime
don’t need to be stopped -
./polkadot --chain "kusama" --base-path /data/khala-node/polkadot --pruning=archive
- if you’re using docker image or solo-mining script, you should
sudo ./polkadot --chain "kusama" --base-path /data/khala-node/polkadot --pruning=archive
- change
/data/khala-node
to yourkhala-node
data folder, and/polkadot
must be the end of the path, e.g. if you’re using solo-mining script, you need to change the command tosudo ./polkadot --chain "kusama" --base-path /var/khala-dev-node/polkadot --pruning=archive
- if you’re using docker image or solo-mining script, you should
- When it start, you have to waiting some minutes, then you can see it sycing data, just let it run about a minute, then
Ctrl + C
to stop it - The syncing should start ~9000000 block height, because we’re starting from the snapshot, if start from 0, check
--base-path
you must give an incorrect path - Restart
khala-node
andpherry
- You must add
--fetch-blocks 512
topherry
if you’re using official Docker Image add it toEXTRA_OPTS
like this-e EXTRA_OPTS="-r --parachain --collator-ws-endpoint=ws://localhost:9944 --fetch-blocks 512"
, solo-mining script should has been fixed by Phala team, just upgrade it - I suggest start
pherry
when you confirmkhala-node
is fully synced.
- You must add
我先用官方提供的全量备份恢复我的节点,但是同步的时候遇到了各种问题,折腾了一宿分享一下我的做法,目前我这边的节点已经没问题开挖了
- 先按官方的教程把备份给恢复了
- 把
chains/khala/db
目录删了,这部分彻底坏了,重新同步一次一两小时,等等问题不大 - 运行
cd ~ && wget https://github.com/paritytech/polkadot/releases/download/v0.9.9-1/polkadot && chmod +x polkadot
下一个官方的波卡 - 进行后边操作之前确保把
khala-node
和pherry
给停了,pruntime
可以不关 - 运行
./polkadot --chain "kusama" --base-path /data/khala-node/polkadot --pruning=archive
- 要是用 docker 或者官方那个 solo 挖矿跑的要加
sudo
像这样sudo ./polkadot --chain "kusama" --base-path /data/khala-node/polkadot --pruning=archive
- 把
/data/khala-node
改成你那边存数据的路径,结尾必须是/polkadot
,比如你用官方那个 solo 挖矿脚本,你就改成sudo ./polkadot --chain "kusama" --base-path /var/khala-dev-node/polkadot --pruning=archive
- 要是用 docker 或者官方那个 solo 挖矿跑的要加
- 等几分钟,开始应该卡一会,过会就出来在同步的信息,而且区块差不多是900多万,如果从 0 开始的,说明你
-base-path
路径给错了,让他跑一两分钟按Ctrl + C
退出 - 重启
khala-node
和pherry
- 必须给
pherry
的启动命令加上--fetch-blocks 512
,如果你用官方的 Docker 镜像,那就得加到去EXTRA_OPTS
比如这么写-e EXTRA_OPTS="-r --parachain --collator-ws-endpoint=ws://localhost:9944 --fetch-blocks 512"
,官方的 solo 挖矿脚本已经给修了,下最新版就行 - 最好是确认
khala-node
同步完了再启动pherry
- 必须给
另外,之前有老哥说 finalize 0
不动的问题,我这里没遇到,就同步完了放着十来分钟自己就好了,还不行重启一下 khala-node
之后再等等就行