【以太坊】本地搭建Ethereum私有网络

简介: 环境xiaoyu@xiaoyu-VirtualBox:~$ uname -a Linux xiaoyu-VirtualBox 4.10.0-19-generic #21-Ubuntu SMP Thu Apr 6 17:04:57 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux安装访问官方网站https://www.

环境

xiaoyu@xiaoyu-VirtualBox:~$ uname -a
Linux xiaoyu-VirtualBox 4.10.0-19-generic #21-Ubuntu SMP Thu Apr 6 17:04:57 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

安装

访问官方网站https://www.ethereum.org/
找到Get our command line tools

sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install ethereum


xiaoyu@xiaoyu-VirtualBox:~$ sudo apt-get install software-properties-common
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
software-properties-common 已经是最新版 (0.96.24.13)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 241 个软件包未被升级。
xiaoyu@xiaoyu-VirtualBox:~$ sudo add-apt-repository -y ppa:ethereum/ethereum
gpg: keybox '/tmp/tmprb0i8esx/pubring.gpg' created
gpg: /tmp/tmprb0i8esx/trustdb.gpg:建立了信任度数据库
gpg: 密钥 1C52189C923F6CA9:公钥“Launchpad PPA for Ethereum”已导入
gpg: 合计被处理的数量:1
gpg:               已导入:1
OK
xiaoyu@xiaoyu-VirtualBox:~$ sudo apt-get update
命中:1 http://cn.archive.ubuntu.com/ubuntu zesty InRelease
命中:2 http://cn.archive.ubuntu.com/ubuntu zesty-updates InRelease             
命中:3 http://cn.archive.ubuntu.com/ubuntu zesty-backports InRelease           
获取:4 http://ppa.launchpad.net/ethereum/ethereum/ubuntu zesty InRelease [15.4 kB]
获取:5 http://ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 Packages [3,068 B]
获取:6 http://security.ubuntu.com/ubuntu zesty-security InRelease [89.2 kB]
获取:7 http://ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main i386 Packages [3,084 B]
获取:8 http://ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main Translation-en [888 B]
已下载 112 kB,耗时 3秒 (33.3 kB/s)                                  
正在读取软件包列表... 完成
xiaoyu@xiaoyu-VirtualBox:~$ sudo apt-get install ethereum
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
将会同时安装下列软件:
  abigen bootnode evm geth puppeth rlpdump swarm wnode
下列【新】软件包将被安装:
  abigen bootnode ethereum evm geth puppeth rlpdump swarm wnode
升级了 0 个软件包,新安装了 9 个软件包,要卸载 0 个软件包,有 241 个软件包未被升级。
需要下载 18.7 MB 的归档。
解压缩后会消耗 69.8 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://cn.archive.ubuntu.com/ubuntu zesty/universe amd64 swarm amd64 2.1.12+dfsg-1 [73.4 kB]
获取:5 http://ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 geth amd64 1.6.7+build10273+zesty [4,820 kB]
错误:2 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 abigen amd64 1.6.7+build10273+zesty
  无法连接上 101.96.8.165:80 (101.96.8.165),连接超时
错误:3 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 bootnode amd64 1.6.7+build10273+zesty
  不能连接到 101.96.8.165:http:
错误:4 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 evm amd64 1.6.7+build10273+zesty
  不能连接到 101.96.8.165:http:
错误:7 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 rlpdump amd64 1.6.7+build10273+zesty
  不能连接到 101.96.8.165:http:
获取:8 http://ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 wnode amd64 1.6.7+build10273+zesty [3,308 kB]
获取:9 http://ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 ethereum amd64 1.6.7+build10273+zesty [1,540 B]
错误:6 http://101.96.8.164/ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 puppeth amd64 1.6.7+build10273+zesty
  无法连接上 101.96.8.164:80 (101.96.8.164),连接超时
