All Posts

Ethereum - 使用Puppeth创建以太坊私有链

Puppeth是以太坊go客户端工具中提供的一个实用工具. 通过puppeth可以在自有环境中快速搭建起以太坊私链. 安装Ethereum Go 客户端(geth) 下载并安装Ethereum的Go客户端, 目前最新稳定版为1.7.2 https://ethereum.github.io/go-ethereum/downloads/ 安装完成go-ethereum后, go客户端中就带有puppeth 搭建以太坊私有链 本文档搭建3个Ethereum节点, 分别为: node1, node2, node3. 这3个节点可以分别安装在不同电脑上, 也可以安装在同一台电脑上. 以下配置说明都是基于在同一台电脑上, 电脑环境: OS: macOS High Sierra 10.13 go: go1.9.1 darwin/amd64 geth: 1.7.2 环境准备 分别创建3个节点目录, 每个目录下各自保存各节点的账号, 区块链数据 mkdir ethereum cd ethereum mkdir node1 mkdir node2 mkdir node3 建立账号 为每个节点各自建立一个账号. 运行命令后会提示输入密码用于保护你的以太坊账号私钥. 这里直接回车跳过密码设置. 生成账号后, 命令返回账号对应的地址. geth --datadir ./node1/data account new Your new account is locked with a password. Please give a password. Do not forget this password.