系统环境
Go SDK 1.16
1, 下载源码
git clone https://github.com/ethereum/go-ethereum.git
?2,配置idea go环境?
GOPROXY=https://mirrors.aliyun.com/goproxy/
?3,初始化配置
Program arguments: --datadir /Users/liuhao/go/geth/data init /Users/liuhao/go/geth/genesis.json
genesis.json?文件内容:
{
"config": {
"chainId": 666,
"homesteadBlock": 0,
"eip150Block": 0,
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"berlinBlock": 0,
"londonBlock": 0
},
"alloc": {},
"coinbase": "0x0000000000000000000000000000000000000000",
"difficulty": "0x20000",
"extraData": "",
"gasLimit": "0x2fefd8",
"nonce": "0x0000000000000042",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp": "0x00"
}
?4,启动
Program arguments: --datadir /Users/liuhao/go/geth/data
5,控制台
|