Mining XMR (MONERO) & BCN (Bytecoin) on Raspberry Pi 3B! 在 Raspberry Pi 3B 上挖門羅幣/BYTECOIN 礦!

in #cn7 years ago

Hi guys,

Hope you still remember my last post about Raspberry Pi and how I feel about this innovative tiny little box. In the last post, I have introduced some background of Raspberry Pi and connectivity difficulty I faced during the set up of the pi. You can see that post here. Link to old post.

大家好!還記得我上一篇有關Raspberry Pi的文章嗎?這款創新型微型電腦非常好玩。在上一篇的文章中,我介紹了Raspberry Pi的背景和我在設置pi過程中所遇到的困難。個人覺得此電腦很合適用於教學,也很高興有朋友看了我的介紹後買了一台回家給自家小朋友接觸。 鏈接到上一篇

Today I want to share with you guys about a mini project I worked on recently.

今天我想和大家分享一下我最近的一個小project。


Mining XMR (MONERO) & BCN (Bytecoin) on Raspberry Pi 3B!

在 Raspberry Pi 3B 上挖門羅幣/BYTECOIN 礦!

Screen Shot 2017-09-19 at 12.26.08 PM.png

Are you thinking what I am thinking?

The answer is yes! Theoretically, if your device has a good enough CPU you could mine numerous crypto coins that allow CPU mining. Here is the list of coins that can be mined by CPUs.

什麼!?這一台小小的東西可以挖礦!? 對的! (理論上)。如果你的設備有一個合適的CPU,你可以挖掘許多允許CPU開采的加密硬幣。 這是CPU可以開采的硬幣列表

Don't believe that tiny box has its own powerful CPU? Check specs below,

不相信這小盒子比你本人更強大更有挖掘的潛力? 看看下面規格,

Specifications of Raspberry Pi

SoCBroadcom BCM2837
CPU4× ARM Cortex-A53, 1.2GHz
GPUBroadcom VideoCore IV
RAM1GB LPDDR2 (900 MHz)
Networking10/100 Ethernet, 2.4GHz 802.11n wireless
BluetoothBluetooth 4.1 Classic, Bluetooth Low Energy
StoragemicroSD
GPIO40-pin header, populated
PortsHDMI, 3.5mm analogue audio-video jack, 4× USB 2.0, Ethernet, Camera Serial Interface (CSI), Display Serial Interface (DSI)



From the above, you will see there are CPU, GPU, 1G RAM and a wifi module. Impressive specs within a credit-card size board!

從上面可以看到它有CPU,GPU,1G RAM和WiFi的模塊。 是時侯感唉時代的進步!


Let's try to be a sexy crypto miner to impress the girl next door!

First off, let's see what kind of coins we can mine with this magical Pi.

Due to its physical limitation, we have to exclude all the GPU mining coins (Ya cold-hearted Pi has no love for GPU coins). Because the GPU on Pi is not compatible with all of the mining programs and no one creates a mining program for Pi.

This narrowed down our choices. We want some coins that allow our Pi to mine with its CPU processors (We got 4 in this little beast). Let's choose Bytecoin (BCN) & Monero (XMR)! Because both of them are using CryptoNight as its POW algorithm.

這個時代,你若跟妹子自介時加上一句說:「 我同時也是一名加密幣礦工。」包你有一個快樂的晚上。讓我們嘗試成為一名礦工來打擾女生吧!

首先,我們來看看可以用這個神奇的Pi來挖什麼樣的加密幣。由於物理限制,我們必須排除所有用GPU採礦的密幣。 因為Pi上的GPU與所有的採礦應用程式不兼容,也沒有人為Pi創建一個採礦應用程式。所以我們想要一些能允許我們的Pi用CPU處理器來挖的加密幣(pi有4 CORE CPU)。 就選擇Bytecoin(BCN)和Monero(XMR)吧! 因為他們都使用CryptoNight作為其Proof-Of-Work算法。以下是一些科普

CryptoNight

Info from Bitcoin wiki

CryptoNight is the proof-of-work algorithm used in CryptoNote and Bytecoin (BCN). It is designed to be egalitarian, being suitable for ordinary PC CPUs, but not the special purpose devices for mining. Therefore, the currencies based on CryptoNight are CPU-mined only.


Installing all the dependencies

OK! Now we got the Pi up and running, we have the coins' name we would like to mine. Now we need a script to run. But before that, we need to install all the required dependencies. And also install the CPUminer on our Pi.

