【超簡単】 VPSでBitcoinなどの仮想通貨マイニング [Python]

【超簡単】 VPSでBitcoinなどの仮想通貨マイニング [Python]

#PR / 楽天モバイル紹介

💰 その節約、固定費の「最大の聖域」が残っていませんか

食費や電気代を削る前に、まず効くのは毎月のスマホ代。大手は月7,000円台、楽天モバイルは使い放題でも月3,278円、使わない月は1,078円。年間で数万円単位の差になります。

▶ いくら下がるか試算する

Pythonでマイニングのロジックを理解しながら、さくらVPSでBitcoin、BitZenyなどの仮想通貨マイニングを行うデモです。
2回のsha256で乱数として使い、ノンスフィールドを変更することで、Block number, transaction, Previous Hash, Difficultyなどからブロックハッシュを計算しています。

### bitcoinのマイニング方法
$ git clone –depth 1 https://github.com/tpruvot/cpuminer-multi.git
$ cd cpuminer-multi/
$ sudo apt-get install automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev make g++
$ ./build.sh
$ ./cpuminer -a sha256d –user=${bitcoin wallet address} –url=stratum+tcp://sha256.jp.nicehash.com:3334

### bitzenyのマイニング方法
$ sudo apt update
$ sudo apt upgrade
$ cd /opt/
$ sudo git clone https://github.com/bitzeny/cpuminer.git cpuminer
$ cd cpuminer
$ sudo apt install automake
$ sudo apt install gcc
$ sudo apt install libcurl4-openssl-dev
$ sudo ./autogen.sh
$ sudo ./configure CFLAGS=”-O3 -march=native -funroll-loops -fomit-frame-pointer”
$ sudo make
$ /opt/cpuminer/minerd -a yescrypt -o stratum+tcp://zny.mofumofu.me:3331 -u ${bitzenny受け取りアドレス}

※CPU使用率が高くなるなどからマイニングが禁止されているサーバーもありますので、サーバーの規約を注意してお試しください。

#PR / 楽天モバイル紹介

📊 あなたのスマホ代、年間でいくら?

大手の無制限プランは年約9万円。楽天モバイルの無制限は年約4万円(月3,278円/最強家族割3,168円)。差はおよそ年5万円
いま乗り換えで最大14,000ポイント還元(新規7,000pt)。※条件は投稿時点・公式要確認

▶ 自分の場合いくら得になるか確認する

仮想通貨 pythonカテゴリの最新記事