mac系统怎么挖以太坊(如何在Mac上挖掘以太坊-简易教程)
如何在Mac上挖掘以太坊-简易教程
以太坊是一种区块链技术,它于2015年推出,给人们带来无限可能。如果你希望参与到以太坊的运作中来,可以通过挖矿的方式来获得以太币。下面是在Mac系统上挖掘以太坊的简易教程。
步骤1:获取必备软件
在Mac系统上挖掘以太坊需要准备以下软件:
geth客户端
ethminer挖矿软件
Mist钱包
你可以使用以下命令在终端中进行安装:
brew tap ethereum/ethereum
brew install ethereum
安装完成后,你需要创建一个文件夹,用于存储以太坊的区块链数据。你可以通过以下命令创建:
mkdir ~/ethereum
步骤2:启动geth客户端
在终端中输入以下命令启动geth客户端:
geth --identity "YourNodeName" --rpc --rpcport "8545" --rpccorsdomain "*" --datadir ~/ethereum/ --port "30303" --nodiscover --rpcapi "db,eth,net,web3" --networkid 343 --nat "any"
上述命令会将geth客户端启动,并且设置了响应的参数。在终端上你会看到类似以下的输出:
INFO [07-10|12:15:21.156] Maximum peer count ETH=50 LES=0 total=50
INFO [07-10|12:15:21.166] Starting peer-to-peer node instance=Geth/v1.8.23-stable-ccb1a477/darwin-amd64/go1.10.8
INFO [07-10|12:15:21.167] Allocated cache and file handles database=/Users/yourUserName/ethereum/geth/chaindata cache=16 handles=16
INFO [07-10|12:15:21.244] Initialised chain configuration config="{ChainID: 343 Homestead: 1 DAO: DAOSupport: true EIP150: 2 EIP155: 3 EIP158: 3 Byzantium: 4 Constantinople: 5}"
INFO [07-10|12:15:21.244] Disk storage enabled for ethash dir=/Users/yourUserName/ethereum/geth/ethash count=3
INFO [07-10|12:15:21.244] Disk storage enabled for ethash dir=/Users/yourUserName/ethereum/geth/dapp count=1
INFO [07-10|12:15:21.245] Initialising Ethereum protocol version=63 network=343
INFO [07-10|12:15:21.249] Loaded most recent local header number=0 hash=... td=1024
INFO [07-10|12:15:21.249] Loaded most recent local full block number=0 hash=... td=1024
INFO [07-10|12:15:21.249] Loaded most recent local fast block number=0 hash=... td=1024
INFO [07-10|12:15:21.250] Loaded local transaction journal transactions=0 dropped=0
INFO [07-10|12:15:21.250] Regenerated local transaction journal transactions=0 accounts=0
INFO [07-10|12:15:21.273] Starting P2P networking
INFO [07-10|12:15:21.275] HTTP endpoint opened address=localhost:8545 cors=* vhosts=localhost
INFO [07-10|12:15:21.275] WebSocket endpoint opened address=localhost:8546 cors=* vhosts=localhost
INFO [07-10|12:15:21.279] RLPx listener up self=enode://@localhost:30303
INFO [07-10|12:15:21.279] IPC endpoint opened endpoint=/Users/yourUserName/{pathName}/geth.ipc
INFO [07-10|12:15:21.280] IPC endpoint closed endpoint=/Users/yourUserName/{pathName}/geth.ipc
INFO [07-10|12:15:21.280] Ethereum started version=Geth/v1.8.23-stable-ccb1a477/darwin-amd64/go1.10.8
步骤3:启动ethminer挖矿
在新的终端窗口中输入以下命令启动ethminer:
ethminer -G
上述命令会启动ethminer,并且开始挖矿。你会看到类似以下的输出:
Subscription succeeded (等待确认)
Generating DAG ... (eta 20s)
Generating DAG ... (eta 1000s)
Generating DAG ... (eta 3200s)
Generating DAG ... (eta 6664s)
GPU0 t=48C fan=46%, GPU1 t=61C fan=49%, GPU2 t=47C fan=45%, GPU3 t=47C fan=45% 22.51Mh/s ETH 0.10237 (等待确认)
步骤4:使用Mist钱包检查挖矿收益
在终端中输入以下命令启动Mist钱包:
open -a /Applications/Mist.app
启动Mist钱包后,你可以检查你的余额和挖矿收益。
以上就是在Mac系统上挖掘以太坊的简易教程,如果你想要深入了解以太坊,请继续学习相关知识。
原创文章,作者:区块链,如若转载,请注明出处:https://www.53moban.com/3518.html