Go-Ethereum

我在我的私人乙太坊區塊鏈中遇到了這個問題(節點未同步,節點數據寫入錯誤,同步失敗,重試)

  • December 20, 2019

我是乙太坊的新手,現在使用 geth 獲得乙太坊區塊鏈

geth –port 3000 –networkid 58342 –rpc –rpcport 8545 –rpcaddr 10.0.0.2 –rpccorsdomain “*” 控制台

INFO [03-20|11:41:12] Block synchronisation started 
WARN [03-20|11:41:12] Node data write error                    err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:41:12] Synchronisation failed, retrying         err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
> net.peerCount
1
> net.listeningWARN [03-20|11:41:22] Node data write error                    err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:41:22] Synchronisation failed, retrying         err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"

true
> WARN [03-20|11:41:32] Node data write error                    err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:41:32] Synchronisation failed, retrying         err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:41:42] Node data write error                    err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:41:42] Synchronisation failed, retrying         err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:41:52] Node data write error                    err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:41:52] Synchronisation failed, retrying         err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:42:02] Node data write error                    err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:42:02] Synchronisation failed, retrying         err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:42:12] Node data write error                    err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:42:12] Synchronisation failed, retrying         err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:42:22] Node data write error                    err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:42:22] Synchronisation failed, retrying         err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:42:32] Node data write error                    err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:42:32] Synchronisation failed, retrying         err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:42:42] Node data write error                    err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:42:42] Synchronisation failed, retrying         err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:42:52] Node data write error                    err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:42:52] Synchronisation failed, retrying         err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:43:02] Node data write error                    err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:43:02] Synchronisation failed, retrying         err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:43:12] Node data write error                    err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:43:12] Synchronisation failed, retrying         err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:43:22] Node data write error                    err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:43:22] Synchronisation failed, retrying         err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:43:32] Node data write error                    err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:43:32] Synchronisation failed, retrying         err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:43:42] Node data write error                    err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
WARN [03-20|11:43:42] Synchronisation failed, retrying         err="state node c56d5a…f2fb4a failed with all peers (1 tries, 1 peers)"
> admin.nodeInfo.enoWARN [03-20|11:43:52] Node data write error                    err="state node c56d5a…f2fb4a failed with all peers (1 tries,

嘗試將 geth –testnet 用於 ropsten 測試網,同步需要幾個小時或幾天,具體取決於您的連接。否則,如果您想要主鏈的警察,您可以使用 geth –light 這將為您提供區塊鏈的輕度同步,從而允許您與主網進行互動。–light 的同步時間應該只有大約 5-10 分鐘。您可以通過打開一個新終端並使用 geth –attach 進行輕同步或使用 geth –testnet attach 進行 ropsten 來檢查同步百分比。這將允許您使用“eth.syncing”檢查同步狀態,然後您可以將您目前的塊大小與 etherscan 或 ether chain.org 進行比較。

還有其他選項可以讓節點在您的機器上執行,例如 testrpc、ganache-cli,但這些只是代表乙太坊區塊鏈的本地節點。

可能您有兩個不同的節點試圖將他們自己的鏈數據庫版本與您的同步。如果是這種情況,請斷開其他節點並嘗試將它們與正確的節點重新同步。

引用自:https://ethereum.stackexchange.com/questions/43278