Go-Ethereum

Parity 和 Geth 節點作為對等節點

  • January 10, 2017

我在 2 個節點上執行一個乙太坊(使用 geth)和一個奇偶校驗實例,兩者都使用類似的創世文件。我還將 geth 節點的 enode ID 指定為用於奇偶校驗的引導節點。然而,這 2 個節點無法相互檢測到。

geth.genesis:

{
"nonce": "0x0000000000000042",
"difficulty": "0x4",
"alloc": {
   "6a5b342ec71def8aac337b82969d9ddd811023c9": {
       "balance": "5000000000000000000000000"
   }
},
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x1100000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0xFFFF0000"
}

平價起源:

{
"name": "node",
"engine": {
     "Ethash": {
             "params": {
                     "gasLimitBoundDivisor": "0x0400",
                     "minimumDifficulty": "0x4",
                     "difficultyBoundDivisor": "0x0800",
                     "durationLimit": "0x0a",
                     "blockReward": "0x4563918244F40000",
                     "registrar": "",
                     "frontierCompatibilityModeLimit": "0x0"
             }
     }
},
"params": {
     "accountStartNonce": "0x0000000000000042",
     "maximumExtraDataSize": "0x20",
     "minGasLimit": "0xFFFF0000",
     "networkID" : "0x16"
},
"genesis": {
     "seal": {
             "ethereum": {
                     "nonce": "0x0000000000000042",
                     "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
             }
     },
     "difficulty": "0x4",
     "author": "0x0000000000000000000000000000000000000000",
     "timestamp": "0x00",
     "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
     "extraData": "0x1100000000000000000000000000000000000000000000000000000000000000",
     "gasLimit": "0xFFFF0000"
},
"nodes": [
],
"accounts": {
     "6a5b342ec71def8aac337b82969d9ddd811023c9": { "balance": "5000000000000000000000000" }

有誰知道可能出了什麼問題?我什至嘗試了將 parity.genesis 複製到 geth.genesis 的路線,但無濟於事。但是,我成功地將 2 個 geth 節點或 2 個奇偶校驗節點相互連接起來。

如果它們在不同的鏈上,連接將斷開,您可以執行 Parity-lsync=trace以查看發生了什麼。

它可能與硬分叉轉換有關,Geth 預設不包含它們。看看這裡並嘗試使用連結的生成器

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