入门-windows下安装ETH挖矿
对刚入门的区块链开发者来说,刚开始可以在windows本地搭建私有链,便于操作,毕竟,要想真正挖到币还是有难度的,下面以ETH为例,在windows环境下安装并实现挖矿。
For the newly introduced block chain developers, private chains can be built locally in Windows for ease of operation. After all, it is difficult to actually dig money, for example, to install and dig in the Windows environment.
步骤一、安装geth环境。下载地址:https://geth.ethereum.org/downloads/
Step one, install the geth environment. Download:
选择对应操作系统的版本下载安装。下载完安装到对应本地目录,如:E\BlockChain\ETH\Geth
Select the version of the download installation for the corresponding operating system. After downloading, install it to the corresponding local directory, for example: E\BlockChain\ETH\
步骤二、配置初始化用的创世纪文件,命名genesis.json,放到geth的执行目录,内容格式参考如下:
Step two. Configure the original Genesis file, name genesis.json, in the executive directory of geth, in the following format:
{
"config": {
"chainId": 10,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"alloc" : {},
"coinbase" : "0x0000000000000000000000000000000000000000",
"difficulty" : "0x02000000",
"extraData" : "",
"gasLimit" : "0x2fefd8",
"nonce" : "0x0000000000000042",
"mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp" : "0x00"
}
步骤三、初始化:geth --datadir "E:\BlockChain\ETH\Geth\data" init genesis.json
Step three, initialization: geth-datadir "E: \Blockchain\ETH\data" init genesis.json
步骤四、启动服务:geth --datadir=E:\BlockChain\ETH\Geth\data --rpc --rpcport 8545 --rpcaddr "0.0.0.0" --rpcapi "personal,db,eth,net,web3" console
Step IV. Start-up services: geth-datadir=E: \BlockChain\ETH\ETH\data-rpc-rpcport 8545-rpcaddr "0.0.0.0" rpcapi "personal, db,eth,net, web3" console
步骤五、创建账户:personal.newAccount("你的密码")
Step five, create account: personal.newAcaccount
会返回一个钱包地址
returns a wallet address
步骤六、开始挖矿:miner.start(1)
Step VI. Commencement of mining: miner.start (1)
其中1位线程个数,可以适当调整
Of which 1 number of threads can be adjusted appropriately
步骤七、查看挖矿状态:eth.mining
Step 7. Viewing the state of mining: eth.mining
查看区块高度:eth.blockNumber
View block height: Eth. BlockNumber
查看账户余额:eth.getBalance(eth.accounts[0]) 或 eth.getBalance("地址")
View account balances: eth. GetBallance (eth. accounts [0]) or eth.getBallance("Address")
停止挖矿:miner.stop()
Stop mining: mine.stop()
也可以在本地安装ETH钱包,实现账户可视化
The ETH wallet can also be installed locally to make the account visible
步骤一、下载ETH钱包:https://github.com/ethereum/mist/releases
注意版本,安装完打开后会提示更新
Note version. Update when installed and open
步骤二、安装:可以选择geth的安装目录,E:\BlockChain\ETH\Geth\data
Step two, installation: you can choose the installation directory for geth, E:\Blockchain\ETH\data\
安装完打开钱包,如下:
Open wallet after installation as follows:
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。