Go-Ethereum

如何從 Morden 切換到 Ropsten?

  • December 2, 2016

我按照這些說明安裝了 v.0.8.7 客戶端並嘗試**切換到 Ropsten 。**即,我輸入:

dyn906-29:~ sam$ geth -- datadir /Users/sam/Library/Ethereum/testnet/geth/chaindata/ init /Users/sam/Library/Ethereum/testnet/testnet_genesis.json; geth -- datadir /Users/sam/Library/Ethereum/testnet/geth/chaindata/ --networkid 3 console

…同步開始,典型的(即,在我讓它執行大約 10 分鐘後)控制台輸出:

I1124 12:07:01.281067 eth/downloader/downloader.go:298] Synchronisation failed: block download canceled (requested)
I1124 12:07:23.178469 core/blockchain.go:975] imported 3 block(s) (0 queued 0 ignored) including 0 txs in 1.001425657s. #84205 [dc3d3bcd / c0b43021]
I1124 12:07:24.448356 core/blockchain.go:975] imported 3 block(s) (0 queued 0 ignored) including 2 txs in 8.001122ms. #84208 [e716f763 / 9cdfe671]
I1124 12:07:33.003664 core/blockchain.go:975] imported 2048 block(s) (0 queued 0 ignored) including 1897 txs in 4.743529105s. #86256 [2c5e179c / dbc9325e]
I1124 12:07:37.833884 core/blockchain.go:975] imported 2048 block(s) (0 queued 0 ignored) including 676 txs in 4.821595483s. #88304 [f9215a23 / 62150759]

在這個輸出中讓我感到困惑的是,它表明我下載了多達 86256 個塊(見最後一行的末尾)……但我在這裡看到 ,到目前為止,新測試網中只有大約 35000 個塊。

所以我的印像是我正在與Morden同步..

1. 我目前是否與 Morden(而不是 Ropsten)同步?

2. 如何確保我的客戶與 Ropsten 同步?

謝謝。

編輯: GUI 總共提到了 ca。1,800 K 塊…所以我相當肯定我的客戶正在與 Morden 同步。那麼如何搬到羅普斯滕呢?

使用Geth 1.5.3及更高版本,只需 2 個步驟:

  1. 執行geth --testnet removedb以刪除 Morden 網路的區塊鏈數據庫。
  2. geth --testnet

原來的:

使用geth init時,datadir應以 . 結尾/testnet。例如:/Users/sam/Library/Ethereum/testnet

當您使用其他命令geth console時,datadir應該是父目錄,在本例中:/Users/sam/Library/Ethereum

是的,這令人困惑。但是當 Geth 1.5.3 發佈時,geth --testnet將對其進行簡化,您無需為geth init.

從一個乾淨開始datadir(您可能需要手動創建子目錄)會很有幫助/testnet,但請確保備份現有的.datadir``keystore

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