已下载 8,203 kB,耗时 540秒 (24.1 kB/s)    
E: 无法下载 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu/pool/main/e/ethereum/abigen_1.6.7+build10273+zesty_amd64.deb  无法连接上 101.96.8.165:80 (101.96.8.165),连接超时
E: 无法下载 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu/pool/main/e/ethereum/bootnode_1.6.7+build10273+zesty_amd64.deb  不能连接到 101.96.8.165:http:
E: 无法下载 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu/pool/main/e/ethereum/evm_1.6.7+build10273+zesty_amd64.deb  不能连接到 101.96.8.165:http:
E: 无法下载 http://101.96.8.164/ppa.launchpad.net/ethereum/ethereum/ubuntu/pool/main/e/ethereum/puppeth_1.6.7+build10273+zesty_amd64.deb  无法连接上 101.96.8.164:80 (101.96.8.164),连接超时
E: 无法下载 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu/pool/main/e/ethereum/rlpdump_1.6.7+build10273+zesty_amd64.deb  不能连接到 101.96.8.165:http:
E: 有几个软件包无法下载,要不运行 apt-get update 或者加上 --fix-missing 的选项再试试?
xiaoyu@xiaoyu-VirtualBox:~$ sudo apt-get install ethereum
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
将会同时安装下列软件:
  abigen bootnode evm geth puppeth rlpdump swarm wnode
下列【新】软件包将被安装:
  abigen bootnode ethereum evm geth puppeth rlpdump swarm wnode
升级了 0 个软件包,新安装了 9 个软件包,要卸载 0 个软件包,有 241 个软件包未被升级。
需要下载 10.5 MB/18.7 MB 的归档。
解压缩后会消耗 69.8 MB 的额外空间。
您希望继续执行吗? [Y/n] Y
错误:1 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 abigen amd64 1.6.7+build10273+zesty
  无法连接上 101.96.8.165:80 (101.96.8.165),连接超时
错误:2 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 bootnode amd64 1.6.7+build10273+zesty
  不能连接到 101.96.8.165:http:
错误:3 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 evm amd64 1.6.7+build10273+zesty
  不能连接到 101.96.8.165:http:
错误:5 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 rlpdump amd64 1.6.7+build10273+zesty
  不能连接到 101.96.8.165:http:
错误:4 http://101.96.8.164/ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 puppeth amd64 1.6.7+build10273+zesty
  无法连接上 101.96.8.164:80 (101.96.8.164),连接超时
E: 无法下载 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu/pool/main/e/ethereum/abigen_1.6.7+build10273+zesty_amd64.deb  无法连接上 101.96.8.165:80 (101.96.8.165),连接超时
E: 无法下载 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu/pool/main/e/ethereum/bootnode_1.6.7+build10273+zesty_amd64.deb  不能连接到 101.96.8.165:http:
E: 无法下载 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu/pool/main/e/ethereum/evm_1.6.7+build10273+zesty_amd64.deb  不能连接到 101.96.8.165:http:
E: 无法下载 http://101.96.8.164/ppa.launchpad.net/ethereum/ethereum/ubuntu/pool/main/e/ethereum/puppeth_1.6.7+build10273+zesty_amd64.deb  无法连接上 101.96.8.164:80 (101.96.8.164),连接超时
E: 无法下载 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu/pool/main/e/ethereum/rlpdump_1.6.7+build10273+zesty_amd64.deb  不能连接到 101.96.8.165:http:
E: 有几个软件包无法下载,要不运行 apt-get update 或者加上 --fix-missing 的选项再试试?
xiaoyu@xiaoyu-VirtualBox:~$ sudo apt-get install ethereum
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
将会同时安装下列软件:
  abigen bootnode evm geth puppeth rlpdump swarm wnode
下列【新】软件包将被安装:
  abigen bootnode ethereum evm geth puppeth rlpdump swarm wnode
升级了 0 个软件包,新安装了 9 个软件包,要卸载 0 个软件包,有 241 个软件包未被升级。
需要下载 10.5 MB/18.7 MB 的归档。
解压缩后会消耗 69.8 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:2 http://ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 bootnode amd64 1.6.7+build10273+zesty [3,062 kB]
获取:3 http://ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 evm amd64 1.6.7+build10273+zesty [2,993 kB]
错误:1 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 abigen amd64 1.6.7+build10273+zesty
  无法连接上 101.96.8.165:80 (101.96.8.165),连接超时
