生产力工具
-
golang
-
Git
-
mingw64
链接:https://pan.baidu.com/s/1Mm5iSXDEVkTmpV7wBGk8Lg
提取码:wasd -
go
详情:GO语言开发环境搭建
以上的环境配置在网上都可以找到,在这里并不赘述
ps:(附图给大家)
GoPath
系统变量下,Path下配置
安装步骤
在你所设置的gopath的目录下新建src->github.com->etherum文件夹
我的设置路径就是
D:\GoProjects\src\github.com\ethereum
然后使用你的gitbash在这个文件下用命令
git clone [email protected]:ethereum/go-ethereum.git
打开golang
导入刚才的文件 go-etherum
如果import没有爆红,恭喜你,爆红,不要紧张,按照贴图的指示来、
这一步将代理跳到中国区来
然后打开你的golang终端输入
只需要完成最下面的两行
如果出现错误,如miner()下hello.go main.go的 直接把这两个文件取出来备份(防止以后需要)
检查geth,以及geth的一些操作
在GOPATH bin路径下 打开终端输入命令 geth version
接着创建创世纪块
{
"config": {
"chainId": 10,
"homesteadBlock": 0,
"eip150Block": 0,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"ethash": {
}
},
"nonce": "0x0",
"timestamp": "0x5e4a53b2",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x47b760",
"difficulty": "0x80000",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {
"0000000000000000000000000000000000000088": {
"balance": "0x200000000000000000000000000000000000000000000000000000000000000"
}
},
"number": "0x0",
"gasUsed": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
用终端使用geth 命令
geth --datadir ~/.ethereum/myprivatenet init privategensis.json