Let's go to the Pi terminal and type these commands in one by one.
(lines with # in front are explanation for the next line, no need to type into the terminal )

安裝所有依賴項

好! 現在我們還欠一個腳本來運行應用程式。 但在此之前,我們需要安裝所有必需的依賴項。 並將CPUminer安裝在我們的Pi上。我們去Pi終端,並逐個輸入這些命令。(每有#號在前的行是下一行的說明,不需要輸入到終端)

Installing all the dependencies

# update raspbian
sudo apt-get update -y
# install the following dependent modules
sudo apt-get install autoconf libcurl4-openssl-dev libjansson-dev openssl libssl-dev gcc gawk
# clone this miner repo
git clone https://github.com/lucasjones/cpuminer-multi.git
# navigate to the directory and compile
cd cpuminer-multi
./autogen.sh
./configure
make
# to see instructions on how to use the CPUminer:
./minerd --help

After everything is correctly installed. Next step is to put in this command

一切安裝正確後 下一步是執行運行腳本的命令

To mine XMR, use this command | 若要要挖掘XMR,請使用以下命令:
./minerd -a cryptonight -o stratum+tcp://xmr.pool.minergate.com:45560 -u [email protected] -p x -t 4

To mine BCN, use this command | 若要要挖掘BCN,請使用以下命令:
./minerd -a cryptonight -o stratum+tcp://bcn.pool.minergate.com:45550 -u [email protected] -p x -t 4

Just that simple! You might notice that this command will connect you with minergate XMR pool. For now, as far as I know, It is the easiest mining pool to connect with with the least trouble. That said, you will also need to register a minergate account and use that email you registered with and replace [email protected].

就這麼簡單! 您可能會注意到此命令將連接pi與 Minergate 的XMR礦池。 據我所知,Minergate 是現時連接最簡單的採礦池。 也就是說,您還需要註冊一個Minergate的帳戶,並使用該註冊電子郵件,替換到 [email protected]


Let's check what do we have back!

來看看成果吧!


Rpi mining-03.jpg

Rpi mining-01.png

^This is the result returned back from the terminal when mining BCN.


Rpi mining-02.png

Rpi mining-04.jpg

^This is the result returned back from the terminal when mining XMR.

Conclusion (Absolutely Not Profitable but very Educational)

It was fun hacking with the Pi although the hashrate is low as hell. Despite its amazing specs as a tiny board, you still won't make a single coin within a couple months. Anyhow, I learned how mining works. And gained a better understanding of the crypto world.

It also got me thinking: no matter how the technology changes, people still have to sacrifice something to gain something back. Just the form of sacrifices changed.

結論(浪費電但富有教育性)

這是有趣的Pi 小 project。 儘管hashrate低得可憐。 低到幾個月至半年24/7不停採礦,你仍不會採到一枚幣。 無論如何,我學習了也了解了採礦的工作原理。 並更加了解加密幣的世界。

同時它也讓我想到:無論科技如何進步如何轉變,人們還是要犧牲一些東西來獲得回報。 只是犧牲的形式改變了。(這句可以對得起我逝去的星期天。)


謝謝你閱讀這麼久。 希望你會喜歡這篇文章。

Thank you for reading this long. Hope you enjoy it.

Please Upvote & Follow @nuagnorab for more interesting posts like this.

Sort:  

Upvoted following and resteemed!

(Did you join the SteemPi, Orange Pi PC Giveaway ?)

Hi, @techtek! Thanks for the support! I heard of your SteemPi project. Very interesting! I've joined the giveaway now that you mentioned :)
Definitely gonna try it out with my Pi soon! Good work! Can't wait to see more out of it!

Thanks for joining the giveaway, It can never hurt to have some extra Pi :)

Very cool and informative. If only it was profitable! But a great side project for anyone interested in mining and raspberry pi systems! :)

That's so true! It can be a very good way to introduce youngsters to the world of blockchains. IMO blockchains can be the very next thing to boost up our living. So if the kids are interested, best to teach them before it becomes mainstream.

Hmm, looks interesting. No harm in giving it a try. Anyways, Nice post. Thanks for all the information.

thanks! glad you found it interesting.

少得可憐 :(

:( m記加大都唔得。

我連OS都還安裝不了!!!!!

現在okay 了吧!你將會教你兩個小美人如何玩PI 啊?:)

哈哈哈哈,我跟我老婆就是說這個理由的。

我覺得好難啊...

其實比你想像中簡單得多。就裝幾個dependencies ,clone 個github repo, run 個command.

That's cool but how much will it's hashing power be??

very low, almost negligible

Congratulations @nuagnorab! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of comments received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Awesome tutorial, thanks... I have a question. How do you check your balance for mined coins? Did you create a wallet before mining or what?

Coin Marketplace

STEEM 0.17
TRX 0.16
JST 0.029
BTC 60412.47
ETH 2375.47
USDT 1.00
SBD 2.62