错误:5 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 rlpdump amd64 1.6.7+build10273+zesty
  不能连接到 101.96.8.165:http:
错误:4 http://101.96.8.164/ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 puppeth amd64 1.6.7+build10273+zesty
  无法连接上 101.96.8.164:80 (101.96.8.164),连接超时
已下载 6,054 kB,耗时 550秒 (17.3 kB/s)    
E: 无法下载 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu/pool/main/e/ethereum/abigen_1.6.7+build10273+zesty_amd64.deb  无法连接上 101.96.8.165:80 (101.96.8.165),连接超时
E: 无法下载 http://101.96.8.164/ppa.launchpad.net/ethereum/ethereum/ubuntu/pool/main/e/ethereum/puppeth_1.6.7+build10273+zesty_amd64.deb  无法连接上 101.96.8.164:80 (101.96.8.164),连接超时
E: 无法下载 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu/pool/main/e/ethereum/rlpdump_1.6.7+build10273+zesty_amd64.deb  不能连接到 101.96.8.165:http:
E: 有几个软件包无法下载,要不运行 apt-get update 或者加上 --fix-missing 的选项再试试?
xiaoyu@xiaoyu-VirtualBox:~$ sudo apt-get install ethereum
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
将会同时安装下列软件:
  abigen bootnode evm geth puppeth rlpdump swarm wnode
下列【新】软件包将被安装:
  abigen bootnode ethereum evm geth puppeth rlpdump swarm wnode
升级了 0 个软件包,新安装了 9 个软件包,要卸载 0 个软件包,有 241 个软件包未被升级。
需要下载 4,490 kB/18.7 MB 的归档。
解压缩后会消耗 69.8 MB 的额外空间。
您希望继续执行吗? [Y/n] y
中止。
xiaoyu@xiaoyu-VirtualBox:~$ sudo apt-get install ethereum
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
将会同时安装下列软件:
  abigen bootnode evm geth puppeth rlpdump swarm wnode
下列【新】软件包将被安装:
  abigen bootnode ethereum evm geth puppeth rlpdump swarm wnode
升级了 0 个软件包,新安装了 9 个软件包,要卸载 0 个软件包,有 241 个软件包未被升级。
需要下载 4,490 kB/18.7 MB 的归档。
解压缩后会消耗 69.8 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 abigen amd64 1.6.7+build10273+zesty [1,507 kB]
错误:2 http://101.96.8.164/ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 puppeth amd64 1.6.7+build10273+zesty
  无法连接上 101.96.8.164:80 (101.96.8.164),连接超时
错误:3 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 rlpdump amd64 1.6.7+build10273+zesty
  无法连接上 101.96.8.165:80 (101.96.8.165),连接超时
已下载 1,507 kB,耗时 324秒 (7,375 B/s)    
E: 无法下载 http://101.96.8.164/ppa.launchpad.net/ethereum/ethereum/ubuntu/pool/main/e/ethereum/puppeth_1.6.7+build10273+zesty_amd64.deb  无法连接上 101.96.8.164:80 (101.96.8.164),连接超时
E: 无法下载 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu/pool/main/e/ethereum/rlpdump_1.6.7+build10273+zesty_amd64.deb  无法连接上 101.96.8.165:80 (101.96.8.165),连接超时
E: 有几个软件包无法下载,要不运行 apt-get update 或者加上 --fix-missing 的选项再试试?
xiaoyu@xiaoyu-VirtualBox:~$ sudo apt-get install ethereum
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
将会同时安装下列软件:
  abigen bootnode evm geth puppeth rlpdump swarm wnode
下列【新】软件包将被安装:
  abigen bootnode ethereum evm geth puppeth rlpdump swarm wnode
升级了 0 个软件包,新安装了 9 个软件包,要卸载 0 个软件包,有 241 个软件包未被升级。
需要下载 2,983 kB/18.7 MB 的归档。
解压缩后会消耗 69.8 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 puppeth amd64 1.6.7+build10273+zesty [2,449 kB]
错误:2 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 rlpdump amd64 1.6.7+build10273+zesty
  无法连接上 101.96.8.165:80 (101.96.8.165),连接超时
