主页 > imtoken制作冷钱包 > 以太坊私链搭建Geth+Mist钱包

以太坊私链搭建Geth+Mist钱包

imtoken制作冷钱包 2024-01-08 05:11:20

1.eth、mist客户端下载

客户:

雾客户端:

2.创建以太坊初始区块文件genesis.json

{
  "config": {
    "chainId": 101,
    "homesteadBlock": 0,
    "eip155Block": 0,
    "eip158Block": 0

以太坊钱包名称填什么?_以太坊币钱包_以太坊钱包标识怎么填

}, "alloc": {}, "coinbase": "0x0000000000000000000000000000000000000000", "difficulty": "0x400", "extraData": "", "gasLimit": "0xffffffff", "nonce": "0x0000000000000042", "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000", "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "timestamp": "0x00"

以太坊钱包标识怎么填_以太坊币钱包_以太坊钱包名称填什么?

}

关键字段说明:

chainId : 以太坊区块链网络Id,ethereum主链是1,私有链只用不要与主链冲突即可。
alloc : 预留账户
Coinbase: 旷工账户
Difficulty: 挖矿难度,0x400,这个是简单
extraData:备注信息
Timestamp : 时间戳

以太坊钱包名称填什么?_以太坊钱包标识怎么填_以太坊币钱包

3.初始化区块节点

geth --datadir  data0  init  genesis.json

4.启动geth客户端节点

geth --identity "Node1" --datadir "data0" --rpc --rpcapi "db,eth,net,web3" --rpcaddr "127.0.0.1" --rpcport "8545" --port "30304" --networkid "11" console

关键字段说明

--datadir : 指定节点存在位置,“data0”
--rpc : 启用http-rpc服务器
--rpcapi : 基于http-rpc提供的api接口。eth,net,web3,db

以太坊钱包名称填什么?_以太坊钱包标识怎么填_以太坊币钱包

--rpcaddr : http-rpc服务器接口地址:默认“127.0.0.1” --rpcport : http-rpc 端口(多节点时,不要重复) --port : 节点端口号(多节点时,不要重复) --networkid : 网络标识符 随便指定一个id(确保多节点是统一网络,保持一致)

5.geth常用命令

个人的。 新帐户(“123”)

eth.accounts

personal.unlockAccount(eth.accounts[0]以太坊钱包标识怎么填, "123")

以太币库

以太坊币钱包_以太坊钱包名称填什么?_以太坊钱包标识怎么填

伦理。 getBalance(eth.accounts[0])

miner.start()

矿工。 停止()

6.配置多节点服务

geth --datadir data1 init genesis.json

geth --identity "Node2" --datadir "data1" --rpc --rpcapi "db,eth,net以太坊钱包标识怎么填,web3" --rpcaddr "127.0.0.1" --rpcport "8546" --port "30305" -- networkid "11" 控制台

admin.nodeInfo.enode

admin.addpeer("enode://xxxxxxxx节点信息"

......mist钱包稍后更新