Efficient BURST mining on macOS

in burst •  last year

hdds.png

BURST is a cryptocurrency on its own blockchain, which core uses PoC (Proof of Capacity) algorithm. Unlike PoW (Proof of Work) blockchains miners uses hard disk space to mine new blocks and get reward. The more capacity you have, the more coins you may earn. You should use a calculator to determine how much money you will get regularly for you capacity. Today you can earn 15 BURST (≈ $0.25) daily for each 1TB of space. You will only need to read 240MB from disk for each 1TB every 4 minutes and calculate some hashes – this sounds very energy efficient. To start mining you need to generate some huge files (called plots).

To start mining on macOS or linux you should be at with terminal.

1. Register a wallet


Use one of the following online wallets to create an account:

This process is simple enough, please do it for yourself. Your wallet have a public address like mine BURST-MWTK-BKY8-ZJ2W-37NKN, you can find it in the top left corner. Anyone can use this address to send you some BURST coins. Inside online wallet discover a button "more info" near your account balance. Trigger it to get your "Numeric Account ID", mine is 1893347256907199281. You will need it for the next step of this guide. Also you will need at least 1 BUSRT for next steps, you can use one of the following faucets to get your first BURST coins for free:

2. Plotting files


Download and compile my optimized fork of mjminer. My optimizations are not yet merged to upstream (original repo). I recommend to use my optimized version to create fully optimized plots directly.

git clone https://github.com/k06a/mjminer.git
cd mjminer
make


If you'll get following error:

--- Compiling for 64-bit arch ---
CFLAGS=-D OSX -D AMD64 -O2 -Wall -D_FILE_OFFSET_BITS=64 -m64
as   -o shabal64-darwin.o shabal64-darwin.s
shabal64-darwin.s:30:14: error: single quote way too long
#    64      'ptr' field (8 bytes)
             ^