已下载 2,449 kB,耗时 349秒 (10.7 kB/s)    
E: 无法下载 http://101.96.8.165/ppa.launchpad.net/ethereum/ethereum/ubuntu/pool/main/e/ethereum/rlpdump_1.6.7+build10273+zesty_amd64.deb  无法连接上 101.96.8.165:80 (101.96.8.165),连接超时
E: 有几个软件包无法下载,要不运行 apt-get update 或者加上 --fix-missing 的选项再试试?
xiaoyu@xiaoyu-VirtualBox:~$ sudo apt-get install ethereum
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
将会同时安装下列软件:
  abigen bootnode evm geth puppeth rlpdump swarm wnode
下列【新】软件包将被安装:
  abigen bootnode ethereum evm geth puppeth rlpdump swarm wnode
升级了 0 个软件包,新安装了 9 个软件包,要卸载 0 个软件包,有 241 个软件包未被升级。
需要下载 534 kB/18.7 MB 的归档。
解压缩后会消耗 69.8 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://ppa.launchpad.net/ethereum/ethereum/ubuntu zesty/main amd64 rlpdump amd64 1.6.7+build10273+zesty [534 kB]
已下载 534 kB,耗时 32秒 (16.4 kB/s)                                           
正在选中未选择的软件包 swarm。
(正在读取数据库 ... 系统当前共安装有 173899 个文件和目录。)
正准备解包 .../0-swarm_2.1.12+dfsg-1_amd64.deb  ...
正在解包 swarm (2.1.12+dfsg-1) ...
正在选中未选择的软件包 abigen。
正准备解包 .../1-abigen_1.6.7+build10273+zesty_amd64.deb  ...
正在解包 abigen (1.6.7+build10273+zesty) ...
正在选中未选择的软件包 bootnode。
正准备解包 .../2-bootnode_1.6.7+build10273+zesty_amd64.deb  ...
正在解包 bootnode (1.6.7+build10273+zesty) ...
正在选中未选择的软件包 evm。
正准备解包 .../3-evm_1.6.7+build10273+zesty_amd64.deb  ...
正在解包 evm (1.6.7+build10273+zesty) ...
正在选中未选择的软件包 geth。
正准备解包 .../4-geth_1.6.7+build10273+zesty_amd64.deb  ...
正在解包 geth (1.6.7+build10273+zesty) ...
正在选中未选择的软件包 puppeth。
正准备解包 .../5-puppeth_1.6.7+build10273+zesty_amd64.deb  ...
正在解包 puppeth (1.6.7+build10273+zesty) ...
正在选中未选择的软件包 rlpdump。
正准备解包 .../6-rlpdump_1.6.7+build10273+zesty_amd64.deb  ...
正在解包 rlpdump (1.6.7+build10273+zesty) ...
正在选中未选择的软件包 wnode。
正准备解包 .../7-wnode_1.6.7+build10273+zesty_amd64.deb  ...
正在解包 wnode (1.6.7+build10273+zesty) ...
正在选中未选择的软件包 ethereum。
正准备解包 .../8-ethereum_1.6.7+build10273+zesty_amd64.deb  ...
正在解包 ethereum (1.6.7+build10273+zesty) ...
正在设置 bootnode (1.6.7+build10273+zesty) ...
正在设置 puppeth (1.6.7+build10273+zesty) ...
正在设置 evm (1.6.7+build10273+zesty) ...
正在设置 abigen (1.6.7+build10273+zesty) ...
正在处理用于 man-db (2.7.6.1-2) 的触发器 ...
正在设置 rlpdump (1.6.7+build10273+zesty) ...
正在设置 wnode (1.6.7+build10273+zesty) ...
正在设置 geth (1.6.7+build10273+zesty) ...
正在设置 swarm (2.1.12+dfsg-1) ...
正在设置 ethereum (1.6.7+build10273+zesty) ...


搭建私有网络

创建创始区块文件

创建一个文件夹,确定将eth的相关都放在这个文件夹内

xiaoyu@xiaoyu-VirtualBox:~/eth$ pwd
/home/xiaoyu/eth

创建文件CustomGenesis.json

