Java教程

以太坊搭建私链

本文主要是介绍以太坊搭建私链,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

Windows系统---打开cmd命令行

1.初始化(首先有创世文件)

geth init "D:\Geth\1_test\genesis.json"

文件内容可自己创建(新建TXT--粘贴以下内容---后缀改为json即可)

{
  "config": {
        "chainId": 18,
        "homesteadBlock": 0,
        "eip150Block": 0,
        "eip155Block": 0,
        "eip158Block": 0
    },
  "alloc"      : {},
  "coinbase"   : "0x0000000000000000000000000000000000000000",
  "difficulty" : "0x2",
  "extraData"  : "",
  "gasLimit"   : "0xffffffff",
  "nonce"      : "0x0000000000000042",
  "mixhash"    : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "timestamp"  : "0x00"
}

这篇关于以太坊搭建私链的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!