錯誤信息:
########## BAD BLOCK #########
Chain config: {ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Byzantium: 4370000 Constantinople: 7280000 Petersburg: 7280000 Istanbul: 9069000, Muir Glacier: 9200000, Engine: ethash}
Number: 9069000
Hash: 0x072cf1df374159c5f23087750d8a2f3201542da196939ce446ff2c5c390fe5f6
·································································
·································································
·································································
·································································
·································································
Error: invalid gas used (remote: 6395997 local: 6449093)
##############################
WARN [12-10|12:01:11.813] Synchronisation failed, dropping peer peer=106a4c4cba9167bf err="retrieved hash chain is invalid"
環境
Geth
Version: 1.9.7
Architecture: amd64
Protocol Versions: [64 63]
Go Version: go1.13.1
Operating System: linux
原因:
以太坊更新2.0 , 從塊 9069000開始更新, 通過github 發現 1.9.8 1.9.7 版本都會出現這種錯誤
方案:
把geth 更新到1.9.9版本,以下提供一種更新方法
centos7環境
- 選擇最新版本想下載 geth下載地址
wget -c https://github.com/ethereum/go-ethereum/archive/v1.9.9.zip
- 下載好了之後,解壓 (沒有unzip 下載個unzip)
unzip v1.9.9.zip
- 然後進入目錄,進行make geth
cd go-ethereum-1.9.9
make geth
- 如果make geth 長時間沒有反應,大概有可能是網的問題,加個代理, 命令行輸入:
export GOPROXY=https://goproxy.cn
-
然後重新 make geth 已經就可以了
-
裝完之後,查看geth version 的版本, 如果還是原來的版本需要把原來的geth 命令刪除
如果 報 geth 找不到, 需要把 命令加入到環境變量中 (末尾加入一句話:
export PATH=$PATH:~/go-ethereum-1.9.9/build/bin/
$PATH: 後面爲你自己的geth命令所在目錄
vim /etc/profile
- 然後刷新
source /etc/profile
再查看下版本應該就可以了
然後在重新回入正軌, 拉塊