miner.start(1) 觸發但不開始挖礦
我正在創建自己的私有乙太坊區塊鏈。
sudo geth --rpcapi eth,web3,personal --rpc --networkid=15
上面的命令給出了以下日誌。
INFO [09-18|10:16:42.151] Maximum peer count ETH=25 LES=0 total=25 INFO [09-18|10:16:42.153] Starting peer-to-peer node instance=Geth/v1.8.15-stable-89451f7c/linux-amd64/go1.10 INFO [09-18|10:16:42.153] Allocated cache and file handles database=/home/blockchain/.ethereum/geth/chaindata cache=768 handles=512 INFO [09-18|10:16:42.171] Initialised chain configuration config="{ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Byzantium: 4370000 Constantinople: <nil> Engine: ethash}" INFO [09-18|10:16:42.171] Disk storage enabled for ethash caches dir=/home/blockchain/.ethereum/geth/ethash count=3 INFO [09-18|10:16:42.171] Disk storage enabled for ethash DAGs dir=/home/blockchain/.ethash count=2 INFO [09-18|10:16:42.171] Initialising Ethereum protocol versions="[63 62]" network=15 INFO [09-18|10:16:42.173] Loaded most recent local header number=0 hash=d4e567…cb8fa3 td=17179869184 INFO [09-18|10:16:42.173] Loaded most recent local full block number=0 hash=d4e567…cb8fa3 td=17179869184 INFO [09-18|10:16:42.173] Loaded most recent local fast block number=0 hash=d4e567…cb8fa3 td=17179869184 INFO [09-18|10:16:42.174] Loaded local transaction journal transactions=0 dropped=0 INFO [09-18|10:16:42.174] Regenerated local transaction journal transactions=0 accounts=0 INFO [09-18|10:16:42.174] Starting P2P networking INFO [09-18|10:16:46.891] UDP listener up self=enode://e919e98154dcddc4e6e6f847332795cbaf072607e410c2330702d3b66b4219eb98c4ebf39dc1ee2b21af74049926a5fb646542636f8835eb420157d825cc3102@[::]:30303 INFO [09-18|10:16:46.892] RLPx listener up self=enode://e919e98154dcddc4e6e6f847332795cbaf072607e410c2330702d3b66b4219eb98c4ebf39dc1ee2b21af74049926a5fb646542636f8835eb420157d825cc3102@[::]:30303 INFO [09-18|10:16:46.896] IPC endpoint opened url=/home/blockchain/.ethereum/geth.ipc INFO [09-18|10:16:46.897] HTTP endpoint opened url=http://127.0.0.1:8545 cors= vhosts=localhost INFO [09-18|10:16:59.561] Etherbase automatically configured address=0xa76D511FCddEB3bCCa1Eb5B6bf4EC39a8d95668d
miner.start(1)
然後我通過使用 geth 控制台觸發,sudo geth attach ../.ethereum/geth.ipc
因此它在上面的日誌中添加以下行。INFO [09-18|10:18:06.859] Updated mining threads threads=1 INFO [09-18|10:18:06.860] Transaction pool price threshold updated price=1000000000 INFO [09-18|10:18:06.860] Commit new mining work number=1 sealhash=d91037…57fc0d uncles=0 txs=0 gas=0 fees=0 elapsed=648.451µs
在這之後什麼也沒有發生。
僅供參考,
miner.start(1)
返回,null
但我猜這不是問題。您能否給我一些提示,以便我可以採取可能的解決方法來開始採礦。
您可以在開始 geth 之前嘗試使用此命令(rm -rf $HOME/.ethash)。這是詳細資訊
如果您像我一樣使用帶有自定義數據目錄的視窗。事實證明 Ethash 仍然存在於此處:C:\Windows\System32\config\systemprofile\AppData。我的決定是刪除這個目錄的內容,而不是我的 datadir。在 linux 環境中可能有一個等價物。參考您的 IPC Channel 啟動回饋:
[2019.02.19-11:16:04.464350]: INFO [02-19|11:16:02] Starting peer-to-peer node instance=Geth/v1.7.3-stable-4bb3c89d/windows-amd64/go1.9. [2019.02.19-11:16:04.474094]: INFO [02-19|11:16:02] Allocated cache and file handles database=C:\\DTS\\Ledgers\\1111\\Ledger\\geth\\chaindata cache=128 handles=1024. [2019.02.19-11:16:04.485756]: INFO [02-19|11:16:02] Initialised chain configuration config="{ChainID: 1111 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: <nil> EIP155: 0 EIP158: 0 Byzantium: <nil> Engine: unknown}". [2019.02.19-11:16:04.491861]: INFO [02-19|11:16:02] Disk storage enabled for ethash caches dir=C:\\DTS\\Ledgers\\1111\\Ledger\\geth\\ethash count=3. [2019.02.19-11:16:04.497462]: INFO [02-19|11:16:02] Disk storage enabled for ethash DAGs dir=C:\\WINDOWS\\system32\\config\\systemprofile\\AppData\\Ethash count=2. [2019.02.19-11:16:04.503220]: INFO [02-19|11:16:02] Initialising Ethereum protocol versions="[63 62]" network=1111. [2019.02.19-11:16:04.508075]: INFO [02-19|11:16:02] Loaded most recent local header number=0 hash=95ae19…a63ec2 td=0. [2019.02.19-11:16:04.512925]: INFO [02-19|11:16:02] Loaded most recent local full block number=0 hash=95ae19…a63ec2 td=0. [2019.02.19-11:16:04.518492]: INFO [02-19|11:16:02] Loaded most recent local fast block number=0 hash=95ae19…a63ec2 td=0. [2019.02.19-11:16:04.523792]: INFO [02-19|11:16:02] Loaded local transaction journal transactions=1 dropped=0. [2019.02.19-11:16:04.528894]: INFO [02-19|11:16:02] Regenerated local transaction journal transactions=1 accounts=1.
特別注意:C:\WINDOWS\system32\config\systemprofile\AppData\Ethash