make: *** [shabal64-darwin.o] Error 1```


then open file shabal64-darwin.s in any text editor and replace the single quote with double quote on line 30 as bellow

 64      'ptr' field (8 bytes)


to

 64      "ptr" field (8 bytes)


And try to make again:

make


Now you will be able to generate plots with ./plot program:

Usage: ./plot -k KEY [-x CORE] [-d DIRECTORY] [-s STARTNONCE] [-n NONCES] [-m STAGGERSIZE] [-t THREADS]


Here are options description:

  1. KEY should be value of "Numeric Account ID" from BURST online wallet
  2. CORE is plots generation algorithm implementation. Your CPU may support or not some of them (0 for default, 1 for SSE4, 2 for AVX2). Try AVX2 if possible, else try SSE4 if possible, else use default. AVX2 is the fastest, default is the slowest.
  3. DIRECTORY should be path to plots location directory (usually /Volumes/MyHDD1)
  4. STARTNONCE you should start from 0 and for every next plot add NONCES size of previous plot
  5. NONCES is size of the plot, divided by 256KB, so value 4096 means 1GB
  6. STAGGERSIZE is available size of RAM (in nonces) to use while plotting, also value 4096 means 1GB
  7. THREADS is number of threads to use. Try to use number of physical cores multiplied by two.

I've used this sequence of commands to generate my plots. First one produces file 1893347256907199281_0_ 3801088_ 3801088 of 996GB size using 8 threads and 1GB of RAM:

$ sudo ./plot -k 1893347256907199281 -x 2 -d ./ -s 0 -n 3801088 -m 4096 -t 8

Using AVX2 core.
Total generation steps: 928
Creating plots for nonces 0 to 3801088 (996 GB) using 1024 MB memory and 8 threads
Using fcntl::F_SETSIZE to expand file size to 996GB
34.38% Percent done. 12330 nonces/minute, 3:23 left


Second one produces file 1893347256907199281_ 3801088_1900544_ 1900544 of 498GB size using 8 threads and 4GB of RAM:

$ sudo ./plot -k 1893347256907199281 -x 2 -d ./ -s 3801088 -n 1900544 -m 16384 -t 8

Using AVX2 core.
Total generation steps: 116
Creating plots for nonces 3801088 to 5701632 (498 GB) using 4096 MB memory and 8 threads
Using fcntl::F_SETSIZE to expand file size to 498GB
14.05% Percent done. 9680 nonces/minute, 2:48 left


Third one produces file 1893347256907199281_ 5701632_131072_131072 of 32GB size using 8 threads and 8GB of RAM:

$ sudo ./plot -k 1893347256907199281 -x 2 -d ./ -s 5701632 -n 131072 -m 32768 -t 8

Using AVX2 core.
Total generation steps: 4
Creating plots for nonces 5701632 to 5832704 (32 GB) using 8192 MB memory and 8 threads
Using fcntl::F_SETSIZE to expand file size to 32GB
25.00% Percent done. 11080 nonces/minute, 0:07 left


Now I have 3 plots:

1893347256907199281_0_ 3801088_ 3801088 
1893347256907199281_ 3801088_1900544_ 1900544
1893347256907199281_ 5701632_131072_131072


It is not a problem to have gaps between plots. And it is not a huge problem to have overlaps. Miner handle this issues correctly. Only corrupted plots is a problem for miner – because it can't check are plot bytes valid or not.

Your may notice your plot names contains of four numbers with last two equal. Equality of latest two numbers mean fully optimized files. Your plots are fully optimized – this means miner will read only 1 region in each file every 4 minutes. Older plotters may produce non fully optimized plots. You can read more about plots optimization.

3. Prepare Miner


Software you need to use is creepMiner (from development branch): https://github.com/Creepsky/creepMiner/tree/development

You can read Wiki (https://github.com/Creepsky/creepMiner/wiki/Compilation-&-Installation) or just do this:

brew install poco
ln -s /usr/local/opt/openssl/include/openssl /usr/local/include/openssl

git clone -b development https://github.com/Creepsky/creepMiner.git
cd creepMiner
cmake -DCMAKE_BUILD_TYPE=Release .
make
cp burst-miner bin/


Miner is here bin/burst-miner and is ready to run. You just need edit bin/mining.conf subdir to setup miner.

4. Mining on pool


I prefer mining on pool – this is some kind of miners cooperation to get small reward for mining regularly, instead of huge reward once per several months (it directly depends on your plots capacity).

To start mining on pool you need:

  1. Select pool from this list or another list I am using http://pool.burstcoin.ro, it looks strange but have a CloudFlare DDOS protection. Some pools are DDOSed regularly, I think some miners wanna to get more reward and attacks neighbouring pools.
  2. Set reward recipient to pool wallet address, in 2 latest fields enter your password and pool wallet address and wait at least 4 transaction confirmations in your wallet:
    https://wallet.burst-team.us:8126/rewardassignment.html
    https://wallet4.burstnation.com:8125/rewardassignment.html
  3. Configure miner, fill miningInfo, submission and wallet urls and plots array. Here is my mining.conf:
    {
        "logging" : {
            "config" : "information",
            "general" : "information",
            "miner" : "information",
            "nonceSubmitter" : "information",
            "output" : {
                "dirDone" : true,
                "lastWinner" : false,
                "nonceConfirmed" : true,
                "nonceFound" : true,
                "nonceOnTheWay" : true,
                "nonceSent" : true,
                "plotDone" : true
            },
            "path" : "",
            "plotReader" : "information",
            "plotVerifier" : "information",
            "server" : "fatal",
            "session" : "error",
            "socket" : "off",
            "wallet" : "information"
        },
        "mining" : {
            "intensity" : 3,
            "maxBufferSizeMB" : 128,
            "maxPlotReaders" : 0,
            "passphrase" : {
                "algorithm" : "aes-256-cbc",
                "decrypted" : "",
                "deleteKey" : false,
                "encrypted" : "",
                "iterations" : 0,
                "key" : "",
                "salt" : ""
            },
            "plots" : [
                "/Volumes/HDD1",
                "/Volumes/HDD2"
            ],
            "submissionMaxRetry" : 3,
            "targetDeadline" : "0y 20m 0d 00:00:00",
            "timeout" : 45,
            "urls" : {
                "miningInfo" : "http://pool.burstcoin.ro:8080",
                "submission" : "http://pool.burstcoin.ro:8080",
                "wallet" : "http://pool.burstcoin.ro:8080"
            }
        },
        "webserver" : {
            "credentials" : {
                "hashed-pass" : "",
                "hashed-user" : "",
                "plain-pass" : "",
                "plain-user" : ""
            },
            "start" : true,
            "url" : "http://127.0.0.1:8080"
        }
    }
    
  4. Run miner from bin subdir: ./burst-miner and see smith like this:
    MM:bin zzomrot$ ./burst-miner 
    12:53:24: creepMiner 1.6.0 BSD x64
    12:53:24: ----------------------------------------------
    12:53:24: Github:   https://github.com/Creepsky/creepMiner
    12:53:24: Author:   Creepsky [creepsky@gmail.com]
    12:53:24: Burst :   BURST-JBKL-ZUAV-UXMB-2G795
    12:53:24: ----------------------------------------------
    12:53:24: Based on http://github.com/uraymeiviar/burst-miner
    12:53:24: author : uray meiviar [ uraymeiviar@gmail.com ]
    12:53:24: please donate to support developments :
    12:53:24:  [ Burst   ] BURST-8E8K-WQ2F-ZDZ5-FQWHX
    12:53:24:  [ Bitcoin ] 1UrayjqRjSJjuouhJnkczy5AuMqJGRK4b
    12:53:24: ----------------------------------------------
    12:53:24: using config file mining.conf
    12:53:27: Found an invalid plotfile, skipping it!
    12:53:27:   Path: /Volumes/HDD1/.com.apple.timemachine.donotpresent
    12:53:27:   Reason: The plotfile does not have all the required parameters!
    12:53:27: Found an invalid plotfile, skipping it!
    12:53:27:   Path: /Volumes/HDD1/.DS_Store
    12:53:27:   Reason: The plotfile does not have all the required parameters!
    12:53:27: Found an invalid plotfile, skipping it!
    12:53:27:   Path: /Volumes/HDD2/.com.apple.timemachine.donotpresent
    12:53:27:   Reason: The plotfile does not have all the required parameters!
    12:53:27: Found an invalid plotfile, skipping it!
    12:53:27:   Path: /Volumes/HDD2/.DS_Store
    12:53:27:   Reason: The plotfile does not have all the required parameters!
    12:53:27: Total plots size: 1.81 TB
    12:53:27: Submission Max Retry : 3
    12:53:27: Buffer Size : 128 MB
    12:53:27: Pool Host : http://pool.burstcoin.ro:8080 (104.28.17.30)
    12:53:27: Mininginfo URL : http://pool.burstcoin.ro:8080 (104.28.17.30)
    12:53:27: Wallet URL : http://pool.burstcoin.ro:8080 (104.28.17.30)
    12:53:27: Server URL : http://127.0.0.1:8080 (::1)
    12:53:27: Target deadline : 1y 8m 0d 00:00:00
    12:53:27: Mining intensity : 3
    12:53:27: Max plot readers : 2
    12:53:27: Log path : creepMiner_20170612_095324.182808.log
    12:53:27: --------------------------------------------------
    12:53:27: block#      370213
    12:53:27: scoop#      320
    12:53:27: baseTarget# 345314
    12:53:27: --------------------------------------------------
    12:53:29: MWTK-BKY8-ZJ2W-37NKN: nonce found (7m 3d 07:47:12)
    12:53:29:   nonce: 4423910
    12:53:29:   in: /Volumes/HDD2/1893347256907199281_3801088_3801088_3801088
    12:53:29: MWTK-BKY8-ZJ2W-37NKN: nonce on the way (7m 3d 07:47:12)
    12:53:29: MWTK-BKY8-ZJ2W-37NKN: nonce submitted (7m 3d 07:47:12)
    12:53:29:   nonce: 4423910
    12:53:29:   in /Volumes/HDD2/1893347256907199281_3801088_3801088_3801088
    12:53:30: MWTK-BKY8-ZJ2W-37NKN: nonce confirmed (7m 3d 07:47:12)
    12:53:30:   nonce: 4423910
    12:53:30:   in /Volumes/HDD2/1893347256907199281_3801088_3801088_3801088
    12:53:31: MiniMiner: nonce found (4m 6d 23:47:57)
    12:53:31:   nonce: 5365392
    12:53:31:   in: /Volumes/HDD2/1893347256907199281_3801088_3801088_3801088
    12:53:31: MiniMiner: nonce on the way (4m 6d 23:47:57)
    12:53:31: MiniMiner: nonce submitted (4m 6d 23:47:57)
    12:53:31:   nonce: 5365392
    12:53:31:   in /Volumes/HDD2/1893347256907199281_3801088_3801088_3801088
    12:53:31: MiniMiner: nonce found (2m 24d 17:57:37)
    12:53:31:   nonce: 1384972
    12:53:31:   in: /Volumes/HDD1/1893347256907199281_0_3801088_3801088
    12:53:31: MiniMiner: nonce on the way (2m 24d 17:57:37)
    12:53:31: MiniMiner: nonce submitted (2m 24d 17:57:37)
    12:53:31:   nonce: 1384972
    12:53:31:   in /Volumes/HDD1/1893347256907199281_0_3801088_3801088
    12:53:33: MiniMiner: nonce confirmed (2m 24d 17:57:37)
    12:53:33:   nonce: 1384972
    12:53:33:   in /Volumes/HDD1/1893347256907199281_0_3801088_3801088
    12:53:33: MiniMiner: nonce confirmed (4m 6d 23:47:57)
    12:53:33:   nonce: 5365392
    12:53:33:   in /Volumes/HDD2/1893347256907199281_3801088_3801088_3801088
    12:53:34: /Volumes/HDD2/1893347256907199281_3801088_3801088_3801088 (928.00 GB) read in 6.264s (~37.03 MB/s)
    12:53:34: Dir /Volumes/HDD2 read (1 files, 928.00 GB total) in 6.265s (~37.03 MB/s)
    12:53:34: /Volumes/HDD1/1893347256907199281_0_3801088_3801088 (928.00 GB) read in 6.448s (~35.98 MB/s)
    12:53:34: Dir /Volumes/HDD1 read (1 files, 928.00 GB total) in 6.448s (~35.98 MB/s)
    

Thats all! Happy BURST mining!

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Great and detailed write up.
The thumbnail image caught my eye and I thought he's got the same setup as me, the same drives, same hubs... its actually from my video lol.

·

lol, I guess that means you have a nice setup :) I recently started watching your videos, great stuff!

·

Thanks for your videos, they are really interesting! And your configuration is so beautiful :)

Sorry for missing copyright, looks like I can't edit article anymore to add link to your video.

Awesome! Thanks so much! Definitely interested in doing this. Green mining!!! Do you have a electricity consumption number vs. coins mined?

Thanks!

·

MacMini uses 85W, each HDD uses 10W, so at least 1 HDD mining will have consumption 2kWh per day in case of peak, but I am sure consumption it is not on peak while mining.

I am currently wrting plots through the local wallet. and im writing 594gb and its taking foreverrrrrrr . Is this way more efficient? what about gpuplotgenrator?