Go-Ethereum

將 Geth 從 1.6 降級到 1.59 以將 solc 集成到 Geth

  • May 28, 2017

我在 ropsten testnt 上有一個不想繼續開發但繼續執行的項目。由於他們在 v1.6 上從 Geth 中取出了 solc,因此我得到錯誤方法 eth_compilesolidity 不存在。有沒有簡單的方法解決它?如果我將 Geth 降級到 v1.5,我的項目是否可以在不需要更改任何內容的情況下執行,我是否需要刪除我已經擁有的 testnet 區塊鏈?另外在Linux上將geth降級到v1.5的正確方法是什麼?

當您將二進製文件降級到 1.5.9 時,您的項目應該沒問題。雖然,我建議之前進行備份。

您可以從 go-ethereum 項目https://github.com/ethereum/go-ethereum/releases/tag/v1.5.9的發布頁面獲取 1.5.9 的原始碼並為您的系統建構。

更新:

我在 1.6.1 上同步了完整的 Ropsten 區塊鏈,並將二進製文件降級為從原始碼建構的 1.5.9。之後,我啟動了客戶端。客戶正在工作。

ubuntu@test1:~$ geth --testnet
I0528 18:39:48.909724 node/config.go:445] Failed to start Ledger hub, disabling: libusb: unknown error [code -99]
I0528 18:39:48.909814 cmd/utils/flags.go:613] WARNING: No etherbase set and no accounts found as default
I0528 18:39:48.909841 ethdb/database.go:83] Allotted 128MB cache and 1024 file handles to /home/ubuntu/.ethereum/testnet/geth/chaindata
I0528 18:40:47.701190 ethdb/database.go:176] closed db:/home/ubuntu/.ethereum/testnet/geth/chaindata
I0528 18:40:47.702531 node/node.go:176] instance: Geth/v1.5.9-stable/linux/go1.6.3
I0528 18:40:47.702595 ethdb/database.go:83] Allotted 128MB cache and 1024 file handles to /home/ubuntu/.ethereum/testnet/geth/chaindata
I0528 18:40:47.791896 core/genesis.go:95] Genesis block already in chain. Writing canonical number
I0528 18:40:47.793168 eth/backend.go:276] Successfully wrote custom genesis block: 41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d
I0528 18:40:47.794628 eth/backend.go:187] Protocol Versions: [63 62], Network Id: 3
I0528 18:40:47.798475 eth/backend.go:215] Chain config: {ChainID: 3 Homestead: 0 DAO: <nil> DAOSupport: true EIP150: 0 EIP155: 10 EIP158: 10}
I0528 18:40:47.807987 core/blockchain.go:219] Last header: #1121267 [37787a3c…] TD=205694086442412
I0528 18:40:47.808046 core/blockchain.go:220] Last block: #1121267 [37787a3c…] TD=205694086442412
I0528 18:40:47.808059 core/blockchain.go:221] Fast block: #1121267 [37787a3c…] TD=205694086442412
I0528 18:40:47.832924 p2p/server.go:340] Starting Server
I0528 18:40:50.195813 p2p/discover/udp.go:227] Listening, enode://1943e86b5ef0b79104fe150c40c8492b9b362d560af30964a34a4fe9f75451ec051c23b97f37ea2cb6ed7ccf450e0baf8c656292abe3caddf3134564cd6a1e58@[::]:30303
I0528 18:40:50.196804 p2p/server.go:608] Listening on [::]:30303
I0528 18:40:50.197068 node/node.go:341] IPC endpoint opened: /home/ubuntu/.ethereum/testnet/geth.ipc
I0528 18:41:09.981681 eth/downloader/downloader.go:326] Block synchronisation started
I0528 18:41:10.171278 eth/downloader/downloader.go:723] Peer 96fa95f526f5839e [hs 0.00/s, bs 0.00/s, rs 0.00/s, ss 0.00/s, miss    0, rtt 20s]: potential rewrite attack: #1031267 [00000000…] <= #1031267 limit
I0528 18:42:02.066483 eth/downloader/downloader.go:723] Peer bb8f92cc0157584f [hs 0.00/s, bs 0.00/s, rs 0.00/s, ss 0.00/s, miss    0, rtt 20s]: potential rewrite attack: #1031267 [00000000…] <= #1031267 limit

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