{
    "nonce": "0x0000000000000042",     "timestamp": "0x0",
    "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "extraData": "0x0",     "gasLimit": "0x8000000",     "difficulty": "0x400",
    "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "coinbase": "0x3333333333333333333333333333333333333333",     "alloc": {     }
}
xiaoyu@xiaoyu-VirtualBox:~/eth$ vi CustomGenesis.json
xiaoyu@xiaoyu-VirtualBox:~/eth$ geth --datadir "/home/xiaoyu/eth" init CustomGenesis.json
Fatal: invalid genesis file: json: cannot unmarshal hex string of odd length into Go struct field Genesis.extraData of type hexutil.Bytes

根据文档给的例子发现报错,然后查看另一个出处的文档,给的例子如下所示

{
    "config": {
        "chainId": 15,
        "homesteadBlock": 0,
        "eip155Block": 0,
        "eip158Block": 0
    },
    "difficulty": "200000000",
    "gasLimit": "2100000",
    "alloc": {
        "7df9a875a174b3bc565e6424a0050ebc1b2d1d82": { "balance": "300000" },
        "f41c74c9ae680c1aa78f42e5647a62f353b7bdde": { "balance": "400000" }
    }
}

由于我们没有定义初始的账户,所以经过考虑,最终做了如下修改。

{
    "nonce": "0x0000000000000042",     "timestamp": "0x0",
    "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "extraData": "",     "gasLimit": "0x8000000",     "difficulty": "0x400",
    "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "coinbase": "0x3333333333333333333333333333333333333333",     "alloc": {     }
}

只是去掉了extraData的内容。

xiaoyu@xiaoyu-VirtualBox:~/eth$ geth --datadir "/home/xiaoyu/eth" init CustomGenesis.json
WARN [09-07|17:24:27] No etherbase set and no accounts found as default 
INFO [09-07|17:24:27] Allocated cache and file handles         database=/home/xiaoyu/eth/geth/chaindata cache=16 handles=16
Fatal: Failed to write genesis block: genesis has no chain configuration

然后可以发现在当前目录生成了对应的文件夹

xiaoyu@xiaoyu-VirtualBox:~/eth$ ls
CustomGenesis.json  geth  keystore

启动节点

xiaoyu@xiaoyu-VirtualBox:~/eth$ geth --datadir "/home/xiaoyu/eth" --nodiscover --rpcapi "db,eth,net,web3" --networkid 1999 console 2>>geth.log
Welcome to the Geth JavaScript console!

instance: Geth/v1.6.7-stable-ab5646c5/linux-amd64/go1.8.1
 modules: admin:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0

创建账户

> personal.newAccount("xiaoyu")
"0x20becac25bc3ab00dbd6ac511c3cd4e5e54abfd7"
> personal.newAccount("xiaoyu2")
"0xf8047f8063fdc7df778aa8b4379c158536ad8a25"
> personal
{
  listAccounts: ["0x20becac25bc3ab00dbd6ac511c3cd4e5e54abfd7", "0xf8047f8063fdc7df778aa8b4379c158536ad8a25"],
  listWallets: [{
      accounts: [{...}],
      status: "Locked",
      url: "keystore:///home/xiaoyu/eth/keystore/UTC--2017-09-07T09-29-43.278548578Z--20becac25bc3ab00dbd6ac511c3cd4e5e54abfd7"
  }, {
      accounts: [{...}],
      status: "Locked",
      url: "keystore:///home/xiaoyu/eth/keystore/UTC--2017-09-07T09-29-57.512583773Z--f8047f8063fdc7df778aa8b4379c158536ad8a25"
  }],
  deriveAccount: function(),
  ecRecover: function(),
  getListAccounts: function(callback),
  getListWallets: function(callback),
  importRawKey: function(),
  lockAccount: function(),
  newAccount: function github.com/ethereum/go-ethereum/console.(*bridge).NewAccount-fm(),
  sendTransaction: function(),
  sign: function github.com/ethereum/go-ethereum/console.(*bridge).Sign-fm(),
  unlockAccount: function github.com/ethereum/go-ethereum/console.(*bridge).UnlockAccount-fm()
}

参考资料

