狼愛上貍

          我胡漢三又回來了

          genesis.json的問題

          以前的genesis.json的文件差不多是這樣的:
              {
                "config": {
                      "chainId": 10,
                      "homesteadBlock": 0,
                      "eip155Block": 0,
                      "eip158Block": 0
                  },
                "alloc"      : {},
                "coinbase"   : "0x0000000000000000000000000000000000000000",
                "difficulty" : "0x00000002",
                "extraData"  : "",
                "gasLimit"   : "0x2fefd8",
                "nonce"      : "0x0000000000000042",
                "mixhash"    : "0x0000000000000000000000000000000000000000000000000000000000000000",
                "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
                "timestamp"  : "0x00"
              }
          用這個創(chuàng)世塊的描述文件初始化時,出現(xiàn)錯誤:
          Fatal: Failed to write genesis block: unsupported fork ordering: eip150Block not enabled, but eip155Block enabled at 0
          百度吧,沒有一個解決辦法。
          后來用Puppeth命令創(chuàng)建json文件,并做了修改,如下所示:
          {
          "config": {
          "chainId": 666,
          "homesteadBlock": 0,
          "eip150Block": 0,
          "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
          "eip155Block": 0,
          "eip158Block": 0,
          "byzantiumBlock": 0,
          "constantinopleBlock": 0,
          "petersburgBlock": 0,
          "istanbulBlock": 0,
          "ethash": {}
          },
          "nonce": "0x0",
          "timestamp": "0x5ddf8f3e",
          "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
          "gasLimit": "0x47b760",
          "difficulty": "0x00002",
          "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
          "coinbase": "0x0000000000000000000000000000000000000000",
          "alloc": { }
          },
          "number": "0x0",
          "gasUsed": "0x0",
          "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
          }



          初始化:
          geth --identity "MyEth" --rpc --rpcport "8545" --rpccorsdomain "*" --datadir gethdata --port "30303" --nodiscover --rpcapi "db,eth,net,personal,web3" --networkid 1999 init genesis.json
          控制臺:
          geth --identity "MyEth" --rpc --rpcport "8545" --rpccorsdomain "*" --datadir gethdata --port "30303" --nodiscover --rpcapi "db,eth,net,personal,web3" --networkid 1999 --dev.period 1 console
          建立用戶:
          >personal.newAccount();
          挖礦:
          miner.start();
          終于順利挖到了人生第一桶金。

          posted on 2019-11-28 19:15 狼愛上貍 閱讀(3680) 評論(0)  編輯  收藏 所屬分類: Blockchain

          主站蜘蛛池模板: 高雄市| 浮山县| 达孜县| 修文县| 日照市| 宁海县| 星座| 沅陵县| 根河市| 武威市| 鄂托克前旗| 台东市| 台州市| 平顶山市| 水城县| 江达县| 舟曲县| 银川市| 乌苏市| 徐水县| 探索| 三穗县| 恩施市| 上饶县| 建平县| 康保县| 闽侯县| 晋州市| 浦北县| 昆山市| 云龙县| 永泰县| 炉霍县| 通州市| 冕宁县| 甘谷县| 西贡区| 易门县| 永靖县| 河间市| 任丘市|