以太坊学习5:Geth命令行环境
Geth官方
- https://geth.ethereum.org/
- https://geth.ethereum.org/downloads/
- https://ethereum.github.io/go-ethereum/downloads/
Geth命令行环境
命令 | 说明 |
---|---|
init | 引导和初始化一个新的创始区块 |
account | 管理账户 |
console | 启动交互式JavaScript环境 |
attach | 启动交互式JavaScript环境(连接到节点) |
version | 打印版本号 |
help | 显示一个命令列表或某个指定命令的帮助 |
创世纪区块配置(即0号块),通过init命令初始化
格式:init [command options] [arguments...]
geth --datadir D:\ethereum\data init genesis.json
genesis.json
{
"config": {
"chainId": 100,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"alloc" : {},
"coinbase" : "0x0000000000000000000000000000000000000000",
"difficulty" : "0x800",
"extraData" : "",
"gasLimit" : "0x8000000",
"nonce" : "0x0000000000000042",
"mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp" : "0x00"
}
通过网络编号networkid启动Geth并进入命令行环境
geth --datadir D:\ethereum\data --networkid 100 console
geth --datadir D:\ethereum\data --maxpeers 100 --networkid 100 console
版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/03/25/ethereum-learning-5-geth-command-line-environment/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。
THE END
0
二维码
打赏
海报
以太坊学习5:Geth命令行环境
Geth官方
https://geth.ethereum.org/
https://geth.ethereum.org/downloads/
https://ethereum.github.io/go-ethereum/downloads/
Geth命令行环境
命令……
文章目录
关闭
共有 0 条评论