LoginSignup
15
12

More than 5 years have passed since last update.

BitZenyのMinerをUbuntuでビルドして採掘する

Posted at

はじめに

BitZenyとはBitcoinから派生した暗号通貨です.
採掘に専用機器が必要なBitcoinとは異なり,CPUでの採掘をメインで開発されたため,一般的なマシンでも比較的簡単に採掘が可能なのが特徴です.
Windows用のMinerはバイナリが公開されていますが,他のOSではソースからビルドする必要があります.

環境

  • Ubuntu 16.04 LTS
  • 2.4 GHz Intel Xeon® E5-2673 v3 8コア
  • git, gcc, automakeはインストール済み

依存関係のインストール

libcurl, janssonをインストールします.

# apt-get install build-essential libcurl4-openssl-dev

ビルド

リポジトリをクローンしてコンパイルします.

$ git clone https://github.com/bitzeny/cpuminer.git
$ cd cpuminer
$ ./autogen.sh
$ ./configure CFLAGS="-O3 -march=native -funroll-loops -fomit-frame-pointer"
$ make

成功すると,実行ファイルminerdが生成されます.

マイニング

マイニングにはソロマイニングとプールマイニングがありますが,ここではプールマイニングについて説明します.

$ ./minerd -a yescrypt -o stratum+tcp://POOL:PORT -u user.worker -p password 

このようなログが出力されたら採掘できています.

[2017-11-07 08:21:00] thread 2: 4096 hashes, 0.62 khash/s
[2017-11-07 08:21:00] thread 5: 4096 hashes, 0.61 khash/s
[2017-11-07 08:21:00] thread 3: 4096 hashes, 0.61 khash/s
[2017-11-07 08:21:00] thread 7: 4096 hashes, 0.61 khash/s
[2017-11-07 08:21:00] thread 4: 4096 hashes, 0.61 khash/s
[2017-11-07 08:21:00] thread 6: 4096 hashes, 0.61 khash/s
[2017-11-07 08:21:00] thread 1: 4096 hashes, 0.61 khash/s
[2017-11-07 08:21:00] thread 0: 4096 hashes, 0.60 khash/s
[2017-11-07 08:21:01] thread 2: 348 hashes, 0.61 khash/s
[2017-11-07 08:21:01] accepted: 1/1 (100.00%), 4.88 khash/s (yay!!!)

シェルスクリプトを作ってしまえば楽です.

#!/bin/sh
./minerd -a yescrypt -o stratum+tcp://POOL:PORT -u user.worker -p password

おわりに

BitZenyは2017年10月末にようやく1円を超えました.いつか国内の取引所に上場することを願っています.

15
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
12