Go-Ethereum
同步完成但最新的塊號為 0
我正在執行 geth 1.8.0 我已經執行節點超過 24 小時
> eth.syncing false > eth.getBlock("latest").number 0
這是一個有效的狀態嗎?
為什麼同步完成後數字為 0
同行
> admin.peers [{ caps: ["eth/62", "eth/63", "les/1", "les/2"], id: "1118980bf48b0a3640bdba04e0fe78b1add18e1cd99bf22d53daac1fd9972ad650df52176e7c7d89d1114cfef2bc23a2959aa54998a46afcf7d91809f0855082", name: "Geth/v1.7.3-stable/linux-amd64/go1.7", network: { inbound: false, localAddress: "172.31.22.171:51030", remoteAddress: "52.74.57.123:30303", static: false, trusted: false }, protocols: { eth: { difficulty: 2.562703311832198e+21, head: "0x447386c92b3d4658cc7764d82aaec83d6c4a7a18f6fe87dd558396327964ee39", version: 63 } } }, { caps: ["eth/62", "eth/63", "les/1", "les/2"], id: "138ec659b5ec02029c0c08d4a8f377174622c4d4f8684cf22bd6393a1e46e731ed1bf87249f4003f4c47f7a39611c39e0dc7004091604183d6e5781f1eaf81be", name: "Geth/v1.8.0-stable-5f540757/linux-amd64/go1.9.4", network: { inbound: false, localAddress: "172.31.22.171:45178", remoteAddress: "79.98.29.93:30303", static: false, trusted: false }, protocols: { eth: { difficulty: 2.562703311832198e+21, head: "0x447386c92b3d4658cc7764d82aaec83d6c4a7a18f6fe87dd558396327964ee39", version: 63 } } }, { caps: ["eth/62", "eth/63"], id: "1bbae192d212e6d91748e72dfa0eb2f97b9dadcb7fdcb7f535dcde652ee91856e5db3f9a71b4a7a9252650acb8e150b7b401a600d131c108fa283bd017628370", name: "Geth/v1.7.3-stable-4bb3c89d/linux-amd64/go1.9.2", network: { inbound: false, localAddress: "172.31.22.171:54778", remoteAddress: "173.212.235.16:30303", static: false, trusted: false }, protocols: { eth: { difficulty: 2.269417677247923e+21, head: "0xaf4818557d616ad6ed896aa8abf3be2c83a7e175c07ea7ae434d27ded196c959", version: 63 } } }, { caps: ["eth/62", "eth/63"], id: "209a2c2862760b2d63da23780507b373de397b39589ddf50a6bf11f828268d604b0ecfd06390d7f9d72c516d77b364ea573fe12d7c29d18342f0a6fa4ca3c260", name: "Geth/v1.7.2-stable-1db4ecdc/windows-amd64/go1.9", network: { inbound: false, localAddress: "172.31.22.171:42810", remoteAddress: "184.12.106.238:30303", static: false, trusted: false }, protocols: { eth: { difficulty: 2.554069593289375e+21, head: "0x8856b4ede4ccfc4be4ed723b306ae8874b444a2a0aa44e86201192500ddafb90", version: 63 } } }, { caps: ["eth/62", "eth/63"], id: "318ed633acf08141bd9badc4b9c7983e58b64e06d9b957f8e80b385cbefe8b211594dec2e0a40b3f94ebeeb41383b22704841a4a99e9ffb0b7ad930fd2beecd7", name: "Geth/pubnode/v1.7.3-stable-4bb3c89d/linux-amd64/go1.9.2", network: { inbound: false, localAddress: "172.31.22.171:43452", remoteAddress: "52.192.57.242:30303", static: false, trusted: false }, protocols: { eth: { difficulty: 2.5626594943418226e+21, head: "0x37ad0388509b48f6028c782a0f619b951de1ee50bcaaac5597a2062e48ab0e58", version: 63 } } }, { caps: ["eth/63"], id: "648aa55343ca96ff026c18990bfde40a80ab61090d99bb28f0ae60299cfa0c9478538e38919fb57e3ddf2e7ec3df2b778a15fcd2a4582ebdae020e1bf5ad6d78", name: "Geth/v1.7.3-stable-4bb3c89d/linux-amd64/go1.9", network: { inbound: false, localAddress: "172.31.22.171:56590", remoteAddress: "86.148.23.224:30303", static: false, trusted: false }, protocols: { eth: { difficulty: 17179869184, head: "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3", version: 63 } } }, { caps: ["eth/62", "eth/63"], id: "7e3c72d20c40b6606f07e9cf726a223cf28c2a71e83354f72187fe64dc857791cde27210aac1074c818fe216d46f2e0933a392a2d3c035ed173b3467b1e3e6fb", name: "Geth/v1.7.3-stable/linux-amd64/go1.8.5", network: { inbound: false, localAddress: "172.31.22.171:39010", remoteAddress: "13.115.174.21:30303", static: false, trusted: false }, protocols: { eth: { difficulty: 2.5627062218671076e+21, head: "0x51f16c3910cc604cc319978b619ed0d4147df67f77b4bbd16478d73e5103305e", version: 63 } } }, { caps: ["eth/63"], id: "a7f1a8a46cc2f6c7bbecc8d7d35647fe5480dbd82c04583ff35ef1cfcb045965e1d5dce5c112f6fdcb0d63e90a4bb7392daaf8adfa784ef0a77e320a7060f0aa", name: "Geth/v1.7.3-unstable-86f6568f/linux-amd64/go1.9", network: { inbound: false, localAddress: "172.31.22.171:60034", remoteAddress: "91.224.140.211:19300", static: false, trusted: false }, protocols: { eth: { difficulty: 2.425191243091731e+21, head: "0xce35300c184f9e1b3d8d7a7b7d8c0839782b99d6e61a8fffab83304ede90c726", version: 63 } } }]
啟動 geth 的控制台命令
geth --mine --minerthreads=4
與
Geth/v1.8.2-stable-b8b9f7f4/linux-amd64/go1.9.4相同的問題
初始同步耗時超過 12 小時。
為了解決它,我做了:創建了一個地址
(例如personal.newAccount(“some-strong-password”))
b.將 0.1 ETH 轉移到新創建的地址。
之後
eth.getBlock(“latest”).number 開始返回正確的值。
同步是錯誤的,因為您沒有與任何可用的網路鏈同步。
最新區塊為 0,因為您沒有自己開採任何區塊。
執行上述任何操作以獲得有效塊