https://github.com/ethereum/go-ethereum/wiki/Private-network
http://www.ethdocs.org/en/latest/

相关实践学习
使用ROS创建VPC和VSwitch
本场景主要介绍如何利用阿里云资源编排服务,定义资源编排模板,实现自动化创建阿里云专有网络和交换机。
阿里云专有网络VPC使用教程
专有网络VPC可以帮助您基于阿里云构建出一个隔离的网络环境,并可以自定义IP 地址范围、网段、路由表和网关等;此外,也可以通过专线/VPN/GRE等连接方式实现云上VPC与传统IDC的互联,构建混合云业务。 产品详情:https://www.aliyun.com/product/vpc
目录
相关文章
|
网络协议 Linux 网络安全
使用tinc+quagga搭建个人SD-WAN网络
使用tinc+quagga搭建个人SD-WAN网络
2098 0
使用tinc+quagga搭建个人SD-WAN网络
|
Kubernetes Cloud Native 网络安全
【云原生-K8s】kubeadm搭建k8s集群1.25版本完整教程【docker、网络插件calico、中间层cri-docker】
【云原生-K8s】kubeadm搭建k8s集群1.25版本完整教程【docker、网络插件calico、中间层cri-docker】
2364 0
【云原生-K8s】kubeadm搭建k8s集群1.25版本完整教程【docker、网络插件calico、中间层cri-docker】
|
2月前
|
安全 区块链
以太坊网络中为什么要设置Gas上限
以太坊网络中为什么要设置Gas上限
33 6
|
消息中间件 监控 NoSQL
ELK搭建(三):监控服务器CPU、网络、磁盘、内存指标
本期我们来讲解如何通过ELK+metricbeat来监控服务器/主机中的CPU、网络、磁盘、内存等指标变化。并绘制会数据看板来方便我们实时监控
507 0
ELK搭建(三):监控服务器CPU、网络、磁盘、内存指标
|
机器学习/深度学习 数据挖掘 PyTorch
|
消息中间件 NoSQL 前端开发
云计算搭建全部内容总结,保证可以搭建一个完整的云计算服务器,包括节点安装、实例的分配和网络的配置等内容
云计算搭建全部内容总结,保证可以搭建一个完整的云计算服务器,包括节点安装、实例的分配和网络的配置等内容
339 0
云计算搭建全部内容总结,保证可以搭建一个完整的云计算服务器,包括节点安装、实例的分配和网络的配置等内容
|
安全 Linux 区块链
教你吃透以太坊的测试网络
主网络中的以太币是有价值的,在主网络上直接进行钱包软件或者智能合约的开发将会是非常危险的,稍有不慎就会损失以太币,甚至影响整个主网络的运行。同时,因为主网络使用人数多,矿工更是不计其数,如果是在开发一个wakuang软件,用一台开发软件的笔记本电脑几乎不可能挖出一个区块,这就导致测试几乎不可行。 于是,出于测试和学习的目的,便会有一小部分节点,使用与主网络不同的创世区块,开启一条全新的区块链,并在上面wakuang和测试,这就是测试网络(Testnet)。.........
686 0
教你吃透以太坊的测试网络
|
TensorFlow 算法框架/工具 Python
【图像分类】TensorFlow2.7版本搭建NIN网络
注解:这里为了简单起见,只是模拟NIN网络结构,本代码只是采用3个mlpconv层和最终的全局平均池化输出层,每个mlpconv层中包含了3个1*1卷积层
121 0
【图像分类】TensorFlow2.7版本搭建NIN网络
|
算法 区块链
简述以太坊P2P网络之UDP
个人认为以太坊是区块链项目中带来技术重新认识和学习的不错的项目,特别是在P2P网络这一块。本文将介绍P2P网络中负责节点之间的通信连接和服务发现,本文的内容主要是对代码层级的理解,可能存在对其理解的错误,欢迎指点。
469 0
简述以太坊P2P网络之UDP
|
Web App开发 网络协议 安全
重学网络系列之(搭建Http实验环境)
前言 文本已收录至我的GitHub仓库,欢迎Star:github.com/bin39232820… 种一棵树最好的时间是十年前,其次是现在
188 0